Browse Source

update

tags/v0
zhaohe 9 months ago
parent
commit
7678bae1ce
  1. 4
      src/main/java/a8k/service/app/devicectrl/ctrlservice/HbotCtrlService.java
  2. 6
      src/main/java/a8k/service/app/devicectrl/param/calibration/HbotLittleBSPosCalibration.java
  3. 90
      src/main/java/a8k/service/app/devicectrl/param/calibration/HbotProbeSubstancePosCalibration.java
  4. 10
      src/main/java/a8k/service/app/devicectrl/param/param_mgr/HbotLittleBSPosMgr.java
  5. 16
      src/main/java/a8k/service/app/devicectrl/param/param_mgr/HbotProbeSubstancePosMgr.java
  6. BIN
      src/main/resources/app.db

4
src/main/java/a8k/service/app/devicectrl/ctrlservice/HbotCtrlService.java

@ -119,6 +119,10 @@ public class HbotCtrlService {
hbotBaseMoveExDriver.hbotMoveTo(hbotConsumableParamMgr.getProbeSubstanceSamplePos(group, off)); hbotBaseMoveExDriver.hbotMoveTo(hbotConsumableParamMgr.getProbeSubstanceSamplePos(group, off));
} }
public void moveToProbeSubstanceSamplePosEnd(ConsumableGroup group, Integer off) throws AppException {
hbotBaseMoveExDriver.hbotMoveTo(hbotConsumableParamMgr.getProbeSubstanceSamplePosEnd(group, off));
}
public void moveToLargeBufferPos(ConsumableGroup group) throws AppException { public void moveToLargeBufferPos(ConsumableGroup group) throws AppException {
Pos3d toPos = hbotConsumableParamMgr.getLargeBufferSamplePos(group); Pos3d toPos = hbotConsumableParamMgr.getLargeBufferSamplePos(group);
hbotBaseMoveExDriver.hbotMoveTo(toPos); hbotBaseMoveExDriver.hbotMoveTo(toPos);

6
src/main/java/a8k/service/app/devicectrl/param/calibration/HbotLittleBSPosCalibration.java

@ -153,7 +153,7 @@ public class HbotLittleBSPosCalibration {
@ExtApiFn(name = "校准.小瓶缓冲液取样结束Z轴位置", group = "标定Z轴", order = 104) @ExtApiFn(name = "校准.小瓶缓冲液取样结束Z轴位置", group = "标定Z轴", order = 104)
public void calibrationSampleEndZPos() throws AppException { public void calibrationSampleEndZPos() throws AppException {
//结束位置比设定位置高1mm的余量 //结束位置比设定位置高1mm的余量
calibrationZPos(HbotLittleBSPos.LittleBSSampleEndZPos, -15);
calibrationZPos(HbotLittleBSPos.LittleBSSampleEndZPos, -25);
} }
// //
@ -169,8 +169,10 @@ public class HbotLittleBSPosCalibration {
hbotCtrlService.moveToLittleBufferSamplePosEnd(group, i); hbotCtrlService.moveToLittleBufferSamplePosEnd(group, i);
pipetteCtrlDriver.zMotorMoveToZeroPointQuickBlock(); pipetteCtrlDriver.zMotorMoveToZeroPointQuickBlock();
if (checkStopFlag()) if (checkStopFlag())
return;
break;
} }
disableModule();
} }
@ExtApiFn(name = "停止校验", group = "校验", order = 304) @ExtApiFn(name = "停止校验", group = "校验", order = 304)

90
src/main/java/a8k/service/app/devicectrl/param/calibration/HbotProbeSubstancePosCalibration.java

