![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
2011
Diff: setting.h
- Revision:
- 215:699c3e572283
- Parent:
- 214:82a3ca333004
- Child:
- 218:2c3e5ecbe7e1
diff -r 82a3ca333004 -r 699c3e572283 setting.h --- a/setting.h Wed Mar 03 10:56:25 2021 +0000 +++ b/setting.h Thu Mar 11 07:27:23 2021 +0000 @@ -9,6 +9,7 @@ #define PWM_ARR 0x1194 // loop 20k, pwm 10k //#define PWM_ARR 0x2328 // loop 10k, pwm 5k #define TMR3_COUNT 0x4650 // loop 5k +//#define TMR3_COUNT 0x2328 // loop 10k #define TMR2_COUNT 0x2710 // loop 500hz with prescale 18 #define FREQ_500 500.0f @@ -208,10 +209,11 @@ extern float DAC_REF; extern float DAC_RESOL; -extern int REF_POSITION; -extern int REF_VELOCITY; -extern int16_t REF_TORQUE; -extern int16_t REF_PRES_DIFF; +extern float REF_POSITION; +extern float REF_VELOCITY; +extern float REF_TORQUE; +extern float REF_TORQUE_OLD; +extern float REF_PRES_DIFF; extern int16_t REF_PWM; extern int16_t REF_VALVE_POSITION; extern int16_t REF_CURRENT; @@ -376,6 +378,19 @@ extern int FINDHOME_POSITION; extern int FINDHOME_POSITION_OLD; +extern int cnt_finddz; +extern int cnt_vel_finddz; +extern int flag_finddz; +extern int FINDDZ_VELOCITY; +extern int FINDDZ_VELOCITY_OLD; +extern int FINDDZ_POSITION; +extern int FINDDZ_POSITION_OLD; + +extern double temp_VALVE_DEADZONE_PLUS; +extern double temp_VALVE_DEADZONE_MINUS; +extern float temp_pos_ref; +extern float temp_pos_ref_offset; + // valve gain extern int check_vel_pos_init; extern int check_vel_pos_fin; @@ -418,6 +433,12 @@ extern int FINDHOME_GOTOLIMIT; extern int FINDHOME_ZEROPOSE; +extern int FINDDZ_STAGE; +extern int FINDDZ_INIT; +extern int FINDDZ_START1; +extern int FINDDZ_START2; +extern int FINDDZ_STOP; + extern float alpha_trans;