My Postprocessor Tips for using my J-Tech Laser

This forum is for requests and queries about machine tool support for Vectric Products
Post Reply
wb9tpg
Vectric Wizard
Posts: 453
Joined: Tue Sep 04, 2018 2:49 pm
Model of CNC Machine: Shapeoko 3 XL

My Postprocessor Tips for using my J-Tech Laser

Post by wb9tpg »

I thought I'd take a few minutes to write up a some of my Postprocessor tips regarding using a J-Tech laser with Vcarve (or Aspire). I use a Shapeoko which is a GCODE machine.
Tip #1 No Z
I have two post processors I use with my laser. One has Z motion and the other removes the Z. An easier way to make the NO Z postprocessor is to copy the postprocessor and change this like in it to include a scale factor.
VAR Z_HOME_POSITION = [ZH|A|Z|1.3|0.00001]
The last portion of that entry take any Z entry and multplies it by 0.00001 which effectively removes it. Just zero your Z axis so your laser is 1/8" above the work surface and your good to go.
Tip #2 Turn Laser Mode On Automaticall
If you're like me you forget to turn laser mode on/off with the $32 command. So I put it in my post processor to do it automatically. I will say you need CNCjs to make this work and will explain why later. I put the following stuff in my post process (section labels included)
begin HEADER
"$32=1"
"%wait"
begin FOOTER
"M5"
"$32=0"
"%wait"
Obviously the $32=1 turns laser mode on and the $32=0 turns it off. I also altered my non-laser post processors to include a $32=0 in their headers to make sure the laser mode is off for those. Now this only works for CNCjs for a few reasons. (1) Some versions of Carbide Motion don't like the $32 in the gcode. (2) You need the "%wait" directive that CNCjs supports. You need this because the $32 command writes to NVRAM and the controller pauses a second doing it following gcode commands are sent to the controller and lost while the write is going on. The "%wait" in CNCjs command tells CNCjs to wait until the $32 is done before proceeding. Without the "%wait" things screw up or hang. And if you're wondering if a "G4 P1" will work; it won't since it's GCODE processed by the controller.
Tip #3 Quit resetting XY zero for your Laser
I have a spindle mounted laser and the offset between the cut with a v-bit and the laser is off by 0.5mm (I think due to tramming errors). That's pretty small but I wanted 0 error so I developed a technique to reduce it to 0. And this technique will work even is your laser is offset by a large amount (like you're using a magnetic mount).
I was cutting patterns with V-Bits and wanted to mount my laser, zero Z like any other bit change, and proceed to burn a pattern that was registered on the previous cuts. I then stumbled on the G92 set of GRBL commands with allow a temporary offset to be set in place. Here is my Header section of my Laser PostProcessor with the commands included.
1 begin HEADER
2 "(Starting Program and turning Laser Mode On)"
3 "$32=1"
4 "%wait"
5 "T42"
6 "G17"
7 "G21"
8 "G90"
9 "G92.1"
10 "G0[ZH]"
11 "G0[XH][YH]"
12 + Now apply a temporaty 0.5mm offset for my laser alignment
13 "G92 X-0.5Y0.5"
So lines 1 thru 8 are pretty standard (see my tip #2 above for lines 3 & 4). The magic starts happening at line 9 which resets any temporary offset that might still be in place. Line 10 & 11 move to true 0 in case an offset was in place. Line 13 implements a new offset of X and Y values and should be whatever values your laser dot differs from your spindle cut. I carve a simple v-carve + and them laser a + and see how different you are. Then keep tweaking them until they align perfectly. You laser toolpaths will then align perfectly with your cuts. Your values for Line 13 will likely be very different than mine.
One more thing. Put the following lines in your Footer section of your laser toolpaths to turn off the offset. I also put them in the Header section of my non-laser post processors so even if a laser toolpath does not complete the offet is removed before making a cut.
+ Reset any offsets in place
"G92.1"
Well that's it for now. These are somewhat advanced concepts and may take you some time to play with and hopefully improve them

Now if J-Tech had an optional section for the Header and Footer I could have done it in one post processor. Maybe something for Version 11
Gary Mitchell
Kentucky, USA

Post Reply