6 changed files with 79 additions and 131 deletions
-
BINapp.db
-
2src/main/java/a8k/extapi_controler/pagecontrol/ExtApiTabConfig.java
-
65src/main/java/a8k/service/app/devicedriver/calibration/MiniServoReferencePointSetting.java
-
117src/main/java/a8k/service/app/devicedriver/calibration/PositionCalibration.java
-
8src/main/java/a8k/service/app/devicedriver/calibration/TubeFeedingModulePosCalibration.java
-
18src/main/java/a8k/service/app/devicedriver/calibration/TubePreProcesPosCalibration.java
@ -0,0 +1,65 @@ |
|||||
|
package a8k.service.app.devicedriver.calibration; |
||||
|
|
||||
|
|
||||
|
import a8k.extapi_controler.pagecontrol.ExtApiTabConfig; |
||||
|
import a8k.extapi_controler.utils.ExtApiFn; |
||||
|
import a8k.extapi_controler.utils.ExtApiTab; |
||||
|
import a8k.service.app.devicedriver.basectrl.MiniServoControler; |
||||
|
import a8k.service.app.devicedriver.basectrl.type.MiniServoMId; |
||||
|
import a8k.type.exception.AppException; |
||||
|
import jakarta.annotation.Resource; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Component |
||||
|
@ExtApiTab(cfg = ExtApiTabConfig.MiniServoReferencePointSetting) |
||||
|
public class MiniServoReferencePointSetting { |
||||
|
|
||||
|
@Resource |
||||
|
MiniServoControler miniServoControler; |
||||
|
|
||||
|
@ExtApiFn(name = "失能相关模块", group = "测试工具", order = 1) |
||||
|
public void disableMotor() throws AppException { |
||||
|
miniServoControler.miniServoEnable(MiniServoMId.ShakeModGripperSV, 0); |
||||
|
miniServoControler.miniServoEnable(MiniServoMId.ShakeModGripperYSV, 0); |
||||
|
miniServoControler.miniServoEnable(MiniServoMId.ShakeModTubeScanerClampingSV, 0); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "使能相关模块", group = "测试工具", order = 2) |
||||
|
public void enableMotor() throws AppException { |
||||
|
miniServoControler.miniServoEnable(MiniServoMId.ShakeModGripperSV, 1); |
||||
|
miniServoControler.miniServoEnable(MiniServoMId.ShakeModGripperYSV, 1); |
||||
|
miniServoControler.miniServoEnable(MiniServoMId.ShakeModTubeScanerClampingSV, 1); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ExtApiFn(name = "设置<夹爪><参考点>(完全张开的位置)", group = "参考点设置", order = 11, newline = true) |
||||
|
public Integer gripperSVSetCurrentPosAsRef() throws AppException { |
||||
|
miniServoControler.miniServoSetRefPos(MiniServoMId.ShakeModGripperSV); |
||||
|
return 1800; |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "设置<摇匀模组Y轴舵机><参考点>(Y轴最外侧的位置)", group = "参考点设置", order = 12, newline = true) |
||||
|
public Integer YAxixServoSetCurrentPosAsRef() throws AppException { |
||||
|
return miniServoControler.miniServoSetRefPos(MiniServoMId.ShakeModGripperYSV); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "设置<夹紧舵机>参考点(水平位置)", group = "参考点设置", order = 13) |
||||
|
public void setTubeScanClampPos() throws AppException { |
||||
|
miniServoControler.miniServoSetRefPos(MiniServoMId.ShakeModTubeScanerClampingSV); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "夹紧舵机移动到待机位(在参考点附近)", group = "校验", order = 21) |
||||
|
public void gripperSVMoveToZeroBlock() throws AppException { |
||||
|
miniServoControler.miniServoMoveToZeroBlock(MiniServoMId.ShakeModGripperSV); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "摇匀模组Y轴舵机移动到待机位(在参考点附近)", group = "校验", order = 22) |
||||
|
public void YAxixServoMoveToZeroBlock() throws AppException { |
||||
|
miniServoControler.miniServoMoveToZeroBlock(MiniServoMId.ShakeModGripperYSV); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "夹紧舵机移动到待机位(在参考点附近)", group = "校验", order = 23) |
||||
|
public void tubeScanClampMoveToZeroBlock() throws AppException { |
||||
|
miniServoControler.miniServoMoveToZeroBlock(MiniServoMId.ShakeModTubeScanerClampingSV); |
||||
|
} |
||||
|
} |
@ -1,117 +0,0 @@ |
|||||
package a8k.service.app.devicedriver.calibration; |
|
||||
|
|
||||
import a8k.extapi_controler.pagecontrol.ExtApiTabConfig; |
|
||||
import a8k.extapi_controler.utils.ExtApiFn; |
|
||||
import a8k.extapi_controler.utils.ExtApiStatu; |
|
||||
import a8k.extapi_controler.utils.ExtApiTab; |
|
||||
import a8k.type.exception.AppException; |
|
||||
import a8k.type.cfg.Pos2d; |
|
||||
import a8k.hardware.A8kCanBusService; |
|
||||
import a8k.hardware.type.a8kcanprotocol.MId; |
|
||||
import jakarta.annotation.Resource; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
//@Component |
|
||||
//@ExtApiTab(cfg = ExtApiTabConfig.PositionCalibration) |
|
||||
//public class PositionCalibration { |
|
||||
// |
|
||||
// @Resource |
|
||||
// A8kCanBusService canBus; |
|
||||
// @Resource |
|
||||
// TimeParam timep; |
|
||||
// @Resource |
|
||||
// PosParam pp; |
|
||||
// @Resource |
|
||||
// DebugParam dp; |
|
||||
// |
|
||||
// @ExtApiFn(name = "试管夹平移电机-使能", group = "电机使能") |
|
||||
// public void FeedingModXMEnable(Boolean enable) throws AppException { |
|
||||
// stepMotorControler.stepMotorEnable(StepMotorMId.FeedingModXM, enable ? 1 : 0); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "板夹仓Y轴-使能", group = "电机使能") |
|
||||
// public void platesBoxYMEndble(Boolean enable) throws AppException { |
|
||||
// stepMotorControler.stepMotorEnable(StepMotorMId.PlatesBoxYM, enable ? 1 : 0); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "板夹仓推杆-使能", group = "电机使能") |
|
||||
// public void platesBoxPusherMEndble(Boolean enable) throws AppException { |
|
||||
// stepMotorControler.stepMotorEnable(StepMotorMId.PlatesBoxPusherM, enable ? 1 : 0); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "拉杆-使能", group = "电机使能") |
|
||||
// public void optModPullMEndble(Boolean enable) throws AppException { |
|
||||
// stepMotorControler.stepMotorEnable(StepMotorMId.OptModPullM, enable ? 1 : 0); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "光学模组扫描器-使能", group = "电机使能") |
|
||||
// public void optModScannerMEndble(Boolean enable) throws AppException { |
|
||||
// stepMotorControler.stepMotorEnable(StepMotorMId.OptModScannerM, enable ? 1 : 0); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "转盘-使能", group = "电机使能") |
|
||||
// public void incubatorRotateCtrlMEndble(Boolean enable) throws AppException { |
|
||||
// stepMotorControler.stepMotorEnable(StepMotorMId.IncubatorRotateCtrlM, enable ? 1 : 0); |
|
||||
// |
|
||||
// } |
|
||||
// |
|
||||
// |
|
||||
// @ExtApiFn(name = "试管夹平移电机-读取位置", group = "通过归零测量位置") |
|
||||
// public Integer readXPosByMoveZero() throws AppException { |
|
||||
// return (stepMotorControler.stepMotorReadPosByMoveToZeroBlock(StepMotorMId.FeedingModXM, timep.getActionOvertime())); |
|
||||
// } |
|
||||
// |
|
||||
// |
|
||||
// @ExtApiFn(name = "通过归零读取<板夹仓>位置", group = "通过归零测量位置") |
|
||||
// public Integer readPlatesBoxYMPosByMoveToZero() throws AppException { |
|
||||
// return (stepMotorControler.stepMotorReadPosByMoveToZeroBlock(StepMotorMId.PlatesBoxYM, timep.getActionOvertime())); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "通过归零读取<推杆>位置", group = "通过归零测量位置") |
|
||||
// public Integer readPlatesBoxPusherMPosByMoveToZero() throws AppException { |
|
||||
// return (stepMotorControler.stepMotorReadPosByMoveToZeroBlock(StepMotorMId.PlatesBoxPusherM, timep.getActionOvertime())); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "通过归零读取<拉杆>位置", group = "通过归零测量位置") |
|
||||
// public Integer readOptModPullMPosByMoveToZero() throws AppException { |
|
||||
// return (stepMotorControler.stepMotorReadPosByMoveToZeroBlock(StepMotorMId.OptModPullM, timep.getActionOvertime())); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "通过归零读取<光学模组扫描器>位置", group = "通过归零测量位置") |
|
||||
// public Integer readOptModScannerMPosByMoveToZero() throws AppException { |
|
||||
// return (stepMotorControler.stepMotorReadPosByMoveToZeroBlock(StepMotorMId.OptModScannerM, timep.getActionOvertime())); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiFn(name = "通过归零读取<摇匀模组Z轴>位置", group = "通过归零测量位置") |
|
||||
// public Integer readShakeModGripperZMPosByMoveToZero() throws AppException { |
|
||||
// return (stepMotorControler.stepMotorReadPosByMoveToZeroBlock(StepMotorMId.ShakeModGripperZM, timep.getActionOvertime())); |
|
||||
// } |
|
||||
// |
|
||||
// |
|
||||
// @ExtApiStatu(name = "HbotPos", group = "Hbot") |
|
||||
// public String getHbotPos() throws AppException { |
|
||||
// Pos2d pos = canBus.hbotReadPos(MId.HbotM); |
|
||||
// return pos.toString(); |
|
||||
// } |
|
||||
// |
|
||||
// |
|
||||
// @ExtApiStatu(name = "转盘位置") |
|
||||
// public String getIncubatorRotateCtrlMPos() throws AppException { |
|
||||
// Integer pos = stepMotorControler.stepMotorReadPos(StepMotorMId.IncubatorRotateCtrlM); |
|
||||
// return pos.toString(); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiStatu(name = "抓手Y轴位置", group = "摇匀模组") |
|
||||
// public String getShakeModGripperYPos() throws AppException { |
|
||||
// Integer pos = miniServoControler.miniServoReadPos(MiniServoMid.ShakeModGripperYSV); |
|
||||
// return pos.toString(); |
|
||||
// } |
|
||||
// |
|
||||
// @ExtApiStatu(name = "抓手位置", group = "摇匀模组") |
|
||||
// public String getGripperPos() throws AppException { |
|
||||
// Integer pos = miniServoControler.miniServoReadPos(MiniServoMid.ShakeModGripperSV); |
|
||||
// return pos.toString(); |
|
||||
// } |
|
||||
// |
|
||||
// |
|
||||
//} |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue