From 96f53ef7ef9eb151c2bbfa2042b8ffcb2e9a3ee0 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Mon, 28 Nov 2022 09:50:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OvenGantryManipulatorDeviceDriver.java | 8 ++--- .../SlitTwoManipulatorDeviceDriver.java | 34 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java index 7bb9a1955..c6db64740 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java @@ -316,8 +316,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i instructionService.update(instruction); int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code()); int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code()); - writing("to_onset", String.valueOf(start_addrIndex)); - writing("to_target", String.valueOf(next_addrIndex)); + writing("to_onset", String.valueOf(start_addrIndex + 1)); + writing("to_target", String.valueOf(next_addrIndex + 1)); writing("to_task", instruction.getInstruction_code()); writing("to_command", "1"); this.setRequireSucess(true); @@ -373,8 +373,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i //根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置 int start_addrIndex = getDeviceCodeList.indexOf(start_device_code); int next_addrIndex = putDeviceCodeList.indexOf(next_device_code); - writing("to_onset", String.valueOf(start_addrIndex)); - writing("to_target", String.valueOf(next_addrIndex)); + writing("to_onset", String.valueOf(start_addrIndex + 1)); + writing("to_target", String.valueOf(next_addrIndex + 1)); writing("to_task", instdto.getInstruction_code()); writing("to_command", "1"); this.setRequireSucess(true); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index eb9efd9af..92cff3cc8 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -341,21 +341,21 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl log.debug("设备运转模式:等待工作"); return; case 2: - //前工位申请任务 取空放空 - if (move1 == 0 && action1 == 0 && !requireHeadSucess) { - instruction_require(); + //后工位申请任务 取空放空 + if (move2 == 0 && action2 == 0 && task2 == 0 && !requireHeadSucess) { + instruction_require2(); logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move1:" + move1 + ",action1:" + action1 + ",move2:" + move2 + ",task1:" + task1 + ",requireHeadSucess:" + requireHeadSucess); } - //后工位申请任务 取满放满 - if (move2 == 0 && action2 == 0 && task2 == 0 && move1 == 0 && task1 > 0 && !requireBackSucess) { - instruction_require2(); + //前工位申请任务 取满放满 + if (move1 == 0 && action1 == 0 && task1 == 0 && move2 == 0 && task2 > 0 && !requireBackSucess) { + instruction_require(); logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess); } break; case 3: - //后工位申请任务 取满放满 - if (task1 > 0 && move1 == 1 && action1 == 1 && move2 == 0 && action2 == 0 && !requireBackSucess) { - instruction_require2(); + //前工位申请任务 取满放满 + if (task2 > 0 && move2 == 1 && action2 == 1 && move1 == 0 && action1 == 0 && !requireBackSucess) { + instruction_require(); logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess); } } @@ -397,8 +397,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl instructionService.update(instruction); int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code()); int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code()); - this.writing("to_onset1", String.valueOf(start_addrIndex)); - this.writing("to_target1", String.valueOf(next_addrIndex)); + this.writing("to_onset1", String.valueOf(start_addrIndex + 1)); + this.writing("to_target1", String.valueOf(next_addrIndex + 1)); this.writing("to_task1", instruction.getInstruction_code()); this.writing("to_command1", "1"); requireHeadSucess = true; @@ -457,8 +457,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中 int start_addrIndex = getDeviceCodeList.indexOf(start_device_code); int next_addrIndex = putDeviceCodeList.indexOf(next_device_code); - this.writing("to_onset1", String.valueOf(start_addrIndex)); - this.writing("to_target1", String.valueOf(next_addrIndex)); + this.writing("to_onset1", String.valueOf(start_addrIndex + 1)); + this.writing("to_target1", String.valueOf(next_addrIndex + 1)); this.writing("to_task1", instdto.getInstruction_code()); this.writing("to_command1", "1"); requireHeadSucess = true; @@ -493,8 +493,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl instructionService.update(instruction); int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code()); int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code()); - this.writing("to_onset2", String.valueOf(start_addrIndex)); - this.writing("to_target2", String.valueOf(next_addrIndex)); + this.writing("to_onset2", String.valueOf(start_addrIndex + 1)); + this.writing("to_target2", String.valueOf(next_addrIndex + 1)); this.writing("to_task2", instruction.getInstruction_code()); this.writing("to_command2", "1"); requireBackSucess = true; @@ -552,8 +552,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中 int start_addrIndex = getDeviceCodeList.indexOf(start_device_code); int next_addrIndex = putDeviceCodeList.indexOf(next_device_code); - this.writing("to_onset2", String.valueOf(start_addrIndex)); - this.writing("to_target2", String.valueOf(next_addrIndex)); + this.writing("to_onset2", String.valueOf(start_addrIndex + 1)); + this.writing("to_target2", String.valueOf(next_addrIndex + 1)); this.writing("to_task2", instdto.getInstruction_code()); this.writing("to_command2", "1"); requireBackSucess = true;