|
@ -0,0 +1,56 @@ |
|
|
|
|
|
package com.my.graphiteDigesterBg.task; |
|
|
|
|
|
import com.my.graphiteDigesterBg.MyDevice; |
|
|
|
|
|
import com.my.graphiteDigesterBg.diframe.DiTaskBase; |
|
|
|
|
|
import com.my.graphiteDigesterBg.diframe.Task; |
|
|
|
|
|
import com.my.graphiteDigesterBg.diframe.actuator.DiActMotor; |
|
|
|
|
|
import com.my.graphiteDigesterBg.diframe.actuator.DiActServo; |
|
|
|
|
|
import com.my.graphiteDigesterBg.resource.ResHeatingTubeRackSlot; |
|
|
|
|
|
import com.my.graphiteDigesterBg.resource.ResHeatingTubeRackSlotManager; |
|
|
|
|
|
@Task(name="SampleTakeOut") |
|
|
|
|
|
public class TaskSampleTakeOut extends DiTaskBase { |
|
|
|
|
|
// slot index |
|
|
|
|
|
public Integer slotIndex; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void run() { |
|
|
|
|
|
ResHeatingTubeRackSlotManager heatingSlotMan = this.getResourceManager(ResHeatingTubeRackSlotManager.class); |
|
|
|
|
|
ResHeatingTubeRackSlot slot = heatingSlotMan.getSlotByIndex(this.slotIndex); |
|
|
|
|
|
|
|
|
|
|
|
DiActMotor heatPlateMotor = this.getActuator(MyDevice.ACT_HEAT_PLATE_MOTOR, DiActMotor.class); |
|
|
|
|
|
DiActMotor transLrMotor = this.getActuator(MyDevice.ACT_TRANSFER_LR_MOTOR, DiActMotor.class); |
|
|
|
|
|
DiActMotor transUdMotor = this.getActuator(MyDevice.ACT_TRANSFER_UD_MOTOR, DiActMotor.class); |
|
|
|
|
|
DiActServo transferClipServo = this.getActuator(MyDevice.ACT_TRANSFER_CLIP_SERVO, DiActServo.class); |
|
|
|
|
|
DiActMotor liquidPlateMotor = this.getActuator(MyDevice.ACT_LIQUID_PLATE_MOTOR, DiActMotor.class); |
|
|
|
|
|
|
|
|
|
|
|
// 加热盘转盘移动到取放架位置 |
|
|
|
|
|
heatPlateMotor.moveTo(8580); // @TODO : 这里要根据位置计算 ~~~ |
|
|
|
|
|
// 打开试管架盖 |
|
|
|
|
|
slot.coverOpen(); |
|
|
|
|
|
// 搬运上升到顶部 |
|
|
|
|
|
transUdMotor.moveTo(1300); |
|
|
|
|
|
// 搬运移动到加热取架位置 |
|
|
|
|
|
transLrMotor.moveTo(1620); |
|
|
|
|
|
// 搬运下降到取架位置 |
|
|
|
|
|
transUdMotor.moveTo(130); |
|
|
|
|
|
// 打开试管架夹爪 |
|
|
|
|
|
transferClipServo.moveTo(2670); |
|
|
|
|
|
// 搬运上升到顶部 |
|
|
|
|
|
transUdMotor.moveTo(1300); |
|
|
|
|
|
// 搬运移动到加液取放架位置 |
|
|
|
|
|
transLrMotor.moveTo(365); |
|
|
|
|
|
// 加液转盘移动到取放位置 |
|
|
|
|
|
liquidPlateMotor.moveTo(642); |
|
|
|
|
|
// 搬运下降到放架位置 |
|
|
|
|
|
transUdMotor.moveTo(540); |
|
|
|
|
|
// 关闭试管架夹爪 |
|
|
|
|
|
transferClipServo.moveTo(2073); |
|
|
|
|
|
// 搬运上升到顶部 |
|
|
|
|
|
transUdMotor.moveTo(1300); |
|
|
|
|
|
// 关闭试管架盖 |
|
|
|
|
|
slot.coverClose(); |
|
|
|
|
|
// 搬运移动到就绪位置 |
|
|
|
|
|
transLrMotor.moveTo(1000); |
|
|
|
|
|
|
|
|
|
|
|
this.setStatus(TaskStatus.FINISHED); |
|
|
|
|
|
} |
|
|
|
|
|
} |