Move after Homing to a position

Discussion about the arduino based g-code interpreter, grbl
Post Reply
xpix
Posts: 218
Joined: Thu Sep 06, 2012 6:47 am

Move after Homing to a position

Post by xpix » Mon Dec 30, 2013 12:25 pm

Hello,

i run in a problem. may somebody can help me. I installed new X and Y limit switches on my eShapeoko, works great after some configuration edit sessions :)

I want that my machine move after homing process to a special position (left, bottom pos from my vacuumtable). After that i want reset the coordinates system and machine pos to X0 and Y0. I can do this with the new autostart feature in GRBl 0.8c:

https://github.com/grbl/grbl/wiki/Confi ... rtup-block

The Question, what is the correct settings for $N to move the machine to a pos and reset coordinate system? May someone use this on his machine?

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Move after Homing to a position

Post by cvoinescu » Mon Dec 30, 2013 2:21 pm

G92 tells GRBL what coordinates the current position is. Say you want to move the machine to (10, 20, -50) relative to the home position, and make that the new (0, 0, 0). You can do it in two ways:

$H
G0 X10 Y20 Z-50 (move to desired position...)
G92 X0 Y0 Z0 (... then set it as the new 0, 0, 0)

or:

$H
G92 X-10 Y-20 Z50 (the home position is -10, -20, 50 relative to the desired 0, 0, 0)
G0 X0 Y0 Z0 (move to the new 0, 0, 0)

Another way is to use the saved coordinates; I believe GRBL 0.9 saves them in EEPROM, so you only need to set them once, but I don't really understand how they work; I've always used G92 and it worked for me. I've never used $N, so I don't know whether these work in that context (they should).
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

xpix
Posts: 218
Joined: Thu Sep 06, 2012 6:47 am

Re: Move after Homing to a position

Post by xpix » Mon Dec 30, 2013 3:07 pm

cvoinescu wrote:I've never used $N, so I don't know whether these work in that context (they should).
Many Thanks, this what u write was also my idea. Nu, i want to try .. but i read in Documentation:
Also, if you have homing enabled, the startup blocks will execute immediately after the homing cycle, not at startup.
I try this and it works great, after every homing the machine run to this pos and reset the coordinates systems ... nu i want to test this :)

glendresser
Posts: 38
Joined: Sat Sep 08, 2012 5:45 am

Re: Move after Homing to a position

Post by glendresser » Tue Dec 31, 2013 5:59 am

cvoinescu wrote: Another way is to use the saved coordinates; I believe GRBL 0.9 saves them in EEPROM, so you only need to set them once, but I don't really understand how they work; I've always used G92 and it worked for me. I've never used $N, so I don't know whether these work in that context (they should).
I've been experimenting with these lately, and really liking them. A basic way to set them would be:
1. Home your machine
2. Use commands or buttons to navigate to the location of the position you want your machine to use as it's working x/y/z (corner of your vacuum table, for example).
3. Send this command: G10 L20 P1 X0 Y0 Z0

You only need to do this once. This sets the current location to the zero for the G54 work area, and it's now saved in EEPROM. In my experience, this is very persistent. Powerdowns, crashes, resets, it doesn't matter, the location is still saved. (In the G10 command, change P1 to P2, P3, etc. to use workspaces G55, G56, etc.)

Type $# to see your saved locations.
At any point, type G54, and you are now working in this workspace.

So, on starting your machine, you'd send:
$H
G54
x0y0z0

You'll home your machine, switch to the G54 workspace, and go to your zero position. Any program you send will now use these coordinates as their zero. (Be aware that if your program ends with an M30 line, it'll switch back to the global positioning, so you'll need to type G54 again to get back into the workspace.)

xpix
Posts: 218
Joined: Thu Sep 06, 2012 6:47 am

Re: Move after Homing to a position

Post by xpix » Fri Jan 10, 2014 11:42 am

A deep thank you for this little Tutorial. I'm back from my Vacation and will try this at weekend. May i make a video and we save this as small article in wiki :)

Post Reply