Shapeoko GCode for setting Zero XY

I have several projects I run quite often and I’d like to create macros in Carbide Motion to set up the zero XY points (I know I’ll have to do the Z manually) that I use for each job. An example would be a front left, while edge machining (off the front of the machine) I’ll use a position somewhere near the middle.

While I can move the carriage around using GCode, I’m having trouble finding the GCode to tell Shapeoko to set XY to zero.

I found this: List Of Supported Gcodes - Carbide 3D
but it doesn’t show any code for setting zero.

What I’d like to do is something like this:

G28.2 - home the machine so we know we have a good reference
Set zero XY (but not Z)
G0 Xxxx Yyyy - my known pre-set XY start for the job type
Set zero XY (but not Z)

What GCode do I need to tell the machine to set the XY zero?

Thanks!

Check out the G10 command
(Example here: Absolute x, y AND z with BitSetter on initialization - #8 by Julien)

3 Likes

This isn’t a Grbl command. You’d use $H to home.

1 Like

Hi Neil,

Thanks for your reply. Check out the link to the supported Shapeoko commands on the link I gave above. " * G28.2 — Run homing cycle"

Thanks again

1 Like

Thanks Julien, this is helpful.

Thanks, it’s not Grbl supported, but maybe Motion handles it. Carbide Motion has its own gcode “checker” where it preprocesses commands sent to the controller. Motion may intercept that and send a $H to the controller.
Have you tried it? I wonder why they’d pick that command to add.

2 Likes

Yes, both $H and G28.2 work. TBH I’d forgotten about $H, but since the controller specifically supports it then G28.2 then no reason not to use it.

I have another (smaller) CNC that uses G28.x commands for other things too, so it didn’t seem out of place.

Given you can send GCode to the Shapeoko without Carbide Motion it’s likely to be the machine that knows how to use it rather than CM intercepting and changing.

I’m using CM because it just works with Shapeoko, but I use UGS for the other machine.

I am using UGS on the Shapeoko with no issues. I use on another machine, so for consistency, I use it on both. I use Fusion 360 to create the code and UGS to send it to the machines. I use the command line (IE: G92 x0 y0 z0) more often then any of the soft buttons.

Thanks. I’ve also tried UGS on the Shapeoko, but since I run both from the same PC, I used USG for one and CM for the other so it’s obvious to me which software is for which CNC :slight_smile:

When I get the S5 I’ll need another PC since it will be located further away.

I run both my Millright and my Shapeoko from the same laptop too. I store the files in the same folders too. In fact, I can run files designed for either machine on either machine. Both run Grbl standard. The only difference in my two machines is overall size. The Millright is 10x10 where the Shapeoko is 18x34. So I use the smaller machine for smaller projects especially inlay work etc.

I suppose if the two machines didn’t use the same post processor code, I would probably would consider two different senders too.

G28 and G28.1 are Grbl accepted commands. I’m pretty sure those are the only G28 commands (for Grbl). Does your smaller CNC allow G28.2 as well?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.