AnsweredAssumed Answered

Need help to calculate the consumption of the current shift and the previous shift in PI AF

Question asked by Nicolas.Isambourg on Dec 14, 2016
Latest reply on Dec 15, 2016 by knightk

Dear Forum Members,

 

our plant works 24 hours a day, in 3 shifts of 8 hours.

  • Shift A from 6h to 14h
  • Shft B from 14h to 22h
  • Shift C from 22h to 6h

 

I have to calculate the consumption for the current shift and the previous shift in PI AF.

So I created 3 PI AF attributes:

  • "Consumption" linked to a PI Point
  • "Consumption in the current shift"

                    PITagVal('Consumption', '*') - PITagVal('Consumption', {StartTime of the current shift})

  • "Consumption in the previous shift"

                    PITagVal('Consumption', {EndTime of the previous shift}) - PITagVal('Consumption', {StartTime of the previous shift})

 

How can I model the shifts and their starttime and endtime ?

How can I determine the starttime of the current shift and the starttime and endtime of the previous shift ?

How would you configure the attributes "Consumption in the current shift" and "Consumption in the previous shift" ?

 

Thanks,

Best regards,

Outcomes