![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030324.webp)
284
Timer and Counter Instructions
Section 3-6
Flags
Precautions
The CNR(545)/CNRX(547) instructions do not reset TIML(542), TIMLX(553),
MTIM(543), and MTIMX(554), because these timers do not use timer num-
bers.
The CNR(545)/CNRX(547) instructions do not reset the timer/counter instruc-
tions themselves, they reset the PVs and Completion Flags allocated to those
instructions. In most cases, the effect of CNR(545)/CNRX(547) is different
from directly resetting the instructions. For example, when a TIM/TIMX(550)
instruction is reset directly its PV is set to the SV, but when that timer is reset
by CNR(545)/CNRX(547) its PV is set to the maximum value (9999 for BCD
and FFFF for binary).
When N1 and N2 are specified with N1>N2, only the Completion Flag for the
timer/counter number will be reset.
Example
When CIO 000000 is ON in the following example, the Completion Flags for
timers T0002 to T0005 are turned OFF and the timers’ PVs are set to the
maximum value (9999 for BCD and FFFF for binary).
When CIO 000001 is ON, the Completion Flags for counters C0003 to C0007
are turned OFF and the counters’ PVs are set to the maximum value (9999 for
BCD and FFFF for binary).
3-6-12 Example Timer and Counter Applications
The following examples show various applications of timer and counter
instructions including long-term timers, a two-stage counter, ON/OFF delay,
one-shot bit, and flicker bit.
Name
Label
Operation
Error Flag
ER
ON if N
1
is indirectly addressed through an Index Register
but the address in the Index Register is not the PV
address of a timer or counter.
ON if N
2
is indirectly addressed through an Index Register
but the address in the Index Register is not the PV
address of a timer or counter.
ON if N
1
and N
2
are not in the same data area.
OFF in all other cases.
CNR
T0002
T0005
000000
CNR
C0003
C0007
000001
CNRX
T0002
T0005
000000
CNRX
C0003
C0007
000001
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...