Siemens Simatic S7-200 System Manual page 203

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

Advertisement

Resetting an enabled 1-ms timer turns the timer off, resets the timer's current value to zero,
and clears the timer T-bit.
Note
The system routine that maintains the 1-ms system time base is independent of the
enabling and disabling of timers. A 1-ms timer is enabled at a point somewhere within the
current 1-ms interval. Therefore, the timed interval for a given 1-ms timer can be up to 1 ms
short. You should program the preset time value to a value that is 1 greater than the
minimum desired timed interval. For example, to guarantee a timed interval of at least
56 ms using a 1-ms timer, you should set the preset time value to 57.
Updating Timers with 10-ms Resolution
The S7-200 CPU provides timers that count the number of 10-ms intervals that have elapsed
since the active 10-ms timer was enabled. These timers are updated at the beginning of
each scan by adding the accumulated number of 10-ms intervals (since the beginning of the
previous scan) to the current value for the timer.
Since the current value of an active 10-ms timer is updated at the beginning of the scan, the
update is automatic. Once a 10-ms timer is enabled, execution of the timer's controlling
TON/TONR instruction is required only to control the enabled or disabled state of the timer.
Unlike the 1-ms timers, a 10-ms timer's current value is updated only once per scan and
remains constant throughout a given execution of the main user program.
A reset of an enabled 10-ms timer turns it off, resets its current value to zero, and clears its
T-bit.
Note
The process of accumulating 10-ms intervals is performed independently of the enabling
and disabling of timers, so the enabling of 10-ms timers will fall within a given 10-ms
interval. This means that a timed interval for a given 10-ms timer can be up to 10 ms short.
You should program the preset time value to a value 1 greater than the minimum desired
timed interval. For example, to guarantee a timed interval of at least 140 ms using a 10-ms
timer, you should set the preset time value to 15.
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
Instruction Set
10-15

Advertisement

Table of Contents
loading

Table of Contents