Function: PMSM_Controller_initialize
| Prototype | void PMSM_Controller_initialize(RT_MODEL *const rtM) | ||||||||
| Description | Initialization entry point of generated code | ||||||||
| Timing | Must be called exactly once | ||||||||
| Arguments |
|
||||||||
| Return value | None | ||||||||
| Header file | PMSM_Controller.h |
Function: PMSM_Controller_step
| Prototype | void PMSM_Controller_step(RT_MODEL *const rtM, int16_T rtU_Vdc, uint16_T rtU_Ts, int16_T rtU_adc_a, int16_T rtU_adc_b, real_T rtU_rotor_angle, int16_T rtU_rotor_speed, int16_T rtU_input_target, uint16_T rtY_pwm_counts[8], uint8_T *rtY_sector) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | Output entry point of generated code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Timing | Must be called periodically, every 6.2e-06 seconds | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Arguments |
[-]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Return value | None | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Header file | PMSM_Controller.h |
| Block Name | Code Identifier | Data Type | Scaling | Dimension |
|---|---|---|---|---|
| <S4>/Vdc | Defined externally | int16_T | sfix16_En4 | 1 |
| <S4>/Ts | Defined externally | uint16_T | 1 | |
| <S4>/adc_a | Defined externally | int16_T | 1 | |
| <S4>/adc_b | Defined externally | int16_T | 1 | |
| <S4>/rotor_angle | Defined externally | real_T | 1 | |
| <S4>/rotor_speed | Defined externally | int16_T | 1 | |
| <S4>/input_target | Defined externally | int16_T | 1 | |
| <S4>/hall_a | Defined externally | uint8_T | 1 | |
| <S4>/hall_b | Defined externally | uint8_T | 1 | |
| <S4>/hall_c | Defined externally | uint8_T | 1 | |
| <S4>/hw_count | Defined externally | uint32_T | 1 | |
| <S4>/b_motor_enable | Defined externally | boolean_T | 1 | |
| <S4>/b_cruise_enable | Defined externally | boolean_T | 1 | |
| <S4>/n_ctrl_type | Defined externally | uint8_T | 1 |
| Block Name | Code Identifier | Data Type | Dimension |
|---|---|---|---|
| <S4>/pwm_counts | Defined externally | uint16_T | [8] |
| <S4>/sector | Defined externally | uint8_T | 1 |
No interface/tunable parameters in model.
No data stores in the model; note that this report lists only data stores with non-auto storage class and global data stores