更新
This commit is contained in:
@@ -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<String, Object> itemMap = new HashMap<String, Object>();
|
||||
@@ -224,7 +223,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
//将扩展表中的字符串数据转换成集合
|
||||
public List<String> 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<String, Object> itemMap = new HashMap<String, Object>();
|
||||
|
||||
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)) {
|
||||
|
||||
@@ -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);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user