/// <summary> /// /// </summary> /// <param name="plc"></param> /// <param name="oper"></param> public F_ExcTask(F_PLCLine plc, EnumOper oper, string startSite, string endSite) { _plc = plc; _operType = oper; _startSite = startSite; _endSite = endSite; }
/// <summary> /// /// </summary> /// <param name="plc"></param> /// <param name="oper"></param> public F_ExcTask(F_PLCLine plc, EnumOper oper, string startSite, string endSite) { _plc = plc; _operType = oper; _startSite = startSite; _endSite = endSite; _objID = this.GetHashCode(); }
/// <summary> /// /// </summary> /// <param name="plc"></param> /// <param name="oper"></param> public F_ExcTask(F_PLCLine plc, EnumOper oper, string startSite, string endSite) { _plc = plc; _operType = oper; _startSite = startSite; _endSite = endSite; _objID = this.GetHashCode();// int.Parse(DateTime.Now.ToString("yyyyMMddHHmmss", System.Globalization.DateTimeFormatInfo.InvariantInfo)); }
/// <summary> /// 检查线边辊台PLC连接状态 /// </summary> public void CheckPlcStatus() { while (true) { Thread.Sleep(5000); List <DeviceBackImf> devsList = WcfMainHelper.GetDevList(); foreach (var dev in devsList) { if (dev.DevType == "WK_PLC" && !dev.IsAlive) { F_PLCLine plc = new F_PLCLine(dev.DevId); plc.SendOrdr(0, 0); } } } }