by Battwell » Fri Sep 21, 2018 9:57 am
im using this code- works fine- if not running a program
//// STOP button////
bool stopled=AS3.GetLED(232); // stop led on?
//exec.AddStatusmessage (""+mpgled) ; //changed on screen check
if (stopled)
{
exec.SetModbusregister((57),(ushort)1);
}
else
{
exec.SetModbusregister((57),(ushort)0);
}
if(exec.GetModbusregister(18,out button)&& button==0) //mpg
{
exec.Callbutton(130); //mpg multi
exec.SetModbusregister((57),(ushort)1);
exec.SetModbusregister((56),(ushort)0);
}
//// FEEDHOLD button////
bool holdled=AS3.GetLED(217); // led on?
//exec.AddStatusmessage (""+mpgled) ; //changed on screen check
if (holdled)
{
exec.SetModbusregister((58),(ushort)1);
}
else
{
exec.SetModbusregister((58),(ushort)0);
}
if(exec.GetModbusregister(19,out button)&& button==0) //
{
exec.Callbutton(522); //
exec.SetModbusregister((58),(ushort)1);
Thread.Sleep(300);
//exec.SetModbusregister((56),(ushort)0);
}
Thread.Sleep(300);