
The function block IMP_COUNT counts the amount of a pulse. This is used in an S0 interface to determine the energy quantity or a flow rate.
On a positive edge, the output SUM is calculated.
Specifies the size of the additive sum. This value corresponds to the unit. See example below.
Specifies the resolution of the additive sum. The value represents the number of pulses per unit. If this value is not specified or is equal to 0, nothing is added to the sum.
If the input is true, the output SUM is reset to 0.
The output returns the counted amount. This is calculated on a positive edge at the input IMP with the following formula:
SUM=SUM+SIZE/RES
Tip: The value of the output can be overwritten under the variables in the preview.
An electricity meter generates 500 pulses per kWh and a water meter measures 0.25 liters per pulse.
| Inputs/Outputs | Electricity Meter | Water Meter |
|---|---|---|
| SIZE | 1'000 | 0.25 |
| RES | 500 | 1 |
| SUM | in Wh | in Liters |
Note: Counting in Wh is correct. This enables easy conversion to the correct SI units. If the input SIZE is set to 1, this corresponds to kWh.