diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_weigh_conveyor/SiemensWeightConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_weigh_conveyor/SiemensWeightConveyorDeviceDriver.java index f2a2c1a17..39d8b67dd 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_weigh_conveyor/SiemensWeightConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_weigh_conveyor/SiemensWeightConveyorDeviceDriver.java @@ -194,7 +194,7 @@ public class SiemensWeightConveyorDeviceDriver extends AbstractOpcDeviceDriver i if (to_strap_times != last_to_strap_times) { logServer.deviceExecuteLog(this.device_code, "", "", "信号to_strap_times:" + last_to_strap_times + "->" + to_strap_times); } - if (weight == last_weight) { + if (weight != last_weight) { logServer.deviceExecuteLog(this.device_code, "", "", "信号weight:" + last_weight + "->" + weight); } if (to_length != last_to_length) { @@ -215,7 +215,7 @@ public class SiemensWeightConveyorDeviceDriver extends AbstractOpcDeviceDriver i if (to_task != last_to_task) { logServer.deviceExecuteLog(this.device_code, "", "", "信号to_task:" + last_to_task + "->" + to_task); } - /*if (mode != last_mode) { + if (mode != last_mode) { //Boolean flag = ObjectUtil.isEmpty(this.device.getExtraValue().get("special_flag")) ? false : Boolean.valueOf(this.device.getExtraValue().get("special_flag").toString()); //暂时这样写 后续通过配置判断 @@ -411,10 +411,7 @@ public class SiemensWeightConveyorDeviceDriver extends AbstractOpcDeviceDriver i } break; } - }*/ - } catch (Exception e) { - e.printStackTrace(); - logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + Arrays.toString(e.getStackTrace())); + } } last_mode = mode; last_move = move; @@ -429,6 +426,7 @@ public class SiemensWeightConveyorDeviceDriver extends AbstractOpcDeviceDriver i last_to_length = to_length; last_to_weight = to_weight; last_to_height = to_height; + last_weight = weight; } public void shipDeviceUpdate() {