FANUC Series 16/18/160/180-Model C Machining Center Operators Manual

PROGRAMMING
B–62764EN/01
16. CUSTOM MACRO
391
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 *