# Per Shift Energy

• 14th December 2010, 15:25
tanveerali
Per Shift Energy
I am working on energy per shift .I try it with time control and allocation but I did not get it. This is the only part that is left in my project .please send me step by step procedure with screen shot. Energy per shift HMI is attached with this email

There are three shifts in 24h

1 Night shift(22:30 to 06:30)
2) Day shift(06:30 to 14:30)
3) Swing shift(14:30 to 22:30)

I get the energy variable from relay that is continuously increase

•How I can hold the start value and then subtract this value with current value of energy
For example : start value is 2888kwh and current value is 2889kwh the display value on HMI show 1kwh energy and its continue increase like 1,2,3,4,5,…. then its multiply with cost and display on HMI

•After completing 8h shift the night energy value and cost is hold and swing shift is start
And will hold the value after 8h .

•when day shift complete and daily shift complete 24 hr then all today value and cost of night, swing ,day and daily is shift to yesterday and today session is start again

•how to multiply energy with cost and display it on HMI
• 14th December 2010, 23:56
markclemens
Re: Per Shift Energy
one thing you could do is record the value for this variable in an archive at the beginning and the end of a shift. Using the report generator you make calculations and write the result on a variable to be displayed on a screen.

This also allows you to make weekly reports, monthly reports, year reports etc.
• 15th December 2010, 00:04
markclemens
Re: Per Shift Energy
Another thing you could do, if you are not interested in historical data older than a day, is to use triggered allocations.

At the end of each shift you can use a triggered allocation to write the current value to an internal variable for the closed shift. Using a mathematics variable (also again triggered) you can calculate the difference between the value from the currently closed shift and the previous closed shift, and display this value in a screen.

For each shift you would need an internal variable, an allocation, a trigger for the allocation, a mathematics variable (for the calculation) and a trigger (for the mathematics calculation)
• 15th December 2010, 08:42
tanveerali
Re: Per Shift Energy
• 22nd May 2018, 12:40
kleivern
Re: Per Shift Energy
Quote:

Originally Posted by markclemens
Another thing you could do, if you are not interested in historical data older than a day, is to use triggered allocations. <br>
<br>
At the end of each shift you can use a triggered allocation to write the current value to an internal variable for the closed shift. Using a mathematics variable (also again triggered) you can calculate the difference between the value from the currently closed shift and the previous closed shift, and display this value in a screen. <br>
<br>
For each shift you would need an internal variable, an allocation, a trigger for the allocation, a mathematics variable (for the calculation) and a trigger (for the mathematics calculation)

<br><br>I have a question: How do you know when the shift has ended. Do you have a shift status available, or have you accessed this via the API (C#)? I need to know when the shift starts and ends, and also when the pauses occur in the shift. I am going to use this for measuring downtime on machines.<br>
<br>Regards,<br>Tor-Egil Kleiv