×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

G code loop program for 2 axis cnc

G code loop program for 2 axis cnc

G code loop program for 2 axis cnc

(OP)
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

RE: G code loop program for 2 axis cnc

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.

RE: G code loop program for 2 axis cnc

Don't know your controller, but most use M99 to repeat (or, in the case of subprograms, return to main).

RE: G code loop program for 2 axis cnc

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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close