|
MotorWare f2806x Module API Documentation
|
Data Structures | |
| struct | ST_PosCtlCfg_t |
| Defines the ST_PosCtlCfg_t data. More... | |
| struct | ST_PosCtl_t |
| Defines the ST_PosCtl_t data. More... | |
Macros | |
| #define | __ST_AXIS_ENUM__ |
| #define | __ST_CTL_STATUS_ENUM__ |
Typedefs | |
| typedef struct _ST_POSCTL_Handle_ * | ST_POSCTL_Handle |
Enumerations | |
| enum | ST_Axis_e { ST_AXIS0 =0, ST_AXIS1, ST_AXIS0 =0, ST_AXIS1, ST_AXIS0 =0, ST_AXIS1, ST_AXIS0 =0, ST_AXIS1 } |
| Enumeration for the Axis Status states. More... | |
| enum | ST_CtlStatus_e { ST_CTL_IDLE =0, ST_CTL_INIT, ST_CTL_CONF, ST_CTL_BUSY, ST_CTL_IDLE =0, ST_CTL_INIT, ST_CTL_CONF, ST_CTL_BUSY } |
| Enumeration for the Control Status states. More... | |
Functions | |
| static void | STPOSCTL_setAxis (ST_POSCTL_Handle handle, ST_Axis_e axis) |
| Sets the Axis (cfg.Axis) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setSampleTime_sec (ST_POSCTL_Handle handle, _iq24 sampleTime) |
| Sets the Sample Time (cfg.T_sec) for SpinTAC Position Controller. More... | |
| static _iq24 | STPOSCTL_getOutputMaximum (ST_POSCTL_Handle handle) |
| Gets the Maximum Output (cfg.OutMax) for SpinTAC Position Controller. More... | |
| static _iq24 | STPOSCTL_getOutputMinimum (ST_POSCTL_Handle handle) |
| Gets the Minimum Output (cfg.OutMin) for SpinTAC Position Controller. More... | |
| 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. More... | |
| static void | STPOSCTL_setVelocityMaximum (ST_POSCTL_Handle handle, _iq24 velMax) |
| Sets the Maximum Velocity (cfg.VelMax) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setPositionRolloverMaximum_mrev (ST_POSCTL_Handle handle, _iq24 roMax) |
| Sets the Position Rollover Maximum (cfg.ROMax_mrev) for SpinTAC Position Controller. More... | |
| 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. More... | |
| static void | STPOSCTL_setRampDisturbanceFlag (ST_POSCTL_Handle handle, bool rampDist) |
| Sets the Ramp Disturbance Flag (cfg.RampDist) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setPositionErrorMaximum_mrev (ST_POSCTL_Handle handle, _iq24 errMax) |
| Sets the Position Error Maximum (cfg.PosErrMax_mrev) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setFilterEnableFlag (ST_POSCTL_Handle handle, bool filterEnable) |
| Sets the Feedback Filter Enable Flag (cfg.FiltEN) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setPositionReference_mrev (ST_POSCTL_Handle handle, _iq24 posRef) |
| Sets the Position Reference (PosRef_mrev) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setVelocityReference (ST_POSCTL_Handle handle, _iq24 velRef) |
| Sets the Velocity Reference (VelRef) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setAccelerationReference (ST_POSCTL_Handle handle, _iq24 accRef) |
| Sets the Acceleration Reference (AccRef) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setPositionFeedback_mrev (ST_POSCTL_Handle handle, _iq24 posFdb) |
| Sets the Position Feedback (PosFdb_mrev) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setInertia (ST_POSCTL_Handle handle, _iq24 inertia) |
| Sets the Inertia (Inertia) for SpinTAC Position Controller. More... | |
| static _iq24 | STPOSCTL_getInertia (ST_POSCTL_Handle handle) |
| Gets the Inertia (Inertia) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setFriction (ST_POSCTL_Handle handle, _iq24 friction) |
| Sets the Friction (Friction) for SpinTAC Position Controller. More... | |
| static _iq24 | STPOSCTL_getFriction (ST_POSCTL_Handle handle) |
| Gets the Friction (Friction) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setBandwidth_radps (ST_POSCTL_Handle handle, _iq20 bw) |
| Sets the Bandwidth (Bw_radps) for SpinTAC Position Controller. More... | |
| static _iq20 | STPOSCTL_getBandwidth_radps (ST_POSCTL_Handle handle) |
| Gets the Bandwidth (Bw_radps) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setEnable (ST_POSCTL_Handle handle, bool enb) |
| Sets the Enable signal (ENB) for SpinTAC Position Controller. More... | |
| static bool | STPOSCTL_getEnable (ST_POSCTL_Handle handle) |
| Gets the Enable signal (ENB) for SpinTAC Position Controller. More... | |
| static void | STPOSCTL_setTorqueReference (ST_POSCTL_Handle handle, _iq24 out) |
| Sets the Torque (Iq) Reference (Out) for SpinTAC Position Controller. More... | |
| static _iq24 | STPOSCTL_getTorqueReference (ST_POSCTL_Handle handle) |
| Gets the Torque (Iq) Reference (Out) for SpinTAC Position Controller. More... | |
| static ST_CtlStatus_e | STPOSCTL_getStatus (ST_POSCTL_Handle handle) |
| Gets the Status value (STATUS) for SpinTAC Position Controller. More... | |
| static uint16_t | STPOSCTL_getErrorID (ST_POSCTL_Handle handle) |
| Gets the Error value (ERR_ID) for SpinTAC Position Controller. More... | |
| static _iq24 | STPOSCTL_getPositionError_mrev (ST_POSCTL_Handle handle) |
| Gets the Position Error (PosErr_mrev) for SpinTAC Position Controller. More... | |
| ST_POSCTL_Handle | STPOSCTL_init (void *pMemory, const size_t numBytes) |
| Initializes the SpinTAC Position Controller object. More... | |
| void | STPOSCTL_run (ST_POSCTL_Handle handle) |
| Runs the SpinTAC Position Control Function. More... | |
| struct ST_PosCtlCfg_t |
Defines the ST_PosCtlCfg_t data.
The ST_PosCtlCfg_t object contains all configuration parameters of the Position Control component.
Definition at line 76 of file spintac_pos_ctl.h.
| Data Fields | ||
|---|---|---|
| ST_Axis_e | Axis | Axis ID { ST_AXIS0: axis 0, ST_AXIS1: axis 1}. |
| bool | FiltEN | Enable low-pass Filter { false: Filter Disabled; true: Filter Enabled }. |
| _iq24 | mrev_TO_pu | Conversion ratio from mechanical revolution to pu { value range: [0.002, 1]) }. |
| _iq24 | OutMax | Control signal upper limit { unit: [PU], value range: (-1, 1] }. |
| _iq24 | OutMin | Control signal lower limit { unit: [PU], value range: [-1, OutMax) }. |
| _iq24 | PosErrMax_mrev | Maximum allowable position error { unit: [MRev], value range (0, ROMax_mrev/2] }. |
| bool | RampDist | Disturbance type { false: Step Disturbance, true: Ramp Disturbance }. |
| _iq24 | ROMax_mrev | Position Rollover bound { unit: [MRev], value range: [2, 100] }. |
| _iq24 | T_sec | Sample time { unit: [s], value range: (0, 0.01] }. |
| _iq24 | VelMax | Velocity reference signal upper limit { unit: [pu/s], Value range: (0, 1] }. |
| struct ST_PosCtl_t |
Defines the ST_PosCtl_t data.
The ST_PosCtl_t object contains all parameters needed to perform Position Control
Definition at line 95 of file spintac_pos_ctl.h.
| Data Fields | ||
|---|---|---|
| _iq24 | AccRef | Acceleration reference { unit: [pu/s^2] }. |
| _iq20 | Bw_radps | Controller Bandwidth { unit: [rad/s], value range: [0.01, 1000.0] }. |
| ST_PosCtlCfg_t | cfg | |
| bool | ENB | Enable bit { false: disable; true: enable }. |
| uint16_t | ERR_ID | Error ID { 0: no error; others: see error code }. |
| _iq24 | Friction | Friction Coefficient { unit: [PU/(pu/s)], value range: positive _IQ24 value }. |
| _iq24 | Inertia | System inertia { unit: [PU/(pu/s^2)], value range: positive _IQ24 value }. |
| _iq24 | Out | Control output { unit: [PU] }. |
| _iq24 | PosErr_mrev | Position error { unit: [MRev] }. |
| _iq24 | PosFdb_mrev | Position feedback { Unit: [MRev], value range: [-ROMax, ROMax) }. |
| _iq24 | PosRef_mrev | Position reference { unit: [MRev], value range: [-ROMax, ROMax] }. |
| uint32_t | s1[18] | |
| ST_CtlStatus_e | STATUS | Status { ST_CTL_IDLE, ST_CTL_INIT, ST_CTL_CONF, ST_CTL_BUSY }. |
| _iq24 | VelRef | Velocity reference { unit: [pu/s] }. |
| #define __ST_AXIS_ENUM__ |
Definition at line 50 of file spintac_pos_ctl.h.
| #define __ST_CTL_STATUS_ENUM__ |
Definition at line 61 of file spintac_pos_ctl.h.
| typedef struct _ST_POSCTL_Handle_* ST_POSCTL_Handle |
Definition at line 118 of file spintac_pos_ctl.h.
| enum ST_Axis_e |
Enumeration for the Axis Status states.
| Enumerator | |
|---|---|
| ST_AXIS0 |
First Axis. |
| ST_AXIS1 |
Second Axis. |
| ST_AXIS0 |
First Axis. |
| ST_AXIS1 |
Second Axis. |
| ST_AXIS0 |
First Axis. |
| ST_AXIS1 |
Second Axis. |
| ST_AXIS0 |
First Axis. |
| ST_AXIS1 |
Second Axis. |
Definition at line 53 of file spintac_pos_ctl.h.
| enum ST_CtlStatus_e |
Enumeration for the Control Status states.
Definition at line 64 of file spintac_pos_ctl.h.
|
inlinestatic |
Gets the Bandwidth (Bw_radps) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 353 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Bw_radps.
|
inlinestatic |
Gets the Enable signal (ENB) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 373 of file spintac_pos_ctl.h.
References ST_PosCtl_t::ENB.
|
inlinestatic |
Gets the Error value (ERR_ID) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 413 of file spintac_pos_ctl.h.
References ST_PosCtl_t::ERR_ID.
|
inlinestatic |
Gets the Friction (Friction) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 333 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Friction.
|
inlinestatic |
Gets the Inertia (Inertia) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 313 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Inertia.
|
inlinestatic |
Gets the Maximum Output (cfg.OutMax) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 149 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, and ST_PosCtlCfg_t::OutMax.
|
inlinestatic |
Gets the Minimum Output (cfg.OutMin) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 158 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, and ST_PosCtlCfg_t::OutMin.
|
inlinestatic |
Gets the Position Error (PosErr_mrev) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 423 of file spintac_pos_ctl.h.
References ST_PosCtl_t::PosErr_mrev.
|
inlinestatic |
Gets the Status value (STATUS) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 403 of file spintac_pos_ctl.h.
References ST_PosCtl_t::STATUS.
|
inlinestatic |
Gets the Torque (Iq) Reference (Out) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
Definition at line 393 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Out.
| ST_POSCTL_Handle STPOSCTL_init | ( | void * | pMemory, |
| const size_t | numBytes | ||
| ) |
Initializes the SpinTAC Position Controller object.
| [in] | *pMemory | Pointer to the memory for ST_PosCtl_t |
| [in] | numBytes | The number of bytes in the ST_PosCtl_t |
| void STPOSCTL_run | ( | ST_POSCTL_Handle | handle | ) |
Runs the SpinTAC Position Control Function.
| [in] | handle | The handle to the Position Control structure |
|
inlinestatic |
Sets the Acceleration Reference (AccRef) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | accRef | Acceleration reference { unit: [pu/s^2], _IQ24 value) } |
Definition at line 280 of file spintac_pos_ctl.h.
References ST_PosCtl_t::AccRef.
|
inlinestatic |
Sets the Axis (cfg.Axis) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | axis | Axis ID { ST_AXIS0: axis 0, ST_AXIS1: axis 1} |
Definition at line 123 of file spintac_pos_ctl.h.
References ST_PosCtlCfg_t::Axis, ST_PosCtl_t::cfg, ST_CTL_IDLE, and ST_PosCtl_t::STATUS.
|
inlinestatic |
Sets the Bandwidth (Bw_radps) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | bw | Controller Bandwidth { unit: [rad/s] } |
Definition at line 342 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Bw_radps.
|
inlinestatic |
Sets the Enable signal (ENB) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | enb | Enable bit { true: enable; false: disable } |
Definition at line 362 of file spintac_pos_ctl.h.
References ST_PosCtl_t::ENB.
|
inlinestatic |
Sets the Feedback Filter Enable Flag (cfg.FiltEN) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | filterEnable | Enable low-pass Filter { true: Filter Enabled; false: Filter Disabled } |
Definition at line 245 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, ST_PosCtlCfg_t::FiltEN, ST_CTL_IDLE, and ST_PosCtl_t::STATUS.
|
inlinestatic |
Sets the Friction (Friction) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | friction | Friction Coefficient { unit: [PU/(pu/s)], value range: positive _IQ24 value } |
Definition at line 322 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Friction.
|
inlinestatic |
Sets the Inertia (Inertia) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | inertia | System inertia { unit: [PU/(pu/s^2)], Value range: positive _IQ24 value } |
Definition at line 302 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Inertia.
|
inlinestatic |
Sets the Maximum Output (cfg.OutMax) and Minimum Output (cfg.OutMin) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | outMax | Control signal upper limit { unit: [PU], value range: (-1, 1] } |
| [in] | outMin | Control signal lower limit { unit: [PU], value range: [-1, OutMax) } |
Definition at line 169 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, ST_PosCtlCfg_t::OutMax, and ST_PosCtlCfg_t::OutMin.
|
inlinestatic |
Sets the Position Error Maximum (cfg.PosErrMax_mrev) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | errMax | Maximum allowable position error { unit: [MRev], value range (0, ROMax/2] } |
Definition at line 232 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, ST_PosCtlCfg_t::PosErrMax_mrev, ST_CTL_IDLE, and ST_PosCtl_t::STATUS.
|
inlinestatic |
Sets the Position Feedback (PosFdb_mrev) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | posFdb | Position feedback { Unit: [MRev], value range: [-ROMax, ROMax) } |
Definition at line 291 of file spintac_pos_ctl.h.
References ST_PosCtl_t::PosFdb_mrev.
|
inlinestatic |
Sets the Position Reference (PosRef_mrev) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | posRef | Position reference { unit: [MRev], value range: [-ROMax, ROMax] } |
Definition at line 258 of file spintac_pos_ctl.h.
References ST_PosCtl_t::PosRef_mrev.
|
inlinestatic |
Sets the Position Rollover Maximum (cfg.ROMax_mrev) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | roMax | Position Rollover bound { unit: [MRev], value range: [2, 100] } |
Definition at line 192 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, ST_PosCtlCfg_t::ROMax_mrev, ST_CTL_IDLE, and ST_PosCtl_t::STATUS.
|
inlinestatic |
Sets the Ramp Disturbance Flag (cfg.RampDist) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | rampDist | Disturbance type { false: Step Disturbance, true: Ramp Disturbance } |
Definition at line 219 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, ST_PosCtlCfg_t::RampDist, ST_CTL_IDLE, and ST_PosCtl_t::STATUS.
|
inlinestatic |
Sets the Sample Time (cfg.T_sec) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | sampleTime | Sample Time { unit: [s], value range: (0, 0.01] } |
Definition at line 136 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, ST_CTL_IDLE, ST_PosCtl_t::STATUS, and ST_PosCtlCfg_t::T_sec.
|
inlinestatic |
Sets the Torque (Iq) Reference (Out) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | out | Control output { unit: [PU], value range: [cfg.OutMin, cfg.OutMax] } |
Definition at line 382 of file spintac_pos_ctl.h.
References ST_PosCtl_t::Out.
|
inlinestatic |
Sets the Unit Conversion (cfg.mrev_TO_pu) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | baseFreq | The value that frequency is scaled with in the system { USER_IQ_FULL_SCALE_FREQ_Hz } |
| [in] | polePairs | The number of Pole Pairs in the motor { USER_MOTOR_NUM_POLE_PAIRS } |
Definition at line 206 of file spintac_pos_ctl.h.
References _IQ24, ST_PosCtl_t::cfg, ST_PosCtlCfg_t::mrev_TO_pu, ST_CTL_IDLE, and ST_PosCtl_t::STATUS.
|
inlinestatic |
Sets the Maximum Velocity (cfg.VelMax) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | velMax | Velocity reference signal upper limit{ unit: [pu/s], Value range: (0, 1] } |
Definition at line 181 of file spintac_pos_ctl.h.
References ST_PosCtl_t::cfg, and ST_PosCtlCfg_t::VelMax.
|
inlinestatic |
Sets the Velocity Reference (VelRef) for SpinTAC Position Controller.
| [in] | handle | The handle for the SpinTAC Position Controller Object |
| [in] | velRef | Velocity reference { unit: [pu/s], value range: [-1, 1] } |
Definition at line 269 of file spintac_pos_ctl.h.
References ST_PosCtl_t::VelRef.
1.8.9.1