From 81ac3e075484e2594d14aefa5848e9dbd2d87c1e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 14 八月 2020 10:25:07 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/DevpThread.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/DevpThread.java b/src/main/java/com/zy/core/thread/DevpThread.java
index 6679caf..f7e1035 100644
--- a/src/main/java/com/zy/core/thread/DevpThread.java
+++ b/src/main/java/com/zy/core/thread/DevpThread.java
@@ -75,7 +75,7 @@
             result = true;
             log.info("杈撻�佺嚎plc杩炴帴鎴愬姛 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
         } else {
-            log.info("杈撻�佺嚎plc杩炴帴澶辫触锛侊紒锛� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
+            log.error("杈撻�佺嚎plc杩炴帴澶辫触锛侊紒锛� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
         }
         siemensS7Net.ConnectClose();
         return result;
@@ -133,7 +133,7 @@
 
     @Override
     public void close() {
-
+        siemensS7Net.ConnectClose();
     }
 
     public static void main(String[] args) {
@@ -143,10 +143,11 @@
         devpThread.read();
         // 鍐�
         StaProtocol staProtocol = devpThread.getStation().get(1);
-        staProtocol.setWorkNo((short) 9999);
-        staProtocol.setStaNo((short) 100);
-        staProtocol.setAutoing(false);
-        staProtocol.setEmptyMk(false);
+        staProtocol.setWorkNo((short) 888);
+        staProtocol.setStaNo((short) 1001);
+        staProtocol.setAutoing(true);
+        staProtocol.setEmptyMk(true);
+        staProtocol.setInEnable(true);
         devpThread.write(staProtocol);
         System.out.println("----------------------------------------");
         // 璇�

--
Gitblit v1.9.1