|
MotorWare f2806x Module API Documentation
|
Data Structures | |
| struct | ST_PosConvCfg_t |
| Defines the ST_PosConvCfg_t data. More... | |
| struct | ST_PosConv_t |
| Defines the ST_PosConv_t data. More... | |
Typedefs | |
| typedef struct _ST_POSCONV_Handle_ * | ST_POSCONV_Handle |
Enumerations | |
| enum | ST_PosConvStatus_e { ST_POS_CONV_IDLE =0, ST_POS_CONV_INIT, ST_POS_CONV_BUSY } |
| Enumeration for the Position Convert Status states. More... | |
Functions | |
| static void | STPOSCONV_setSampleTime_sec (ST_POSCONV_Handle handle, _iq24 sampleTime) |
| Sets the Sample Time (cfg.T) for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setERevMaximums_erev (ST_POSCONV_Handle handle, _iq24 eRevROMax, _iq24 eRevROMin) |
| Sets the Electrical Revolution Maximum (cfg.ERevROMax) & Minimum (cfg.ERevROMin) for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setUnitConversion (ST_POSCONV_Handle handle, float_t baseFreq, float_t sampleTime, uint16_t polePairs) |
| Sets the Unit Conversions for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setMRevMaximum_mrev (ST_POSCONV_Handle handle, _iq24 mRevROMax) |
| Sets the Mechanical Revolution Maximum (cfg.ROMax_mrev) for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setLowPassFilterTime_tick (ST_POSCONV_Handle handle, int16_t lpfTime) |
| Sets the Lowpass Time (cfg.LpfTime_tick) for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setupSlipCompensator (ST_POSCONV_Handle handle, float_t sampleTime, float_t baseFreq, float_t rotorResistance, float_t statorInductance) |
| Sets up the Slip Compensator (only for ACIM) for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setElecAngle_erev (ST_POSCONV_Handle handle, _iq24 posERev) |
| Sets the Electrical Angle (Pos_erev) for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setCurrentVector (ST_POSCONV_Handle handle, MATH_vec2 *pIdqIn) |
| Sets the Current Vector (IdqIn) (only needed for ACIM) for SpinTAC Position Converter. More... | |
| static _iq24 | STPOSCONV_getVelocity (ST_POSCONV_Handle handle) |
| Gets the Velocity (Vel) for SpinTAC Position Converter. More... | |
| static _iq24 | STPOSCONV_getVelocityFiltered (ST_POSCONV_Handle handle) |
| Gets the Velocity Filtered (VelLpf) for SpinTAC Position Converter. More... | |
| static _iq24 | STPOSCONV_getPosition_mrev (ST_POSCONV_Handle handle) |
| Gets the Position (Pos_mrev) for SpinTAC Position Converter. More... | |
| static int32_t | STPOSCONV_getPositionRollOver (ST_POSCONV_Handle handle) |
| Gets the Position RollOver Counts (PosROCounts) for SpinTAC Position Converter. More... | |
| static _iq24 | STPOSCONV_getSlipVelocity (ST_POSCONV_Handle handle) |
| Gets the Slip Velocity (SlipVel) (only for ACIM) for SpinTAC Position Converter. More... | |
| static void | STPOSCONV_setEnable (ST_POSCONV_Handle handle, bool enb) |
| Sets the Enable signal (ENB) for SpinTAC Position Converter. More... | |
| static bool | STPOSCONV_getEnable (ST_POSCONV_Handle handle) |
| Gets the Enable signal (ENB) for SpinTAC Position Converter. More... | |
| static ST_PosConvStatus_e | STPOSCONV_getStatus (ST_POSCONV_Handle handle) |
| Gets the Status value (STATUS) for SpinTAC Position Converter. More... | |
| static uint16_t | STPOSCONV_getErrorID (ST_POSCONV_Handle handle) |
| Gets the Error value (ERR_ID) for SpinTAC Position Converter. More... | |
| ST_POSCONV_Handle | STPOSCONV_init (void *pMemory, const size_t numBytes) |
| Initializes the SpinTAC Position Converter object. More... | |
| void | STPOSCONV_run (ST_POSCONV_Handle handle) |
| Performs Position Roll Over Addition. More... | |
| struct ST_PosConvCfg_t |
Defines the ST_PosConvCfg_t data.
The ST_PosConvCfg_t object contains all configuration parameters of the Position Convert object.
Definition at line 61 of file spintac_pos_conv.h.
| Data Fields | ||
|---|---|---|
| _iq24 | erev_TO_pu_ps | Conversion ratio from electrical revolution to user unit. |
| int16_t | LpfTime_tick | Low pass filter ISR ticks { unit: [ticks], value range: [1, 100] }. |
| _iq24 | OneOverFreqTimeConst | Scalar value used in the Slip Compensator (only needed for ACIM) { value range: positive _IQ24 value }. |
| _iq24 | PolePairs | Conversion ratio from mechanical revolution to electrical revolution { Pole Pairs }. |
| _iq24 | ROMax_erev | Maximum bound for electrical revolution { unit: [ERev] }. |
| _iq24 | ROMax_mrev | Position Rollover bound { unit: [MRev] }. |
| _iq24 | ROMin_erev | Minimum bound for electrical revolution { unit: [ERev] }. |
| _iq24 | SampleTimeOverTimeConst | Scalar value used in the Slip Compensator (only needed for ACIM) { value range: positive _IQ24 value }. |
| _iq24 | T_sec | Sample Time { unit: [s], value range: (0, 0.01] }. |
| struct ST_PosConv_t |
Defines the ST_PosConv_t data.
The ST_PosConv_t object contains all parameters needed to perform Position Conversion
Definition at line 77 of file spintac_pos_conv.h.
| Data Fields | ||
|---|---|---|
| ST_PosConvCfg_t | cfg | |
| bool | ENB | Enable bit { false: disable; true: enable }. |
| uint16_t | ERR_ID | Error ID { 0: no error; others: see error code }. |
| _iq24 | Id | the Id current (only needed for ACIM) { unit: [PU] } |
| _iq24 | Iq | the Iq current (only needed for ACIM) { unit: [PU] } |
| _iq24 | Pos_erev | Electrical angle { unit: [ERev] }. |
| _iq24 | Pos_mrev | Position { unit: [MRev] }. |
| int32_t | PosROCounts | Position rollover counts. |
| uint32_t | s0[19] | |
| _iq24 | SlipVel | Speed of the magnetic slip (only for ACIM) { unit: [ERev/s] }. |
| ST_PosConvStatus_e | STATUS | Status { ST_POS_CONV_IDLE, ST_POS_CONV_INIT,ST_POS_CONV_BUSY }. |
| _iq24 | Vel | Speed unfiltered { unit: [pu/s] }. |
| _iq24 | VelLpf | Speed filtered { unit: [pu/s] }. |
| typedef struct _ST_POSCONV_Handle_* ST_POSCONV_Handle |
Definition at line 99 of file spintac_pos_conv.h.
| enum ST_PosConvStatus_e |
Enumeration for the Position Convert Status states.
Definition at line 51 of file spintac_pos_conv.h.
|
inlinestatic |
Gets the Enable signal (ENB) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 270 of file spintac_pos_conv.h.
References ST_PosConv_t::ENB.
|
inlinestatic |
Gets the Error value (ERR_ID) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 288 of file spintac_pos_conv.h.
References ST_PosConv_t::ERR_ID.
|
inlinestatic |
Gets the Position (Pos_mrev) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 232 of file spintac_pos_conv.h.
References ST_PosConv_t::Pos_mrev.
|
inlinestatic |
Gets the Position RollOver Counts (PosROCounts) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 241 of file spintac_pos_conv.h.
References ST_PosConv_t::PosROCounts.
|
inlinestatic |
Gets the Slip Velocity (SlipVel) (only for ACIM) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 250 of file spintac_pos_conv.h.
References ST_PosConv_t::SlipVel.
|
inlinestatic |
Gets the Status value (STATUS) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 279 of file spintac_pos_conv.h.
References ST_PosConv_t::STATUS.
|
inlinestatic |
Gets the Velocity (Vel) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 214 of file spintac_pos_conv.h.
References ST_PosConv_t::Vel.
|
inlinestatic |
Gets the Velocity Filtered (VelLpf) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
Definition at line 223 of file spintac_pos_conv.h.
References ST_PosConv_t::VelLpf.
| ST_POSCONV_Handle STPOSCONV_init | ( | void * | pMemory, |
| const size_t | numBytes | ||
| ) |
Initializes the SpinTAC Position Converter object.
| [in] | *pMemory | Pointer to the memory for ST_PosConv_t |
| [in] | numBytes | The number of bytes in the ST_PosConv_t |
| void STPOSCONV_run | ( | ST_POSCONV_Handle | handle | ) |
Performs Position Roll Over Addition.
| [in] | handle | The handle for the Position Converter structure |
|
inlinestatic |
Sets the Current Vector (IdqIn) (only needed for ACIM) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | pIdqIn | The vector of the direct/quadrature current input vector values { unit: [PU] } |
Definition at line 202 of file spintac_pos_conv.h.
References ST_PosConv_t::Id, ST_PosConv_t::Iq, and _MATH_vec2_::value.
|
inlinestatic |
Sets the Electrical Angle (Pos_erev) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | posERev | Electrical angle { unit: [ERev] } |
Definition at line 191 of file spintac_pos_conv.h.
References ST_PosConv_t::Pos_erev.
|
inlinestatic |
Sets the Enable signal (ENB) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | enb | Enable bit { false: disable; true: enable } |
Definition at line 259 of file spintac_pos_conv.h.
References ST_PosConv_t::ENB.
|
inlinestatic |
Sets the Electrical Revolution Maximum (cfg.ERevROMax) & Minimum (cfg.ERevROMin) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | eRevROMax | Maximum bound for electrical revolution { unit: [ERev] } |
| [in] | eRevROMin | Minimum bound for electrical revolution { unit: [ERev] } |
Definition at line 118 of file spintac_pos_conv.h.
References ST_PosConv_t::cfg, ST_PosConvCfg_t::ROMax_erev, ST_PosConvCfg_t::ROMin_erev, ST_POS_CONV_IDLE, and ST_PosConv_t::STATUS.
|
inlinestatic |
Sets the Lowpass Time (cfg.LpfTime_tick) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | lpfTime | Low pass filter ISR ticks { unit: [ticks], value range: [1, 100] } |
Definition at line 161 of file spintac_pos_conv.h.
References ST_PosConv_t::cfg, ST_PosConvCfg_t::LpfTime_tick, ST_POS_CONV_IDLE, and ST_PosConv_t::STATUS.
|
inlinestatic |
Sets the Mechanical Revolution Maximum (cfg.ROMax_mrev) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | mRevROMax | Maximum bound for mechanical revolution { unit: [MRev] } |
Definition at line 148 of file spintac_pos_conv.h.
References ST_PosConv_t::cfg, ST_PosConvCfg_t::ROMax_mrev, ST_POS_CONV_IDLE, and ST_PosConv_t::STATUS.
|
inlinestatic |
Sets the Sample Time (cfg.T) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | sampleTime | Sample Time { unit: [s], value range: (0, 0.01] } |
Definition at line 104 of file spintac_pos_conv.h.
References ST_PosConv_t::cfg, ST_POS_CONV_IDLE, ST_PosConv_t::STATUS, and ST_PosConvCfg_t::T_sec.
|
inlinestatic |
Sets the Unit Conversions for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | baseFreq | The value that frequency is scaled with in the system { USER_IQ_FULL_SCALE_FREQ_Hz } |
| [in] | sampleTime | Sample Time { unit: [s], value range: (0, 0.01] } |
| [in] | polePairs | The number of Pole Pairs in the motor { USER_MOTOR_NUM_POLE_PAIRS } |
Definition at line 134 of file spintac_pos_conv.h.
References _IQ24, ST_PosConv_t::cfg, ST_PosConvCfg_t::erev_TO_pu_ps, ST_PosConvCfg_t::PolePairs, ST_POS_CONV_IDLE, and ST_PosConv_t::STATUS.
|
inlinestatic |
Sets up the Slip Compensator (only for ACIM) for SpinTAC Position Converter.
| [in] | handle | The handle for the SpinTAC Position Converter Object |
| [in] | sampleTime | Sample Time (float) { unit: [s], value range: (0, 0.01] } |
| [in] | baseFreq | The value that frequency is scaled with in the system { USER_IQ_FULL_SCALE_FREQ_Hz } |
| [in] | rotorResistance | The resistance of the motor rotor, estimated by FAST { USER_MOTOR_Rr } |
| [in] | statorInductance | The inductance of the motor stator, estimated by FAST { USER_MOTOR_Ls_d } |
Definition at line 177 of file spintac_pos_conv.h.
References _IQ24, ST_PosConv_t::cfg, ST_PosConvCfg_t::OneOverFreqTimeConst, ST_PosConvCfg_t::SampleTimeOverTimeConst, ST_POS_CONV_IDLE, and ST_PosConv_t::STATUS.
1.8.9.1