From 4c30a5d4e4d35b3d78355f0c2d8edf90b31a1b23 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 23 九月 2020 14:55:29 +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..55be879 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<Integer> result2 = siemensS7Net.ReadInt32("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