Browse Source

fix:废弃清洗喷嘴管路指令,修改清洗喷嘴管路、基质预充逻辑

tags/1.0 1.0
白凤吉 4 months ago
parent
commit
a3c8a3ee4c
  1. 27
      src/main/java/com/qyft/ms/app/front/cmd/business/NozzlePipelinePreFill.java
  2. 82
      src/main/java/com/qyft/ms/app/front/cmd/business/NozzlePipelineWash.java
  3. 111
      src/main/java/com/qyft/ms/app/front/cmd/business/SyringePipelineWash.java

27
src/main/java/com/qyft/ms/app/front/cmd/business/NozzlePipelinePreFill.java

@ -52,8 +52,7 @@ public class NozzlePipelinePreFill extends BaseCommandHandler {
webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "预充速度不能大于100")); webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "预充速度不能大于100"));
throw new RuntimeException("预充速度不能大于100"); throw new RuntimeException("预充速度不能大于100");
} }
deviceStatus.setPrefilling(true);
return runAsync(() -> {
try {
//2.判断z轴是否在安全距离如果不在安全距离可以不抬升z轴 //2.判断z轴是否在安全距离如果不在安全距离可以不抬升z轴
DeviceCommand motorXyzPositionGetCommand = DeviceCommandGenerator.motorXyzPositionGet(); DeviceCommand motorXyzPositionGetCommand = DeviceCommandGenerator.motorXyzPositionGet();
CommandFuture motorXyzPositionGetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXyzPositionGetCommand); CommandFuture motorXyzPositionGetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXyzPositionGetCommand);
@ -68,34 +67,42 @@ public class NozzlePipelinePreFill extends BaseCommandHandler {
SysSettings safeZHeightSysSettings = sysSettingsService.getOne(new LambdaQueryWrapper<SysSettings>().eq(SysSettings::getCode, "safe_z_height")); SysSettings safeZHeightSysSettings = sysSettingsService.getOne(new LambdaQueryWrapper<SysSettings>().eq(SysSettings::getCode, "safe_z_height"));
double safeZHeight = Double.parseDouble(safeZHeightSysSettings.getValue()); double safeZHeight = Double.parseDouble(safeZHeightSysSettings.getValue());
if (zAxisPosition > safeZHeight) { //z轴超出安全距离抬升z轴 if (zAxisPosition > safeZHeight) { //z轴超出安全距离抬升z轴
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(safeZHeight, speed);
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(safeZHeight, 20.0);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand); CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture); commandWait(motorZPositionSetCommandFuture);
} }
Position wasteLiquor = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "waste_liquor")); Position wasteLiquor = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "waste_liquor"));
//3.x轴移动到废液位置 //3.x轴移动到废液位置
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(wasteLiquor.getX(), speed);
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(wasteLiquor.getX(), 20.0);
CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand); CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand);
commandWait(motorXPositionSetCommandFuture); commandWait(motorXPositionSetCommandFuture);
//4.下降z轴高度防止飞溅 //4.下降z轴高度防止飞溅
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(wasteLiquor.getZ(), speed);
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(wasteLiquor.getZ(), 20.0);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand); CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture); commandWait(motorZPositionSetCommandFuture);
//7.开启喷嘴阀
//5.开启喷嘴阀
DeviceCommand nozzleValveOpenCommand = DeviceCommandGenerator.nozzleValveOpen(); // 开启喷嘴阀 DeviceCommand nozzleValveOpenCommand = DeviceCommandGenerator.nozzleValveOpen(); // 开启喷嘴阀
CommandFuture nozzleValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), nozzleValveOpenCommand); CommandFuture nozzleValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), nozzleValveOpenCommand);
commandWait(nozzleValveOpenCommandFuture); commandWait(nozzleValveOpenCommandFuture);
//5.打开三通阀注射器管路 //5.打开三通阀注射器管路
DeviceCommand threeWayValveOpenNozzlePipelineCommand = DeviceCommandGenerator.threeWayValveOpenNozzlePipeline();
CommandFuture threeWayValveOpenNozzlePipelineCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), threeWayValveOpenNozzlePipelineCommand);
commandWait(threeWayValveOpenNozzlePipelineCommandFuture);
// DeviceCommand threeWayValveOpenNozzlePipelineCommand = DeviceCommandGenerator.threeWayValveOpenNozzlePipeline();
// CommandFuture threeWayValveOpenNozzlePipelineCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), threeWayValveOpenNozzlePipelineCommand);
// commandWait(threeWayValveOpenNozzlePipelineCommandFuture);
Thread.sleep(500); Thread.sleep(500);
//7.设置注射泵速度推注射泵
//6.设置注射泵速度推注射泵
DeviceCommand syringePumpStartCommand = DeviceCommandGenerator.syringePumpForward(speed); // 生成移动注射泵指令 DeviceCommand syringePumpStartCommand = DeviceCommandGenerator.syringePumpForward(speed); // 生成移动注射泵指令
CommandFuture syringePumpStartCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), syringePumpStartCommand); CommandFuture syringePumpStartCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), syringePumpStartCommand);
commandWait(syringePumpStartCommandFuture); commandWait(syringePumpStartCommandFuture);
deviceStatus.setPrefilling(true);
} catch (Exception e) {
deviceStatus.setPrefilling(false);
throw new RuntimeException(e);
}
return runAsync(() -> {
}); });
} }

