| | |
| | | private static List<WcsPosition> listPlcStation; |
| | | |
| | | private static List<PLCUtil> listPlcUtil = new List<PLCUtil>(); |
| | | //对外公布连接状态 |
| | | public static List<PLCUtil> listPlcConn |
| | | { |
| | | get { return listPlcUtil; } |
| | | } |
| | | private static CancellationTokenSource cts;//取消线程标识 |
| | | |
| | | public static event EventHandler DeviceValueChangeEvent; |
| | |
| | | } |
| | | try |
| | | { |
| | | var modPlcUtil = listPlcUtil.FirstOrDefault(s => s.PlcId == modPlc.Id); |
| | | var modPlcUtil = listPlcUtil.FirstOrDefault(s => s != null && s.PlcId == modPlc.Id); |
| | | if (modPlcUtil == null) |
| | | { |
| | | modPlcUtil = new PLCUtil(modPlc); |