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)
Description Output entry point of generated code
Timing Must be called periodically, every 5e-05 seconds
Arguments
# Name Data Type Description
1 rtM RT_MODEL *const RTModel
Return value None
Header file PMSM_Controller.h

Inports

[-]
Block Name Code Identifier Data Type Scaling Dimension
<S4>/adc_Pha Defined externally int16_T   1
<S4>/adc_Phb Defined externally int16_T   1
<S4>/spd_Target Defined externally int32_T sfix32_En4 1
<S4>/idq_Target Defined externally int16_T sfix16_En5 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>/us_Count Defined externally uint32_T   1
<S4>/b_motEna Defined externally boolean_T   1
<S4>/b_cruiseEna Defined externally boolean_T   1
<S4>/n_ctrlModReq Defined externally uint8_T   1
<S4>/iDC_Limit Defined externally int16_T sfix16_En5 1
<S4>/spd_Limit Defined externally int32_T sfix32_En4 1
<S4>/vDC Defined externally int16_T sfix16_En5 1
<S4>/FOC_Flags Defined externally uint16_T   1
<S4>/vdq_Open Defined externally int16_T sfix16_En5 [2]
<S4>/theta_Open Defined externally int16_T sfix16_En4 1

Outports

[-]
Block Name Code Identifier Data Type Scaling Dimension
<S4>/pwm_Duty Defined externally int16_T   [3]
<S4>/n_Sector Defined externally uint8_T   1
<S4>/n_MotError Defined externally uint8_T   1
<S4>/f_Vdq Defined externally int16_T sfix16_En5 [2]
<S4>/f_Idq Defined externally int16_T sfix16_En5 [2]
<S4>/f_MotAngle Defined externally int16_T sfix16_En4 1
<S4>/f_MotRPM Defined externally int32_T sfix32_En4 1
<S4>/f_hallAngle Defined externally int16_T sfix16_En4 1
<S4>/n_hallStat Defined externally uint8_T   1
<S4>/n_runingMode Defined externally uint8_T   1

Interface Parameters

[-]
Parameter Source Code Identifier Data Type Scaling Dimension
n_hall_count_ps rtP.n_hall_count_ps uint32_T   1
n_polePairs rtP.n_polePairs uint32_T   1
cf_Fw_Kb rtP.cf_Fw_Kb int16_T sfix16_En10 1
cf_Fw_Ki rtP.cf_Fw_Ki int16_T sfix16_En10 1
cf_TrqLimKb rtP.cf_TrqLimKb int16_T sfix16_En10 1
cf_TrqLimKi rtP.cf_TrqLimKi int16_T sfix16_En10 1
cf_TrqLimKp rtP.cf_TrqLimKp int16_T sfix16_En10 1
cf_idKp rtP.cf_idKp int16_T sfix16_En10 1
cf_iqKp rtP.cf_iqKp int16_T sfix16_En10 1
cf_nKp rtP.cf_nKp int16_T sfix16_En10 1
V_modulation rtP.V_modulation int16_T sfix16_En14 1
cf_idKb rtP.cf_idKb int16_T sfix16_En14 1
cf_idKi rtP.cf_idKi int16_T sfix16_En14 1
cf_iqKb rtP.cf_iqKb int16_T sfix16_En14 1
cf_iqKi rtP.cf_iqKi int16_T sfix16_En14 1
cf_nKb rtP.cf_nKb int16_T sfix16_En14 1
cf_nKi rtP.cf_nKi int16_T sfix16_En14 1
f_adc_curr_ceof rtP.f_adc_curr_ceof int16_T sfix16_En14 1
cf_lastIqGain rtP.cf_lastIqGain int16_T sfix16_En15 1
i_hall_offset rtP.i_hall_offset int16_T sfix16_En4 1
i_dqMax rtP.i_dqMax int16_T sfix16_En5 1
id_fieldWeakMax rtP.id_fieldWeakMax int16_T sfix16_En5 1
dz_OpenStepVol rtP.dz_OpenStepVol int16_T sfix16_En7 1
f_lpf_idq rtP.f_lpf_idq uint16_T ufix16_En16 1
f_lpf_vdq rtP.f_lpf_vdq uint16_T ufix16_En16 1
i_pwm_count rtP.i_pwm_count uint16_T   1

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