Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: plasmashine on April 19, 2018, 03:05:44 AM

Title: Macro or brain???? Help needed
Post by: plasmashine on April 19, 2018, 03:05:44 AM
I have built a plasma table, and I'm trying to add some additional functions.

I have installed a visible laser operated by a spare output.

I wish to write a script or brain ( not sure which is best) that will change M03 output from output 1 to output 6 when an on screen button is toggled.

I have never written any scripts for my cnc but I have programmed in VB.

Thanks
Title: Re: Macro or brain???? Help needed
Post by: TPS on April 20, 2018, 03:26:54 AM
if you want to toogle an Output by button, vbscript would be the choice.
for example

Code: [Select]
If IsActive(OUTPUT1) Then
  DeactivateSignal(OUTPUT1)
Else
  ActivateSignal(OUTPUT1)
End If