Mach4 SmoothStepper Laser vector engrave/cut

Hello Les/Forum members,

I am seeking some help regarding a post for Mach4 SmoothStepper Diode laser engraver.
I recently had a request from a customer to print their logo on some display boxes. After some research it became apparent that this was not a small upgrade to my existing MechMate CNC router. I purchased a Neje Master+ and this has allowed me fufil my customer’s requirements in a relatively short space of time.
Concurrently I began to upgrade the MechMate router to occasionally carry a diode laser. I have added a SmoothStepper EES to speed up the comms from the old parallel port. My BOB is a PMDX-126 with a PMDX-107 for PWM control of the spindle. I use Mach3 to read the G-Code generated by SheetCAM for routing operations. I have purchased a licence for Mach4 Hobby to read laser G-Code. I have upgraded the CNC PC from WinXP to Win8.1. Under Mach4 the SmoothStepper plugin is able to drive PWM control to the laser through an emulated parallel pin and so leaves the PMDX-107 free to control the spindle. who makes the SmoothStepper provide some Mach4 macros that are called from the G-Code to set parameters of the cut file. Following is Warp9’s example G-Code for a vector file.

(Start of GCode)
G01 X0 Y0 Z1 F50


m2004 (This will Enable the Vector Laser)

G01 X1 Y1 Z1

M62 P20 (This will turn ON the Laser Gate and PWM with the next motion command)

G01 X2 Y1
G01 X2 Y2
G01 X1 Y2
G01 X1 Y1

M63 P20 (This will turn OFF the Laser Gate and PWM with the next motion command)

(Move to the next position, and then start a new laser cut if desired…)

(When done and ready to quit)

M2005 (This will Disable the Vector Laser)

G01 X0 Y0 Z1

(End of GCode)

So, I need a post processor to create G-Code in this form. I have attached a *.dxf file as an example of the type of thing I am trying to do. The data on layer “Laser20” is what I would be wanting to engrave. Layer “0” is the material size and would not be cut. I see that SheetCAM posts are written in LUA. Customisation in Mach4 is also achieved via LUA script. I have not written code in LUA though have some experience in VB. The learning curve at the moment, to me, seems vertical though am willing to have a go. I need either a shove to get going on the curve or a “quick and dirty” post processor. Help will be greatly appreciated.


Freo building snippet for Mechmate laser test run.DXF (137 KB)