A-13
Appendices
CJ2 CPU Unit Software User’s Manual
A-1 Instruction Functions
App
A-1-4 Timer and Counter Instructions
COUNTER CNT
(BCD)
--- Output Required
CNTX
(Binary)
546
REVERSIBLE
COUNTER
CNTR
(BCD)
012 Output Required
CNTRX
(Binary)
548
RESET TIMER/
COUNTER
CNR
@CNR
(BCD)
545 CNR(545)/CNRX(547) resets the timers or counters within the
specified range of timer or counter numbers. Sets the set
value (SV) to the maximum of #9999 for BCD and #FFFF for
binary.
Output Required
CNRX
@CNRX
(Binary)
547
Instruction Mnemonic Code Symbol/Operand Function Location
Execution
condition
CNT
N
S
N: Counter number
S: Set value
Reset
input
Count
input
SV
Count input
Counter PV
Completion
Flag
Reset input
CNT/CNTX(546) operates a decrementing counter.
The setting range for the set value (SV) is 0 to
9,999 for BCD and 0 to 65,535 for binary (decimal
or hexadecimal).
CNTX(546)
N
S
Count
input
Reset
input
N: Counter number
S: Set value
CNTR(012)
N
S
Incre-
ment
input
Decre-
ment
input
Reset
input
N: Counter number
S: Set value
SV
SV
+1
−1
Increment input
Counter PV
Decrement input
Counter PV
Completion Flag
Counter PV
Completion Flag
CNTR(012)/CNTRX(548) operates a reversible counter.
CNTRX(548)
N
S
Incre-
ment
input
Decre-
ment
input
Reset
input
N: Counter number
S: Set value
CNR(545)
N1
N2
N
1
: 1st number in
range
N
2
: Last number
in range
CNRX(547)
N1
N2
N
1: 1st number in
range
N
2: Last number
in range