52 changed files with 905 additions and 710 deletions
-
24src/main/java/a8k/extapi/controler/ExtApiControler.java
-
4src/main/java/a8k/extapi/controler/ExtApiControllerAdvice.java
-
120src/main/java/a8k/extapi/service/ExtApiTabCfgService.java
-
2src/main/java/a8k/extapi/utils/EnginnerPageActionParam.java
-
2src/main/java/a8k/extapi/utils/EnginnerParamFile.java
-
2src/main/java/a8k/extapi/utils/ExtApiFn.java
-
2src/main/java/a8k/extapi/utils/ExtApiParam.java
-
2src/main/java/a8k/extapi/utils/ExtApiParamsTab.java
-
2src/main/java/a8k/extapi/utils/ExtApiStatu.java
-
4src/main/java/a8k/extapi/utils/ExtApiTab.java
-
56src/main/java/a8k/extapi_controler/DownloadMgr.java
-
56src/main/java/a8k/extapi_controler/pagecontrol/ExtApiTabConfig.java
-
6src/main/java/a8k/service/app/background/BackgroudProcessCtrlService.java
-
7src/main/java/a8k/service/app/devicectrl/ctrlservice/TubeFeedingCtrlService.java
-
7src/main/java/a8k/service/app/devicectrl/driver/PipetteCtrlDriver.java
-
6src/main/java/a8k/service/app/devicectrl/driver/StepMotorCtrlDriver.java
-
5src/main/java/a8k/service/app/devicectrl/exdriver/HbotBaseMoveExDriver.java
-
7src/main/java/a8k/service/app/devicectrl/init/MiniServoReferencePointIniter.java
-
7src/main/java/a8k/service/app/devicectrl/param/LowerDeviceParamMgr.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/Hbot2DCodeScanPosCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/HbotLargeBottleBSPosCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/HbotLittleBSPosCalibration.java
-
8src/main/java/a8k/service/app/devicectrl/param/calibration/HbotProbeSubstancePosCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/HbotSamplePosCalibration.java
-
15src/main/java/a8k/service/app/devicectrl/param/calibration/HbotTipPosCalibration.java
-
8src/main/java/a8k/service/app/devicectrl/param/calibration/OptModuleParamCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/PipetteGunLLDParamCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/PipetteGunLLFParamCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/ReactionPlatesTransmitControlerCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/TemperatureCtrlParamCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/TubeFeedingModulePosCalibration.java
-
7src/main/java/a8k/service/app/devicectrl/param/calibration/TubePreProcesPosCalibration.java
-
4src/main/java/a8k/service/bases/FrontEndEventRouter.java
-
1src/main/java/a8k/service/dao/LowerDeviceParameterStorgeDao.java
-
9src/main/java/a8k/service/test/A8kOptTest.java
-
6src/main/java/a8k/service/test/MainflowCtrlTestService.java
-
7src/main/java/a8k/service/test/PipetteGunTest.java
-
8src/main/java/a8k/service/test/PosMeasureUtils.java
-
8src/main/java/a8k/service/test/VirtualDeviceSimulationTest.java
-
207src/main/java/a8k/service/verification/PipetteGunVerification.java
-
19src/main/java/a8k/type/appret/AppRetV1.java
-
1src/main/java/a8k/utils/ZCSVUtils.java
-
3src/main/java/a8k/utils/ZJsonHelper.java
@ -0,0 +1,120 @@ |
|||||
|
|
||||
|
package a8k.extapi.service; |
||||
|
|
||||
|
import a8k.extapi.utils.ExtApiFn; |
||||
|
import a8k.extapi.utils.ExtApiTab; |
||||
|
import a8k.service.app.background.BackgroudProcessCtrlService; |
||||
|
import a8k.service.app.devicectrl.ctrlservice.TubeFeedingCtrlService; |
||||
|
import a8k.service.app.devicectrl.driver.PipetteCtrlDriver; |
||||
|
import a8k.service.app.devicectrl.driver.StepMotorCtrlDriver; |
||||
|
import a8k.service.app.devicectrl.exdriver.HbotBaseMoveExDriver; |
||||
|
import a8k.service.app.devicectrl.init.MiniServoReferencePointIniter; |
||||
|
import a8k.service.app.devicectrl.param.LowerDeviceParamMgr; |
||||
|
import a8k.service.app.devicectrl.param.calibration.*; |
||||
|
import a8k.service.test.*; |
||||
|
import a8k.service.verification.PipetteGunVerification; |
||||
|
import jakarta.annotation.PostConstruct; |
||||
|
import lombok.Data; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Component |
||||
|
@ExtApiTab() |
||||
|
public class ExtApiTabCfgService { |
||||
|
|
||||
|
static int index; |
||||
|
|
||||
|
public enum TabType { |
||||
|
Public, |
||||
|
CodeTest, |
||||
|
Calibration, |
||||
|
Verify, |
||||
|
LowLevelApiTest, |
||||
|
Others, |
||||
|
} |
||||
|
|
||||
|
; |
||||
|
|
||||
|
@Data |
||||
|
public class Config { |
||||
|
public TabType tabType; |
||||
|
public Class<?> service; |
||||
|
public String chName; |
||||
|
public Boolean display; |
||||
|
public int index = ExtApiTabCfgService.index++; |
||||
|
|
||||
|
|
||||
|
public Config(Class<?> service, String chName, TabType tabType) { |
||||
|
this.service = service; |
||||
|
this.display = true; |
||||
|
this.chName = chName; |
||||
|
this.tabType = tabType; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
List<Config> cfgList = new ArrayList<>(); |
||||
|
|
||||
|
|
||||
|
@PostConstruct |
||||
|
void init() { |
||||
|
cfgList.add(new Config(ExtApiTabCfgService.class, "页面配置", TabType.Public)); |
||||
|
|
||||
|
cfgList.add(new Config(VirtualDeviceSimulationTest.class, "测试.虚拟设备测试", TabType.CodeTest)); |
||||
|
cfgList.add(new Config(MainflowCtrlTestService.class, "测试.主流程控制测试", TabType.CodeTest)); |
||||
|
cfgList.add(new Config(BackgroudProcessCtrlService.class, "测试模式.后台线程控制", TabType.CodeTest)); |
||||
|
|
||||
|
cfgList.add(new Config(LowerDeviceParamMgr.class, "校准.参数管理", TabType.Calibration)); |
||||
|
cfgList.add(new Config(MiniServoReferencePointIniter.class, "校准.舵机参考点设置", TabType.Calibration)); |
||||
|
cfgList.add(new Config(ReactionPlatesTransmitControlerCalibration.class, "校准.反应板相关位置校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(TubeFeedingModulePosCalibration.class, "校准.试管入料校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(TubePreProcesPosCalibration.class, "校准.试管预处理校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(Hbot2DCodeScanPosCalibration.class, "校准.耗材扫描校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(HbotTipPosCalibration.class, "校准.Tip耗材位置校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(HbotLittleBSPosCalibration.class, "校准.小瓶BS耗材位置校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(HbotProbeSubstancePosCalibration.class, "校准.探测物质位置校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(HbotLargeBottleBSPosCalibration.class, "校准.大瓶BS耗材位置校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(HbotSamplePosCalibration.class, "校准.样本位置校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(PipetteGunLLDParamCalibration.class, "校准.移液枪LLD参数校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(PipetteGunLLFParamCalibration.class, "校准.移液枪LLF参数校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(OptModuleParamCalibration.class, "校准.光学模块参数校准", TabType.Calibration)); |
||||
|
cfgList.add(new Config(TemperatureCtrlParamCalibration.class, "校准.温度控制参数校准", TabType.Calibration)); |
||||
|
|
||||
|
|
||||
|
cfgList.add(new Config(PipetteGunTest.class, "测试.PipetteGun", TabType.LowLevelApiTest)); |
||||
|
cfgList.add(new Config(PosMeasureUtils.class, "测试.坐标测量", TabType.LowLevelApiTest)); |
||||
|
cfgList.add(new Config(A8kOptTest.class, "测试.光学测试", TabType.LowLevelApiTest)); |
||||
|
|
||||
|
cfgList.add(new Config(PipetteCtrlDriver.class, "硬件驱动.移液枪测试", TabType.LowLevelApiTest)); |
||||
|
cfgList.add(new Config(StepMotorCtrlDriver.class, "硬件驱动.步进电机测试", TabType.LowLevelApiTest)); |
||||
|
cfgList.add(new Config(TubeFeedingCtrlService.class, "硬件控制.入料模块", TabType.LowLevelApiTest)); |
||||
|
|
||||
|
cfgList.add(new Config(PipetteGunVerification.class, "验证.移液枪验证", TabType.Verify)); |
||||
|
|
||||
|
|
||||
|
for (Config cfg : cfgList) { |
||||
|
cfg.display = cfg.tabType.equals(TabType.Public); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public Config getCfg(Class<?> service) { |
||||
|
for (Config cfg : cfgList) { |
||||
|
if (cfg.service == service) { |
||||
|
return cfg; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ExtApiFn(name = "切换显示", group = "页面配置", order = 1) |
||||
|
public String display(TabType type) { |
||||
|
for (Config cfg : cfgList) { |
||||
|
cfg.display = cfg.tabType.equals(type) || cfg.tabType.equals(TabType.Public); |
||||
|
} |
||||
|
return "已切换,请刷新页面."; |
||||
|
} |
||||
|
} |
@ -1,4 +1,4 @@ |
|||||
package a8k.extapi_controler.utils; |
|
||||
|
package a8k.extapi.utils; |
||||
import java.lang.annotation.ElementType; |
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
import java.lang.annotation.RetentionPolicy; |
@ -1,4 +1,4 @@ |
|||||
package a8k.extapi_controler.utils; |
|
||||
|
package a8k.extapi.utils; |
||||
import java.util.Base64; |
import java.util.Base64; |
||||
public class EnginnerParamFile { |
public class EnginnerParamFile { |
||||
private byte[] bytes; |
private byte[] bytes; |
@ -1,4 +1,4 @@ |
|||||
package a8k.extapi_controler.utils; |
|
||||
|
package a8k.extapi.utils; |
||||
import java.lang.annotation.ElementType; |
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
import java.lang.annotation.RetentionPolicy; |
@ -1,4 +1,4 @@ |
|||||
package a8k.extapi_controler.utils; |
|
||||
|
package a8k.extapi.utils; |
||||
import java.lang.annotation.ElementType; |
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
import java.lang.annotation.RetentionPolicy; |
@ -1,4 +1,4 @@ |
|||||
package a8k.extapi_controler.utils; |
|
||||
|
package a8k.extapi.utils; |
||||
import java.lang.annotation.ElementType; |
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
import java.lang.annotation.RetentionPolicy; |
@ -1,4 +1,4 @@ |
|||||
package a8k.extapi_controler.utils; |
|
||||
|
package a8k.extapi.utils; |
||||
import java.lang.annotation.ElementType; |
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
import java.lang.annotation.RetentionPolicy; |
@ -1,56 +0,0 @@ |
|||||
package a8k.extapi_controler; |
|
||||
|
|
||||
|
|
||||
import cn.hutool.core.io.FileUtil; |
|
||||
import cn.hutool.core.io.resource.ResourceUtil; |
|
||||
import jakarta.annotation.PostConstruct; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.core.io.FileSystemResource; |
|
||||
import org.springframework.core.io.Resource; |
|
||||
import org.springframework.http.ContentDisposition; |
|
||||
import org.springframework.http.HttpHeaders; |
|
||||
import org.springframework.http.MediaType; |
|
||||
import org.springframework.http.ResponseEntity; |
|
||||
import org.springframework.stereotype.Controller; |
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.PathVariable; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
|
|
||||
import java.io.File; |
|
||||
import java.io.IOException; |
|
||||
|
|
||||
@Slf4j |
|
||||
@Controller |
|
||||
@RequestMapping(value = "/api/extapi/") |
|
||||
public class DownloadMgr { |
|
||||
|
|
||||
@GetMapping("/download/{path}") |
|
||||
public ResponseEntity<Resource> download(@PathVariable String path) { |
|
||||
String contentDisposition = ContentDisposition |
|
||||
.builder("attachment") |
|
||||
.filename(path) |
|
||||
.build().toString(); |
|
||||
return ResponseEntity.ok() |
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, contentDisposition) |
|
||||
.body(new FileSystemResource(path)); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
// @PostConstruct |
|
||||
// void init() throws IOException { |
|
||||
// //创建一个文件,并保存你好 |
|
||||
// |
|
||||
// FileSystemResource file = new FileSystemResource("你好.txt"); |
|
||||
// log.info("文件路径:{}", file.getFile().getAbsolutePath()); |
|
||||
// |
|
||||
// File file1 = new File("你好.txt"); |
|
||||
// log.info("文件路径:{}", file1.getAbsolutePath()); |
|
||||
// |
|
||||
// // var output = file.getOutputStream(); |
|
||||
// // output.write("你好".getBytes()); |
|
||||
// // output.close(); |
|
||||
// |
|
||||
// |
|
||||
// } |
|
||||
|
|
||||
} |
|
@ -1,56 +0,0 @@ |
|||||
package a8k.extapi_controler.pagecontrol; |
|
||||
|
|
||||
public enum ExtApiTabConfig { |
|
||||
VirtualDeviceSimulationTest("测试.虚拟设备测试", true), |
|
||||
MainflowCtrlTestService("测试.主流程控制测试", true), |
|
||||
|
|
||||
|
|
||||
BackgroudProcessCtrlService("测试模式.后台线程控制", true), |
|
||||
LowerDeviceParamMgr("校准.参数管理", true),//OK |
|
||||
MiniServoReferencePointSetting("校准.舵机参考点设置", true), |
|
||||
ReactionPlatesTransmitControlerCalibration("校准.反应板相关位置校准", true), |
|
||||
TubeFeedingModulePosCalibration("校准.试管入料校准", true), |
|
||||
TubePreProcesPosCalibration("校准.试管预处理校准", true), |
|
||||
Hbot2DCodeScanPosCalibration("校准.耗材扫描校准", true), |
|
||||
HbotTipPosCalibration("校准.Tip耗材位置校准", true), |
|
||||
HbotLittleBSPosCalibration("校准.小瓶BS耗材位置校准", true), |
|
||||
HbotProbeSubstancePosCalibration("校准.探测物质位置校准", true), |
|
||||
HbotLargeBottleBSPosCalibration("校准.大瓶BS耗材位置校准", true), |
|
||||
HbotSamplePosCalibration("校准.样本位置校准", true), |
|
||||
PipetteGunLLDParamCalibration("校准.移液枪LLD参数校准", true), |
|
||||
PipetteGunLLFParamCalibration("校准.移液枪LLF参数校准", true), |
|
||||
OptModuleParamCalibration("校准.光学模块参数校准", true), |
|
||||
TemperatureCtrlParamCalibration("校准.温度控制参数校准", true), |
|
||||
|
|
||||
|
|
||||
PipetteGunTest("测试.PipetteGun",true), |
|
||||
PosMeasureUtils("测试.坐标测量",true), |
|
||||
A8kOptTest("测试.光学测试",true), |
|
||||
|
|
||||
A8kPipetteCtrlModule("硬件驱动.移液枪测试", true), |
|
||||
StepMotorCtrlDriver("硬件驱动.步进电机测试", false), |
|
||||
|
|
||||
HbotControlService("HbotControlService", false), |
|
||||
TubeTubeFeedingModule("硬件控制.入料模块", false), |
|
||||
|
|
||||
|
|
||||
Max("max", false); |
|
||||
|
|
||||
final String name; |
|
||||
final boolean display; |
|
||||
|
|
||||
ExtApiTabConfig(String name, boolean display) { |
|
||||
this.name = name; |
|
||||
this.display = display; |
|
||||
} |
|
||||
|
|
||||
public String getName() { |
|
||||
return name; |
|
||||
} |
|
||||
|
|
||||
public boolean isDisplay() { |
|
||||
return display; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
@ -0,0 +1,207 @@ |
|||||
|
package a8k.service.verification; |
||||
|
|
||||
|
import a8k.extapi.utils.ExtApiFn; |
||||
|
import a8k.extapi.utils.ExtApiTab; |
||||
|
import a8k.hardware.type.LldType; |
||||
|
import a8k.service.app.devicectrl.driver.PipetteCtrlDriver; |
||||
|
import a8k.service.app.devicectrl.driver.type.PipetteRegIndex; |
||||
|
import a8k.service.app.devicectrl.exdriver.HbotBaseMoveExDriver; |
||||
|
import a8k.service.app.devicectrl.exdriver.MotorEnableExDriver; |
||||
|
import a8k.service.app.devicectrl.param.param_mgr.HbotSamplePosParamMgr; |
||||
|
import a8k.service.app.devicectrl.param.param_mgr.PipetteGunLLDParamMgr; |
||||
|
import a8k.service.app.devicectrl.param.param_mgr.base.ParamMgr; |
||||
|
import a8k.service.app.devicectrl.param.type.A8kSamplePos; |
||||
|
import a8k.service.app.devicectrl.param.type.HbotSamplePos; |
||||
|
import a8k.service.dao.type.Parameter; |
||||
|
import a8k.type.cfg.Pos3d; |
||||
|
import a8k.type.exception.AppException; |
||||
|
import jakarta.annotation.PostConstruct; |
||||
|
import jakarta.annotation.Resource; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@ExtApiTab() |
||||
|
@Component |
||||
|
@Slf4j |
||||
|
public class PipetteGunVerification extends ParamMgr { |
||||
|
|
||||
|
|
||||
|
enum PipetteGunVerificationParam { |
||||
|
LLDStartPos("LLD开始位置", Integer.class), |
||||
|
LLDEndPos("LLD结束位置", Integer.class), |
||||
|
LLDType("LLD类型", LldType.class), |
||||
|
LLDCThreshold("LLD C阈值", Integer.class), |
||||
|
LLDPThreshold("LLD P阈值", Integer.class), |
||||
|
LLFVel("LLF Z轴速度", Integer.class), |
||||
|
; |
||||
|
public final String chName; |
||||
|
public final Class<?> type; |
||||
|
|
||||
|
PipetteGunVerificationParam(String chName, Class<?> type) { |
||||
|
this.chName = chName; |
||||
|
this.type = type; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Resource |
||||
|
PipetteGunLLDParamMgr pipetteGunLLDParamMgr; |
||||
|
|
||||
|
@Resource |
||||
|
PipetteCtrlDriver pipetteCtrlDriver; |
||||
|
@Resource |
||||
|
HbotBaseMoveExDriver hbotBaseMoveExDriver; |
||||
|
@Resource |
||||
|
MotorEnableExDriver motorEnableExDriver; |
||||
|
@Resource |
||||
|
HbotSamplePosParamMgr hbotSamplePosParamMgr; |
||||
|
|
||||
|
@PostConstruct |
||||
|
void initialize() { |
||||
|
for (PipetteGunVerificationParam cfg : PipetteGunVerificationParam.values()) { |
||||
|
initParam(cfg, cfg.chName, cfg.type); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ExtApiFn(name = "失能电机", group = "基础", order = 1) |
||||
|
public void disableModule() throws AppException { |
||||
|
motorEnableExDriver.forceDisableAllMotor(); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "移液枪初始化(Tip会掉落)", group = "基础", order = 2) |
||||
|
public void pipetteInitDeviceBlock() throws AppException { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "获取相关参数", group = "配置", order = 100) |
||||
|
public List<Parameter> getParams() { |
||||
|
return super.getParams(); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "设置当前位置为LLD开始位置", group = "配置", order = 101) |
||||
|
public void setCurZPosAsLLDStartZ() throws AppException { |
||||
|
pipetteCtrlDriver.zMotorEnable(1); |
||||
|
pipetteCtrlDriver.zMotorMeasureDistance(); |
||||
|
Integer curZPos = pipetteCtrlDriver.zMotorReadMeasureDistanceResult(); |
||||
|
setParam(PipetteGunVerificationParam.LLDStartPos, curZPos); |
||||
|
pipetteCtrlDriver.zMotorEnable(0); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "设置当前位置为LLD结束位置", group = "配置", order = 102) |
||||
|
public void setCurZPosAsLLDEndZ() throws AppException { |
||||
|
pipetteCtrlDriver.zMotorEnable(1); |
||||
|
pipetteCtrlDriver.zMotorMeasureDistance(); |
||||
|
Integer curZPos = pipetteCtrlDriver.zMotorReadMeasureDistanceResult(); |
||||
|
setParam(PipetteGunVerificationParam.LLDEndPos, curZPos); |
||||
|
pipetteCtrlDriver.zMotorEnable(0); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "设置LLD参数(c_val[1..300], p_val[1..300])", group = "配置", order = 103) |
||||
|
public void setLLDParam(LldType type, Integer c_val, Integer p_val) throws AppException { |
||||
|
setParam(PipetteGunVerificationParam.LLDType, type); |
||||
|
setParam(PipetteGunVerificationParam.LLDCThreshold, c_val); |
||||
|
setParam(PipetteGunVerificationParam.LLDPThreshold, p_val); |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "设置LLF参数(vel[1..1000])", group = "配置", order = 104) |
||||
|
public void setLLFParam(Integer vel) throws AppException { |
||||
|
setParam(PipetteGunVerificationParam.LLFVel, vel); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
enum Step { |
||||
|
kStepIdle, |
||||
|
kStepLLDPrepare, |
||||
|
kStepLLD, |
||||
|
kStepAspirate, |
||||
|
kStepDistribu, |
||||
|
} |
||||
|
|
||||
|
Step step = Step.kStepIdle; |
||||
|
|
||||
|
@ExtApiFn(name = "LLD准备", group = "操作", order = 200) |
||||
|
public void lldprepare() throws AppException { |
||||
|
motorEnableExDriver.enableAllMotor(); |
||||
|
pipetteCtrlDriver.zMotorMoveZeroBlock(); |
||||
|
pipetteCtrlDriver.pipetteInitDeviceBlock(); |
||||
|
pipetteCtrlDriver.lldPrepareBlock(); |
||||
|
|
||||
|
step = Step.kStepLLDPrepare; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ExtApiFn(name = "LLD", group = "操作", order = 201) |
||||
|
public void lld() throws AppException { |
||||
|
if (!step.equals(Step.kStepLLDPrepare)) { |
||||
|
throw AppException.ofAECodeError("请按照顺序执行"); |
||||
|
} |
||||
|
|
||||
|
pipetteCtrlDriver.zMotorEnable(1); |
||||
|
pipetteCtrlDriver.zMotorMoveZeroBlock(); |
||||
|
|
||||
|
|
||||
|
Integer lldStartPos = getParam(PipetteGunVerificationParam.LLDStartPos, Integer.class); |
||||
|
Integer lldEndPos = getParam(PipetteGunVerificationParam.LLDEndPos, Integer.class); |
||||
|
LldType type = getParam(PipetteGunVerificationParam.LLDType, LldType.class); |
||||
|
Integer c_val = getParam(PipetteGunVerificationParam.LLDCThreshold, Integer.class); |
||||
|
Integer p_val = getParam(PipetteGunVerificationParam.LLDPThreshold, Integer.class); |
||||
|
|
||||
|
pipetteCtrlDriver.setStartZ(lldStartPos); |
||||
|
pipetteCtrlDriver.setEndZ(lldEndPos); |
||||
|
pipetteCtrlDriver.setLldType(type); |
||||
|
pipetteCtrlDriver.setLldCThreshold(c_val); |
||||
|
pipetteCtrlDriver.setLldPThreshold(p_val); |
||||
|
pipetteCtrlDriver.lldBlock(); |
||||
|
|
||||
|
if (!pipetteCtrlDriver.lldIsDetectLiquid()) { |
||||
|
throw AppException.ofAECodeError("没有液体"); |
||||
|
} |
||||
|
|
||||
|
step = Step.kStepLLD; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ExtApiFn(name = "吸液", group = "操作", order = 202) |
||||
|
public String aspirate(Integer ul) throws AppException { |
||||
|
|
||||
|
if (!step.equals(Step.kStepLLD)) { |
||||
|
throw AppException.ofAECodeError("请按照顺序执行"); |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
* 吸液并归零 |
||||
|
*/ |
||||
|
pipetteCtrlDriver.zMotorEnable(1); |
||||
|
|
||||
|
Integer lldEndPos = getParam(PipetteGunVerificationParam.LLDEndPos, Integer.class); |
||||
|
Integer lldVel = getParam(PipetteGunVerificationParam.LLFVel, Integer.class); |
||||
|
|
||||
|
if (!pipetteCtrlDriver.isHasTip()) { |
||||
|
throw AppException.ofAECodeError("没有tip头"); |
||||
|
} |
||||
|
pipetteCtrlDriver.setLlfStartZ(pipetteCtrlDriver.getReg(PipetteRegIndex.kreg_pipette_zm_pos)); |
||||
|
pipetteCtrlDriver.setLlfStartZ(lldEndPos); |
||||
|
pipetteCtrlDriver.aspirateSetLlfVelocity(lldVel); |
||||
|
pipetteCtrlDriver.aspiratePrepareBlock(); |
||||
|
pipetteCtrlDriver.aspirateBlock(ul); |
||||
|
|
||||
|
pipetteCtrlDriver.zMotorMoveToZeroPointQuickBlock(); |
||||
|
step = Step.kStepAspirate; |
||||
|
return "吸液成功"; |
||||
|
} |
||||
|
|
||||
|
@ExtApiFn(name = "分配", group = "操作", order = 203) |
||||
|
public String distribuAll() throws AppException { |
||||
|
if (!step.equals(Step.kStepAspirate)) { |
||||
|
throw AppException.ofAECodeError("请按照顺序执行"); |
||||
|
} |
||||
|
Integer containUl = pipetteCtrlDriver.getReg(PipetteRegIndex.kreg_pipette_pos_ul); |
||||
|
pipetteCtrlDriver.aspirateBlock(-containUl); |
||||
|
// pipetteCtrlDriver.clearHangingLiquid(3); |
||||
|
step = Step.kStepDistribu; |
||||
|
return "分配成功"; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue