|
|
@ -35,6 +35,7 @@ import a8k.app.type.a8k.state.SampleInfo; |
|
|
|
import a8k.app.type.a8k.state.Tube; |
|
|
|
import a8k.app.type.error.AppError; |
|
|
|
import a8k.app.type.exception.AppException; |
|
|
|
import a8k.app.type.exception.EngineerTaskBreakException; |
|
|
|
import a8k.app.type.param.type.A8kSamplePos; |
|
|
|
import a8k.app.type.ui.TubeHolderSetting; |
|
|
|
import a8k.app.type.ui.TubeSetting; |
|
|
@ -181,7 +182,9 @@ public class ExperimentConsistencyTestingService { |
|
|
|
} |
|
|
|
|
|
|
|
void docmd(String mark, A8kCmdRunnable runnable, A8kCmdRunnable virtualRunable) throws AppException { |
|
|
|
actionExecutor.sleep(2); |
|
|
|
actionExecutor.docmd(mark, runnable, virtualRunable); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void docmd(String mark, A8kCmdRunnable runnable) throws AppException { |
|
|
@ -202,20 +205,26 @@ public class ExperimentConsistencyTestingService { |
|
|
|
public void processException(Exception e) { |
|
|
|
try { |
|
|
|
log.error("Catch exception: ", e); |
|
|
|
UISender.txErrorPrompt(e); |
|
|
|
docmd("丢tip", hbotMoveExCtrlService::dropTip); |
|
|
|
docmd("HBOT复位", hbotMoveCtrlService::moveToZero); |
|
|
|
docmd("推出试管架", tubeFeedingCtrlService::ejectTubeHolder); |
|
|
|
//清空光学模组 |
|
|
|
optScanModuleStateMgrService.changeOptScanModuleStateToEmpty(); |
|
|
|
docmd("丢反应板", optScanModuleCtrlService::dropPlate); |
|
|
|
|
|
|
|
//清空孵育盘 |
|
|
|
List<IncubationSubTank> all = incubationPlateStateMgrService.getAllNotFreeIncubationSubTanks(); |
|
|
|
for (IncubationSubTank notFreeTank : all) { |
|
|
|
docmd("拉取反应板", () -> optScanModuleCtrlService.pullPlate(notFreeTank.pos)); |
|
|
|
docmd("丢反应板", optScanModuleCtrlService::dropPlate); |
|
|
|
if (!(e instanceof EngineerTaskBreakException)) { |
|
|
|
UISender.txErrorPrompt(e); |
|
|
|
} |
|
|
|
// |
|
|
|
// Action |
|
|
|
// |
|
|
|
if (actionExecutor.isInRealMode()) { |
|
|
|
optScanModuleCtrlService.dropPlate(); |
|
|
|
hbotMoveExCtrlService.dropTip(); |
|
|
|
tubeFeedingCtrlService.ejectTubeHolder(); |
|
|
|
List<IncubationSubTank> all = incubationPlateStateMgrService.getAllNotFreeIncubationSubTanks(); |
|
|
|
for (IncubationSubTank notFreeTank : all) { |
|
|
|
optScanModuleCtrlService.pullPlate(notFreeTank.pos); |
|
|
|
optScanModuleCtrlService.dropPlate(); |
|
|
|
} |
|
|
|
} |
|
|
|
// |
|
|
|
// State |
|
|
|
// |
|
|
|
optScanModuleStateMgrService.changeOptScanModuleStateToEmpty(); |
|
|
|
incubationPlateStateMgrService.resetAll(); |
|
|
|
} catch (AppException ex) { |
|
|
|
log.error("Catch exception: ", e); |
|
|
@ -391,7 +400,8 @@ public class ExperimentConsistencyTestingService { |
|
|
|
liquidOperationCtrlService.setProjContext(projBuildinInfo, projExtInfoCard); |
|
|
|
var preProcessPos = new PreReactionPos(ConsumableType.SmallBottleBuffer, consumableInfo.group, consumableInfo.pos); |
|
|
|
//取tip |
|
|
|
liquidOperationCtrlService.forceTakeTip(); |
|
|
|
liquidOperationCtrlService.forceTakeTip(() -> !actionExecutor.isStopping()); |
|
|
|
actionExecutor.sleep(1); |
|
|
|
//刺破缓冲液 |
|
|
|
hbotMoveExCtrlService.moveToLittleBufferPiercePos(consumableInfo.group, consumableInfo.pos); |
|
|
|
//取样品 |
|
|
@ -400,11 +410,12 @@ public class ExperimentConsistencyTestingService { |
|
|
|
Assert.isTrue(!samplePos.equals(A8kSamplePos.BloodSTubePos), "samplePos cannot be BloodSTubePos"); |
|
|
|
hbotMoveExCtrlService.moveToSamplePosXY(samplePos); |
|
|
|
liquidOperationCtrlService.takeSample(samplePos, preProcessPos, takeSampleUl); |
|
|
|
actionExecutor.sleep(1); |
|
|
|
//取混合液到预反应位 |
|
|
|
liquidOperationCtrlService.takePreReactionLiquidToReation(preProcessPos); |
|
|
|
actionExecutor.sleep(1); |
|
|
|
incubationPlateStateMgrService.startIncubating(freeIncubationPos, System.currentTimeMillis(), projBuildinInfo.reactionPlateIncubationTimeMin * 60); |
|
|
|
|
|
|
|
|
|
|
|
actionExecutor.sleep(1); |
|
|
|
} catch (AppException e) { |
|
|
|
if (e.getError().eq(A8kEcode.APPE_TAKE_SAMPLE_FAIL)) { |
|
|
|
hbotMoveExCtrlService.moveQuickToZero(); |
|
|
|