Fanuc Series 15i/150i-MA (Programming) Operators Manual

B-63324EN/03 PROGRAMMING 17.CUSTOM MACRO
- 627 -
- Undefined variable
In a conditional expression that uses EQ or NE, a <vacant> and zero
have different effects. In other types of conditional expressions, a
<vacant> is regarded as zero.
Sample program
The sample program below finds the total of numbers 1 to 10.
O0001;
#1=0;
#2=1;
WHILE[#2 LE 10]DO 1;
#1=#1 {#2;
#2=#2 {1;
END 1;
M30;

Leave a Reply

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