Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: keonfrey on August 22, 2018, 10:55:18 PM
-
Hi I have a cnc router running mach 3 and I put a laser diode module on it. I have it wired to the B axis for TTL on/off and if i want to stop running the file for some reason, the gcode stops running naturally, but the laser then just sits there burning a deep hole into my engraving material until i type a b- command. I'm wondering if there is a way to write a script for the stop button to turn the laser off automatically? Experimented with OEMButtons and i have the stop working with button 1003 but i cant find a good way to use a switch from a B0.01 to B0 from the button. Anybody know how this could easily be done?
-
If you add the following to your stop button script then it should work.
Code "B0"
While IsMoving ()
Wend