Hello Guest it is January 18, 2020, 01:32:34 AM

Author Topic: Saving work offset  (Read 1828 times)

0 Members and 1 Guest are viewing this topic.

Saving work offset
« on: May 21, 2011, 06:05:41 AM »
I would like to save work offset at the beginning of the Gcode automatically.

Is there a way it can be done with a macro or any other method.

It would open the code with the editor, save the work offset and save it so I could use the same program later and get the same work offset as before.

Thanks, Jeff

Offline Hood

  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Saving work offset
« Reply #1 on: May 21, 2011, 06:22:48 AM »
Would you have several macros for different offset positions?
If so then you should be able to do that by having the macro Home then set the DROs to whatever position you have in the macro. If you had several macros for different positions then it would just be a case of calling the correct macro in your code.

Normally what would be done I think is just have permanent offsets in the table and call them at the start of the code, ie G55 or G56 or whatever and as long as you have not changed the offsets in the table all would be fine.

I know Tool offsets can be changed via G Code but not sure if work offsets can be. I use the code offset method for setting my tool heights when using my tool height setter.  Will see if I can ask Brian regards the work offsets when I see him online (if I remember ;) )

Offline ger21

  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Saving work offset
« Reply #2 on: May 21, 2011, 07:27:34 AM »
If you're code gets the current offsets and saves them, then it would change them each time it's run.

You might be able to define the offsets in the g-code, like #1 =  x offset, #2 = Y, .... and call a macro to change the offsets before running the code. You wouldn't need to save them, as the code would set them each time. Not sure if this would work or not.

2010 Screenset

JointCAM Dovetail and Box Joint software