Program instructions
7.17 Timer
S7-200 SMART
342 System Manual, 09/2015, A5E03822230-AC
TOF Off-delay timer example
10-ms timer T33 times out after 1 s
(100 x 10 ms).
• I0.0 ON-to-OFF = T33 enabled
• I0.0 OFF-to-ON=disable and reset
T33
LD I0.0
TOF T33, +100
Timer T33 controls Q0.0 through timer
contact T33.
LD T33
= Q0.0
Timing Diagram
Effect of timer resolution on when timer bits and current time values are updated
●
timer: The timer bit and the current value are updated asynchronous to the scan
cycle. For scans greater than 1 ms, the timer bit and the current value are updated
multiple times throughout the scan.
●
timer: The timer bit and the current value are updated at the beginning of each
scan cycle. The timer bit and current value remain constant throughout the scan. Time
intervals that accumulate during the scan are added to the current value at the start of
each scan.
●
timer: The timer bit and current value are updated when the instruction is
executed; therefore, ensure that your program executes the instruction for a 100-ms timer
only once per scan cycle in order for the timer to maintain the correct timing.