Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: giordano on May 27, 2009, 06:24:38 PM

Title: Led Set Variable Position
Post by: giordano on May 27, 2009, 06:24:38 PM
I would like to add a button led to Set Variable Position. The LED should turn on by pressing the button and turn off by pressing the button Goto Variable Position. Can you help? Thanks in advance. Giordano
Title: Re: Led Set Variable Position
Post by: ftomazz on June 01, 2009, 02:33:19 AM
It should be several ways to do that, my option would be:

Make your own led number (your specific led).
Make also the button that turns on the led and the button that turns off the led editable in mach3 as a script.
Edit the script, and for each button put the led on and off (after or before the script to do set variable position and goto variable position)

Filipe
Title: Re: Led Set Variable Position
Post by: Bill_O on June 01, 2009, 08:18:36 AM
Try something like this.

If (GetUserLED (1135) = 1) Then
SetUserLED (1135, 0)
Else
SetUserLED (1134 , 1)
End If   

Bill