![Omron CVM1D Operation Manual Download Page 149](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532149.webp)
144
5-13-7 REVERSIBLE COUNTER: CNTR(012)
(012)
CNTR
N
S
S: Set value
CIO, G, A, T, C, #, DM, DR, IR
*Refer to page 128 for details on indirectly addressing counters.
N: Counter number #
Operand Data Areas
Ladder Symbol
II
DI
R
Description
The CNTR(012) is a reversible, up/down circular counter, i.e., it is used to count
between zero and SV according to changes in two execution conditions, those
on the increment input (II) and those in the decrement input (DI).
The present value (PV) will be incremented by one whenever CNTR(012) is
executed with an ON execution condition for II and the last execution condition
for II was OFF. The present value (PV) will be decremented by one whenever
CNTR(012) is executed with an ON execution condition for DI and the last
execution condition for DI was OFF. If OFF to ON changes have occurred in both
II and DI since the last execution, the PV will not be changed.
If the execution conditions have not changed or have changed from ON to OFF
for both II and DI, the PV of CNTR(012) will not be changed.
When decremented below 0000, the present value is set to SV and the Comple-
tion Flag is turned ON until the PV is decremented again. When incremented
above SV, the PV is set to 0000 and the Completion Flag is turned ON until the
PV is incremented again.
CNTR(012) is reset with a reset input, R. When R goes from OFF to ON, the PV
is reset to zero. The PV will not be incremented or decremented while R is ON.
Counting will begin again when R goes OFF. The PV for CNTR(012) will not be
reset in interlocked program sections or by power interruptions.
When inputting the CNTR(012) instruction with mnemonics, first enter the incre-
ment input (II), then the decrement input (DI), the reset input (R), and finally the
CNTR(012) instruction. When entering with the ladder diagrams, first input the
increment input (II), then the CNTR(012) instruction, the decrement input (DI),
and finally the reset input (R).
Changes in II and DI execution conditions, the Completion Flag, and the PV are
illustrated below starting from part way through CNTR(012) operation (i.e.,
when reset, counting begins from zero). PV line height is meant only to indicate
changes in the PV and not absolute values.
Execution condition
on increment (II)
Execution condition
on decrement (DI)
ON
OFF
ON
OFF
Completion Flag
ON
OFF
PV
SV
SV – 1
SV – 2
0001
0000
0000
SV
SV – 1
SV – 2
Precautions
SV must be BCD between 0000 and 9999.
Timer and Counter Instructions
Section 5-13
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...