279
4
4 Instructions 4.8.5 Timing
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
m X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
Four delay actions are generated based on the instruction ow.
S stores the number of the timer used for generating delay actions. Timers T0 to T199 are available.
m is the preset delay value, in the unit of 100 ms. The value range is K1 to K32,767.
D is the start number of four consecutive elements that output the delay actions.
●
Note:
The timer used by this instruction and the corresponding outputs cannot be reused by other instructions.
◆
Example 1:
X10
X10
ǒSTMR T10 K100 Y0 Ǔ
DmS
10s
Y0
Y1
Y2
Y3
10s
10s
10s
10s
10s
10s
10s
Y0 is set to ON when X10 switches from OFF to
ON. When X10 switches from ON to OFF, Y0 is set
to OFF after10s delay.
Y1 = ON is output for 10s after X10 switches from
ON to OFF.
Y2 = ON is output for 10s after X10 switches from
OFF to ON.
When X10 switches from OFF to ON, Y3 is set to
ON after 10s delay. When X10 switches from ON to
OFF, Y3 is set to OFF after 5s delay.
◆
Example 2:
Introduce a D element to the instruction ow for convenient output of an oscillator. (The ALT instruction
achieves the same result.)
X10
〔STMR T10 K50 M0 〕
DmS
M3
M1
〔Y10 〕
X10
M2
M1
5s 5s
Y10