AdvancedHMI Software

General Category => Support Questions => Topic started by: Ivy on November 12, 2015, 09:21:17 AM

Title: Setting timeout for EthernetIPforSLCMicroCom driver
Post by: Ivy 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 :
 
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
Title: Re: Setting timeout for EthernetIPforSLCMicroCom driver
Post by: Archie on November 12, 2015, 04:48:07 PM
Unfortunately this is not possibly with the current version. The next version will have a property to allow changing of the timeout value.