MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Macros | Typedefs | Enumerations | Functions
SpinTAC Velocity Plan

## Data Structures
struct | ST_PlanError_t
| Defines the ST_PlanError_t data. More...
struct | ST_VelPlan_t
| Defines the ST_VelPlan_t data. More...

## Macros
#define | ST_VEL_PLAN_ACT_DWORDS (5)
| Defines the amount of memory that needs to be allocated for each component. More...
#define | ST_VEL_PLAN_COND_DWORDS (3)
| Each configured Condition takes 3 double words of memory. More...
#define | ST_VEL_PLAN_VAR_DWORDS (2)
| Each configured Variable takes 2 double words of memory. More...
#define | ST_VEL_PLAN_TRAN_DWORDS (5)
| Each configured Transition takes 5 double words of memory. More...
#define | ST_VEL_PLAN_STATE_DWORDS (6)
| Each configured State takes 6 double words of memory. More...
#define | __ST_PLAN_ENUM__
#define | __ST_PLAN_ERROR__

## Typedefs
typedef struct _ST_VELPLAN_Handle_ * | ST_VELPLAN_Handle

## Enumerations
enum | ST_PlanStatus_e { ST_PLAN_IDLE =0, ST_PLAN_INIT, ST_PLAN_BUSY, ST_PLAN_HALT, ST_PLAN_WAIT, ST_PLAN_IDLE =0, ST_PLAN_INIT, ST_PLAN_BUSY, ST_PLAN_HALT, ST_PLAN_WAIT }
| Enumeration for the Plan Status States. More...
enum | ST_PlanCond_e { ST_COND_NC =0, ST_COND_FC, ST_COND_AND, ST_COND_OR, ST_COND_NC =0, ST_COND_FC, ST_COND_AND, ST_COND_OR }
| Enumeration for the Plan Condition options. More...
enum | ST_PlanComp_e { ST_COMP_NA =0, ST_COMP_EQ, ST_COMP_NEQ, ST_COMP_GT, ST_COMP_EGT, ST_COMP_LW, ST_COMP_ELW, ST_COMP_In, ST_COMP_EIn, ST_COMP_InE, ST_COMP_EInE, ST_COMP_Out, ST_COMP_EOut, ST_COMP_OutE, ST_COMP_EOutE, ST_COMP_NA =0, ST_COMP_EQ, ST_COMP_NEQ, ST_COMP_GT, ST_COMP_EGT, ST_COMP_LW, ST_COMP_ELW, ST_COMP_In, ST_COMP_EIn, ST_COMP_InE, ST_COMP_EInE, ST_COMP_Out, ST_COMP_EOut, ST_COMP_OutE, ST_COMP_EOutE }
| Enumeration for the Plan Compare options. More...
enum | ST_PlanActOptn_e { ST_ACT_EQ =0, ST_ACT_ADD, ST_ACT_EQ =0, ST_ACT_ADD }
| Enumeration for the Plan Action Options. More...
enum | ST_PlanActTrgr_e { ST_ACT_ENTR =0, ST_ACT_EXIT, ST_ACT_ENTR =0, ST_ACT_EXIT }
| Enumeration for the Plan Action trigger point types. More...
enum | ST_PlanFsmState_e { ST_FSM_STATE_STAY =0, ST_FSM_STATE_COND, ST_FSM_STATE_TRAN, ST_FSM_STATE_STAY =0, ST_FSM_STATE_COND, ST_FSM_STATE_TRAN }
| Enumeration for the Plan FSM states. More...
enum | ST_PlanVar_e { ST_VAR_INOUT =0, ST_VAR_IN, ST_VAR_OUT, ST_VAR_INOUT =0, ST_VAR_IN, ST_VAR_OUT }
| Enumeration for the Plan variable types. More...

