|
|
@ -55,26 +55,28 @@ public class CleanStartCommand extends BaseCommandHandler { |
|
|
|
return runAsync(() -> { |
|
|
|
deviceStateService.getDeviceState().getSolutionModule().setIdle(false);//设置占用 |
|
|
|
deviceStateService.getDeviceState().getSolutionModule().setPumping(true);//设置正在加液 |
|
|
|
solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液模块上升 |
|
|
|
transferModuleService.transferMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D);//移动至加液时托盘位置点 |
|
|
|
boolean clawTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.CLAW_TRAY_EXIST);//监测夹爪是否有托盘 |
|
|
|
Assert.isTrue(clawTrayExist, () -> new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY));//夹爪必须有托盘 |
|
|
|
solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), solutionModuleMotorDownInTubeExtPositon);//加液模块下降进入试管抽取位置 |
|
|
|
solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0.1);//todo 测试准确后打开 pumpPosition |
|
|
|
solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液模块上升 |
|
|
|
for (int i = 0; i < cycle; i++) { |
|
|
|
for (int j = 0; j < jsonArray.size(); j++) { |
|
|
|
int column = jsonArray.getInt(i); |
|
|
|
solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), solutionModuleMotorDownInTubeExtPositon);//加液模块下降进入试管抽取位置 |
|
|
|
for (int j = 0; j < jsonArray.size(); j++) { |
|
|
|
int column = jsonArray.getInt(j); |
|
|
|
double distance = (column - 1) * trayTubeHorizontalSpacingDistance;//x轴移动距离 |
|
|
|
transferModuleService.transferXMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D.getX() + distance);//机械臂移动到试管位置 |
|
|
|
solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), solutionModuleMotorDownInTubeExtPositon);//加液模块下降进入试管抽取位置 |
|
|
|
for (int i = 0; i < cycle; i++) { |
|
|
|
solutionModuleService.liquidValveSwitch(cmdDTO.getCommandId(), cmdDTO.getCommand(), ValveStateCode.water);//电磁阀对应通道打开 |
|
|
|
Thread.sleep(500); |
|
|
|
solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0.1);//八通道蠕动泵 cleanWaterVolume * waterScale * 8 |
|
|
|
|
|
|
|
solutionModuleService.liquidValveSwitch(cmdDTO.getCommandId(), cmdDTO.getCommand(), ValveStateCode.waste);//电磁阀对应通道打开 |
|
|
|
Thread.sleep(500); |
|
|
|
solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0.1);//八通道蠕动泵 |
|
|
|
double distance = (column - 1) * trayTubeHorizontalSpacingDistance;//x轴移动距离 |
|
|
|
transferModuleService.transferXMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D.getX() + distance);//机械臂移动到试管位置 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液模块上升至最高,移出试管 |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液模块上升至最高,移出试管 |
|
|
|
deviceStateService.getDeviceState().getSolutionModule().setIdle(true);//设置占用解除 |
|
|
|
deviceStateService.getDeviceState().getSolutionModule().setPumping(false);//设置加液结束 |
|
|
|