RA Flexible Software Package Documentation
Release v5.5.0
|
|
Interface for motor position functions.
The Motor position interface for getting the speed references from Encoder Sensor
Data Structures | |
struct | motor_position_info_t |
struct | motor_position_cfg_t |
struct | motor_position_api_t |
struct | motor_position_instance_t |
Typedefs | |
typedef void | motor_position_ctrl_t |
Enumerations | |
enum | motor_position_ctrl_mode_t |
struct motor_position_info_t |
struct motor_position_cfg_t |
struct motor_position_api_t |
Functions implemented at the HAL layer will follow these APIs.
fsp_err_t(* motor_position_api_t::open) (motor_position_ctrl_t *const p_ctrl, motor_position_cfg_t const *const p_cfg) |
Initialize the Motor Position Module.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure. |
fsp_err_t(* motor_position_api_t::close) (motor_position_ctrl_t *const p_ctrl) |
Close (Finish) the Motor Position Module.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_position_api_t::reset) (motor_position_ctrl_t *const p_ctrl) |
Reset(Stop) the Motor Position Module.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_position_api_t::positionGet) (motor_position_ctrl_t *const p_ctrl, int16_t *const p_position) |
Get Position data.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_position | Pointer to get position data |
fsp_err_t(* motor_position_api_t::positionSet) (motor_position_ctrl_t *const p_ctrl, float const position_rad) |
Set Position data from Encoder.
[in] | p_ctrl | Pointer to control structure. |
[in] | position_rad | Position data [radian] |
fsp_err_t(* motor_position_api_t::positionReferenceSet) (motor_position_ctrl_t *const p_ctrl, int16_t const position_reference_deg) |
Set (Input) Position reference into the Motor Position Module.
[in] | p_ctrl | Pointer to control structure. |
[in] | position_refernce_deg | Position reference [degree] |
fsp_err_t(* motor_position_api_t::controlModeSet) (motor_position_ctrl_t *const p_ctrl, motor_position_ctrl_mode_t const mode) |
Set (Input) Position Control Mode.
[in] | p_ctrl | Pointer to control structure. |
[in] | mode | Position Control Mode |
fsp_err_t(* motor_position_api_t::positionControl) (motor_position_ctrl_t *const p_ctrl) |
Calculate internal position reference
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_position_api_t::ipdSpeedPControl) (motor_position_ctrl_t *const p_ctrl, float const ref_speed_rad, float const speed_rad, float *const p_iq_ref) |
Calculate iq reference
[in] | p_ctrl | Pointer to control structure. |
[in] | ref_speed_rad | Speed Reference [rad/sec] |
[in] | speed_rad | Current Speed [rad/sec] |
[out] | p_iq_ref | Pointer to get iq reference |
fsp_err_t(* motor_position_api_t::speedReferencePControlGet) (motor_position_ctrl_t *const p_ctrl, float *const p_speed_ref) |
Get Speed Reference by P Control
[in] | p_ctrl | Pointer to control structure. |
[out] | p_speed_ref | Pointer to get speed reference |
fsp_err_t(* motor_position_api_t::speedReferenceIpdControlGet) (motor_position_ctrl_t *const p_ctrl, float const max_speed_rad, float *const p_speed_ref) |
Get Speed Reference by IPD Control
[in] | p_ctrl | Pointer to control structure. |
[out] | p_speed_ref | Pointer to get speed reference |
fsp_err_t(* motor_position_api_t::speedReferenceFeedforwardGet) (motor_position_ctrl_t *const p_ctrl, float *const p_speed_ref) |
Get Speed Reference by Speed Feedforward
[in] | p_ctrl | Pointer to control structure. |
[out] | p_speed_ref | Pointer to get speed reference |
fsp_err_t(* motor_position_api_t::infoGet) (motor_position_ctrl_t *const p_ctrl, motor_position_info_t *const p_info) |
Get Position information.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_info | Pointer to get information |
fsp_err_t(* motor_position_api_t::parameterUpdate) (motor_position_ctrl_t *const p_ctrl, motor_position_cfg_t const *const p_cfg) |
Update Parameters for the calculation in the Motor Position Module.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure include update parameters. |
struct motor_position_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
motor_position_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
motor_position_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
motor_position_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void motor_position_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.
Position Control Mode