HA_CS31_CTUD - HA UP-Down Counter

../_images/cb581ac6fe5e93110a331390000ecf06

Function block HA_CS31_CTUD

General Information
Available as of PLC runtime system V1.3 and above
Included in library HA_CS31_AC500_V13.lib (V1.3) and above
Type Function Block with historical values.

This function block is standard up-down counter with automatic data synchronization in a high availability application (high availability up-down counter).

Note

Only internal variables and outputs are synchronized. Input variables or parameters are not synchronized. If necessary, use HA_CS31_DATA_SYNC function block to synchronize the input variables.

If the CU (Count Up) parameter has a rising edge from FALSE to TRUE, parameter CV (Counter Variable) will be increased by 1. If parameter CD (Count Down) has a rising edge from FALSE to TRUE, parameter CV will be decreased by 1, provided that this does not cause the value to fall below 0.

If RESET=TRUE, CV will be initialized with 0. If LOAD=TRUE, parameter CV will be initialized with PV (Preset Value). QU returns TRUE when CV has become greater or equal PV. QD returns TRUE when CV has become equal 0.