What's wrong with the code

More
21 Jun 2015 05:37 #60022 by bill516
I''ve started writting a little code to create some arc's for the test lathe attachment I've made for my cnc machine. All it does is is cut an arc while the lathe is rotating then moves along cuts another and so on until it reaches the end of the loop. A axis code is not added yet till I get this bit sorted.

%
#1 = 0
g0 x0 z0
(MSG, start spindle)
o100 do
g91.1 g18 g3 x#1 z0 i5 k0 f100
#1= [#1+10]
o100 while [#1 lt 100]
%

Whenever I run the code, the first arc is a full circle then the rest of the arc's are as they should be. I can run the code once without the o100 loop and it will cut an arc.

What have /am I doing wrong

Bill

Please Log in or Create an account to join the conversation.

More
21 Jun 2015 13:23 #60029 by Rick G
Replied by Rick G on topic What's wrong with the code
Try...
%
#1 = 1
g0 x0 z0
(MSG, start spindle)
o100 do
g91.1 g18 g3 x#1 z0 i.5 k0 f100
#1= [#1+1]
o100 while [#1 lt 10]
%

Rick G

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum