From b17e2a3f2bd85d18630cb447d65368e430c887f8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期四, 24 九月 2020 10:08:01 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/DevpThread.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/DevpThread.java b/src/main/java/com/zy/core/thread/DevpThread.java
index 9ed86e6..84e83ec 100644
--- a/src/main/java/com/zy/core/thread/DevpThread.java
+++ b/src/main/java/com/zy/core/thread/DevpThread.java
@@ -138,6 +138,16 @@
}
}
}
+ // 鍙拌溅浣嶇疆
+ OperateResultExOne<Short> result2 = siemensS7Net.ReadInt16("DB100.48");
+ if (result2.IsSuccess) {
+ StaProtocol staProtocol = station.get(8);
+ staProtocol.setPosition(result2.Content);
+ } else {
+ OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆�8鍙峰彴杞﹁幏鍙栧疄鏃朵綅缃け璐ワ紒锛侊紒", DateUtils.convert(new Date())));
+ log.error("8鍙峰彴杞﹁幏鍙栧疄鏃朵綅缃け璐ワ紒锛侊紒");
+ }
+
if (result.IsSuccess && result1.IsSuccess) {
OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId()));
@@ -172,7 +182,7 @@
return;
}
OperateResult write = siemensS7Net.Write("DB100." + (staProtocol.getSiteId() - 1) * 2, staProtocol.getWorkNo()); // 宸ヤ綔鍙�
- Thread.sleep(100);
+ Thread.sleep(300);
OperateResult write1 = siemensS7Net.Write("DB100." + ((staProtocol.getSiteId() - 1) * 2 + 20), staProtocol.getStaNo()); // 鐩爣绔�
// boolean[] status = new boolean[8];
// status[0] = staProtocol.isAutoing();
--
Gitblit v1.9.1