82
src/main/java/com/qyft/ms/app/front/cmd/business/NozzlePipelineWash.java

@ -25,6 +25,7 @@ import java.util.concurrent.CompletableFuture;
/** /**
* 喷嘴管路_清洗喷嘴管路 * 喷嘴管路_清洗喷嘴管路
* 废弃
*/ */
@Slf4j @Slf4j
@Component @Component
@ -43,50 +44,51 @@ public class NozzlePipelineWash extends BaseCommandHandler {
if (deviceStatus.isCleaningSyringePipeline() || deviceStatus.isCleaningNozzlePipeline()) { if (deviceStatus.isCleaningSyringePipeline() || deviceStatus.isCleaningNozzlePipeline()) {
throw new RuntimeException("正在清洗喷嘴管路或注射器管路,无法开启清洗注射器管路"); throw new RuntimeException("正在清洗喷嘴管路或注射器管路,无法开启清洗注射器管路");
} }
deviceStatus.setCleaningNozzlePipeline(true);
return runAsync(() -> {
try {
//1.判断z轴是否在安全距离如果不在安全距离可以不抬升z轴
DeviceCommand motorXyzPositionGetCommand = DeviceCommandGenerator.motorXyzPositionGet();
CommandFuture motorXyzPositionGetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXyzPositionGetCommand);
commandWait(motorXyzPositionGetCommandFuture);
JSONObject motorXyzPositionGetCommandDeviceResult = motorXyzPositionGetCommandFuture.getResponseResult();
Double zAxisPosition = motorXyzPositionGetCommandDeviceResult.getJSONObject("data").getDouble("zAxisPosition");
if (zAxisPosition == null) {
webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "获得电机XYZ相对原点坐标失败", motorXyzPositionGetCommandDeviceResult));
throw new RuntimeException("获得电机XYZ相对原点坐标失败");
}
zAxisPosition = Math.abs(zAxisPosition);
SysSettings safeZHeightSysSettings = sysSettingsService.getOne(new LambdaQueryWrapper<SysSettings>().eq(SysSettings::getCode, "safe_z_height"));
double safeZHeight = Double.parseDouble(safeZHeightSysSettings.getValue());
if (zAxisPosition > safeZHeight) { //z轴超出安全距离抬升z轴
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(safeZHeight, 15.0);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture);
}
Position wasteLiquor = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "waste_liquor"));
//2.轴移动到废液位置
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(wasteLiquor.getX(), 20.0);
CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand);
commandWait(motorXPositionSetCommandFuture);
//3.下降z轴高度防止飞溅
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(wasteLiquor.getZ(), 15.0);
try {
//1.判断z轴是否在安全距离如果不在安全距离可以不抬升z轴
DeviceCommand motorXyzPositionGetCommand = DeviceCommandGenerator.motorXyzPositionGet();
CommandFuture motorXyzPositionGetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXyzPositionGetCommand);
commandWait(motorXyzPositionGetCommandFuture);
JSONObject motorXyzPositionGetCommandDeviceResult = motorXyzPositionGetCommandFuture.getResponseResult();
Double zAxisPosition = motorXyzPositionGetCommandDeviceResult.getJSONObject("data").getDouble("zAxisPosition");
if (zAxisPosition == null) {
webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "获得电机XYZ相对原点坐标失败", motorXyzPositionGetCommandDeviceResult));
throw new RuntimeException("获得电机XYZ相对原点坐标失败");
}
zAxisPosition = Math.abs(zAxisPosition);
SysSettings safeZHeightSysSettings = sysSettingsService.getOne(new LambdaQueryWrapper<SysSettings>().eq(SysSettings::getCode, "safe_z_height"));
double safeZHeight = Double.parseDouble(safeZHeightSysSettings.getValue());
if (zAxisPosition > safeZHeight) { //z轴超出安全距离抬升z轴
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(safeZHeight, 15.0);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand); CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture); commandWait(motorZPositionSetCommandFuture);
//4.开启三通阀到喷嘴管路
DeviceCommand threeWayValveOpenSyringePipelineCommand = DeviceCommandGenerator.threeWayValveOpenSyringePipeline(); // 打开三通阀喷嘴管路
CommandFuture threeWayValveOpenSyringePipelineCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), threeWayValveOpenSyringePipelineCommand);
commandWait(threeWayValveOpenSyringePipelineCommandFuture);
}
Position wasteLiquor = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "waste_liquor"));
//2.轴移动到废液位置
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(wasteLiquor.getX(), 20.0);
CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand);
commandWait(motorXPositionSetCommandFuture);
//3.下降z轴高度防止飞溅
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(wasteLiquor.getZ(), 15.0);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture);
//4.开启三通阀到喷嘴管路
DeviceCommand threeWayValveOpenSyringePipelineCommand = DeviceCommandGenerator.threeWayValveOpenSyringePipeline(); // 打开三通阀喷嘴管路
CommandFuture threeWayValveOpenSyringePipelineCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), threeWayValveOpenSyringePipelineCommand);
commandWait(threeWayValveOpenSyringePipelineCommandFuture);
//6.打开清洗阀
DeviceCommand washValveOpenCommand = DeviceCommandGenerator.washValveOpen(); // 生成打开清洗阀指令
CommandFuture washValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), washValveOpenCommand);
commandWait(washValveOpenCommandFuture);
//6.打开清洗阀
DeviceCommand washValveOpenCommand = DeviceCommandGenerator.washValveOpen(); // 生成打开清洗阀指令
CommandFuture washValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), washValveOpenCommand);
commandWait(washValveOpenCommandFuture);
deviceStatus.setCleaningNozzlePipeline(true);
} catch (Exception e) {
deviceStatus.setCleaningNozzlePipeline(false);
throw new RuntimeException(e);
}
return runAsync(() -> {
} catch (Exception e) {
deviceStatus.setCleaningNozzlePipeline(false);
throw new RuntimeException(e);
}
}); });

