|
|
@ -48,20 +48,33 @@ void PipetteCtrlTab::construct(QTabWidget *fathertab) { |
|
|
|
{ |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "移液枪-操作", 4); |
|
|
|
|
|
|
|
box->newFunc("初始化操作", {}, [this](int argn, const char **args) { ICM->callcmd0(getDeviceId(), kpipette_ctrl_init_device); }); |
|
|
|
box->newFunc("推出吸头", {}, [this](int argn, const char **args) { ICM->callcmd0(getDeviceId(), kpipette_ctrl_put_tip); }); |
|
|
|
box->newFunc("移动到指定位置", {"ul"}, [this](int argn, const char **args) { ICM->callcmd1(getDeviceId(), kpipette_ctrl_move_to_ul, atoi(args[0])); }); |
|
|
|
box->newSubButton("Z轴复位", [this](int argn, const char **args) { ICM->callcmd0(getDeviceId() - 1, kstep_motor_easy_move_to_zero); }); |
|
|
|
box->newSubButton("使能Z轴电机", [this](int argn, const char **args) { ICM->callcmd1(getDeviceId() - 1, kstep_motor_enable, 1); }); |
|
|
|
box->newSubButton("失能Z轴电机", [this](int argn, const char **args) { ICM->callcmd1(getDeviceId() - 1, kstep_motor_enable, 0); }); |
|
|
|
box->newSubButtonEnd(); |
|
|
|
box->newSubButton("初始化操作", [this](int argn, const char **args) { ICM->callcmd0(getDeviceId(), kpipette_ctrl_init_device); }); |
|
|
|
box->newSubButton("推出吸头", [this](int argn, const char **args) { ICM->callcmd0(getDeviceId(), kpipette_ctrl_put_tip); }); |
|
|
|
box->newSubButton("lld准备", [this](int argn, const char **args) { ICM->callcmd0(getDeviceId(), kpipette_lld_prepare); }); |
|
|
|
|
|
|
|
box->newFunc("plld", {"zdpos", "p_threshold"}, [this](int argn, const char **args) { ICM->callcmd2(getDeviceId(), kpipette_plld, atoi(args[0]), atoi(args[1])); }); |
|
|
|
box->newFunc("clld", {"zdpos", "c_threshold"}, [this](int argn, const char **args) { ICM->callcmd2(getDeviceId(), kpipette_clld, atoi(args[0]), atoi(args[1])); }); |
|
|
|
box->newFunc("mlld", {"zdpos", "c_threshold", "p_threshold"}, [this](int argn, const char **args) { ICM->callcmd3(getDeviceId(), kpipette_mlld, atoi(args[0]), atoi(args[1]), atoi(args[2])); }); |
|
|
|
box->newFunc("lld检测液体", {}, [this](int argn, const char **args) { |
|
|
|
ICM->callcmd0(getDeviceId(), kpipette_lld_is_detect_liquid); |
|
|
|
int32_t isdetect = ICM->getAck(0); |
|
|
|
ZQUI::ins()->ishow("检测到液体:%d", isdetect); |
|
|
|
}); |
|
|
|
|
|
|
|
box->newFunc("测试CLLD", {"dpos"}, [this](int argn, const char **args) { ICM->callcmd1(getDeviceId(), kpipette_clld_test, atoi(args[0])); }); |
|
|
|
box->newFunc("测试PLLD", {"dpos"}, [this](int argn, const char **args) { ICM->callcmd1(getDeviceId(), kpipette_plld_test, atoi(args[0])); }); |
|
|
|
box->newFunc("使能Z轴电机", {"enable"}, [this](int argn, const char **args) { ICM->callcmd1(getDeviceId(), kpipette_enable_zmotor, atoi(args[0])); }); |
|
|
|
box->newFunc("吸取", {"ul"}, [this](int argn, const char **args) { ICM->callcmd1(getDeviceId(), kpipette_aspirate, atoi(args[0])); }); |
|
|
|
box->newFunc("分配", {"ul"}, [this](int argn, const char **args) { ICM->callcmd1(getDeviceId(), kpipette_distribut, atoi(args[0])); }); |
|
|
|
box->newFunc("吸吐摇匀", {"ul", "times"}, [this](int argn, const char **args) { ICM->callcmd2(getDeviceId(), kpipette_shake_up, atoi(args[0]), atoi(args[1])); }); |
|
|
|
|
|
|
|
box->newFunc("打印传感器数据记录", {}, [this](int argn, const char **args) { |
|
|
|
ICM->callcmd0(getDeviceId(), kpipette_get_sensor_sample_data_num); |
|
|
|
int32_t nsample = ICM->getAck(0); |
|
|
|
|
|
|
|
int32_t sample_period = 0; |
|
|
|
ICM->readreg(getDeviceId(), kreg_pipette_data_sample_period, &sample_period); |
|
|
|
ICM->readreg(getDeviceId(), kreg_pipette_lld_detect_period_ms, &sample_period); |
|
|
|
|
|
|
|
ZQUI::ins()->ishow("%5s, %5s, %5s, %5s", "time", "zpos", "cval", "pval"); |
|
|
|
|
|
|
@ -175,10 +188,21 @@ void PipetteCtrlTab::construct(QTabWidget *fathertab) { |
|
|
|
return true; |
|
|
|
}); |
|
|
|
|
|
|
|
tableBox->addReg("reg_pipette_pos_ul", kreg_pipette_pos_ul, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("reg_pipette_capactitance_val", kreg_pipette_capactitance_val, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("reg_pipette_tip_state", kreg_pipette_tip_state, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("reg_pipette_limit_ul", kreg_pipette_limit_ul, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("pos_ul", kreg_pipette_pos_ul, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("capactitance_val", kreg_pipette_capactitance_val, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("tip_state", kreg_pipette_tip_state, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("limit_ul", kreg_pipette_limit_ul, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("pump_acc", kreg_pipette_pump_acc, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("pump_dec", kreg_pipette_pump_dec, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("pump_vstart", kreg_pipette_pump_vstart, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("pump_vstop", kreg_pipette_pump_vstop, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("pump_vmax", kreg_pipette_pump_vmax, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("aspirate_distribut_pump_vel", kreg_pipette_aspirate_distribut_pump_vel, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("lld_pump_vel", kreg_pipette_lld_pump_vel, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("lld_motor_vel_rpm", kreg_pipette_lld_motor_vel_rpm, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("lld_detect_period_ms", kreg_pipette_lld_detect_period_ms, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("lld_prepare_pos", kreg_pipette_lld_prepare_pos, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
tableBox->addReg("lld_prepare_distribut_pos", kreg_pipette_lld_prepare_distribut_pos, ZRegItem::krw | ZRegItem::kdec); |
|
|
|
|
|
|
|
tableBox->addSpacer(); |
|
|
|
tab->addSpacer(); |
|
|
|