
243
CHAPTER 5 DEVICES
5
5.
2
I
n
te
rnal Us
er Dev
ices
5.
2.
10
T
imer (T
, ST
)
(g) When using multiple timers
When using multiple timers, provide the timers from the last one to be measured because current value of the
timers are updated upon execution of OUT T or OUT ST instruction.
Creating an on/off ladder using two timers
Ex.
Ex.
Measures for one second after T0 is turned on.
Coil of T1 is turned on for one scan after T0 is turned on.
Measures for one second when T1 is off.
Alternates on and off once every second.
[Correct program example]
Coil of T0
OUT T1
OFF
OFF
0
0
0
1
1s
1s
9
10
10
0
0
0
0
1
9
10
10
0
OFF
OFF
ON
ON
OFF
ON
OFF
OFF
OFF
ON
OUT T0
END processing
OUT T1
OUT T0
END processing
OUT T1
OUT T0
END
processing
OUT T1
OUT T0
END processing
OUT T1
OUT T0
END processing
OUT T1
OUT T0
END
processing
OUT T1
OUT T0
END processing
Contact
of T0
Current
value of T0
Coil of T1
Contact
of T1
Current
value of T1
Coil of T1 is turned on for one scan after T0 is turned on.
Measures for 1 second when T1 is off.
Measures for 1 second after T0 is turned on.
Alternates on and off every second.
[Incorrect program example]
Coil of T0
OUT T0
OFF
OFF
0
0
0
1
1s
900ms
9
10
10
0
0
1
1
2
9
10
10
0
OFF
OFF
ON
ON
OFF
ON
OFF
OFF
OFF
ON
OUT T1
END processing
OUT T0
OUT T1
END processing
OUT T0
OUT T1
END processing
OUT T0
OUT T1
END processing
OUT T0
OUT T1
END
processing
OUT T0
OUT T1
END processing
Contact
of T0
Current
value of T0
Coil of T1
Because current value is updated in a scan where T0 is timed out,
the count starts from 1 or larger value.
Contact
of T1
Current
value of T1
Summary of Contents for L02CPU
Page 1: ......
Page 2: ......
Page 13: ...11 Memo ...
Page 78: ...76 Memo ...
Page 226: ...224 Memo ...
Page 318: ...316 To the next page ...
Page 320: ...318 To the next page ...
Page 322: ...320 To the next page ...
Page 324: ...322 To the next page ...
Page 326: ...324 To the next page ...
Page 335: ...333 Memo ...
Page 339: ......