Hi Guys,

I have a LED Diode Laser attached to my Z axis and I'm controlling it using Mach3 and my Ethernet Smooth Stepper. I'm using the workflow that was on the 'Warp9' website (using Output#1 and Pin17) I have my Pulley PWM set between 0 - 100%.

Everything is working as it should but I have a small problem!

I need to fire the Laser at something like a steady 2/3% power to help me get it focused accurately.

I'm using the M11p1 and M10p1 commands to turn on and off the laser and was hoping that I could either use an MDI command or run a small GCode file to run the laser at say 2% during focusing.

I know what GCode is and I know what the basic functions of GCode are but I have no idea on how to write a script. I think that I can create a 'Notepad' file and save it with a .nc extension. I have no idea though on the text but would imagine that it will look something like this..
(I have doubled up some of the commands as I don't know which ones will work)

G21 (mm)
M10p1 M5 (Turn off Laser)
G1 X1 Y1 (small movement)
M11p1 M3 S2 F2 (Turn on laser at 2% power)
ToolTest Power S2%
G4 x300 (Dwell for 5mins)
M10p1 M5 (Turn off laser)
G1 X0 Y0 (small movement)
M30 (Return Home)

Can anyone help me with this? I was also thinking that it may be possible to enter an MDI command like 'M11p1 S2' or 'M11p1 F2'?

I was also thinking about setting up a 'Laser tool' in Vectric that operated at 2% power and sending that to mach using the 'Vectric Laser PP'

There are many other small laser software programs that can do this like 'BenBox', T2Laser' and LaserGBRL' but I would prefer not to introduce another software into my workflow.

Any hints, tips or directions (compiled GCode file) appreciated. :)