diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToAnnealAreaCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToAnnealAreaCommand.java index 5c08665..681014d 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToAnnealAreaCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToAnnealAreaCommand.java @@ -55,7 +55,7 @@ public class MoveToAnnealAreaCommand extends BaseCommandHandler { Point3D feedAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.feedAreaTrayPoint).getPoint3D();//获取上料区托盘夹爪位置点 return runAsync(() -> { boolean annealTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.HEATER_TRAY_4_EXIST);//获取传感器状态 - Assert.isTrue(!annealTrayExist, () -> new AppException(ResultCode.ANNEAL_MODULE_EXIST_TRAY));//加热位不能有托盘 + Assert.isTrue(!annealTrayExist, () -> new AppException(ResultCode.ANNEAL_MODULE_EXIST_TRAY));//退火位不能有托盘 if (heatModuleCode == null) { solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液机械臂上升 transferModuleService.transferMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint);//移动至加液位置 @@ -68,6 +68,8 @@ public class MoveToAnnealAreaCommand extends BaseCommandHandler { transferModuleService.transferXMoveBy(cmdDTO.getCommandId(), cmdDTO.getCommand(), -transferModuleXPickTrayMoveDistance);//X轴进入卡槽 } }else{ + boolean heatTrayExist = deviceSensorService.getTrayStateByHeatModuleCode(heatModuleCode);//获取转移加热区的传感器状态 + Assert.isTrue(heatTrayExist, () -> new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY));//加热模块无托盘 Point3D heatModuleTrayClawPoint3D = heatModuleService.getHeatModuleTrayClawPoint3D(heatModuleCode);//获取加热模块托盘夹取点 transferModuleService.transferXMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleTrayClawPoint3D.getX() + transferModuleXPickTrayMoveDistance);//将X轴移动至加热区托盘夹取点 + 进出卡槽移动距离 transferModuleService.transferZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleTrayClawPoint3D.getZ());//Z轴下降至夹取点,使托盘落入石墨加热盘 diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToHeatAreaCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToHeatAreaCommand.java index b7fd82f..4c30da2 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToHeatAreaCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToHeatAreaCommand.java @@ -57,7 +57,7 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler { boolean clawTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.CLAW_TRAY_EXIST);//获取传感器状态 if (!clawTrayExist) { //夹爪不存在托盘 boolean feedTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.LIQUID_TRAY_EXIST);//获取上料区传感器状态 - Assert.isTrue(!feedTrayExist, ()->new AppException(ResultCode.FEED_AREA_NO_TRAY));//上料区无托盘 + Assert.isTrue(feedTrayExist, ()->new AppException(ResultCode.FEED_AREA_NO_TRAY));//上料区必须存在托盘 transferModuleService.transferXMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), feedAreaTrayPoint3D.getX() + transferModuleXPickTrayMoveDistance);//将X轴移动至上料区托盘夹取点 + 进出卡槽移动距离 transferModuleService.transferZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), feedAreaTrayPoint3D.getZ());//Z轴下降至夹取点,使托盘落入石墨加热盘 transferModuleService.transferXMoveBy(cmdDTO.getCommandId(), cmdDTO.getCommand(), -transferModuleXPickTrayMoveDistance);//X轴进入卡槽 diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToLiquidAreaCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToLiquidAreaCommand.java index d3fc1ac..01946b8 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToLiquidAreaCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/MoveToLiquidAreaCommand.java @@ -51,8 +51,9 @@ public class MoveToLiquidAreaCommand extends BaseCommandHandler { Double transferModuleXPickTrayMoveDistance = devicePositionService.getPosition(DevicePositionCode.transferModuleXPickTrayMoveDistance).getDistance();//获取转运模块X轴拿取托盘进出卡槽移动距离 Point3D feedAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.feedAreaTrayPoint).getPoint3D();//获取上料区托盘夹爪位置点 Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液时托盘位置点 - + Assert.isTrue(deviceStateService.getDeviceState().getSolutionModule().isIdle(), ()->new AppException(ResultCode.SOLUTION_MODULE_IS_BUSY));//判断加液模块状态 return runAsync(() -> { + solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液机械臂上升 transferModuleService.transferMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D);//移动至加液位置 boolean clawTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.CLAW_TRAY_EXIST);//获取传感器状态