From 831e1616dfb7c526756e22742232802bf9dcca47 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Fri, 30 Dec 2022 12:02:38 +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 --- .../HongXiangConveyorDeviceDriver.java | 15 +++++++-------- .../OvenGantryManipulatorDeviceDriver.java | 4 +++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java index 9264dcb5a..06adfb14a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java @@ -40,7 +40,7 @@ import java.util.*; @Slf4j @Data @RequiredArgsConstructor -public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver , DeviceStageMonitor { +public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor { protected ItemProtocol itemProtocol = new ItemProtocol(this); @Autowired DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class); @@ -173,11 +173,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple //无报警 } else { - if(move ==0 && last_move ==1){ + if (move == 0 && last_move == 1) { requireSucess = false; } - if(finish == 1 && last_finish == 0 && !requireSucess ){ + if (finish == 1 && last_finish == 0 && !requireSucess) { //烘箱完成反馈LMS apply_finish(); } @@ -206,14 +206,13 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple } - protected void thingToNothing() { this.setRequireSucess(false); } public void writing(int command) { String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() - + "." +ItemProtocol.item_to_command; + + "." + ItemProtocol.item_to_command; String opcservcerid = this.getDevice().getOpc_server_id(); Server server = ReadUtil.getServer(opcservcerid); Map itemMap = new HashMap(); @@ -224,7 +223,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple //将扩展表中的字符串数据转换成集合 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); @@ -245,7 +244,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple Server server = ReadUtil.getServer(opcservcerid); Map itemMap = new HashMap(); - itemMap.put(to_param, value); + itemMap.put(to_param, Integer.parseInt(value)); // itemMap.put(to_param, Integer.parseInt(value)); ReadUtil.write(itemMap, server); } @@ -324,7 +323,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple return false; } else { this.instruction_apply_time = date; - ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest = new ApplyLabelingAndBindingRequest(); + ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest = new ApplyLabelingAndBindingRequest(); JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0); String start_point_code = null; if (!ObjectUtil.isEmpty(device_json)) { 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 92c0cc354..4a06a495b 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 @@ -332,7 +332,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i notCreateTaskMessage = ""; feedMessage = ""; } else { - if (!requireSucess) { + if (mode == 2) { + //if (!requireSucess) { String remark = ""; if (mode != 2) { remark = remark + "mode不为2,"; @@ -344,6 +345,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i remark = remark + "task不为0,"; } this.setNotCreateTaskMessage(remark); + //} } }