Browse Source

update

master
zhaohe 3 months ago
parent
commit
91c975009e
  1. 5
      src/main/java/a8k/app/constant/FilePathConstant.java
  2. 276
      src/main/java/a8k/app/hardware/driver/PipetteCtrlDriverV2.java
  3. 17
      src/main/java/a8k/app/hardware/type/pipette_module/PipetteConfig.java
  4. 1
      src/main/java/a8k/app/hardware/type/pipette_module/cfg/ContainerInfoIndex.java
  5. 2
      src/main/java/a8k/app/hardware/type/pipette_module/cfg/LiquidInfoIndex.java
  6. 1
      src/main/java/a8k/app/hardware/type/pipette_module/cfg/PMBasicConfigIndex.java
  7. 2
      src/main/java/a8k/app/hardware/type/pipette_module/cfg/PMVConfigIndex.java
  8. 1
      src/main/java/a8k/app/hardware/type/pipette_module/cfg/PlatformInfoIndex.java
  9. 17
      src/main/java/a8k/app/hardware/type/pipette_module/cfg/ZMBasicConfigIndex.java
  10. 11
      src/main/java/a8k/app/hardware/type/pipette_module/cfg/ZMVConfigIndex.java
  11. 17
      src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteContainerInfo.java
  12. 87
      src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteLiquidInfo.java
  13. 10
      src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipettePMVCfg.java
  14. 30
      src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipettePlatInfo.java
  15. 21
      src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteZMBCfg.java
  16. 13
      src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteZMVCfg.java
  17. 6
      src/main/java/a8k/app/hardware/type/pipette_module/cpyidx/PlatInfoCpyIdx.java
  18. 13
      src/main/java/a8k/app/service/data/FileMgrService.java
  19. 3
      src/main/java/a8k/extui/mgr/ExtApiPageGroupCfgMgr.java
  20. 50
      src/main/java/a8k/extui/page/driver/pipette_module/PipetteGunCfgSync.java
  21. 20
      src/main/java/a8k/extui/page/driver/pipette_module/PipetteGunZMVelConfigSettingPage.java
  22. 13
      src/main/java/a8k/extui/page/driver/pipette_module/PipetteGunZMotorCtrlPage.java

5
src/main/java/a8k/app/constant/FilePathConstant.java

@ -1,6 +1,7 @@
package a8k.app.constant;
public class FilePathConstant {
public static final String FILE_OPT_REPORT_PATH = "runenv/files/optReport"; //存储OPT报告
public static final String FILE_DB_EXPORT_PATH = "runenv/files/db"; //存储数据库导出文件
public static final String FILE_OPT_REPORT_PATH = "runenv/files/optReport"; //存储OPT报告
public static final String FILE_DB_EXPORT_PATH = "runenv/files/db"; //存储数据库导出文件
public static final String FILE_TMP_STORAGE_PATH = "runenv/files/tmp/"; //存储数据库导出文件
}

276
src/main/java/a8k/app/hardware/driver/PipetteCtrlDriverV2.java

