Enable laser for focusing

I’m trying to find out if there is already a built in way to enable a laser (via hwpwm) in trickle power mode while the machine is stationary. I have an inexpensive two watt laser which needs to be focused manually. It has a 12V power input and a 5V PWM input. I’ve setup a basic switch module to turn the 12V on (powering up the laser) and I’m using the default laser module to control the PWM input (just using a voltage divider for the unidirectional shift to 5V). It’s working perfectly, but I’m unable to have the laser on trickle power except during G1/G2/etc moves. Is there something I’m missing? Is there a way to turn on the laser at low power without requiring movement?

I’ve considered adding another switch module that uses the same pin and the laser module, so I can enable it from there, but I’m not sure how the Smoothieboard will handle that potential conflict.

Imported from wikidot

I don’t think that’s possible with the code we have right now, but maybe somebody else knows more and can help you there

Do you know if a switch module with the same pin as the laser module will conflict in some way? I haven’t looked at the code yet, but I’m assuming either module doesn’t rely on the state of the pin not changing between its own operations.

I think it *might* work, you should try it.

The duplicate switch doesn’t seem to work, its commands have no response.

But, I can use a short G1 move with a 0.1mm/sec feed and that seems to work well enough. The alternative would be to modify the laser module code to trickle for dwells. But, either way, it’s working well enough. Thanks.