|
|
@ -3,6 +3,8 @@ import com.my.graphiteDigesterBg.MyDevice; |
|
|
|
import com.my.graphiteDigesterBg.diframe.DiTaskMoveBase; |
|
|
|
import com.my.graphiteDigesterBg.diframe.actuator.DiActMotor; |
|
|
|
import com.my.graphiteDigesterBg.diframe.actuator.DiActPeristalticPump; |
|
|
|
import com.my.graphiteDigesterBg.diframe.model.DiMdbNotification; |
|
|
|
import com.my.graphiteDigesterBg.resource.ResAcidBucket; |
|
|
|
import com.my.graphiteDigesterBg.resource.ResAcidManager; |
|
|
|
import com.my.graphiteDigesterBg.resource.ResHeatingTubeRackSlot; |
|
|
|
import com.my.graphiteDigesterBg.resource.ResHeatingTubeRackSlotManager; |
|
|
@ -75,6 +77,38 @@ public class MoveLiquidAdd extends DiTaskMoveBase { |
|
|
|
liquidMotor.moveTo("LiquidArmStandby"); |
|
|
|
this.shakeIfRequired(); |
|
|
|
liquidMotor.moveTo("LiquidArmStandby"); |
|
|
|
|
|
|
|
this.liquidVolumeCheckAndProcess(bucket); |
|
|
|
} |
|
|
|
|
|
|
|
// 液体体积检查和处理 |
|
|
|
private void liquidVolumeCheckAndProcess( ResAcidBucket bucket ) { |
|
|
|
String ioKey = "LiquidLevelSensor" + bucket.index; |
|
|
|
Integer ioValue = this.getDevice().getIO().getValue(ioKey); |
|
|
|
if ( 1 == ioValue ) { // 未达到下液位 |
|
|
|
return ; |
|
|
|
} |
|
|
|
|
|
|
|
// 已经达到下液位 |
|
|
|
if (!"water".equals(bucket.acidType)) { |
|
|
|
DiMdbNotification.warning("为保证后续操作正常, 请及时补充 桶位【"+(bucket.index + 1)+"】 酸液"); |
|
|
|
return ; |
|
|
|
} |
|
|
|
|
|
|
|
// 自动补水 |
|
|
|
this.getDevice().getIO().setValue("Water", 1); |
|
|
|
do { |
|
|
|
Integer waterUpValue = this.getDevice().getIO().getValue("LiquidLevelSensorWaterUp"); |
|
|
|
if ( 1 == waterUpValue ) { |
|
|
|
break; |
|
|
|
} |
|
|
|
try { |
|
|
|
Thread.sleep(300); |
|
|
|
} catch (InterruptedException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} while ( true ); |
|
|
|
this.getDevice().getIO().setValue("Water", 0); |
|
|
|
} |
|
|
|
|
|
|
|
// 摇匀 |
|
|
|