MotorWare f2806x Module API Documentation
Data Structures | Typedefs | Functions
SLIP

Data Structures

struct  _SLIP_Obj_
 Defines the slip object. More...
 

Typedefs

typedef struct _SLIP_Obj_ SLIP_Obj
 Defines the slip object. More...
 
typedef struct _SLIP_Handle_ * SLIP_Handle
 Defines the slip handle. More...
 

Functions

_iq SLIP_getMagneticAngle (SLIP_Handle slipHandle)
 Returns the current magnetic angle. More...
 
SLIP_Handle SLIP_init (void *pMemory, const size_t numBytes)
 Initializes the encoder object. More...
 
void SLIP_run (SLIP_Handle slipHandle)
 Based on the electrical angle and the incremental slip, calculates the magnetic angle. More...
 
void SLIP_setElectricalAngle (SLIP_Handle slipHandle, _iq electricalAngle)
 Set the electrical angle. More...
 
void SLIP_setSlipVelocity (SLIP_Handle slipHandle, _iq slipVelocity)
 Set the amount of slip velocity and calculates the incremental slip. More...
 
void SLIP_setup (SLIP_Handle slipHandle, _iq sampleTime)
 Initializes slip object parameters. More...
 

Detailed Description


Data Structure Documentation

struct _SLIP_Obj_

Defines the slip object.

Definition at line 68 of file slip.h.

Data Fields
int32_t enc_elec_angle current electrical angle from encoder
int32_t enc_magnetic_angle current magnetic angle in Q24
int32_t enc_slip_angle amount of total slip in Q24
int32_t incremental_slip incremental amount of slip per sample time
_iq sample_time sample time of the SLIP module

Typedef Documentation

typedef struct _SLIP_Handle_* SLIP_Handle

Defines the slip handle.

Definition at line 80 of file slip.h.

typedef struct _SLIP_Obj_ SLIP_Obj

Defines the slip object.

Function Documentation

_iq SLIP_getMagneticAngle ( SLIP_Handle  slipHandle)
inline

Returns the current magnetic angle.

Parameters
[in]slipHandleHandle to the SLIP object
Returns
Magnetic angle in Q24

Definition at line 90 of file slip.h.

References _SLIP_Obj_::enc_magnetic_angle.

SLIP_Handle SLIP_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the encoder object.

Parameters
[in]pMemoryMemory pointer to object
[in]numBytesObject size
Returns
Object handle

Definition at line 56 of file slip.c.

void SLIP_run ( SLIP_Handle  slipHandle)

Based on the electrical angle and the incremental slip, calculates the magnetic angle.

Parameters
[in]slipHandleHandle to the SLIP object
Returns
Nothing

Definition at line 90 of file slip.c.

References _SLIP_Obj_::enc_elec_angle, _SLIP_Obj_::enc_magnetic_angle, _SLIP_Obj_::enc_slip_angle, and _SLIP_Obj_::incremental_slip.

void SLIP_setElectricalAngle ( SLIP_Handle  slipHandle,
_iq  electricalAngle 
)
inline

Set the electrical angle.

Parameters
[in]slipHandleHandle to the SLIP object
[in]electricalAngleCurrent electrical angle in Q24
Returns
Nothing

Definition at line 114 of file slip.h.

References _SLIP_Obj_::enc_elec_angle.

void SLIP_setSlipVelocity ( SLIP_Handle  slipHandle,
_iq  slipVelocity 
)
inline

Set the amount of slip velocity and calculates the incremental slip.

Parameters
[in]slipHandleHandle to the SLIP object
[in]slipVelocityVelocity of the slip in ELectrical Revolutions per second
Returns
Nothing

Definition at line 128 of file slip.h.

References _IQmpy, _SLIP_Obj_::incremental_slip, and _SLIP_Obj_::sample_time.

void SLIP_setup ( SLIP_Handle  slipHandle,
_iq  sampleTime 
)

Initializes slip object parameters.

Parameters
[in]slipHandleHandle to the SLIP object
[in]sampleTimeSample time that the SLIP object is being called at
Returns
Nothing

Definition at line 70 of file slip.c.

References _SLIP_Obj_::enc_elec_angle, _SLIP_Obj_::enc_magnetic_angle, _SLIP_Obj_::enc_slip_angle, _SLIP_Obj_::incremental_slip, and _SLIP_Obj_::sample_time.