|
|
@@ -98,7 +98,7 @@ public class Wok2ModbusTcpServer { |
|
|
|
*/ |
|
|
|
public static void ConnectPLC() |
|
|
|
{ |
|
|
|
ThreadManager.get().StartLong("炒锅PLC重连", false, new IThread() { |
|
|
|
ThreadManager.get().StartLong("炒锅2PLC重连", false, new IThread() { |
|
|
|
@Override |
|
|
|
public void Run() throws InterruptedException { |
|
|
|
while (!Wok2ModbusTcpServer.get().plcIsConnect){ |
|
|
@@ -115,7 +115,7 @@ public class Wok2ModbusTcpServer { |
|
|
|
MessageLog.ShowInfo("炒锅设备 " + ModbusCenter.wokAddress + " 连接成功"); |
|
|
|
Wok2ModbusTcpServer.get().plcIsConnect = true; |
|
|
|
Log.e("炒锅设备PLC", "炒锅设备PLC: 连接成功"); |
|
|
|
ThreadManager.get().Stop("炒锅设备重连"); |
|
|
|
ThreadManager.get().Stop("炒锅2PLC重连"); |
|
|
|
ModbusCenter.Listening(); |
|
|
|
init(); |
|
|
|
RecordManager.getInstance().addLogRecord("设备异常日志",2+"号炒锅-连接成功"); |
|
|
@@ -140,7 +140,7 @@ public class Wok2ModbusTcpServer { |
|
|
|
throw new RuntimeException(e); |
|
|
|
} |
|
|
|
} |
|
|
|
ThreadManager.get().Stop("炒锅PLC重连"); |
|
|
|
ThreadManager.get().Stop("炒锅2PLC重连"); |
|
|
|
}}); |
|
|
|
} |
|
|
|
|
|
|
|