From ba7d9c359f4ea496b874452563da475da451c0e4 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 29 十二月 2020 14:04:16 +0800
Subject: [PATCH] ##
---
src/main/java/com/zy/core/thread/MelsecDevpThread.java | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/MelsecDevpThread.java b/src/main/java/com/zy/core/thread/MelsecDevpThread.java
index 198a4de..9cb8a2f 100644
--- a/src/main/java/com/zy/core/thread/MelsecDevpThread.java
+++ b/src/main/java/com/zy/core/thread/MelsecDevpThread.java
@@ -72,7 +72,7 @@
}
// 蹇冭烦
- heartbeat();
+// heartbeat();
Thread.sleep(400);
} catch (Exception e) {
e.printStackTrace();
@@ -120,7 +120,7 @@
staProtocol.setStaNo(melsecMcNet.getByteTransform().TransInt16(result.Content, (i)*2+40)); // 鐩爣绔�
}
}
- Thread.sleep(500);
+ Thread.sleep(200);
OperateResultExOne<boolean[]> result1 = melsecMcNet.ReadBool("M800", (short) 64);
if (result1.IsSuccess) {
for (int i = 0; i < staNos.size(); i++) {
@@ -181,7 +181,7 @@
}
System.out.println();
OperateResult write = melsecMcNet.Write("D1" + Utils.zerofill(String.valueOf(staNos.indexOf(staProtocol.getSiteId())+1), 2), staProtocol.getWorkNo()); // 宸ヤ綔鍙�
- Thread.sleep(400);
+ Thread.sleep(200);
OperateResult write1 = melsecMcNet.Write("D1" + Utils.zerofill(String.valueOf(staNos.indexOf(staProtocol.getSiteId())+21), 2), staProtocol.getStaNo()); // 鐩爣绔�
if (!write.IsSuccess || !write1.IsSuccess) {
staProtocol = station.get(staProtocol.getSiteId());
@@ -191,7 +191,6 @@
OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎绔欑偣鏁版嵁澶辫触銆傝緭閫佺嚎plc缂栧彿={1}锛岀珯鐐规暟鎹�={2}", slave.getId(), JSON.toJSON(staProtocol)));
log.error("鍐欏叆杈撻�佺嚎绔欑偣鏁版嵁澶辫触銆傝緭閫佺嚎plc缂栧彿={}锛岀珯鐐规暟鎹�={}", slave.getId(), JSON.toJSON(staProtocol));
} else {
- log.error("-------------------------------------------绗笁姝ャ�乕绔欑偣鍙凤細{}][宸ヤ綔鍙凤細{}]==>> 涓嬪彂杈撻�佺嚎鍚姩淇″彿鎴愬姛锛侊紒",staProtocol.getSiteId(),staProtocol.getWorkNo());
OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆� 杈撻�佺嚎鍛戒护涓嬪彂 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(staProtocol)));
log.info("杈撻�佺嚎鍛戒护涓嬪彂 [id:{}] >>>>> 鍛戒护涓嬪彂锛� {}", slave.getId(), JSON.toJSON(staProtocol));
}
--
Gitblit v1.9.1