From b82122366e2de82bbd585ab97e8fbef62ae782f8 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Mon, 22 Sep 2025 17:02:04 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E9=BB=98=E8=AE=A4=E6=9C=89=E8=B4=A7?= =?UTF-8?q?=E5=8F=8A=E5=AD=90=E5=8D=B7=E4=B8=8B=E7=BA=BF=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standard_inspect_site/ItemProtocol.java | 14 ++++++++-- ...TwoManipulatorManipulatorDeviceDriver.java | 26 +++++++++---------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/standard_inspect_site/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/standard_inspect_site/ItemProtocol.java index c52bbaf23..eeba50e1b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/standard_inspect_site/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/standard_inspect_site/ItemProtocol.java @@ -71,7 +71,7 @@ public class ItemProtocol { } /** - *是否有货 + * 是否有货 */ public int hasGoods(int move) { return move; @@ -80,6 +80,17 @@ public class ItemProtocol { Boolean isonline; public int getOpcIntegerValue(String protocol) { + if (protocol.equals(item_move)) { + Integer value = this.driver.getIntegeregerValue(protocol); + if (value == null) { + // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); + setIsonline(false); + } else { + setIsonline(true); + return value; + } + return 1; + } Integer value = this.driver.getIntegeregerValue(protocol); if (value == null) { // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); @@ -89,7 +100,6 @@ public class ItemProtocol { return value; } return 0; - } public static List getReadableItemDtos() { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java index 0f558c905..7bf4a2809 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java @@ -236,7 +236,6 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi } } else { String remark = ""; - ; if (mode != 2) { remark = "universal_remark2"; } @@ -334,24 +333,23 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi } private void updateInstructionStatus() { + //更改指令状态 + if (task > 0) { + Instruction inst = checkInst(); + if (inst != null) { + if (StrUtil.equals(inst.getInstruction_status(), "0")) { + inst.setInstruction_status(CommonFinalParam.ONE); + inst.setExecute_device_code(this.device_code); + instructionService.update(inst); + logServer.deviceExecuteLog(this.device_code, "", "", "修改指令状态为执行中"); + } + } + } Date date = new Date(); if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) { log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out); - } else { this.instruction_update_time = date; - //更改指令状态 - if (task > 0) { - Instruction inst = checkInst(); - if (inst != null) { - if (StrUtil.equals(inst.getInstruction_status(), "0")) { - inst.setInstruction_status(CommonFinalParam.ONE); - inst.setExecute_device_code(this.device_code); - instructionService.update(inst); - } - } - } - //放货完成 if (action == 4 && move == 0) { if (inst != null) {