@ -65,76 +65,77 @@ public class HbotProbeSubstancePosCalibration {
stopFlag = true; stopFlag = true;
} }
@ExtApiFn(name = "获取坐标", group = "基础", order = 1)
public Object getPoss() throws AppException {
return posMgr.getParams();
}
// 测试工具 // 测试工具
@ExtApiFn(name = "归零", group = "测试工具", order = 11)
@ExtApiFn(name = "归零", group = "测试工具", order = 1)
public void moveToZero() throws AppException { public void moveToZero() throws AppException {
enableModule(); enableModule();
pipetteCtrlDriver.zMotorMoveZeroBlock(); pipetteCtrlDriver.zMotorMoveZeroBlock();
hbotBaseMoveExDriver.moveToZero(); hbotBaseMoveExDriver.moveToZero();
disableModule();
} }
@ExtApiFn(name = "使能相关模块", group = "测试工具", order = 12)
@ExtApiFn(name = "获取坐标", group = "测试工具", order = 2)
public Object getPoss() throws AppException {
return posMgr.getParams();
}
@ExtApiFn(name = "使能相关模块", group = "测试工具", order = 3)
public void enableModule() throws AppException { public void enableModule() throws AppException {
pipetteCtrlDriver.zMotorEnable(1); pipetteCtrlDriver.zMotorEnable(1);
hbotDriver.enable(1);
hbotBaseMoveExDriver.enable(1);
} }
@ExtApiFn(name = "失能相关模块", group = "测试工具", order = 13)
@ExtApiFn(name = "失能相关模块", group = "测试工具", order = 4)
public void disableModule() throws AppException { public void disableModule() throws AppException {
pipetteCtrlDriver.zMotorEnable(0); pipetteCtrlDriver.zMotorEnable(0);
hbotDriver.enable(0);
hbotBaseMoveExDriver.enable(0);
} }
@ExtApiFn(name = "开始标定", group = "标定小瓶XY坐标", order = 30)
public void startCalibrateLittleBottleGroup() throws AppException {
refPoint = new java.util.ArrayList<>();
moveToZero();
//
@ExtApiFn(name = "标定1号耗材坐标", group = "标定耗材0号坐标", order = 30)
public Pos2d calibrationPos00(ConsumableGroup group) throws AppException {
enableModule();
Pos2d xypos = hbotDriver.readPos();
disableModule(); disableModule();
posMgr.setPos00(group, xypos);
return xypos;
} }
@ExtApiFn(name = "添加参考点", group = "标定小瓶XY坐标", order = 31)
public Object addLittleBottleGroupRefPoint(ConsumableGroup group, Integer off0To24) throws AppException {
Pos2d pos01;
Pos2d pos25;
@ExtApiFn(name = "步骤1.测量1号坐标", group = "标定Dy和Dy", order = 31)
public Pos2d measurePos01() throws AppException {
enableModule(); enableModule();
Pos2d xypos = hbotDriver.readPos();
LittleBottleConsumableRefPoint littleBufferRefPoint = new LittleBottleConsumableRefPoint(group, off0To24, new Pos3d(xypos.x, xypos.y, 0));
this.refPoint.add(littleBufferRefPoint);
pos01 = hbotDriver.readPos();
disableModule(); disableModule();
ObjectNode node = ZJsonHelper.createObjectNode();
node.put("newPoint", ZJsonHelper.createObjectNode(littleBufferRefPoint));
node.put("computeResult", ZJsonHelper.createObjectNode(computeLittleBottlePosInfo()));
return node;
return pos01;
} }
@ExtApiFn(name = "移除最后一个参考点", group = "标定小瓶XY坐标", order = 32)
public void removeTheLastLittleBottleGroupRefPoint() {
if (!refPoint.isEmpty()) {
refPoint.remove(refPoint.size() - 1);
}
@ExtApiFn(name = "步骤2.测量25号坐标", group = "标定Dy和Dy", order = 32)
public Pos2d measurePos25() throws AppException {
enableModule();
pos25 = hbotDriver.readPos();
disableModule();
return pos25;
} }
@ExtApiFn(name = "读取坐标计算结果", group = "标定小瓶XY坐标", order = 33)
public LittleBottleConsumablePosInfo computeLittleBottlePosInfo() {
return HbotLittleBSCalibrationAlgo.compute(refPoint);
@ExtApiFn(name = "步骤3.计算Dx和Dy", group = "标定Dy和Dy", order = 33)
public Object computeDxAndDy() throws AppException {
ObjectNode node = ZJsonHelper.createObjectNode();
node.put("dx", (pos25.x - pos01.x) / 4);
node.put("dy", (pos25.y - pos01.y) / 4);
return node;
} }
@ExtApiFn(name = "保存计算结果", group = "标定小瓶XY坐标", order = 34)
public void saveLittleBottleConsumablePosInfo() throws AppException {
posMgr.setPosInfo(computeLittleBottlePosInfo());
@ExtApiFn(name = "步骤4.设置Dx和Dy", group = "标定Dy和Dy", order = 34)
public void setDxAndDy(Double dx, Double dy) throws AppException {
posMgr.setParam(HbotProbeSubstancePos.ProbeSubstanceDX, dx);
posMgr.setParam(HbotProbeSubstancePos.ProbeSubstanceDY, dy);
} }
@ExtApiFn(name = "读取所有参考点", group = "标定小瓶XY坐标", order = 35)
public Object readAllRefPoint() throws AppException {
return refPoint;
}
// //
// 标定Z轴 // 标定Z轴
@ -151,7 +152,7 @@ public class HbotProbeSubstancePosCalibration {
public void setSampleZPos() throws AppException {setZPos(HbotProbeSubstancePos.ProbeSubstanceSampleZPos, 0);} public void setSampleZPos() throws AppException {setZPos(HbotProbeSubstancePos.ProbeSubstanceSampleZPos, 0);}
@ExtApiFn(name = "校准.小瓶缓冲液取样结束Z轴位置", group = "标定Z轴", order = 104) @ExtApiFn(name = "校准.小瓶缓冲液取样结束Z轴位置", group = "标定Z轴", order = 104)
public void setSampleEndZPos() throws AppException {setZPos(HbotProbeSubstancePos.ProbeSubstanceSampleEndZPos, 20/*2mm*/);}
public void setSampleEndZPos() throws AppException {setZPos(HbotProbeSubstancePos.ProbeSubstanceSampleEndZPos, -25/*2mm*/);}
// //
// 校验 // 校验
@ -162,11 +163,12 @@ public class HbotProbeSubstancePosCalibration {
enableModule(); enableModule();
pipetteCtrlDriver.zMotorMoveZeroBlock(); pipetteCtrlDriver.zMotorMoveZeroBlock();
for (int i = 0; i < AppConstant.CONSUMABLE_NUM; i++) { for (int i = 0; i < AppConstant.CONSUMABLE_NUM; i++) {
hbotCtrlService.moveToProbeSubstanceSamplePos(group, i);
hbotCtrlService.moveToProbeSubstanceSamplePosEnd(group, i);
pipetteCtrlDriver.zMotorMoveToZeroPointQuickBlock(); pipetteCtrlDriver.zMotorMoveToZeroPointQuickBlock();
if (checkStopFlag()) if (checkStopFlag())
return;
break;
} }
disableModule();
} }
@ExtApiFn(name = "停止校验", group = "校验", order = 304) @ExtApiFn(name = "停止校验", group = "校验", order = 304)

