From b7e0039880d9f6e71230dbf9c13538de4f8135b8 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 10 六月 2023 19:23:26 +0800
Subject: [PATCH] 输送线条码读取bug、出入库模式信号、链条控制信号
---
src/main/java/com/zy/core/thread/LiftThread.java | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/LiftThread.java b/src/main/java/com/zy/core/thread/LiftThread.java
index 1da2b39..0b39f99 100644
--- a/src/main/java/com/zy/core/thread/LiftThread.java
+++ b/src/main/java/com/zy/core/thread/LiftThread.java
@@ -417,7 +417,7 @@
/**
* 鑾峰彇鎻愬崌鏈鸿В閿佸懡浠�
*/
- private LiftCommand getUnlockCommand(Short liftNo) {
+ public LiftCommand getUnlockCommand(Short liftNo) {
LiftCommand command = new LiftCommand();
command.setRun((short) 0);
command.setLiftNo(liftNo);
@@ -428,7 +428,7 @@
/**
* 鑾峰彇澶嶄綅鍛戒护
*/
- private LiftCommand getResetCommand() {
+ public LiftCommand getResetCommand() {
LiftCommand command = new LiftCommand();
command.setRun((short) 0);
command.setLiftLock(false);
@@ -438,7 +438,7 @@
/**
* 鑾峰彇鎻愬崌鏈轰笂鍗囦笅闄嶅懡浠�
*/
- private LiftCommand getLiftUpDownCommand(Short lev) {
+ public LiftCommand getLiftUpDownCommand(Short lev) {
LiftCommand command = new LiftCommand();
command.setRun((short) 1);//鍗囬檷
command.setDistPosition(lev);
@@ -446,15 +446,40 @@
}
/**
+ * 鑾峰彇鎻愬崌鏈轰笂鍗囦笅闄嶅懡浠�
+ */
+ public LiftCommand getLiftUpDownCommand(Short liftNo, Short taskNo, Short lev) {
+ LiftCommand command = new LiftCommand();
+ command.setRun((short) 1);//鍗囬檷
+ command.setLiftNo(liftNo);//鎻愬崌鏈哄彿
+ command.setTaskNo(taskNo);//浠诲姟鍙�
+ command.setDistPosition(lev);//鐩爣妤煎眰1灞�
+ command.setLiftLock(true);//閿佸畾鎻愬崌鏈�
+ return command;
+ }
+
+ /**
* 鑾峰彇鎻愬崌鏈鸿浆鍔ㄥ懡浠わ紝direction锛�1=銆嬫湁璐ф杞紝2=銆嬫湁璐у弽杞�
*/
- private LiftCommand getLiftTurnCommand(Integer direction) {
+ public LiftCommand getLiftTurnCommand(Integer direction) {
LiftCommand command = new LiftCommand();
command.setRun(direction == 1 ? (short) 6 : (short) 3);
return command;
}
/**
+ * 鑾峰彇鎻愬崌鏈鸿浆鍔ㄥ懡浠わ紝direction锛�1=銆嬫湁璐ф杞紝2=銆嬫湁璐у弽杞�
+ */
+ public LiftCommand getLiftTurnCommand(Short liftNo, Short taskNo, Integer direction) {
+ LiftCommand command = new LiftCommand();
+ command.setRun(direction == 1 ? (short) 6 : (short) 3);
+ command.setLiftNo(liftNo);//鎻愬崌鏈哄彿
+ command.setTaskNo(taskNo);//浠诲姟鍙�
+ command.setLiftLock(true);//閿佸畾鎻愬崌鏈�
+ return command;
+ }
+
+ /**
* 鍒濆鍖栨彁鍗囨満
*/
private void initLift() {
--
Gitblit v1.9.1