|
@ -88,12 +88,10 @@ public class HbotLittleBottleConsumableCalibration { |
|
|
|
|
|
|
|
|
LittleBottleConsumableType littleBottleConsumableType = LittleBottleConsumableType.BufferSolution; |
|
|
LittleBottleConsumableType littleBottleConsumableType = LittleBottleConsumableType.BufferSolution; |
|
|
List<LittleBottleConsumableRefPoint> littleBottleConsumableRefPoint = new java.util.ArrayList<>(); |
|
|
List<LittleBottleConsumableRefPoint> littleBottleConsumableRefPoint = new java.util.ArrayList<>(); |
|
|
LittleBottleConsumablePosInfo littleBottleConsumablePosInfo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "开始标定小瓶坐标", group = "标定小瓶XY坐标", order = 30) |
|
|
@ExtApiFn(name = "开始标定小瓶坐标", group = "标定小瓶XY坐标", order = 30) |
|
|
public void startCalibrateLittleBottleGroup(LittleBottleConsumableType type) throws AppException { |
|
|
public void startCalibrateLittleBottleGroup(LittleBottleConsumableType type) throws AppException { |
|
|
littleBottleConsumablePosInfo = null; |
|
|
|
|
|
littleBottleConsumableRefPoint = new java.util.ArrayList<>(); |
|
|
littleBottleConsumableRefPoint = new java.util.ArrayList<>(); |
|
|
littleBottleConsumableType = type; |
|
|
littleBottleConsumableType = type; |
|
|
moveToZero(); |
|
|
moveToZero(); |
|
@ -104,9 +102,9 @@ public class HbotLittleBottleConsumableCalibration { |
|
|
public Object addLittleBottleGroupRefPoint(ConsumableGroup group, Integer off0To24) throws AppException { |
|
|
public Object addLittleBottleGroupRefPoint(ConsumableGroup group, Integer off0To24) throws AppException { |
|
|
enableModule(); |
|
|
enableModule(); |
|
|
Pos2d xypos = hbotModule.readPos(); |
|
|
Pos2d xypos = hbotModule.readPos(); |
|
|
pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
|
|
|
Integer z = pipetteCtrlModule.zMotorReadMeasureDistanceResult(); |
|
|
|
|
|
LittleBottleConsumableRefPoint littleBufferRefPoint = new LittleBottleConsumableRefPoint(group, off0To24, new Pos3d(xypos.x, xypos.y, z)); |
|
|
|
|
|
|
|
|
// pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
|
|
|
// Integer z = pipetteCtrlModule.zMotorReadMeasureDistanceResult(); |
|
|
|
|
|
LittleBottleConsumableRefPoint littleBufferRefPoint = new LittleBottleConsumableRefPoint(group, off0To24, new Pos3d(xypos.x, xypos.y, 0)); |
|
|
this.littleBottleConsumableRefPoint.add(littleBufferRefPoint); |
|
|
this.littleBottleConsumableRefPoint.add(littleBufferRefPoint); |
|
|
disableModule(); |
|
|
disableModule(); |
|
|
ObjectNode node = ZJsonHelper.createObjectNode(); |
|
|
ObjectNode node = ZJsonHelper.createObjectNode(); |
|
@ -115,8 +113,15 @@ public class HbotLittleBottleConsumableCalibration { |
|
|
return node; |
|
|
return node; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "移除最后一个参考点", group = "标定小瓶XY坐标", order = 32) |
|
|
|
|
|
public void removeTheLastLittleBottleGroupRefPoint() { |
|
|
|
|
|
if (!littleBottleConsumableRefPoint.isEmpty()) { |
|
|
|
|
|
littleBottleConsumableRefPoint.remove(littleBottleConsumableRefPoint.size() - 1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "计算坐标", group = "标定小瓶XY坐标", order = 32) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "读取坐标计算结果", group = "标定小瓶XY坐标", order = 33) |
|
|
public LittleBottleConsumablePosInfo computeLittleBottlePosInfo() { |
|
|
public LittleBottleConsumablePosInfo computeLittleBottlePosInfo() { |
|
|
//计算y0,所有group==0,1,2,同时0<=off<5的点,求平均 |
|
|
//计算y0,所有group==0,1,2,同时0<=off<5的点,求平均 |
|
|
Double[] y = new Double[2]; |
|
|
Double[] y = new Double[2]; |
|
@ -191,7 +196,7 @@ public class HbotLittleBottleConsumableCalibration { |
|
|
|
|
|
|
|
|
var oldposInfo = hbotConsumablePosMgr.getLittleBottleConsumablePosInfo(littleBottleConsumableType); |
|
|
var oldposInfo = hbotConsumablePosMgr.getLittleBottleConsumablePosInfo(littleBottleConsumableType); |
|
|
|
|
|
|
|
|
littleBottleConsumablePosInfo = new LittleBottleConsumablePosInfo(); |
|
|
|
|
|
|
|
|
var littleBottleConsumablePosInfo = new LittleBottleConsumablePosInfo(); |
|
|
littleBottleConsumablePosInfo.g0_000 = new Pos3d(x[0].intValue(), y[0].intValue(), oldposInfo.g0_000.z); |
|
|
littleBottleConsumablePosInfo.g0_000 = new Pos3d(x[0].intValue(), y[0].intValue(), oldposInfo.g0_000.z); |
|
|
littleBottleConsumablePosInfo.g1_000 = new Pos3d(x[1].intValue(), y[0].intValue(), oldposInfo.g1_000.z); |
|
|
littleBottleConsumablePosInfo.g1_000 = new Pos3d(x[1].intValue(), y[0].intValue(), oldposInfo.g1_000.z); |
|
|
littleBottleConsumablePosInfo.g2_000 = new Pos3d(x[2].intValue(), y[0].intValue(), oldposInfo.g2_000.z); |
|
|
littleBottleConsumablePosInfo.g2_000 = new Pos3d(x[2].intValue(), y[0].intValue(), oldposInfo.g2_000.z); |
|
@ -203,12 +208,12 @@ public class HbotLittleBottleConsumableCalibration { |
|
|
return littleBottleConsumablePosInfo; |
|
|
return littleBottleConsumablePosInfo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "保存计算结果", group = "标定小瓶XY坐标", order = 33) |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "保存计算结果", group = "标定小瓶XY坐标", order = 34) |
|
|
public void saveLittleBottleConsumablePosInfo() throws AppException { |
|
|
public void saveLittleBottleConsumablePosInfo() throws AppException { |
|
|
hbotConsumablePosMgr.setLittleBottleConsumablePosInfo(littleBottleConsumableType, littleBottleConsumablePosInfo); |
|
|
|
|
|
|
|
|
hbotConsumablePosMgr.setLittleBottleConsumablePosInfo(littleBottleConsumableType, computeLittleBottlePosInfo()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "读取所有参考点", group = "标定小瓶XY坐标", order = 33) |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "读取所有参考点", group = "标定小瓶XY坐标", order = 35) |
|
|
public Object readAllRefPoint() throws AppException { |
|
|
public Object readAllRefPoint() throws AppException { |
|
|
return littleBottleConsumableRefPoint; |
|
|
return littleBottleConsumableRefPoint; |
|
|
} |
|
|
} |
|
@ -220,20 +225,26 @@ public class HbotLittleBottleConsumableCalibration { |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "校准.小瓶穿孔Z轴位置", group = "标定Z轴", order = 101) |
|
|
@ExtApiFn(name = "校准.小瓶穿孔Z轴位置", group = "标定Z轴", order = 101) |
|
|
public void setLittleBSPierceZPos() throws AppException { |
|
|
public void setLittleBSPierceZPos() throws AppException { |
|
|
|
|
|
enableModule(); |
|
|
pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
hbotConsumablePosMgr.setParam(HbotConsumablePosParam.LittleBSPierceZPos, pipetteCtrlModule.zMotorReadMeasureDistanceResult()); |
|
|
hbotConsumablePosMgr.setParam(HbotConsumablePosParam.LittleBSPierceZPos, pipetteCtrlModule.zMotorReadMeasureDistanceResult()); |
|
|
|
|
|
disableModule(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "校准.小瓶取样Z轴位置", group = "标定Z轴", order = 102) |
|
|
@ExtApiFn(name = "校准.小瓶取样Z轴位置", group = "标定Z轴", order = 102) |
|
|
public void setLittleBSSampleZPos() throws AppException { |
|
|
public void setLittleBSSampleZPos() throws AppException { |
|
|
|
|
|
enableModule(); |
|
|
pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
hbotConsumablePosMgr.setParam(HbotConsumablePosParam.LittleBSSampleZPos, pipetteCtrlModule.zMotorReadMeasureDistanceResult()); |
|
|
hbotConsumablePosMgr.setParam(HbotConsumablePosParam.LittleBSSampleZPos, pipetteCtrlModule.zMotorReadMeasureDistanceResult()); |
|
|
|
|
|
disableModule(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ExtApiFn(name = "校准.探测物质取样Z轴位置", group = "标定Z轴", order = 103) |
|
|
@ExtApiFn(name = "校准.探测物质取样Z轴位置", group = "标定Z轴", order = 103) |
|
|
public void setProbeSubstanceSampleZPos() throws AppException { |
|
|
public void setProbeSubstanceSampleZPos() throws AppException { |
|
|
|
|
|
enableModule(); |
|
|
pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
pipetteCtrlModule.zMotorMeasureDistance(); |
|
|
hbotConsumablePosMgr.setParam(HbotConsumablePosParam.ProbeSubstanceSampleZPos, pipetteCtrlModule.zMotorReadMeasureDistanceResult()); |
|
|
hbotConsumablePosMgr.setParam(HbotConsumablePosParam.ProbeSubstanceSampleZPos, pipetteCtrlModule.zMotorReadMeasureDistanceResult()); |
|
|
|
|
|
disableModule(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|