[5] Comparison Operation
247
[5] Comparison
Operation
z
CP
(Compare)
Command, declaration
Extension
condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1
Operand 2
Output
(Output, flag)
E
N, Cnd
Cmnd
Operand 1
Operand 2
Pst
Optional Optional
CP
Variable
number
Data
EO NE
GT GE
LT LE
Applicable models
All models [Refer to Section 5.1 for details of models]
{
[Function]
The output will be turned ON if the comparison result of the content of the
variable specified in operand 1 and the value specified in operand 2 satisfies the
condition.
The value in the variable does not change.
The output will be turned OFF if the condition is not satisfied.
(Note)
The output will not be turned OFF when the command is executed.
CP
EQ ··············· Operand 1 = Operand 2
NE ··············· Operand
1
z
Operand 2
GT ··············· Operand 1 > Operand 2
GE ··············· Operand
1
t
Operand 2
LT ··············· Operand 1 < Operand 2
LE ··············· Operand
1
d
Operand 2
[Example 1]
LET
1
10
Assign 10 to variable 1.
CPEQ
1
10
600
Turn ON flag 600 if the content of
variable 1 is 10.
600
ADD
2
1
Add 1 to variable 2 if flag 600 is ON.
[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
Turn ON output 310 if the variable that
corresponds to the content of variable 1,
or 2, is not equal to the content of
variable 3.
Содержание PSEL
Страница 2: ......
Страница 10: ......
Страница 18: ...8 Part 1 Installation ...
Страница 37: ...27 Part 1 Installation 2 2 axis specification with battery ...
Страница 382: ...372 Appendix Micro cylinder RCL Series Current limiting value ratio Push force N ...
Страница 476: ...466 Appendix ...
Страница 480: ...470 ...
Страница 485: ...475 ...
Страница 487: ...INTELLIGENT ACTUATOR SEL Language Programming Manual Eighth Edition ...
Страница 488: ......
Страница 490: ......
Страница 494: ......
Страница 518: ...24 ...
Страница 526: ...32 ...
Страница 831: ... 11 Actuator Control Declaration 337 Example DFIF 1 170 ...
Страница 1060: ......
Страница 1061: ......