![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
rainbow
Diff: setting.h
- Revision:
- 56:6f50d9d3bfee
- Parent:
- 55:b25725257569
- Child:
- 57:f4819de54e7a
--- a/setting.h Wed Feb 26 12:51:52 2020 +0000 +++ b/setting.h Tue Mar 03 12:27:53 2020 +0000 @@ -110,11 +110,13 @@ extern uint8_t CONTROL_MODE; extern uint8_t OPERATING_MODE; extern uint8_t SENSING_MODE; -extern uint8_t CONTROL_UTILITY_MODE; extern uint8_t CURRENT_CONTROL_MODE; extern uint8_t FLAG_VALVE_DEADZONE; +extern uint8_t SETTING_SWITCH; +extern uint8_t SETTING_SWITCH_OLD; extern uint8_t REFERENCE_MODE; extern int16_t CAN_FREQ; +extern int CAN_FREQUENCY; extern int16_t DIR_JOINT_ENC; extern int16_t DIR_VALVE; extern int16_t DIR_VALVE_ENC; @@ -176,8 +178,8 @@ extern int16_t STROKE; -//extern int16_t VALVE_LIMIT_PLUS; -//extern int16_t VALVE_LIMIT_MINUS; +extern int16_t VALVE_LIMIT_PLUS; +extern int16_t VALVE_LIMIT_MINUS; extern float ENC_PULSE_PER_POSITION; extern float TORQUE_SENSOR_PULSE_PER_TORQUE; @@ -219,6 +221,7 @@ extern float CUR_TORQUE; extern float CUR_PRES_A; extern float CUR_PRES_B; +extern int CUR_PWM; extern int CUR_VALVE_POSITION; extern unsigned int TMR2_COUNT_LED1; @@ -237,20 +240,25 @@ extern int MODE_POS_FT_TRANS; -extern float CUR_CURRENT_mA; +//////////////////////////////////////////////////////////////////////////////// +////////////////////////////// SEUNGHOON ADD /////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + extern float CUR_PRES_A_BAR; extern float CUR_PRES_B_BAR; extern float CUR_TORQUE_NM; extern float CUR_TORQUE_NM_PRESS; extern float PRES_A_VREF; +extern float PRES_A_VREF_TEST; extern float PRES_B_VREF; +extern float PRES_B_VREF_TEST; extern float TORQUE_VREF; extern float VALVE_PWM_RAW_FB; extern float VALVE_PWM_RAW_FF; -extern float VALVE_PWM_RAW; extern int VALVE_PWM_VALVE_DZ; +extern int VALVE_INPUT_PWM; extern float VALVE_GAIN_LPM_PER_V[10]; extern float VALVE_POS_VS_PWM[25]; @@ -258,7 +266,9 @@ extern int VALVE_MAX_POS; extern int VALVE_MIN_POS; +extern float DDV_CENTER; extern int VALVE_POS_NUM; +extern int VALVE_CENTER_OFFSET_times10; extern float VALVE_CENTER_OFFSET; extern float VALVE_DZ_MINUS_OFFSET; extern float VALVE_DZ_PLUS_OFFSET; @@ -275,6 +285,13 @@ extern int TMR3_COUNT_JOINT; extern int TMR3_COUNT_ROTARY_FRIC_TUNE; +extern bool FLAG_REFERENCE_VALVE_PWM; +extern bool FLAG_REFERENCE_VALVE_POSITION; +extern bool FLAG_REFERENCE_JOINT_POSITION; +extern bool FLAG_REFERENCE_JOINT_TORQUE; +extern bool FLAG_REFERENCE_PRES_DIFF; +extern bool FLAG_REFERENCE_CURRENT; + extern float TUNING_TIME; extern float REFERENCE_FREQ; @@ -354,8 +371,6 @@ extern int fl_temp_cnt2; extern int cur_vel_sum; -extern float Cur_Valve_Open_pulse; - // find home extern int CUR_VELOCITY_OLD; extern int cnt_findhome; @@ -374,20 +389,11 @@ extern float freq_fric_tune; +extern bool FLAG_VALVE_OUTPUT_CALIB; + extern uint32_t TMR3_COUNT_CAN_TX; -// Current Control Variables -extern double I_REF; -extern double I_REF_fil; -extern double I_ERR; -extern double I_ERR_INT; -extern double I_REF_fil_old; -extern double I_REF_fil_diff; - -// system id -extern int cnt_sysid; -extern double freq_sysid_Iref; - +extern float I_REF; extern int TMR3_COUNT_IREF; extern float CUR_CURRENT; extern float u_CUR[3]; @@ -399,20 +405,7 @@ extern float alpha_trans; - -extern float V_out; -extern float V_rem; -extern float V_MAX; - -extern float PWM_out; - -extern double K_v; -extern double mV_PER_mA; -extern double mV_PER_pulse; -extern double mA_PER_pulse; - -extern int timer_while; -extern int while_index; +//extern int h1, h2, h3, h4, h5, h6; @@ -430,4 +423,3 @@ -