Code Interface Report for PMSM_Controller

Table of Contents

Entry-Point Functions

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
# Name Data Type Description
1 rtM RT_MODEL *const RTModel
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 [-]
# Name Data Type Scaling Description
1 rtM RT_MODEL *const   RTModel
2 rtU_Vdc int16_T sfix16_En4 <S4>/Vdc
3 rtU_Ts uint16_T   <S4>/Ts
4 rtU_adc_a int16_T   <S4>/adc_a
5 rtU_adc_b int16_T   <S4>/adc_b
6 rtU_rotor_angle real_T   <S4>/rotor_angle
7 rtU_rotor_speed int16_T   <S4>/rotor_speed
8 rtU_input_target int16_T   <S4>/input_target
9 rtY_pwm_counts uint16_T   <S4>/pwm_counts
10 rtY_sector uint8_T *   <S4>/sector
Return value None
Header file PMSM_Controller.h

Inports

[-]
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

Outports

Block Name Code Identifier Data Type Dimension
<S4>/pwm_counts Defined externally uint16_T [8]
<S4>/sector Defined externally uint8_T 1

Interface Parameters

No interface/tunable parameters in model.

Data Stores

No data stores in the model; note that this report lists only data stores with non-auto storage class and global data stores