Timer and Counter Instructions
Chapter 5
58
Unlike the Timer On-Delay instruction, the Retentive Timer instruction
retains its accumulated value (Figure 5.5) when any of the following
conditions occur:
Rung conditions go false
Mode select switch is changed to the program position
Power outage occurs provided memory backup power is maintained for
CMOS RAM memory
When rung conditions go true, the enabled bit (bit 17) is set on and the
timer starts counting time base intervals. Any time the rung goes false,
bit 17 is set off but the accumulated value is retained. When the timer
times out, the timed bit (bit 15) is set on (Figure 5.5).
By retaining its accumulated value the RTO instruction measures the
cumulative period during which rung conditions are true. Because this
timer retains its accumulated value, it must be reset by a separate
instruction, the Retentive Timer Reset (RTR) instruction.
The Retentive Timer Reset instruction (RTR) is used to reset the
accumulated value and timed bit of the retentive timer (Figure 5.5,
rung 3) to zero. This instruction is given the same word address as its
corresponding RTO instruction (Figure 5.5). When rung conditions go
true, the RTR instruction resets the AC value and status bits of the RTO
instruction to zero.
The accuracy of a 10ms timer is related to nominal scan time. When scan
times are 9ms or less, the 10ms timer is accurate to plus or minus one time
base (
±
10.0ms). When scan time is greater than 9ms, accuracy of
±
10ms
can be achieved through special programming techniques described in
Programming 0.01 Second Timers With the Mini-PLC-2 Controller
Application Data, publication no. 1772-702.
Four types of counter instructions are available with the PLC-2/30
Controller:
Up-Controller (CTU)
Counter Reset (CTR)
Down-Counter (CTD)
Scan Counter (SCT)
A counter counts the number of events that occur and stores this count in
its accumulated value word. The remaining four bits in the accumulated
value word are used as status bits (Figure 5.6).
5.1.4
Retentive Timer Reset
Instruction
5.1.5
Timer Accuracy for 10ms
Timers
5.2
Counter Instructions
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com