Functions | |
| hpm_mcl_stat_t | hpm_mcl_encoder_init (mcl_encoder_t *encoder, mcl_cfg_t *mcl_cfg, mcl_encoer_cfg_t *encoder_cfg, mcl_filter_iir_df1_t *iir) |
| Initialize encoder data. More... | |
| hpm_mcl_stat_t | hpm_mcl_encoder_start_sample (mcl_encoder_t *encoder) |
| Encoder starts sampling. More... | |
| hpm_mcl_stat_t | hpm_mcl_encoder_set_initial_theta (mcl_encoder_t *encoder, float theta) |
| Sets the initial value of the angle. Normally, the programme does the initial value setting automatically, but if you are not satisfied with the result, you can set the initial value. The initial value determines the zero point of the electrical angle. This means that the angle read by the sensor is calibrated to zero by the initial value. More... | |
| hpm_mcl_stat_t | hpm_mcl_encoder_process (mcl_encoder_t *encoder, uint32_t tick_deta) |
| Encoder processing, cycle call. More... | |
| hpm_mcl_stat_t | hpm_mcl_encoder_set_status (mcl_encoder_t *encoder, mcl_encoder_status_t status) |
| Force update of encoder status. More... | |
| void | hpm_mcl_encoder_force_theta (mcl_encoder_t *encoder, float theta, bool enable) |
| Force setting of the output angle of the encoder function. More... | |
| float | hpm_mcl_encoder_get_raw_theta (mcl_encoder_t *encoder) |
| Getting the raw angle data of the encoder. More... | |
| float | hpm_mcl_encoder_get_theta (mcl_encoder_t *encoder) |
| Get the encoder angle value. More... | |
| float | hpm_mcl_encoder_get_sensorless_theta (mcl_encoder_t *encoder) |
| Get sensorless theta. More... | |
| float | hpm_mcl_encoder_get_speed (mcl_encoder_t *encoder) |
| Get speed. More... | |
| float | hpm_mcl_encoder_get_forecast_theta (mcl_encoder_t *encoder) |
| Get the angle predicted from the speed. More... | |
| hpm_mcl_stat_t | hpm_mcl_encoder_get_absolute_theta (mcl_encoder_t *encoder, float *theta) |
| Get the absolute position of the angle. More... | |
| hpm_mcl_stat_t | hpm_mcl_encoder_get_uvw_status (mcl_encoder_t *encoder, mcl_encoder_uvw_level_t *level) |
| Get level status of uvw. More... | |
| void hpm_mcl_encoder_force_theta | ( | mcl_encoder_t * | encoder, |
| float | theta, | ||
| bool | enable | ||
| ) |
Force setting of the output angle of the encoder function.
| encoder | mcl_encoder_t |
| theta | rad |
| enable | Enable or disable the forced output function |
| hpm_mcl_stat_t hpm_mcl_encoder_get_absolute_theta | ( | mcl_encoder_t * | encoder, |
| float * | theta | ||
| ) |
Get the absolute position of the angle.
| encoder | mcl_encoder_t |
| theta | rad |
| float hpm_mcl_encoder_get_forecast_theta | ( | mcl_encoder_t * | encoder | ) |
| float hpm_mcl_encoder_get_raw_theta | ( | mcl_encoder_t * | encoder | ) |
| float hpm_mcl_encoder_get_sensorless_theta | ( | mcl_encoder_t * | encoder | ) |
| float hpm_mcl_encoder_get_speed | ( | mcl_encoder_t * | encoder | ) |
| float hpm_mcl_encoder_get_theta | ( | mcl_encoder_t * | encoder | ) |
| hpm_mcl_stat_t hpm_mcl_encoder_get_uvw_status | ( | mcl_encoder_t * | encoder, |
| mcl_encoder_uvw_level_t * | level | ||
| ) |
Get level status of uvw.
| encoder | mcl_encoder_t |
| level | 0: low , 1: high |
| hpm_mcl_stat_t hpm_mcl_encoder_init | ( | mcl_encoder_t * | encoder, |
| mcl_cfg_t * | mcl_cfg, | ||
| mcl_encoer_cfg_t * | encoder_cfg, | ||
| mcl_filter_iir_df1_t * | iir | ||
| ) |
Initialize encoder data.
| encoder | mcl_encoder_t |
| mcl_cfg | mcl_cfg_t |
| encoder_cfg | mcl_encoer_cfg_t |
| iir | mcl_filter_iir_df1_t |
parameter check
null function initialisation
parameter initial
| hpm_mcl_stat_t hpm_mcl_encoder_process | ( | mcl_encoder_t * | encoder, |
| uint32_t | tick_deta | ||
| ) |
Encoder processing, cycle call.
| encoder | mcl_encoder_t |
| tick_deta | Difference in the number of cycles between two calls |
iir filter
| hpm_mcl_stat_t hpm_mcl_encoder_set_initial_theta | ( | mcl_encoder_t * | encoder, |
| float | theta | ||
| ) |
Sets the initial value of the angle. Normally, the programme does the initial value setting automatically, but if you are not satisfied with the result, you can set the initial value. The initial value determines the zero point of the electrical angle. This means that the angle read by the sensor is calibrated to zero by the initial value.
| encoder | mcl_encoder_t |
| theta | Used to calibrate electrical angle to zero |
| hpm_mcl_stat_t hpm_mcl_encoder_set_status | ( | mcl_encoder_t * | encoder, |
| mcl_encoder_status_t | status | ||
| ) |
Force update of encoder status.
| encoder | mcl_encoder_t |
| status | mcl_encoder_status_t |
| hpm_mcl_stat_t hpm_mcl_encoder_start_sample | ( | mcl_encoder_t * | encoder | ) |