Skip to content

Counters

counters

CTD (counter down)

Counts down a number setting the output (Q) to True when reaches 0. Use PV to set the initial value, LOAD to reset the counter and CV to get the current value.

ctd

Inputs  
CD Counts down.
LOAD Resets the counter by loading the preset value.
PV Preset value.
Outputs  
Q Q is True when CV is 0, false if otherwise.
CV Current value.

CTU (counter up)

Counts a number up setting the output (Q) to True when it reaches the preset value (PV). Use RESET to reset the counter and CV to get the current value.

ctu

Inputs  
CU Counts up.
RESET Resets the counter setting CV to 0.
PV Preset value.
Outputs  
Q Q is True when CV is equal to PV, false otherwise.
CV Current value.

CTUD (counter up/down)

Implements both CTU and CTD counters.

Inputs  
CU Counts up.
CD Counts down.
RESET Resets the counter, setting CV to 0.
LOAD Loads the counter, setting CV to PV.
PV Preset value.
Outputs  
QU QU is True when CV is equal to PV, false otherwise.
QD QD is True when CV is 0, false otherwise.
CV Current value.