This commit is contained in:
2022-12-31 17:16:01 +08:00
parent 55976af93f
commit 9ea215c612

View File

@@ -15,6 +15,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
import org.nl.acs.instruction.service.InstructionService;
@@ -155,14 +156,20 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
currentC = this.itemProtocol.getItem_currentC();
if (mode != last_mode) {
this.setRequireSucess(false);
//this.setRequireSucess(false);
}
if (move != last_move) {
if (move == 0) {
thingToNothing();
}
}
if (error != last_error) {
if (finish != last_finish) {
if (finish == 1) {
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireSucess:" + requireSucess);
requireSucess = false;
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireSucess:" + requireSucess);
}
logServer.deviceExecuteLog(this.device_code, "", "", "信号move" + last_finish + "->" + finish);
}
@@ -174,10 +181,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
} else {
if (move == 0 && last_move == 1) {
requireSucess = false;
//requireSucess = false;
}
if (finish == 1 && last_finish == 0 && !requireSucess) {
if (finish == 1 && !requireSucess) {
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "开始烘箱完成反馈lms~");
//烘箱完成反馈LMS
apply_finish();
}
@@ -207,7 +215,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
protected void thingToNothing() {
this.setRequireSucess(false);
//this.setRequireSucess(false);
}
public void writing(int command) {
@@ -333,8 +341,13 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
}
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
applyLabelingAndBindingRequest.setType("3");
acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
requireSucess = true;
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
if (applyLabelingAndBindingResponse.getstatus() == 200) {
requireSucess = true;
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "烘箱完成反馈lms响应消息:" + String.valueOf(applyLabelingAndBindingResponse));
} else {
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "烘箱完成反馈lms响应消息:" + String.valueOf(applyLabelingAndBindingResponse));
}
return true;
}
}