Sel language, Cpxx (compare) – IAI America DS-S-C1 User Manual
Page 45
![background image](/manuals/350266/45/background.png)
43
n
o
i
s
n
a
p
x
E
n
o
i
t
i
d
n
o
c
)
R
O
·
D
N
A
(
t
u
p
n
I
n
o
i
t
i
d
n
o
c
)
g
a
l
F
·
O
/
I
(
d
n
a
m
m
o
C
t
s
o
P
)
g
a
l
F
·
t
r
o
p
t
u
p
t
u
O
(
d
n
a
m
m
o
C
1
d
n
a
r
e
p
O
2
d
n
a
r
e
p
O
l
a
n
o
i
t
p
O
l
a
n
o
i
t
p
O
X
X
P
C
.
o
N
e
l
b
a
i
r
a
V
a
t
a
D
Q
E
E
N
T
G
E
G
T
L
E
L
●
CPXX (Compare)
[Function]
Compares the contents of the variable in operand 1 and the value in operand 2 and if the
condition is satisfied, the output turns ON. When the condition is not satisfied, the output turns
OFF.
12. SEL Language
[Example 1]
LET
1
10
Assign 10 to variable 1.
CPEQ
1
10
600
If the content of variable 1 is 10, flag 600 turns ON,
600
ADD
2
1
If flag 600 is ON, 1 is added to variable 2.
[Example 2]
LET
1
2
Assign 2 to variable 1.
LET
2
10
Assign 10 to variable 2.
LET
3
10
Assign 10 to variable 3.
CPNE
*1
*3
310
If the variable in 2 (the content of variable 1) does not equal the
content of variable 3, then output 310 turns ON. Therefore, in this
example, output 310 is OFF.
CPXX
EQ ... Operand 1 = Operand 2
NE ...
Operand 1
≠
Operand 2
GT ... Operand 1
>
Operand 2
GE ...
Operand 1
≥
Operand 2
LT ...
Operand 1
<
Operand 2
LE ...
Operand 1
≤
Operand 2
12.5
Comparison operation commands