EasyManua.ls Logo

Omron CJ - PROGRAMMING MANUAL 12-2009 - Page 129

Omron CJ - PROGRAMMING MANUAL 12-2009
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
89
Comparison Instructions
Section 3-5
Symbol Compari-
son (Double-
word, signed)
LD, AND, OR + =,
<>, <, <=, >, >=
+SL
303 (=)
308 (<>)
313 (<)
318 (<=)
323 (>)
328 (>=)
S
1
: Comparison
data 1
S
2
: Comparison
data 2
Symbol comparison instructions (double-word, signed) compare two
values (constants and/or the contents of specified double-word data) in
signed 32-bit binary (8-digit hexadecimal) and create an ON execution
condition when the comparison condition is true. There are three types
of symbol comparison instructions, LD (LOAD), AND, and OR.
LD: Not required
AND, OR:
Required
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 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 sec-
ond) can be masked/unmasked in the comparison so it is easy to create
calendar timer functions.
LD: Not required
AND, OR:
Required
UNSIGNED COM-
PARE
CMP
!CMP
*1
020
Output
Required
DOUBLE
UNSIGNED
COMPARE
CMPL
060
Output
Required
Instruction
Mnemonic
Code
Symbol/Operand Function Location
Execution
condition
S1
C
S2
LD (LOAD):
AND:
OR:
S1
C
S2
S1
C
S2
C: Control word
S1: 1st word of
present time
S2: 1st word of
comparison
time
Symbol
Symbol
Symbol
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

Table of Contents

Related product manuals