111
src/main/java/com/qyft/ms/app/front/cmd/business/SyringePipelineWash.java

@ -52,61 +52,68 @@ public class SyringePipelineWash extends BaseCommandHandler {
webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "清洗速度不能大于100")); webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "清洗速度不能大于100"));
throw new RuntimeException("预充速度不能大于100"); throw new RuntimeException("预充速度不能大于100");
} }
deviceStatus.setCleaningSyringePipeline(true);
return runAsync(() -> {
try {
//2.判断z轴是否在安全距离如果不在安全距离可以不抬升z轴
DeviceCommand motorXyzPositionGetCommand = DeviceCommandGenerator.motorXyzPositionGet();
CommandFuture motorXyzPositionGetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXyzPositionGetCommand);
commandWait(motorXyzPositionGetCommandFuture);
JSONObject motorXyzPositionGetCommandDeviceResult = motorXyzPositionGetCommandFuture.getResponseResult();
Double zAxisPosition = motorXyzPositionGetCommandDeviceResult.getJSONObject("data").getDouble("zAxisPosition");
if (zAxisPosition == null) {
webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "获得电机XYZ相对原点坐标失败", motorXyzPositionGetCommandDeviceResult));
throw new RuntimeException("获得电机XYZ相对原点坐标失败");
}
zAxisPosition = Math.abs(zAxisPosition);
SysSettings safeZHeightSysSettings = sysSettingsService.getOne(new LambdaQueryWrapper<SysSettings>().eq(SysSettings::getCode, "safe_z_height"));
double safeZHeight = Double.parseDouble(safeZHeightSysSettings.getValue());
if (zAxisPosition > safeZHeight) { //z轴超出安全距离抬升z轴
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(safeZHeight, speed);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture);
}
Position wasteLiquor = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "waste_liquor"));
//3.x轴移动到废液位置
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(wasteLiquor.getX(), speed);
CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand);
commandWait(motorXPositionSetCommandFuture);
//4.下降z轴高度防止飞溅
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(wasteLiquor.getZ(), speed);
try {
//2.判断z轴是否在安全距离如果不在安全距离可以不抬升z轴
DeviceCommand motorXyzPositionGetCommand = DeviceCommandGenerator.motorXyzPositionGet();
CommandFuture motorXyzPositionGetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXyzPositionGetCommand);
commandWait(motorXyzPositionGetCommandFuture);
JSONObject motorXyzPositionGetCommandDeviceResult = motorXyzPositionGetCommandFuture.getResponseResult();
Double zAxisPosition = motorXyzPositionGetCommandDeviceResult.getJSONObject("data").getDouble("zAxisPosition");
if (zAxisPosition == null) {
webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(form.getCmdId(), form.getCmdCode(), CommandStatus.DEVICE_ERROR, "获得电机XYZ相对原点坐标失败", motorXyzPositionGetCommandDeviceResult));
throw new RuntimeException("获得电机XYZ相对原点坐标失败");
}
zAxisPosition = Math.abs(zAxisPosition);
SysSettings safeZHeightSysSettings = sysSettingsService.getOne(new LambdaQueryWrapper<SysSettings>().eq(SysSettings::getCode, "safe_z_height"));
double safeZHeight = Double.parseDouble(safeZHeightSysSettings.getValue());
if (zAxisPosition > safeZHeight) { //z轴超出安全距离抬升z轴
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(safeZHeight, 15.0);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand); CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture); commandWait(motorZPositionSetCommandFuture);
//5.打开三通阀注射器管路
DeviceCommand threeWayValveOpenNozzlePipelineCommand = DeviceCommandGenerator.threeWayValveOpenNozzlePipeline();
CommandFuture threeWayValveOpenNozzlePipelineCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), threeWayValveOpenNozzlePipelineCommand);
commandWait(threeWayValveOpenNozzlePipelineCommandFuture);
//6.打开清洗阀
DeviceCommand washValveOpenCommand = DeviceCommandGenerator.washValveOpen(); // 生成打开清洗阀指令
CommandFuture washValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), washValveOpenCommand);
commandWait(washValveOpenCommandFuture);
//7.开启喷嘴阀
DeviceCommand nozzleValveOpenCommand = DeviceCommandGenerator.nozzleValveOpen(); // 开启喷嘴阀
CommandFuture nozzleValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), nozzleValveOpenCommand);
commandWait(nozzleValveOpenCommandFuture);
//7.设置注射泵速度推注射泵
DeviceCommand syringePumpStartCommand = DeviceCommandGenerator.syringePumpForward(speed); // 生成移动注射泵指令
CommandFuture syringePumpStartCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), syringePumpStartCommand);
commandWait(syringePumpStartCommandFuture);
} catch (Exception e) {
deviceStatus.setCleaningSyringePipeline(false);
throw new RuntimeException(e);
} }
Position wasteLiquor = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "waste_liquor"));
//3.x轴移动到废液位置
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(wasteLiquor.getX(), 20.0);
CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand);
commandWait(motorXPositionSetCommandFuture);
//4.下降z轴高度防止飞溅
DeviceCommand motorZPositionSetCommand = DeviceCommandGenerator.motorZPositionSet(wasteLiquor.getZ(), 20.0);
CommandFuture motorZPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionSetCommand);
commandWait(motorZPositionSetCommandFuture);
//5.开启喷嘴阀
DeviceCommand nozzleValveOpenCommand = DeviceCommandGenerator.nozzleValveOpen(); // 开启喷嘴阀
CommandFuture nozzleValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), nozzleValveOpenCommand);
commandWait(nozzleValveOpenCommandFuture);
Thread.sleep(500);
//6.设置注射泵速度推注射泵
DeviceCommand syringePumpStartCommand = DeviceCommandGenerator.syringePumpForward(speed); // 生成移动注射泵指令
CommandFuture syringePumpStartCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), syringePumpStartCommand);
commandWait(syringePumpStartCommandFuture);
//5.打开三通阀注射器管路
// DeviceCommand threeWayValveOpenNozzlePipelineCommand = DeviceCommandGenerator.threeWayValveOpenNozzlePipeline();
// CommandFuture threeWayValveOpenNozzlePipelineCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), threeWayValveOpenNozzlePipelineCommand);
// commandWait(threeWayValveOpenNozzlePipelineCommandFuture);
//6.打开清洗阀
// DeviceCommand washValveOpenCommand = DeviceCommandGenerator.washValveOpen(); // 生成打开清洗阀指令
// CommandFuture washValveOpenCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), washValveOpenCommand);
// commandWait(washValveOpenCommandFuture);
deviceStatus.setCleaningSyringePipeline(true);
} catch (Exception e) {
deviceStatus.setCleaningSyringePipeline(false);
throw new RuntimeException(e);
}
return runAsync(() -> {
}); });
} }

Loading…
Cancel
Save