Commissioning of the example program
The program is already pre-configured such that the settings in the PLC described below do not absolutely have to be changed. To start you can jump directly to the item "Procedure for starting the program"
Adaptation of the PLC to the selected oversampling factor
Adaptation of the PLC to the selected oversampling factor
The structure of the program enables the oversampling factor to be freely configured. If the oversampling factor of the terminal is changed, then the PLC must be adapted to it. The settings described below are made in the global variable list (see fig. Global Variable List):
- The constant global variable CnMaxOvs corresponds to the selected oversampling factor.
- The constant global variable CnUpperSampleArray corresponds to CnMaxOvs – 1.
- Furthermore, the size of the FIFO buffer must be specified (see description of the function of the example program). The size is specified by the constant global variable CnSizeOfFIFOBuffer
- The constant global variable CnUpperFIFOBufferArray is CnSizeOfFIFOBuffer – 1.
- The variable CnMaxRecordedValues specifies the number of values that are used for the floating average calculation of the RMS values. The smallest possible value is 1
- The global variable bValuesZeroWhenDataInvalid specifies whether the FIFO buffer is to be filled with zeros in case of invalid data. In case of invalid data no more calculations take place for the channel concerned in any case. Filling the FIFO buffer with zeros may make it easier to find the source of the error.
Adaptation of the calculation of voltage and current from the raw data
The program allows the adaptation of the conversion of the raw data into the corresponding voltage and current values. The default settings are already adapted to the EL3773 and do not absolutely have to be changed for commissioning.
Only the transformation factor of the current transformer should be checked.
- All necessary settings for the calculation of the respective voltage and current values are made in the MAIN. The presets correspond to the standard settings of the EL 3773
- rMaxVoltage specifies the maximum measuring voltage
- rMaxCurrent specifies the maximum measuring current
- iMaxRawValue specifies the raw value of the terminal at the maximum measuring voltage.
- The three variables rTransformerFactor specify the transformation factors of the current transformers for the respective current channels
- Furthermore, offsets can be specified per channel. The inclusion of the offsets in the calculation of the measured values takes place directly by means of adaptation of the respective raw value.