Browse Source

recode

master
zhaohe 2 months ago
parent
commit
4f392ddc22
  1. 13
      src/main/java/a8k/app/engineer/service/qatest/LiquidAbsorptionAndDistributionTestService.java
  2. 2
      src/main/java/a8k/app/hardware/driver/TemperatureControlDriver.java
  3. 2
      src/main/java/a8k/app/service/lowerctrl/HbotMoveCtrlService.java
  4. 29
      src/main/java/a8k/app/service/lowerctrl/HbotMoveExCtrlService.java
  5. 157
      src/main/java/a8k/app/service/lowerctrl/LiquidOperationCtrService.java
  6. 60
      src/main/java/a8k/app/service/param/exparam/HbotConsumableExParamMgr.java
  7. 17
      src/main/java/a8k/app/service/param/hbotpos/HbotLargeBottleBSPosMgr.java
  8. 71
      src/main/java/a8k/app/service/param/hbotpos/HbotLittleBSPosMgr.java
  9. 27
      src/main/java/a8k/app/service/param/hbotpos/HbotProbeSubstancePosMgr.java
  10. 6
      src/main/java/a8k/app/service/param/hbotpos/HbotSamplePosParamMgr.java
  11. 2
      src/main/java/a8k/app/service/param/hbotpos/HbotTipPosMgr.java
  12. 2
      src/main/java/a8k/app/service/param/misc/TemperatureCtrlParamMgr.java
  13. 4
      src/main/java/a8k/extui/oldpage/pos_calibration/HbotTipPosCalibration.java
  14. 2
      src/main/java/a8k/extui/page/extapp/profession_test/P02A8kTemperaturaVerfication.java
  15. 4
      src/main/java/a8k/extui/page/test/verification/P32HbotPosVerificationPage.java
  16. 4
      src/main/java/a8k/extui/page/test/verification/P50VerificationScriptPage.java

13
src/main/java/a8k/app/engineer/service/qatest/LiquidAbsorptionAndDistributionTestService.java

