Counter Areas - Omron CJ2 CPU - REV 10-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

6 I/O Memory Areas

6-17 Counter Areas

Up to 4,096 counters with counter numbers C0 to C4095 can be used. There are two counter data
areas: the Counter Completion Flag Area and the Counter Present Value (PV) Area.
• Counter Completion Flags (C)
Counter numbers are used to access Completion Flags. A Completion Flag is turned ON when the
set value of the counter is reached.
• Counter PVs (C)
Counter numbers are also used to read and write the present values of counters (16 bits). The PVs
count up or down as the counter operates.
When a counter number is used in an operand that requires bit data, the counter number accesses the
Completion Flag of the counter. When a counter number is used in an operand that requires word data,
the counter number accesses the PV of the counter.
The same timer number are used by all of the following instructions CNT, CNTX(546), CNTR(012),
CNTRX(548), CNTW(814), and CNTWX(818).
Precautions for Correct Use
Precautions for Correct Use
It is not recommended to use the same counter number in two counter instructions because the
counters will not operate correctly if they are counting simultaneously. If two or more counter
instructions use the same counter number, an error will be generated during the program check,
but the counters will operate as long as the instructions are not executed in the same cycle.
The following table shows when counter PVs and Completion Flags will be reset.
Instruction name
COUNTER:
CNT/CNTX(546)
REVERSIBLE COUNTER:
CNTR(012)/CNTRX(548)
COUNTER WAIT:
CNTW(814)/CNTWX(818)
• Counter Completion Flags can be force-set and force-reset.
• There are no restrictions in the order of using counter numbers or in the number of N.C. or N.O.
conditions that can be programmed.
• Counter PVs can be read as word data and used in programming.
6-34
Effect on PV and Completion Flag
Mode
Reset
change
PV → 0000
Maintained
Flag → OFF
PLC startup
Reset Input
Maintained
Reset
CJ2 CPU Unit Software User's Manual
CNR(545)/CN
Interlocks
RX(547)
(IL-ILC)
Reset
Maintained

Advertisement

Table of Contents
loading

Table of Contents