营口更新
This commit is contained in:
@@ -391,6 +391,16 @@ public class StandardManipulatorStackingSiteDeviceDriver extends AbstractOpcDevi
|
||||
|
||||
Device startDevice = appService.findDeviceByCode(device_code);
|
||||
Device nextDevice = appService.findDeviceByCode(this.device_code);
|
||||
if (ObjectUtil.isNotEmpty(startDevice.getIslock())) {
|
||||
if (startDevice.getIslock().equals("true")) {
|
||||
throw new RuntimeException("该设备已被锁定");
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(nextDevice.getIslock())) {
|
||||
if (nextDevice.getIslock().equals("true")) {
|
||||
throw new RuntimeException("该设备已被锁定");
|
||||
}
|
||||
}
|
||||
startDevice.setIslock("true");
|
||||
nextDevice.setIslock("true");
|
||||
|
||||
@@ -625,6 +635,16 @@ public class StandardManipulatorStackingSiteDeviceDriver extends AbstractOpcDevi
|
||||
|
||||
Device startDevice = appService.findDeviceByCode(this.device_code);
|
||||
Device nextDevice = appService.findDeviceByCode(next_device_code);
|
||||
if (ObjectUtil.isNotEmpty(startDevice.getIslock())) {
|
||||
if (startDevice.getIslock().equals("true")) {
|
||||
throw new RuntimeException("起点设备已被锁定");
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(nextDevice.getIslock())) {
|
||||
if (nextDevice.getIslock().equals("true")) {
|
||||
throw new RuntimeException("终点设备已被锁定");
|
||||
}
|
||||
}
|
||||
startDevice.setIslock("true");
|
||||
nextDevice.setIslock("true");
|
||||
|
||||
@@ -1134,7 +1154,7 @@ public class StandardManipulatorStackingSiteDeviceDriver extends AbstractOpcDevi
|
||||
String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_to_task;
|
||||
String to_container_type = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_container_type;
|
||||
+ "." + ItemProtocol.item_to_container_type;
|
||||
String opcservcerid = this.getDevice().getOpc_server_id();
|
||||
Server server = ReadUtil.getServer(opcservcerid);
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
|
||||
@@ -281,7 +281,7 @@ public class StandardPhotoelectricInspectSiteDeviceDriver extends AbstractOpcDev
|
||||
String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_to_task;
|
||||
String to_container_type = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_container_type;
|
||||
+ "." + ItemProtocol.item_to_container_type;
|
||||
String opcservcerid = this.getDevice().getOpc_server_id();
|
||||
Server server = ReadUtil.getServer(opcservcerid);
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
|
||||
@@ -1905,13 +1905,13 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
//机械手码垛驱动-区分托盘类型
|
||||
if (device.getDeviceDriver() instanceof StandardManipulatorStackingSiteDeviceDriver) {
|
||||
standardManipulatorStackingSiteDeviceDriver = (StandardManipulatorStackingSiteDeviceDriver) device.getDeviceDriver();
|
||||
standardManipulatorStackingSiteDeviceDriver.writing(1, 7);
|
||||
if (standardManipulatorStackingSiteDeviceDriver.getMove() != 0
|
||||
&& standardManipulatorStackingSiteDeviceDriver.getError() == 0
|
||||
&& (standardManipulatorStackingSiteDeviceDriver.getAction() == 1 || standardManipulatorStackingSiteDeviceDriver.getAction() == 3)) {
|
||||
inst.setExecute_status("1");
|
||||
instructionService.update(inst);
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
standardManipulatorStackingSiteDeviceDriver.writing(1, 7);
|
||||
flag = true;
|
||||
} else {
|
||||
log.info("AGV请求取货设备{}无货,无法反馈", device_code);
|
||||
@@ -2018,8 +2018,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (device.getDeviceDriver() instanceof StandardManipulatorStackingSiteDeviceDriver) {
|
||||
standardManipulatorStackingSiteDeviceDriver = (StandardManipulatorStackingSiteDeviceDriver) device.getDeviceDriver();
|
||||
if (standardManipulatorStackingSiteDeviceDriver.getMove() == 0
|
||||
&& standardManipulatorStackingSiteDeviceDriver.getError() == 0
|
||||
&& (standardManipulatorStackingSiteDeviceDriver.getAction() == 1 || standardManipulatorStackingSiteDeviceDriver.getAction() == 3)) {
|
||||
&& standardManipulatorStackingSiteDeviceDriver.getError() == 0) {
|
||||
inst.setExecute_status("5");
|
||||
instructionService.update(inst);
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
@@ -2244,8 +2243,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (device.getDeviceDriver() instanceof StandardManipulatorStackingSiteDeviceDriver) {
|
||||
standardManipulatorStackingSiteDeviceDriver = (StandardManipulatorStackingSiteDeviceDriver) device.getDeviceDriver();
|
||||
if (standardManipulatorStackingSiteDeviceDriver.getMove() != 0
|
||||
&& standardManipulatorStackingSiteDeviceDriver.getError() == 0
|
||||
&& (standardManipulatorStackingSiteDeviceDriver.getAction() == 2 || standardManipulatorStackingSiteDeviceDriver.getAction() == 3)) {
|
||||
&& standardManipulatorStackingSiteDeviceDriver.getError() == 0) {
|
||||
inst.setExecute_status("6");
|
||||
instructionService.update(inst);
|
||||
standardManipulatorStackingSiteDeviceDriver.writing(1, 3);
|
||||
|
||||
Reference in New Issue
Block a user