Hello Guest it is September 24, 2020, 11:39:16 PM

Author Topic: Mach 3 script for STOP button?  (Read 1920 times)

0 Members and 1 Guest are viewing this topic.

Mach 3 script for STOP button?
« 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?

Offline Tweakie.CNC

  • *
  •  8,456 8,456
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Mach 3 script for STOP button?
« Reply #1 on: August 23, 2018, 03:33:25 AM »
If you add the following to your stop button script then it should work.

Code "B0"
While IsMoving ()