![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268324.webp)
285
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
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...