|
|
@ -5,6 +5,7 @@ import a8k.extapi_controler.utils.ExtApiFn; |
|
|
|
import a8k.extapi_controler.utils.ExtApiTab; |
|
|
|
import a8k.hardware.A8kCanBusService; |
|
|
|
import a8k.hardware.type.a8kcanprotocol.MId; |
|
|
|
import a8k.service.app.devicedriver.basectrl.TubeTransportControler; |
|
|
|
import a8k.service.app.devicedriver.ctrl.TubeHolderScanerControler; |
|
|
|
import a8k.service.app.devicedriver.pos.TubeTransportPosMgr; |
|
|
|
import a8k.type.TubeHolderScanResult; |
|
|
@ -24,6 +25,8 @@ public class TubeTransportPosCalibration { |
|
|
|
A8kCanBusService canBus; |
|
|
|
@Resource |
|
|
|
TubeHolderScanerControler tubeHolderScanerControler; |
|
|
|
@Resource |
|
|
|
TubeTransportControler tubeTransportControler; |
|
|
|
|
|
|
|
private Integer readFeedingModXMPos() throws AppException { |
|
|
|
canBus.stepMotorEnable(MId.FeedingModXM, 1); |
|
|
@ -49,6 +52,7 @@ public class TubeTransportPosCalibration { |
|
|
|
canBus.stepMotorEnable(MId.FeedingModInfeedM, 1); |
|
|
|
canBus.stepMotorEnable(MId.FeedingModOutfeedM, 1); |
|
|
|
canBus.stepMotorEnable(MId.FeedingModXM, 1); |
|
|
|
canBus.miniServoEnable(MId.ShakeModTubeScanerClampingSV, 1); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "失能相关模块", group = "测试工具", order = 13) |
|
|
@ -56,47 +60,60 @@ public class TubeTransportPosCalibration { |
|
|
|
canBus.stepMotorEnable(MId.FeedingModInfeedM, 0); |
|
|
|
canBus.stepMotorEnable(MId.FeedingModOutfeedM, 0); |
|
|
|
canBus.stepMotorEnable(MId.FeedingModXM, 0); |
|
|
|
canBus.miniServoEnable(MId.ShakeModTubeScanerClampingSV, 0); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<入料位置>", group = "标定", order = 21) |
|
|
|
@ExtApiFn(name = "<平移电机>设置当前位置为<入料位置>", group = "标定", order = 21) |
|
|
|
public void setTubeHolderEnterXPos() throws AppException { |
|
|
|
tubeTransportPosMgr.setTubeHolderEnterXPos(readFeedingModXMPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<出料位置>", group = "标定", order = 22) |
|
|
|
@ExtApiFn(name = "<平移电机>设置当前位置为<出料位置>", group = "标定", order = 22) |
|
|
|
public void setTubeHolderExitXPos() throws AppException { |
|
|
|
tubeTransportPosMgr.setTubeHolderExitXPos(readFeedingModXMPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<试管架扫描位置>", group = "标定", order = 23) |
|
|
|
@ExtApiFn(name = "<平移电机>设置当前位置为<试管架扫描位置>", group = "标定", order = 23) |
|
|
|
public void setTubeHolderScanXPos() throws AppException { |
|
|
|
tubeTransportPosMgr.setTubeHolderScanXPos(readFeedingModXMPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<0号试管扫描位置>", group = "标定", order = 24) |
|
|
|
@ExtApiFn(name = "<平移电机>设置当前位置为<0号试管扫描位置>", group = "标定", order = 24) |
|
|
|
public void setTube0ScanXPos() throws AppException { |
|
|
|
tubeTransportPosMgr.setTube0ScanXPos(readFeedingModXMPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<0试管高度判断位置>", group = "标定", order = 25) |
|
|
|
@ExtApiFn(name = "<平移电机>设置当前位置为<0试管高度判断位置>", group = "标定", order = 25) |
|
|
|
public void setTube0AltitJudgXPos() throws AppException { |
|
|
|
tubeTransportPosMgr.setTube0AltitJudgXPos(readFeedingModXMPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<0试管存在判断位置>", group = "标定", order = 26) |
|
|
|
@ExtApiFn(name = "<平移电机>设置当前位置为<0试管存在判断位置>", group = "标定", order = 26) |
|
|
|
public void setTube0ExistJudgXPos() throws AppException { |
|
|
|
tubeTransportPosMgr.setTube0ExistJudgXPos(readFeedingModXMPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "<夹紧舵机>设置当前位置为夹紧位置", group = "标定", order = 26) |
|
|
|
public void setTubeScanClampPos() throws AppException { |
|
|
|
canBus.miniServoSetCurPos(MId.ShakeModTubeScanerClampingSV, tubeTransportPosMgr.ScanerClampingSVClampingPos); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "夹紧试管架", group = "校验", order = 31) |
|
|
|
public void scanClampModClamp() throws AppException { |
|
|
|
tubeTransportControler.scanClampModClamp(); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫描试管架", group = "校验", order = 31) |
|
|
|
@ExtApiFn(name = "释放试管架", group = "校验", order = 32) |
|
|
|
public void scanClampModRelease() throws AppException { |
|
|
|
tubeTransportControler.scanClampModRelease(); |
|
|
|
} |
|
|
|
@ExtApiFn(name = "扫描试管架", group = "校验", order = 33) |
|
|
|
public TubeHolderScanResult scanAll() throws AppException { |
|
|
|
return tubeHolderScanerControler.scanTubeHodler(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "设置<试管扫描伺服力矩(100-1000)>", group = "其他", order = 41) |
|
|
|
public void setTubeScanServoTorque(Integer torque) throws AppException { |
|
|
|
tubeTransportPosMgr.setTubeScanServoTorque(torque); |
|
|
|