Download Print this page

Up-Down Counter - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

29.3

Up-down Counter

CTUD(_E)
These functions count up/down the number of times of rising of a signal.
Ladder diagram, FBD/LD
[Without EN/ENO]
s1
d1
s2
d2
s3
d3
s4
n
Setting data
■Descriptions, types, and data types
Argument
EN
s1(CU)
s2(CD)
s3(R)
s4(LD)
n(PV)
ENO
d1(QU)
d2(QD)
d3(CV)
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.
29 COUNTER FUNCTION BLOCKS
1062
29.3 Up-down Counter
[With EN/ENO]
EN
ENO
s1
d1
s2
d2
s3
d3
s4
n
Description
Execution condition (TRUE: Execution, FALSE: Stop)
Count up signal input
Count down signal input
Count value reset
Count value set
Count maximum value/start value
Output status (TRUE: Normal, FALSE: Abnormal)
Count up end
Count down end
Current count value
Structured text
[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);
Type
Input variable
Input variable
Input variable
Input variable
Input variable
Input variable
Output variable
Output variable
Output variable
Output variable
Data type
BOOL
BOOL
BOOL
BOOL
BOOL
INT
BOOL
BOOL
BOOL
INT

Hide quick links:

Advertisement

loading