CTD_ULINT
PROGRAM CTD_ULINT_DEMO VAR BOOL1,BOOL2,BOOL3: BOOL; ULINT1,ULINT2: ULINT; FB:CTD_ULINT; END_VAR FB(CD:=BOOL1,LD:=BOOL2,PV:=ULINT1,Q=>BOOL3,CV=>ULINT2); END_PROGRAM
The block acts as a counter counting down to zero from the preset value pv.
Input | Type | Description | Default value |
CD | BOOL | Rising edge counts one down | False |
LD | BOOL | Sets the counter to its initial value pv | False |
PV | ULINT | Initial value of the counter | 0 |
Output | Type | Description |
Q | BOOL | State when the counter finished counting (counting finished: q=true). |
CV | ULINT | Current value of the counter |