29 COUNTER FUNCTION BLOCKS
29.4 Counter Function Block
1065
29
29.4
Counter Function Block
COUNTER_FB_M
When the execution condition is established, this function block starts counting up.
Setting data
■
Descriptions, types, and data types
Processing details
■
Operation processing
• The counter starts counting when detecting the rising edge (from OFF to ON) of (s1). It does not start counting if (s1)
remains ON. The counting is started from the value of (s3). When the count value reaches the value of (s2), (d2) turns ON.
The current count value is stored in (d1).
• A value in the range of 0 to 32767 can be specified for (s2).
• A value in the range of -32768 to 32767 can be specified for (s3). However, when a negative value is specified, the initial
value is set to 0.
• To reset the current value of the counter (d1), reset (s1) of FB directly.
Ex.
When the label name is TIMER_CONT_FB_M_1
Ladder diagram, FBD/LD
Structured text
COUNTER_FB_M_1(Coil:=s1,Preset:=s2,ValueIn:=s3,ValueOut:=d1,Status:=d2);
Argument
Description
Type
Data type
s1(Coil)
Execution condition (TRUE: Execution, FALSE: Stop)
Input variable
BOOL
s2(Preset)
Counter set value
Input variable
INT
s3(ValueIn)
Counter initial value
Input variable
INT
d1(ValueOut)
Counter current value
Output variable
ANY16
d2(Status)
Output
Output variable
BOOL
[Ladder]
[ST]
RST(M0,TIMER_CONT_FB_M_1.Coil)
[Ladder example]
[Timing chart]
s1
d1
d2
s2
s3
ENO
d
RST
EN
M0
TIMER_CONT_FB_M_1.Coll
Preset
ValueOut
Status
ValueIn
COUNTER_FB_M
Coll
1
10
M0
M10
D10
OFF
OFF
M0
D10
M10
10
ON
ON
2
3
1
Содержание 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: ......