## Functions
static _iq24 | STVELPLAN_getVelocitySetpoint (ST_VELPLAN_Handle handle)
| Gets the Velocity Setpoint (VelEnd) for SpinTAC Velocity Plan. More...
static _iq24 | STVELPLAN_getAccelerationLimit (ST_VELPLAN_Handle handle)
| Gets the Acceleration Limit (AccLim) for SpinTAC Velocity Plan. More...
static _iq20 | STVELPLAN_getJerkLimit (ST_VELPLAN_Handle handle)
| Gets the Jerk Limit (JrkLim) for SpinTAC Velocity Plan. More...
static void | STVELPLAN_setEnable (ST_VELPLAN_Handle handle, bool enb)
| Sets the Enable signal (ENB) for SpinTAC Velocity Plan. More...
static bool | STVELPLAN_getEnable (ST_VELPLAN_Handle handle)
| Gets the Enable signal (ENB) for SpinTAC Velocity Plan. More...
static void | STVELPLAN_setReset (ST_VELPLAN_Handle handle, bool res)
| Sets the Reset signal (RES) for SpinTAC Velocity Plan. More...
static bool | STVELPLAN_getReset (ST_VELPLAN_Handle handle)
| Gets the Reset signal (RES) for SpinTAC Velocity Plan. More...
static ST_PlanStatus_e | STVELPLAN_getStatus (ST_VELPLAN_Handle handle)
| Gets the Status value (STATUS) for SpinTAC Velocity Plan. More...
static uint16_t | STVELPLAN_getCurrentState (ST_VELPLAN_Handle handle)
| Gets the Current State (CurState) for SpinTAC Velocity Plan. More...
static uint16_t | STVELPLAN_getCurrentTransition (ST_VELPLAN_Handle handle)
| Gets the Current Transition (CurTran) for SpinTAC Velocity Plan. More...
static ST_PlanFsmState_e | STVELPLAN_getFsmState (ST_VELPLAN_Handle handle)
| Gets the State Machine State (FsmState) for SpinTAC Velocity Plan. More...
static int32_t | STVELPLAN_getCurrentTimerValue_tick (ST_VELPLAN_Handle handle)
| Gets the Current Time Value (Timer_tick) for SpinTAC Velocity Plan. More...
static uint16_t | STVELPLAN_getCfgError (ST_VELPLAN_Handle handle, uint16_t *ERR_idx, uint16_t *ERR_code)
| Gets the Configuration Error for SpinTAC Velocity Plan. More...
static uint16_t | STVELPLAN_getErrorID (ST_VELPLAN_Handle handle)
| Gets the Error ID for SpinTAC Velocity Plan. More...
void | STVELPLAN_getCfgStateNum (ST_VELPLAN_Handle handle, uint16_t *StateNum)
| Returns the number of configured States in SpinTAC Velocity Plan. More...
void | STVELPLAN_getCfgVarNum (ST_VELPLAN_Handle handle, uint16_t *VarNum)
| Returns the number of configured Variables in SpinTAC Velocity Plan. More...
void | STVELPLAN_getCfgCondNum (ST_VELPLAN_Handle handle, uint16_t *CondNum)
| Returns the number of configured Conditions in SpinTAC Velocity Plan. More...
void | STVELPLAN_getCfgTranNum (ST_VELPLAN_Handle handle, uint16_t *TranNum)
| Returns the number of configured Transitions in SpinTAC Velocity Plan. More...
void | STVELPLAN_getCfgActNum (ST_VELPLAN_Handle handle, uint16_t *ActNum)
| Returns the number of configured Actions in SpinTAC Velocity Plan. More...
void | STVELPLAN_addCfgCond (ST_VELPLAN_Handle handle, uint16_t VarIdx, ST_PlanComp_e Comp, _iq24 Value1, _iq24 Value2)
| Adds a Condition to the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_delCfgCond (ST_VELPLAN_Handle handle, uint16_t CondIdx)
| Deletes a Condition from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setCfgCond (ST_VELPLAN_Handle handle, uint16_t CondIdx, uint16_t VarIdx, ST_PlanComp_e Comp, _iq24 Value1, _iq24 Value2)
| Modifies a Condition in the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_getCfgCond (ST_VELPLAN_Handle handle, uint16_t CondIdx, uint16_t *VarIdx, ST_PlanComp_e *Comp, _iq24 *Value1, _iq24 *Value2)
| Returns a Condition from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_addCfgVarCond (ST_VELPLAN_Handle handle, uint16_t VarIdx1, uint16_t VarIdx2, ST_PlanComp_e Comp)
| Adds a Variable Condition to the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_delCfgVarCond (ST_VELPLAN_Handle handle, uint16_t CondIdx)
| Deletes a Variable Condition from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setCfgVarCond (ST_VELPLAN_Handle handle, uint16_t CondIdx, uint16_t VarIdx1, uint16_t VarIdx2, ST_PlanComp_e Comp)
| Modifies a Varaible Condition to the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_getCfgVarCond (ST_VELPLAN_Handle handle, uint16_t CondIdx, uint16_t *VarIdx1, uint16_t *VarIdx2, ST_PlanComp_e *Comp)
| Returns a Variable Condition from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_addCfgTran (ST_VELPLAN_Handle handle, uint16_t FromState, uint16_t ToState, ST_PlanCond_e AndOr, uint16_t CondIdx1, uint16_t CondIdx2, _iq24 AccLim, _iq20 JrkLim)
| Adds a Transition to the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_delCfgTran (ST_VELPLAN_Handle handle, uint16_t TranIdx)
| Deletes a Transition from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setCfgTran (ST_VELPLAN_Handle handle, uint16_t TranIdx, uint16_t FromState, uint16_t ToState, ST_PlanCond_e AndOr, uint16_t CondIdx1, uint16_t CondIdx2, _iq24 AccLim, _iq20 JrkLim)
| Modifies a Transition in the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_getCfgTran (ST_VELPLAN_Handle handle, uint16_t TranIdx, uint16_t *FromState, uint16_t *ToState, ST_PlanCond_e *AndOr, uint16_t *CondIdx1, uint16_t *CondIdx2, _iq24 *AccLim, _iq20 *JrkLim)
| Return a Transition from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_addCfgAct (ST_VELPLAN_Handle handle, uint16_t State, ST_PlanCond_e AndOr, uint16_t CondIdx1, uint16_t CondIdx2, uint16_t VarIdx, ST_PlanActOptn_e Opt, _iq24 Value, ST_PlanActTrgr_e EnterExit)
| Adds an action to the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_delCfgAct (ST_VELPLAN_Handle handle, uint16_t ActIdx)
| Deletes an action from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setCfgAct (ST_VELPLAN_Handle handle, uint16_t ActIdx, uint16_t State, ST_PlanCond_e AndOr, uint16_t CondIdx1, uint16_t CondIdx2, uint16_t VarIdx, ST_PlanActOptn_e Opt, _iq24 Value, ST_PlanActTrgr_e EnterExit)
| Modifies an action in the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_getCfgAct (ST_VELPLAN_Handle handle, uint16_t ActIdx, uint16_t *State, ST_PlanCond_e *AndOr, uint16_t *CondIdx1, uint16_t *CondIdx2, uint16_t *VarIdx, ST_PlanActOptn_e *Opt, _iq24 *Value, ST_PlanActTrgr_e *EnterExit)
| Returns an action from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_addCfgVar (ST_VELPLAN_Handle handle, ST_PlanVar_e Type, _iq24 Value)
| Adds a variable to the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_delCfgVar (ST_VELPLAN_Handle handle, uint16_t VarIdx)
| Deletes a Variable from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setCfgVar (ST_VELPLAN_Handle handle, uint16_t VarIdx, ST_PlanVar_e Type, _iq24 Value)
| Modifies a variable in the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_getCfgVar (ST_VELPLAN_Handle handle, uint16_t VarIdx, ST_PlanVar_e *Type, _iq24 *Value)
| Returns a variable from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setVar (ST_VELPLAN_Handle handle, uint16_t VarIdx, _iq24 Value)
| Sets the value of a SpinTAC Velocity Plan variable. More...
void | STVELPLAN_getVar (ST_VELPLAN_Handle handle, uint16_t VarIdx, _iq24 *Value)
| Gets the value of a SpinTAC Velocity Plan variable. More...
void | STVELPLAN_setUnitProfDone (ST_VELPLAN_Handle handle, bool ProDON)
| Sets a flag in SpinTAC Velocity Plan to indicate if the unit profile is complete. More...
void | STVELPLAN_setCfg (ST_VELPLAN_Handle handle, _iq24 T_sec, bool LoopENB)
| Configures SpinTAC Velocity Plan. More...
void | STVELPLAN_getCfg (ST_VELPLAN_Handle handle, _iq24 *T_sec, bool *LoopENB)
| Gets the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setCfgHaltState (ST_VELPLAN_Handle handle, _iq24 VelEnd, _iq24 AccLim, _iq20 JrkLim, int32_t Timer_tick)
| Configures the SpinTAC Velocity Plan Halt state. More...
void | STVELPLAN_getCfgHaltState (ST_VELPLAN_Handle handle, _iq24 *VelEnd, _iq24 *AccLim, _iq20 *JrkLim, int32_t *Timer_tick)
| Gets the SpinTAC Velocity Plan Halt state configuration. More...
void | STVELPLAN_addCfgState (ST_VELPLAN_Handle handle, _iq24 VelEnd, int32_t Timer_tick)
| Adds a State to the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_delCfgState (ST_VELPLAN_Handle handle, uint16_t StateIdx)
| Deletes a state from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_setCfgState (ST_VELPLAN_Handle handle, uint16_t StateIdx, _iq24 VelEnd, int32_t Timer_tick)
| Modifies a state in the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_getCfgState (ST_VELPLAN_Handle handle, uint16_t StateIdx, _iq24 *VelEnd, int32_t *Timer_tick)
| Returns a state from the SpinTAC Velocity Plan configuration. More...
void | STVELPLAN_reset (ST_VELPLAN_Handle handle)
| Resets the Velocity Plan component. More...
ST_VELPLAN_Handle | STVELPLAN_init (void *pMemory, const size_t numBytes)
| Initializes the SpinTAC Velocity Plan component. More...
void | STVELPLAN_run (ST_VELPLAN_Handle handle)
| Runs SpinTAC Velocity Plan calculation. More...
void | STVELPLAN_runTick (ST_VELPLAN_Handle handle)
| Updates the SpinTAC Velocity Plan Timer. More...
void | STVELPLAN_setCfgArray (ST_VELPLAN_Handle handle, uint32_t *cfgArray, const size_t numBytes, uint16_t MaxActNum, uint16_t MaxCondNum, uint16_t MaxVarNum, uint16_t MaxTranNum, uint16_t MaxStateNum)
| Prepares SpinTAC Velocity Plan configuration array. More...

