Browse Source

update

tags/v0
zhaohe 1 year ago
parent
commit
7a67b68a11
  1. 22
      src/main/java/a8k/a8k_can_protocol/CmdIdInfo.java
  2. 4
      src/main/java/a8k/a8k_can_protocol/ModuleId.java
  3. 409
      src/main/java/a8k/a8k_can_protocol/RegIndex.java
  4. 19
      src/main/java/a8k/a8k_can_protocol/RegIndexInfo.java
  5. 8
      src/main/java/a8k/appbean/SampleTubeState.java
  6. 6
      src/main/java/a8k/controller/TmpTestController.java
  7. 21
      src/main/java/a8k/service/db/dao/A8kDirectCtrlPosDao.java
  8. 9
      src/main/java/a8k/service/hardware/MotorTubeRackExitService.java
  9. 4
      src/main/java/a8k/service/hardware/MotorTubeRackMoveContrlService.java
  10. 67
      src/main/java/a8k/service/hardware/MotorTubeRackMoveCtrlService.java
  11. 92
      src/main/java/a8k/service/hardware/SamplesPreProcessModuleCtrlService.java

22
src/main/java/a8k/a8k_can_protocol/CmdIdInfo.java

@ -1,18 +1,20 @@
package a8k.a8k_can_protocol;
public class CmdIdInfo {
public String name;
public int id;
public int cmdAttachType = ATTACH_IS_INT32;
public int receiptAttachType = ATTACH_IS_BYTES;
public final static int ATTACH_IS_BYTES = 1;
public final static int ATTACH_IS_INT32 = 2;
public final static int ATTACH_IS_INT32 = 2;
public CmdIdInfo(Integer id, String name, int cmdAttachType, int receiptAttachType) {
this.id = id;
this.name = name;
this.cmdAttachType = cmdAttachType;
public String name;
public int id;
public int cmdAttachType = ATTACH_IS_INT32;
public int receiptAttachType = ATTACH_IS_BYTES;
public CmdIdInfo(Integer id, String name, int cmdAttachType, int receiptAttachType) {
this.id = id;
this.name = name;
this.cmdAttachType = cmdAttachType;
this.receiptAttachType = receiptAttachType;
}
}
}

4
src/main/java/a8k/a8k_can_protocol/ModuleId.java

