1-Millisecond Resolution; 10-Millisecond Resolution; 100-Millisecond Resolution - Siemens SIMATIC S7-200 System Manual

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

Advertisement

SIMATIC Instructions
The actions of the timers at different resolutions are explained below.

1-Millisecond Resolution

The 1-ms timers count the number of 1-ms timer intervals that have elapsed since
the active 1-ms timer was enabled. The execution of the timer instruction starts the
timing; however, the 1-ms timers are updated (timer bit and timer current) every
millisecond asynchronous to the scan cycle. In other words, the timer bit and timer
current are updated multiple times throughout any scan that is greater than 1 ms.
The timer instruction is used to turn the timer on, reset the timer, or, in the case of
the TONR timer, to turn the timer off.
Since the timer can be started anywhere within a millisecond, the preset must be
set to one time interval greater than the minimum desired timer interval. For
example, to guarantee a timed interval of at least 56 ms using a 1-ms timer, the
preset time value should be set to 57.

10-Millisecond Resolution

The 10-ms timers count the number of 10-ms timer intervals that have elapsed
since the active 10-ms timer was enabled. The execution of the timer instruction
starts the timing; however, the 10-ms timers are updated at the beginning of each
scan cycle (in other words, the timer current and timer bit remain constant
throughout the scan), by adding the accumulated number of 10-ms intervals (since
the beginning of the previous scan) to the current value for the active timer.
Since the timer can be started anywhere within a 10-ms interval, the preset must
be set to one time interval greater than the minimum desired timer interval. For
example, to guarantee a timed interval of at least 140 ms using a 10-ms timer, the
preset time value should be set to 15.

100-Millisecond Resolution

The 100-ms timers count the number of 100-ms timer intervals that have elapsed
since the active 100-ms timer was last updated. These timers are updated by
adding the accumulated number of 100-ms intervals (since the previous scan
cycle) to the timer's current value when the timer instruction is executed.
The current value of a 100-ms timer is updated only if the timer instruction is
executed. Consequently, if a 100-ms timer is enabled but the timer instruction is
not executed each scan cycle, the current value for that timer is not updated and it
loses time. Likewise, if the same 100-ms timer instruction is executed multiple
times in a single scan cycle, the number of 100-ms intervals are added to the
timer's current value multiple times, and it gains time. 100-ms timers should only
be used where the timer instruction is executed exactly once per scan cycle.
Since the timer can be started anywhere within a 100-ms interval, the preset must
be set to one time interval greater than the minimum desired timer interval. For
example, to guarantee a timed interval of at least 2100 ms using a 100-ms timer,
the preset time value should be set to 22.
9-18
S7-200 Programmable Controller System Manual
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents