45
CS/CJ/NSJ Series Instructions Reference Manual (W474)
2. Summary of Instructions
2-2 Instruction Functions
2
2-2-4 Timer and Counter Instructions
MULTI-OUTPUT
TIMER
MTIM
543
(BCD)
MTIMX
554
(Binary)
(CJ2, CS1-H,
CJ1-H, CJ1M, or
CS1D only)
Output
Required
240
COUNTER
CNT
(BCD)
CNTX
546
(Binary)
(CJ2, CS1-H,
CJ1-H, CJ1M, or
CS1D only)
Output
Required
244
Instruction
Mnemonic
Code
Symbol/Operand Function Location
Execution
condition
Page
MTIM(543)
D1
D2
S
D1: Completion
Flags
D2: PV word
S: 1st SV word
SV 7
SV 2
SV 1
SV 0
0
to
to
Timer input
Timer PV (D2)
to
Bit 7
to
Timer PV
Timer SVs
0
Bit 2
Bit 1
Bit 0
MTIM(543)/MTIMX(554) operates a 0.1-s incrementing timer with 8
independent SVs and Completion Flags. The setting range for the
set value (SV) is 0 to 999.9 s for BCD and 0 to 6,553.5 s for binary
(decimal or hexadecimal).
Completion
Flags (D1)
MTIMX(554)
D1
D2
S
D1: Completion
Flags
D2: PV word
S: 1st SV word
CNT
N
S
Count
input
Reset
input
N: Counter
number
S: Set value
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