Chapter
5
51
Timer and Counter Instructions
Timer and Counter instructions are output instructions internal to the
processor. They provide many of the capabilities available with timing
relays and solid state timing/counting devices. Usually conditioned by
examine instructions, timers and counters keep track of timed intervals
or counted events according to the logic continuity of the rung.
Each Timer or Counter instruction has two 3-digit values associated with
it, and thus requires two words of data table memory. These 3-digit values
are:
Accumulated (AC) Value – Stored in the accumulated value area of the
data table. For timers, this is the number of timed intervals that have
elapsed. For counters, this is the number of events that have been
counted.
Preset (PR) Value – Stored in the preset value area of the data table,
always 100
8
words greater than its corresponding AC value. This value
is entered into memory by the user. The preset value is the number of
timed intervals or events to be counted. When the accumulated value
equals the preset value, a status bit is set on and can be examined to turn
on an output device.
The Accumulated and Preset values are stored in the data table in 3-digit
BCD (binary coded decimal) format. BCD numbers can range from 000
to 999 and are stored in the lower 12 bits of a memory word (Figure 5.1).
Each BCD digit is represented by a group of 4 bits. The arrangement of
1 and 0 in a group of 4 bits corresponds to a decimal number from 0 to 9.
For more information on number systems, refer to Appendix B.
Figure 5.1
BCD Format
0
1
0
0
0
0
0
0
1
1
1
1
2
3
2
1
2
2
2
0
2
3
2
1
2
2
2
0
2
3
2
1
2
2
2
0
6
9
1
10
5.0
General
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com