344
21 DEVICES
21.3 User Device
Counter
This device counts the number of rising operation of the input condition in the program. The counter is an up-timing type
device and therefore when the count value matches a setting value, the count reaches its upper limit and the contact is turned
on.
Types of counters
There are two types of counters: counter (C) which retains the counter values in 16-bit units and long counter (LC) which
retains them in 32-bit units. The counter (C) and the long counter (LC) are different devices and the number of device points
can be set for each of them.
■Counter (C)
This device uses one word for each point. The measurable range is 0 to 65535.
■Long counter (LC)
This device uses two words for each point. The measurable range is 0 to 429467295.
The long counter (LC) can be used in interrupt programs. ( Page 67 Interrupt Program)
Counting process
When executing the counter coil (OUT Cinstruction / OUT LCinstruction), the counter coil is turned on/off, the current
value is updated (count value +1), and the contact is turned on/off. The current value is updated (count value +1), when the
counter coil input is rising (off and on). The current value is not updated when the coil input is turned off, on and on, and on
and off.
X0
K10
X0
OFF
OFF
ON
ON
END END ENDOUT C0 OUT C0 OUT C0
C0
[Ladder example]
[Update timing of the current value]
Program
Coil of C0
Update of the current value Update of the current value