1
Support Questions / Setting timeout for EthernetIPforSLCMicroCom driver
« on: November 12, 2015, 09:21:17 AM »
Hi !
I'm using c# language and I would like to try to set some timeout for throwing an exception in case when for example someone unplug my ethernet cable to Allen-Bradley SLC505 PLC. Is it possible to do so in Adv HMI API ? How can I achieve that ?
For now I have this :
Thanks
Regards
I'm using c# language and I would like to try to set some timeout for throwing an exception in case when for example someone unplug my ethernet cable to Allen-Bradley SLC505 PLC. Is it possible to do so in Adv HMI API ? How can I achieve that ?
For now I have this :
Code: [Select]
using AdvancedHMIDrivers;
using MfgControl.AdvancedHMI.Drivers;
static EthernetIPforSLCMicroCom plc;
static void Main(string[] args)
{
plc = new EthernetIPforSLCMicroCom();
plc.IPAddress = "192.168.1.52";
string readValue;
try
{
readValue = plc.Read("N241:000/15");
Console.WriteLine(readValue);
}
catch (MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException exception)
{
Console.WriteLine(exception.Message);
}
}
Thanks
Regards