RA Flexible Software Package Documentation
Release v5.5.0
|
|
Interface for motor speed functions.
The Motor speed interface for getting the current references from electric current and rotational speed
Data Structures | |
struct | motor_speed_callback_args_t |
struct | motor_speed_position_data_t |
struct | motor_speed_cfg_t |
struct | motor_speed_api_t |
struct | motor_speed_instance_t |
Typedefs | |
typedef void | motor_speed_ctrl_t |
Enumerations | |
enum | motor_speed_event_t |
enum | motor_speed_loop_mode_t |
enum | motor_speed_step_t |
struct motor_speed_callback_args_t |
Callback function parameter data
Data Fields | ||
---|---|---|
void const * | p_context | Placeholder for user data. |
motor_speed_event_t | event |
struct motor_speed_position_data_t |
Motor speed and position structure
Data Fields | ||
---|---|---|
motor_speed_step_t | e_step_mode | Select step mode. |
motor_speed_loop_mode_t | e_loop_mode | Select control mode. |
int16_t | position_reference_degree | Position reference [degree]. |
struct motor_speed_cfg_t |
Configuration parameters.
Data Fields | |
motor_speed_input_t * | st_input |
Input data structure for automatic set. | |
motor_speed_output_t * | st_output |
Output data structure for automatic receive. | |
motor_position_instance_t const * | p_position_instance |
Position module instance. | |
void const * | p_context |
Placeholder for user data. | |
struct motor_speed_api_t |
Functions implemented at the HAL layer will follow these APIs.
Data Fields | |
fsp_err_t(* | open )(motor_speed_ctrl_t *const p_ctrl, motor_speed_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(motor_speed_ctrl_t *const p_ctrl) |
fsp_err_t(* | reset )(motor_speed_ctrl_t *const p_ctrl) |
fsp_err_t(* | run )(motor_speed_ctrl_t *const p_ctrl) |
fsp_err_t(* | speedReferenceSet )(motor_speed_ctrl_t *const p_ctrl, float const speed_reference_rpm) |
fsp_err_t(* | positionReferenceSet )(motor_speed_ctrl_t *const p_ctrl, motor_speed_position_data_t const *const p_position_data) |
fsp_err_t(* | parameterSet )(motor_speed_ctrl_t *const p_ctrl, motor_speed_input_t const *const p_st_input) |
fsp_err_t(* | speedControl )(motor_speed_ctrl_t *const p_ctrl) |
fsp_err_t(* | parameterGet )(motor_speed_ctrl_t *const p_ctrl, motor_speed_output_t *const p_st_output) |
fsp_err_t(* | parameterUpdate )(motor_speed_ctrl_t *const p_ctrl, motor_speed_cfg_t const *const p_cfg) |
fsp_err_t(* motor_speed_api_t::open) (motor_speed_ctrl_t *const p_ctrl, motor_speed_cfg_t const *const p_cfg) |
Initialize the motor speed module.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure. |
fsp_err_t(* motor_speed_api_t::close) (motor_speed_ctrl_t *const p_ctrl) |
Close (Finish) the motor speed module.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_speed_api_t::reset) (motor_speed_ctrl_t *const p_ctrl) |
Reset(Stop) the motor speed module.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_speed_api_t::run) (motor_speed_ctrl_t *const p_ctrl) |
Activate the motor speed control.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_speed_api_t::speedReferenceSet) (motor_speed_ctrl_t *const p_ctrl, float const speed_reference_rpm) |
Set (Input) speed reference into the motor speed module.
[in] | p_ctrl | Pointer to control structure. |
[in] | speed_refernce_rpm | Speed reference [rpm] |
fsp_err_t(* motor_speed_api_t::positionReferenceSet) (motor_speed_ctrl_t *const p_ctrl, motor_speed_position_data_t const *const p_position_data) |
Set (Input) position reference and control mode
[in] | p_ctrl | Pointer to control structure. |
[in] | p_position_data | Pointer to structure position data |
fsp_err_t(* motor_speed_api_t::parameterSet) (motor_speed_ctrl_t *const p_ctrl, motor_speed_input_t const *const p_st_input) |
Set (Input) speed parameters into the motor speed module.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_st_input | Pointer to structure to input parameters. |
fsp_err_t(* motor_speed_api_t::speedControl) (motor_speed_ctrl_t *const p_ctrl) |
Calculate current reference
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_speed_api_t::parameterGet) (motor_speed_ctrl_t *const p_ctrl, motor_speed_output_t *const p_st_output) |
Get speed control output parameters
[in] | p_ctrl | Pointer to control structure. |
[out] | p_st_output | Pointer to get speed control parameters |
fsp_err_t(* motor_speed_api_t::parameterUpdate) (motor_speed_ctrl_t *const p_ctrl, motor_speed_cfg_t const *const p_cfg) |
Update Parameters for the calculation in the motor speed module.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure include update parameters. |
struct motor_speed_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
motor_speed_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
motor_speed_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
motor_speed_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void motor_speed_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.
enum motor_speed_event_t |
enum motor_speed_step_t |