Hello Guest it is March 28, 2024, 06:20:52 AM

Author Topic: Using mach 3 to control a laser and need to disable it whentraveling  (Read 936 times)

0 Members and 1 Guest are viewing this topic.

Hi all,

I've been using mach 3 for the last year to run my laser and the only issue I have is that the laser runs continuously while traveling. I use it to create stencils for my work and it occasionally wrecks some of the more detailed parts. I use the m7/coolant option to toggle the laser and am wondering if it is possible to configure mach 3 to disable/enable the coolant when Z is at a specific value. I've seen a few things on using the VB script editor but I'm not sure if that is the correct option.

My settings on ports & pins are output #3, port 3, pin 1 and the coolant is set for #3 on the spindle tab. I would like to toggle it so that coolant is on when Z is at or below -0.01 and off when it is at or above 0.00.

Any help would be greatly appreciated.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Using mach 3 to control a laser and need to disable it whentraveling
« Reply #1 on: June 28, 2020, 06:41:00 AM »
you can do this with a few lines in macropump macro. make sure it is enabled in General config, and you remove Output3
in spindle tab.

Code: [Select]
'turn output ON
If GetDro(2) < -0.01 Then
ActivateSignal(OUTPUT3)
End If

'turn output OFF
If GetDro(2) >= 0.0 Then
DeactivateSignal(OUTPUT3)
End If
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Using mach 3 to control a laser and need to disable it whentraveling
« Reply #2 on: June 28, 2020, 06:58:48 AM »
Hi Pacguy,

You should also consider using the commands M11Px / M10Px (where x is the Output# configured as the laser trigger) which were specially introduced into Mach3 for laser control. These commands are motion linked to prevent unwanted laser burns (at the start and finish of laser lines) as are created by the delays introduced from the standard M3 / M4 / M5 / M7 / M8 / M9  commands.

Tweakie.
PEACE
Re: Using mach 3 to control a laser and need to disable it whentraveling
« Reply #3 on: July 11, 2020, 12:14:13 PM »
Thanks TPS, that did the trick. I've been using it for a week now with no issues.  :D

you can do this with a few lines in macropump macro. make sure it is enabled in General config, and you remove Output3
in spindle tab.

Code: [Select]
'turn output ON
If GetDro(2) < -0.01 Then
ActivateSignal(OUTPUT3)
End If

'turn output OFF
If GetDro(2) >= 0.0 Then
DeactivateSignal(OUTPUT3)
End If