1 #ifndef __SPINTAC_POS_CONV_H__
2 #define __SPINTAC_POS_CONV_H__
304 #endif //__SPINTAC_POS_CONV_H__
_iq24 Pos_mrev
Position { unit: [MRev] }.
_iq24 PolePairs
Conversion ratio from mechanical revolution to electrical revolution { Pole Pairs }...
static void STPOSCONV_setSampleTime_sec(ST_POSCONV_Handle handle, _iq24 sampleTime)
Sets the Sample Time (cfg.T) for SpinTAC Position Converter.
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.
ST_POSCONV_Handle STPOSCONV_init(void *pMemory, const size_t numBytes)
Initializes the SpinTAC Position Converter object.
ST_PosConvStatus_e
Enumeration for the Position Convert Status states.
static void STPOSCONV_setLowPassFilterTime_tick(ST_POSCONV_Handle handle, int16_t lpfTime)
Sets the Lowpass Time (cfg.LpfTime_tick) for SpinTAC Position Converter.
_iq24 erev_TO_pu_ps
Conversion ratio from electrical revolution to user unit.
static _iq24 STPOSCONV_getPosition_mrev(ST_POSCONV_Handle handle)
Gets the Position (Pos_mrev) for SpinTAC Position Converter.
Defines a two element vector.
_iq24 SampleTimeOverTimeConst
Scalar value used in the Slip Compensator (only needed for ACIM) { value range: positive _IQ24 value ...
_iq24 SlipVel
Speed of the magnetic slip (only for ACIM) { unit: [ERev/s] }.
int16_t LpfTime_tick
Low pass filter ISR ticks { unit: [ticks], value range: [1, 100] }.
_iq24 VelLpf
Speed filtered { unit: [pu/s] }.
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.
Position Converter is in busy state, converting position and velocity signals.
bool ENB
Enable bit { false: disable; true: enable }.
static ST_PosConvStatus_e STPOSCONV_getStatus(ST_POSCONV_Handle handle)
Gets the Status value (STATUS) for SpinTAC Position Converter.
void STPOSCONV_run(ST_POSCONV_Handle handle)
Performs Position Roll Over Addition.
static bool STPOSCONV_getEnable(ST_POSCONV_Handle handle)
Gets the Enable signal (ENB) for SpinTAC Position Converter.
static void STPOSCONV_setEnable(ST_POSCONV_Handle handle, bool enb)
Sets the Enable signal (ENB) for SpinTAC Position Converter.
ST_PosConvStatus_e STATUS
Status { ST_POS_CONV_IDLE, ST_POS_CONV_INIT,ST_POS_CONV_BUSY }.
Position Converter is in idle state, zero output.
static _iq24 STPOSCONV_getVelocityFiltered(ST_POSCONV_Handle handle)
Gets the Velocity Filtered (VelLpf) for SpinTAC Position Converter.
static void STPOSCONV_setCurrentVector(ST_POSCONV_Handle handle, MATH_vec2 *pIdqIn)
Sets the Current Vector (IdqIn) (only needed for ACIM) for SpinTAC Position Converter.
static _iq24 STPOSCONV_getVelocity(ST_POSCONV_Handle handle)
Gets the Velocity (Vel) for SpinTAC Position Converter.
_iq24 Pos_erev
Electrical angle { unit: [ERev] }.
_iq24 OneOverFreqTimeConst
Scalar value used in the Slip Compensator (only needed for ACIM) { value range: positive _IQ24 value ...
Defines the ST_PosConv_t data.
_iq24 ROMax_erev
Maximum bound for electrical revolution { unit: [ERev] }.
_iq24 ROMin_erev
Minimum bound for electrical revolution { unit: [ERev] }.
_iq24 Id
the Id current (only needed for ACIM) { unit: [PU] }
static int32_t STPOSCONV_getPositionRollOver(ST_POSCONV_Handle handle)
Gets the Position RollOver Counts (PosROCounts) for SpinTAC Position Converter.
Public interface, object, and function definitions related to the SpinTAC Version object...
uint16_t ERR_ID
Error ID { 0: no error; others: see error code }.
int32_t PosROCounts
Position rollover counts.
_iq24 Vel
Speed unfiltered { unit: [pu/s] }.
Position Converter is in init state, validating configured parameters.
static uint16_t STPOSCONV_getErrorID(ST_POSCONV_Handle handle)
Gets the Error value (ERR_ID) for SpinTAC Position Converter.
_iq24 ROMax_mrev
Position Rollover bound { unit: [MRev] }.
Defines the ST_PosConvCfg_t data.
_iq24 T_sec
Sample Time { unit: [s], value range: (0, 0.01] }.
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...
static void STPOSCONV_setElecAngle_erev(ST_POSCONV_Handle handle, _iq24 posERev)
Sets the Electrical Angle (Pos_erev) for SpinTAC Position Converter.
static _iq24 STPOSCONV_getSlipVelocity(ST_POSCONV_Handle handle)
Gets the Slip Velocity (SlipVel) (only for ACIM) for SpinTAC Position Converter.
struct _ST_POSCONV_Handle_ * ST_POSCONV_Handle
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
static void STPOSCONV_setMRevMaximum_mrev(ST_POSCONV_Handle handle, _iq24 mRevROMax)
Sets the Mechanical Revolution Maximum (cfg.ROMax_mrev) for SpinTAC Position Converter.
_iq24 Iq
the Iq current (only needed for ACIM) { unit: [PU] }