854
27 TIMER FUNCTION BLOCKS
27.1 Timer Function Blocks
27 TIMER FUNCTION BLOCKS
27.1 Timer Function Blocks
TIMER__M
When the execution condition is established, these function blocks start the timer count to the set time.
■Descriptions, types, and data types
■TIMER_1_FB_M
• When the execution condition of (s1) turns on, counting the current value starts. The timer starts counting from "(s3) 1
ms". When it counts up to "(s2) 1 ms", (d2) turns on. The current measurement value is output into (d1).
• When the execution condition of (s1) turns off, the current value is reset to (s3) and (d2) turns off.
• 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.
[Ladder example]
[Timing chart]
Ladder diagram Structured text
( indicates TIMER_1_FB_M, TIMER_10_FB_M, TIMER_100_FB_M,
TIMER_CONT_FB_M, TIMER_CONTHS_FB_M.)
TIMER_1_FB_M_1(Coil:=s1,Preset:=s2,ValueIn:=s3,ValueOut:=d1,Status:=d2);
TIMER_10_FB_M_1(Coil:=s1,Preset:=s2,ValueIn:=s3,ValueOut:=d1,Status:=d2);
TIMER_100_FB_M_1(Coil:=s1,Preset:=s2,ValueIn:=s3,ValueOut:=d1,Status:=d2);
TIMER_CONT_FB_M_1(Coil:=s1,Preset:=s2,ValueIn:=s3,ValueOut:=d1,Status:=d2);
TIMER_CONTHS_FB_M_1(Coil:=s1,Preset:=s2,ValueIn:=s3,ValueOut:=d1,Status:=
d2);
Argument Description Type Data type
s1 Execution condition (TRUE: Execution, FALSE: Stop) Input variable BOOL
s2 Timer set value Input variable INT
s3 Timer initial value Input variable INT
d1 Timer current value Output variable ANY16
d2 Output Output variable BOOL
Preset ValueOut
StatusValueIn
TIMER_1_FB_M
Coll
1
10
M0
M10
D10
OFF
OFF
M0
Value of D10
M10
10
9 ms
ON
1