|
|
@ -43,15 +43,101 @@ const liquidTubeIndex = ref(null); |
|
|
|
const heatTubeIndex = ref(null); |
|
|
|
/** @var {Number} */ |
|
|
|
const errorSlotIndex = ref(4); |
|
|
|
// liquid plate point map |
|
|
|
const liquidPlatePointMap = { |
|
|
|
'LiquidPlateTubePoint.0' : 0, |
|
|
|
'LiquidPlateTubePoint.1' : 0, |
|
|
|
'LiquidPlateTubePoint.2' : 0, |
|
|
|
'LiquidPlateTubePoint.3' : 0, |
|
|
|
'LiquidPlateTubePoint.4' : 0, |
|
|
|
'LiquidPlateTubePoint.5' : 0, |
|
|
|
'LiquidPlateTubePoint.6' : 0, |
|
|
|
'LiquidPlateTubePoint.7' : 0, |
|
|
|
'LiquidPlateTubePoint.8' : 0, |
|
|
|
'LiquidPlateTubePoint.9' : 0, |
|
|
|
'LiquidPlateTubePoint.10' : 0, |
|
|
|
'LiquidPlateTubePoint.11' : 0, |
|
|
|
'LiquidPlateTubePoint.12' : 0, |
|
|
|
'LiquidPlateTubePoint.13' : 0, |
|
|
|
'LiquidPlateTubePoint.14' : 0, |
|
|
|
'LiquidPlateTubePoint.15' : 0, |
|
|
|
}; |
|
|
|
// heating plate point map |
|
|
|
const heatingPlateOffsetMap = { |
|
|
|
'HeatPlateTubeOffset.0' : 0, |
|
|
|
'HeatPlateTubeOffset.1' : 0, |
|
|
|
'HeatPlateTubeOffset.2' : 0, |
|
|
|
'HeatPlateTubeOffset.3' : 0, |
|
|
|
'HeatPlateTubeOffset.4' : 0, |
|
|
|
'HeatPlateTubeOffset.5' : 0, |
|
|
|
'HeatPlateTubeOffset.6' : 0, |
|
|
|
'HeatPlateTubeOffset.7' : 0, |
|
|
|
'HeatPlateTubeOffset.8' : 0, |
|
|
|
'HeatPlateTubeOffset.9' : 0, |
|
|
|
'HeatPlateTubeOffset.10' : 0, |
|
|
|
'HeatPlateTubeOffset.11' : 0, |
|
|
|
'HeatPlateTubeOffset.12' : 0, |
|
|
|
'HeatPlateTubeOffset.13' : 0, |
|
|
|
'HeatPlateTubeOffset.14' : 0, |
|
|
|
'HeatPlateTubeOffset.15' : 0, |
|
|
|
}; |
|
|
|
|
|
|
|
const transLrHeatPlateTubePointMap = { |
|
|
|
'TransLrMotorHeatPlateTube.0' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.1' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.2' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.3' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.4' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.5' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.6' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.7' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.8' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.9' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.10' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.11' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.12' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.13' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.14' : 0, |
|
|
|
'TransLrMotorHeatPlateTube.15' : 0, |
|
|
|
}; |
|
|
|
|
|
|
|
const transLrLiquidPlageTubePointMap = { |
|
|
|
'TransLrMotorLiquidPlateTube.0' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.1' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.2' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.3' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.4' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.5' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.6' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.7' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.8' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.9' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.10' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.11' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.12' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.13' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.14' : 0, |
|
|
|
'TransLrMotorLiquidPlateTube.15' : 0, |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const heatingPlateMiddleMap = { |
|
|
|
'HeatPlateSlot.0' : 0, |
|
|
|
'HeatPlateSlot.1' : 0, |
|
|
|
'HeatPlateSlot.2' : 0, |
|
|
|
'HeatPlateSlot.3' : 0, |
|
|
|
'HeatPlateSlot.4' : 0, |
|
|
|
}; |
|
|
|
|
|
|
|
// 移动至加液区域 |
|
|
|
async function actionMoveToLiquidPlate() { |
|
|
|
let index = liquidTubeIndex.value; |
|
|
|
let errSlotIndex = errorSlotIndex.value; |
|
|
|
|
|
|
|
// - 加热转盘移至取试管架位置 |
|
|
|
await actuatorExecuteAction('HeatingPlateMotor','MoveToName',[`HeatPlateSlot.${errSlotIndex}`]); |
|
|
|
|
|
|
|
// - 加热转盘移至取试管位置 |
|
|
|
let pos = heatingPlateMiddleMap[`HeatPlateSlot.${errSlotIndex}`] + heatingPlateOffsetMap[`HeatPlateTubeOffset.${index}`]; |
|
|
|
await actuatorExecuteAction('HeatingPlateMotor','MoveToPosition',[pos]); |
|
|
|
|
|
|
|
// - 打开盖子 |
|
|
|
await actuatorExecuteAction(`HeatingPlateMotorSlotCover_${index}`, 'MoveToName', ['HeatPlateSlotCoverOpen']); |
|
|
|
|
|
|
@ -61,29 +147,32 @@ async function actionMoveToLiquidPlate() { |
|
|
|
// - 搬运夹爪打开 |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoOpenFromTube']); |
|
|
|
|
|
|
|
// - 搬运左右移至取试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorHeatPlateSlot']); |
|
|
|
// - 搬运左右移至取试管位置 |
|
|
|
pos = transLrPointMap[`TransLrMotorHeatPlateTube.${index}`]; |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToPosition',[pos]); |
|
|
|
|
|
|
|
// - 搬运上下移至取试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorHeatPlateDepth']); |
|
|
|
// - 搬运上下移至取试管位置 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToPosition',[0]); |
|
|
|
|
|
|
|
// - 搬运夹爪关闭 |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoRackClip']); |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToPosition',[0]); |
|
|
|
|
|
|
|
// - 搬运上下移至顶部 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']); |
|
|
|
|
|
|
|
// - 搬运左右移至加液试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorLiquid']); |
|
|
|
// - 搬运左右移至加液试管位置 |
|
|
|
pos = transLrLiquidPlageTubePointMap[`TransLrMotorLiquidPlateTube.${index}`]; |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToPosition',[pos]); |
|
|
|
|
|
|
|
// - 加液盘转动到试管架放置位置 |
|
|
|
await actuatorExecuteAction('LiquidPlateMotor','MoveToName',[`LiquidPlatePlaceTubeRack`]); |
|
|
|
pos = liquidPlatePointMap[`LiquidPlateTubePoint.${index}`]; |
|
|
|
await actuatorExecuteAction('LiquidPlateMotor','MoveToPosition',[pos]); |
|
|
|
|
|
|
|
// - 搬运上下移至放置试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorLiquidDepth']); |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToPosition',[0]); |
|
|
|
|
|
|
|
// - 搬运夹爪关闭 |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoOpenFromTube']); |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToPosition',[0]); |
|
|
|
|
|
|
|
// - 搬运上下移至顶部 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']); |
|
|
@ -100,14 +189,16 @@ async function actionMoveToHeatingPlate() { |
|
|
|
let index = heatTubeIndex.value; |
|
|
|
let errSlotIndex = errorSlotIndex.value; |
|
|
|
|
|
|
|
// - 加热转盘移至取试管架位置 |
|
|
|
// - 加热转盘移至取试管位置 |
|
|
|
let pos = heatingPlateMiddleMap[`HeatPlateSlot.${index}`] + heatingPlateOffsetMap[`HeatPlateTubeOffset.${errSlotIndex}`]; |
|
|
|
await actuatorExecuteAction('HeatingPlateMotor','MoveToName',[`HeatPlateSlot.${errSlotIndex}`]); |
|
|
|
|
|
|
|
// - 打开盖子 |
|
|
|
await actuatorExecuteAction(`HeatingPlateMotorSlotCover_${index}`, 'MoveToName', ['HeatPlateSlotCoverOpen']); |
|
|
|
|
|
|
|
// - 加液盘转动到试管架放置位置 |
|
|
|
await actuatorExecuteAction('LiquidPlateMotor','MoveToName',[`LiquidPlatePlaceTubeRack`]); |
|
|
|
// - 加液盘转动到试管放置位置 |
|
|
|
pos = liquidPlatePointMap[`LiquidPlateTubePoint.${index}`]; |
|
|
|
await actuatorExecuteAction('LiquidPlateMotor','MoveToName',[pos]); |
|
|
|
|
|
|
|
// - 搬运上下移至顶部 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']); |
|
|
@ -115,11 +206,12 @@ async function actionMoveToHeatingPlate() { |
|
|
|
// - 搬运夹爪关闭 |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoClose']); |
|
|
|
|
|
|
|
// - 搬运左右移至加液试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorLiquid']); |
|
|
|
// - 搬运左右移至加液试管位置 |
|
|
|
pos = transLrLiquidPlageTubePointMap[`TransLrMotorLiquidPlateTube.${index}`]; |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',[pos]); |
|
|
|
|
|
|
|
// - 搬运上下移至放置试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorLiquidDepth']); |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',[0]); |
|
|
|
|
|
|
|
// - 搬运夹爪打开 |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoRackClip']); |
|
|
@ -128,10 +220,11 @@ async function actionMoveToHeatingPlate() { |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorTop']); |
|
|
|
|
|
|
|
// - 搬运左右移至取试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',['TransLrMotorHeatPlateSlot']); |
|
|
|
pos = transLrHeatPlateTubePointMap[`TransLrMotorHeatPlateTube.${index}`]; |
|
|
|
await actuatorExecuteAction('TransferArmLRMotor','MoveToName',[pos]); |
|
|
|
|
|
|
|
// - 搬运上下移至取试管架位置 |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',['TransUdMotorHeatPlateDepth']); |
|
|
|
await actuatorExecuteAction('TransferArmUDMotor','MoveToName',[0]); |
|
|
|
|
|
|
|
// - 搬运夹爪关闭 |
|
|
|
await actuatorExecuteAction('TransferClipServeMotor','MoveToName',['TransClipServoClose']); |
|
|
|