Laser Test button no worky worky.

Laser Test button no worky worky. What’s up with that?

Never worked for me… I wrote a macro to work around it! Not sure what’s happening there, but in the Smoothie’s firmware I believe the laser will only fire while there is also movement.

Just go to the gcode settings and set “TOOL TEST POWER” > 0 (the default is 0 for security reason).

If you have a CO2 laser, I suggest to set “TOOL TEST POWER” to 100% and “TOOL TEST DURATION” to 20-50ms. This way the laser test button just fires a short pulse with 100% power.

If you have a diode laser, I would set the power to 1-5% and the duration to 0. This way the laser test button works a a toggle switch to switch the laser on/off with low power.

No matter the Tool Test Power or Duration settings, it does not fire. It’s a CO2 laser, the spindle direction line and the spindle speed PWM line are connected; to fire the laser it has to be in M4 mode. I probably will write a macro.

What actual signals does the board send when the laser test button is pressed?

M4 mode is only for Grbl and does not fire the laser without moving.

What we send for “Laser Test” is depending on the firmware. For Grbl, we send “M3Sx”, for Smoothieware it’s “M3\nfire x” (x=power%).

What firmware and board are you using?

Ah, there’s the issue. I’m using an Arduino Uno/Protoneer CNC shield with GRBL firmware. It’s a CO2 laser, the power supply takes an Enable signal and a PWM Intensity signal. The spindle direction pin does still operate in laser mode, so I’m using the direction pin for the enable line. The laser will only fire in Dynamic/M4 mode.


In grbl “M3Sx” in this case the x also = power? How is duration specified? This command can work by inputting in the console?

Yes, the x stands for power. The maximum value is depending on the $30 setting.

The “TOOL TEST DURATION” defines the duration until the laser is automatically switches off again.This can be used for (invisible) CO2 lasers to just mark the actual position. A value of 0 means infinite time, which is useful for diode lasers which can be set to very low power, so the beam is visible but does not mark the material.

Hi Claudio,

To clarify I am trying to make a several macros which require a test first without moving to do consistent power measurements. I am trying to do this while leaving the Laserweb settings alone. What is the syntax to fire say at 50% power for 10ms duration?

" M3S500 50 " ??

How is duration written out?

The M3/M4 commands do not have a parameter for time. They are just state switches.
A dwell command (G04) should work.

This sequence should work:

Does not seem to work. unless I add a G1 move after M3S500

How does Laserweb tell the controller to do this when you press the test button?

Using GRBL-LPC btw.

In LaserWeb this is done in software with a javascript timeout. So send “M3Sx”, wait for the timeout, then send “M5”.