LED for Analog Output?
Posted: Thu May 26, 2022 10:43 am
Is there a way to set an LED on the screenset to show the state of the Analog Output (VAR#1)?
I have my ATC with an Air Blow to clean the tool-holder taper. This is controlled by a relay and VAR #1, which is included in the M6 tool-change macro, plus a button on the screenset to turn on manually if required.
The button code is shown below...
// Air Blow On-Off
bool buttonstate = AS3.Getbuttonstate(20009);
if (!buttonstate)
{
AS3.Switchbutton(true,20009);
exec.Code("#1=32768"); // 5v ON
}
else
{
AS3.Switchbutton(false,20009);
exec.Code("#1=0"); // 0v OFF
}
I just need to add an LED to the status panel on the screenset, LED On when #1=32768 and LED Off when #1=0.
I have my ATC with an Air Blow to clean the tool-holder taper. This is controlled by a relay and VAR #1, which is included in the M6 tool-change macro, plus a button on the screenset to turn on manually if required.
The button code is shown below...
// Air Blow On-Off
bool buttonstate = AS3.Getbuttonstate(20009);
if (!buttonstate)
{
AS3.Switchbutton(true,20009);
exec.Code("#1=32768"); // 5v ON
}
else
{
AS3.Switchbutton(false,20009);
exec.Code("#1=0"); // 0v OFF
}
I just need to add an LED to the status panel on the screenset, LED On when #1=32768 and LED Off when #1=0.