The Counter (CTR) function block generates a discrete output value of True (1) when the count reaches a specified trip value. The block functions as an incremental (up) counter or a decremental (down) counter.
The Counter function block supports signal status propagation. There are no modes or alarm detection in the block.
IN_D is the discrete input value that causes the counter to increment/decrement.
RESET_IN is the discrete input value that resets the counter.
OUT_D is the discrete output value and status.
The following figure shows the internal components of the Counter function block: