26 changed files with 658 additions and 557 deletions
-
1.gitignore
-
0sh/deply.bat
-
0sh/mkexe.bat
-
2sh/sync_from_board.bat
-
2src/main/java/a8k/app/constant/AppConstant.java
-
18src/main/java/a8k/app/controler/api/v1/engineer/ExperimentConsistencyTestingControler.java
-
205src/main/java/a8k/app/engineer/service/qatest/ExperimentConsistencyTestingService.java
-
12src/main/java/a8k/app/engineer/service/qatest/QATemperatureCtrlTestService.java
-
5src/main/java/a8k/app/engineer/service/type/TubeExConfig.java
-
16src/main/java/a8k/app/engineer/service/type/TubeHolderExConfig.java
-
2src/main/java/a8k/app/hardware/driver/CodeScanerDriver.java
-
19src/main/java/a8k/app/service/background/SensorDataUpdateService.java
-
1src/main/java/a8k/app/service/background/TemperatureCtrlService.java
-
12src/main/java/a8k/app/service/lowerctrl/HbotMoveExCtrlService.java
-
3src/main/java/a8k/app/service/lowerctrl/LiquidOperationCtrlService.java
-
6src/main/java/a8k/app/service/lowerctrl/OptScanModuleCtrlService.java
-
9src/main/java/a8k/app/service/statemgr/IncubationPlateStateMgrService.java
-
5src/main/java/a8k/app/service/statemgr/TubeStateMgrService.java
-
6src/main/java/a8k/extui/mgr/ExtApiPageGroupCfgMgr.java
-
228src/main/java/a8k/extui/page/extapp/P01PipetteGunVerification.java
-
97src/main/java/a8k/extui/page/extapp/profession_test/ExperimentConsistencyTestingPage.java
-
80src/main/java/a8k/extui/page/extapp/profession_test/P01PipetteGunVerification.java
-
0src/main/java/a8k/extui/page/extapp/profession_test/P02A8kTemperaturaVerfication.java
@ -0,0 +1,2 @@ |
|||
scp -r root@192.168.8.10://app/appresource/static/app .\appresource\static/ |
|||
scp root@192.168.8.10://app/appresource/db/app.db .\appresource\db/ |
@ -0,0 +1,5 @@ |
|||
package a8k.app.engineer.service.type; |
|||
|
|||
public class TubeExConfig { |
|||
public Integer repeatTimes = 1; |
|||
} |
@ -0,0 +1,16 @@ |
|||
package a8k.app.engineer.service.type; |
|||
|
|||
import a8k.app.constant.AppConstant; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
public class TubeHolderExConfig { |
|||
public List<TubeExConfig> tubeExConfigs = new ArrayList<>(); |
|||
|
|||
public TubeHolderExConfig() { |
|||
for (int i = 0; i < AppConstant.TUBEHOLER_SIZE; i++) { |
|||
tubeExConfigs.add(new TubeExConfig()); |
|||
} |
|||
} |
|||
} |
@ -1,228 +0,0 @@ |
|||
package a8k.extui.page.extapp; |
|||
|
|||
import a8k.app.constant.AppConstant; |
|||
import a8k.app.service.lowerctrl.LiquidOperationCtrlService; |
|||
import a8k.app.service.param.exparam.HbotConsumableExParamMgr; |
|||
import a8k.app.service.param.hbotpos.HbotTipPosMgr; |
|||
import a8k.app.service.param.pipetteparam.PipetteGunExParamMgr; |
|||
import a8k.extui.mgr.ExtApiPageMgr; |
|||
import a8k.extui.type.ExtUIPageCfg; |
|||
import a8k.app.hardware.type.LldType; |
|||
import a8k.app.service.lowerctrl.HbotMoveExCtrlService; |
|||
import a8k.app.hardware.driver.PipetteCtrlDriver; |
|||
import a8k.app.hardware.type.PipetteRegIndex; |
|||
import a8k.app.service.lowerctrl.HbotMoveCtrlService; |
|||
import a8k.app.type.a8k.ConsumableGroup; |
|||
import a8k.app.type.a8k.Pos3d; |
|||
import a8k.app.type.exception.AppException; |
|||
import a8k.app.type.a8k.pos.TipPos; |
|||
import a8k.app.type.a8k.pos.TipGroupPos; |
|||
import jakarta.annotation.PostConstruct; |
|||
import jakarta.annotation.Resource; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
public class P01PipetteGunVerification { |
|||
@Resource |
|||
HbotTipPosMgr hbotTipPosMgr; |
|||
|
|||
@Resource |
|||
PipetteCtrlDriver pipetteCtrlDriver; |
|||
@Resource |
|||
HbotMoveCtrlService hbotMoveCtrlService; |
|||
@Resource |
|||
HbotMoveExCtrlService hbotMoveExCtrlService; |
|||
|
|||
@Resource |
|||
HbotConsumableExParamMgr hbotConsumableExParamMgr; |
|||
|
|||
@Resource |
|||
PipetteGunExParamMgr pipetteGunExParamMgr; |
|||
|
|||
@Resource |
|||
ExtApiPageMgr extApiPageMgr; |
|||
|
|||
Integer tipNum = 0; |
|||
Integer liquidPos = null; |
|||
Boolean stopFlag = false; |
|||
|
|||
@PostConstruct |
|||
void init() { |
|||
ExtUIPageCfg page = new ExtUIPageCfg(this); |
|||
page.newGroup("基础"); |
|||
page.addFunction("测试准备", this::initTestMode); |
|||
page.addFunction("停止测试", this::stopTest); |
|||
page.addFunction("设置校准系数", this::calibration) |
|||
.setParamVal("coefficientA", () -> pipetteGunExParamMgr.getCoefficientA()) |
|||
.setParamVal("coefficientB", () -> pipetteGunExParamMgr.getCoefficientB()); |
|||
page.newGroup("测试0"); |
|||
page.addFunction("取一次10ul", this::aspirate10ul); |
|||
page.addFunction("取一次75ul", this::aspirate75ul); |
|||
page.newGroup("测试1"); |
|||
page.addFunction("取一次5ul", this::aspirate5ul); |
|||
page.addFunction("取一次30ul", this::aspirate30ul); |
|||
page.addFunction("取一次50ul", this::aspirate50ul); |
|||
page.addFunction("停止测试", this::stopTest); |
|||
|
|||
extApiPageMgr.addPage(page); |
|||
} |
|||
|
|||
public void pipetteGunInit() throws AppException { |
|||
pipetteCtrlDriver.pipetteInitDeviceBlock(); |
|||
} |
|||
|
|||
public void initTestMode() throws AppException { |
|||
pipetteCtrlDriver.zMotorEnable(1); |
|||
hbotMoveCtrlService.enable(1); |
|||
pipetteCtrlDriver.zMotorMoveZeroBlock(); |
|||
hbotMoveCtrlService.moveToZero(); |
|||
hbotMoveCtrlService.hbotMoveTo(hbotTipPosMgr.getDropTipPos()); |
|||
pipetteGunInit(); |
|||
hbotMoveCtrlService.hbotMoveTo(new Pos3d(0, 0, 0)); |
|||
tipNum = AppConstant.TIP_NUM; |
|||
} |
|||
|
|||
public void stopTest() throws AppException { |
|||
pipetteCtrlDriver.zMotorEnable(0); |
|||
hbotMoveCtrlService.enable(0); |
|||
} |
|||
|
|||
public void calibration(Double coefficientA, Double coefficientB) { |
|||
pipetteGunExParamMgr.setVolumeCalibrationCoefficient(coefficientA, coefficientB); |
|||
} |
|||
|
|||
|
|||
Boolean takeOneTip() throws AppException { |
|||
hbotMoveCtrlService.hbotMoveTo(hbotTipPosMgr.getDropTipPos()); |
|||
pipetteGunInit(); |
|||
TipPos tipPos = new TipPos(); |
|||
tipPos.group = TipGroupPos.TipG1; |
|||
if (tipNum == 0) { |
|||
tipNum = 120; |
|||
} |
|||
|
|||
tipPos.index = AppConstant.TIP_NUM - tipNum; |
|||
tipNum--; |
|||
log.info(" 取TIP {}", tipPos); |
|||
return hbotMoveExCtrlService.takeTipNoCheck(tipPos.group, tipPos.index); |
|||
} |
|||
|
|||
void takeTip() throws AppException { |
|||
while (!pipetteCtrlDriver.isHasTip()) { |
|||
if (takeOneTip()) { |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
public void pumpMoveTo(Integer pumpvmax, Double ul) throws AppException { |
|||
pipetteCtrlDriver.liquidOperationClearParams(); |
|||
pipetteCtrlDriver.liquidOperationSetGunRunParams(14, 14, 0, 1000, pumpvmax); |
|||
pipetteCtrlDriver.liquidOperationFreshParams(); |
|||
pipetteCtrlDriver.pipettePumpMoveTo(ul); |
|||
} |
|||
|
|||
public Integer lld() throws AppException { |
|||
liquidPos = 0; |
|||
hbotMoveExCtrlService.moveToLargeBSSamplePosXY(ConsumableGroup.CG1); |
|||
pipetteCtrlDriver.zMotorMoveToBlock(0); |
|||
pumpMoveTo(8000, 0.0); |
|||
pumpMoveTo(300, 100.0); |
|||
pumpMoveTo(8000, 0.0); |
|||
pumpMoveTo(300, 50.0); |
|||
|
|||
Pos3d toPos = hbotConsumableExParamMgr.getLargeBufferSamplePos(ConsumableGroup.CG1); |
|||
Pos3d maxPos = hbotConsumableExParamMgr.getLargeBufferSamplePosEnd(ConsumableGroup.CG1); |
|||
pipetteCtrlDriver.zMotorMoveToBlock(toPos.z); |
|||
pipetteCtrlDriver.liquidOperationClearParams(); |
|||
pipetteCtrlDriver.liquidOperationSetGunRunParams(14, 14, 0, 900, 30); |
|||
pipetteCtrlDriver.liquidOperationSetZMotorRunParams(toPos.z, maxPos.z, 60 * 80 / LiquidOperationCtrlService.helicalPitch); |
|||
pipetteCtrlDriver.liquidOperationFreshParams(); |
|||
pipetteCtrlDriver.pipetteLld(LldType.kplld, 0, 30); |
|||
if (pipetteCtrlDriver.lldIsDetectLiquid()) { |
|||
liquidPos = pipetteCtrlDriver.getReg(PipetteRegIndex.kreg_pipette_zm_pos); |
|||
} |
|||
pipetteCtrlDriver.zMotorMoveToBlock(0); |
|||
pumpMoveTo(8000, 0.0); |
|||
return liquidPos; |
|||
} |
|||
|
|||
public void takeLiquid(Double ul) throws AppException { |
|||
hbotMoveExCtrlService.moveToLargeBSSamplePosXY(ConsumableGroup.CG1); |
|||
pipetteCtrlDriver.zMotorMoveToBlock(0); |
|||
pumpMoveTo(8000, 0.0); |
|||
pumpMoveTo(8000, 150.0); |
|||
pipetteCtrlDriver.zMotorMoveToBlock(liquidPos); |
|||
pipetteCtrlDriver.liquidOperationClearParams(); |
|||
pipetteCtrlDriver.liquidOperationSetGunRunParams(14, 14, 0, 900, 100); |
|||
pipetteCtrlDriver.liquidOperationSetZMotorRunParams(0, 300, 10 * 80 / LiquidOperationCtrlService.helicalPitch); |
|||
pipetteCtrlDriver.liquidOperationFreshParams(); |
|||
ul = pipetteGunExParamMgr.calibrateVolume(ul); |
|||
log.info("取液体 {}", ul); |
|||
pipetteCtrlDriver.pipetteAspirate(ul); |
|||
pipetteCtrlDriver.zMotorMoveToBlock(0); |
|||
} |
|||
|
|||
public void distributeLiquid() throws AppException { |
|||
hbotMoveExCtrlService.moveToLargeBSSamplePosXY(ConsumableGroup.CG6); |
|||
pipetteCtrlDriver.zMotorMoveToBlock(50); |
|||
pumpMoveTo(8000, 0.0); |
|||
pipetteCtrlDriver.zMotorMoveToBlock(0); |
|||
} |
|||
|
|||
public void resetPos() throws AppException { |
|||
hbotMoveExCtrlService.moveToLargeBSSamplePosXY(ConsumableGroup.CG2); |
|||
} |
|||
|
|||
public void aspirate10ul() throws AppException { |
|||
takeTip(); |
|||
lld(); |
|||
if (liquidPos == 0) |
|||
throw AppException.ofAECodeError("未检测到液体"); |
|||
takeLiquid(10.0); |
|||
distributeLiquid(); |
|||
resetPos(); |
|||
} |
|||
|
|||
public void aspirate75ul() throws AppException { |
|||
takeTip(); |
|||
lld(); |
|||
if (liquidPos == 0) |
|||
throw AppException.ofAECodeError("未检测到液体"); |
|||
takeLiquid(75.0); |
|||
distributeLiquid(); |
|||
resetPos(); |
|||
} |
|||
|
|||
public void aspirate5ul() throws AppException { |
|||
takeTip(); |
|||
lld(); |
|||
if (liquidPos == 0) |
|||
throw AppException.ofAECodeError("未检测到液体"); |
|||
takeLiquid(5.0); |
|||
distributeLiquid(); |
|||
resetPos(); |
|||
} |
|||
|
|||
public void aspirate30ul() throws AppException { |
|||
takeTip(); |
|||
lld(); |
|||
if (liquidPos == 0) |
|||
throw AppException.ofAECodeError("未检测到液体"); |
|||
takeLiquid(30.0); |
|||
distributeLiquid(); |
|||
resetPos(); |
|||
} |
|||
|
|||
public void aspirate50ul() throws AppException { |
|||
takeTip(); |
|||
lld(); |
|||
if (liquidPos == 0) |
|||
throw AppException.ofAECodeError("未检测到液体"); |
|||
takeLiquid(50.0); |
|||
distributeLiquid(); |
|||
resetPos(); |
|||
} |
|||
} |
@ -0,0 +1,97 @@ |
|||
package a8k.extui.page.extapp.profession_test; |
|||
|
|||
|
|||
import a8k.app.engineer.service.qatest.ExperimentConsistencyTestingService; |
|||
import a8k.app.engineer.service.type.TubeExConfig; |
|||
import a8k.app.engineer.service.type.TubeHolderExConfig; |
|||
import a8k.app.type.exception.AppException; |
|||
import a8k.extui.mgr.ExtApiPageMgr; |
|||
import a8k.extui.type.ExtApiStatu; |
|||
import a8k.extui.type.ExtUIPageCfg; |
|||
import jakarta.annotation.PostConstruct; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
@RequiredArgsConstructor |
|||
public class ExperimentConsistencyTestingPage { |
|||
|
|||
private final ExtApiPageMgr extApiPageMgr; |
|||
private final ExperimentConsistencyTestingService experimentConsistencyTestingService; |
|||
|
|||
@ExtApiStatu(name = "", group = "试管1", order = 1) |
|||
public TubeExConfig getTubeExConfig1() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(0); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管2", order = 2) |
|||
public TubeExConfig getTubeExConfig2() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(1); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管3", order = 3) |
|||
public TubeExConfig getTubeExConfig3() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(2); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管4", order = 4) |
|||
public TubeExConfig getTubeExConfig4() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(3); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管5", order = 5) |
|||
public TubeExConfig getTubeExConfig5() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(4); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管6", order = 6) |
|||
public TubeExConfig getTubeExConfig6() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(5); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管7", order = 7) |
|||
public TubeExConfig getTubeExConfig7() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(6); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管8", order = 8) |
|||
public TubeExConfig getTubeExConfig8() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(7); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管9", order = 9) |
|||
public TubeExConfig getTubeExConfig9() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(8); |
|||
} |
|||
|
|||
@ExtApiStatu(name = "", group = "试管10", order = 10) |
|||
public TubeExConfig getTubeExConfig10() { |
|||
return experimentConsistencyTestingService.getTubeExConfig().tubeExConfigs.get(9); |
|||
} |
|||
|
|||
|
|||
@PostConstruct |
|||
void init() { |
|||
ExtUIPageCfg page = new ExtUIPageCfg(this); |
|||
page.newGroup("配置"); |
|||
page.addFunction("设置配置", this::setTubeRepeatTime).setParamVal("tubeOff", () -> 1).setParamVal("repeatTimes", () -> 1); |
|||
page.newGroup("基础"); |
|||
page.addFunction("开始测试", this::startTest); |
|||
extApiPageMgr.addPage(page); |
|||
} |
|||
|
|||
public void startTest() throws AppException { |
|||
experimentConsistencyTestingService.startTest(); |
|||
} |
|||
|
|||
public void setTubeRepeatTime(Integer tubeOff, Integer repeatTimes) { |
|||
tubeOff = tubeOff + 1; |
|||
TubeHolderExConfig tubeHolderExConfig = experimentConsistencyTestingService.getTubeExConfig(); |
|||
tubeHolderExConfig.tubeExConfigs.get(tubeOff).repeatTimes = repeatTimes; |
|||
log.info("setTubeRepeatTime: tubeOff = {}, repeatTimes = {}", tubeOff, repeatTimes); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
package a8k.extui.page.extapp.profession_test; |
|||
|
|||
import a8k.app.constant.AppConstant; |
|||
import a8k.app.engineer.service.qatest.LiquidAbsorptionAndDistributionTestService; |
|||
import a8k.app.service.lowerctrl.LiquidOperationCtrlService; |
|||
import a8k.app.service.param.exparam.HbotConsumableExParamMgr; |
|||
import a8k.app.service.param.hbotpos.HbotTipPosMgr; |
|||
import a8k.app.service.param.pipetteparam.PipetteGunExParamMgr; |
|||
import a8k.extui.mgr.ExtApiPageMgr; |
|||
import a8k.extui.type.ExtUIPageCfg; |
|||
import a8k.app.hardware.type.LldType; |
|||
import a8k.app.service.lowerctrl.HbotMoveExCtrlService; |
|||
import a8k.app.hardware.driver.PipetteCtrlDriver; |
|||
import a8k.app.hardware.type.PipetteRegIndex; |
|||
import a8k.app.service.lowerctrl.HbotMoveCtrlService; |
|||
import a8k.app.type.a8k.ConsumableGroup; |
|||
import a8k.app.type.a8k.Pos3d; |
|||
import a8k.app.type.exception.AppException; |
|||
import a8k.app.type.a8k.pos.TipPos; |
|||
import a8k.app.type.a8k.pos.TipGroupPos; |
|||
import jakarta.annotation.PostConstruct; |
|||
import jakarta.annotation.Resource; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
@RequiredArgsConstructor |
|||
public class P01PipetteGunVerification { |
|||
private final PipetteGunExParamMgr pipetteGunExParamMgr; |
|||
private final ExtApiPageMgr extApiPageMgr; |
|||
private final LiquidAbsorptionAndDistributionTestService liquidAbsorptionAndDistributionTestService; |
|||
|
|||
|
|||
@PostConstruct |
|||
void init() { |
|||
ExtUIPageCfg page = new ExtUIPageCfg(this); |
|||
page.newGroup("基础"); |
|||
page.addFunction("设置校准系数", this::setCalibrationParam) |
|||
.setParamVal("coefficientA", pipetteGunExParamMgr::getCoefficientA) |
|||
.setParamVal("coefficientB", pipetteGunExParamMgr::getCoefficientB); |
|||
page.newGroup("测试0"); |
|||
page.addFunction("取一次10ul", this::aspirate10ul); |
|||
page.addFunction("取一次75ul", this::aspirate75ul); |
|||
page.newGroup("测试1"); |
|||
page.addFunction("取一次5ul", this::aspirate5ul); |
|||
page.addFunction("取一次30ul", this::aspirate30ul); |
|||
page.addFunction("取一次50ul", this::aspirate50ul); |
|||
extApiPageMgr.addPage(page); |
|||
} |
|||
|
|||
|
|||
public void setCalibrationParam(Double coefficientA, Double coefficientB) { |
|||
pipetteGunExParamMgr.setVolumeCalibrationCoefficient(coefficientA, coefficientB); |
|||
} |
|||
|
|||
|
|||
public void aspirate10ul() throws AppException { |
|||
liquidAbsorptionAndDistributionTestService.absorbAndDistribute(10); |
|||
} |
|||
|
|||
public void aspirate75ul() throws AppException { |
|||
liquidAbsorptionAndDistributionTestService.absorbAndDistribute(75); |
|||
} |
|||
|
|||
public void aspirate5ul() throws AppException { |
|||
liquidAbsorptionAndDistributionTestService.absorbAndDistribute(5); |
|||
|
|||
} |
|||
|
|||
public void aspirate30ul() throws AppException { |
|||
liquidAbsorptionAndDistributionTestService.absorbAndDistribute(30); |
|||
} |
|||
|
|||
public void aspirate50ul() throws AppException { |
|||
liquidAbsorptionAndDistributionTestService.absorbAndDistribute(50); |
|||
|
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue