Programming the PLC user program
● You take the total active power from the input address and transfer the value to
DB9907.DBD20. This must be realized according to the following point "Adapt byte
sequence".
● You take the imported active power from the input address and transfer the value to
DB9907.DBD24. This must be realized according to the following point "Adapt byte
sequence".
● You take the exported active power from the input address and transfer the value to
DB9907.DBD28. This must be realized according to the following point "Adapt byte
sequence".
● If the control bits DB9907.DBX0.2 and DBX0.3 are equal to 0, then the HMI counts the
energy on the basis of the total active power transferred from the SENTRON between the
start and stop.
● If the imported and exported energy is to be directly evaluated by SENTRON PAC
(DB9907.DBX0.2 and DBX0.3 equal to 1), then program this measurement in the user
program as follows:
– SENTRON PAC devices permanently cumulate the "imported active energy (tariff 1)"
or "the exported active energy (tariff 1)" separately when their supply voltages are
connected.
– With the positive edge of the signal "Measurement running" (DB9907.DBX2.0) you
buffer these instantaneous values from SENTRON (imported and exported active
energy T1)
– Cyclically generate the differences between the energy data now being counted minus
the initial values, divide the differences by 1000.0 and transfer the results to
DB9907.DBD12 (for measured imported active energy T1) and DB9907.DBD16
(measured exported active energy T1) up to the STOP signal (falling edge).
– During the measurement, the increasing difference (energy in kWh) is displayed on the
HMI, which can then be read as measured value with Stop measurement.
Adapting the byte sequence
Save the values of the SENTRON PAC so that the byte sequence of the double words is
swapped over (Endian conversion).
The CTRL_E and SENTRON blocks are located in the following directory:
Ctrl-E Analysis
3.3 Commissioning the PLC for Ctrl-E Analysis
Ctrl-Energy
34 System Manual, 01/2015, 6FC5397-0EP40-5BA2