[CNT_ON] Count on
Function block CNT_ON counts the switch-on operations of a binary signal within a specific time period.
CNT_ON counts the switch-on operations of a binary signal within a specific time period.
Enable and disable function
If the function is enabled (EnFnct = 1), the counter value is incremented for each rising slope at input [In].
Calculation
The present counter value for the present time period is displayed on [PrVal]. After the time period has expired, the present counter value is saved as counter value for the recent time period [RctVal] and set to zero via a pulse. The time period, generated outside of CNT_ON, is determined via a rising slope on the input [Imp].
Reset
The present and recent value are immediately set to zero via a rising slope on input [Reset].
Input | Description | Data type | Default value |
|---|---|---|---|
EnFnct | Enable function Enables the function. | Boolean | 1 |
0 - The function is disabled. | |||
In | Input Input signal | Boolean | 0 |
0 - Off | |||
Imp | Impulse Pulse input for which the evaluation time period is determined. The rising edge indicates start of new period. | Boolean | 0 |
0 - No | |||
Reset | Reset All counter values are reset to zero. | Boolean | 0 |
0 - No | |||
Pers | Persistent | Boolean | 0 |
0 - No | |||
|
BaObjRef | BA-Object reference | Structure | --- |
BaObjRef | Device identifier | Double Word | 16#3FFFFF |
BaObjRef | Object identifier | Double Word | 16#3FFFFF |
BaObjRef | Item identifier | Integer | -1 |
Output | Description | Data type | Default value |
|---|---|---|---|
PrVal | Present value | Real | 0.0 |
RctVal | Recent value | Real | 0.0 |
Dstb | Disturbed [Dstb] indicates whether the referenced BACnet object was accessed. | Boolean | 0 |
ErrCode | Error code indication | Integer | 0: No error |
= 0 - No error | |||
CNT_ON is used to count switch-on operations to determine the switching frequency of components or functions. By displaying present and recent counter values from a particular time period, errors can be identified earlier and faster.
This can extend the life of monitored components and the time between maintenance intervals.
The following example is based on an evaluation period = 1 day:
