fix: 协议

This commit is contained in:
2026-10-06 14:34:10 +08:00
parent 30784f0070
commit db802c6467
2 changed files with 39 additions and 20 deletions

View File

@@ -89,8 +89,10 @@ public class BoxPackingInManipulatorDeviceDriver extends AbstractOpcDeviceDriver
/**
* 行走列
*/
private int walk_y = 0;
private int lastWalk_y = 0;
private int roll_num = 0;
private int lastRoll_num = 0;
private int put_point = 0;
private int lastPut_point = 0;
/**
* 下发命令
*/
@@ -99,6 +101,14 @@ public class BoxPackingInManipulatorDeviceDriver extends AbstractOpcDeviceDriver
/**
* 下发起始站
*/
private int to_box_no = 0;
private int lastTo_box_no = 0;
private int to_len = 0;
private int lastTo_len = 0;
private int to_size = 0;
private int lastTo_size = 0;
private int to_height_level = 0;
private int lastTo_height_level = 0;
private int to_onset = 0;
private int lastTo_onset = 0;
/**
@@ -342,9 +352,12 @@ public class BoxPackingInManipulatorDeviceDriver extends AbstractOpcDeviceDriver
signals.put("to_target", nextAddress);
signals.put("to_task", instruction.getInstruction_code());
if (ObjectUtil.isNotEmpty(extJson)) {
signals.put("to_barcode", extJson.getString("containerName"));
signals.put("to_last_one", extJson.getString("isLast"));
signals.put("to_barcode", extJson.getString("barcode"));
signals.put("to_last_one", extJson.getString("lastOne"));
signals.put("to_max_no", extJson.getString("maxNo"));
signals.put("to_height_level", extJson.getString("heightLevel"));
signals.put("to_len", extJson.getString("len"));
signals.put("to_size", extJson.getString("tubeSize"));
}
writing(signals);
}

View File

@@ -7,22 +7,28 @@ import java.util.List;
import java.util.ArrayList;
public enum ItemProtocol implements DeviceDriverBaseReader.KeyProvider {
HEARTBEAT("heartbeat", "心跳", "DB600.B1"),
MODE("mode", "工作模式", "DB600.B2"),
MOVE("move", "光电信号", "DB600.B3"),
ACTION("action", "动作信号", "DB600.B4"),
ERROR("error", "报警信号", "DB600.B5"),
TASK("task", "任务号", "DB600.W6"),
X("x", "x坐标", "DB600.D8"),
Y("y", "y坐标", "DB600.D12"),
WALK_Y("walk_y", "行走列", "DB600.W16"),
TO_COMMAND("to_command", "下发命令", "DB601.W0"),
TO_ONSET("to_onset", "下发起始站", "DB601.W2"),
TO_TARGET("to_target", "下发目标站", "DB601.W4"),
TO_TASK("to_task", "下发任务号", "DB601.D8"),
TO_MAX_NO("to_max_no", "下发最大子卷数", "DB602.D9"),
TO_LAST_ONE("to_last_one", "下发是否最后一卷", "DB602.D9"),
TO_BARCODE("to_barcode", "下发木箱条码", "DB602.D9"),
HEARTBEAT("heartbeat", "心跳", "41326"),
MODE("mode", "工作模式", "41327"),
MOVE("move", "光电信号", "41238"),
ACTION("action", "动作信号", "41239"),
ERROR("error", "报警信号", "41331"),
TASK("task", "任务号", "41332"),
ROLL_NUM("roll_num", "当前子卷数", "41338"),
PUT_POINT("put_point", "木箱内放置位置", "41339"),
X("x", "x坐标", "41334"),
Y("y", "y坐标", "41336"),
WALK_Y("walk_y", "行走列", "41330"),
TO_COMMAND("to_command", "下发命令", "41226"),
TO_ONSET("to_onset", "下发起始站", "41227"),
TO_TARGET("to_target", "下发目标站", "41228"),
TO_TASK("to_task", "下发任务号", "41229"),
TO_MAX_NO("to_max_no", "下发最大子卷数", "41231"),
TO_BOX_NO("to_box_no", "下发剩余卷数", "41232"),
TO_LAST_ONE("to_last_one", "下发是否最后一卷", "41233"),
TO_BARCODE("to_barcode", "下发子卷条码", "41236"),
TO_LEN("to_len", "管芯长度", "41234"),
TO_HEIGHT_LEVEL("to_height_level", "高度等级", "41235"),
TO_SIZE("to_size", "管芯规格:尺寸 3/6", "41267"),
;