Browse Source

fix:预充时机械臂下降至预充点位

master
王梦远 2 months ago
parent
commit
23c4faa84a
  1. 3
      src/main/java/com/iflytop/sgs/app/cmd/control/LiquidPreFillStartCommand.java
  2. 7
      src/main/java/com/iflytop/sgs/common/enums/data/DevicePositionCode.java

3
src/main/java/com/iflytop/sgs/app/cmd/control/LiquidPreFillStartCommand.java

@ -45,6 +45,7 @@ public class LiquidPreFillStartCommand extends BaseCommandHandler {
Assert.notNull(solutions, () -> new AppException(ResultCode.OPERATION_NOT_ALLOWED));//检验参数
ValveStateCode valveStateCode = ValveStateCode.valueOf(solutions.getCode());//获取对应的电磁阀通道
Point3D liquidAreaTrayPoint = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D(); //获取加液区上方点位
Double liquidAreaPreFillPoint = devicePositionService.getPosition(DevicePositionCode.liquidAreaPreFillPoint).getPositon(); //加液模块电机预充时下降进入试管抽取位置
double position = devicePositionService.getPosition(DevicePositionCode.solutionPreFillDistance).getDistance();//溶液首次预充距离
return runAsync(() -> {
deviceStateService.getDeviceState().getSolutionModule().setIdle(true);//设置占用
@ -52,7 +53,7 @@ public class LiquidPreFillStartCommand extends BaseCommandHandler {
solutionModuleService.liquidValveSwitch(cmdDTO.getCommandId(), cmdDTO.getCommand(), valveStateCode);//电磁阀对应的酸液通道打开
solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液机械臂上升
transferModuleService.transferMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint);//移动至加液位置
solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液机械臂下降至0点
solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(),liquidAreaPreFillPoint);//加液机械臂下降至至预充点位
solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), position);//预充开始
deviceStateService.getDeviceState().getSolutionModule().setIdle(false);//设置占用
deviceStateService.getDeviceState().getSolutionModule().setPumping(false);//设置正在加液

7
src/main/java/com/iflytop/sgs/common/enums/data/DevicePositionCode.java

@ -50,6 +50,10 @@ public enum DevicePositionCode {
*/
solutionModuleMotorDownInTubeExtPositon(DevicePositionType.POSITION, "加液模块电机下降进入试管抽取位置"),
/**
* 加液模块电机预充时下降进入试管抽取位置 30mm
* */
liquidAreaPreFillPoint(DevicePositionType.POSITION,"加液模块电机预充时下降进入试管抽取位置" ),
/**
* 开门位置
*/
doorOpenPosition(DevicePositionType.POSITION, "开门位置"),
@ -82,8 +86,7 @@ public enum DevicePositionCode {
/**
* 加热区4托盘夹爪位置点
*/
heatArea4TrayClawPoint(DevicePositionType.POINT_3D, "加热区4托盘夹爪位置点"),
;
heatArea4TrayClawPoint(DevicePositionType.POINT_3D, "加热区4托盘夹爪位置点");
private final DevicePositionType type;
private final String name;

Loading…
Cancel
Save