<< Click to Display Table of Contents >> Collecting the energy data of an energy metering module |
mapp Services V5.16
In order to calculate the energy consumption of a machine, the energy data of energy metering module X20AP3132 should be collected and evaluated. In addition, the power data of the module should also be displayed for analysis purposes.
It should also be possible to export the collected data to a USB flash drive. This allows the data to be collected to carry out optimizations.
•Component list
•MpEnergyCore (own MpLink): Collects energy data.
•MpEnergyRegPower(MpLink from MpEnergyCore): Used to register power data.
•MpEnergyRegEnergy(MpLink from MpEnergyCore): Used to register energy data.
The "MpEnergyCore Default" configuration is added.
It is important in the configuration of the energy metering module that the same energy unit is used as in MpEnergy. The energy unit in MpEnergy is defined for MpEnergyRegEnergy or MpEnergyRegPower using input parameter "Units" of type MpEnergyRegEnergyUnitsEnum. A different unit can be specified in the energy metering module configuration, but conversion must take place in the application for this.
The energy metering module provides the desired data for MpEnergyRegPower or MpEnergyRegEnergy. MpEnergyRegPower returns the power data, and MpEnergyRegEnergy returns the desired energy data.
With MpEnergyRegEnergy, the energy metering module's recorded active energy ("ActiveEnergy") and active energy given off ("ReactiveEnergy") must be combined.
With MpEnergyRegPower, the energy metering module's recorded active power ("ActivePower") and the active power given off ("ReactivePower") must be combined.
The relevant data points can also be taken from the data sheet for the energy metering module.
Components MpEnergyCore, MpEnergyRegPower and MpEnergyRegEnergy are added to collect the energy data.
The components are connected to one another as depicted in "Connection diagram". All components are then configured.
The variable that was connected to the recorded active energy ("ActiveEnergy") in the energy metering module's I/O mapping must be connected to input parameter "ForwardActiveEnergy" of component MpEnergyRegEnergy. The variable for the active energy given off ("ReactiveEnergy") is connected for input parameter "ReverseActiveEnergy" .
MpEnergyRegEnergy_0.ForwardActiveEnergy := DINT_TO_LREAL(ActiveEnergy);
MpEnergyRegEnergy_0.ReverseActiveEnergy := DINT_TO_LREAL(ReactiveEnergy);
The variable that was connected to the active power ("ActivePower") in the energy metering module's I/O mapping must be connected to input parameter "ActivePower" of component MpEnergyRegPower. It is important to note that the value must be multiplied by 4. For more information, see here. The variable for the reactive power ("ReactivePower") is connected for input parameter "ReactivePower".
MpEnergyRegPower_0.ActivePower := INT_TO_LREAL(ActivePower)*4;
MpEnergyRegPower_0.ReactivePower := INT_TO_LREAL(ReactivePower);
MpEnergyRegEnergy uses mode mpENERGY_REG_MODE_COLLECT, which means the collected data is actively included in the calculation of the energy data. MpEnergyRegPower uses mode mpENERGY_REG_MODE_MONITOR_ONLY, which means the power data is not actively included in the calculation of the energy data. The data is only for monitoring and analysis purposes.
The collected energy data is calculated using MpEnergyCore. The command "MpEnergyCore.Export = TRUE" exports the collected data to a specified data storage device such as a USB flash drive.