00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SHVEL_PARAM_H
00022 #define SHVEL_PARAM_H
00023
00024 typedef union
00025 {
00026 int integer;
00027 char byte[4];
00028 } Int_4Char;
00029
00030 typedef union _short_2char
00031 {
00032 short integer;
00033 char byte[2];
00034 } Short_2Char;
00035
00036
00037 enum
00038 {
00039 SERVO_LEVEL_STOP = 0,
00040 SERVO_LEVEL_COUNTER,
00041 SERVO_LEVEL_TORQUE,
00042 SERVO_LEVEL_VELOCITY,
00043 SERVO_LEVEL_POSITION,
00044 SERVO_LEVEL_OPENFREE,
00045 };
00046
00047 typedef enum
00048 {
00049 PARAM_w_ref = 0,
00050 PARAM_w_ref_highprec,
00051 PARAM_p_ki,
00052 PARAM_p_kv,
00053 PARAM_p_fr_plus,
00054 PARAM_p_fr_wplus,
00055 PARAM_p_fr_minus,
00056 PARAM_p_fr_wminus,
00057 PARAM_p_A,
00058 PARAM_p_B,
00059 PARAM_p_C,
00060 PARAM_p_D,
00061 PARAM_p_E,
00062 PARAM_p_F,
00063 PARAM_p_pi_kp,
00064 PARAM_p_pi_ki,
00065 PARAM_pwm_max,
00066 PARAM_pwm_min,
00067 PARAM_toq_max,
00068 PARAM_toq_min,
00069 PARAM_int_max,
00070 PARAM_int_min,
00071 PARAM_p_toq_offset,
00072 PARAM_toq_limit,
00073 PARAM_enc_rev,
00074 PARAM_motor_phase,
00075 PARAM_vsrc,
00076 PARAM_p_inertia_self,
00077 PARAM_p_inertia_cross,
00078 PARAM_enc_type,
00079 PARAM_control_cycle,
00080 PARAM_enc_div,
00081 PARAM_enc_denominator,
00082 PARAM_servo = 64,
00083 PARAM_watch_dog_limit,
00084 PARAM_heartbeat,
00085 PARAM_io_dir = 96,
00086 PARAM_io_data,
00087 PARAM_ad_mask,
00088 PARAM_phase_offset,
00089 PARAM_protocol_version,
00090 } YPSpur_shvel_param;
00091
00092 typedef enum
00093 {
00094 INT_enc_index_rise = 0,
00095 INT_enc_index_fall,
00096 INT_error_state,
00097 } YPSpur_shvel_interrupt;
00098
00099 typedef enum
00100 {
00101 ERROR_NONE = 0,
00102 ERROR_LOW_VOLTAGE = 0x0001,
00103 ERROR_HALL_SEQ = 0x0002,
00104 ERROR_HALL_ENC = 0x0004,
00105 ERROR_WATCHDOG = 0x0008
00106 } YPSpur_shvel_error_state;
00107
00108 #endif // SHVEL_PARAM_H