I made 2 buttons to turn on the additional equipment of the machine - a vacuum cleaner and a vacuum pump (the output turns on a 1A relay, and the relay turns on a high power magnetic starter). They work fine - I can turn the vacuum on and off, but only until I start running the gcode. What do I need to do to get my buttons to work during milling, just like the blow off or coolant buttons?
My button macro:
- Code: Select all
bool buttonstate = AS3.Getbuttonstate(20501);
if (!buttonstate)
{
AS3.Switchbutton(true,20501);
exec.Setoutpin(2, 16);
}
else
{
AS3.Switchbutton(false,20501);
exec.Clroutpin(2, 16);
}