FB_HVACPowerMeasurementKL3403Ex
Application
This function block serves to control a 3-phase power measurement terminal (KL/KS3403). The terminal data is read out and all variables that depend on it are derived. The Bus Terminal KL3403 enables the measurement of all relevant electrical data of the supply network. The voltage is measured via the direct connection of L1, L2, L3 and N. The current of the three phases L1, L2 and L3 is fed via simple current transformers. All measured currents and voltages are available as RMS values. In the KL3403 version, the active power and the energy consumption for each phase are calculated. Through the relationship of the RMS values of voltage U * current I and the active power P, all other information such as apparent power or phase shift angle cos φ can be derived. For each fieldbus, KL3403 provides a comprehensive network analysis and an energy management option. The data is read out in 8 groups one after the other. Dependent values are calculated cyclically. The energy measurement is read out from the terminal as a 32-bit value with the overflow from register 1. The input bDelEnergyConsumption can be used to delete this value.
The results of the power measurement are available in the output structure ST_HVACPowerMeasurementEx.
The difference compared with the previous function block FB_HVACPowerMeasurementKL3403 lies in the output format for the results. The results are available in the structure ST_HVACPowerMeasurementEx in LREAL format. The output was extended by the frequencies of the three phases.
The input and output variables wDataL1, wDataL2, wDataL3, bySBL1, bySBL2, bySBL3, byCBL1, byCBL2, byCBL3, iDataOutL1, iDataOutL2 and iDataOutL3 must be linked with the KL3403 Bus Terminal. They are needed in order to obtain all the data from the terminal. |
TYPE ST_HVACPowerMeasurementEx
Name : Type Unit Description
STRUCT
fIL1, fIL2, fIL3 : LREAL; A Ieff Strom (Effektivwert)
fIg : LREAL; A Gesamt Strom (Effektivwert)
fUL1, fUL2, fUL3 : LREAL; V Ueff Spannung (Effektivwert)
fPL1, fPL2, fPL3 : LREAL; kW P Wirkleistung pro Phase
fPg : LREAL; kW Pges Wirkleistung
fCosPhiL1, fCosPhiL2, fCosPhiL3 : LREAL; cosPhi Leistungsfaktor pro Phase
fCosPhi : LREAL; cosPhiges Leistungsfaktor
fWL1, fWL2, fWL3 : LREAL; kWh Energieverbrauch
fWg : LREAL; kWh Energieverbrauch
fImaxL1, fImaxL2, fImaxL3 : LREAL; A Imax Spitzenwert des Stroms
fUmaxL1, fUmaxL2, fUmaxL3 : LREAL; V Umax Spitzenwert der Spannung
fPmaxL1, fPmaxL2, fPmaxL3 : LREAL; kW Pmax Spitzenwert der Wirkleistung
fSg : LREAL; kVA Sges Scheinleistung
fQg : LREAL; kvar Qges Blindleistung
fFrequencyL1, fFrequencyL2, fFrequencyL3 : LREAL; Hz Frequenz
END_STRUCT
VAR_INPUT
wDataL1, wDataL2, wDataL3 : WORD;
bySBL1, bySBL2, bySBL3 : BYTE;
diCurrTransFactor : LREAL;
bDelEnergyConsumption : BOOL;
wDataLx: input data from the three channels of the KL3403.
bySBLx: status byte of the three channels of the KL3403. Reports which value can be read via the input (wDataLx).
diCurrTransFactor: transformation factor of the current transformer, used for conversion to the actual string current and the associated values.
Since the measured end value is always dec. 1000 (100.0%) irrespective of the terminal type, the primary end value of the transformer must be specified for the factor.
Example KL3403-0000: a 400/1A transformer results in a diCurrTransFactor of 400. With an internal resolution of 0.001 A, a measured value of max. 1 A results in an end value of dec. 1000 (100.0%) * diCurrTransFactor = 400 A.
Example KL3403-0010: a 400/5A transformer results in a diCurrTransFactor of 400. With an internal resolution of 0.005 A, a measured value of max. 5 A results in an end value of dec. 1000 (100.0%) * diCurrTransFactor = 400 A.
bDelEnergyConsumption : a positive edge at this input deletes the energy consumption in the EEPROM. The energy consumption is counted in RAM and saved every 15 minutes in the EEPROM. It is retained there even if the KL3403 is switched off.
1) The minimum and peak values are deleted when the KL3403 is switched off.
VAR_OUTPUT
BDelEnergyMeasuredValuesBusy : BOOL;
bError : BOOL;
iErrID : UDINT;
byCBL1, byCBL2, byCBL3 : BYTE;
iDataOutL1, iDataOutL2, iDataOutL3: INT;
stQ_PowerMeasurementEx : ST_HVACPowerMeasurementEx;
bDelEnergyMeasuredValuesBusy: since the measured energy values are deleted from the internal EEPROM, no value is updated during this time and the flag bDelEnergyMeasuredValuesBusy shows TRUE.
bError: if TRUE, an error has occurred in the register communication.
iErrID: error ID in the register communication
0x100 Timeout error. The permissible execution time has been exceeded.
0x200 Parameter error (e.g. with an invalid register number).
0x300 The read value differs from the written value (write access to this register possibly not allowed or failed )
byCBLx: this output serves the selection of the desired input value and register communication in order to delete the energy consumption.
iDataOutLx: this output serves the register communication in order to delete the energy consumption.
stQ_PowerMeasurementEx: the results of the power measurement as an output data structure.