Browse Source

update

tags/v0
zhaohe 1 year ago
parent
commit
ca0d293ce1
  1. 2
      src/main/java/a8k/appbean/IncubatorPos.java
  2. 55
      src/main/java/a8k/service/hardware/ReactionPlatesTransmitCtrlService.java

2
src/main/java/a8k/appbean/IncubatorPos.java

@ -1,7 +1,7 @@
package a8k.appbean;
public enum IncubatorPos {
POS01, POS02, POS03, POS04, POS05, POS06, POS07, POS08, POS09, POS10, POS11, POS12, POS13, POS14, POS15, POS16, POS17, POS18, POS19, POS20;
SPACE01, SPACE02, SPACE03, SPACE04, SPACE05, SPACE06, SPACE07, SPACE08, SPACE09, SPACE10, SPACE11, SPACE12, SPACE13, SPACE14, SPACE15, SPACE16, SPACE17, SPACE18, SPACE19, SPACE20;
final public Integer off;
private IncubatorPos() {

55
src/main/java/a8k/service/hardware/ReactionPlatesTransmitCtrlService.java

@ -210,32 +210,36 @@ public class ReactionPlatesTransmitCtrlService implements HardwareCtrlModule {
canBus.stepMotorEasyMoveToZeroPointQuickBlock(MId.IncubatorRotateCtrlM, getActionOvertime());
}
@HardwareServiceAction(name = "转盘移动到推板位", group = "单步操作")
public void trunableMoveToPushPos(Integer index) throws HardwareException, InterruptedException {
private void trunableMoveTo(Integer pos) throws HardwareException, InterruptedException {
checkBeforeMoveTrunable();
canBus.stepMotorEasyMoveToBlock(MId.IncubatorRotateCtrlM,//
getTurntablePushPos0() + index * getTurntablePosSpacing(), getActionOvertime());
//限制pos在 0--> 36000之间
pos = pos % 36000;
if (pos < 0) {pos += 36000;}
canBus.stepMotorEasyMoveToBlock(MId.IncubatorRotateCtrlM, pos, getActionOvertime());
}
@HardwareServiceAction(name = "转盘移动到推板位", group = "单步操作")
public void trunableMoveToPushPos(IncubatorPos index) throws HardwareException, InterruptedException {
trunableMoveTo(getTurntablePushPos0() + index.off * getTurntablePosSpacing());
}
@HardwareServiceAction(name = "转盘移动到出板位", group = "单步操作")
public void trunableMoveToPullPos(Integer index) throws HardwareException, InterruptedException {
checkBeforeMoveTrunable();
canBus.stepMotorEasyMoveToBlock(MId.IncubatorRotateCtrlM,//
getTurntablePullPos0() + index * getTurntablePosSpacing(), getActionOvertime());
public void trunableMoveToPullPos(IncubatorPos index) throws HardwareException, InterruptedException {
trunableMoveTo(getTurntablePullPos0() + index.off * getTurntablePosSpacing());
}
@HardwareServiceAction(name = "转盘移动到滴定位", group = "单步操作")
public void trunableMoveToDropLiquidPos(Integer index) throws HardwareException, InterruptedException {
checkBeforeMoveTrunable();
canBus.stepMotorEasyMoveToBlock(MId.IncubatorRotateCtrlM,//
getTurntableDropLiquidPos0() + index * getTurntablePosSpacing(), getActionOvertime());
public void trunableMoveToDropLiquidPos(IncubatorPos index) throws HardwareException, InterruptedException {
trunableMoveTo(getTurntableDropLiquidPos0() + index.off * getTurntablePosSpacing());
}
@HardwareServiceAction(name = "推板", group = "单步操作")
public AppRet<PlateInfo> pushPlate(PlateBoxCh PBCh, IncubatorPos turntablePosIndex) throws HardwareException, InterruptedException {
trunableMoveToPushPos(turntablePosIndex.off);
trunableMoveToPushPos(turntablePosIndex);
canBus.stepMotorEasyMoveToBlock(MId.PlatesBoxYM, getPBCh0Pos() + PBCh.off * getPBChSpacing(), getActionOvertime());
canBus.plateCodeScanerPushCardAndScanBlock(MId.PlatesBoxScanner, getPusherEndPos(), 10000);
canBus.stepMotorEasyMoveToZeroPointQuickBlock(MId.PlatesBoxPusherM, getActionOvertime());
@ -246,7 +250,7 @@ public class ReactionPlatesTransmitCtrlService implements HardwareCtrlModule {
@HardwareServiceAction(name = "拉板", group = "单步操作")
public void pullPlate(IncubatorPos turntablePosIndex) throws HardwareException, InterruptedException {
trunableMoveToPullPos(turntablePosIndex.off);
trunableMoveToPullPos(turntablePosIndex);
canBus.stepMotorEasyMoveToBlock(MId.OptModScannerM, getOptScanScandbyPos(), getActionOvertime());
canBus.stepMotorEasyMoveToBlock(MId.OptModPullM, getPullerTargetPos(), getActionOvertime());
canBus.stepMotorEasyMoveToZeroPointQuickBlock(MId.OptModPullM, getActionOvertime());
@ -259,6 +263,28 @@ public class ReactionPlatesTransmitCtrlService implements HardwareCtrlModule {
canBus.stepMotorEasyMoveToBlock(MId.OptModScannerM, getOptScanScandbyPos(), getActionOvertime());
}
private Boolean breakDropAllPlateFlag = false;
@HardwareServiceAction(name = "丢弃全部板", group = "测试")
public void dropAllPlate() throws HardwareException, InterruptedException {
breakDropAllPlateFlag = false;
checkBeforeMoveTrunable();
checkBeforeMovePlateBox();
modGroupMoveToZeroQuick();
for (IncubatorPos index : IncubatorPos.values()) {
pullPlate(index);
dropPlate();
if (breakDropAllPlateFlag) {
break;
}
}
}
@HardwareServiceAction(name = "打断-丢弃全部板", group = "测试")
public void breakDropAllPlate() throws HardwareException, InterruptedException {
breakDropAllPlateFlag = true;
}
@HardwareServiceAction(name = "显示板夹扫码原始曲线", group = "辅助调试")
public AppRet<A8kScanCurve> readPlateScanCurve() throws HardwareException, InterruptedException {
@ -295,4 +321,5 @@ public class ReactionPlatesTransmitCtrlService implements HardwareCtrlModule {
public AppRet<Integer> readOptModScannerMPosByMoveToZero() throws HardwareException, InterruptedException {
return AppRet.success(canBus.stepMotorReadPosByMoveToZeroBlock(MId.OptModScannerM, getActionOvertime()));
}
}
Loading…
Cancel
Save