[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.

Functioning

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].

Pins

Input

Description

Data type

Default value
Value range

EnFnct

Enable function

Enables the function.

Boolean

1

0 - The function is disabled.
1 - The function is enabled.

In

Input

Input signal

Boolean

0

0 - Off
1 - On

Imp

Impulse

Pulse input for which the evaluation time period is determined. The rising edge indicates start of new period.

Boolean

0

0 - No
1 - Yes

Reset

Reset

All counter values are reset to zero.

Boolean

0

0 - No
1 - Yes

Pers

Persistent

Boolean

0

0 - No
1 - Yes: the values are stored persistently.

BaObjRef

BA-Object reference
Link between function block and BACnet object.

Structure

---

BaObjRef
> DeviceID

Device identifier
[DeviceID] includes object type and object instance in one ID.
Identifies the device object: local or remote. A local device object can also be identified by value 16#3FFFFF.

Double Word

16#3FFFFF

BaObjRef
> ObjectID

Object identifier
[ObjectID] includes object type and object instance in one ID.
Identifies the object on a device.

Double Word

16#3FFFFF

BaObjRef
> ItemID

Item identifier
[ItemID] represents an index in a view node object that references the BACnet object.
[ObjectID] and [ItemID] together define an indirect reference to the BACnet object.
Value -1 indicates a direct interface.

Integer

-1

 

Output

Description

Data type

Default value
Value range

PrVal

Present value

Real

0.0

RctVal

Recent value

Real

0.0

Dstb

Disturbed

[Dstb] indicates whether the referenced BACnet object was accessed.
[Dstb] = 0, if:
BACnet object access = Access successful
[Dstb] = 1, if:
BACnet object access = Error during access

Boolean

0

ErrCode

Error code indication

Integer

0: No error

= 0 - No error
> 0 - Error codes

Application

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: