From 087a7abb6cfd669c7253c823d83e05f6eba78753 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 16 六月 2023 08:56:51 +0800
Subject: [PATCH] 提升机命令优化
---
src/main/java/com/zy/core/thread/LiftThread.java | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/LiftThread.java b/src/main/java/com/zy/core/thread/LiftThread.java
index 70151e9..d1b2299 100644
--- a/src/main/java/com/zy/core/thread/LiftThread.java
+++ b/src/main/java/com/zy/core/thread/LiftThread.java
@@ -275,6 +275,14 @@
array[29] = command.getLiftLockShortValue();
}
+ if (array[2] == 0) {
+ // 寮�濮嬩换鍔�
+ short[] tmp = new short[2];
+ tmp[0] = array[0];
+ tmp[1] = array[1];
+ array = tmp;
+ }
+
OperateResult result = modbusTcpNet.Write("41088", array);;
if (result != null && result.IsSuccess) {
News.info("鎻愬崌鏈哄懡浠や笅鍙慬id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command));
@@ -458,11 +466,11 @@
command.setRun((short) 1);//鍗囬檷
Short position = LiftLevType.getRealLev(lev);//鑾峰彇鎻愬崌鏈哄疄闄呮ゼ灞傛暟鍊�
command.setDistPosition(position);
- command.setSpeed((short) 200);
- command.setHeight2((short) 180);
- command.setHeight3((short) 1645);
- command.setHeight4((short) (2 * 1645));
- command.setHeight5((short) (3 * 1645));
+// command.setSpeed((short) 200);
+// command.setHeight2((short) 180);
+// command.setHeight3((short) 1645);
+// command.setHeight4((short) (2 * 1645));
+// command.setHeight5((short) (3 * 1645));
return command;
}
@@ -476,11 +484,11 @@
command.setLiftNo(liftNo);//鎻愬崌鏈哄彿
command.setTaskNo(taskNo);//浠诲姟鍙�
command.setDistPosition(position);//鐩爣妤煎眰
- command.setSpeed((short) 200);
- command.setHeight2((short) 180);
- command.setHeight3((short) 1645);
- command.setHeight4((short) 3290);
- command.setHeight5((short) 4945);
+// command.setSpeed((short) 200);
+// command.setHeight2((short) 180);
+// command.setHeight3((short) 1645);
+// command.setHeight4((short) 3290);
+// command.setHeight5((short) 4945);
return command;
}
--
Gitblit v1.9.1