|
@ -69,10 +69,10 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler { |
|
|
//校验目标加热位是否有托盘 |
|
|
//校验目标加热位是否有托盘 |
|
|
try { |
|
|
try { |
|
|
deviceStateService.getCommandMutexState().get().setMoveToHeatAreaCommandExecuting(true); |
|
|
deviceStateService.getCommandMutexState().get().setMoveToHeatAreaCommandExecuting(true); |
|
|
// Boolean heatModuleTray = heatModuleService.heatModuleSensorState(heatModuleCode); |
|
|
|
|
|
// if (heatModuleTray) { |
|
|
|
|
|
|
|
|
Boolean heatModuleTray = heatModuleService.heatModuleSensorState(heatModuleCode); |
|
|
|
|
|
if (heatModuleTray) { |
|
|
// throw new AppException(ResultCode.TARGET_HEAT_MODULE_OCCUPIED); |
|
|
// throw new AppException(ResultCode.TARGET_HEAT_MODULE_OCCUPIED); |
|
|
// } |
|
|
|
|
|
|
|
|
} |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
deviceStateService.getCommandMutexState().get().setMoveToHeatAreaCommandExecuting(false); |
|
|
deviceStateService.getCommandMutexState().get().setMoveToHeatAreaCommandExecuting(false); |
|
|
throw e; |
|
|
throw e; |
|
@ -80,37 +80,38 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler { |
|
|
return runAsync(() -> { |
|
|
return runAsync(() -> { |
|
|
try { |
|
|
try { |
|
|
// TrayState trayState = deviceStateService.getTrayInSolutionModule(); |
|
|
// TrayState trayState = deviceStateService.getTrayInSolutionModule(); |
|
|
capModuleService.capUpBalanceNoWait(cmdDTO.getCommandId(), cmdDTO.getCommand());//提升拍子存放区至拍子夹取的高度 |
|
|
|
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D); //将机械臂移动至加液模块上方 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D); //将机械臂移动至加液模块上方 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,准备夹取托盘 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,准备夹取托盘 |
|
|
gantryModuleService.gantryZMove(solutionModuleTrayMoveHeight);//下降z轴,使夹爪落入托盘孔位 |
|
|
gantryModuleService.gantryZMove(solutionModuleTrayMoveHeight);//下降z轴,使夹爪落入托盘孔位 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayGrip);//将夹爪收紧,夹住托盘 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayGrip);//将夹爪收紧,夹住托盘 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
deviceStateService.getDeviceState().getSolutionModule().setTrayStatus(0);//加液模块是否有托盘 |
|
|
deviceStateService.getDeviceState().getSolutionModule().setTrayStatus(0);//加液模块是否有托盘 |
|
|
// deviceCommandTempUtilService.moveTrayHeatModuleAvoidDown(cmdDTO.getCommandId(), cmdDTO.getCommand(), null);//TODO 结构有问题临时避让 开始,移动托盘之前先降下所有加热模块 |
|
|
|
|
|
|
|
|
deviceCommandTempUtilService.moveTrayHeatModuleAvoidDown(cmdDTO.getCommandId(), cmdDTO.getCommand(), null);//TODO 结构有问题临时避让 开始,移动托盘之前先降下所有加热模块 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatArea4TrayClawPoint3D);//将携带托盘的机械臂移动至4号加热模块上方 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatArea4TrayClawPoint3D);//将携带托盘的机械臂移动至4号加热模块上方 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaTrayClawPoint3D);//将携带托盘的机械臂移动至加热模块上方 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaTrayClawPoint3D);//将携带托盘的机械臂移动至加热模块上方 |
|
|
// deviceCommandUtilService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升加热位托盘 |
|
|
|
|
|
deviceCommandTempUtilService.moveTrayHeatModuleAvoidUpNoWait(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode);Thread.sleep(3200);//TODO 结构有问题临时避让 完毕,可以升起了,顺带提升目标加热模块 |
|
|
|
|
|
|
|
|
// deviceCommandUtilService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLift);//抬升加热位托盘 TODO 结构有问题临时避让 屏蔽 |
|
|
|
|
|
deviceCommandTempUtilService.moveTrayHeatModuleAvoidUp(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode);//TODO 结构有问题临时避让 完毕,可以升起了,顺带提升目标加热模块 |
|
|
gantryModuleService.gantryZMove(heatModuleTrayMoveHeight);//下降z轴,使托盘落入加热模块 |
|
|
gantryModuleService.gantryZMove(heatModuleTrayMoveHeight);//下降z轴,使托盘落入加热模块 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,释放托盘 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawTrayPick);//将夹爪打开,释放托盘 |
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTrayStatus(1);//加热模块是否存在托盘 |
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTrayStatus(1);//加热模块是否存在托盘 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
|
|
|
|
|
|
|
|
|
capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand());//提升拍子存放区至拍子夹取的高度 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,准备夹取拍子 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,准备夹取拍子 |
|
|
gantryModuleService.gantryZMove(capModuleCapMoveHeight);//下降z轴,使夹爪落入拍子升降模块拍子孔位 |
|
|
gantryModuleService.gantryZMove(capModuleCapMoveHeight);//下降z轴,使夹爪落入拍子升降模块拍子孔位 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapGrip);//将夹爪收紧,夹住拍子 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapGrip);//将夹爪收紧,夹住拍子 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaCapClawPointPoint3D);//将携带拍子的机械臂移动至加热模块拍子上方 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatAreaCapClawPointPoint3D);//将携带拍子的机械臂移动至加热模块拍子上方 |
|
|
capModuleService.capUpBalanceNoWait(cmdDTO.getCommandId(), cmdDTO.getCommand()); //提升拍子存放区 |
|
|
|
|
|
gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹拍子落入加热模块 |
|
|
gantryModuleService.gantryZMove(heatModuleCapMoveHeight);//下降z轴,使夹拍子落入加热模块 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,释放拍子 |
|
|
gantryModuleService.clawMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), clawCapPick);//将夹爪打开,释放拍子 |
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setCapExist(true);//加热模块是否存在拍子 |
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setCapExist(true);//加热模块是否存在拍子 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
gantryModuleService.gantryZMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//抬升z轴 |
|
|
// trayState.setHeatModuleId(heatModuleId); |
|
|
// trayState.setHeatModuleId(heatModuleId); |
|
|
// trayState.setInHeatModule(true); |
|
|
// trayState.setInHeatModule(true); |
|
|
// heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode, trayLower);//下降加热模块托盘 |
|
|
|
|
|
// deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTrayUp(0);//加热模块托盘升降状态 |
|
|
|
|
|
|
|
|
heatModuleService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode, trayLower);//下降加热模块托盘 |
|
|
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTrayUp(0);//加热模块托盘升降状态 |
|
|
|
|
|
capModuleService.capUpBalance(cmdDTO.getCommandId(), cmdDTO.getCommand()); //提升拍子存放区 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方 |
|
|
gantryModuleService.gantryMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), capStorageCapClawPoint3D);//移动机械臂至拍子存放区上方 |
|
|
} finally { |
|
|
} finally { |
|
|
deviceStateService.getDeviceState().getGantryArm().setIdle(true); |
|
|
deviceStateService.getDeviceState().getGantryArm().setIdle(true); |
|
|