|
@ -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) |
|
|