Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 83

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

2. Summary of Instructions
Instruction
Symbol/Operand
Mnemonic
Code
Time Compari-
LD (LOAD):
son
LD, AND, OR + =
Symbol
DT, <> DT, < DT,
<= DT, > DT, >=
DT
341 (= DT)
342 (<> DT)
343 (< DT)
344 (<= DT)
345 (> DT)
AND:
346 (>= DT)
Symbol
(CS/CJ-series
CPU Unit Ver. 2.0
or later and CJ2
CPU Units only)
OR:
Symbol
C: Control word
S1: 1st word of
present time
S2: 1st word of
comparison
time
UNSIGNED COM-
CMP(020)
PARE
CMP
*1
!CMP
020
S
: Comparison
1
data 1
S
: Comparison
2
data 2
DOUBLE
CMPL(060)
UNSIGNED
COMPARE
CMPL
060
S
: Comparison
1
data 1
S
: Comparison
2
data 2
SIGNED BINARY
CPS(114)
COMPARE
CPS
*1
!CPS
114
S
: Comparison
1
data 1
S
: Comparison
2
data 2
46
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)
C
can be masked/unmasked in the comparison so it is easy to create cal-
endar timer functions.
S1
S2
C
S1
S2
C
S1
S2
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.
S
1
S
2
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.
S
1
S
2
S1+1
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.
S
1
S
2
Function
Unsigned binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
Unsigned binary
comparison
S2+1
Arithmetic Flags
(>, >=, =, <=, <, <>)
Signed binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Location
Page
Execution
condition
LD: Not
253
required
AND, OR:
Required
Output
257
Required
Output
257
Required
Output
260
Required

Advertisement

Table of Contents
loading

Table of Contents