Timer and Counter Instructions
Chapter 5
511
The Counter Reset (CTR) instruction is an output instruction that resets the
CTU accumulated value and status bits to zero.
The counter operates in the same manner as described for the CTU
instruction, with the addition of the reset instruction in rung 3 (Figure 5.8).
In this example, the reset push button is pressed after count 11. The next
event starts the sequence at count 1.
The CTR instruction is given the same word address as the CTU
instruction. The Preset and Accumulated Values are automatically
displayed when the word address is entered (Figure 5.8).
Figure 5.8
Counter
with Reset Diagram for Preset = 9 and Programming
ON
OFF
12 45 678 91011
Event
to be Counted
111/11
AC = PR
12 1 2
Accumulated V
alue
ON
OFF
Enable Bit
053/17
ON
OFF
Count Complete
Bit 053/15
ON
OFF
Output Lamp
013/06
ON
OFF
Reset Push Button
111/05
Rung 1 - CTU Instruction
Preset to 9.
Rung 2 - Counter T
uns On
Bit 013/06 at Count
Complete.
||
11
( CTU )
111 053
||
15
()
06
053 013
PR 009
AC 009
Count Switch
Count Complete Bit Output Lamp
Rung 3 - Reset Switch
Resets the CTU Instruction
||
05
( CTR )
111 053
Reset Pushbutton
PR 009
AC 009
When reset
push button is closed,
Count Complete Bit
is reset.
Accumulated value
is held at 0 until
push button is
released.
3
5.2.2
Counter Reset Instruction
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com