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) {