Download Print this page

Counter Function Block - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

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

Advertisement

29.4

Counter Function Block

COUNTER_FB_M
When the execution condition is established, this function block starts counting up.
Ladder diagram, FBD/LD
s1
d1
s2
d2
s3
Setting data
■Descriptions, types, and data types
Argument
Description
s1(Coil)
Execution condition (TRUE: Execution, FALSE: Stop)
s2(Preset)
Counter set value
s3(ValueIn)
Counter initial value
d1(ValueOut)
Counter current value
d2(Status)
Output
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]
RST
M0
EN
ENO
d
TIMER_CONT_FB_M_1.Coll
[ST]
RST(M0,TIMER_CONT_FB_M_1.Coil)
[Ladder example]
COUNTER_FB_M
M0
Coll
10
Preset
ValueOut
D10
1
ValueIn
Status
M10
[Timing chart]
ON
M0
OFF
D10
1
2
M10
OFF
3
10
ON
Structured text
COUNTER_FB_M_1(Coil:=s1,Preset:=s2,ValueIn:=s3,ValueOut:=d1,Status:=d2);
Type
Input variable
Input variable
Input variable
Output variable
Output variable
29 COUNTER FUNCTION BLOCKS
Data type
BOOL
INT
INT
ANY16
BOOL
1065
29.4 Counter Function Block
29

Hide quick links:

Advertisement

loading