Fanuc Power Mate i-D/H Operator Manual

3. HIGH–SPEED RESPONSE
FUNCTION
PROGRAMMING
(Power Mate i–H)
B–63174EN/03
283
A conditional expansion shall follow IF. Enclose the conditional
expansion in brackets [ and ].
If the conditional expansion is satisfied, a branch is made to sequence
number n. If not, program control goes to the next block.
Listed below are the operators that can be used in conditional expansions.
Operator Meaning
EQ Equal ()
NE Unequal ()
Example of using IF)
IF [#i EQ #j] GOTO n;
(1)
Processing1
Nn
(1) If the condition is satisfied (#i
= #j), a branch is made to Nn
to perform processing 2.
(2) If the condition is not satisfied
(#i ( #j), program control goes
to processing 1.
Processing2
(2)
NOTE
1 Do not use any operator other than those listed above with
the bit specification–type system variables. Otherwise,
compiler error 1065 occurs.
2 No operation can be specified within a conditional
expansion.
Example)
IF[#i EQ 1] ........ Possible
IF[#i 1 EQ #j.2 ] ........ Possible
IF[#i.1 EQ #j.1 OR #j.3] ........ Impossible
A conditional expansion shall follow WHILE.
Program steps between DO and END are executed while the conditional
expansion is satisfied.
If the conditional expansion is not satisfied, program control goes to the
block next to END.
The operators usable with a conditional branch (IF statement) can be used
also in the conditional expression for the WHILE statement.
Example of using WHILE)
WHILE [#i.b EQ 1] DO1 ;
(1)
Processing1
(1) Processing 1 between DO1
and END1 is repeated while
the condition is satisfied (#i.b
= 1).
(2) Processing 2 is executed if the
condition is not satisfied (#i.b
= 0).
Processing2
(2)
END1 ;
Conditional branch (IF
statement)
Repetition (WHILE
statement)

Leave a Reply

Your email address will not be published. Required fields are marked *