## Detailed Description

## Data Structure Documentation

struct ST_PlanError_t

Defines the ST_PlanError_t data.

The ST_PlanError_t object contains error debugging information for the Position Plan component

The ST_PlanError_t object contains error debugging information for the Velocity Plan component

Definition at line 139 of file spintac_pos_plan.h.

Data Fields
uint16_t | ERR_code | Function specific condition that caused the error.
uint16_t | ERR_idx | Plan component index that caused the error.

struct ST_VelPlan_t

Defines the ST_VelPlan_t data.

The ST_VelPlan_t object contains all configuration parameters of the Velocity Plan component

Definition at line 148 of file spintac_vel_plan.h.

Data Fields
_iq24 | AccLim | Acceleration limit { unit: [pu/s^2], value range: [0.001, 120.0] }.
ST_PlanError_t | CfgError | Error decoding structure.
uint16_t | CurState | Current state of the state machine.
uint16_t | CurTran | Current transition of the state machine.
bool | ENB | Enable bit { false: disabled; true: enabled }.
uint16_t | ERR_ID | Error ID { 0: no error; others: see error code }.
ST_PlanFsmState_e | FsmState | State of the state machine.
_iq20 | JrkLim | Jerk Limit { unit: [pu/s^3], value range: [0.0005, 2000.0] }.
bool | RES | Reset bit { false: not reset; true: reset }.
uint32_t | s0[26] |
ST_PlanStatus_e | STATUS | Plan status { ST_PLAN_IDLE, ST_PLAN_INIT, ST_PLAN_BUSY, ST_PLAN_HALT, ST_PLAN_WAIT}.
int32_t | Timer_tick | State Timer { unit: [tick] }.
_iq24 | VelEnd | Velocity setpoint { unit: [pu/s], value range: [-1.0, 1.0] }.

## Macro Definition Documentation

#define __ST_PLAN_ENUM__

Definition at line 63 of file spintac_vel_plan.h.

#define __ST_PLAN_ERROR__

Definition at line 135 of file spintac_vel_plan.h.

#define ST_VEL_PLAN_ACT_DWORDS (5)

Defines the amount of memory that needs to be allocated for each component.

Each configured Action takes 3 double words of memory

Definition at line 51 of file spintac_vel_plan.h.

#define ST_VEL_PLAN_COND_DWORDS (3)

Each configured Condition takes 3 double words of memory.

Definition at line 53 of file spintac_vel_plan.h.

#define ST_VEL_PLAN_STATE_DWORDS (6)

Each configured State takes 6 double words of memory.

Definition at line 59 of file spintac_vel_plan.h.

#define ST_VEL_PLAN_TRAN_DWORDS (5)

Each configured Transition takes 5 double words of memory.

Definition at line 57 of file spintac_vel_plan.h.

#define ST_VEL_PLAN_VAR_DWORDS (2)

Each configured Variable takes 2 double words of memory.

Definition at line 55 of file spintac_vel_plan.h.

## Typedef Documentation

typedef struct _ST_VELPLAN_Handle_* ST_VELPLAN_Handle

Definition at line 169 of file spintac_vel_plan.h.

## Enumeration Type Documentation

enum ST_PlanActOptn_e

Enumeration for the Plan Action Options.

Enumerator
ST_ACT_EQ | Action will set the variable equal to a value.
ST_ACT_ADD | Action will add a value to the variable.
ST_ACT_EQ | Action will set the variable equal to a value.
ST_ACT_ADD | Action will add a value to the variable.

Definition at line 105 of file spintac_vel_plan.h.

enum ST_PlanActTrgr_e

Enumeration for the Plan Action trigger point types.

Enumerator
ST_ACT_ENTR | Action will be considered when entering the state.
ST_ACT_EXIT | Action will be considered when exiting the state.
ST_ACT_ENTR | Action will be considered when entering the state.
ST_ACT_EXIT | Action will be considered when exiting the state.

Definition at line 112 of file spintac_vel_plan.h.

enum ST_PlanComp_e

Enumeration for the Plan Compare options.

Enumerator
ST_COMP_NA | No comparison.
ST_COMP_EQ | Compares, VarIdx == Value1 OR VarIdx1 == VarIdx2.
ST_COMP_NEQ | Compares, VarIdx != Value1 OR VarIdx1 != VarIdx2.
ST_COMP_GT | Compares, VarIdx > Value1 OR VarIdx1 > VarIdx2.
ST_COMP_EGT | Compares, VarIdx >= Value1 OR VarIdx1 >= VarIdx2.
ST_COMP_LW | Compares, VarIdx < Value1 OR VarIdx1 < VarIdx2.
ST_COMP_ELW | Compares, VarIdx <= Value1 OR VarIdx1 <= VarIdx2.
ST_COMP_In | Compares, Value1 <= VarIdx <= Value2.
ST_COMP_EIn | Compares, Value1 < VarIdx <= Value2.
ST_COMP_InE | Compares, Value1 <= VarIdx < Value2.
ST_COMP_EInE | Compares, Value1 < VarIdx < Value2.
ST_COMP_Out | Compares, Value1 >= VarIdx >= Value2.
ST_COMP_EOut | Compares, Value1 > VarIdx >= Value2.
ST_COMP_OutE | Compares, Value1 >= VarIdx > Value2.
ST_COMP_EOutE | Compares, Value1 > VarIdx > Value2.
ST_COMP_NA | No comparison.
ST_COMP_EQ | Compares, VarIdx == Value1 OR VarIdx1 == VarIdx2.
ST_COMP_NEQ | Compares, VarIdx != Value1 OR VarIdx1 != VarIdx2.
ST_COMP_GT | Compares, VarIdx > Value1 OR VarIdx1 > VarIdx2.
ST_COMP_EGT | Compares, VarIdx >= Value1 OR VarIdx1 >= VarIdx2.
ST_COMP_LW | Compares, VarIdx < Value1 OR VarIdx1 < VarIdx2.
ST_COMP_ELW | Compares, VarIdx <= Value1 OR VarIdx1 <= VarIdx2.
ST_COMP_In | Compares, Value1 <= VarIdx <= Value2.
ST_COMP_EIn | Compares, Value1 < VarIdx <= Value2.
ST_COMP_InE | Compares, Value1 <= VarIdx < Value2.
ST_COMP_EInE | Compares, Value1 < VarIdx < Value2.
ST_COMP_Out | Compares, Value1 >= VarIdx >= Value2.
ST_COMP_EOut | Compares, Value1 > VarIdx >= Value2.
ST_COMP_OutE | Compares, Value1 >= VarIdx > Value2.
ST_COMP_EOutE | Compares, Value1 > VarIdx > Value2.

Definition at line 85 of file spintac_vel_plan.h.

enum ST_PlanCond_e

Enumeration for the Plan Condition options.

Enumerator
ST_COND_NC | Transition/Action with no conditions satisfied.
ST_COND_FC | Transition/Action with first condition satisfied.
ST_COND_AND | Transition/Action with both conditions satisfied.
ST_COND_OR | Transition/Action with either condition satisfied.
ST_COND_NC | Transition/Action with no conditions satisfied.
ST_COND_FC | Transition/Action with first condition satisfied.
ST_COND_AND | Transition/Action with both conditions satisfied.
ST_COND_OR | Transition/Action with either condition satisfied.

Definition at line 76 of file spintac_vel_plan.h.

enum ST_PlanFsmState_e

Enumeration for the Plan FSM states.

Enumerator
ST_FSM_STATE_STAY | Plan is staying in a state until the timer is up.
ST_FSM_STATE_COND | Plan is waiting for a transition condition to be true.
ST_FSM_STATE_TRAN | Plan is in transition with a motion profile.
ST_FSM_STATE_STAY | Plan is staying in a state until the timer is up.
ST_FSM_STATE_COND | Plan is waiting for a transition condition to be true.
ST_FSM_STATE_TRAN | Plan is in transition with a motion profile.

Definition at line 119 of file spintac_vel_plan.h.

enum ST_PlanStatus_e

Enumeration for the Plan Status States.

Enumerator
ST_PLAN_IDLE | idle state, holding position
ST_PLAN_INIT | init state, initialize internal states
ST_PLAN_BUSY | busy state, running state machine
ST_PLAN_HALT | halt state, return to the position reference in idle state
ST_PLAN_WAIT | wait state, holding the position reference in idle state
ST_PLAN_IDLE | idle state, holding velocity
ST_PLAN_INIT | init state, initialize internal states
ST_PLAN_BUSY | busy state, running state machine
ST_PLAN_HALT | halt state, return to the speed reference in idle state
ST_PLAN_WAIT | wait state, holding the speed reference in idle state

Definition at line 66 of file spintac_vel_plan.h.

enum ST_PlanVar_e

Enumeration for the Plan variable types.

Enumerator
ST_VAR_INOUT | Variable type input/output.
ST_VAR_IN | Variable type input.
ST_VAR_OUT | Variable type output.
ST_VAR_INOUT | Variable type input/output.
ST_VAR_IN | Variable type input.
ST_VAR_OUT | Variable type output.

Definition at line 127 of file spintac_vel_plan.h.

## Function Documentation

void STVELPLAN_addCfgAct | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | State,
|  | ST_PlanCond_e | AndOr,
|  | uint16_t | CondIdx1,
|  | uint16_t | CondIdx2,
|  | uint16_t | VarIdx,
|  | ST_PlanActOptn_e | Opt,
|  | _iq24 | Value,
|  | ST_PlanActTrgr_e | EnterExit
| ) |  |

Adds an action to the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | State | Index of the State the Action happens in
  [in] | AndOr | Condition option for the Action
  [in] | CondIdx1 | Index of the first Condition to consider for the Action
  [in] | CondIdx2 | Index of the second Condition to consider for the Action
  [in] | VarIdx | Index of the Varaible to be acted upon
  [in] | Opt | Type of Action to perform on the Varaible
  [in] | Value | Value to use in the Action
  [in] | EnterExit | State event that will trigger the Action

void STVELPLAN_addCfgCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | VarIdx,
|  | ST_PlanComp_e | Comp,
|  | _iq24 | Value1,
|  | _iq24 | Value2
| ) |  |

Adds a Condition to the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VarIdx | Index of the Plan Variable that will be compared
  [in] | Comp | Type of comparison that will be done
  [in] | Value1 | First value to use in the comparison
  [in] | Value2 | Second value to use in the comparison

void STVELPLAN_addCfgState | ( | ST_VELPLAN_Handle | handle,
|  | _iq24 | VelEnd,
|  | int32_t | Timer_tick
| ) |  |

Adds a State to the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VelEnd | Velocity setpoint for State { unit: [pu/s], value range: [-1.0, 1.0] }
  [in] | Timer_tick | Minimum time to stay in State { unit: [tick] }

void STVELPLAN_addCfgTran | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | FromState,
|  | uint16_t | ToState,
|  | ST_PlanCond_e | AndOr,
|  | uint16_t | CondIdx1,
|  | uint16_t | CondIdx2,
|  | _iq24 | AccLim,
|  | _iq20 | JrkLim
| ) |  |

Adds a Transition to the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | FromState | Index of the from State
  [in] | ToState | Index of the to State
  [in] | AndOr | Condition option for the Transition
  [in] | CondIdx1 | Index of the first Condition to consider for the Transition
  [in] | CondIdx2 | Index of the second Condition to consider for the Transition
  [in] | AccLim | Acceleration limit for the Transition { unit: [pu/s^2], value range: [0.001, 120.0] }
  [in] | JrkLim | Jerk limit for the Transition { unit: [pu/s^3], value range: [0.0005, 2000.0] }

void STVELPLAN_addCfgVar | ( | ST_VELPLAN_Handle | handle,
|  | ST_PlanVar_e | Type,
|  | _iq24 | Value
| ) |  |

Adds a variable to the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | Type | Type of Variable
  [in] | Value | Initial value of the Variable

void STVELPLAN_addCfgVarCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | VarIdx1,
|  | uint16_t | VarIdx2,
|  | ST_PlanComp_e | Comp
| ) |  |

Adds a Variable Condition to the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VarIdx1 | Index of the first Plan Variable that will be compared
  [in] | VarIdx2 | Index of the second Plan Variable that will be compared
  [in] | Comp | Type of comparison that will be done

void STVELPLAN_delCfgAct | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | ActIdx
| ) |  |

Deletes an action from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | ActIdx | Index of the Action to delete

void STVELPLAN_delCfgCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | CondIdx
| ) |  |

Deletes a Condition from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | CondIdx | Index of the Plan Condition to delete

void STVELPLAN_delCfgState | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | StateIdx
| ) |  |

Deletes a state from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | StateIdx | Index of the State to delete

void STVELPLAN_delCfgTran | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | TranIdx
| ) |  |

Deletes a Transition from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | TranIdx | Index of the Transition to delete

void STVELPLAN_delCfgVar | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | VarIdx
| ) |  |

Deletes a Variable from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VarIdx | Index of the Variable to delete

void STVELPLAN_delCfgVarCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | CondIdx
| ) |  |

Deletes a Variable Condition from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | CondIdx | Index of the Plan Condition to delete

static _iq24 STVELPLAN_getAccelerationLimit | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Acceleration Limit (AccLim) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  _iq24 AccLim Acceleration limit { unit: [pu/s^2], value range: [0.001, 120.0] }

Definition at line 183 of file spintac_vel_plan.h.

References ST_VelPlan_t::AccLim.

void STVELPLAN_getCfg | ( | ST_VELPLAN_Handle | handle,
|  | _iq24 * | T_sec,
|  | bool * | LoopENB
| ) |  |

Gets the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | handle The handle for the SpinTAC Velocity Plan Object
  [out] | *T | Sample Time { unit: [sec], value range: (0, 0.01] }
  [out] | *LoopENB | Sets if SpinTAC Velocity Plan should continuously run after it reaches the end { false: Do not continuously run Plan; true: Continuously run Plan }

void STVELPLAN_getCfgAct | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | ActIdx,
|  | uint16_t * | State,
|  | ST_PlanCond_e * | AndOr,
|  | uint16_t * | CondIdx1,
|  | uint16_t * | CondIdx2,
|  | uint16_t * | VarIdx,
|  | ST_PlanActOptn_e * | Opt,
|  | _iq24 * | Value,
|  | ST_PlanActTrgr_e * | EnterExit
| ) |  |

Returns an action from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | ActIdx | Index of the Action to modify
  [out] | *State | Index of the State the Action happens in
  [out] | *AndOr | Condition option for the Action
  [out] | *CondIdx1 | Index of the first Condition to consider for the Action
  [out] | *CondIdx2 | Index of the second Condition to consider for the Action
  [out] | *VarIdx | Index of the Varaible to be acted upon
  [out] | *Opt | Type of Action to perform on the Varaible
  [out] | *Value | Value to use in the Action
  [out] | *EnterExit | State event that will trigger the Action

void STVELPLAN_getCfgActNum | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t * | ActNum
| ) |  |

Returns the number of configured Actions in SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [out] | *ActNum | The number of configured Actions in SpinTAC Velocity Plan

void STVELPLAN_getCfgCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | CondIdx,
|  | uint16_t * | VarIdx,
|  | ST_PlanComp_e * | Comp,
|  | _iq24 * | Value1,
|  | _iq24 * | Value2
| ) |  |

Returns a Condition from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | CondIdx | Index of the Plan Condition to return
  [out] | *VarIdx | Index of the Plan Variable that will be compared
  [out] | *Comp | Type of comparison that will be done
  [out] | *Value1 | First value to use in the comparison
  [out] | *Value2 | Second value to use in the comparison

void STVELPLAN_getCfgCondNum | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t * | CondNum
| ) |  |

Returns the number of configured Conditions in SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [out] | *CondNum | The number of configured Conditions in SpinTAC Velocity Plan

static uint16_t STVELPLAN_getCfgError | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t * | ERR_idx,
|  | uint16_t * | ERR_code
| ) |  |
| inline static

Gets the Configuration Error for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [out] | *ERR_idx | Component index where error occurred { 0: no index; others: see error code }
  [out] | *ERR_code | Specific configuration error { 0: no additional information; others: see error code }

Returns
  uint16_t ERR_ID Error ID { 0: no error; others: see error code }

Definition at line 289 of file spintac_vel_plan.h.

References ST_VelPlan_t::CfgError, ST_PlanError_t::ERR_code, ST_VelPlan_t::ERR_ID, and ST_PlanError_t::ERR_idx.

void STVELPLAN_getCfgHaltState | ( | ST_VELPLAN_Handle | handle,
|  | _iq24 * | VelEnd,
|  | _iq24 * | AccLim,
|  | _iq20 * | JrkLim,
|  | int32_t * | Timer_tick
| ) |  |

Gets the SpinTAC Velocity Plan Halt state configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [out] | *VelEnd | Velocity setpoint during Halt state { unit: [pu/s], value range: [-1.0, 1.0] }
  [out] | *AccLim | Acceleration limit for Halt state { unit: [pu/s^2], value range: [0.001, 120.0] }
  [out] | *JrkLim | Jerk limit for Halt state { unit: [pu/s^3], value range: [0.0005, 2000.0] }
  [out] | *Timer_tick | Minimum amount of time to stay in Halt state { unit: [tick] }

void STVELPLAN_getCfgState | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | StateIdx,
|  | _iq24 * | VelEnd,
|  | int32_t * | Timer_tick
| ) |  |

Returns a state from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | StateIdx | Index of the State to modify
  [out] | *VelEnd | Velocity setpoint for State { unit: [pu/s], value range: [-1.0, 1.0] }
  [out] | *Timer_tick | Minimum time to stay in State { unit: [tick] }

void STVELPLAN_getCfgStateNum | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t * | StateNum
| ) |  |

Returns the number of configured States in SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [out] | *StateNum | The number of configured States in SpinTAC Velocity Plan

void STVELPLAN_getCfgTran | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | TranIdx,
|  | uint16_t * | FromState,
|  | uint16_t * | ToState,
|  | ST_PlanCond_e * | AndOr,
|  | uint16_t * | CondIdx1,
|  | uint16_t * | CondIdx2,
|  | _iq24 * | AccLim,
|  | _iq20 * | JrkLim
| ) |  |

Return a Transition from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | TranIdx | Index of the Transition to modify
  [out] | *FromState | Index of the from State
  [out] | *ToState | Index of the to State
  [out] | *AndOr | Condition option for the Transition
  [out] | *CondIdx1 | Index of the first Condition to consider for the Transition
  [out] | *CondIdx2 | Index of the second Condition to consider for the Transition
  [out] | *AccLim | Acceleration limit for the Transition { unit: [pu/s^2], value range: [0.001, 120.0] }
  [out] | *JrkLim | Jerk limit for the Transition { unit: [pu/s^3], value range: [0.0005, 2000.0] }

void STVELPLAN_getCfgTranNum | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t * | TranNum
| ) |  |

Returns the number of configured Transitions in SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [out] | *TranNum | The number of configured Transitions in SpinTAC Velocity Plan

void STVELPLAN_getCfgVar | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | VarIdx,
|  | ST_PlanVar_e * | Type,
|  | _iq24 * | Value
| ) |  |

Returns a variable from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VarIdx | Index of the Variable to return
  [out] | *Type | Type of Variable
  [out] | *Value | Initial value of the Variable

void STVELPLAN_getCfgVarCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | CondIdx,
|  | uint16_t * | VarIdx1,
|  | uint16_t * | VarIdx2,
|  | ST_PlanComp_e * | Comp
| ) |  |

