Omron SYSMAC CS Series Instruction & Reference Manual page 198

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

3. Instructions
Function
The counter PV is incremented by 1 every
time that the increment input goes from OFF
to ON and it is decremented by 1 every time
that the decrement input goes from OFF to
ON. The PV can fluctuate between 0 and the
SV.
When incrementing, the Completion Flag will
be turned ON when the PV is incremented
from the SV back to 0 and it will be turned
OFF again when the PV is incremented from
0 to 1.
When decrementing, the Completion Flag will
be turned ON when the PV is decremented
from 0 up to the SV and it will be turned OFF
again when the PV is decremented from the
SV to SV-1.
Precautions
• Counter numbers are shared by the CNT, CNTX(546), CNTR(012), CNTRX(548), CNTW(814), and
CNTWX(818) instructions. If two counters share the same counter number but are not used
simultaneously, a duplication error will be generated when the program is checked but the counters
will operate normally. Counters which share the same counter number will not operate properly if
they are used simultaneously.
• The PV will not be changed if the increment and decrement inputs both go from OFF to ON at the
same time. When the reset input is ON, the PV will be reset to 0 and both count inputs will be
ignored.
• The Completion Flag will be ON only when the PV has been incremented from the SV to 0 or
decremented from 0 to the SV; it will be OFF in all other cases.
• When inputting the CNTR(012)/CNTRX(548) instruction with mnemonics, first enter the increment
input (II), then the decrement input (DI), the reset input (R), and finally the CNTR(012)/CNTRX(548)
instruction. When entering with the ladder diagrams, first input the increment input (II), then the
CNTR(012)/CNTRX(548) instruction, the decrement input (DI), and finally the reset input (R).
Example Programming
The counter PV is reset to 0 by turning the reset input (CIO 0.02) ON and OFF. The PV is incremented
by 1 each time that the increment input (CIO 0.00) goes from OFF to ON. When the PV is incremented
from the SV (3), it is automatically reset to 0 and the Completion Flag is turned ON.
Likewise, the PV is decremented by 1 each time that the decrement input (CIO 0.01) goes from OFF to
ON. When the PV is decremented from 0, it is automatically set to the SV (3) and the Completion Flag
is turned ON.
164
Increment input
Decrement input
Counter PV
SV
Counter PV
Completion Flag
SV
Counter PV
Completion Flag
CS/CJ/NSJ Series Instructions Reference Manual (W474)
+1
−1

Advertisement

Table of Contents
loading

Table of Contents