Hello Guest it is September 16, 2019, 03:25:24 AM

Author Topic: G code method to Zero an axis  (Read 1535 times)

0 Members and 1 Guest are viewing this topic.

G code method to Zero an axis
« on: July 18, 2014, 11:06:09 AM »
I have a custom machine that pulls a long length of coiled material through it along the Y axis.  The Y axis is stationary and does not move, the material is moved incrementally in the specified direction for each Y axis move command. I have 100' coils of material and the parts vary in length.

When I reach the end of the G code file, what can I include at the end of the file (or the beginning of the next G code file) to set the Y axis position back to zero or some defined value to be ready to cut the next file? I would need to leave the X and Z values unchanged.

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: G code method to Zero an axis
« Reply #1 on: July 18, 2014, 02:40:48 PM »
You can make a custom macro up, just have it set the Y DRO to whatever you want.

For example if you open notepad and type in

SetOemDRO(801,0)

Then save it as m123.m1s to the macro folder of the profile you are using. Then every time you have m123 in your G Code the Y Dro will be set to Zero.
Hood
Re: G code method to Zero an axis
« Reply #2 on: July 21, 2014, 11:46:52 AM »
That was exactly what I was looking for and it works great!

Thanks Hood!