From 713243190050169695c580b385b34b585ed05402 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Thu, 22 Dec 2022 18:27:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=90=8E=E5=B7=A5=E4=BD=8D=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SlitTwoManipulatorDeviceDriver.java | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) 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 4647d2fa6..eec4c69d1 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 @@ -251,7 +251,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl // } // } ; - // this.setNow_steps_type2(1); + // this.setNow_steps_type2(1); } } } @@ -318,15 +318,15 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } //单任务/或双任务 后工位收到取货完成信号并反馈 - if (mode == 3 && action2 == 2 && move2 == 1 && task2 > 0){ - this.writing("to_command2","3"); - if (type == 2){ + if (mode == 3 && action2 == 2 && move2 == 1 && task2 > 0) { + this.writing("to_command2", "3"); + if (type == 2) { this.setNow_steps_type2(4); } - if (type == 3){ + if (type == 3) { this.setNow_steps_type3(4); } - }else { + } else { if (this.getNow_steps_type2() == 3 || this.getNow_steps_type3() == 3) { feedMessage = "请检查:mode == 3 && action2 == 2 && move2 == 1 && task2 > 0"; } @@ -347,15 +347,15 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } //单任务/双任务 前工位取货完成并反馈 - if (mode == 3 && action1 == 2 && move1 == 1 && task1 > 0){ - this.writing("to_command1","3"); - if (type == 1){ + if (mode == 3 && action1 == 2 && move1 == 1 && task1 > 0) { + this.writing("to_command1", "3"); + if (type == 1) { this.setNow_steps_type1(4); } - if (type == 3){ + if (type == 3) { this.setNow_steps_type3(6); } - }else { + } else { if (this.getNow_steps_type1() == 3 || this.getNow_steps_type3() == 5) { feedMessage = "请检查:mode == 3 && action1 == 2 && move1 == 1 && task1 > 0"; } @@ -478,7 +478,6 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } - //双工位 任务完成 前工位反馈4 if (mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && task2 > 0 && type == 3) { //inst_message @@ -510,7 +509,6 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } - } catch (Exception var17) { return; } @@ -956,12 +954,12 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl Device nextDevice2 = deviceAppservice.findDeviceByCode(next_device_code2); String start_addr2 = startDevice2.getExtraValue().get("address").toString(); String next_addr2 = nextDevice2.getExtraValue().get("address").toString(); - this.writing("to_onset1", start_addr); - this.writing("to_target1", next_addr); + this.writing("to_onset1", start_addr2); + this.writing("to_target1", next_addr2); this.writing("to_task1", dto.getInstruction_code()); this.writing("to_command1", "1"); - this.writing("to_onset2", start_addr2); - this.writing("to_target2", next_addr2); + this.writing("to_onset2", start_addr); + this.writing("to_target2", next_addr); this.writing("to_task2", dto.getInstruction_code()); this.writing("to_command2", "1"); this.writing("to_type", "3"); @@ -1060,7 +1058,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //将扩展表中的字符串数组数据转换成集合 public List getExtraDeviceCodes(String extraName) { String extraValue = (String) this.getDevice().getExtraValue().get(extraName); - if (StrUtil.isEmpty(extraValue)){ + if (StrUtil.isEmpty(extraValue)) { return new ArrayList<>(); } String devicesString = extraValue.substring(1, extraValue.length() - 1); @@ -1073,14 +1071,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl return devicesList; } - public List sortTask(List taskDtos){ + public List sortTask(List taskDtos) { Collections.sort(taskDtos, new Comparator() { @Override public int compare(TaskDto t1, TaskDto t2) { //优先级从大到小 int i = t2.getPriority().compareTo(t1.getPriority()); //如果优先级相等 - if (i == 0){ + if (i == 0) { //时间从早到晚 i = t1.getCreate_time().compareTo(t2.getCreate_time()); }