Jogging and setting offset with Gcode for laser setup

Assembly questions and answers for the Shapeoko 3 CNC Mill
Post Reply
lorenolepi
Posts: 21
Joined: Wed Feb 17, 2016 5:16 pm
Location: CT

Jogging and setting offset with Gcode for laser setup

Post by lorenolepi » Sat Dec 29, 2018 3:05 pm

I have a laser for the shapeoko xxl that sits on the side of router. This makes the x,y zero point of the laser different then the x,y zero point of the mill.
I'm trying to figure out how to move the position of the machine so that when I'm at the current offset for the mill, I can just rapidly switch over to laser offset and make that the new current offset of x =0 y = 0 and run my next program... In the end I would like to be able to do this all via Gcode so that I can pretty much run the laser as a tool change but for now I just want to understand the concepts.

The offset from the laser to the mill is approximately x-74.825 y72.100 mm
Where I'm at now... is to use the MDI in carbide motion and type the $J command to jog the machine using $J= G91 G21 X-74.825 Y72.10 F6000.
This moves the machine from the mill x,y = 0 to the laser x,y = 0. Which is perfect. I then go to the Set Zero command and set X and Y to zero to make this my current offset which is what I'm trying to accomplish... but I would like to be able to do that using Gcode in the end if possible.
How would I set current offset for X & Y = 0 using Gcode as I don't any commands being sent to the machine in the log when pressing the set zero button commands in carbide motion?

A problem that I have using this method is that after I use the MDI to send the $J command and then I go back to Jog the machine in the Jog mode in carbide motion to fine tune, the first move it always does a strange move??? like it wants to go back to the original offset.
If I don't set zero it goes almost back to the original offset, if I do set zero then it moves just a little bit but in both the x and y direction. The only way I have been able to stop this movement from happening is to cheat a little and run the $J command twice with the second being a zero jog move.
$J= G91 G21 X-74.825 Y72.10 F6000
$J= G91 G21 X0 Y0 F6000
When doing this the first jog move after the command goes no where and the the secondary moves act as normal.
Is this because the jog command in carbide motion is always using G53 and I'm not?
Or is there some command that I should send after the $J jog command to update the current position of G53?

Another question I have is why is $10 set to 255 for carbide motion? When using other programs like lightburn it needs to be set to 0. When looking at the Grbl documentation it looks like the only valid entries are 0,1,2 so I'm curious where 255 comes from and why it needs to be set to jog properly in carbide motion?

And finally I have a request... PLEASE put programmable scripts into carbide motions MDI as having to type the same command over and over and over again is real pain and simple scripts work awesome!

lorenolepi
Posts: 21
Joined: Wed Feb 17, 2016 5:16 pm
Location: CT

Re: Jogging and setting offset with Gcode for laser setup

Post by lorenolepi » Sat Dec 29, 2018 4:12 pm

I found this article on how to use work coordinate systems ...and it kind of seems like what I want to do but not positive?
https://wiki.shapeoko.com/index.php/G-C ... te_Systems

To me this seems awesome if my X,Y zero is always in the same spot from the home. For instance if I had a vice or clamping system set up in the same position on my machine. It seems like I could set up a coordinate system for P(1-9) and run from there. Although I'm not sure how to say that P(1-9) is the current coordinate system as it seems like G54 is always used? Would I just change my G-Code to G55 for where I set the P2 location?
I also don't understand if using a G55 command would allow me to set my z height in carbide motion or does that only set for G54?

What I'm trying to accomplish though I think is a little different because I would like to set an offset from the current "Set Zero" point.
Meaning I have my work piece on the shapeoko in any location. I then probe to set the zero point of the mill to set the current working coordinate system. (I believe this would be G54) After I run the milling program(s) I then want to offset the machine to the work from the laser coordinate system = x-74.825 y72.100 from the probe zero point. So pretty much I want to move the G54 location to be offset x-74.825 y72.100

Does this make sense to anyone?

lorenolepi
Posts: 21
Joined: Wed Feb 17, 2016 5:16 pm
Location: CT

Re: Jogging and setting offset with Gcode for laser setup

Post by lorenolepi » Sat Dec 29, 2018 4:35 pm

I think I figured out what I wanted :D
All I needed to do was to set the offset of the current working coordinate system (G54). To do this after my milling program I can go to the MDI and type the following:
G21 G10 P1 L20 X74.825 Y-72.100

When I select the current offset (x,y) button it automatically switches it over be working from the laser

Post Reply