Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

G code loop program for 2 axis cnc

Status
Not open for further replies.

Gary262

Industrial
Mar 22, 2018
1
Hello,

I am new here, so thank you for your time. I need a warm up program for a 2 axis grinding machine in G code. This is what I have so far, but i need it to loop until I stop it manually.

%500
N00 G70
N10 G01F10X2 Z2
N20 X0 Z0
N30 G77N10
N40 M02

I have tried different variations of this but i cannot get it to repeat.
Thank you
Gary
 
Replies continue below

Recommended for you

Try replacing your M02 with an M30.

It is better to have enough ideas for some of them to be wrong, than to be always right by having no ideas at all.
 
Don't know your controller, but most use M99 to repeat (or, in the case of subprograms, return to main).
 
X2 using M99 for a jump back to the start of program to loop. Also M99 used to go from a sub program back to what ever program the M98 sub was called from. Yes this is for Fanuc type controls and others that use the same strategy.

Your M02 call at the end is just a program stop, so you put the M99 there instead. An M30 there will rewind or jump to the top and stop, M99 again will go to the top and start running through the program again.
So what is the G77 N10 line for?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor