![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
LIGHT2
Diff: setting.h
- Revision:
- 54:647072f5307a
- Parent:
- 52:8ea76864368a
- Child:
- 55:b25725257569
diff -r 8ea76864368a -r 647072f5307a setting.h --- a/setting.h Wed Feb 19 05:48:57 2020 +0000 +++ b/setting.h Tue Feb 25 12:56:39 2020 +0000 @@ -110,12 +110,12 @@ 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 uint16_t CAN_FREQ; +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; @@ -136,6 +136,8 @@ extern int16_t K_SPRING; extern int16_t D_DAMPER; +extern int16_t flag_delay_test; + //extern float P_GAIN_VALVE_POSITION_OPP; //extern float I_GAIN_VALVE_POSITION_OPP; //extern float D_GAIN_VALVE_POSITION_OPP; @@ -218,12 +220,12 @@ 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; extern unsigned int TMR2_COUNT_LED2; extern unsigned int TMR2_COUNT_CAN_TX; +extern unsigned int TMR3_COUNT_TEST; extern int num_err; extern int flag_err[8]; @@ -236,25 +238,20 @@ extern int MODE_POS_FT_TRANS; -//////////////////////////////////////////////////////////////////////////////// -////////////////////////////// SEUNGHOON ADD /////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// - +extern float CUR_CURRENT_mA; 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]; @@ -281,13 +278,6 @@ 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; @@ -367,6 +357,8 @@ 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; @@ -385,11 +377,20 @@ extern float freq_fric_tune; -extern bool FLAG_VALVE_OUTPUT_CALIB; - extern uint32_t TMR3_COUNT_CAN_TX; -extern float I_REF; +// 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 int TMR3_COUNT_IREF; extern float CUR_CURRENT; extern float u_CUR[3]; @@ -401,7 +402,20 @@ extern float alpha_trans; -//extern int h1, h2, h3, h4, h5, h6; + +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; @@ -417,3 +431,5 @@ + +