38
3
3 Elements3.6 Counter
Example 2: The driving signal of a cumulative timer T250 which can be retained upon power failure is OFF, or the
next driving signal is ON when the PLC is powered off and the internal timing value is retained. Timing continues
until the preset value is reached, and the output contact is closed. When the timer coil is reset, the timing value
is cleared, and the output contact is opened, as shown in the following gure. Because the step of the timer T250
is 100 ms, th actual cumulative action delay is 150 ms × 100 ms = 15,000 ms (15.0s), that is, the t1 + t2 in the
gure.
Example 3: You can use the register D to set the action value for the timer, as shown in the gure below. (Changes
to values in the register D during timing take effect when the timer is started next time.)
3.6 Counter
Counters are used for counting. Each counter consists of a coil, contacts, and a timing data value register. When
the driving signal of the counter coil switches from OFF to ON, the counter reading is incremented by 1. When the
counting value reaches the preset value, contact a (NO contact) is closed, and b contact b (NC contact) is opened.
When the counting value is cleared, output contact a is opened, and contact b (NC contact) is closed. The values
of some counters can be accumulated or retained upon power failure. The value before power failure is kept after
the counter is energized again.
Counters are marked with C0, C1, ……and C255, and numbered with a decimal number.
For general
purpose, 16-bit
For retention
purpose, 16-bit
For general
purpose, 32-bit
For retention
purpose, 32-bit
For retention
purpose, 32-bit
C0 to C99
100-point
incremental
counting
[1]
C100 to C199
100-point
incremental
counting
[2]
C200 to C219
20-point dual-
direction
counting
[1]
C220 to C234
15-point dual-
direction
counting
[2]
C235 to C255
21-point high-
speed counting
[2]