1 #ifndef __SPINTAC_POS_MOVE_H__
2 #define __SPINTAC_POS_MOVE_H__
49 #ifndef __ST_AXIS_ENUM__
50 #define __ST_AXIS_ENUM__
58 #endif //__ST_AXIS_ENUM__
60 #ifndef __ST_MOVE_CURVE_TYPE_ENUM__
61 #define __ST_MOVE_CURVE_TYPE_ENUM__
70 #endif //__ST_MOVE_CURVE_TYPE_ENUM__
80 #ifndef __ST_MOVE_STATUS_ENUM__
81 #define __ST_MOVE_STATUS_ENUM__
92 #endif //__ST_MOVE_STATUS_ENUM__
556 #endif //__SPINTAC_POS_MOVE_H__
static ST_MoveStatus_e STPOSMOVE_getStatus(ST_POSMOVE_Handle handle)
Gets the Status value (STATUS) for SpinTAC Position Move.
uint16_t ERR_ID
Error ID { 0: no error; others: see error code }.
void STPOSMOVE_run(ST_POSMOVE_Handle handle)
Runs the SpinTAC Position Move ISR Function.
_iq24 mrev_TO_pu
Conversion ratio from mechanical revolution to pu { value range: [0.002, 1.0]) }. ...
static void STPOSMOVE_setJerkLimit(ST_POSMOVE_Handle handle, _iq20 jrkLim)
Sets the Jerk Limit (JrkLim) for SpinTAC Position Move.
static void STPOSMOVE_setVelocityStart(ST_POSMOVE_Handle handle, _iq24 velStart)
Sets the Velocity Start (cfg.VelStart) for SpinTAC Position Move.
Defines the ST_PosMove_t data.
Move is in busy state, ramping velocity to zero.
static _iq24 STPOSMOVE_getActualAcceleration(ST_POSMOVE_Handle handle)
Gets the Actual Acceleration (msg.ActualAccLim) for SpinTAC Position Move.
Move is in conf state, determining the curves.
static void STPOSMOVE_setSampleTime_sec(ST_POSMOVE_Handle handle, _iq24 sampleTime)
Sets the Sample Time (cfg.T_sec) for SpinTAC Position Move.
static void STPOSMOVE_setAxis(ST_POSMOVE_Handle handle, ST_Axis_e axis)
Sets the Axis (cfg.Axis) for SpinTAC Position Move.
_iq24 T_sec
Sample time { unit: [s], value range: (0, 0.01] }.
int32_t PosStepInt_mrev
Position Step value integer part { unit: [MRev], value range: (-2^31, 2^31) }.
static void STPOSMOVE_setPositionRollOver(ST_POSMOVE_Handle handle, int32_t posRollOver)
Sets the Position RollOver Counts (PosRollOver) for SpinTAC Position Move.
_iq24 ActualDecLim
Actual maximum deceleration of the profile { unit: [pu/s^2], value range: (0.0, DecLim] }...
_iq20 JrkLim
Jerk Limit { unit: [pu/s^3], value range: [0.0005, 2000.0] }.
static _iq24 STPOSMOVE_getAccelerationReference(ST_POSMOVE_Handle handle)
Gets the Acceleration Reference (AccRef) for SpinTAC Position Move.
_iq24 PosRef_mrev
Sawtooth Position profile { unit: [MRev], value range [-ROMax_mrev, ROMax_mrev) }.
uint32_t ProTime_tick
Profile time in sub-million ticks { unit: [tick], value range: (0, 1000000) }.
static _iq24 STPOSMOVE_getVelocityEnd(ST_POSMOVE_Handle handle)
Gets the Velocity End (VelEnd) for SpinTAC Position Move.
static void STPOSMOVE_setTest(ST_POSMOVE_Handle handle, bool tst)
Sets the Test signal (TST) for SpinTAC Position Move.
ST_Axis_e Axis
Axis ID { ST_AXIS0: axis 0, ST_AXIS1: axis 1}.
_iq20 ActualJrkLim
Actual maximum jerk of the profile { unit: [pu/s^3], value range: (0.0, JrkLim] }.
Move is in idle state, holding position.
static bool STPOSMOVE_getTest(ST_POSMOVE_Handle handle)
Gets the Test signal (TST) for SpinTAC Position Move.
static bool STPOSMOVE_getEnable(ST_POSMOVE_Handle handle)
Gets the Enable signal (ENB) for SpinTAC Position Move.
static _iq20 STPOSMOVE_getJerkReference(ST_POSMOVE_Handle handle)
Gets the Jerk Reference (JrkRef) for SpinTAC Position Move.
Defines the ST_PosMoveMsg_t data.
_iq24 ActualVelLim
Actual maximum velocity of the profile { unit: [pu/s], value range: (0.0, VelLim] }...
uint32_t ProTime_mtick
Profile time in million ticks increments { unit: [million tick], value range: (0, uint32_t max] }...
static _iq24 STPOSMOVE_getVelocityReference(ST_POSMOVE_Handle handle)
Gets the Velocity Reference (VelRef) for SpinTAC Position Move.
ST_POSMOVE_Handle STPOSMOVE_init(void *pMemory, const size_t numBytes)
Initializes the SpinTAC Position Move object.
position-determined position profile
_iq24 VelRef
Velocity profile { unit: [pu/s] }.
static void STPOSMOVE_setVelocityEnd(ST_POSMOVE_Handle handle, _iq24 velEnd)
Sets the Velocity End (VelEnd) for SpinTAC Position Move.
ST_Axis_e
Enumeration for the Axis Status states.
static void STPOSMOVE_getProfileTime_tick(ST_POSMOVE_Handle handle, uint32_t *ProTime_tick, uint32_t *ProTime_mtick)
Gets the Profile Time (msg.ProTime_tick) for SpinTAC Position Move.
_iq24 PosStart_mrev
Position Start value { unit: [MRev], value range: [-ROMax, ROMax) }.
ST_PosMoveProfileType_e
Enumeration for the Profile Mode states.
static _iq24 STPOSMOVE_getActualVelocity(ST_POSMOVE_Handle handle)
Gets the Actual Velocity (msg.ActualVelLim) for SpinTAC Position Move.
velocity-determined position profile
static void STPOSMOVE_setAccelerationLimit(ST_POSMOVE_Handle handle, _iq24 accLim)
Sets the Acceleration Limit (AccLim) for SpinTAC Position Move.
ST_MoveCurveType_e CurveType
Curve mode { ST_MOVE_CUR_TRAP: Trap; ST_MOVE_CUR_SCRV: s-Curve; ST_MOVE_CUR_STCRV: st-Curve }...
static void STPOSMOVE_setPositionStep_mrev(ST_POSMOVE_Handle handle, int32_t posStepInt, _iq24 posStepFrac)
Sets the Position Step (posStepInt_mrev, posStepFrac_mrev) for SpinTAC Position Move.
_iq24 ROMax_mrev
Position Rollover bound { unit: [MRev], value range: [2, 100] }.
Move is in busy state, providing the curves.
static void STPOSMOVE_setVelocityLimit(ST_POSMOVE_Handle handle, _iq24 velLim)
Sets the Velocity Limit (VelLim) for SpinTAC Position Move.
_iq24 ActualAccLim
Actual maximum acceleration of the profile { unit: [pu/s^2], value range: (0.0, AccLim] }...
static int32_t STPOSMOVE_getPositionRollOver(ST_POSMOVE_Handle handle)
Gets the Position RollOver Counts (PosRollOver) for SpinTAC Position Move.
static _iq20 STPOSMOVE_getActualJerk(ST_POSMOVE_Handle handle)
Gets the Actual Jerk (msg.ActualJrkLim) for SpinTAC Position Move.
static _iq24 STPOSMOVE_getVelocityStart(ST_POSMOVE_Handle handle)
Gets the Velocity Start (cfg.VelStart) for SpinTAC Position Move.
Defines the ST_PosMoveCfg_t data.
static void STPOSMOVE_setCurveType(ST_POSMOVE_Handle handle, ST_MoveCurveType_e curveType)
Sets the Curve Type (cfg.CurveType) for SpinTAC Position Move.
static void STPOSMOVE_setHaltLimits(ST_POSMOVE_Handle handle, _iq24 haltAccLim, _iq20 haltJrkLim)
Sets the Halt Limits (cfg.HaltAccLim & cfg.HaltJrkLim) for SpinTAC Position Move. ...
Move is in init state, validating configured parameters.
bool TST
Profile test bit { false: Not Testing; true: Testing Mode }.
ST_Axis_e
Enumeration for the Axis Status states.
static _iq24 STPOSMOVE_getActualDeceleration(ST_POSMOVE_Handle handle)
Gets the Actual Deceleration (msg.ActualDecLim) for SpinTAC Position Move.
_iq24 VelStart
Velocity Start value { unit: [pu/s], value range: [-1.0, 1.0]) }.
_iq24 PosStepFrac_mrev
Position Step value fraction part { unit: [MRev], value range: (-1.0, 1.0) }.
struct _ST_POSMOVE_Handle_ * ST_POSMOVE_Handle
Public interface, object, and function definitions related to the SpinTAC Version object...
_iq24 AccRef
Acceleration profile { unit: [pu/s^2] }.
_iq24 VelEnd
Velocity End value { unit: [pu/s], value range: [-1.0, 1.0] }.
_iq20 JrkRef
Jerk profile { unit:; [pu /s^3] }.
ST_PosMoveProfileType_e ProfileType
Sets the profile type { ST_POS_MOVE_VEL_TYPE: velocity; ST_POS_MOVE_POS_TYPE: position }...
static _iq24 STPOSMOVE_getPositionReference_mrev(ST_POSMOVE_Handle handle)
Gets the Position Reference (PosRef_mrev) for SpinTAC Position Move.
_iq20 HaltJrkLim
Jerk Limit during Halt State { unit: [pu/s^3], value range: [0.0005, 2000.0] }.
static void STPOSMOVE_setUnitConversion(ST_POSMOVE_Handle handle, float_t baseFreq, uint16_t polePairs)
Sets the Unit Conversions for SpinTAC Position Move.
_iq24 DecLim
Deceleration Limit { unit: [pu/s^2], value range: [0.001, 120.0] }.
bool ENB
Enable bit { false: disabled; true: enabled }.
int32_t PosRollOver
Position rollover counts.
ST_MoveStatus_e
Enumeration for the Move Status states.
_iq24 VelLim
Note: VelLim values < 0.001 pu/s may work, but are not guaranteed.
ST_MoveStatus_e STATUS
Profile generator status { ST_MOVE_IDLE, ST_MOVE_INIT, ST_MOVE_CONF, ST_MOVE_BUSY, ST_MOVE_HALT }.
static void STPOSMOVE_setProfileType(ST_POSMOVE_Handle handle, ST_PosMoveProfileType_e profileType)
Sets the Profile Type (cfg.ProfileType) for SpinTAC Position Move.
ST_MoveCurveType_e
Enumeration for the Move Curve Mode states.
static void STPOSMOVE_setEnable(ST_POSMOVE_Handle handle, bool enb)
Sets the Enable signal (ENB) for SpinTAC Position Move.
static void STPOSMOVE_getPositionStep_mrev(ST_POSMOVE_Handle handle, int32_t *posStepInt, _iq24 *posStepFrac)
Gets the Position Step (posStepInt_mrev, posStepFrac_mrev) for SpinTAC Position Move.
static uint16_t STPOSMOVE_getErrorID(ST_POSMOVE_Handle handle)
Gets the Error value (ERR_ID) for SpinTAC Position Move.
_iq24 HaltAccLim
Acceleration Limit during Halt State { unit: [pu/s^2], value range: [0.001, 120.0] }...
static void STPOSMOVE_setPositionStart_mrev(ST_POSMOVE_Handle handle, _iq24 posStart)
Sets the Position Start (cfg.PosStart_mrev) for SpinTAC Position Move.
static _iq24 STPOSMOVE_getPositionStart_mrev(ST_POSMOVE_Handle handle)
Gets the Position Start (cfg.PosStart_mrev) for SpinTAC Position Move.
static void STPOSMOVE_setMRevMaximum_mrev(ST_POSMOVE_Handle handle, _iq24 mRevROMax)
Sets the Mechanical Revolution Maximum (cfg.ROMax_mrev) for SpinTAC Position Move.
static void STPOSMOVE_setDecelerationLimit(ST_POSMOVE_Handle handle, _iq24 decLim)
Sets the Deceleration Limit (DecLim) for SpinTAC Position Move.
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
_iq24 AccLim
Acceleration Limit { unit: [pu/s^2], value range: [0.001, 120.0] }.