The Statistic Meter reads the numeric value received on the Input connector and calculates accumulated totals for different time periods.
The node provides values for the current and previous day, week, month and year.
The calculated values are persistent and are therefore preserved when the server reboots.
The Start Date output provides the date and time of the most recent reset.
The outputs can be refreshed manually using the Data Request input or automatically when the Auto refresh property is enabled.
| Connector | Type | Description |
|---|---|---|
| Input | Input | Numeric value used by the Statistic Meter to calculate the accumulated statistics. |
| Reset | Input | Resets all accumulated statistics when set to 1. |
| Data Request | Input | When set to 1, forces the node to refresh the output values. |
| Gate | Input | Optional input available when the Gate property is enabled. It can be used to activate the node and is also valid for its first initialization. |
| Curr. Day | Output | Total value for the current day. |
| Curr. Week | Output | Total value for the current week. |
| Curr. Month | Output | Total value for the current month. |
| Curr. Year | Output | Total value for the current year. |
| Prev. Day | Output | Total value for the previous day. |
| Prev. Week | Output | Total value for the previous week. |
| Prev. Month | Output | Total value for the previous month. |
| Prev. Year | Output | Total value for the previous year. |
| Start Date | Output | Date and time of the most recent reset operation. |
| Property | Description |
|---|---|
| Auto refresh | Enables automatic refreshing of the Statistic Meter outputs. |
| Label | Defines the label used to identify the node. |
| Await all inputs | When enabled, the node waits for the required input values before performing its processing. |
| Refresh rate | Defines the interval between two automatic output refreshes when Auto refresh is enabled. |
| Gate | Enables or disables the optional Gate input connector. |
The Statistic Meter calculates the following values:
This allows the same input value to be analyzed automatically over several calendar periods.
The node receives a numeric value through the Input connector and uses it to update the statistics associated with the current calendar periods.
For example, while the current day is active, the accumulated value is available on:
Curr. Day
When the day changes, the completed value becomes available on:
Prev. Day
and the current-day calculation starts again for the new day.
The same principle is applied independently to:
The node therefore maintains both the currently accumulating value and the completed value of the previous corresponding period.
The values calculated by the Statistic Meter are persistent.
This means that:
Persistence is particularly useful for long-term statistics because a server restart does not interrupt the historical accumulation of the meter.
The Reset input clears all the values currently stored by the Statistic Meter.
When:
Reset = 1
the node performs the following operations:
The Statistic Meter can start counting again only after:
Reset = 0
The Reset signal must return to 0 after the reset operation.
While Reset remains equal to 1, the node does not resume normal counting.
The Start Date output contains the date and time of the most recent reset.
Each time the Statistic Meter is reset, this value is updated.
It can therefore be used to identify when the current statistical collection period started.
For example:
| Event | Start Date |
|---|---|
| Statistic Meter reset | 21/09/2026 10:00 |
| Normal operation | 21/09/2026 10:00 |
| New reset | Updated with the new reset date and time |
The Data Request input can be used to manually refresh the output values.
When:
Data Request = 1
the Statistic Meter updates the values available on its output connectors.
This is useful when the current statistics must be requested at a specific moment without waiting for the next automatic refresh.
When Auto refresh is enabled, the Statistic Meter automatically refreshes its output values at the interval configured in Refresh rate.
For example:
| Property | Value |
|---|---|
| Auto refresh | True |
| Refresh rate | 00:02:00 |
the outputs are automatically refreshed every:
2 minutes
This makes it unnecessary to trigger Data Request periodically from another part of the logic.
Data Request can still be useful when an immediate refresh is required, independently from the automatic refresh interval.
The Await all inputs property controls whether the node waits for all the required input values before beginning its processing.
When enabled, it can be useful in logic schemes where the node should not perform calculations until the required inputs have been initialized.
The Gate property enables an optional input connector that can be used to control the activation of the Statistic Meter.
When the property is disabled, the Gate connector is not used.
When enabled, the Gate input can also be used for the first initialization of the node.
To make the Statistic Meter operational the first time it is loaded into the server, the node must receive 1 on the Reset input or on the Gate input, if Gate is enabled.
Suppose the Input is used to provide a value that must be accumulated over time.
During the current day, the node calculates:
Curr. Day
At the end of the day:
At the same time, the value continues contributing to:
When the corresponding calendar period ends, its completed value becomes available on the appropriate previous-period output.
The Statistic Meter is useful whenever numeric values must be accumulated and organized automatically by calendar period.
Typical applications include:
The Statistic Meter can be tested using the Logic Module simulation tools.
A typical test procedure is the following: