Example Function Blocks for evaluation using the PLC data types
Example function block (FB_example_evaliation) Download
User note Due to the complexity of this sample program, it is recommended to use these function blocks only as an experienced user. Alternative function blocks can be found in the chapter Example program for the evaluation of the EL34xx. |
This functionblock handles the complete reading of the available values from the EL3443 and EL3453 power measurement terminals and stores them in a STRUCT provided for this purpose:
To use the function module
- the predefined PDO assignment "Default + Variant" under "Process Data" for the terminal must be selected.
- Then the PLC data type (structure from the process data) must be activated in the "PLC" tab.
- After downloading the sample function block it may be added to the PLC project.
- You can then create and call an instance of the added function module in MAIN.
- Then the process data structure from the PLC must be linked to the hardware.
- After activating and starting, all values in the overall structure must then be read out:
View of the complete structure
In this example function block all variables that are present in both the PDOs and the Variant Values are read out via the PDOs, so that these values are updated every cycle. Due to the multiplexing of the values in the Variant Values, the reading of the terminal information requires several PLC cycles. Cyclic reading of all possible data from the PDOs reduces the time required for complete readout. Compared with multiplexing over several cycles, cyclical reading of the PDOs also makes it easier to detect peak values of variables. The following figure shows a scope recording of the power factor in comparison with the PDOs and the Variant Values.