wxw
2024-09-02 54da8a22c438e1495b9c5fbae75ca9d4b5ca7335
Admin.NET/WCS.Application/PLC/PLCTaskAction.cs
@@ -22,7 +22,11 @@
    private static List<PLCUtil> listPlcUtil = new List<PLCUtil>();
    private static CancellationTokenSource cts;//取消线程标识
    //对外公布连接状态
    public static List<PLCUtil> listPlcConn
    {
        get { return listPlcUtil; }
    }
    public static event EventHandler DeviceValueChangeEvent;
    static PLCTaskAction()
    {
@@ -84,7 +88,7 @@
                    }
                    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);