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
Содержание MELSEC iQ-F FX5
Страница 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Страница 2: ......
Страница 17: ...15 CONTENTS ...
Страница 24: ...22 MEMO ...
Страница 25: ...23 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW 2 PRECAUTIONS ON PROGRAMMING ...
Страница 126: ...124 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 132: ...130 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 140: ...138 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 191: ...7 BASIC INSTRUCTIONS 7 2 Arithmetic Operation Instructions 189 7 Operation error There is no operation error ...
Страница 202: ...200 7 BASIC INSTRUCTIONS 7 2 Arithmetic Operation Instructions Operation error There is no operation error ...
Страница 278: ...276 7 BASIC INSTRUCTIONS 7 4 Bit Processing Instructions Operation error There is no operation error ...
Страница 280: ...278 7 BASIC INSTRUCTIONS 7 4 Bit Processing Instructions Operation error There is no operation error ...
Страница 915: ...18 TYPE CONVERSION FUNCTIONS 18 13 Converting DWORD to WORD 913 18 Operation error There is no operation error ...
Страница 917: ...18 TYPE CONVERSION FUNCTIONS 18 14 Converting DWORD to INT 915 18 Operation error There is no operation error ...
Страница 932: ...930 18 TYPE CONVERSION FUNCTIONS 18 26 Converting DINT to WORD Operation error There is no operation error ...
Страница 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Страница 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Страница 1107: ...I 1105 MEMO ...
Страница 1111: ......