![background image](http://html.mh-extra.com/html/mitsubishi-electric/melsec-iq-f-fx5/melsec-iq-f-fx5_programming-manual_2391141064.webp)
1062
29 COUNTER FUNCTION BLOCKS
29.3 Up-down Counter
29.3
Up-down Counter
CTUD(_E)
These functions count up/down the number of times of rising of a signal.
Setting data
■
Descriptions, types, and data types
Processing details
■
Operation processing
1.
Count up
• These function blocks count up (add "1" to) the value of (d3) when (s1) turns ON from OFF.
• When the value of (d3) reaches the value of (n), (d1) turns ON and the function blocks stop counting up.
• Set the maximum value of the counter for (n). When (s3) is turned ON, (d1) turns OFF and (d3) is set to 0.
2.
Count down
• These function blocks count down (subtract "-1" from) the value of (d3) when (s2) turns ON from OFF.
• When the value of (d3) is 0, (d2) turns ON and the function blocks stop counting down.
• Set the counter start value for (n). When (s4) is turned ON, (d2) turns OFF and (n) is set for (d3).
3.
Count maximum value/start value
The effective setting range of (n) is from 0 to 32767.
4.
Others
• When (s1) and (s2) are simultaneously turned ON from OFF, (s1) is prioritized and the function blocks count up (add "1" to)
the value of (d3).
• When (s3) and (s4) are simultaneously turned ON, (s3) is prioritized and the value of (d3) is set to 0.
Ladder diagram, FBD/LD
Structured text
[Without EN/ENO]
[With EN/ENO]
[Without EN/ENO]
CTUD_1(CU:=s1,CD:=s2,R:=s3,LD:=s4,PV:=n,QU:=d1,QD:=d2,CV:=d3);
[With EN/ENO]
CTUD_E_1(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: Execution, FALSE: Stop)
Input variable
BOOL
s1(CU)
Count up signal input
Input variable
BOOL
s2(CD)
Count down signal input
Input variable
BOOL
s3(R)
Count value reset
Input variable
BOOL
s4(LD)
Count value set
Input variable
BOOL
n(PV)
Count maximum value/start value
Input variable
INT
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d1(QU)
Count up end
Output variable
BOOL
d2(QD)
Count down end
Output variable
BOOL
d3(CV)
Current count value
Output variable
INT
s1
d1
s2
s3
d2
d3
s4
n
EN
ENO
s1
s2
d1
d2
d3
s3
s4
n
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......