@ -12,7 +12,7 @@ public class ModuleId {
public static final int MotorIncubatorRotateModule = 71;//孵育盘旋转
public static final int MotorTestCardPullModule = 92;//板卡推杆电机
public static final int MotorTestCardScanModule = 91;//板卡扫描电机
public static final int MotorTubeBodyClipModule = 31;//试管固定夹爪电机
public static final int MotorTubeScanClampModule = 31;//试管固定夹爪电机
public static final int MotorTubeMoveUpDownModule = 32;//摇匀升降电机
public static final int MotorTubeRackExitModule = 63;//出料电机
public static final int MotorTubeRackFeedModule = 61;//入料电机
@ -42,7 +42,7 @@ public class ModuleId {
case MotorIncubatorRotateModule -> "MotorIncubatorRotateModule";
case MotorTestCardPullModule -> "MotorTestCardPullModule";
case MotorTestCardScanModule -> "MotorTestCardScanModule";
case MotorTubeBodyClipModule -> "MotorTubeBodyClipModule";
case MotorTubeScanClampModule -> "MotorTubeBodyClipModule";
case MotorTubeMoveUpDownModule -> "MotorTubeMoveUpDownModule";
case MotorTubeRackExitModule -> "MotorTubeRackExitModule";
case MotorTubeRackFeedModule -> "MotorTubeRackFeedModule";

409
src/main/java/a8k/a8k_can_protocol/RegIndex.java

@ -0,0 +1,409 @@
package a8k.a8k_can_protocol;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public class RegIndex {
private static int REG_INDEX(int type, int offset, int subconfigindex) {
return type * 100 + offset + subconfigindex;
}
public static final Set<RegIndexInfo> infoSet;
static public String idtoString(Integer id) {
for (RegIndexInfo ci : infoSet) {
if (ci.id == id) {
return ci.name;
}
}
return String.format("unknown(%d)", id);
}
static public RegIndexInfo getCmdIdInfo(Integer id) {
for (RegIndexInfo ci : infoSet) {
if (ci.id == id) {
return ci;
}
}
return new RegIndexInfo(id, "unkown", RegIndexInfo.VTYPE_HEX);
}
/*******************************************************************************
* 模块通用配置和状态 *
*******************************************************************************/
public static final int kreg_module_version = REG_INDEX(0, 0, 0); // 模块版本
public static final int kreg_module_type = REG_INDEX(0, 0, 1); // 模块类型
public static final int kreg_module_status = REG_INDEX(0, 0, 2); // 0idle,1busy,2error
public static final int kreg_module_errorcode = REG_INDEX(0, 0, 3); // inited_flag
/***********************************************************************************************************************
* 光学模组私有方法 *
***********************************************************************************************************************/
public static final int kreg_opt_module_do_action0 = REG_INDEX(0, 0, 40); // 方法0
public static final int kreg_opt_module_action_param1 = REG_INDEX(0, 0, 41); // 方法1
public static final int kreg_opt_module_action_param2 = REG_INDEX(0, 0, 42); // 方法2
public static final int kreg_opt_module_action_param3 = REG_INDEX(0, 0, 43); // 方法3
public static final int kreg_opt_module_action_ack1 = REG_INDEX(0, 0, 51); // ACK1
public static final int kreg_opt_module_action_ack2 = REG_INDEX(0, 0, 52); // ACK2
/***********************************************************************************************************************
* 水冷温度控制器 *
***********************************************************************************************************************/
public static final int kreg_water_cooling_tmp_controler_pid_target = REG_INDEX(30, 0, 0); // 目标数值
public static final int kreg_water_cooling_tmp_controler_pid_nowoutput = REG_INDEX(30, 0, 1); // 当前输出
public static final int kreg_water_cooling_tmp_controler_pid_feedbackval = REG_INDEX(30, 0, 2); // 当前输出
public static final int kreg_water_cooling_tmp_controler_temp0 = REG_INDEX(30, 0, 3); // 温度1
public static final int kreg_water_cooling_tmp_controler_temp1 = REG_INDEX(30, 0, 4); // 温度2
public static final int kreg_water_cooling_tmp_controler_temp2 = REG_INDEX(30, 0, 5); // 温度3
public static final int kreg_water_cooling_tmp_controler_temp3 = REG_INDEX(30, 0, 6); // 温度4
public static final int kreg_water_cooling_tmp_controler_pid_kp = REG_INDEX(30, 50, 0); // kp
public static final int kreg_water_cooling_tmp_controler_pid_ki = REG_INDEX(30, 50, 1); // ki
public static final int kreg_water_cooling_tmp_controler_pid_kd = REG_INDEX(30, 50, 2); // kd
public static final int kreg_water_cooling_tmp_controler_pid_max_output = REG_INDEX(30, 50, 3); // 最大输出
public static final int kreg_water_cooling_tmp_controler_pid_min_output = REG_INDEX(30, 50, 4); // 最小输出
public static final int kreg_water_cooling_tmp_controler_pid_max_integral = REG_INDEX(30, 50, 5); // 最大积分
public static final int kreg_water_cooling_tmp_controler_pid_min_integral = REG_INDEX(30, 50, 6); // 最小积分
public static final int kreg_water_cooling_tmp_controler_pid_error_limit = REG_INDEX(30, 50, 7); // 误差限制
public static final int kreg_water_cooling_tmp_controler_pid_compute_interval = REG_INDEX(30, 50, 8); // 计算间隔
/*******************************************************************************
* 移液枪状态 *
*******************************************************************************/
public static final int kreg_pipette_pos_ul = REG_INDEX(40, 0, 0); // 移液枪位置
public static final int kreg_pipette_capactitance_val = REG_INDEX(40, 0, 1); // 移液枪电容值
public static final int kreg_pipette_tip_state = REG_INDEX(40, 0, 2); // 移动液枪tip状态
public static final int kreg_pipette_limit_ul = REG_INDEX(40, 50, 1);
public static final int kreg_pipette_pump_acc = REG_INDEX(40, 50, 2);
public static final int kreg_pipette_pump_dec = REG_INDEX(40, 50, 3);
public static final int kreg_pipette_pump_vstart = REG_INDEX(40, 50, 4);
public static final int kreg_pipette_pump_vstop = REG_INDEX(40, 50, 5);
public static final int kreg_pipette_pump_vmax = REG_INDEX(40, 50, 6);
public static final int kreg_pipette_aspirate_distribut_pump_vel = REG_INDEX(40, 50, 7);
public static final int kreg_pipette_lld_pump_vel = REG_INDEX(40, 50, 8);
public static final int kreg_pipette_lld_motor_vel_rpm = REG_INDEX(40, 50, 9);
public static final int kreg_pipette_lld_detect_period_ms = REG_INDEX(40, 50, 10);
public static final int kreg_pipette_lld_prepare_pos = REG_INDEX(40, 50, 11);
public static final int kreg_pipette_lld_prepare_distribut_pos = REG_INDEX(40, 50, 12);
/***********************************************************************************************************************
* 光学模组 *
***********************************************************************************************************************/
public static final int kreg_boditech_optical_module_raw_sector_size = REG_INDEX(41, 0, 0); // sector_size
public static final int kreg_boditech_optical_module_raw_sector_num = REG_INDEX(41, 0, 1); //
// scan action
public static final int kreg_boditech_optical_scan_type = REG_INDEX(42, 0, 0); // 0 t光学1 f光学
public static final int kreg_boditech_optical_scan_start_pos = REG_INDEX(42, 0, 1);
public static final int kreg_boditech_optical_scan_direction = REG_INDEX(42, 0, 2);
public static final int kreg_boditech_optical_scan_step_interval = REG_INDEX(42, 0, 3);
public static final int kreg_boditech_optical_scan_pointnum = REG_INDEX(42, 0, 4);
public static final int kreg_boditech_optical_channel_select_num = REG_INDEX(42, 0, 5);
public static final int kreg_boditech_optical_laster_gain_potentiometer_val = REG_INDEX(42, 0, 6);
public static final int kreg_boditech_optical_scan_gain_potentiometer = REG_INDEX(42, 0, 7);
public static final int kreg_boditech_optical_trf_uvled_on_duration_us = REG_INDEX(42, 0, 8);
public static final int kreg_boditech_optical_trf_uvled_off_duration_us = REG_INDEX(42, 0, 9);
public static final int kreg_boditech_optical_trf_scan_delay_us = REG_INDEX(42, 0, 10);
public static final int kreg_boditech_optical_trf_scan_duration_us = REG_INDEX(42, 0, 11);
public static final int kreg_boditech_optical_scan_gain_potentiometer_adjust_suggestion = REG_INDEX(42, 0, 12);
public static final int kreg_boditech_optical_adc_result_overflow = REG_INDEX(42, 0, 13);
public static final int kreg_boditech_optical_laster_intensity = REG_INDEX(42, 0, 14);
//
public static final int kreg_laster_scaner_scan_type = REG_INDEX(43, 0, 0); // 0 t光学1 f光学
public static final int kreg_laster_scaner_scan_start_pos = REG_INDEX(43, 0, 1);
public static final int kreg_laster_scaner_scan_direction = REG_INDEX(43, 0, 2);
public static final int kreg_laster_scaner_scan_step_interval = REG_INDEX(43, 0, 3);
public static final int kreg_laster_scaner_scan_pointnum = REG_INDEX(43, 0, 4);
public static final int kreg_laster_scaner_laster_gain = REG_INDEX(43, 0, 5);
public static final int kreg_laster_scaner_scan_gain = REG_INDEX(43, 0, 6);
public static final int kreg_laster_scaner_scan_gain_adjust_suggestion = REG_INDEX(43, 0, 12);
public static final int kreg_laster_scaner_adc_result_overflow = REG_INDEX(43, 0, 13);
public static final int kreg_laster_scaner_laster_intensity = REG_INDEX(43, 0, 14);
public static final int kreg_laster_scaner_raw_sector_size = REG_INDEX(44, 0, 1);
public static final int kreg_laster_scaner_raw_sector_num = REG_INDEX(44, 0, 2);
/**
* @brief
*
* ------------------------------------------------------
*
*
* 扫描零点偏移:F光学向左扫描的起始位置
* 扫描方向:1:板卡箭头方向-1板卡箭头反方向
* 扫描点数:固定为1200
* 扫描步距:固定为1
*
* 返回点数:(1200)
*
*
*/
// 坐标参数
public static final int kreg_a8k_opt_t_pos_offset = REG_INDEX(45, 0, 1); // T光学正向扫描扫描起始位距离零点的偏移
public static final int kreg_a8k_opt_f_pos_offset = REG_INDEX(45, 0, 2); // F光学正向扫描扫描起始位距离零点的偏移
public static final int kreg_a8k_opt_t_reverse_scan_pos_offset = REG_INDEX(45, 0, 3); // T光学逆向扫描扫描起始位距离零点的偏移
public static final int kreg_a8k_opt_f_reverse_scan_pos_offset = REG_INDEX(45, 0, 4); // F光学逆向扫描扫描起始位距离零点的偏移
public static final int kreg_a8k_opt_scan_step_interval = REG_INDEX(45, 0, 5); // 参数固定:为1
public static final int kreg_a8k_opt_scan_pointnum = REG_INDEX(45, 0, 6); // 参数固定:为1200个点
//
/***********************************************************************************************************************
* XYROBOT *
***********************************************************************************************************************/
public static final int kreg_xyrobot_io_state = REG_INDEX(99, 0, 0); // IO状态
public static final int kreg_xyrobot_robot_type = REG_INDEX(99, 50, 0); // 机器人类型 0:hbot 1:corexy
public static final int kreg_xyrobot_one_circle_pulse = REG_INDEX(99, 50, 1);
public static final int kreg_xyrobot_one_circle_pulse_denominator = REG_INDEX(99, 50, 2);
public static final int kreg_xyrobot_ihold = REG_INDEX(99, 50, 4);
public static final int kreg_xyrobot_irun = REG_INDEX(99, 50, 5);
public static final int kreg_xyrobot_iholddelay = REG_INDEX(99, 50, 6);
public static final int kreg_xyrobot_iglobalscaler = REG_INDEX(99, 50, 7);
public static final int kreg_xyrobot_vstart = REG_INDEX(99, 50, 8);
public static final int kreg_xyrobot_a1 = REG_INDEX(99, 50, 9);
public static final int kreg_xyrobot_amax = REG_INDEX(99, 50, 10);
public static final int kreg_xyrobot_v1 = REG_INDEX(99, 50, 11);
public static final int kreg_xyrobot_dmax = REG_INDEX(99, 50, 12);
public static final int kreg_xyrobot_d1 = REG_INDEX(99, 50, 13);
public static final int kreg_xyrobot_vstop = REG_INDEX(99, 50, 14);
public static final int kreg_xyrobot_tzerowait = REG_INDEX(99, 50, 15);
public static final int kreg_xyrobot_enc_resolution = REG_INDEX(99, 50, 16);
public static final int kreg_xyrobot_enable_enc = REG_INDEX(99, 50, 17);
public static final int kreg_xyrobot_x_shaft = REG_INDEX(99, 50, 18); // x轴是否反转
public static final int kreg_xyrobot_y_shaft = REG_INDEX(99, 50, 19); // y轴是否反转
public static final int kreg_xyrobot_min_x = REG_INDEX(99, 50, 22);
public static final int kreg_xyrobot_min_y = REG_INDEX(99, 50, 23);
public static final int kreg_xyrobot_max_x = REG_INDEX(99, 50, 24);
public static final int kreg_xyrobot_max_y = REG_INDEX(99, 50, 25);
public static final int kreg_xyrobot_run_to_zero_speed = REG_INDEX(99, 50, 26);
public static final int kreg_xyrobot_look_zero_edge_speed = REG_INDEX(99, 50, 27);
public static final int kreg_xyrobot_shift_x = REG_INDEX(99, 50, 28);
public static final int kreg_xyrobot_shift_y = REG_INDEX(99, 50, 29);
public static final int kreg_xyrobot_default_velocity = REG_INDEX(100, 0, 0);
/***********************************************************************************************************************
* step_motor *
***********************************************************************************************************************/
public static final int kreg_step_motor_pos = REG_INDEX(101, 0, 1); // 机器人x坐标
public static final int kreg_step_motor_dpos = REG_INDEX(101, 0, 3); // 执行完上一条指令后的相对位移
public static final int kreg_step_motor_shift = REG_INDEX(101, 50, 0); // x偏移
public static final int kreg_step_motor_shaft = REG_INDEX(101, 50, 1); // x轴是否反转
public static final int kreg_step_motor_one_circle_pulse = REG_INDEX(101, 50, 2); // x轴一圈脉冲数
public static final int kreg_step_motor_one_circle_pulse_denominator = REG_INDEX(101, 50, 3); // 设置一圈脉冲数的分母
public static final int kreg_step_motor_default_velocity = REG_INDEX(101, 50, 4); // 默认速度
public static final int kreg_step_motor_ihold = REG_INDEX(101, 50, 8); // 步进电机电流配置
public static final int kreg_step_motor_irun = REG_INDEX(101, 50, 9); // 步进电机电流配置
public static final int kreg_step_motor_iholddelay = REG_INDEX(101, 50, 10); // 步进电机电流配置
public static final int kreg_step_motor_iglobalscaler = REG_INDEX(101, 50, 11); // 步进电机电流配置
public static final int kreg_step_motor_run_to_zero_speed = REG_INDEX(101, 50, 23); // 回零速度
public static final int kreg_step_motor_look_zero_edge_speed = REG_INDEX(101, 50, 25); // 找零边缘速度
public static final int kreg_step_motor_max_d = REG_INDEX(101, 50, 28); // 最大限制距离
public static final int kreg_step_motor_min_d = REG_INDEX(101, 50, 29); // 最小限制距离
public static final int kreg_step_motor_in_debug_mode = REG_INDEX(101, 50, 30); // 驱动器处于调试模式
public static final int kreg_step_motor_vstart = REG_INDEX(101, 50, 31); // a1起作用的速度
public static final int kreg_step_motor_a1 = REG_INDEX(101, 50, 32); //
public static final int kreg_step_motor_amax = REG_INDEX(101, 50, 33);
public static final int kreg_step_motor_v1 = REG_INDEX(101, 50, 34);
public static final int kreg_step_motor_dmax = REG_INDEX(101, 50, 35);
public static final int kreg_step_motor_d1 = REG_INDEX(101, 50, 36);
public static final int kreg_step_motor_vstop = REG_INDEX(101, 50, 37);
public static final int kreg_step_motor_tzerowait = REG_INDEX(101, 50, 38);
public static final int kreg_step_motor_enc_resolution = REG_INDEX(101, 50, 39); // 编码器分辨率 1000,1024,4000,4096,16384
public static final int kreg_step_motor_enable_enc = REG_INDEX(101, 50, 40); //
/***********************************************************************************************************************
* MINI_STEP_MOTOR *
***********************************************************************************************************************/
public static final int kreg_mini_servo_pos = REG_INDEX(102, 0, 1); // 位置
public static final int kreg_mini_servo_limit_velocity = REG_INDEX(102, 50, 1); // 限制速度
public static final int kreg_mini_servo_limit_torque = REG_INDEX(102, 50, 2); // 限制扭矩
public static final int kreg_mini_servo_protective_torque = REG_INDEX(102, 50, 3); // 保护扭矩
/***********************************************************************************************************************
* ID_CARD_READER *
***********************************************************************************************************************/
public static final int kreg_id_card_reader_raw_sector_size = REG_INDEX(103, 0, 1);
public static final int kreg_id_card_reader_raw_sector_num = REG_INDEX(103, 0, 2);
public static final int kreg_id_card_reader_is_online = REG_INDEX(103, 0, 3);
/***********************************************************************************************************************
* BOARD *
***********************************************************************************************************************/
public static final int kreg_plate_code_scaner_laster_intensity = REG_INDEX(103, 0, 1);
public static final int kreg_plate_code_scaner_scan_gain = REG_INDEX(103, 0, 2);
public static final int kreg_plate_code_scaner_scan_velocity = REG_INDEX(103, 0, 3);
public static final int kreg_plate_code_scaner_scan_start_pos = REG_INDEX(103, 0, 4);
public static final int kreg_plate_code_scaner_final_stop_pos = REG_INDEX(103, 0, 5);
public static final int kreg_plate_code_scaner_code_judgment_threshold = REG_INDEX(103, 0, 6);
public static final int kreg_plate_code_scaner_item = REG_INDEX(103, 0, 7);
public static final int kreg_plate_code_scaner_lot = REG_INDEX(103, 0, 8);
public static final int kreg_plate_code_scaner_rawcode = REG_INDEX(103, 0, 9);
public static final int kreg_plate_code_scaner_code_legal = REG_INDEX(103, 0, 10);
static {
infoSet = Collections.unmodifiableSet(Set.of(//
new RegIndexInfo(kreg_module_version, "module_version", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_module_type, "module_type", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_module_status, "module_status", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_module_errorcode, "module_errorcode", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_opt_module_do_action0, "opt_module_do_action0", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_opt_module_action_param1, "opt_module_action_param1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_opt_module_action_param2, "opt_module_action_param2", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_opt_module_action_param3, "opt_module_action_param3", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_opt_module_action_ack1, "opt_module_action_ack1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_opt_module_action_ack2, "opt_module_action_ack2", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_target, "water_cooling_tmp_controler_pid_target", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_nowoutput, "water_cooling_tmp_controler_pid_nowoutput", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_feedbackval, "water_cooling_tmp_controler_pid_feedbackval", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_temp0, "water_cooling_tmp_controler_temp0", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_temp1, "water_cooling_tmp_controler_temp1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_temp2, "water_cooling_tmp_controler_temp2", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_temp3, "water_cooling_tmp_controler_temp3", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_kp, "water_cooling_tmp_controler_pid_kp", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_ki, "water_cooling_tmp_controler_pid_ki", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_kd, "water_cooling_tmp_controler_pid_kd", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_max_output, "water_cooling_tmp_controler_pid_max_output", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_min_output, "water_cooling_tmp_controler_pid_min_output", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_max_integral, "water_cooling_tmp_controler_pid_max_integral", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_min_integral, "water_cooling_tmp_controler_pid_min_integral", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_error_limit, "water_cooling_tmp_controler_pid_error_limit", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_water_cooling_tmp_controler_pid_compute_interval, "water_cooling_tmp_controler_pid_compute_interval", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_pos_ul, "pipette_pos_ul", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_capactitance_val, "pipette_capactitance_val", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_tip_state, "pipette_tip_state", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_limit_ul, "pipette_limit_ul", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_pump_acc, "pipette_pump_acc", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_pump_dec, "pipette_pump_dec", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_pump_vstart, "pipette_pump_vstart", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_pump_vstop, "pipette_pump_vstop", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_pump_vmax, "pipette_pump_vmax", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_aspirate_distribut_pump_vel, "pipette_aspirate_distribut_pump_vel", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_lld_pump_vel, "pipette_lld_pump_vel", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_lld_motor_vel_rpm, "pipette_lld_motor_vel_rpm", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_lld_detect_period_ms, "pipette_lld_detect_period_ms", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_lld_prepare_pos, "pipette_lld_prepare_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_pipette_lld_prepare_distribut_pos, "pipette_lld_prepare_distribut_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_module_raw_sector_size, "boditech_optical_module_raw_sector_size", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_module_raw_sector_num, "boditech_optical_module_raw_sector_num", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_scan_type, "boditech_optical_scan_type", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_scan_start_pos, "boditech_optical_scan_start_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_scan_direction, "boditech_optical_scan_direction", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_scan_step_interval, "boditech_optical_scan_step_interval", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_scan_pointnum, "boditech_optical_scan_pointnum", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_channel_select_num, "boditech_optical_channel_select_num", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_laster_gain_potentiometer_val, "boditech_optical_laster_gain_potentiometer_val", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_scan_gain_potentiometer, "boditech_optical_scan_gain_potentiometer", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_trf_uvled_on_duration_us, "boditech_optical_trf_uvled_on_duration_us", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_trf_uvled_off_duration_us, "boditech_optical_trf_uvled_off_duration_us", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_trf_scan_delay_us, "boditech_optical_trf_scan_delay_us", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_trf_scan_duration_us, "boditech_optical_trf_scan_duration_us", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_scan_gain_potentiometer_adjust_suggestion, "boditech_optical_scan_gain_potentiometer_adjust_suggestion", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_adc_result_overflow, "boditech_optical_adc_result_overflow", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_boditech_optical_laster_intensity, "boditech_optical_laster_intensity", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_scan_type, "laster_scaner_scan_type", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_scan_start_pos, "laster_scaner_scan_start_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_scan_direction, "laster_scaner_scan_direction", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_scan_step_interval, "laster_scaner_scan_step_interval", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_scan_pointnum, "laster_scaner_scan_pointnum", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_laster_gain, "laster_scaner_laster_gain", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_scan_gain, "laster_scaner_scan_gain", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_scan_gain_adjust_suggestion, "laster_scaner_scan_gain_adjust_suggestion", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_adc_result_overflow, "laster_scaner_adc_result_overflow", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_laster_intensity, "laster_scaner_laster_intensity", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_raw_sector_size, "laster_scaner_raw_sector_size", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_laster_scaner_raw_sector_num, "laster_scaner_raw_sector_num", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_a8k_opt_t_pos_offset, "a8k_opt_t_pos_offset", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_a8k_opt_f_pos_offset, "a8k_opt_f_pos_offset", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_a8k_opt_t_reverse_scan_pos_offset, "a8k_opt_t_reverse_scan_pos_offset", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_a8k_opt_f_reverse_scan_pos_offset, "a8k_opt_f_reverse_scan_pos_offset", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_a8k_opt_scan_step_interval, "a8k_opt_scan_step_interval", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_a8k_opt_scan_pointnum, "a8k_opt_scan_pointnum", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_io_state, "xyrobot_io_state", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_robot_type, "xyrobot_robot_type", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_one_circle_pulse, "xyrobot_one_circle_pulse", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_one_circle_pulse_denominator, "xyrobot_one_circle_pulse_denominator", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_ihold, "xyrobot_ihold", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_irun, "xyrobot_irun", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_iholddelay, "xyrobot_iholddelay", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_iglobalscaler, "xyrobot_iglobalscaler", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_vstart, "xyrobot_vstart", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_a1, "xyrobot_a1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_amax, "xyrobot_amax", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_v1, "xyrobot_v1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_dmax, "xyrobot_dmax", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_d1, "xyrobot_d1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_vstop, "xyrobot_vstop", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_tzerowait, "xyrobot_tzerowait", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_enc_resolution, "xyrobot_enc_resolution", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_enable_enc, "xyrobot_enable_enc", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_x_shaft, "xyrobot_x_shaft", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_y_shaft, "xyrobot_y_shaft", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_min_x, "xyrobot_min_x", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_min_y, "xyrobot_min_y", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_max_x, "xyrobot_max_x", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_max_y, "xyrobot_max_y", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_run_to_zero_speed, "xyrobot_run_to_zero_speed", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_look_zero_edge_speed, "xyrobot_look_zero_edge_speed", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_shift_x, "xyrobot_shift_x", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_shift_y, "xyrobot_shift_y", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_xyrobot_default_velocity, "xyrobot_default_velocity", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_pos, "step_motor_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_dpos, "step_motor_dpos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_shift, "step_motor_shift", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_shaft, "step_motor_shaft", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_one_circle_pulse, "step_motor_one_circle_pulse", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_one_circle_pulse_denominator, "step_motor_one_circle_pulse_denominator", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_default_velocity, "step_motor_default_velocity", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_ihold, "step_motor_ihold", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_irun, "step_motor_irun", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_iholddelay, "step_motor_iholddelay", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_iglobalscaler, "step_motor_iglobalscaler", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_run_to_zero_speed, "step_motor_run_to_zero_speed", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_look_zero_edge_speed, "step_motor_look_zero_edge_speed", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_max_d, "step_motor_max_d", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_min_d, "step_motor_min_d", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_in_debug_mode, "step_motor_in_debug_mode", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_vstart, "step_motor_vstart", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_a1, "step_motor_a1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_amax, "step_motor_amax", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_v1, "step_motor_v1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_dmax, "step_motor_dmax", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_d1, "step_motor_d1", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_vstop, "step_motor_vstop", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_tzerowait, "step_motor_tzerowait", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_enc_resolution, "step_motor_enc_resolution", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_step_motor_enable_enc, "step_motor_enable_enc", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_mini_servo_pos, "mini_servo_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_mini_servo_limit_velocity, "mini_servo_limit_velocity", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_mini_servo_limit_torque, "mini_servo_limit_torque", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_mini_servo_protective_torque, "mini_servo_protective_torque", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_id_card_reader_raw_sector_size, "id_card_reader_raw_sector_size", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_id_card_reader_raw_sector_num, "id_card_reader_raw_sector_num", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_id_card_reader_is_online, "id_card_reader_is_online", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_laster_intensity, "plate_code_scaner_laster_intensity", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_scan_gain, "plate_code_scaner_scan_gain", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_scan_velocity, "plate_code_scaner_scan_velocity", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_scan_start_pos, "plate_code_scaner_scan_start_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_final_stop_pos, "plate_code_scaner_final_stop_pos", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_code_judgment_threshold, "plate_code_scaner_code_judgment_threshold", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_item, "plate_code_scaner_item", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_lot, "plate_code_scaner_lot", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_rawcode, "plate_code_scaner_rawcode", RegIndexInfo.VTYPE_DECI), //
new RegIndexInfo(kreg_plate_code_scaner_code_legal, "plate_code_scaner_code_legal", RegIndexInfo.VTYPE_DECI)));
}
}

19
src/main/java/a8k/a8k_can_protocol/RegIndexInfo.java

@ -0,0 +1,19 @@
package a8k.a8k_can_protocol;
public class RegIndexInfo {
public static final int VTYPE_HEX = 0;
public static final int VTYPE_DECI = 0;
public static final int VTYPE_BINARY = 1;
public String name;
public int id;
public int valType;
public RegIndexInfo(int id, String name, int valType) {
this.name = name;
this.id = id;
this.valType = valType;
}
}

8
src/main/java/a8k/appbean/SampleTubeState.java

@ -0,0 +1,8 @@
package a8k.appbean;
/**
* 样品试管状态
*/
public class SampleTubeState {
String tubeType;
}

6
src/main/java/a8k/controller/TmpTestController.java

@ -14,14 +14,14 @@ public class TmpTestController {
@GetMapping("/tmp-test/a8k-can-bus-service-call")
@ResponseBody
public String a8kCanBusServiceCall() throws HardwareException {
public String a8kCanBusServiceCall() throws HardwareException, InterruptedException {
this.a8kCanBusService.callcmd(
ModuleId.ServoTubeRackTubeRotateId,
ModuleId.ServoTubeRackTubeRotateModule,
CmdId.kmini_servo_enable,
new Integer[]{1}
);
this.a8kCanBusService.callblockcmd(
ModuleId.MotorTubeRackFeedId,
ModuleId.MotorTubeRackFeedModule,
CmdId.kstep_motor_easy_move_by,
new Integer[]{5000},
20000

21
src/main/java/a8k/service/db/dao/A8kDirectCtrlPosDao.java

@ -22,13 +22,20 @@ public class A8kDirectCtrlPosDao {
// 2.移动坐标参考点为从左往右数第一个试管
// 3.正方向为执行机构的正方向
//
public static final String kMotorTubeRackMotor_tubeScanPos = "kMotorTubeRackMotor_tubeScanPos"; //扫码位置
public static final String kMotorTubeRackMotor_tubeHeighJudgmentPos = "kMotorTubeRackMotor_tubeHeighJudgmentPos"; //高低试管判断位置
public static final String kMotorTubeRackMotor_tubePreProcessPos = "kMotorTubeRackMotor_tubePreProcessPos"; //试管预处理位置
public static final String kMotorTubeRackMotor_tubeExistJudgmentPos = "kMotorTubeRackMotor_tubeExistJudgmentPos";//试管有无
public static final String kMotorTubeRackMotor_tubeRackEnterPos = "kMotorTubeRackMotor_tubeRackEnterPos"; //入料位置
public static final String kMotorTubeRackMotor_tubeRackExitPos = "kMotorTubeRackMotor_tubeRackExitPos"; //出料位置
public static final String kMotorTubeRackMotor_tubeRackScanCodePos = "kMotorTubeRackMotor_tubeRackScanCodePos"; //出料位置
public static final String MotorTubeRackMotor_tubeScanPos = "MotorTubeRackMotor_tubeScanPos"; //扫码位置
public static final String MotorTubeRackMotor_tubeHeighJudgmentPos = "MotorTubeRackMotor_tubeHeighJudgmentPos"; //高低试管判断位置
public static final String MotorTubeRackMotor_tubePreProcessPos = "MotorTubeRackMotor_tubePreProcessPos"; //试管预处理位置
public static final String MotorTubeRackMotor_tubeExistJudgmentPos = "MotorTubeRackMotor_tubeExistJudgmentPos";//试管有无
public static final String MotorTubeRackMotor_tubeRackEnterPos = "MotorTubeRackMotor_tubeRackEnterPos"; //入料位置
public static final String MotorTubeRackMotor_tubeRackExitPos = "MotorTubeRackMotor_tubeRackExitPos"; //出料位置
public static final String MotorTubeRackMotor_tubeRackScanCodePos = "MotorTubeRackMotor_tubeRackScanCodePos"; //出料位置
//
// 试管扫码夹紧模块
//
public static final String MotorTubeScanClampModule_clampPos = "MotorTubeScanClampModule_clampPos";//试管扫码夹紧模组 夹紧位置
public static final String MotorTubeScanClampModule_releasePos = "MotorTubeScanClampModule_releasePos";//试管扫码夹紧模组 释放位置
PosBean getPosBean(String posName) {

9
src/main/java/a8k/service/hardware/MotorTubeRackExitService.java

@ -1,9 +0,0 @@
package a8k.service.hardware;
import org.springframework.stereotype.Component;
@Component
public class MotorTubeRackExitService {
}

4
src/main/java/a8k/service/hardware/MotorTubeRackMoveContrlService.java

@ -1,4 +0,0 @@
package a8k.service.hardware;
public class MotorTubeRackMoveContrlService {
}

67
src/main/java/a8k/service/hardware/MotorTubeRackMoveService.java → src/main/java/a8k/service/hardware/MotorTubeRackMoveCtrlService.java

@ -7,26 +7,31 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class MotorTubeRackMoveService {
public class MotorTubeRackMoveCtrlService {
/**
*
* 主要用来控制试管架的平移动作控制
*
* 编写注意事项:
* 通用编写注意事项:
* 1.坐标从数据库中拿一些关键点的坐标进行运算
* 2.直接调用A8kCanBusService的方法
* 3.利用光电和编码器检查设备是否运行到位
*
* 当前模块编写注意事项
* 1. 电机移动前先将试管扫码夹紧复位
* 2. 扫码时试管夹紧夹紧
*/
// kMotorTubeRackMotor_tubeScanPos
// kMotorTubeRackMotor_tubeHeighJudgmentPos
// kMotorTubeRackMotor_tubePreProcessPos
// kMotorTubeRackMotor_tubeExistJudgmentPos
// MotorTubeRackMotor_tubeScanPos
// MotorTubeRackMotor_tubeHeighJudgmentPos
// MotorTubeRackMotor_tubePreProcessPos
// MotorTubeRackMotor_tubeExistJudgmentPos
//
// kMotorTubeRackMotor_tubeRackEnterPos
// kMotorTubeRackMotor_tubeRackExitPos
// kMotorTubeRackMotor_tubeRackScanCodePos
// MotorTubeRackMotor_tubeRackEnterPos
// MotorTubeRackMotor_tubeRackExitPos
// MotorTubeRackMotor_tubeRackScanCodePos
// MotorTubeScanClampModule_clampPos
// MotorTubeScanClampModule_releasePos
@Autowired
A8kDirectCtrlPosDao directCtrlPosTableDao;
@ -40,12 +45,12 @@ public class MotorTubeRackMoveService {
// 电机基础控制
//
void moveToZeroWhenDeviceSetup() {
public void moveToZeroWhenDeviceSetup() {
}
void moveToZero() {
public void moveToZero() {
//先通过move_to 指令移动到零点
//再通过 move_to_zero 进行归零(设置超时时间)超时时间来源MotorParameterDao
//最后读取 寄存器dval,判断move_to_zero移动了多少距离如果dval过大则抛出电机丢步异常
@ -59,19 +64,26 @@ public class MotorTubeRackMoveService {
/**
* 移动试管架到入口位置
*/
void moveTubeRackToEnterPos() {
public void moveTubeRackToEnterPos() {
}
/**
* 移动试管架到出口位置
*/
void moveTubeRackToExitPos() {
public void moveTubeRackToExitPos() {
}
/**
* 移动试管架到试管架扫码位置
*/
void moveTubeRackToScanPos() {
public void moveTubeRackToScanPos() {
}
/**
* 移动试管架到试管架扫码并扫码
*/
public String moveTubeRackToScanPosAndScan() {
return "";
}
//
@ -84,7 +96,16 @@ public class MotorTubeRackMoveService {
* @param tubeType
* @param tubeIndex
*/
void moveTubeToScanPos(String tubeType, Integer tubeIndex) {
public void moveTubeToScanPos(String tubeType, Integer tubeIndex) {
}
/**
* 移动试管到扫码位置并扫码
* @param tubeType
* @param tubeIndex
*/
public String moveTubeToScanPosAndScan(String tubeType, Integer tubeIndex) {
return null;
}
/**
@ -92,7 +113,7 @@ public class MotorTubeRackMoveService {
* @param tubeType
* @param tubeIndex
*/
void moveTubeToHeighJudgmentPos(String tubeType, Integer tubeIndex) {
public void moveTubeToHeighJudgmentPos(String tubeType, Integer tubeIndex) {
}
/**
@ -100,7 +121,7 @@ public class MotorTubeRackMoveService {
* @param tubeType
* @param tubeIndex
*/
void moveTubeToPreProcessPos(String tubeType, Integer tubeIndex) {
public void moveTubeToPreProcessPos(String tubeType, Integer tubeIndex) {
}
//
@ -112,14 +133,14 @@ public class MotorTubeRackMoveService {
* @param tubeType
* @param tubeIndex
*/
void moveTubeToExistJudgmentPos(String tubeType, Integer tubeIndex) {
public void moveTubeToExistJudgmentPos(String tubeType, Integer tubeIndex) {
}
boolean isTubeRackExitInEnterPos() {
public boolean isTubeRackExitInEnterPos() {
return false;
}
boolean isTubeRackExitInExitPos() {
public boolean isTubeRackExitInExitPos() {
return false;
}
@ -128,9 +149,13 @@ public class MotorTubeRackMoveService {
* @param photoelectricIndex 0:里光电1:外光电
* @return true, 光电触发 false,光电没有触发
*/
boolean getMoveChannelPhotoelectricState(int photoelectricIndex) {
public boolean getMoveChannelPhotoelectricState(int photoelectricIndex) {
return false;
}
//
// 其他辅助组件
//
}

92
src/main/java/a8k/service/hardware/SamplesPreProcessModuleCtrlService.java

@ -0,0 +1,92 @@
package a8k.service.hardware;
import a8k.appbean.SampleTubeState;
public class SamplesPreProcessModuleCtrlService {
/**
* 样品预处理模块
* 主要负责样品预处理的相关操作
*
* 涉及到常量
* 1.试管的相关信息---试管高度
* 2.试管的相关信息---试管含帽高度
* 3.平移电机待机位置
* 4.平移电机取试管位置
* 5.平移电机试管处理位置
*
*
*/
public void takeTube(String tubeType) {
//
// 取试管并将试管放在夹紧位置同时升降电机和平移电机移动到待机位
// 试管放置的水平高度和其在试管架中的高度保持一直
//
}
/**
* 摇匀试管
* @param tubeState
* @param times
* @param shakeDegree
*/
public void ShakeTube(String tubeType, int times, int shakeDegree) {
//
//
//
}
/**
* 取试管帽
*/
public void takeTubeCap() {
//
//
//
}
/**
* 盖试管帽并将试管移动回试管架中
*/
public void pushBackTubeCapAndTakeBakTube(String tubeType) {
//
//
//
}
/**
* 打开气溶胶风扇
*/
public void openAerosolFan() {
}
/**
* 关闭气溶胶风扇
*/
public void closeAerosolFan() {
}
/**
* 设备初始化时复位
*/
public void moduleResetWhenPowerOn() {
}
/**
* 设备运行时复位
*/
public void moduleRuntimeReset() {
}
}
Loading…
Cancel
Save