beautypg.com

Compactlogix analog input logic – Rockwell Automation Energy Management Accelerator Toolkit Quick Start User Manual

Page 433

background image

Rockwell Automation Publication IASIMP-QS016C-EN-P - October 2014

433

Energy Electric Add-On Instructions Appendix C

CompactLogix Analog Input Logic

The following logic is included in the Energy_Electric_Analog Add-On Instructions to calculate the total kWh electric
consumption from a CompactLogix analog input.

The Inp_Meter_Analog_Value tag is the instantaneous electric value from the CompactLogix analog input. To calculate
total kWh, the instantaneous electric value is calculated every 250 ms and stored as Buffered_Flow. This value is then
included in the Val_Total_kWh, total consumption. For very small instantaneous values, a comparison between the new
Val_Total_kWh and the previous Val_Total_kWh (Temp_Buffer) is performed by using the NEQ instruction. If the two
values are not equal the Buffer_Flow is cleared.

When the total value equals 10 million, the rollover rung resets the Val_Total_kWh value.

Rollover Rung