|
|
@ -163,15 +163,68 @@ public class Pipette { |
|
|
|
this.aspirateWithLiquidLevelFollow(volume, depth); |
|
|
|
} |
|
|
|
|
|
|
|
// 从急诊试管吸液 |
|
|
|
public void aspirateFromEmergencyTube( Integer index, Integer volume ) { |
|
|
|
UfCmdSnippetExecutor.execute(String.format("PipetteAspirateFromEmergencyTubePrepare.%d", index)); |
|
|
|
|
|
|
|
var maxDepth = UfMdbOption.getInteger("EmergencyTubeLiquidDetectMaxDepth"); |
|
|
|
var threshold = UfMdbOption.getInteger("EmergencyTubeLiquidDetectThreshold"); |
|
|
|
this.moveToLiquidLevel(maxDepth, threshold); |
|
|
|
|
|
|
|
Double coefficient = UfMdbOption.getDouble("EmergencyTubeLiquidLevelFollowCoefficient"); |
|
|
|
Integer depth = (int)(coefficient * volume); |
|
|
|
this.aspirateWithLiquidLevelFollow(volume, depth); |
|
|
|
} |
|
|
|
|
|
|
|
// 从样本Epp0.5吸液 |
|
|
|
public void aspirateFromSampleEpp0_5( Integer index, Integer volume ) { |
|
|
|
var tubeRackTubeStartPos = UfMdbOption.getInteger("SampleTubeRackTubeStartPos"); |
|
|
|
var tubeRackTubeDistance = UfMdbOption.getInteger("SampleTubeRackTubeDistance"); |
|
|
|
Map<String,Object> params = Map.of("tubePos", tubeRackTubeStartPos + index * tubeRackTubeDistance); |
|
|
|
UfCmdSnippetExecutor.execute("PipetteAspirateFromSampleEpp0.5", params); |
|
|
|
|
|
|
|
var maxDepth = UfMdbOption.getInteger("SampleTubeRackEpp0.5TubeLiquidDetectMaxDepth"); |
|
|
|
var threshold = UfMdbOption.getInteger("SampleTubeRackEpp0.5TubeLiquidDetectThreshold"); |
|
|
|
this.moveToLiquidLevel(maxDepth, threshold); |
|
|
|
|
|
|
|
Double coefficient = UfMdbOption.getDouble("SampleTubeRackEpp0.5TubeLiquidLevelFollowCoefficient"); |
|
|
|
Integer depth = (int)(coefficient * volume); |
|
|
|
this.aspirateWithLiquidLevelFollow(volume, depth); |
|
|
|
} |
|
|
|
|
|
|
|
// 从样本Epp0.5吸液 |
|
|
|
public void aspirateFromSampleEpp1_5( Integer index, Integer volume ) { |
|
|
|
var tubeRackTubeStartPos = UfMdbOption.getInteger("SampleTubeRackTubeStartPos"); |
|
|
|
var tubeRackTubeDistance = UfMdbOption.getInteger("SampleTubeRackTubeDistance"); |
|
|
|
Map<String,Object> params = Map.of("tubePos", tubeRackTubeStartPos + index * tubeRackTubeDistance); |
|
|
|
UfCmdSnippetExecutor.execute("PipetteAspirateFromSampleEpp1.5", params); |
|
|
|
|
|
|
|
var maxDepth = UfMdbOption.getInteger("SampleTubeRackEpp1.5TubeLiquidDetectMaxDepth"); |
|
|
|
var threshold = UfMdbOption.getInteger("SampleTubeRackEpp1.5TubeLiquidDetectThreshold"); |
|
|
|
this.moveToLiquidLevel(maxDepth, threshold); |
|
|
|
|
|
|
|
Double coefficient = UfMdbOption.getDouble("SampleTubeRackEpp1.5TubeLiquidLevelFollowCoefficient"); |
|
|
|
Integer depth = (int)(coefficient * volume); |
|
|
|
this.aspirateWithLiquidLevelFollow(volume, depth); |
|
|
|
} |
|
|
|
|
|
|
|
// 移动到液面 |
|
|
|
private void moveToLiquidLevel( Integer maxDepth, Integer threshold ) { |
|
|
|
int stepDepth = 10; |
|
|
|
int depth = 0; |
|
|
|
do { |
|
|
|
String capValStr = UfActuatorCmdExecutor.execute("Pipette", "read_pipette_capacitance_val"); |
|
|
|
int capVal = Integer.parseInt(capValStr); |
|
|
|
if ( capVal > threshold ) { |
|
|
|
break; |
|
|
|
int capMatchCount = 0; |
|
|
|
for ( int i=0; i<3; i++) { |
|
|
|
String capValStr = UfActuatorCmdExecutor.execute("Pipette", "read_pipette_capacitance_val"); |
|
|
|
LOG.info("[Pipette] Capacitance value : {}; threshold : {}", capValStr, threshold); |
|
|
|
int capVal = Integer.parseInt(capValStr); |
|
|
|
if ( capVal > threshold ) { |
|
|
|
capMatchCount ++; |
|
|
|
} |
|
|
|
UfCommon.delay(10); |
|
|
|
} |
|
|
|
if ( 1 < capMatchCount ) { |
|
|
|
break ; |
|
|
|
} |
|
|
|
|
|
|
|
depth += stepDepth; |
|
|
|