Page 1 of 2

Resetting G28 position with a command?

Posted: Wed Feb 17, 2021 11:34 am
by vw_chuck
Is there a way to add a line to my G-code so that it updates the G28 location prior to cutting a part?
I don't want to have to remember to go into the centroid program to reset my G28 location when I switch to a new part. I want it to automatically update this location from the G-code when I load it.
Is this possible?

Re: G number to reset G28 location?

Posted: Wed Feb 17, 2021 2:33 pm
by vw_chuck
I guess I should just ask if there is a G command that will allow me to update the G28 position in Acorn?

Re: G number to reset G28 location?

Posted: Wed Feb 17, 2021 2:54 pm
by cncsnw
There is no G code to do that.

There do not appear to be CNC system variables that access it either.

Since you are looking at customizing your CNC programs anyway, you could use something other than G28 to retract the tool:
- A G0 move referenced to part zero
- A G53 move to specific machine coordinates
- A brief switch to a different WCS (since you can change WCS offsets via system variables)

Re: G number to reset G28 location?

Posted: Wed Feb 17, 2021 2:58 pm
by vw_chuck
Hmm that is strange that you can't change this position on the go with a G command. Since the Post Processor references G28 U0W0 throughout the g code then I would have to change every line that references the G28 which is not an option. I would be really nice to be able to simply update the G28 position at the start of the G-code.
Maybe there is an M code that could do this?

Re: Resetting G28 position with a command?

Posted: Wed Feb 17, 2021 6:22 pm
by cnckeith
please describe what you (or the post) is trying to accomplish.

what do you mean "switch to a new part"

typically G54-59 is used to "switch to a new part"

is the post written for a shop bot by chance? or a cnc control that doesn't use a work coordinate system?

what are you using to generate the g code? and post a sample of the g code.

Re: Resetting G28 position with a command?

Posted: Sat Feb 20, 2021 7:01 pm
by vw_chuck
I am using Fusion 360 on a cnc lathe.
The problem was I forgot to reset my g28 position and I had it set behind the part at a -z position. When my part was done it attempted to go to the g28 position via the shortest path possible(through my part) if I could reset the g28 position via the g code then I would never run into this issue again.
When I say switched to a new part mean I started making a batch of a different part which requires a different g28 position.
I dont see how using a different coordinate system would change anything.

Re: Resetting G28 position with a command?

Posted: Sat Feb 20, 2021 10:16 pm
by cncsnw
Instead of using G28 for both axes, you could just end your program -- or go to tool changes -- with:

Code: Select all

G0 Z1.0  ; move Z off end of part
G28 U0   ; move X to G28 position
(in whichever order you prefer).

Re: Resetting G28 position with a command?

Posted: Sun Feb 21, 2021 11:40 am
by Dave_C
The problem was I forgot to reset my g28 position and I had it set behind the part at a -z position
I'm trying to understand why you would have the G28 position set behind the part?

G28 is usually set to be a return to position or a goto position for a tool change. I've never come across a reason to set it at less than part zero.

Dave C.

Re: Resetting G28 position with a command?

Posted: Sun Feb 21, 2021 4:06 pm
by cncsnw
Maybe the previous part was shorter?

Re: Resetting G28 position with a command?

Posted: Sun Feb 21, 2021 5:47 pm
by Dave_C
Maybe the previous part was shorter?
That would do it!

Dave C.