|
|
@ -9,16 +9,22 @@ import a8k.service.app.devicedriver.basectrl.HbotBaseMoveControler; |
|
|
|
import a8k.service.app.devicedriver.basectrl.HbotModule; |
|
|
|
import a8k.service.app.devicedriver.basectrl.PipetteCtrlModule; |
|
|
|
import a8k.service.app.devicedriver.basectrl.CodeScaner; |
|
|
|
import a8k.service.app.devicedriver.ctrl.ConsumablesScanCtrl; |
|
|
|
import a8k.service.app.devicedriver.param.Hbot2DCodeScanPos; |
|
|
|
import a8k.type.ConsumableGroup; |
|
|
|
import a8k.type.ConsumableScanRawResult; |
|
|
|
import a8k.type.exception.AppException; |
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.fasterxml.jackson.databind.node.ArrayNode; |
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
@ExtApiTab(cfg = ExtApiTabConfig.Hbot2DCodeScanPosCalibration) |
|
|
|
@Component |
|
|
|
public class Hbot2DCodeScanPosCalibration { |
|
|
|
|
|
|
|
static Logger logger = org.slf4j.LoggerFactory.getLogger(Hbot2DCodeScanPosCalibration.class); |
|
|
|
|
|
|
|
@Resource |
|
|
|
A8kCanBusService canBus; |
|
|
@ -30,35 +36,14 @@ public class Hbot2DCodeScanPosCalibration { |
|
|
|
HbotModule hbotModule; |
|
|
|
@Resource |
|
|
|
HbotBaseMoveControler hbotBaseMoveControler; |
|
|
|
@Resource |
|
|
|
ConsumablesScanCtrl consumablesScanCtrl; |
|
|
|
|
|
|
|
@Resource |
|
|
|
Hbot2DCodeScanPos hbot2DCodeScanPos; |
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "归零", group = "测试工具", order = 0) |
|
|
|
public void deviceReset() throws AppException { |
|
|
|
pipetteCtrlModule.zMotorEnable(1); |
|
|
|
hbotModule.enable(1); |
|
|
|
pipetteCtrlModule.zMotorMoveZeroBlock(); |
|
|
|
hbotModule.moveToZeroBlock(); |
|
|
|
} |
|
|
|
|
|
|
|
public void disableMotor() throws AppException { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫码测试(当前位置)", group = "测试工具", order = 0) |
|
|
|
public String openCodeTryScaner() throws AppException { |
|
|
|
return codeScaner.pipetteModCodeScannerScanCode(); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫码测试(全部位置)", group = "测试工具", order = 0) |
|
|
|
public String scanAll() throws AppException { |
|
|
|
return codeScaner.pipetteModCodeScannerScanCode(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ExtApiFn(name = "获取所有坐标", order = 1) |
|
|
|
@ExtApiFn(name = "获取所有坐标",group = "基础", order = 1) |
|
|
|
public ObjectNode getPoss() throws AppException { |
|
|
|
ObjectMapper mapper = new ObjectMapper(); |
|
|
|
|
|
|
@ -81,8 +66,67 @@ public class Hbot2DCodeScanPosCalibration { |
|
|
|
return node; |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫码", order = 2) |
|
|
|
public void scan(String pos) throws AppException { |
|
|
|
|
|
|
|
// 测试工具 |
|
|
|
@ExtApiFn(name = "归零", group = "测试工具", order = 11) |
|
|
|
public void deviceReset() throws AppException { |
|
|
|
enableModule(); |
|
|
|
hbotBaseMoveControler.checkBeforeMove(); |
|
|
|
pipetteCtrlModule.zMotorMoveZeroBlock(); |
|
|
|
hbotModule.moveToZeroBlock(); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "使能相关模块", group = "测试工具", order = 12) |
|
|
|
public void enableModule() throws AppException { |
|
|
|
pipetteCtrlModule.zMotorEnable(1); |
|
|
|
hbotModule.enable(1); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "失能相关模块", group = "测试工具", order = 13) |
|
|
|
public void disableModule() throws AppException { |
|
|
|
pipetteCtrlModule.zMotorEnable(0); |
|
|
|
hbotModule.enable(0); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫码", group = "测试工具", order = 14) |
|
|
|
public String scanCode() throws AppException { |
|
|
|
return codeScaner.pipetteModCodeScannerScanCode(); |
|
|
|
} |
|
|
|
|
|
|
|
// |
|
|
|
@ExtApiFn(name = "设置当前位置为<板夹>扫码位", group = "标定", order = 21) |
|
|
|
public void setPBScanPos(ConsumableGroup group) throws AppException { |
|
|
|
hbot2DCodeScanPos.setPBScanPosX(group.off, hbotModule.readPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<小缓冲>扫码位", group = "标定", order = 22) |
|
|
|
public void setLittBSScanPos(ConsumableGroup group) throws AppException { |
|
|
|
hbot2DCodeScanPos.setLittBSX(group.off, hbotModule.readPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "设置当前位置为<大缓冲>扫码位", group = "标定", order = 23) |
|
|
|
public void setLarBSScanPos(ConsumableGroup group) throws AppException { |
|
|
|
hbot2DCodeScanPos.setLarBSX(group.off, hbotModule.readPos()); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫码测试(全部位置)", group = "校验", order = 31) |
|
|
|
public ConsumableScanRawResult scanAll() throws AppException { |
|
|
|
return consumablesScanCtrl.doScanConsumablesAction(); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫描板夹仓X", group = "校验", order = 31) |
|
|
|
public String scanPBScanPos(ConsumableGroup group) throws AppException { |
|
|
|
return consumablesScanCtrl.scanPB(group.off); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫描小缓冲液X", group = "校验", order = 32) |
|
|
|
public String scanLittBSScanPos(ConsumableGroup group) throws AppException { |
|
|
|
return consumablesScanCtrl.scanLittBS(group.off); |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "扫描大瓶缓冲液X)", group = "校验", order = 33) |
|
|
|
public String scanLarBSScanPos(ConsumableGroup group) throws AppException { |
|
|
|
return consumablesScanCtrl.scanLarBS(group.off); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|