/// <summary> /// Connects to a PLC using the given plc connection string. /// </summary> /// <param name="url"> plc connection string. </param> /// <returns> PlcConnection object. </returns> public virtual IPlcConnection GetConnection(string url) { IPlcDriver driver = GetDriver(url); IPlcConnection connection = (IPlcConnection)driver.ConnectAsync(url); connection.ConnectAsync(); return(connection); }
private static void checkAlarm(IPlcDriver c, String variable) { bool presenza = (bool)c.readBool("RULLI_CENTRO_TAGLI.RD_Anticipo_Pz_Da_Hundegger"); if (presenza) { throw new Exception(variable); } }
public PLC(IPlcDriver driver) { this.driver = driver; }