Siemens SIMATIC S7-200 System Manual page 211

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Refer to the Programming Tips on the documentation CD for a sample program that uses the
on-delay timer (TON). See Tip 31
Programming
Tips
The TON and TONR instructions count time when the enabling input is on. When the current
value is equal to or greater than the preset time, the timer bit is on.
The current value of a TON timer is cleared when the enabling input is off, whereas the
-
current value of the TONR timer is maintained when the input is off.
You can use the TONR timer to accumulate time when the input turns on and off. Use the
-
Reset instruction (R) to clear the current value of the TONR.
Both the TON and the TONR timers continue counting after the preset is reached, and they
-
stop counting at the maximum value of 32,767.
The TOF instruction is used to delay turning an output off for a fixed period of time after the input
turns off. When the enabling input turns on, the timer bit turns on immediately, and the current
value is set to 0. When the input turns off, the timer counts until the elapsed time reaches the
preset time.
When the preset is reached, the timer bit turns off and the current value stops incrementing;
-
however, if the input turns on again before the TOF reaches the preset value, the timer bit
remains on.
The enabling input must make an on-to-off transition for the TOF to begin counting time
-
intervals.
If the TOF timer is inside an SCR region and the SCR region is inactive, then the current
-
value is set to 0, the timer bit is turned off, and the current value does not increment.
Tip
You can reset a TONR only by using the Reset (R) instruction. You can also use the Reset
instruction to reset any TON or TOF. The Reset instruction performs the following operations:
H Timer Bit = off
H Timer Current = 0
After a reset, TOF timers require the enabling input to make the transition from on to off in order
for the timer to restart.
Determining the Resolution of the Timer
Timers count time intervals. The resolution (or time base) of the timer determines the amount of
time in each interval. For example, a TON with a resolution of 10 ms counts the number of 10-ms
intervals that elapse after the TON is enabled: a count of 50 on a 10-ms timer represents 500 ms.
The SIMATIC timers are available in three resolutions: 1 ms, 10 ms, and 100 ms. As shown in
Table 6-74, the timer number determines the resolution of the timer.
S7-200 Instruction Set
Chapter 6
197

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents