1 #ifndef __SPINTAC_POS_CTL_H__
2 #define __SPINTAC_POS_CTL_H__
49 #ifndef __ST_AXIS_ENUM__
50 #define __ST_AXIS_ENUM__
58 #endif //__ST_AXIS_ENUM__
60 #ifndef __ST_CTL_STATUS_ENUM__
61 #define __ST_CTL_STATUS_ENUM__
71 #endif //__ST_CTL_STATUS_ENUM__
440 #endif //__SPINTAC_POS_CTL_H__
static _iq20 STPOSCTL_getBandwidth_radps(ST_POSCTL_Handle handle)
Gets the Bandwidth (Bw_radps) for SpinTAC Position Controller.
_iq24 Inertia
System inertia { unit: [PU/(pu/s^2)], value range: positive _IQ24 value }.
_iq24 PosErr_mrev
Position error { unit: [MRev] }.
_iq24 AccRef
Acceleration reference { unit: [pu/s^2] }.
ST_CtlStatus_e
Enumeration for the Control Status states.
static void STPOSCTL_setRampDisturbanceFlag(ST_POSCTL_Handle handle, bool rampDist)
Sets the Ramp Disturbance Flag (cfg.RampDist) for SpinTAC Position Controller.
_iq24 PosFdb_mrev
Position feedback { Unit: [MRev], value range: [-ROMax, ROMax) }.
static void STPOSCTL_setPositionReference_mrev(ST_POSCTL_Handle handle, _iq24 posRef)
Sets the Position Reference (PosRef_mrev) for SpinTAC Position Controller.
void STPOSCTL_run(ST_POSCTL_Handle handle)
Runs the SpinTAC Position Control Function.
Defines the ST_PosCtlCfg_t data.
static void STPOSCTL_setAccelerationReference(ST_POSCTL_Handle handle, _iq24 accRef)
Sets the Acceleration Reference (AccRef) for SpinTAC Position Controller.
_iq24 PosRef_mrev
Position reference { unit: [MRev], value range: [-ROMax, ROMax] }.
ST_Axis_e Axis
Axis ID { ST_AXIS0: axis 0, ST_AXIS1: axis 1}.
_iq24 PosErrMax_mrev
Maximum allowable position error { unit: [MRev], value range (0, ROMax_mrev/2] }. ...
static void STPOSCTL_setSampleTime_sec(ST_POSCTL_Handle handle, _iq24 sampleTime)
Sets the Sample Time (cfg.T_sec) for SpinTAC Position Controller.
static uint16_t STPOSCTL_getErrorID(ST_POSCTL_Handle handle)
Gets the Error value (ERR_ID) for SpinTAC Position Controller.
_iq20 Bw_radps
Controller Bandwidth { unit: [rad/s], value range: [0.01, 1000.0] }.
static ST_CtlStatus_e STPOSCTL_getStatus(ST_POSCTL_Handle handle)
Gets the Status value (STATUS) for SpinTAC Position Controller.
static void STPOSCTL_setPositionRolloverMaximum_mrev(ST_POSCTL_Handle handle, _iq24 roMax)
Sets the Position Rollover Maximum (cfg.ROMax_mrev) for SpinTAC Position Controller.
_iq24 mrev_TO_pu
Conversion ratio from mechanical revolution to pu { value range: [0.002, 1]) }.
_iq24 T_sec
Sample time { unit: [s], value range: (0, 0.01] }.
static _iq24 STPOSCTL_getTorqueReference(ST_POSCTL_Handle handle)
Gets the Torque (Iq) Reference (Out) for SpinTAC Position Controller.
static bool STPOSCTL_getEnable(ST_POSCTL_Handle handle)
Gets the Enable signal (ENB) for SpinTAC Position Controller.
ST_POSCTL_Handle STPOSCTL_init(void *pMemory, const size_t numBytes)
Initializes the SpinTAC Position Controller object.
bool ENB
Enable bit { false: disable; true: enable }.
static void STPOSCTL_setInertia(ST_POSCTL_Handle handle, _iq24 inertia)
Sets the Inertia (Inertia) for SpinTAC Position Controller.
static void STPOSCTL_setBandwidth_radps(ST_POSCTL_Handle handle, _iq20 bw)
Sets the Bandwidth (Bw_radps) for SpinTAC Position Controller.
Defines the ST_PosCtl_t data.
_iq24 VelMax
Velocity reference signal upper limit { unit: [pu/s], Value range: (0, 1] }.
static _iq24 STPOSCTL_getInertia(ST_POSCTL_Handle handle)
Gets the Inertia (Inertia) for SpinTAC Position Controller.
static void STPOSCTL_setPositionFeedback_mrev(ST_POSCTL_Handle handle, _iq24 posFdb)
Sets the Position Feedback (PosFdb_mrev) for SpinTAC Position Controller.
ST_Axis_e
Enumeration for the Axis Status states.
Public interface, object, and function definitions related to the SpinTAC Version object...
static void STPOSCTL_setOutputMaximums(ST_POSCTL_Handle handle, _iq24 outMax, _iq24 outMin)
Sets the Maximum Output (cfg.OutMax) and Minimum Output (cfg.OutMin) for SpinTAC Position Controller...
ST_CtlStatus_e STATUS
Status { ST_CTL_IDLE, ST_CTL_INIT, ST_CTL_CONF, ST_CTL_BUSY }.
static _iq24 STPOSCTL_getOutputMinimum(ST_POSCTL_Handle handle)
Gets the Minimum Output (cfg.OutMin) for SpinTAC Position Controller.
bool FiltEN
Enable low-pass Filter { false: Filter Disabled; true: Filter Enabled }.
_iq24 OutMin
Control signal lower limit { unit: [PU], value range: [-1, OutMax) }.
static void STPOSCTL_setFilterEnableFlag(ST_POSCTL_Handle handle, bool filterEnable)
Sets the Feedback Filter Enable Flag (cfg.FiltEN) for SpinTAC Position Controller.
static void STPOSCTL_setEnable(ST_POSCTL_Handle handle, bool enb)
Sets the Enable signal (ENB) for SpinTAC Position Controller.
static void STPOSCTL_setUnitConversion(ST_POSCTL_Handle handle, float_t baseFreq, uint16_t polePairs)
Sets the Unit Conversion (cfg.mrev_TO_pu) for SpinTAC Position Controller.
_iq24 Friction
Friction Coefficient { unit: [PU/(pu/s)], value range: positive _IQ24 value }.
static void STPOSCTL_setPositionErrorMaximum_mrev(ST_POSCTL_Handle handle, _iq24 errMax)
Sets the Position Error Maximum (cfg.PosErrMax_mrev) for SpinTAC Position Controller.
bool RampDist
Disturbance type { false: Step Disturbance, true: Ramp Disturbance }.
static _iq24 STPOSCTL_getFriction(ST_POSCTL_Handle handle)
Gets the Friction (Friction) for SpinTAC Position Controller.
static void STPOSCTL_setTorqueReference(ST_POSCTL_Handle handle, _iq24 out)
Sets the Torque (Iq) Reference (Out) for SpinTAC Position Controller.
uint16_t ERR_ID
Error ID { 0: no error; others: see error code }.
_iq24 Out
Control output { unit: [PU] }.
static _iq24 STPOSCTL_getOutputMaximum(ST_POSCTL_Handle handle)
Gets the Maximum Output (cfg.OutMax) for SpinTAC Position Controller.
struct _ST_POSCTL_Handle_ * ST_POSCTL_Handle
_iq24 VelRef
Velocity reference { unit: [pu/s] }.
static void STPOSCTL_setVelocityReference(ST_POSCTL_Handle handle, _iq24 velRef)
Sets the Velocity Reference (VelRef) for SpinTAC Position Controller.
static _iq24 STPOSCTL_getPositionError_mrev(ST_POSCTL_Handle handle)
Gets the Position Error (PosErr_mrev) for SpinTAC Position Controller.
static void STPOSCTL_setVelocityMaximum(ST_POSCTL_Handle handle, _iq24 velMax)
Sets the Maximum Velocity (cfg.VelMax) for SpinTAC Position Controller.
static void STPOSCTL_setAxis(ST_POSCTL_Handle handle, ST_Axis_e axis)
Sets the Axis (cfg.Axis) for SpinTAC Position Controller.
_iq24 OutMax
Control signal upper limit { unit: [PU], value range: (-1, 1] }.
static void STPOSCTL_setFriction(ST_POSCTL_Handle handle, _iq24 friction)
Sets the Friction (Friction) for SpinTAC Position Controller.
_iq24 ROMax_mrev
Position Rollover bound { unit: [MRev], value range: [2, 100] }.
float float_t
Defines the portable data type for 32 bit, signed floating-point data.