|
|
@ -580,6 +580,7 @@ public class CraftsStepService { |
|
|
|
transferModuleService.transferZMoveZero();//Z轴抬升至最高 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTrayStatus(true);//加热区托盘状态 |
|
|
|
deviceStateService.getDeviceState().getTrayByHeatModuleCode(heatModuleCode).setInHeatModule(true);//托盘状态 |
|
|
|
deviceStateService.getDeviceState().getTrayByHeatModuleCode(heatModuleCode).setHeatModuleCode(heatModuleCode);//托盘所在加热区 |
|
|
|
deviceStateService.getDeviceState().getSolutionModule().setPumping(false);//正在加液 |
|
|
|
deviceStateService.getDeviceState().getTrayByHeatModuleCode(heatModuleCode).setInSolutionPositon(false);//托盘状态 |
|
|
|
return true; |
|
|
@ -730,7 +731,7 @@ public class CraftsStepService { |
|
|
|
} |
|
|
|
log.info("工艺{},温度达到", heatModuleCode); |
|
|
|
webSocketService.pushCraftsDebug(CraftsDebugGenerator.generateJson(heatModuleCode.toString(), "温度达到", temperature)); |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatingType(HeatingType.constant); //恒温中 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatingType(HeatingType.constant); //恒温中 todo 前端显示 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setStartHeatTime(LocalDateTime.now());//开始加热时间 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTargetTime(time);//加热器目标加热时间 |
|
|
|
int clock = 0; |
|
|
@ -749,6 +750,8 @@ public class CraftsStepService { |
|
|
|
/*保存到工艺监控*/ |
|
|
|
} |
|
|
|
delay(seconds); |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setStartHeatTime(null);//开始加热时间 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTargetTime(null);//加热器目标加热时间 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatingType(HeatingType.finish); //加热完成 |
|
|
|
log.info("工艺{},加热结束", heatModuleCode); |
|
|
|
craftMonitor.setCurrentStepResult(String.valueOf(result)); |
|
|
@ -849,25 +852,24 @@ public class CraftsStepService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*预充开始*/ |
|
|
|
boolean feedTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.LIQUID_TRAY_EXIST);//获取传感器状态 |
|
|
|
Assert.isTrue(!feedTrayExist, () -> new AppException(ResultCode.FEED_AREA_EXIST_TRAY));//上料区有托盘 |
|
|
|
log.info("工艺{},清洗-预充开始", heatModuleCode); |
|
|
|
solutionModuleService.solutionMotorMoveZero();//加液机械臂上升 |
|
|
|
transferModuleService.transferXMove(heatArea1TrayClawPoint.getX());//转运模块移动至加热位1 |
|
|
|
solutionModuleService.solutionMotorMove(liquidAreaPreFillPoint);//加液机械臂下降至至预充点位 |
|
|
|
solutionModuleService.liquidPumpMove(-drainDistance);//排空 |
|
|
|
solutionModuleService.solutionMotorMove(preFillPosition);//加液机械臂下降至预充位置 |
|
|
|
solutionModuleService.liquidValveSwitch(SolutionCode.water);//电磁阀对应通道打开 |
|
|
|
solutionModuleService.liquidPumpMove(preFillDistance);//预充 |
|
|
|
solutionModuleService.solutionMotorMoveZero();//加液机械臂上升 |
|
|
|
/*预充结束*/ |
|
|
|
|
|
|
|
|
|
|
|
/*清洗开始*/ |
|
|
|
log.info("工艺{},清洗开始", heatModuleCode); |
|
|
|
transferModuleService.transferMove(liquidAreaTrayPoint3D);//移动至加液时托盘位置点 |
|
|
|
for (int i = 0; i < cycle; i++) { |
|
|
|
/*预充开始*/ |
|
|
|
boolean feedTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.LIQUID_TRAY_EXIST);//获取传感器状态 |
|
|
|
Assert.isTrue(!feedTrayExist, () -> new AppException(ResultCode.FEED_AREA_EXIST_TRAY));//上料区有托盘 |
|
|
|
log.info("工艺{},清洗-预充开始", heatModuleCode); |
|
|
|
solutionModuleService.solutionMotorMoveZero();//加液机械臂上升 |
|
|
|
transferModuleService.transferXMove(heatArea1TrayClawPoint.getX());//转运模块移动至加热位1 |
|
|
|
solutionModuleService.solutionMotorMove(liquidAreaPreFillPoint);//加液机械臂下降至至预充点位 |
|
|
|
solutionModuleService.liquidPumpMove(-drainDistance);//排空 |
|
|
|
solutionModuleService.liquidValveSwitch(SolutionCode.water);//电磁阀对应通道打开 |
|
|
|
solutionModuleService.liquidPumpMove(preFillDistance);//预充 |
|
|
|
solutionModuleService.solutionMotorMoveZero();//加液机械臂上升 |
|
|
|
log.info("工艺{},清洗开始", heatModuleCode); |
|
|
|
transferModuleService.transferMove(liquidAreaTrayPoint3D);//移动至加液时托盘位置点 |
|
|
|
/*预充结束*/ |
|
|
|
/*加*/ |
|
|
|
log.info("工艺{},电磁阀蒸馏水通道打开", heatModuleCode); |
|
|
|
solutionModuleService.liquidValveSwitch(SolutionCode.water);//电磁阀对应通道打开 |
|
|
@ -887,7 +889,7 @@ public class CraftsStepService { |
|
|
|
Thread.sleep(1000); |
|
|
|
/*抽*/ |
|
|
|
solutionModuleService.liquidValveSwitch(SolutionCode.waste);//电磁阀对应通道打开 |
|
|
|
transferModuleService.transferMove(liquidAreaTrayPoint3D);//移动至加液时托盘位置点 |
|
|
|
//transferModuleService.transferMove(liquidAreaTrayPoint3D);//移动至加液时托盘位置点 |
|
|
|
for (int j = 0; j < columns.size(); j++) { |
|
|
|
double distance = Math.abs(columns.get(j) - 5) * trayTubeHorizontalSpacingDistance;//x轴移动距离 |
|
|
|
webSocketService.pushCraftsDebug(CraftsDebugGenerator.generateJson(heatModuleCode.toString(), "机械臂移动到试管位置", j)); |
|
|
@ -977,6 +979,8 @@ public class CraftsStepService { |
|
|
|
log.info("工艺{},关闭加热棒", heatModuleCode); |
|
|
|
webSocketService.pushCraftsDebug(CraftsDebugGenerator.generateJson(heatModuleCode.toString(), "关闭加热棒", "")); |
|
|
|
heatModuleService.heatRodClose(heatModuleCode);//关闭加热棒 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setStartHeatTime(null);//开始加热时间 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTargetTime(null);//加热器目标加热时间 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatingType(HeatingType.stop); //设置加热区状态 |
|
|
|
return true; |
|
|
|
} |
|
|
@ -1062,6 +1066,8 @@ public class CraftsStepService { |
|
|
|
log.info("工艺{},恒温中", HeatModuleCode.heat_module_04); |
|
|
|
delay(seconds); |
|
|
|
heatModuleService.heatRodClose(HeatModuleCode.heat_module_04);//关闭加热棒 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setStartHeatTime(null);//开始加热时间 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTargetTime(null);//加热器目标加热时间 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(HeatModuleCode.heat_module_04).setHeatingType(HeatingType.stop); //设置加热区状态 停止加热 |
|
|
|
|
|
|
|
log.info("工艺{},加热完毕", heatModuleCode); |
|
|
|