FANUC Series 16/18/160/180-Model C for Lathe Operator Manual

PROGRAMMING
16. CUSTOM MACRO
B–62754EN/01
294
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;
Sample program

Leave a Reply

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