10
src/main/java/a8k/service/app/devicectrl/param/param_mgr/HbotLittleBSPosMgr.java

@ -29,16 +29,6 @@ public class HbotLittleBSPosMgr extends ParamMgr {
setParam(param.name(), val); setParam(param.name(), val);
} }
public void setPosInfo(LittleBottleConsumablePosInfo info) {
setParam(HbotLittleBSPos.LittleBufferGroup0_000Pos, info.g0_000);
setParam(HbotLittleBSPos.LittleBufferGroup1_000Pos, info.g1_000);
setParam(HbotLittleBSPos.LittleBufferGroup2_000Pos, info.g2_000);
setParam(HbotLittleBSPos.LittleBufferGroup3_000Pos, info.g3_000);
setParam(HbotLittleBSPos.LittleBufferGroup4_000Pos, info.g4_000);
setParam(HbotLittleBSPos.LittleBufferGroup5_000Pos, info.g5_000);
setParam(HbotLittleBSPos.LittleBufferGroupDX, info.dx);
setParam(HbotLittleBSPos.LittleBufferGroupDY, info.dy);
}
public void setPos00(ConsumableGroup group, Pos2d pos) { public void setPos00(ConsumableGroup group, Pos2d pos) {
HbotLittleBSPos param = HbotLittleBSPos.valueOf(HbotLittleBSPos.LittleBufferGroup0_000Pos.ordinal() + group.ordinal()); HbotLittleBSPos param = HbotLittleBSPos.valueOf(HbotLittleBSPos.LittleBufferGroup0_000Pos.ordinal() + group.ordinal());

16
src/main/java/a8k/service/app/devicectrl/param/param_mgr/HbotProbeSubstancePosMgr.java

@ -1,9 +1,11 @@
package a8k.service.app.devicectrl.param.param_mgr; package a8k.service.app.devicectrl.param.param_mgr;
import a8k.service.app.devicectrl.param.param_mgr.base.ParamMgr; import a8k.service.app.devicectrl.param.param_mgr.base.ParamMgr;
import a8k.service.app.devicectrl.param.type.HbotLittleBSPos;
import a8k.service.app.devicectrl.param.type.HbotProbeSubstancePos; import a8k.service.app.devicectrl.param.type.HbotProbeSubstancePos;
import a8k.type.ConsumableGroup; import a8k.type.ConsumableGroup;
import a8k.type.LittleBottleConsumablePosInfo; import a8k.type.LittleBottleConsumablePosInfo;
import a8k.type.cfg.Pos2d;
import a8k.type.cfg.Pos3d; import a8k.type.cfg.Pos3d;
import jakarta.annotation.PostConstruct; import jakarta.annotation.PostConstruct;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -14,7 +16,7 @@ import org.springframework.stereotype.Component;
* HBOT二维码扫描坐标参数 * HBOT二维码扫描坐标参数
*/ */
@Component @Component
public class HbotProbeSubstancePosMgr extends ParamMgr {
public class HbotProbeSubstancePosMgr extends ParamMgr {
static final Logger logger = LoggerFactory.getLogger(HbotProbeSubstancePosMgr.class); static final Logger logger = LoggerFactory.getLogger(HbotProbeSubstancePosMgr.class);
@ -30,15 +32,9 @@ public class HbotProbeSubstancePosMgr extends ParamMgr {
} }
public void setPosInfo(LittleBottleConsumablePosInfo info) {
setParam(HbotProbeSubstancePos.ProbeSubstanceGroup0_000Pos, info.g0_000);
setParam(HbotProbeSubstancePos.ProbeSubstanceGroup1_000Pos, info.g1_000);
setParam(HbotProbeSubstancePos.ProbeSubstanceGroup2_000Pos, info.g2_000);
setParam(HbotProbeSubstancePos.ProbeSubstanceGroup3_000Pos, info.g3_000);
setParam(HbotProbeSubstancePos.ProbeSubstanceGroup4_000Pos, info.g4_000);
setParam(HbotProbeSubstancePos.ProbeSubstanceGroup5_000Pos, info.g5_000);
setParam(HbotProbeSubstancePos.ProbeSubstanceDX, info.dx);
setParam(HbotProbeSubstancePos.ProbeSubstanceDY, info.dy);
public void setPos00(ConsumableGroup group, Pos2d pos) {
HbotProbeSubstancePos param = HbotProbeSubstancePos.valueOf(HbotProbeSubstancePos.ProbeSubstanceGroup0_000Pos.ordinal() + group.ordinal());
setParam(param, pos);
} }

BIN
src/main/resources/app.db

Loading…
Cancel
Save