@ -10,7 +10,7 @@ import a8k.app.hardware.type.pipette_module.param.AspirationParam;
import a8k.app.hardware.type.pipette_module.param.DistribuAllParam;
import a8k.app.service.lowerctrl.*;
import a8k.app.service.module.TipOperationCtrlModule;
import a8k.app.service.param.exparam.HbotConsumableExParamMgr;
import a8k.app.service.param.hbotpos.HbotLargeBottleBSPosMgr;
import a8k.app.service.utils.UISender;
import a8k.app.type.a8k.ConsumableGroup;
import a8k.app.type.a8k.Pos3d;
@ -41,12 +41,13 @@ public class LiquidAbsorptionAndDistributionTestService {
/*
* 状态管理器
*/
final private HbotMoveExCtrlService hbotMoveExCtrlService;
final private HbotMoveExCtrlService hbotMoveExCtrlService;
final private TipOperationCtrlModule tipOperationCtrlModule;
final private PipetteCtrlDriverV2 pipetteCtrlDriverV2;
final private HbotMoveCtrlService hbotMoveCtrlService;
final private HbotConsumableExParamMgr hbotConsumableExParamMgr;
final private HbotMoveCtrlService hbotMoveCtrlService;
final private HbotLargeBottleBSPosMgr hbotLargeBottleBSPosMgr;
Config config = new Config();
@ -97,8 +98,8 @@ public class LiquidAbsorptionAndDistributionTestService {
tipOperationCtrlModule.tryTakeTip();
Pos3d LBBSPos1 = hbotConsumableExParamMgr.getLargeBuffer(ConsumableGroup.CG1);
Pos3d LBBSPos6 = hbotConsumableExParamMgr.getLargeBuffer(ConsumableGroup.CG6);
Pos3d LBBSPos1 = hbotLargeBottleBSPosMgr.getPos(ConsumableGroup.CG1);
Pos3d LBBSPos6 = hbotLargeBottleBSPosMgr.getPos(ConsumableGroup.CG6);
hbotMoveExCtrlService.moveToXY(LBBSPos1);
pipetteCtrlDriverV2.aspirateBlock(new AspirationParam(

2
src/main/java/a8k/app/hardware/driver/TemperatureControlDriver.java

@ -4,7 +4,7 @@ import a8k.app.hardware.channel.A8kCanBusService;
import a8k.app.hardware.type.CmdId;
import a8k.app.hardware.type.TemperatureControlerMid;
import a8k.app.hardware.type.TemperatureControlerRegIndex;
import a8k.app.service.param.pos.TemperatureCtrlParamMgr;
import a8k.app.service.param.misc.TemperatureCtrlParamMgr;
import a8k.app.type.param.TemperatureCtrlParam;
import a8k.app.type.exception.AppException;
import jakarta.annotation.Resource;

2
src/main/java/a8k/app/service/lowerctrl/HbotMoveCtrlService.java

@ -32,8 +32,6 @@ public class HbotMoveCtrlService {
private final HbotDriver hbotDriver;
private final InputDetectDriver inputDetectDriver;
Integer ao = 20000;
public void checkBeforeMove() throws AppException {
// 检查盖板是否关闭
if (!inputDetectDriver.getIOState(InputIOId.PlateBoxCoverClosurePPS)) {

29
src/main/java/a8k/app/service/lowerctrl/HbotMoveExCtrlService.java

@ -2,16 +2,12 @@ package a8k.app.service.lowerctrl;
import a8k.app.constant.GearBacklashConstant;
import a8k.app.hardware.driver.PipetteCtrlDriverV2;
import a8k.app.service.param.hbotpos.Hbot2DCodeScanParamMgr;
import a8k.app.service.param.hbotpos.*;
import a8k.app.type.a8k.ConsumableGroup;
import a8k.app.type.a8k.pos.TipGroupPos;
import a8k.app.type.a8k.Pos2d;
import a8k.app.type.a8k.Pos3d;
import a8k.app.hardware.driver.HbotDriver;
import a8k.app.service.param.hbotpos.HbotTipPosMgr;
import a8k.app.service.param.exparam.HbotConsumableExParamMgr;
import a8k.app.service.param.hbotpos.HbotFixedPosParamMgr;
import a8k.app.service.param.hbotpos.HbotSamplePosParamMgr;
import a8k.app.type.param.type.A8kSamplePos;
import a8k.app.type.param.hbotpos.HbotSamplePos;
import a8k.app.type.exception.AppException;
@ -28,9 +24,10 @@ public class HbotMoveExCtrlService {
private final HbotFixedPosParamMgr hbotFixedPosParamMgr;
private final HbotSamplePosParamMgr hbotSamplePosParamMgr;
private final HbotConsumableExParamMgr hbotConsumableExParamMgr;
private final HbotTipPosMgr hbotTipPosMgr;
private final Hbot2DCodeScanParamMgr hbot2DCodeScanParamMgr;
private final HbotLittleBSPosMgr hbotLittleBSPosMgr;
private final HbotLargeBottleBSPosMgr hbotLargeBottleBSPosMgr;
private final PipetteCtrlDriverV2 pipetteCtrlDriver;
private final HbotMoveCtrlService hbotMoveCtrlService;
@ -45,7 +42,7 @@ public class HbotMoveExCtrlService {
* @throws AppException 异常
*/
public void moveToTakeTipXYPos(TipGroupPos tipGroupPos, Integer index) throws AppException {
Pos2d tipPos = hbotConsumableExParamMgr.getTipPos(tipGroupPos, index);
Pos2d tipPos = hbotTipPosMgr.getTipPos(tipGroupPos, index);
hbotMoveCtrlService.hbotMoveTo(tipPos);
}
@ -63,7 +60,7 @@ public class HbotMoveExCtrlService {
public void moveToTakeTipObservationPos(TipGroupPos tipGroupPos, Integer index, Integer zpos) throws AppException {
log.info("moveToTakeTipObservationPos groupId:{} index:{}", tipGroupPos.ordinal(), index);
Pos2d tipPos = hbotConsumableExParamMgr.getTipPos(tipGroupPos, index);
Pos2d tipPos = hbotTipPosMgr.getTipPos(tipGroupPos, index);
Pos3d observePos = new Pos3d(tipPos.x, tipPos.y, zpos);
Pos3d nowPos = getPos();
if (nowPos.z.equals(observePos.z)) {
@ -75,7 +72,6 @@ public class HbotMoveExCtrlService {
}
public void moveToDropTipPos() throws AppException {
log.info("moveToDropTipPos");
hbotMoveCtrlService.hbotMoveTo(hbotTipPosMgr.getDropTipPos());
@ -122,25 +118,26 @@ public class HbotMoveExCtrlService {
}
public void moveToLittleBufferPiercePos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveCtrlService.hbotMoveTo(hbotConsumableExParamMgr.getLittleBufferPiercePos(group, off));
hbotMoveCtrlService.hbotMoveTo(hbotLittleBSPosMgr.getLittleBSPiercePos(group, off));
}
public void moveToLittleBufferSamplePos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveCtrlService.hbotMoveTo(hbotConsumableExParamMgr.getLittleBufferSamplePos(group, off));
public void moveToLittleBufferContainerPos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveCtrlService.hbotMoveTo(hbotLittleBSPosMgr.getLittleBSContainerPos(group, off));
}
public void moveToProbeSubstanceSamplePos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveCtrlService.hbotMoveTo(hbotConsumableExParamMgr.getProbeSubstanceContainerPos(group, off));
public void moveToProbeSubstanceContainerPos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveCtrlService.hbotMoveTo(hbotLittleBSPosMgr.getProbeSubstanceContainerPos(group, off));
}
public void moveToProbeSubstancePiercePos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveCtrlService.hbotMoveTo(hbotConsumableExParamMgr.getProbeSubstancePiercePos(group, off));
hbotMoveCtrlService.hbotMoveTo(hbotLittleBSPosMgr.getProbeSubstancePiercePos(group, off));
}
public void moveToLargeBSContainerPos(ConsumableGroup group) throws AppException {
Pos3d toPos = hbotConsumableExParamMgr.getLargeBuffer(group);
Pos3d toPos = hbotLargeBottleBSPosMgr.getPos(group);
hbotMoveCtrlService.hbotMoveTo(toPos);
}

157
src/main/java/a8k/app/service/lowerctrl/LiquidOperationCtrService.java

@ -11,10 +11,7 @@ import a8k.app.hardware.type.pipette_module.cpyidx.LiquidConfigCpyIdx;
import a8k.app.hardware.type.pipette_module.param.AspirationParam;
import a8k.app.hardware.type.pipette_module.param.DistribuAllParam;
import a8k.app.service.module.TipOperationCtrlModule;
import a8k.app.service.param.exparam.HbotConsumableExParamMgr;
import a8k.app.service.param.hbotpos.HbotFixedPosParamMgr;
import a8k.app.service.param.hbotpos.HbotSamplePosParamMgr;
import a8k.app.service.statemgr.GStateMgrService;
import a8k.app.service.param.hbotpos.*;
import a8k.app.service.utils.UISender;
import a8k.app.service.utils.ZAppChecker;
import a8k.app.type.a8k.ConsumableType;
@ -34,24 +31,21 @@ public class LiquidOperationCtrService {
static public final Integer MIX_VOLUME_UL = 200;
private final GStateMgrService gstate;
/*
* CTRL-SERVICE
*/
private final HbotMoveExCtrlService hbotMoveExCtrlService;
private final PipetteCtrlDriverV2 pipetteCtrlDriverV2;
/*
* PARAM-MGR
*/
private final HbotConsumableExParamMgr hbotConsumableExParamMgr;
private final HbotLittleBSPosMgr hbotLittleBSPosMgr;
private final HbotLargeBottleBSPosMgr hbotLargeBottleBSPosMgr;
/**
* StateMgr
*/
private final HbotSamplePosParamMgr hbotSamplePosParamMgr;
private final HbotFixedPosParamMgr hbotFixedPosParamMgr;
private final HbotSamplePosParamMgr hbotSamplePosParamMgr;
private final HbotFixedPosParamMgr hbotFixedPosParamMgr;
private final TipOperationCtrlModule tipOperationCtrlModule;
@ -76,9 +70,9 @@ public class LiquidOperationCtrService {
tipOperationCtrlModule.tryTakeTip();
ZAppChecker.check(pipetteCtrlDriverV2.readTipState(), A8kEcode.CODEERROR, "未检测到TIP");
Pos3d largeBSContainerPos = hbotConsumableExParamMgr.getLargeBuffer(from.group);//大瓶缓冲液位置
Pos3d probeSubstanceContainerPos = hbotConsumableExParamMgr.getProbeSubstanceContainerPos(topos.group, topos.index);//探测物质位置
Pos3d probeSubstancePiercePos = hbotConsumableExParamMgr.getProbeSubstancePiercePos(topos.group, topos.index);//探测物质刺破位置
Pos3d largeBSContainerPos = hbotLargeBottleBSPosMgr.getPos(from.group);//大瓶缓冲液位置
Pos3d probeSubstanceContainerPos = hbotLittleBSPosMgr.getProbeSubstanceContainerPos(topos.group, topos.index);//探测物质位置
Pos3d probeSubstancePiercePos = hbotLittleBSPosMgr.getProbeSubstancePiercePos(topos.group, topos.index);//探测物质刺破位置
// 刺破探测物质
@ -191,10 +185,10 @@ public class LiquidOperationCtrService {
ContainerCpyId containerCpyId;
if (pos.type.equals(ConsumableType.ProbeSubstance)) {
pircePos = hbotConsumableExParamMgr.getProbeSubstancePiercePos(pos.group, pos.index);
pircePos = hbotLittleBSPosMgr.getProbeSubstancePiercePos(pos.group, pos.index);
containerCpyId = ContainerCpyId.DetectSubstancesCup;
} else {
pircePos = hbotConsumableExParamMgr.getLittleBufferPiercePos(pos.group, pos.index);
pircePos = hbotLittleBSPosMgr.getLittleBSPiercePos(pos.group, pos.index);
containerCpyId = ContainerCpyId.LittleBufferCup;
}
@ -219,10 +213,10 @@ public class LiquidOperationCtrService {
Integer shakeTimes = 5;
if (pos.type.equals(ConsumableType.ProbeSubstance)) {
reactionPos = hbotConsumableExParamMgr.getProbeSubstanceContainerPos(pos.group, pos.index);
reactionPos = hbotLittleBSPosMgr.getProbeSubstanceContainerPos(pos.group, pos.index);
containerCpyId = ContainerCpyId.DetectSubstancesCup;
} else {
reactionPos = hbotConsumableExParamMgr.getLittleBufferSamplePos(pos.group, pos.index);
reactionPos = hbotLittleBSPosMgr.getLittleBSContainerPos(pos.group, pos.index);
containerCpyId = ContainerCpyId.LittleBufferCup;
}
if (projBuildinInfo != null) {
@ -248,67 +242,67 @@ public class LiquidOperationCtrService {
));
}
/**
* 取样本液到预反应位混合后再取样
* @param from
* @param pos
* @param ul
* @throws AppException
*/
public void takeSampleToPreReactionPosAndAspirate(A8kSamplePos from, PreReactionPos pos, Integer ul) throws AppException {
log.info("takeSampleToPreReactionPosAndTakeToReactionPlate: from={}, pos={}, ul={}ul", from, pos, ul);
takeSampleOnly(from, ul);
Pos3d reactionPos;
ContainerCpyId containerCpyId;
Integer shakeUl = MIX_VOLUME_UL;
Integer shakeTimes = 5;
if (pos.type.equals(ConsumableType.ProbeSubstance)) {
reactionPos = hbotConsumableExParamMgr.getProbeSubstanceContainerPos(pos.group, pos.index);
containerCpyId = ContainerCpyId.DetectSubstancesCup;
} else {
reactionPos = hbotConsumableExParamMgr.getLittleBufferSamplePos(pos.group, pos.index);
containerCpyId = ContainerCpyId.LittleBufferCup;
}
if (projBuildinInfo != null) {
shakeUl = projBuildinInfo.mixedLiquidMixingVolUl;
shakeTimes = projBuildinInfo.mixedLiquidMixingTimes;
}
// 移动到反应位
UISender.txInfoMsg(log, "移动到预先反应位置:%s", reactionPos);
hbotMoveExCtrlService.moveToXY(reactionPos);
//z轴移动到反应位
UISender.txInfoMsg(log, "分配样本");
pipetteCtrlDriverV2.distributeAllBlock(new DistribuAllParam(
reactionPos.z,
containerCpyId,
LiquidConfigCpyIdx.Default,
false,
DistribuType.SURFACE_DIST,
shakeUl * 10, // 预先反应位置的液体量
shakeTimes,
false
));
UISender.txInfoMsg(log, "取混合液");
pipetteCtrlDriverV2.aspirateBlock(new AspirationParam(
750, // 预先反应位置的液体量
reactionPos.z,
containerCpyId,
LiquidConfigCpyIdx.Default,
0,
0,
0,
0,
0,
0,
0,
0
));
}
// /**
// * 取样本液到预反应位混合后再取样
// * @param from
// * @param pos
// * @param ul
// * @throws AppException
// */
// public void takeSampleToPreReactionPosAndAspirate(A8kSamplePos from, PreReactionPos pos, Integer ul) throws AppException {
// log.info("takeSampleToPreReactionPosAndTakeToReactionPlate: from={}, pos={}, ul={}ul", from, pos, ul);
// takeSampleOnly(from, ul);
//
// Pos3d reactionPos;
// ContainerCpyId containerCpyId;
// Integer shakeUl = MIX_VOLUME_UL;
// Integer shakeTimes = 5;
//
// if (pos.type.equals(ConsumableType.ProbeSubstance)) {
// reactionPos = hbotLittleBSPosMgr.getProbeSubstanceContainerPos(pos.group, pos.index);
// containerCpyId = ContainerCpyId.DetectSubstancesCup;
// } else {
// reactionPos = hbotLittleBSPosMgr.getLittleBSContainerPos(pos.group, pos.index);
// containerCpyId = ContainerCpyId.LittleBufferCup;
// }
// if (projBuildinInfo != null) {
// shakeUl = projBuildinInfo.mixedLiquidMixingVolUl;
// shakeTimes = projBuildinInfo.mixedLiquidMixingTimes;
// }
//
// // 移动到反应位
// UISender.txInfoMsg(log, "移动到预先反应位置:%s", reactionPos);
// hbotMoveExCtrlService.moveToXY(reactionPos);
//
// //z轴移动到反应位
// UISender.txInfoMsg(log, "分配样本");
// pipetteCtrlDriverV2.distributeAllBlock(new DistribuAllParam(
// reactionPos.z,
// containerCpyId,
// LiquidConfigCpyIdx.Default,
// false,
// DistribuType.SURFACE_DIST,
// shakeUl * 10, // 预先反应位置的液体量
// shakeTimes,
// false
// ));
//
// UISender.txInfoMsg(log, "取混合液");
// pipetteCtrlDriverV2.aspirateBlock(new AspirationParam(
// 750, // 预先反应位置的液体量
// reactionPos.z,
// containerCpyId,
// LiquidConfigCpyIdx.Default,
// 0,
// 0,
// 0,
// 0,
// 0,
// 0,
// 0,
// 0
// ));
// }
/**
@ -325,14 +319,13 @@ public class LiquidOperationCtrService {
ContainerCpyId containerCpyId;
if (pos.type.equals(ConsumableType.ProbeSubstance)) {
reactionPos = hbotConsumableExParamMgr.getProbeSubstanceContainerPos(pos.group, pos.index);
reactionPos = hbotLittleBSPosMgr.getProbeSubstanceContainerPos(pos.group, pos.index);
containerCpyId = ContainerCpyId.DetectSubstancesCup;
} else {
reactionPos = hbotConsumableExParamMgr.getLittleBufferSamplePos(pos.group, pos.index);
reactionPos = hbotLittleBSPosMgr.getLittleBSContainerPos(pos.group, pos.index);
containerCpyId = ContainerCpyId.LittleBufferCup;
}
UISender.txInfoMsg(log, "移动到预先反应位置:%s", reactionPos);
hbotMoveExCtrlService.moveToXY(reactionPos);

60
src/main/java/a8k/app/service/param/exparam/HbotConsumableExParamMgr.java

@ -1,60 +0,0 @@
package a8k.app.service.param.exparam;
import a8k.app.type.a8k.ConsumableGroup;
import a8k.app.service.param.hbotpos.HbotLargeBottleBSPosMgr;
import a8k.app.service.param.hbotpos.HbotLittleBSPosMgr;
import a8k.app.service.param.hbotpos.HbotProbeSubstancePosMgr;
import a8k.app.service.param.hbotpos.HbotTipPosMgr;
import a8k.app.type.a8k.Pos2d;
import a8k.app.type.a8k.Pos3d;
import a8k.app.type.a8k.pos.TipGroupPos;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;
/**
* HBOT二维码扫描坐标参数
*/
@Component
public class HbotConsumableExParamMgr {
@Resource
HbotLittleBSPosMgr hbotLittleBSPosMgr;
@Resource
HbotLargeBottleBSPosMgr hbotLargeBottleBSPosMgr;
@Resource
HbotTipPosMgr hbotTipPosMgr;
@Resource
HbotProbeSubstancePosMgr hbotProbeSubstancePosMgr;
@PostConstruct
void initialize() {
}
public Pos2d getTipPos(TipGroupPos tipGroupPos, Integer tipoff) {
return hbotTipPosMgr.getTipPos(tipGroupPos, tipoff);
}
public Pos3d getLittleBufferPiercePos(ConsumableGroup group, Integer off) {
return hbotLittleBSPosMgr.getLittleBSPiercePos(group, off);
}
public Pos3d getLittleBufferSamplePos(ConsumableGroup group, Integer off) {
return hbotLittleBSPosMgr.getLittleBSSamplePos(group, off);
}
public Pos3d getProbeSubstanceContainerPos(ConsumableGroup group, Integer off) {
return hbotProbeSubstancePosMgr.getContainerPos(group, off);
}
public Pos3d getProbeSubstancePiercePos(ConsumableGroup group, Integer off) {
return hbotProbeSubstancePosMgr.getPiercePos(group, off);
}
public Pos3d getLargeBuffer(ConsumableGroup group) {
return hbotLargeBottleBSPosMgr.getPos(group);
}
}

17
src/main/java/a8k/app/service/param/hbotpos/HbotLargeBottleBSPosMgr.java

@ -3,7 +3,6 @@ package a8k.app.service.param.hbotpos;
import a8k.app.type.a8k.ConsumableGroup;
import a8k.app.service.param.base.ParamMgr;
import a8k.app.type.param.hbotpos.HbotLargeBottleBSPos;
import a8k.app.type.a8k.Pos2d;
import a8k.app.type.a8k.Pos3d;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
@ -31,14 +30,14 @@ public class HbotLargeBottleBSPosMgr extends ParamMgr {
setParam(param.name(), val);
}
public void setPos0(Pos3d pos) {
setParam(HbotLargeBottleBSPos.LargeBuffer_0Pos, pos);
}
public void setDxAndDy(double dx, double dy) {
setParam(HbotLargeBottleBSPos.LargeBuffer_DX, dx);
setParam(HbotLargeBottleBSPos.LargeBuffer_DY, dy);
}
// public void setPos0(Pos3d pos) {
// setParam(HbotLargeBottleBSPos.LargeBuffer_0Pos, pos);
// }
//
// public void setDxAndDy(double dx, double dy) {
// setParam(HbotLargeBottleBSPos.LargeBuffer_DX, dx);
// setParam(HbotLargeBottleBSPos.LargeBuffer_DY, dy);
// }
public Pos3d getPos(ConsumableGroup group) {
Pos3d pos00 = getParam(HbotLargeBottleBSPos.LargeBuffer_0Pos, Pos3d.class);

71
src/main/java/a8k/app/service/param/hbotpos/HbotLittleBSPosMgr.java

@ -5,16 +5,16 @@ import a8k.app.service.param.base.ParamMgr;
import a8k.app.type.param.hbotpos.HbotLittleBSPos;
import a8k.app.type.a8k.Pos3d;
import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
/**
* HBOT二维码扫描坐标参数
*/
@Component
@Slf4j
public class HbotLittleBSPosMgr extends ParamMgr {
static final Logger logger = LoggerFactory.getLogger(HbotLittleBSPosMgr.class);
@PostConstruct
@ -28,7 +28,7 @@ public class HbotLittleBSPosMgr extends ParamMgr {
for (int i = 0; i < 25; i++) {
getLittleBSPos(group, i);
getLittleBSPiercePos(group, i);
getLittleBSSamplePos(group, i);
getLittleBSContainerPos(group, i);
}
}
}
@ -37,7 +37,7 @@ public class HbotLittleBSPosMgr extends ParamMgr {
setParam(param.name(), val);
}
public Pos3d getLittleBSPos(ConsumableGroup group, Integer off) {
private Pos3d getLittleBSPos(ConsumableGroup group, Integer off) {
Pos3d pos00 = getParam(HbotLittleBSPos.LittleBufferGroup0_000Pos, Pos3d.class);
Double gdx = getParam(HbotLittleBSPos.GroupDX, Double.class);
@ -45,18 +45,7 @@ public class HbotLittleBSPosMgr extends ParamMgr {
Double dx = getParam(HbotLittleBSPos.LittleBufferDX, Double.class);
Double dy = getParam(HbotLittleBSPos.LittleBufferDY, Double.class);
Integer xoff = off % 5;
Integer yoff = off / 5;
Integer gxoff = group.off % 3;
Integer gyoff = group.off / 3;
double x = pos00.x + xoff * dx + gxoff * gdx;
double y = pos00.y + yoff * dy + gyoff * gdy;
double z = pos00.z;
return new Pos3d((int) x, (int) y, (int)z);
return computePos3d(group, off, pos00, gdx, gdy, dx, dy);
}
@ -68,9 +57,8 @@ public class HbotLittleBSPosMgr extends ParamMgr {
return pos;
}
public Pos3d getLittleBSSamplePos(ConsumableGroup group, Integer off) {
Pos3d pos = getLittleBSPos(group, off);
return pos;
public Pos3d getLittleBSContainerPos(ConsumableGroup group, Integer off) {
return getLittleBSPos(group, off);
}
@ -82,29 +70,18 @@ public class HbotLittleBSPosMgr extends ParamMgr {
Double dx = getParam(HbotLittleBSPos.ProbeSubstanceDX, Double.class);
Double dy = getParam(HbotLittleBSPos.ProbeSubstanceDY, Double.class);
Integer xoff = off % 5;
Integer yoff = off / 5;
Integer gxoff = group.off % 3;
Integer gyoff = group.off / 3;
double x = pos00.x + xoff * dx + gxoff * gdx;
double y = pos00.y + yoff * dy + gyoff * gdy;
double z = pos00.z;
return new Pos3d((int) x, (int) y, (int) z);
}
return computePos3d(group, off, pos00, gdx, gdy, dx, dy);
public Double getGroupDX() {
return getParam(HbotLittleBSPos.GroupDX, Double.class);
}
public Double getGroupDY() {
return getParam(HbotLittleBSPos.GroupDY, Double.class);
}
// public Double getGroupDX() {
// return getParam(HbotLittleBSPos.GroupDX, Double.class);
// }
//
// public Double getGroupDY() {
// return getParam(HbotLittleBSPos.GroupDY, Double.class);
// }
public Pos3d getProbeSubstanceContainerPos(ConsumableGroup group, Integer off) {
@ -117,4 +94,20 @@ public class HbotLittleBSPosMgr extends ParamMgr {
pos.y += getParam(HbotLittleBSPos.ProbeSubstancePierceXYAppendDistance, Double.class).intValue();
return pos;
}
@NotNull private Pos3d computePos3d(ConsumableGroup group, Integer off, Pos3d pos00, Double gdx, Double gdy, Double dx, Double dy) {
Integer xOff = off % 5;
Integer yOff = off / 5;
Integer gxOff = group.off % 3;
Integer gyOff = group.off / 3;
double x = pos00.x + xOff * dx + gxOff * gdx;
double y = pos00.y + yOff * dy + gyOff * gdy;
double z = pos00.z;
return new Pos3d((int) x, (int) y, (int) z);
}
}

27
src/main/java/a8k/app/service/param/hbotpos/HbotProbeSubstancePosMgr.java

@ -1,27 +0,0 @@
package a8k.app.service.param.hbotpos;
import a8k.app.service.param.base.ParamMgr;
import a8k.app.type.a8k.ConsumableGroup;
import a8k.app.type.a8k.Pos3d;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;
/**
* HBOT二维码扫描坐标参数
*/
@Component
public class HbotProbeSubstancePosMgr extends ParamMgr {
@Resource
HbotLittleBSPosMgr hbotLittleBSPosMgr;
public Pos3d getContainerPos(ConsumableGroup group, Integer off) {
return hbotLittleBSPosMgr.getProbeSubstanceContainerPos(group, off);
}
public Pos3d getPiercePos(ConsumableGroup group, Integer off) {
return hbotLittleBSPosMgr.getProbeSubstancePiercePos(group, off);
}
}

6
src/main/java/a8k/app/service/param/hbotpos/HbotSamplePosParamMgr.java

@ -5,14 +5,16 @@ import a8k.app.type.param.type.A8kSamplePos;
import a8k.app.type.param.hbotpos.HbotSamplePos;
import a8k.app.type.a8k.Pos3d;
import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
*
*/
@Component
@Slf4j
@RequiredArgsConstructor
public class HbotSamplePosParamMgr extends ParamMgr {
@PostConstruct

2
src/main/java/a8k/app/service/param/hbotpos/HbotTipPosMgr.java

@ -7,6 +7,7 @@ import a8k.app.type.param.hbotpos.HbotTipPosParam;
import a8k.app.type.a8k.Pos3d;
import a8k.app.type.a8k.pos.TipGroupPos;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
@ -14,6 +15,7 @@ import org.springframework.util.Assert;
* HBOT二维码扫描坐标参数
*/
@Component
@Slf4j
public class HbotTipPosMgr extends ParamMgr {
@PostConstruct

2
src/main/java/a8k/app/service/param/pos/TemperatureCtrlParamMgr.java → src/main/java/a8k/app/service/param/misc/TemperatureCtrlParamMgr.java

@ -1,4 +1,4 @@
package a8k.app.service.param.pos;
package a8k.app.service.param.misc;
import a8k.app.service.param.base.ParamMgr;
import a8k.app.type.param.TemperatureCtrlParam;

4
src/main/java/a8k/extui/oldpage/pos_calibration/HbotTipPosCalibration.java

@ -6,10 +6,8 @@ import a8k.app.hardware.driver.PipetteCtrlDriverV2;
import a8k.app.service.module.TipOperationCtrlModule;
import a8k.extui.mgr.ExtApiPageMgr;
import a8k.app.service.lowerctrl.HbotMoveCtrlService;
import a8k.app.service.param.exparam.HbotConsumableExParamMgr;
import a8k.app.service.param.hbotpos.HbotTipPosMgr;
import a8k.app.hardware.driver.HbotDriver;
import a8k.app.service.lowerctrl.HbotMoveExCtrlService;
import a8k.app.type.a8k.Pos2d;
import a8k.app.type.a8k.Pos3d;
import a8k.app.type.exception.AppException;
@ -35,9 +33,7 @@ public class HbotTipPosCalibration {
private final HbotMoveCtrlService hbotMoveCtrlService;
private final HbotMoveExCtrlService hbotMoveExCtrlService;
private final HbotTipPosMgr hbotTipPosMgr;
private final HbotConsumableExParamMgr hbotConsumableExParamMgr;
private final TipOperationCtrlModule tipOperationCtrlModule;

2
src/main/java/a8k/extui/page/extapp/profession_test/P02A8kTemperaturaVerfication.java

@ -2,7 +2,7 @@ package a8k.extui.page.extapp;
import a8k.app.hardware.driver.TemperatureControlDriver;
import a8k.app.service.background.TemperatureCtrlService;
import a8k.app.service.param.pos.TemperatureCtrlParamMgr;
import a8k.app.service.param.misc.TemperatureCtrlParamMgr;
import a8k.app.type.exception.AppException;
import a8k.app.type.param.TemperatureCtrlParam;
import a8k.extui.factory.CurveBuilder;

4
src/main/java/a8k/extui/page/test/verification/P32HbotPosVerificationPage.java

@ -63,11 +63,11 @@ public class P32HbotPosVerificationPage {
}
public void moveToLittleBufferSamplePos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveExCtrlService.moveToLittleBufferSamplePos(group, off);
hbotMoveExCtrlService.moveToLittleBufferContainerPos(group, off);
}
public void moveToProbeSubstanceSamplePos(ConsumableGroup group, Integer off) throws AppException {
hbotMoveExCtrlService.moveToProbeSubstanceSamplePos(group, off);
hbotMoveExCtrlService.moveToProbeSubstanceContainerPos(group, off);
}
public void moveToProbeSubstancePiercePos(ConsumableGroup group, Integer off) throws AppException {

4
src/main/java/a8k/extui/page/test/verification/P50VerificationScriptPage.java

@ -138,7 +138,7 @@ public class P50VerificationScriptPage {
public void verifyLittleBSPierceAndSamplePos(ConsumableGroup group) throws AppException {
for (int i = 0; i < AppConstant.CONSUMABLE_NUM; i++) {
hbotMoveExCtrlService.moveToLittleBufferPiercePos(group, i);
hbotMoveExCtrlService.moveToLittleBufferSamplePos(group, i);
hbotMoveExCtrlService.moveToLittleBufferContainerPos(group, i);
pipetteCtrlDriver.zMotorMoveToZeroPointQuickBlock();
// if (checkStopFlag())
// break;
@ -148,7 +148,7 @@ public class P50VerificationScriptPage {
public void verifyProbeSubstancePierceAndSamplePos(ConsumableGroup group) throws AppException {
for (int i = 0; i < AppConstant.CONSUMABLE_NUM; i++) {
hbotMoveExCtrlService.moveToProbeSubstanceSamplePos(group, i);
hbotMoveExCtrlService.moveToProbeSubstanceContainerPos(group, i);
hbotMoveExCtrlService.moveToProbeSubstancePiercePos(group, i);
pipetteCtrlDriver.zMotorMoveToZeroPointQuickBlock();
// if (checkStopFlag())

Loading…
Cancel
Save