From 9cfdcce0c696caa562a2c0a0ee0f24c43459517b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 01 九月 2020 08:56:49 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/CrnThread.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/CrnThread.java b/src/main/java/com/zy/core/thread/CrnThread.java
index f2cf3b3..68c2a60 100644
--- a/src/main/java/com/zy/core/thread/CrnThread.java
+++ b/src/main/java/com/zy/core/thread/CrnThread.java
@@ -36,7 +36,7 @@
     private MelsecMcNet melsecMcNet;
     private CrnSlave slave;
     private CrnProtocol crnProtocol;
-    private boolean resetFlag = false;
+    private boolean resetFlag = true;
 
     public CrnThread(CrnSlave slave) {
         this.slave = slave;
@@ -164,7 +164,8 @@
                 }
 
             } else {
-                throw new CoolException("鍫嗗灈鏈簆lc鐘舵�佷俊鎭け璐�");
+                OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆憑1}鍫嗗灈鏈簆lc鐘舵�佷俊鎭け璐�",DateUtils.convert(new Date()), slave.getId()));
+                throw new CoolException(MessageFormat.format( "鍫嗗灈鏈簆lc鐘舵�佷俊鎭け璐� ===>> [id:{0}] [ip:{1}] [port:{2}]", slave.getId(), slave.getIp(), slave.getPort()));
             }
             /* 鏂规硶2 */
 //            crnProtocol.setMode(melsecMcNet.ReadInt16("D2231").Content);
@@ -270,7 +271,7 @@
 
     public CrnProtocol getCrnProtocol(){
         if (crnProtocol == null) {
-            readStatus();
+            throw new CoolException(slave.getId() + "鍙峰爢鍨涙満杩炴帴澶辫触");
         }
         return this.crnProtocol;
     }

--
Gitblit v1.9.1