Counter - Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

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 Cinstruction / OUT LCinstruction), 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.
[Ladder example]
X0
[Update timing of the current value]
Program
X0
OFF
Coil of C0
OFF
21 DEVICES
344
21.3 User Device
K10
C0
END
OUT C0
END
ON
ON
Update of the current value
OUT C0
END
OUT C0
Update of the current value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents