Resetting G28 position with a command?

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

vw_chuck
Posts: 194
Joined: Sun Sep 20, 2020 7:34 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0035FF8FEB5F-0708203490
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Resetting G28 position with a command?

Post 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?
Last edited by vw_chuck on Wed Feb 17, 2021 4:16 pm, edited 2 times in total.
vw_chuck
Posts: 194
Joined: Sun Sep 20, 2020 7:34 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0035FF8FEB5F-0708203490
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G number to reset G28 location?

Post 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?
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: G number to reset G28 location?

Post 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)
vw_chuck
Posts: 194
Joined: Sun Sep 20, 2020 7:34 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0035FF8FEB5F-0708203490
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G number to reset G28 location?

Post 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?
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Resetting G28 position with a command?

Post 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.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
vw_chuck
Posts: 194
Joined: Sun Sep 20, 2020 7:34 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0035FF8FEB5F-0708203490
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Resetting G28 position with a command?

Post 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.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Resetting G28 position with a command?

Post 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).
Dave_C
Posts: 669
Joined: Wed Nov 15, 2017 8:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Springfield, MO. USA
Contact:

Re: Resetting G28 position with a command?

Post 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.
Grizzly G0678 Mill ,CNC conversion with Acorn. G4004G Lathe, Mach 3 conversion to Acorn.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Resetting G28 position with a command?

Post by cncsnw »

Maybe the previous part was shorter?
Dave_C
Posts: 669
Joined: Wed Nov 15, 2017 8:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Springfield, MO. USA
Contact:

Re: Resetting G28 position with a command?

Post by Dave_C »

Maybe the previous part was shorter?
That would do it!

Dave C.
Grizzly G0678 Mill ,CNC conversion with Acorn. G4004G Lathe, Mach 3 conversion to Acorn.
Post Reply