1984
36 COUNTER/TIMER FUNCTION BLOCKS
36.3 Up/Down Counter
36.3 Up/Down Counter
CTUD(_E)
These function blocks count up or down the number of rising edges of a signal.
■Description, type, data type
Ladder, FBD/LD Structured text
[Without EN/ENO] [With EN/ENO] [Without EN/ENO]
Instance
name(CU:=s1,CD:=s2,R:=s3,LD:=s4,PV:=n,QU:=d1,QD:=d2,CV:=d3);
[With EN/ENO]
Instance
name(EN:=en,ENO:=eno,CU:=s1,CD:=s2,R:=s3,LD:=s4,PV:=n,QU:=d1,QD:=
d2,CV:=d3);
Argument Description Type Data type
EN Execution condition (TRUE: Executed, FALSE: Not executed) Input variable BOOL
s1 (CU) Count signal input (for counting-up) Input variable BOOL
s2 (CD) Count signal input (for counting-down) Input variable BOOL
s3 (R) Count value reset Input variable BOOL
s4 (LD) Count value set Input variable BOOL
n (PV) Maximum count value or start count value Input variable INT
ENO Output status (TRUE: Normal, FALSE: Abnormal or operation stop) Output variable BOOL
d1 (QU) End of count (for counting-up) Output variable BOOL
d2 (QD) End of count (for counting-down) Output variable BOOL
d3 (CV) Current count value Output variable INT
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)