48
CS/CJ/NSJ Series Instructions Reference Manual (W474)
2. Summary of Instructions
Time Compari-
son
LD, AND, OR + =
DT, <> DT, < DT,
<= DT, > DT, >=
DT
341 (= DT)
342 (<> DT)
343 (< DT)
344 (<= DT)
345 (> DT)
346 (>= DT)
(CS/CJ-series
CPU Unit Ver. 2.0
or later and CJ2
CPU Units only)
Time comparison instructions compare two BCD time values and create
an ON execution condition when the comparison condition is true.
There are three types of time comparison instructions, LD (LOAD),
AND, and OR. Time values (year, month, day, hour, minute, and second)
can be masked/unmasked in the comparison so it is easy to create cal-
endar timer functions.
LD: Not
required
AND, OR:
Required
257
UNSIGNED COM-
PARE
CMP
!CMP
*1
020
Output
Required
261
DOUBLE
UNSIGNED
COMPARE
CMPL
060
Output
Required
261
SIGNED BINARY
COMPARE
CPS
!CPS
*1
114
Output
Required
264
Instruction
Mnemonic
Code
Symbol/Operand Function Location
Execution
condition
Page
S1
C
S2
LD (LOAD):
AND:
OR:
S1
C
S2
S1
C
S2
Symbol
Symbol
Symbol
C: Control word
S1: 1st word of
present time
S2: 1st word of
comparison
time
CMP(020)
S
1
S
2
S1: Comparison
data 1
S
2: Comparison
data 2
Compares two unsigned binary values (constants and/or the contents
of specified words) and outputs the result to the Arithmetic Flags in
the Auxiliary Area.
Unsigned binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
CMPL(060)
S
1
S
2
S
1
: Comparison
data 1
S
2
: Comparison
data 2
S1+1 S2+1
Compares two double unsigned binary values (constants and/or the
contents of specified words) and outputs the result to the Arithmetic
Flags in the Auxiliary Area.
Unsigned binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
CPS(114)
S
1
S
2
S
1
: Comparison
data 1
S
2
: Comparison
data 2
Compares two signed binary values (constants and/or the contents of
specified words) and outputs the result to the Arithmetic Flags in the
Auxiliary Area.
Signed binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)