Browse Source

update

master
zhaohe 9 months ago
parent
commit
3e6920ecb8
  1. 36
      sdk/components/pipette_module/pipette_ctrl_module_v2.cpp
  2. 2
      usrc/project_configs.h

36
sdk/components/pipette_module/pipette_ctrl_module_v2.cpp

@ -33,8 +33,8 @@
#define THREAD_START_WORK(...) thread_start_work(__FUNCTION__, __VA_ARGS__) #define THREAD_START_WORK(...) thread_start_work(__FUNCTION__, __VA_ARGS__)
#define PIPETTE_PREPARE_POS 550
#define LLD_PREPARE_DISTRIBUT_POS 100
#define PIPETTE_PREPARE_POS 250
#define LLD_PREPARE_DISTRIBUT_POS 50
// #define LLF_DPOS 1000 // #define LLF_DPOS 1000
#define ASPIRATE_POS 150 #define ASPIRATE_POS 150
@ -70,13 +70,13 @@ void PipetteModuleV2::initialize(int32_t id, config_t *config, hardward_config_t
void PipetteModuleV2::create_default_cfg(config_t *defaultcfg) { void PipetteModuleV2::create_default_cfg(config_t *defaultcfg) {
defaultcfg->limit_ul = 200; defaultcfg->limit_ul = 200;
defaultcfg->pump_acc = 14;
defaultcfg->pump_dec = 14;
defaultcfg->pump_vstart = 0;
defaultcfg->pump_vstop = 900;
defaultcfg->aspirate_pump_vel = 500; //
defaultcfg->pump_vmax = 1000;
defaultcfg->lld_pump_vel = 80; // lld推荐使用速度为50->200,这里
defaultcfg->pump_acc = 18;
defaultcfg->pump_dec = 18;
defaultcfg->pump_vstart = 200;
defaultcfg->pump_vstop = 300;
defaultcfg->aspirate_pump_vel = 500; //
defaultcfg->pump_vmax = 1000; // 1000已经是最大速度
defaultcfg->lld_pump_vel = 80; // lld推荐使用速度为50->200,这里
defaultcfg->lld_motor_vel_rpm = 80; defaultcfg->lld_motor_vel_rpm = 80;
defaultcfg->lld_detect_period_ms = 1; // 100ms defaultcfg->lld_detect_period_ms = 1; // 100ms
defaultcfg->lld_prepare_pos = PIPETTE_PREPARE_POS; defaultcfg->lld_prepare_pos = PIPETTE_PREPARE_POS;
@ -331,12 +331,22 @@ int32_t PipetteModuleV2::pipette_put_tip() {
int32_t PipetteModuleV2::pipette_lld_prepare() { int32_t PipetteModuleV2::pipette_lld_prepare() {
THREAD_START_WORK([this]() { THREAD_START_WORK([this]() {
if (m_state.lld_prepared == 1) {
ZLOGI(TAG, "has already prepared");
return;
}
ZLOGI(TAG, "zmotor move to zero"); ZLOGI(TAG, "zmotor move to zero");
zm_move_to(0, m_cfg.zm_default_velocity); zm_move_to(0, m_cfg.zm_default_velocity);
zm_waitfor_stop(); zm_waitfor_stop();
ZLOGI(TAG, "pump move to 0 pos");
DO_IN_THREAD(m_smtp2.pump_move_to_ul(m_cfg.pump_vmax, 0)); // 移动到零点
pump_waitfor_stop();
int32_t tipstate = 0;
pump_read_tip_state(&tipstate);
if (tipstate != 0) {
ZLOGI(TAG, "pump move to 0 pos");
DO_IN_THREAD(m_smtp2.pump_move_to_ul(m_cfg.pump_vmax, 0)); // 移动到零点
pump_waitfor_stop();
}
ZLOGI(TAG, "pump move to lld_prepare_pos %d", m_cfg.lld_prepare_pos); ZLOGI(TAG, "pump move to lld_prepare_pos %d", m_cfg.lld_prepare_pos);
DO_IN_THREAD(m_smtp2.pump_move_to_ul(m_cfg.pump_vmax, m_cfg.lld_prepare_pos)); // 移动到中点 DO_IN_THREAD(m_smtp2.pump_move_to_ul(m_cfg.pump_vmax, m_cfg.lld_prepare_pos)); // 移动到中点
@ -548,7 +558,7 @@ int32_t PipetteModuleV2::pipette_shake_up(int32_t ul, int32_t times) {
// first aspirate // first aspirate
// if (m_state.aspirate_cfg_llf_zm_rpm) zm_move_by(LLF_DPOS, m_state.aspirate_cfg_llf_zm_rpm); // if (m_state.aspirate_cfg_llf_zm_rpm) zm_move_by(LLF_DPOS, m_state.aspirate_cfg_llf_zm_rpm);
if (m_state.aspirate_cfg_llf_zm_rpm != 0) { if (m_state.aspirate_cfg_llf_zm_rpm != 0) {
zm_move_to(m_state.llf_endz, m_state.aspirate_cfg_llf_zm_rpm);
zm_move_to(m_state.llf_endz, m_state.aspirate_cfg_llf_zm_rpm);
} }
DO_IN_THREAD(m_smtp2.pump_aspirate(m_cfg.aspirate_pump_vel, ul)); DO_IN_THREAD(m_smtp2.pump_aspirate(m_cfg.aspirate_pump_vel, ul));

2
usrc/project_configs.h

@ -1,5 +1,5 @@
#pragma once #pragma once
#define PC_VERSION 602
#define PC_VERSION 603
#define PC_MANUFACTURER "http://www.iflytop.com/" #define PC_MANUFACTURER "http://www.iflytop.com/"
#define PC_PROJECT_NAME "a8000_subboard" #define PC_PROJECT_NAME "a8000_subboard"
#define PC_IFLYTOP_ENABLE_OS 1 #define PC_IFLYTOP_ENABLE_OS 1

Loading…
Cancel
Save