Chapter 17
Timer and Counter Instructions
17–2
Preset and accumulated values for timers range from 0 to +32,767. If a timer
preset or accumulated value is a negative number, a runtime error occurs and
places the processor in a fault condition.
Preset and accumulated values for counters range from –32,768 to +32,767.
Indexed Word Addresses
With SLC 5/02 processors, you have the option of referencing timer and
counter preset and accumulated values in other areas of your program with
indexed addressing. The purpose of using indexed addressing is to change
the presets of several timers or counters or to reset several timers or counters.
Before you do so, refer to the discussion of indexed addressing in 3–word
elements, page 4–13.
Data File Elements
Control word data for timer instructions includes three timer status bits, as
indicated below. These are the only bits accessible in the control word.
EN TT DN Internal Use
15 14 13
Preset Value
Accumulated Value
EN = Timer Enable Bit
TT = Timer Timing Bit
DN = Timer Done Bit
Timebase
The timebase is a measure of the interval counted by a timer. Selectable as
0.01 sec or 1.0 sec for SLC 5/02 processors. Fixed at 0.01 sec for fixed
controllers and SLC 5/01 processors.
Accuracy
Timing accuracy is minus 0.01 to plus 0 seconds, with a program scan of up
to 2.5 seconds.
Timing accuracy described here refers only to the length of time between the
moment a timer instruction is enabled and the moment the timed interval is
complete. Inaccuracy caused by the program scan can be greater than the
timer time base. You must also consider the time required to energize the
output device.
Timing could be inaccurate if a Jump (JMP) or Jump to Subroutine (JSR)
instruction is executed and skips over a rung containing the timer instruction
while the timer is timing. If the skip duration is within 2.5 seconds, no time
will be lost; if the skip duration exceeds 2.5 seconds, an undetectable timing
error will occur.
Timer Data File Elements,
Timebase, and Accuracy