Electricity Meter

Lib.Hvac.v1_0.T42_ElectricityMeter

Counters for active, inductive, and capacitive components of energy. Processing of quarter-hours and energy time derived from the quarter-hour signal.

  • Lib.Hvac
program test
    var
        em: lib.hvac.v1_0.T42_ElectricityMeter;
    end_var

    em();
end_program
Inputs Name Data TypeRetainRequired Connection Meaning
q udint No No Synchronization input for the quarter-hour signal (quarter-hour counter)
x_act real No No Counter input for the active component of energy
x_ind real No No Counter input for the inductive component of energy
x_cap real No No Counter input for the capacitive component of energy
bx_act_rstbool No No Reset counter for the active component of energy
bx_cap_rstbool No No Reset counter for the capacitive component of energy
bx_ind_rstbool No No Reset counter for the inductive component of energy
Ky0_act real Yes No Q constant linear transformation for the active component of energy
Ky0_ind real Yes No Q constant linear transformation for the inductive component of energy
Ky0_cap real Yes No Q constant linear transformation for the capacitive component of energy
K_act real Yes No K constant linear transformation for the active component of energy
K_ind real Yes No K constant linear transformation for the inductive component of energy
K_cap real Yes No K constant linear transformation for the capacitive component of energy
q_offset int Yes No Maximum time difference from exact quarter-hour relative to the last quarter-hour signal in [s], mechanism see description
Outputs Name Data Type Meaning
e_time dt Energy time according to the quarter-hour signal (max. 15min difference against PLC time)
q_time real Time in the current quarter-hour
q_order real Order of the quarter-hour in the day
q_signal real Quarter-hour signal 1
y_act real Value of the active counter without transformation
y_ind real Value of the inductive counter without transformation
y_cap real Value of the capacitive counter without transformation
Ky_act real Value of the active counter after transformation
Ky_ind real Value of the inductive counter after transformation
Ky_cap real Value of the capacitive counter after transformation
cos_fi real Power factor
sync_err bool Quarter-hour signal failure indication
q_start dt Timestamp of the start of the current quarter-hour
time_diff int Time difference - energy time obtained from the quarter-hour vs. PLC time

1 Signaling is performed by a transition from false to true, lasting for 5 seconds, and then returning to false

Counters are protected against overflow, and linear transformations Ky_X = K_X*y_X + Ky0_X can be set for each component. It works with energy; if power processing is required, an integrator functional block must be added in advance. Mechanism for handling quarter-hour signal failure. If two consecutive quarter-hour signals differ by more than the q_offset input defines in seconds, the quarter-hours will be controlled by RTC and the sync_err signal will be set.

  • © Energocentrum Plus, s.r.o. 2017 - 2024