
347
counter must be used to reset the accumulated value of
the counter to zero.
All counters are retentive in that the accumulated value
of any counter is retained, even during a power failure,
until reset. The on/off status of the counter done, over-
ow, and under ow bits are retentive as well. Control-
Logix counter parameters and status bits are shown in the
edit tags window of Figure 15-58 and can be summarized
as follows:
• Preset (PRE) Value —Speci es the value the
counter must reach before the done (DN) bit turns
on (1).
• Accumulated (ACC) Value —Is the number of
false-to-true transitions of the counter run. ACC is
reset to zero when a reset (RES) instruction (of the
same counter address) is executed.
• CU (Count-Up Enable Bit) —The count-up enable
bit indicates the CTU instruction is enabled.
Counters
Counters are similar to timers, except that a counter ac-
cumulates (counts) the changes in state of an external
trigger signal whereas timers increment using an internal
clock. PLC counters are generally triggered by a change
in an input eld device that causes a false-to-true transi-
tion of the counter ladder rung. It does not matter how
long the rung stays true or false—it is only the transition
that counts.
There are two basic counter types: count-up (CTU)
and count-down (CTD). The ControlLogix CTU in-
struction and counter selection toolbar are shown in
Figure15-57 . When you want to use a timer, you must
create a tag of type COUNTER (it is a prede ned data
type) and enter the preset and the accumulated value.
When entering the instruction, this tag must be de ned
before the preset and accumulated values can be entered.
A RES reset instruction that has the same tag name as the
Part Objectives
After completing this part, you will be able to:
• Understand ControlLogix counter tags and their
members
• Utilize status bits from counters in logic
• Develop ladder logic programs using ControlLogix
counters
Part 4 Programming
Counters
Figure 15-57 CTU count-up counter instruction.
CU
DN
Package_Counter
Input side of rung
False
True
RES
24←
0←
Tag name
CTU
Count Up
Counter P
ackage_Counter
Preset
Accum
TON
Favorites
TOF RTO CTU CTD RES
Add-On Alarms Bit Timer/Counter
pet10882_ch15_317-372.indd 347pet10882_ch15_317-372.indd 347 7/27/10 6:43 PM7/27/10 6:43 PM