@ -4,12 +4,13 @@ import a8k.app.constant.ActionOvertimeConstant;
import a8k.app.hardware.channel.A8kCanBusService;
import a8k.app.hardware.type.*;
import a8k.app.hardware.type.pipette_module.AspirationParamId;
import a8k.app.hardware.type.pipette_module.PipetteConfig;
import a8k.app.hardware.type.pipette_module.PipetteStateIndex;
import a8k.app.hardware.type.pipette_module.cpyidx.ContainerCpyId;
import a8k.app.hardware.type.pipette_module.cpyidx.PMVCpyIdx;
import a8k.app.hardware.type.pipette_module.cpyidx.ZMVCpyIdx;
import a8k.app.hardware.type.pipette_module.cfgbean.*;
import a8k.app.hardware.type.pipette_module.cpyidx.*;
import a8k.app.hardware.type.pipette_module.cfg.*;
import a8k.app.type.exception.AppException;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@ -38,7 +39,6 @@ public class PipetteCtrlDriverV2 {
return String.format("0x%08X", code);
}
public void setZMBCfg(ZMBasicConfigIndex index, Integer val) throws AppException {
callcmd(MId.PipetteMod, CmdId.pipette_set_zmbcfg, index.toInteger(), val);
}
@ -57,9 +57,10 @@ public class PipetteCtrlDriverV2 {
/**
* 设置平台信息
*
* @param cpyid 第几份
* @param index 平台信息索引
* @param val
* @param val
* @throws AppException 异常
*/
public void setPlatInfo(Integer cpyid, PlatformInfoIndex index, Integer val) throws AppException {
@ -68,6 +69,7 @@ public class PipetteCtrlDriverV2 {
/**
* 获取平台信息
*
* @param cpyid 第几份
* @param index 索引
* @return
@ -79,9 +81,10 @@ public class PipetteCtrlDriverV2 {
/**
* 设置容器信息
*
* @param cpyid 第几份
* @param index 容器信息索引
* @param val
* @param val
* @throws AppException 异常
*/
public void setZMVCfg(ZMVCpyIdx cpyid, ZMVConfigIndex index, Integer val) throws AppException {
@ -90,6 +93,7 @@ public class PipetteCtrlDriverV2 {
/**
* 获取容器信息
*
* @param cpyid 第几份
* @param index 索引
* @return
@ -101,9 +105,10 @@ public class PipetteCtrlDriverV2 {
/**
* 设置泵机速度
*
* @param cpyid 第几份
* @param index 泵机信息索引
* @param val
* @param val
* @throws AppException 异常
*/
public void setPMVCfg(PMVCpyIdx cpyid, PMVConfigIndex index, Integer val) throws AppException {
@ -112,6 +117,7 @@ public class PipetteCtrlDriverV2 {
/**
* 获取泵机速度
*
* @param cpyid 第几份
* @param index 索引
* @return
@ -123,17 +129,23 @@ public class PipetteCtrlDriverV2 {
/**
* 设置容器信息
*
* @param cpyid 第几份
* @param index 容器信息索引
* @param val
* @param val
* @throws AppException 异常
*/
public void setContainerInfo(Integer cpyid, ContainerInfoIndex index, Integer val) throws AppException {
callcmd(MId.PipetteMod, CmdId.pipette_set_container_info, cpyid, index.toInteger(), val);
}
public void setContainerInfo(ContainerCpyId cpyid, ContainerInfoIndex index, Integer val) throws AppException {
setContainerInfo(cpyid.toInteger(), index, val);
}
/**
* 获取容器信息
*
* @param cpyid 第几份
* @param index 索引
* @return
@ -143,19 +155,29 @@ public class PipetteCtrlDriverV2 {
return callcmd(MId.PipetteMod, CmdId.pipette_get_container_info, cpyid, index.toInteger()).getContentI32(0);
}
public Integer getContainerInfo(ContainerCpyId cpyid, ContainerInfoIndex index) throws AppException {
return getContainerInfo(cpyid.toInteger(), index);
}
/**
* 设置液体信息
*
* @param cpyid 第几份
* @param index 液体信息索引
* @param val
* @param val
* @throws AppException 异常
*/
public void setLiquidInfo(Integer cpyid, LiquidInfoIndex index, Integer val) throws AppException {
callcmd(MId.PipetteMod, CmdId.pipette_set_liquid_info, cpyid, index.toInteger(), val);
}
public void setLiquidInfo(LiquidConfigCpyIdx cpyid, LiquidInfoIndex index, Integer val) throws AppException {
setLiquidInfo(cpyid.toInteger(), index, val);
}
/**
* 获取液体信息
*
* @param cpyid 第几份
* @param index 索引
* @return
@ -165,6 +187,9 @@ public class PipetteCtrlDriverV2 {
return callcmd(MId.PipetteMod, CmdId.pipette_get_liquid_info, cpyid, index.toInteger()).getContentI32(0);
}
public Integer getLiquidInfo(LiquidConfigCpyIdx cpyid, LiquidInfoIndex index) throws AppException {
return getLiquidInfo(cpyid.toInteger(), index);
}
public Integer getPlatInfoMaxCpyId() throws AppException {
return callcmd(MId.PipetteMod, CmdId.pipette_get_platinfo_max_cpyid).getContentI32(0);
@ -182,13 +207,13 @@ public class PipetteCtrlDriverV2 {
return callcmd(MId.PipetteMod, CmdId.pipette_get_container_info_max_cpyid).getContentI32(0);
}
// pipette_get_liquid_info_max_cpyid
// pipette_get_liquid_info_max_cpyid
public Integer getLiquidInfoMaxCpyId() throws AppException {
return callcmd(MId.PipetteMod, CmdId.pipette_get_liquid_info_max_cpyid).getContentI32(0);
}
/***********************************************************************************************************************
* Z轴控制 *
* Z轴控制 *
***********************************************************************************************************************/
public void zMotorEnable(Integer enable) throws AppException {
@ -241,9 +266,9 @@ public class PipetteCtrlDriverV2 {
return callcmd(MId.PipetteMod, CmdId.pipette_zmotor_read_enc_pos).getContentI32(0);
}
// /***********************************************************************************************************************
// * PUMP *
// ***********************************************************************************************************************/
// /***********************************************************************************************************************
// * PUMP *
// ***********************************************************************************************************************/
public void pipettePumpInitDeviceBlock(Integer platInfoCpyId) throws AppException {
callcmd(MId.PipetteMod, CmdId.pipette_pump_init_device, platInfoCpyId);
waitForMod(CmdId.pipette_pump_init_device);
@ -291,7 +316,6 @@ public class PipetteCtrlDriverV2 {
return callcmd(MId.PipetteMod, CmdId.pipette_read_state, index.toInteger()).getContentI32(0);
}
public Integer readTipState() throws AppException {
return callcmd(MId.PipetteMod, CmdId.pipette_read_tip_state).getContentI32(0);
}
@ -305,7 +329,7 @@ public class PipetteCtrlDriverV2 {
}
//
// UTILS
// UTILS
//
private A8kPacket callcmd(MId moduleId, CmdId cmdId, Integer... param) throws AppException {
return canBus.callcmd(moduleId, cmdId, param);
@ -315,4 +339,224 @@ public class PipetteCtrlDriverV2 {
canBus.waitForMod(MId.PipetteMod, actionOvertimeConstant.get(MId.PipetteMod, action));
}
//
// Config
//
public void applyPlatInfo(Integer cpyIdx, PipettePlatInfo val) throws AppException {
setPlatInfo(cpyIdx, PlatformInfoIndex.workRefPos, val.workRefPos);
setPlatInfo(cpyIdx, PlatformInfoIndex.tipPickingPos, val.tipPickingPos);
setPlatInfo(cpyIdx, PlatformInfoIndex.tipPickingSearchRange, val.tipPickingSearchRange);
setPlatInfo(cpyIdx, PlatformInfoIndex.tipPickingAppendDistance, val.tipPickingAppendDistance);
setPlatInfo(cpyIdx, PlatformInfoIndex.tipDepositPos, val.tipDepositPos);
setPlatInfo(cpyIdx, PlatformInfoIndex.transformPos, val.transformPos);
setPlatInfo(cpyIdx, PlatformInfoIndex.tipType, val.tipType);
setPlatInfo(cpyIdx, PlatformInfoIndex.tipLength, val.tipLength);
}
public PipettePlatInfo getPlatInfo(Integer cpyIdx) throws AppException {
PipettePlatInfo val = new PipettePlatInfo();
val.workRefPos = getPlatInfo(cpyIdx, PlatformInfoIndex.workRefPos);
val.tipPickingPos = getPlatInfo(cpyIdx, PlatformInfoIndex.tipPickingPos);
val.tipPickingSearchRange = getPlatInfo(cpyIdx, PlatformInfoIndex.tipPickingSearchRange);
val.tipPickingAppendDistance = getPlatInfo(cpyIdx, PlatformInfoIndex.tipPickingAppendDistance);
val.tipDepositPos = getPlatInfo(cpyIdx, PlatformInfoIndex.tipDepositPos);
val.transformPos = getPlatInfo(cpyIdx, PlatformInfoIndex.transformPos);
val.tipType = getPlatInfo(cpyIdx, PlatformInfoIndex.tipType);
val.tipLength = getPlatInfo(cpyIdx, PlatformInfoIndex.tipLength);
val.mark = getPlatInfo(cpyIdx, PlatformInfoIndex.mark);
return val;
}
public void applyContainerInfo(ContainerCpyId cpyIdx, PipetteContainerInfo val) throws AppException {
setContainerInfo(cpyIdx, ContainerInfoIndex.containerType, val.containerType);
setContainerInfo(cpyIdx, ContainerInfoIndex.containerNeckPos, val.containerNeckPos);
setContainerInfo(cpyIdx, ContainerInfoIndex.containerDepth, val.containerDepth);
setContainerInfo(cpyIdx, ContainerInfoIndex.containerRound, val.containerRound);
setContainerInfo(cpyIdx, ContainerInfoIndex.containerBottomSectionHeight, val.containerBottomSectionHeight);
setContainerInfo(cpyIdx, ContainerInfoIndex.immersionDepth, val.immersionDepth);
setContainerInfo(cpyIdx, ContainerInfoIndex.leavingHeight, val.leavingHeight);
setContainerInfo(cpyIdx, ContainerInfoIndex.jetHeight, val.jetHeight);
setContainerInfo(cpyIdx, ContainerInfoIndex.lldStartSearchDepth, val.lldStartSearchDepth);
setContainerInfo(cpyIdx, ContainerInfoIndex.fixAspirationDepth, val.fixAspirationDepth);
setContainerInfo(cpyIdx, ContainerInfoIndex.llfVConvertCoefficient, val.llfVconvertConeff);
setContainerInfo(cpyIdx, ContainerInfoIndex.pierceDepth, val.pierceDepth);
}
public PipetteContainerInfo getContainerInfo(ContainerCpyId cpyIdx) throws AppException {
PipetteContainerInfo val = new PipetteContainerInfo();
val.containerType = getContainerInfo(cpyIdx, ContainerInfoIndex.containerType);
val.containerNeckPos = getContainerInfo(cpyIdx, ContainerInfoIndex.containerNeckPos);
val.containerDepth = getContainerInfo(cpyIdx, ContainerInfoIndex.containerDepth);
val.containerRound = getContainerInfo(cpyIdx, ContainerInfoIndex.containerRound);
val.containerBottomSectionHeight = getContainerInfo(cpyIdx, ContainerInfoIndex.containerBottomSectionHeight);
val.immersionDepth = getContainerInfo(cpyIdx, ContainerInfoIndex.immersionDepth);
val.leavingHeight = getContainerInfo(cpyIdx, ContainerInfoIndex.leavingHeight);
val.jetHeight = getContainerInfo(cpyIdx, ContainerInfoIndex.jetHeight);
val.lldStartSearchDepth = getContainerInfo(cpyIdx, ContainerInfoIndex.lldStartSearchDepth);
val.fixAspirationDepth = getContainerInfo(cpyIdx, ContainerInfoIndex.fixAspirationDepth);
val.llfVconvertConeff = getContainerInfo(cpyIdx, ContainerInfoIndex.llfVConvertCoefficient);
val.pierceDepth = getContainerInfo(cpyIdx, ContainerInfoIndex.pierceDepth);
val.mark = getContainerInfo(cpyIdx, ContainerInfoIndex.mark);
return val;
}
public void applyLiquidInfo(LiquidConfigCpyIdx cpyIdx, PipetteLiquidInfo val) throws AppException {
setLiquidInfo(cpyIdx, LiquidInfoIndex.plldPmVCpyId, val.plldPmVCpyId);
setLiquidInfo(cpyIdx, LiquidInfoIndex.plldThreshold, val.plldThreshold);
setLiquidInfo(cpyIdx, LiquidInfoIndex.plldZmVel, val.plldZmVel);
setLiquidInfo(cpyIdx, LiquidInfoIndex.emptyTipPmVCpyId, val.emptyTipPmVCpyId);
setLiquidInfo(cpyIdx, LiquidInfoIndex.blowoutAirVolume, val.blowoutAirVolume);
setLiquidInfo(cpyIdx, LiquidInfoIndex.blowoutAirPmVCpyId, val.blowoutAirPmVCpyId);
setLiquidInfo(cpyIdx, LiquidInfoIndex.overAspiratedVolume, val.overAspiratedVolume);
setLiquidInfo(cpyIdx, LiquidInfoIndex.overAspiratedPmVCpyId, val.overAspiratedPmVCpyId);
setLiquidInfo(cpyIdx, LiquidInfoIndex.aspirationPmVCpyIdLow, val.aspirationPmVCpyIdLow);
setLiquidInfo(cpyIdx, LiquidInfoIndex.aspirationPmVCpyIdHigh, val.aspirationPmVCpyIdHigh);
setLiquidInfo(cpyIdx, LiquidInfoIndex.aspirationVolumeBreakVal, val.aspirationVolumeBreakVal);
setLiquidInfo(cpyIdx, LiquidInfoIndex.volumeCalibrationCoefficientB, val.volumeCalibrationCoefficientB);
setLiquidInfo(cpyIdx, LiquidInfoIndex.volumeCalibrationCoefficientK, val.volumeCalibrationCoefficientK);
setLiquidInfo(cpyIdx, LiquidInfoIndex.settlingTime, val.settlingTime);
setLiquidInfo(cpyIdx, LiquidInfoIndex.transportVolume, val.transportVolume);
setLiquidInfo(cpyIdx, LiquidInfoIndex.transportVolumePmVCpyId, val.transportVolumePmVCpyId);
setLiquidInfo(cpyIdx, LiquidInfoIndex.mixPmVCpyId, val.mixPmVCpyId);
}
public PipetteLiquidInfo getLiquidInfo(LiquidConfigCpyIdx cpyIdx) throws AppException {
PipetteLiquidInfo val = new PipetteLiquidInfo();
val.plldPmVCpyId = getLiquidInfo(cpyIdx, LiquidInfoIndex.plldPmVCpyId);
val.plldThreshold = getLiquidInfo(cpyIdx, LiquidInfoIndex.plldThreshold);
val.plldZmVel = getLiquidInfo(cpyIdx, LiquidInfoIndex.plldZmVel);
val.emptyTipPmVCpyId = getLiquidInfo(cpyIdx, LiquidInfoIndex.emptyTipPmVCpyId);
val.blowoutAirVolume = getLiquidInfo(cpyIdx, LiquidInfoIndex.blowoutAirVolume);
val.blowoutAirPmVCpyId = getLiquidInfo(cpyIdx, LiquidInfoIndex.blowoutAirPmVCpyId);
val.overAspiratedVolume = getLiquidInfo(cpyIdx, LiquidInfoIndex.overAspiratedVolume);
val.overAspiratedPmVCpyId = getLiquidInfo(cpyIdx, LiquidInfoIndex.overAspiratedPmVCpyId);
val.aspirationPmVCpyIdLow = getLiquidInfo(cpyIdx, LiquidInfoIndex.aspirationPmVCpyIdLow);
val.aspirationPmVCpyIdHigh = getLiquidInfo(cpyIdx, LiquidInfoIndex.aspirationPmVCpyIdHigh);
val.aspirationVolumeBreakVal = getLiquidInfo(cpyIdx, LiquidInfoIndex.aspirationVolumeBreakVal);
val.volumeCalibrationCoefficientB = getLiquidInfo(cpyIdx, LiquidInfoIndex.volumeCalibrationCoefficientB);
val.volumeCalibrationCoefficientK = getLiquidInfo(cpyIdx, LiquidInfoIndex.volumeCalibrationCoefficientK);
val.settlingTime = getLiquidInfo(cpyIdx, LiquidInfoIndex.settlingTime);
val.transportVolume = getLiquidInfo(cpyIdx, LiquidInfoIndex.transportVolume);
val.transportVolumePmVCpyId = getLiquidInfo(cpyIdx, LiquidInfoIndex.transportVolumePmVCpyId);
val.mixPmVCpyId = getLiquidInfo(cpyIdx, LiquidInfoIndex.mixPmVCpyId);
val.mark = getLiquidInfo(cpyIdx, LiquidInfoIndex.mark);
return val;
}
public void setPMVCfg(PMVCpyIdx idx, PipettePMVCfg val) throws AppException {
setPMVCfg(idx, PMVConfigIndex.acc, val.acc);
setPMVCfg(idx, PMVConfigIndex.dec, val.dec);
setPMVCfg(idx, PMVConfigIndex.vStart, val.vStart);
setPMVCfg(idx, PMVConfigIndex.vStop, val.vStop);
setPMVCfg(idx, PMVConfigIndex.vMax, val.vMax);
}
public PipettePMVCfg getPMVCfg(PMVCpyIdx idx) throws AppException {
PipettePMVCfg val = new PipettePMVCfg();
val.acc = getPMVCfg(idx, PMVConfigIndex.acc);
val.dec = getPMVCfg(idx, PMVConfigIndex.dec);
val.vStart = getPMVCfg(idx, PMVConfigIndex.vStart);
val.vStop = getPMVCfg(idx, PMVConfigIndex.vStop);
val.vMax = getPMVCfg(idx, PMVConfigIndex.vMax);
val.mark = getPMVCfg(idx, PMVConfigIndex.mark);
return val;
}
public void setZMBCfg(PipetteZMBCfg val) throws AppException {
setZMBCfg(ZMBasicConfigIndex.shaft, val.shaft);
setZMBCfg(ZMBasicConfigIndex.oneCirclePulse, val.oneCirclePulse);
setZMBCfg(ZMBasicConfigIndex.oneCirclePulseDenominator, val.oneCirclePulseDenominator);
setZMBCfg(ZMBasicConfigIndex.ihold, val.ihold);
setZMBCfg(ZMBasicConfigIndex.irun, val.irun);
setZMBCfg(ZMBasicConfigIndex.iholddelay, val.iholddelay);
setZMBCfg(ZMBasicConfigIndex.iglobalscaler, val.iglobalscaler);
setZMBCfg(ZMBasicConfigIndex.mind, val.minD);
setZMBCfg(ZMBasicConfigIndex.maxd, val.maxD);
setZMBCfg(ZMBasicConfigIndex.tzerowait, val.tzerowait);
setZMBCfg(ZMBasicConfigIndex.encResolution, val.encResolution);
setZMBCfg(ZMBasicConfigIndex.enableEnc, val.enableEnc);
setZMBCfg(ZMBasicConfigIndex.dzero, val.dzero);
setZMBCfg(ZMBasicConfigIndex.ioTriggerAppendDistance, val.ioTriggerAppendDistance);
setZMBCfg(ZMBasicConfigIndex.posDeviTolerance, val.posDeviTolerance);
setZMBCfg(ZMBasicConfigIndex.mres, val.mres);
}
public PipetteZMBCfg getZMBCfg() throws AppException {
PipetteZMBCfg val = new PipetteZMBCfg();
val.shaft = getZMBCfg(ZMBasicConfigIndex.shaft);
val.oneCirclePulse = getZMBCfg(ZMBasicConfigIndex.oneCirclePulse);
val.oneCirclePulseDenominator = getZMBCfg(ZMBasicConfigIndex.oneCirclePulseDenominator);
val.ihold = getZMBCfg(ZMBasicConfigIndex.ihold);
val.irun = getZMBCfg(ZMBasicConfigIndex.irun);
val.iholddelay = getZMBCfg(ZMBasicConfigIndex.iholddelay);
val.iglobalscaler = getZMBCfg(ZMBasicConfigIndex.iglobalscaler);
val.minD = getZMBCfg(ZMBasicConfigIndex.mind);
val.maxD = getZMBCfg(ZMBasicConfigIndex.maxd);
val.tzerowait = getZMBCfg(ZMBasicConfigIndex.tzerowait);
val.encResolution = getZMBCfg(ZMBasicConfigIndex.encResolution);
val.enableEnc = getZMBCfg(ZMBasicConfigIndex.enableEnc);
val.dzero = getZMBCfg(ZMBasicConfigIndex.dzero);
val.ioTriggerAppendDistance = getZMBCfg(ZMBasicConfigIndex.ioTriggerAppendDistance);
val.posDeviTolerance = getZMBCfg(ZMBasicConfigIndex.posDeviTolerance);
val.mres = getZMBCfg(ZMBasicConfigIndex.mres);
val.mark = getZMBCfg(ZMBasicConfigIndex.mark);
return val;
}
public void setZMVCfg(ZMVCpyIdx idx, PipetteZMVCfg val) throws AppException {
setZMVCfg(idx, ZMVConfigIndex.vstart, val.vstart);
setZMVCfg(idx, ZMVConfigIndex.a1, val.a1);
setZMVCfg(idx, ZMVConfigIndex.amax, val.amax);
setZMVCfg(idx, ZMVConfigIndex.v1, val.v1);
setZMVCfg(idx, ZMVConfigIndex.dmax, val.dmax);
setZMVCfg(idx, ZMVConfigIndex.d1, val.d1);
setZMVCfg(idx, ZMVConfigIndex.vstop, val.vstop);
setZMVCfg(idx, ZMVConfigIndex.vmax, val.vmax);
}
public PipetteZMVCfg getZMVCfg(ZMVCpyIdx idx) throws AppException {
PipetteZMVCfg val = new PipetteZMVCfg();
val.vstart = getZMVCfg(idx, ZMVConfigIndex.vstart);
val.a1 = getZMVCfg(idx, ZMVConfigIndex.a1);
val.amax = getZMVCfg(idx, ZMVConfigIndex.amax);
val.v1 = getZMVCfg(idx, ZMVConfigIndex.v1);
val.dmax = getZMVCfg(idx, ZMVConfigIndex.dmax);
val.d1 = getZMVCfg(idx, ZMVConfigIndex.d1);
val.vstop = getZMVCfg(idx, ZMVConfigIndex.vstop);
val.vmax = getZMVCfg(idx, ZMVConfigIndex.vmax);
val.mark = getZMVCfg(idx, ZMVConfigIndex.mark);
return val;
}
public PipetteConfig getConfig() throws AppException {
PipetteConfig cfg = new PipetteConfig();
cfg.zmBCfgs = getZMBCfg();
for (int i = 0; i < PlatInfoCpyIdx.values().length; i++) {
cfg.platInfos.add(getPlatInfo(i));
}
for (int i = 0; i < ContainerCpyId.values().length; i++) {
if (ContainerCpyId.values()[i].equals(ContainerCpyId.NotSet))
continue;
cfg.containerInfos.add(getContainerInfo(ContainerCpyId.values()[i]));
}
for (int i = 0; i < LiquidConfigCpyIdx.values().length; i++) {
if (LiquidConfigCpyIdx.values()[i].equals(LiquidConfigCpyIdx.NotSet))
continue;
cfg.liquidInfos.add(getLiquidInfo(LiquidConfigCpyIdx.values()[i]));
}
for (int i = 0; i < ZMVCpyIdx.values().length; i++) {
if (ZMVCpyIdx.values()[i].equals(ZMVCpyIdx.NotSet))
continue;
cfg.zmVCfgs.add(getZMVCfg(ZMVCpyIdx.values()[i]));
}
for (int i = 0; i < PMVCpyIdx.values().length; i++) {
if (PMVCpyIdx.values()[i].equals(PMVCpyIdx.NotSet))
continue;
cfg.pmVCfgs.add(getPMVCfg(PMVCpyIdx.values()[i]));
}
return cfg;
}
}

17
src/main/java/a8k/app/hardware/type/pipette_module/PipetteConfig.java

@ -0,0 +1,17 @@
package a8k.app.hardware.type.pipette_module;
import a8k.app.hardware.type.pipette_module.cfgbean.*;
import java.util.ArrayList;
import java.util.List;
public class PipetteConfig {
public PipetteZMBCfg zmBCfgs;
public List<PipettePlatInfo> platInfos = new ArrayList<>();
public List<PipetteContainerInfo> containerInfos = new ArrayList<>();
public List<PipetteLiquidInfo> liquidInfos = new ArrayList<>();
public List<PipetteZMVCfg> zmVCfgs = new ArrayList<>();
public List<PipettePMVCfg> pmVCfgs = new ArrayList<>();
}

1
src/main/java/a8k/app/hardware/type/pipette_module/cfg/ContainerInfoIndex.java

@ -13,6 +13,7 @@ public enum ContainerInfoIndex {
fixAspirationDepth, // 固定吸液深度((0.1mm)当lld失能时移液枪先移动到这个位置然后开始吸液
llfVConvertCoefficient, // 液面跟随转换系数 0.0001 llf_zm_vel = aspiration_pm_vel * llf_vconvert_coneff * 0.0001
pierceDepth, // 穿刺深度(0.1mm)用于刺破容器防尘膜
mark,
;
public Integer toInteger() {

2
src/main/java/a8k/app/hardware/type/pipette_module/cfg/LiquidInfoIndex.java

@ -60,7 +60,7 @@ public enum LiquidInfoIndex {
// // 混匀pm速率
// //
mixPmVCpyId, // 混匀时泵机速率配置
mark,
;
public Integer toInteger() {

1
src/main/java/a8k/app/hardware/type/pipette_module/cfg/PMBasicConfigIndex.java

@ -2,6 +2,7 @@ package a8k.app.hardware.type.pipette_module.cfg;
public enum PMBasicConfigIndex {
Pad,
mark,
;
public Integer toInteger() {

2
src/main/java/a8k/app/hardware/type/pipette_module/cfg/PMVConfigIndex.java

@ -6,7 +6,7 @@ public enum PMVConfigIndex {
vStart, // 启动速度 ul/s (0...319)
vStop, // 停止速度 ul/s (0...319)
vMax, // 最大速度 ul/s (0...2552)
mark,
;
public Integer toInteger() {

1
src/main/java/a8k/app/hardware/type/pipette_module/cfg/PlatformInfoIndex.java

@ -24,6 +24,7 @@ public enum PlatformInfoIndex {
*/
tipType,
tipLength, // tip长度
mark,
;
public Integer toInteger() {

17
src/main/java/a8k/app/hardware/type/pipette_module/cfg/ZMBasicConfigIndex.java

@ -7,19 +7,20 @@ public enum ZMBasicConfigIndex {
shaft,
oneCirclePulse,
oneCirclePulseDenominator,
iHold,
iRun,
iHoldDelay,
iGlobalscaler,
minD,
maxD,
tZeroWait,
ihold,
irun,
iholddelay,
iglobalscaler,
mind,
maxd,
tzerowait,
encResolution,
enableEnc,
dZero,
dzero,
ioTriggerAppendDistance,
posDeviTolerance,
mres,
mark,
;
;

11
src/main/java/a8k/app/hardware/type/pipette_module/cfg/ZMVConfigIndex.java

@ -1,14 +1,15 @@
package a8k.app.hardware.type.pipette_module.cfg;
public enum ZMVConfigIndex {
vStart,
vstart,
a1,
aMax,
amax,
v1,
dMax,
dmax,
d1,
vStop,
vMax,
vstop,
vmax,
mark,
;
public Integer toInteger() {

17
src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteContainerInfo.java

@ -0,0 +1,17 @@
package a8k.app.hardware.type.pipette_module.cfgbean;
public class PipetteContainerInfo {
public Integer containerType = 0; // 容器类型 0:平面 1:flat(平底) 2:conical(锥底) 3:round(圆底)
public Integer containerNeckPos = 0; // 容器,瓶口位置(相对位置0.1mm) !discard 废弃不再使用
public Integer containerDepth = 0; // 容器,深度(0.1mm)
public Integer containerRound = 0; // 容器,直径(0.1mm)
public Integer containerBottomSectionHeight = 0; // 容器,瓶底高度(0.1mm)
public Integer immersionDepth = 0; // 侵入液面高度即液面以下的高度精度0.1mm
public Integer leavingHeight = 0; // 离开液面高度此位置ZEUS开始缓慢进入液面或离开液面精度0.1mm
public Integer jetHeight = 0; // 喷射高度(0.1mm)
public Integer lldStartSearchDepth = 0; // lld开始搜索时位置冗余,精度0.1mmabspos = container_neck_pos + lld_start_search_pos_redundancy
public Integer fixAspirationDepth = 0; // 固定吸液深度((0.1mm)当lld失能时移液枪先移动到这个位置然后开始吸液
public Integer llfVconvertConeff = 0; // 液面跟随转换系数 0.0001 llf_zm_vel = aspiration_pm_vel * llf_vconvert_coneff * 0.0001
public Integer pierceDepth = 0; // 穿刺深度(0.1mm)用于刺破容器防尘膜
public Integer mark = 0; // 结构体最后一个数值设置9973用于保证单片机端和java端均正确更新了枚举
}

87
src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteLiquidInfo.java

@ -0,0 +1,87 @@
package a8k.app.hardware.type.pipette_module.cfgbean;
public class PipetteLiquidInfo {
/**
* @brief
*
* LLD
* 移动到液面之上-->
* 清空TIP
* 吸入空气
* 移动到液面之下-->
* 吸入
* 等待一定时间
* 移动到液面之上(缓慢)
* 吸入一定量的空气
*/
//
// lld
//
public Integer plldPmVCpyId = 0; // 液面探测时泵机速率
public Integer plldThreshold = 0; // 液面探测阈值
public Integer plldZmVel = 0; // 液面探测时泵机速率
//
// 清空tip配置
//
public Integer emptyTipPmVCpyId = 0; // 清空tip速度
//
// 吸入空气
//
public Integer blowoutAirVolume = 0; // 清空空气量,在吸液前吸入的空气量. 精度0.1ul (保证清空tip头)
public Integer blowoutAirPmVCpyId = 0; // 吸入空气时泵机速率
//
// 润湿tip头配置
//
public Integer overAspiratedVolume = 0; // 过量吸液量先吸入后迅速排出用来润湿tip头这个用在移液量小于10微升的情况下精度0.1ul
public Integer overAspiratedPmVCpyId = 0; // 过量吸液速度
//
// aspiration 吸液配置
//
public Integer aspirationPmVCpyIdLow = 0; // 小体积吸液速度
public Integer aspirationPmVCpyIdHigh = 0; // 大体积吸液速度
public Integer aspirationVolumeBreakVal = 0; // 小体积大体积分界点
public Integer volumeCalibrationCoefficientB = 0; // 0.0001
public Integer volumeCalibrationCoefficientK = 0; // 0.0001
//
// 保持时间
//
/**
* @brief settling_time(ms)
*
* Settling Time in 1 ms
* This parameter sets how long the tip
* remains in liquid after aspiration or
* dispense before moving out of the
* liquid. The tip geometry and liquid
* viscosity are considered when setting
* this parameter. If settling time is too
* short the liquid has not enough time to fill
* the tip and unwanted air is aspirated
* as soon as the tip is lifted out of the liquid.
*
* 保持时间
*
* 此参数用于吸液后在液面下保持的时间这个参数的设定根据tip头的类型和液体的粘稠度有关
* 如果此值设定的时间太短则液体不能完全充满tip头
*
*/
public Integer settlingTime = 0; // (ms) 设置
//
// 转移时多吸入的量
//
public Integer transportVolume = 0; // 转移过程中多吸入的量精度0.1ul (放滴落)
public Integer transportVolumePmVCpyId = 0; // 吸入过量空气时泵机速率
//
// 混匀pm速率
//
public Integer mixPmVCpyId = 0; // 混匀时泵机速率配置
public Integer mark = 0; // 结构体最后一个数值设置9973用于保证单片机端和java端均正确更新了枚举
}

10
src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipettePMVCfg.java

@ -0,0 +1,10 @@
package a8k.app.hardware.type.pipette_module.cfgbean;
public class PipettePMVCfg {
public Integer acc = 0;
public Integer dec = 0;
public Integer vStart = 0;
public Integer vStop = 0;
public Integer vMax = 0;
public Integer mark = 0; // 结构体最后一个数值设置9973用于保证单片机端和java端均正确更新了枚举
}

30
src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipettePlatInfo.java

@ -0,0 +1,30 @@
package a8k.app.hardware.type.pipette_module.cfgbean;
public class PipettePlatInfo {
/**
* @brief 工作参考平面
* 代码中并不使用这个位置这个参数只是为了后续
* 如果平台高度发生变化时可以通过调整dzero使得
* work_ref_plane数值不变
*/
public Integer workRefPos = 0; //
public Integer tipPickingPos = 0; // 开始取tip位置(绝对位置0.1mm)
public Integer tipPickingSearchRange = 0; // 取tip的范围
public Integer tipPickingAppendDistance = 0; // 取tip时z轴的附加距离
public Integer tipDepositPos = 0; // 丢tip位置(绝对位置0.1mm)
public Integer transformPos = 0; // 移液枪安全移动的高度(绝对位置0.1mm)
/**
* @brief tip类型
*
* TS1000UL = 0, // 1000ul, max=1002.6ul
* TS200UL = 1, // 200ul, max=250ul
* TS50UL = 2, // 50ul, max=62ul
* TS20UL = 3, // 20ul, max=40ul
*/
public Integer tipType = 0;
public Integer tipLength = 0; // tip长度
public Integer mark = 0; // 结构体最后一个数值设置9973用于保证单片机端和java端均正确更新了枚举
}

21
src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteZMBCfg.java

@ -0,0 +1,21 @@
package a8k.app.hardware.type.pipette_module.cfgbean;
public class PipetteZMBCfg {
public Integer shaft = 0; // Z轴电机运动方向调整
public Integer oneCirclePulse = 0; // 电子齿轮比-分子
public Integer oneCirclePulseDenominator = 0; // 电子齿轮比-分母
public Integer ihold = 0; //
public Integer irun = 0; //
public Integer iholddelay = 0; //
public Integer iglobalscaler = 0; //
public Integer minD = 0; //
public Integer maxD = 0; //
public Integer tzerowait = 0; //
public Integer encResolution = 0; //
public Integer enableEnc = 0; //
public Integer dzero = 0; //
public Integer ioTriggerAppendDistance = 0; //
public Integer posDeviTolerance = 0; //
public Integer mres = 0; //
public Integer mark = 0; // 结构体最后一个数值设置9973用于保证单片机端和java端均正确更新了枚举
}

13
src/main/java/a8k/app/hardware/type/pipette_module/cfgbean/PipetteZMVCfg.java

@ -0,0 +1,13 @@
package a8k.app.hardware.type.pipette_module.cfgbean;
public class PipetteZMVCfg {
public Integer vstart = 0;
public Integer a1 = 0;
public Integer amax = 0;
public Integer v1 = 0;
public Integer dmax = 0;
public Integer d1 = 0;
public Integer vstop = 0;
public Integer vmax = 0;
public Integer mark = 0; // 结构体最后一个数值设置9973用于保证单片机端和java端均正确更新了枚举
}

6
src/main/java/a8k/app/hardware/type/pipette_module/cpyidx/PlatInfoCpyIdx.java

@ -0,0 +1,6 @@
package a8k.app.hardware.type.pipette_module.cpyidx;
public enum PlatInfoCpyIdx {
Default,
TestTip,
}

13
src/main/java/a8k/app/service/data/FileMgrService.java

@ -68,6 +68,17 @@ public class FileMgrService {
return StorageControler.getDoloadPath(filePath);
}
public String storageTmpFile(String name, String content) throws IOException {
File dir = new File(FilePathConstant.FILE_OPT_REPORT_PATH);
dir.mkdirs();
String filePath = String.format("%s/%s.json", FilePathConstant.FILE_TMP_STORAGE_PATH, name);
File file = new File(filePath);
FileWriter writer = new FileWriter(file.getAbsolutePath());
writer.write(content);
writer.close();
return StorageControler.getDoloadPath(filePath);
}
//
// PRIVATE
//
@ -92,7 +103,7 @@ public class FileMgrService {
sb.append("scanerGain").append("\n");
sb.append(optScanResult.rawData.scanGain).append("\n");
sb.append("Result(").append(resultUnit).append(")").append("\n");
sb.append(String.format("%.4f",result)).append("\n");
sb.append(String.format("%.4f", result)).append("\n");
sb.append("\n");
sb.append("\n");
sb.append("\n");

3
src/main/java/a8k/extui/mgr/ExtApiPageGroupCfgMgr.java

@ -125,10 +125,11 @@ public class ExtApiPageGroupCfgMgr {
new Menu(LowLevelBoardVersionPreviewPage.class, "子模块版本查看"),
new Menu(HbotCtrlPage.class, "HBOT控制"),
new Menu("移液枪驱动", ZList.of(
new Menu(PipetteGunCfgSync.class, "配置同步"),
new Menu(PipetteGunZMotorCtrlPage.class, "移液枪Z电机控制"),
new Menu(PipetteGunZMVelConfigSettingPage.class, "移液枪Z电机VConfig配置"),
new Menu(PipetteGunPlatformSettingPage.class, "设置平台参数"),
new Menu(PipetteGunLiquidConfigSettingPage.class,"设置液体参数"),
new Menu(PipetteGunLiquidConfigSettingPage.class, "设置液体参数"),
new Menu(PipetteGunContainerConfigSettingPage.class, "设置液体容器参数")
)),

50
src/main/java/a8k/extui/page/driver/pipette_module/PipetteGunCfgSync.java

@ -0,0 +1,50 @@
package a8k.extui.page.driver.pipette_module;
import a8k.app.hardware.driver.PipetteCtrlDriverV2;
import a8k.app.hardware.type.pipette_module.PipetteConfig;
import a8k.app.hardware.type.pipette_module.cfg.ZMVConfigIndex;
import a8k.app.hardware.type.pipette_module.cpyidx.ZMVCpyIdx;
import a8k.app.service.data.FileMgrService;
import a8k.app.type.exception.AppException;
import a8k.app.utils.ZJsonHelper;
import a8k.extui.mgr.ExtApiPageMgr;
import a8k.extui.type.ret.ExtUIDownloadTasks;
import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.io.IOException;
@Component
@RequiredArgsConstructor
@Slf4j
public class PipetteGunCfgSync {
private final ExtApiPageMgr extApiPageMgr;
private final PipetteCtrlDriverV2 pipetteCtrlDriverV2;
private final FileMgrService fileMgrService;
public PipetteConfig readConfig() throws AppException {
return pipetteCtrlDriverV2.getConfig();
}
public ExtUIDownloadTasks downloadOptData(Integer id) throws IOException, AppException {
ExtUIDownloadTasks tasks = new ExtUIDownloadTasks();
var cfg = pipetteCtrlDriverV2.getConfig();
String url = fileMgrService.storageTmpFile("pipetteGunCfg", ZJsonHelper.objectToJson(cfg));
tasks.urls.add(url);
return tasks;
}
@PostConstruct
void init() {
var page = extApiPageMgr.newPage(this);
page.newGroup("基础操作");
page.addFunction("读取配置", this::readConfig);
page.addFunction("下载配置", this::downloadOptData);
extApiPageMgr.addPage(page);
}
}

20
src/main/java/a8k/extui/page/driver/pipette_module/PipetteGunZMVelConfigSettingPage.java

@ -26,15 +26,15 @@ public class PipetteGunZMVelConfigSettingPage {
public void setAccVConfig(Integer vStart, Integer a1, Integer aMax) throws AppException {
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.vStart, vStart);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.vstart, vStart);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.a1, a1);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.aMax, aMax);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.amax, aMax);
}
public void seDccVConfig(Integer vStop, Integer d1, Integer dMax) throws AppException {
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.vStop, vStop);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.vstop, vStop);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.d1, d1);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.dMax, dMax);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.dmax, dMax);
}
public void setV1(Integer v1) throws AppException {
@ -43,7 +43,7 @@ public class PipetteGunZMVelConfigSettingPage {
public void setVMax(Integer vMax) throws AppException {
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.vMax, vMax);
pipetteCtrlDriverV2.setZMVCfg(cpyId, ZMVConfigIndex.vmax, vMax);
}
public Integer getConfig(ZMVCpyIdx cpyId, ZMVConfigIndex index) {
@ -62,15 +62,15 @@ public class PipetteGunZMVelConfigSettingPage {
page.addFunction("设置速度CpyId", this::setCpyIdCxtRefreshPage)
.setParamVal("cpyId", () -> cpyId);
page.addFunction("设置加速过程配置", this::setAccVConfig)
.setParamVal("vStart", () -> getConfig(cpyId, ZMVConfigIndex.vStart))
.setParamVal("vStart", () -> getConfig(cpyId, ZMVConfigIndex.vstart))
.setParamVal("a1", () -> getConfig(cpyId, ZMVConfigIndex.a1))
.setParamVal("aMax", () -> getConfig(cpyId, ZMVConfigIndex.aMax));
.setParamVal("aMax", () -> getConfig(cpyId, ZMVConfigIndex.amax));
page.addFunction("设置减速过程配置", this::seDccVConfig)
.setParamVal("vStop", () -> getConfig(cpyId, ZMVConfigIndex.vStop))
.setParamVal("vStop", () -> getConfig(cpyId, ZMVConfigIndex.vstop))
.setParamVal("d1", () -> getConfig(cpyId, ZMVConfigIndex.d1))
.setParamVal("dMax", () -> getConfig(cpyId, ZMVConfigIndex.dMax));
.setParamVal("dMax", () -> getConfig(cpyId, ZMVConfigIndex.dmax));
page.addFunction("设置V1", this::setV1).setParamVal("v1", () -> getConfig(cpyId, ZMVConfigIndex.v1));
page.addFunction("设置VMax", this::setVMax).setParamVal("vMax", () -> getConfig(cpyId, ZMVConfigIndex.vMax));
page.addFunction("设置VMax", this::setVMax).setParamVal("vMax", () -> getConfig(cpyId, ZMVConfigIndex.vmax));
extApiPageMgr.addPage(page);
}

13
src/main/java/a8k/extui/page/driver/pipette_module/PipetteGunZMotorCtrlPage.java

@ -2,7 +2,6 @@ package a8k.extui.page.driver.pipette_module;
import a8k.app.hardware.driver.PipetteCtrlDriverV2;
import a8k.app.hardware.type.ModuleStatus;
import a8k.app.hardware.type.pipette_module.PipetteStateIndex;
import a8k.app.hardware.type.pipette_module.cfg.ZMBasicConfigIndex;
import a8k.app.type.exception.AppException;
import a8k.app.utils.ZJsonNode;
@ -111,11 +110,11 @@ public class PipetteGunZMotorCtrlPage {
}
public void setIRUN(Integer irun) throws AppException {
pipetteCtrlDriverV2.setZMBCfg(ZMBasicConfigIndex.iRun, irun);
pipetteCtrlDriverV2.setZMBCfg(ZMBasicConfigIndex.irun, irun);
}
public void setIHOLD(Integer ihold) throws AppException {
pipetteCtrlDriverV2.setZMBCfg(ZMBasicConfigIndex.iHold, ihold);
pipetteCtrlDriverV2.setZMBCfg(ZMBasicConfigIndex.ihold, ihold);
}
public void setOneCirclePulse(Integer pulse, Integer denominator) throws AppException {
@ -124,7 +123,7 @@ public class PipetteGunZMotorCtrlPage {
}
public void setDZeroPos(Integer dZeroPos) throws AppException {
pipetteCtrlDriverV2.setZMBCfg(ZMBasicConfigIndex.dZero, dZeroPos);
pipetteCtrlDriverV2.setZMBCfg(ZMBasicConfigIndex.dzero, dZeroPos);
}
@ -162,12 +161,12 @@ public class PipetteGunZMotorCtrlPage {
page.newGroup("寄存器配置");
page.addFunction("设备MRES", this::setMres).setParamVal("mres", () -> readReg(ZMBasicConfigIndex.mres));
page.addFunction("设置IRUN", this::setIRUN).setParamVal("irun", () -> readReg(ZMBasicConfigIndex.iRun));
page.addFunction("设置IHOLD", this::setIHOLD).setParamVal("ihold", () -> readReg(ZMBasicConfigIndex.iHold));
page.addFunction("设置IRUN", this::setIRUN).setParamVal("irun", () -> readReg(ZMBasicConfigIndex.irun));
page.addFunction("设置IHOLD", this::setIHOLD).setParamVal("ihold", () -> readReg(ZMBasicConfigIndex.ihold));
page.addFunction("设置一圈脉冲数", this::setOneCirclePulse)
.setParamVal("pulse", () -> readReg(ZMBasicConfigIndex.oneCirclePulse))
.setParamVal("denominator", () -> readReg(ZMBasicConfigIndex.oneCirclePulseDenominator));
page.addFunction("设置DZERO", this::setDZeroPos).setParamVal("dZeroPos", () -> readReg(ZMBasicConfigIndex.dZero));
page.addFunction("设置DZERO", this::setDZeroPos).setParamVal("dZeroPos", () -> readReg(ZMBasicConfigIndex.dzero));
page.addFunction("设置寄存器", this::setZMBCfg);
page.addFunction("读取所有寄存器", this::readAllRegs);

Loading…
Cancel
Save