I have a question about Grbl commands, after the program runs the laser part ID operation is there a grbl command to reset the zero setting for the router operation to cut the part without having to stop the program to reset the zero setting?
You can change the WCS origin ("zero point") using the G10 L2 [...] command: G-Codes Remember that you will need to set it back again if you repeat the job. You might also consider using different WCS for the Laser and the router operations: e.g. Use G54 for the Laser and G55 for the router. Each can have their own zero point defined separately. You just need to ensure that your gcode specifies the appropriate WCS in the header for each operation.
the correct way to do this is use use work offsets G54 for the router G55 for the laser you set up the Gcode with G54 in CAM in when generating for the router, then you set up the router bit and setzero (or probe) for that with G54 active. for the laser you set up the Gcode with G55 in it, then you set up the laser with setZero with G55 active. You can then join these 2 files together to run as one job. Now when you run the router code it will choose G54 and use that work offset, and similarly the laser gcode will select g55 and use the correct offsets for that. A slightly more advanced way to set it up is to realize that the laser is at a fixed offset from the router, say 40mm left in X and 50mm closer to you in Y. (and probably also a focal length offset in Z, say 21 (*) ) Therefore we can create a macro that we can use after setting G54 0,0,0 for the router that applies the offsets for G55 G17 G90 G21 G54 G53 G0 Z-5 G0 X0 Y0 G0 Z0 ; now the router is at the correct 0,0,0 position, we dont have to do it this way, but this is a handy check that we got it right G0 X40 Y50 Z21 ; move to the laser offset G10 L2 P2 X0 Y0 Z0 ; P2 for G55, tell it to set G55 to 0,0,0 here where the tool is now G55 ; coordinate display should show 0,0,0 now (*) BUT the reality is that this offset will change with the length of the bit so you will actually have to make a focus spacer that you can use as a virtual toolbit to set Z0 for the laser easily. The spacer goes between the material and some fixed point on the router or laser to set the correct focus distance. 1 - Set 0,0,0 for the router for G54 as above 2 - run the offset macro 3 - select G55 4 - place the spacer on the material and jog Z till it just touches your selected reference point 5 - click setZeroZ button 6 - run the Gcode Remember that the laser Gcode should contain commands to turn laser mode on and off $32=1 at the beginning $32=0 at the end
My laser is in straight line about 4 inches behind the router. I always ran the laser operation separate from the router which is very time consuming going back and forth. I kept playing around with the codes but could not get the right combination to go from laser to router immediately. When things run correctly it always amazes me that this machine can cut a part out more accurately than I can by manually. So if I put G54 0,0,0; G55 0,0,0; X,Y100, Z that would change the Y axis. I'll have to play with them see what kind of trouble I will get into.
No, I think you've misunderstood. If you're using Openbuilds Control, you can set the active Work Coordinate System (WCS) in the DRO at the top right hand corner of the screen: By default this is G54. Most CAM software defaults to G54, so many people don't have to pay any attention to this and don't realise that it is only one of several coordinate systems that can co-exist. (I think there are six in GRBL: G54 to G59. Other controllers may have more.) The suggestion is to use one coordinate system for the router (G54, say) and another for the Laser (G55, say). That way, you can set the zero point for each of them separately and independently - make sure that G54 is selected in the DRO when setting the zero for the router, and G55 is selected in the DRO when setting the zero for the Laser. In the CAM program you use to generate the gcode file for the router, make sure that the WCS is set to G54 (it almost certainly will be), and in the CAM program that you use for the Laser gcode, make sure the WCS is set to G55. When you send either of these gcode files to the machine, it will use the coordinate system (and hence zero point) specified by the relevant CAM **regardless of what is set on the DRO***. There are ways that you can set the zero of one WCS with respect to another, but don't worry about that until the concept of having more than one coordinate system makes sense.
Thank you for straightening that out, I was lost as to how to implement it. I will play around with it later to try it out.