Returns a Variable Condition from the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | CondIdx | Index of the Plan Condition to return
  [out] | *VarIdx1 | Index of the first Plan Variable that will be compared
  [out] | *VarIdx2 | Index of the second Plan Variable that will be compared
  [out] | *Comp | Type of comparison that will be done

void STVELPLAN_getCfgVarNum | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t * | VarNum
| ) |  |

Returns the number of configured Variables in SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [out] | *VarNum | The number of configured Variables in SpinTAC Velocity Plan

static uint16_t STVELPLAN_getCurrentState | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Current State (CurState) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  uint16_t CurState Current state of the state machine

Definition at line 251 of file spintac_vel_plan.h.

References ST_VelPlan_t::CurState.

static int32_t STVELPLAN_getCurrentTimerValue_tick | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Current Time Value (Timer_tick) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  int32_t Timer_tick State Timer { unit: [tick] }

Definition at line 278 of file spintac_vel_plan.h.

References ST_VelPlan_t::Timer_tick.

static uint16_t STVELPLAN_getCurrentTransition | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Current Transition (CurTran) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  uint16_t CurTran Current transition of the state machine

Definition at line 260 of file spintac_vel_plan.h.

References ST_VelPlan_t::CurTran.

static bool STVELPLAN_getEnable | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Enable signal (ENB) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  bool ENB Enable bit { false: disable; true: enable }

Definition at line 212 of file spintac_vel_plan.h.

References ST_VelPlan_t::ENB.

static uint16_t STVELPLAN_getErrorID | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Error ID for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  uint16_t ERR_ID Error ID { 0: no error; others: see error code }

Definition at line 301 of file spintac_vel_plan.h.

References ST_VelPlan_t::ERR_ID.

static ST_PlanFsmState_e STVELPLAN_getFsmState | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the State Machine State (FsmState) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  ST_PlanFsmState_e FsmState Current operation of the state machine

Definition at line 269 of file spintac_vel_plan.h.

References ST_VelPlan_t::FsmState.

static _iq20 STVELPLAN_getJerkLimit | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Jerk Limit (JrkLim) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  _iq20 JrkLim Jerk Limit { unit: [pu/s^3], value range: [0.0005, 2000.0] }

Definition at line 192 of file spintac_vel_plan.h.

References ST_VelPlan_t::JrkLim.

static bool STVELPLAN_getReset | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Reset signal (RES) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  bool RES Reset bit { false: reset; true: not reset }

Definition at line 232 of file spintac_vel_plan.h.

References ST_VelPlan_t::RES.

static ST_PlanStatus_e STVELPLAN_getStatus | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Status value (STATUS) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  ST_PlanStatus_e STATUS Status { ST_VEL_ID_IDLE, ST_VEL_ID_INIT, ST_VEL_ID_BUSY }

Definition at line 241 of file spintac_vel_plan.h.

References ST_VelPlan_t::STATUS.

void STVELPLAN_getVar | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | VarIdx,
|  | _iq24 * | Value
| ) |  |

Gets the value of a SpinTAC Velocity Plan variable.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VarIdx | Index of the Variable to get
  [out] | *Value | Value to get from the Variable

static _iq24 STVELPLAN_getVelocitySetpoint | ( | ST_VELPLAN_Handle | handle | ) |
| inline static

Gets the Velocity Setpoint (VelEnd) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

Returns
  _iq24 VelEnd Velocity setpoint { unit: [pu/s], value range: [-1.0, 1.0] }

Definition at line 174 of file spintac_vel_plan.h.

References ST_VelPlan_t::VelEnd.

ST_VELPLAN_Handle STVELPLAN_init | ( | void * | pMemory,
|  | const size_t | numBytes
| ) |  |

Initializes the SpinTAC Velocity Plan component.

Parameters

  [in] | *pMemory | Pointer to the memory for ST_VelPlan_t
  [in] | numBytes | The number of bytes in the ST_VelPlan_t

Returns
  ST_VELPLAN_Handle handle The handle for the SpinTAC Velocity Plan Object

void STVELPLAN_reset | ( | ST_VELPLAN_Handle | handle | ) |

Resets the Velocity Plan component.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

void STVELPLAN_run | ( | ST_VELPLAN_Handle | handle | ) |

Runs SpinTAC Velocity Plan calculation.

Parameters

  [in] | handle | The handle for the Velocity Plan structure

void STVELPLAN_runTick | ( | ST_VELPLAN_Handle | handle | ) |

Updates the SpinTAC Velocity Plan Timer.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object

void STVELPLAN_setCfg | ( | ST_VELPLAN_Handle | handle,
|  | _iq24 | T_sec,
|  | bool | LoopENB
| ) |  |

Configures SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | T | Sample Time { unit: [sec], value range: (0, 0.01] }
  [in] | LoopENB | Sets if SpinTAC Velocity Plan should continuously run after it reaches the end { false: Do not continuously run Plan; true: Continuously run Plan }

void STVELPLAN_setCfgAct | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | ActIdx,
|  | uint16_t | State,
|  | ST_PlanCond_e | AndOr,
|  | uint16_t | CondIdx1,
|  | uint16_t | CondIdx2,
|  | uint16_t | VarIdx,
|  | ST_PlanActOptn_e | Opt,
|  | _iq24 | Value,
|  | ST_PlanActTrgr_e | EnterExit
| ) |  |

Modifies an action in the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | ActIdx | Index of the Action to modify
  [in] | State | Index of the State the Action happens in
  [in] | AndOr | Condition option for the Action
  [in] | CondIdx1 | Index of the first Condition to consider for the Action
  [in] | CondIdx2 | Index of the second Condition to consider for the Action
  [in] | VarIdx | Index of the Varaible to be acted upon
  [in] | Opt | Type of Action to perform on the Varaible
  [in] | Value | Value to use in the Action
  [in] | EnterExit | State event that will trigger the Action

void STVELPLAN_setCfgArray | ( | ST_VELPLAN_Handle | handle,
|  | uint32_t * | cfgArray,
|  | const size_t | numBytes,
|  | uint16_t | MaxActNum,
|  | uint16_t | MaxCondNum,
|  | uint16_t | MaxVarNum,
|  | uint16_t | MaxTranNum,
|  | uint16_t | MaxStateNum
| ) |  |

Prepares SpinTAC Velocity Plan configuration array.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | *cfgArray | Pointer to the SpinTAC Velocity Plan configuration array
  [in] | numBytes | The number of bytes in the SpinTAC Velocity Plan configuration array
  [in] | MaxActNum | Number of Actions
  [in] | MaxCondNum | Number of Conditions
  [in] | MaxVarNum | Number of Variables
  [in] | MaxTranNum | Number of Transitions
  [in] | MaxStateNum | Number of States

void STVELPLAN_setCfgCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | CondIdx,
|  | uint16_t | VarIdx,
|  | ST_PlanComp_e | Comp,
|  | _iq24 | Value1,
|  | _iq24 | Value2
| ) |  |

Modifies a Condition in the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | CondIdx | Index of the Plan Condition to modify
  [in] | VarIdx | Index of the Plan Variable that will be compared
  [in] | Comp | Type of comparison that will be done
  [in] | Value1 | First value to use in the comparison
  [in] | Value2 | Second value to use in the comparison

void STVELPLAN_setCfgHaltState | ( | ST_VELPLAN_Handle | handle,
|  | _iq24 | VelEnd,
|  | _iq24 | AccLim,
|  | _iq20 | JrkLim,
|  | int32_t | Timer_tick
| ) |  |

Configures the SpinTAC Velocity Plan Halt state.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VelEnd | Velocity setpoint during Halt state { unit: [pu/s], value range: [-1.0, 1.0] }
  [in] | AccLim | Acceleration limit for Halt state { unit: [pu/s^2], value range: [0.001, 120.0] }
  [in] | JrkLim | Jerk limit for Halt state { unit: [pu/s^3], value range: [0.0005, 2000.0] }
  [in] | Timer_tick | Minimum amount of time to stay in Halt state { unit: [tick] }

void STVELPLAN_setCfgState | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | StateIdx,
|  | _iq24 | VelEnd,
|  | int32_t | Timer_tick
| ) |  |

Modifies a state in the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | StateIdx | Index of the State to modify
  [in] | VelEnd | Velocity setpoint for State { unit: [pu/s], value range: [-1.0, 1.0] }
  [in] | Timer_tick | Minimum time to stay in State { unit: [tick] }

void STVELPLAN_setCfgTran | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | TranIdx,
|  | uint16_t | FromState,
|  | uint16_t | ToState,
|  | ST_PlanCond_e | AndOr,
|  | uint16_t | CondIdx1,
|  | uint16_t | CondIdx2,
|  | _iq24 | AccLim,
|  | _iq20 | JrkLim
| ) |  |

Modifies a Transition in the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | TranIdx | Index of the Transition to modify
  [in] | FromState | Index of the from State
  [in] | ToState | Index of the to State
  [in] | AndOr | Condition option for the Transition
  [in] | CondIdx1 | Index of the first Condition to consider for the Transition
  [in] | CondIdx2 | Index of the second Condition to consider for the Transition
  [in] | AccLim | Acceleration limit for the Transition { unit: [pu/s^2], value range: [0.001, 120.0] }
  [in] | JrkLim | Jerk limit for the Transition { unit: [pu/s^3], value range: [0.0005, 2000.0] }

void STVELPLAN_setCfgVar | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | VarIdx,
|  | ST_PlanVar_e | Type,
|  | _iq24 | Value
| ) |  |

Modifies a variable in the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VarIdx | Index of the Variable to modify
  [in] | Type | Type of Variable
  [in] | Value | Initial value of the Variable

void STVELPLAN_setCfgVarCond | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | CondIdx,
|  | uint16_t | VarIdx1,
|  | uint16_t | VarIdx2,
|  | ST_PlanComp_e | Comp
| ) |  |

Modifies a Varaible Condition to the SpinTAC Velocity Plan configuration.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | CondIdx | Index of the Plan Condition to modify
  [in] | VarIdx1 | Index of the first Plan Variable that will be compared
  [in] | VarIdx2 | Index of the second Plan Variable that will be compared
  [in] | Comp | Type of comparison that will be done

static void STVELPLAN_setEnable | ( | ST_VELPLAN_Handle | handle,
|  | bool | enb
| ) |  |
| inline static

Sets the Enable signal (ENB) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | enb | Enable bit { false: disable; true: enable }

Definition at line 201 of file spintac_vel_plan.h.

References ST_VelPlan_t::ENB.

static void STVELPLAN_setReset | ( | ST_VELPLAN_Handle | handle,
|  | bool | res
| ) |  |
| inline static

Sets the Reset signal (RES) for SpinTAC Velocity Plan.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | res | Reset bit { false: reset; true: not reset }

Definition at line 221 of file spintac_vel_plan.h.

References ST_VelPlan_t::RES.

void STVELPLAN_setUnitProfDone | ( | ST_VELPLAN_Handle | handle,
|  | bool | ProDON
| ) |  |

Sets a flag in SpinTAC Velocity Plan to indicate if the unit profile is complete.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | ProDON | Indicates if the unit profile is completed

void STVELPLAN_setVar | ( | ST_VELPLAN_Handle | handle,
|  | uint16_t | VarIdx,
|  | _iq24 | Value
| ) |  |

Sets the value of a SpinTAC Velocity Plan variable.

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Plan Object
  [in] | VarIdx | Index of the Variable to set
  [in] | Value | Value to set to the Variable