|
@ -8,6 +8,8 @@ import a8k.appbase.cfg.BottleGroupsPosInfo; |
|
|
import a8k.appbase.cfg.BottlesPosInfo; |
|
|
import a8k.appbase.cfg.BottlesPosInfo; |
|
|
import a8k.appbase.cfg.TipPickUpPosInfo; |
|
|
import a8k.appbase.cfg.TipPickUpPosInfo; |
|
|
import a8k.controler.engineer.utils.*; |
|
|
import a8k.controler.engineer.utils.*; |
|
|
|
|
|
import a8k.service.devicectrl.ctrl.SamplesPreProcesCtrl; |
|
|
|
|
|
import a8k.service.devicectrl.ctrl.TubeRackMoveCtrl; |
|
|
import a8k.service.hardware.canbus.A8kCanBusService; |
|
|
import a8k.service.hardware.canbus.A8kCanBusService; |
|
|
import a8k.service.hardware.canbus.protocol.A8kEcode; |
|
|
import a8k.service.hardware.canbus.protocol.A8kEcode; |
|
|
import a8k.service.hardware.canbus.protocol.MId; |
|
|
import a8k.service.hardware.canbus.protocol.MId; |
|
@ -50,6 +52,13 @@ public class TestScript { |
|
|
|
|
|
|
|
|
@Resource |
|
|
@Resource |
|
|
ReactionPlatesTransmitCtrl reactionPlatesTransmitCtrl; |
|
|
ReactionPlatesTransmitCtrl reactionPlatesTransmitCtrl; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
SamplesPreProcesCtrl samplesPreProcesCtrl; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
TubeRackMoveCtrl tubeRackMoveCtrl; |
|
|
|
|
|
|
|
|
EnginnerParamReader settingReader = new EnginnerParamReader(HbotControlService.class); |
|
|
EnginnerParamReader settingReader = new EnginnerParamReader(HbotControlService.class); |
|
|
|
|
|
|
|
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
@ -57,6 +66,13 @@ public class TestScript { |
|
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
Boolean testScriptWorkFlag = false; |
|
|
Boolean testScriptWorkFlag = false; |
|
|
|
|
|
|
|
|
|
|
|
void checkTestScriptWorkFlag() throws HardwareException { |
|
|
|
|
|
if (testScriptWorkFlag) { |
|
|
|
|
|
testScriptWorkFlag = false; |
|
|
|
|
|
throw new HardwareException(A8kEcode.TestScripIsRunning); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "停止测试脚本", group = "控制") |
|
|
@EnginnerPageAction(name = "停止测试脚本", group = "控制") |
|
|
public void testTakeAllTipStop() { |
|
|
public void testTakeAllTipStop() { |
|
|
testScriptWorkFlag = false; |
|
|
testScriptWorkFlag = false; |
|
@ -64,6 +80,8 @@ public class TestScript { |
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "取放Tip-单步", group = "Hbot测试脚本") |
|
|
@EnginnerPageAction(name = "取放Tip-单步", group = "Hbot测试脚本") |
|
|
public AppRet<Boolean> takeTipTestStep(Integer tipgroup, Integer index) throws HardwareException, InterruptedException { |
|
|
public AppRet<Boolean> takeTipTestStep(Integer tipgroup, Integer index) throws HardwareException, InterruptedException { |
|
|
|
|
|
checkTestScriptWorkFlag(); |
|
|
|
|
|
testScriptWorkFlag = true; |
|
|
var ret = hbotcs.takeTip(tipgroup, index); |
|
|
var ret = hbotcs.takeTip(tipgroup, index); |
|
|
TipPickUpPosInfo tipPos = pp.getTipPickUpPosInfo(); |
|
|
TipPickUpPosInfo tipPos = pp.getTipPickUpPosInfo(); |
|
|
|
|
|
|
|
@ -75,13 +93,13 @@ public class TestScript { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
canBus.stepMotorEasyMoveToZeroPointQuickBlock(MId.PipetteModZM, timep.getActionOvertime()); |
|
|
canBus.stepMotorEasyMoveToZeroPointQuickBlock(MId.PipetteModZM, timep.getActionOvertime()); |
|
|
|
|
|
testScriptWorkFlag = false; |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "取放Tip-全部", group = "Hbot测试脚本") |
|
|
@EnginnerPageAction(name = "取放Tip-全部", group = "Hbot测试脚本") |
|
|
public AppRet<Map<String, String>> testTakeAllTip(Integer groupId, Integer startFrom) throws HardwareException, InterruptedException { |
|
|
public AppRet<Map<String, String>> testTakeAllTip(Integer groupId, Integer startFrom) throws HardwareException, InterruptedException { |
|
|
// ObjectMapper mapper = new ObjectMapper(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkTestScriptWorkFlag(); |
|
|
|
|
|
|
|
|
testScriptWorkFlag = true; |
|
|
testScriptWorkFlag = true; |
|
|
Map<String, String> result = new HashMap<>(); |
|
|
Map<String, String> result = new HashMap<>(); |
|
@ -103,6 +121,8 @@ public class TestScript { |
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "测试所有小瓶缓冲液位置", group = "Hbot测试脚本") |
|
|
@EnginnerPageAction(name = "测试所有小瓶缓冲液位置", group = "Hbot测试脚本") |
|
|
public void testAllLittleBottleBufferPos(ConsumableGroup group) throws HardwareException, InterruptedException { |
|
|
public void testAllLittleBottleBufferPos(ConsumableGroup group) throws HardwareException, InterruptedException { |
|
|
|
|
|
checkTestScriptWorkFlag(); |
|
|
|
|
|
|
|
|
testScriptWorkFlag = true; |
|
|
testScriptWorkFlag = true; |
|
|
BottleGroupsPosInfo posInfo = pp.getBottleBufferPosInfo(); |
|
|
BottleGroupsPosInfo posInfo = pp.getBottleBufferPosInfo(); |
|
|
for (int i = 0; i < BottlesPosInfo.cgetMAX(); i++) { |
|
|
for (int i = 0; i < BottlesPosInfo.cgetMAX(); i++) { |
|
@ -119,6 +139,8 @@ public class TestScript { |
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "测试所有探测物质位置", group = "Hbot测试脚本") |
|
|
@EnginnerPageAction(name = "测试所有探测物质位置", group = "Hbot测试脚本") |
|
|
public void testAllDetectMaterialPos(ConsumableGroup group) throws HardwareException, InterruptedException { |
|
|
public void testAllDetectMaterialPos(ConsumableGroup group) throws HardwareException, InterruptedException { |
|
|
|
|
|
checkTestScriptWorkFlag(); |
|
|
|
|
|
|
|
|
testScriptWorkFlag = true; |
|
|
testScriptWorkFlag = true; |
|
|
for (int i = 0; i < BottlesPosInfo.cgetMAX(); i++) { |
|
|
for (int i = 0; i < BottlesPosInfo.cgetMAX(); i++) { |
|
|
BottleGroupsPosInfo pos = pp.getBottleBufferPosInfo(); |
|
|
BottleGroupsPosInfo pos = pp.getBottleBufferPosInfo(); |
|
@ -134,6 +156,8 @@ public class TestScript { |
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "测试所有大瓶缓冲液位置", group = "Hbot测试脚本") |
|
|
@EnginnerPageAction(name = "测试所有大瓶缓冲液位置", group = "Hbot测试脚本") |
|
|
public void testAllBigBottleBufferPos() throws HardwareException, InterruptedException { |
|
|
public void testAllBigBottleBufferPos() throws HardwareException, InterruptedException { |
|
|
|
|
|
checkTestScriptWorkFlag(); |
|
|
|
|
|
|
|
|
testScriptWorkFlag = true; |
|
|
testScriptWorkFlag = true; |
|
|
// 遍历枚举 ConsumableGroup |
|
|
// 遍历枚举 ConsumableGroup |
|
|
for (ConsumableGroup group : ConsumableGroup.values()) { |
|
|
for (ConsumableGroup group : ConsumableGroup.values()) { |
|
@ -149,6 +173,7 @@ public class TestScript { |
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "推全部板同时丢弃", group = "板夹移动测试脚本") |
|
|
@EnginnerPageAction(name = "推全部板同时丢弃", group = "板夹移动测试脚本") |
|
|
public void pushAllPlateAndDrop(ConsumableGroup PBCh, IncubatorPos startPos) throws HardwareException, InterruptedException { |
|
|
public void pushAllPlateAndDrop(ConsumableGroup PBCh, IncubatorPos startPos) throws HardwareException, InterruptedException { |
|
|
|
|
|
checkTestScriptWorkFlag(); |
|
|
testScriptWorkFlag = true; |
|
|
testScriptWorkFlag = true; |
|
|
reactionPlatesTransmitCtrl.checkBeforeMoveTrunable(); |
|
|
reactionPlatesTransmitCtrl.checkBeforeMoveTrunable(); |
|
|
reactionPlatesTransmitCtrl.checkBeforeMovePlateBox(); |
|
|
reactionPlatesTransmitCtrl.checkBeforeMovePlateBox(); |
|
@ -161,11 +186,50 @@ public class TestScript { |
|
|
reactionPlatesTransmitCtrl.pushPlateQuick(PBCh, index); |
|
|
reactionPlatesTransmitCtrl.pushPlateQuick(PBCh, index); |
|
|
reactionPlatesTransmitCtrl.pullPlate(index); |
|
|
reactionPlatesTransmitCtrl.pullPlate(index); |
|
|
reactionPlatesTransmitCtrl.dropPlate(); |
|
|
reactionPlatesTransmitCtrl.dropPlate(); |
|
|
if (testScriptWorkFlag) { |
|
|
|
|
|
|
|
|
if (!testScriptWorkFlag) { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
testScriptWorkFlag = false; |
|
|
testScriptWorkFlag = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "测试摇匀模组", group = "摇匀模组测试") |
|
|
|
|
|
public AppRet<Object> testSamplePreProcessModule() throws HardwareException, InterruptedException { |
|
|
|
|
|
checkTestScriptWorkFlag(); |
|
|
|
|
|
testScriptWorkFlag = true; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
tubeRackMoveCtrl.enterTubeHolder(); |
|
|
|
|
|
AppRet<String> scanResult = tubeRackMoveCtrl.moveTubeRackToScanPosAndScan(); |
|
|
|
|
|
if (!scanResult.isSuccess()) { |
|
|
|
|
|
tubeRackMoveCtrl.ejectTubeHolder(); |
|
|
|
|
|
return AppRet.message("没有扫到试管架的码", null); |
|
|
|
|
|
} |
|
|
|
|
|
if (scanResult.getData().equals("1111\r")) { |
|
|
|
|
|
tubeRackMoveCtrl.ejectTubeHolder(); |
|
|
|
|
|
return AppRet.message("不是全血试管架", null); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
AppRet<Boolean> isExistTube = tubeRackMoveCtrl.judgeTubeExist(0); |
|
|
|
|
|
AppRet<Boolean> isHighTube = tubeRackMoveCtrl.moveTubeToAltitJudgXPos(0); |
|
|
|
|
|
|
|
|
|
|
|
if (!isExistTube.getData()) { |
|
|
|
|
|
tubeRackMoveCtrl.ejectTubeHolder(); |
|
|
|
|
|
return AppRet.message("试管架上没有试管", null); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
samplesPreProcesCtrl.takeTubeAndJudgeTubeExist(isHighTube.getData()); |
|
|
|
|
|
samplesPreProcesCtrl.shakeTube(50, 5); |
|
|
|
|
|
samplesPreProcesCtrl.takeTubeCap(); |
|
|
|
|
|
samplesPreProcesCtrl.pushBackTubeCapAndTakeBakTube(); |
|
|
|
|
|
tubeRackMoveCtrl.ejectTubeHolder(); |
|
|
|
|
|
} finally { |
|
|
|
|
|
testScriptWorkFlag = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return AppRet.message("测试完成", null); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |