MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

spintac_pos_ctl.h
Go to the documentation of this file.
1 #ifndef __SPINTAC_POS_CTL_H__
2 #define __SPINTAC_POS_CTL_H__
3 /* --COPYRIGHT--,BSD
4 * Copyright (c) 2012, LineStream Technologies Incorporated
5 * Copyright (c) 2012, Texas Instruments Incorporated
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * * Neither the names of Texas Instruments Incorporated, LineStream
20 * Technologies Incorporated, nor the names of its contributors may be
21 * used to endorse or promote products derived from this software without
22 * specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
31 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
33 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
34 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 * --/COPYRIGHT--*/
36
43
45
46
47 #include "spintac_version.h"
48
49 #ifndef __ST_AXIS_ENUM__
50 #define __ST_AXIS_ENUM__
51 typedef enum
54 {
55 ST_AXIS0=0,
56 ST_AXIS1
57 } ST_Axis_e;
58 #endif //__ST_AXIS_ENUM__
59
60 #ifndef __ST_CTL_STATUS_ENUM__
61 #define __ST_CTL_STATUS_ENUM__
62 typedef enum
65 {
66 ST_CTL_IDLE=0,
67 ST_CTL_INIT,
68 ST_CTL_CONF,
69 ST_CTL_BUSY
70 } ST_CtlStatus_e;
71 #endif //__ST_CTL_STATUS_ENUM__
72
76 typedef struct {
77 //System config parameters: Can be set only once at system startup
78 ST_Axis_e Axis;
79 _iq24 T_sec;
80 _iq24 ROMax_mrev;
81 _iq24 mrev_TO_pu;
82 _iq24 PosErrMax_mrev;
83 bool RampDist;
84 bool FiltEN;
85
86 //Config parameters that may be modified
87 _iq24 OutMax;
88 _iq24 OutMin;
89 _iq24 VelMax;
90 } ST_PosCtlCfg_t;
91
95 typedef struct {
96 /* Configuration variables */
97 ST_PosCtlCfg_t cfg;
98 /* Input variables */
99 _iq24 PosRef_mrev;
100 _iq24 VelRef;
101 _iq24 AccRef;
102 _iq24 PosFdb_mrev;
103 _iq24 Inertia;
104 _iq24 Friction;
105 _iq20 Bw_radps;
106 // Control bits
107 bool ENB;
108 /* Output variables */
109 _iq24 Out;
110 // Information variables
111 ST_CtlStatus_e STATUS;
112 uint16_t ERR_ID;
113 _iq24 PosErr_mrev;
114 /* Internal variables */
115 uint32_t s1[18];
116 } ST_PosCtl_t; // Structure for SpinTAC Position Control
117
118 typedef struct _ST_POSCTL_Handle_ *ST_POSCTL_Handle; // SpinTAC Position Controller Handle
119
123 static inline void STPOSCTL_setAxis(ST_POSCTL_Handle handle, ST_Axis_e axis) {
124 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
125
126 if(obj->STATUS == ST_CTL_IDLE) {
127 obj->cfg.Axis = axis;
128 }
129
130 return;
131 } // end of STPOSCTL_setAxis function
132
136 static inline void STPOSCTL_setSampleTime_sec(ST_POSCTL_Handle handle, _iq24 sampleTime) {
137 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
138
139 if(obj->STATUS == ST_CTL_IDLE) {
140 obj->cfg.T_sec = sampleTime;
141 }
142
143 return;
144 } // end of STPOSCTL_setSampleTime_sec function
145
149 static inline _iq24 STPOSCTL_getOutputMaximum(ST_POSCTL_Handle handle) {
150 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
151
152 return obj->cfg.OutMax;
153 } // end of STPOSCTL_getOutputMaximum function
154
158 static inline _iq24 STPOSCTL_getOutputMinimum(ST_POSCTL_Handle handle) {
159 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
160
161 return obj->cfg.OutMin;
162 } // end of STPOSCTL_getOutputMinimum function
163
164
169 static inline void STPOSCTL_setOutputMaximums(ST_POSCTL_Handle handle, _iq24 outMax, _iq24 outMin) {
170 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
171
172 obj->cfg.OutMax = outMax;
173 obj->cfg.OutMin = outMin;
174
175 return;
176 } // end of STPOSCTL_setOutputMaximums function
177
181 static inline void STPOSCTL_setVelocityMaximum(ST_POSCTL_Handle handle, _iq24 velMax) {
182 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
183
184 obj->cfg.VelMax = velMax;
185
186 return;
187 } // end of STPOSCTL_setVelocityMaximum function
188
192 static inline void STPOSCTL_setPositionRolloverMaximum_mrev(ST_POSCTL_Handle handle, _iq24 roMax) {
193 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
194
195 if(obj->STATUS == ST_CTL_IDLE) {
196 obj->cfg.ROMax_mrev = roMax;
197 }
198
199 return;
200 } // end of STPOSCTL_setPositionRolloverMaximum_mrev function
201
206 static inline void STPOSCTL_setUnitConversion(ST_POSCTL_Handle handle, float_t baseFreq, uint16_t polePairs) {
207 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
208
209 if(obj->STATUS == ST_CTL_IDLE) {
210 obj->cfg.mrev_TO_pu = _IQ24(((float_t)polePairs) / baseFreq);
211 }
212
213 return;
214 } // end of STPOSCTL_setUnitConversion function
215
219 static inline void STPOSCTL_setRampDisturbanceFlag(ST_POSCTL_Handle handle, bool rampDist) {
220 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
221
222 if(obj->STATUS == ST_CTL_IDLE) {
223 obj->cfg.RampDist = rampDist;
224 }
225
226 return;
227 } // end of STPOSCTL_setRampDisturbanceFlag function
228
232 static inline void STPOSCTL_setPositionErrorMaximum_mrev(ST_POSCTL_Handle handle, _iq24 errMax) {
233 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
234
235 if(obj->STATUS == ST_CTL_IDLE) {
236 obj->cfg.PosErrMax_mrev = errMax;
237 }
238
239 return;
240 } // end of STPOSCTL_setPositionErrorMaximum_mrev function
241
245 static inline void STPOSCTL_setFilterEnableFlag(ST_POSCTL_Handle handle, bool filterEnable) {
246 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
247
248 if(obj->STATUS == ST_CTL_IDLE) {
249 obj->cfg.FiltEN = filterEnable;
250 }
251
252 return;
253 } // end of STPOSCTL_setFilterEnableFlag function
254
258 static inline void STPOSCTL_setPositionReference_mrev(ST_POSCTL_Handle handle, _iq24 posRef) {
259 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
260
261 obj->PosRef_mrev = posRef;
262
263 return;
264 } // end of STPOSCTL_setPositionReference_mrev function
265
269 static inline void STPOSCTL_setVelocityReference(ST_POSCTL_Handle handle, _iq24 velRef) {
270 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
271
272 obj->VelRef = velRef;
273
274 return;
275 } // end of STPOSCTL_setVelocityReference function
276
280 static inline void STPOSCTL_setAccelerationReference(ST_POSCTL_Handle handle, _iq24 accRef) {
281 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
282
283 obj->AccRef = accRef;
284
285 return;
286 } // end of STPOSCTL_setAccelerationReference function
287
291 static inline void STPOSCTL_setPositionFeedback_mrev(ST_POSCTL_Handle handle, _iq24 posFdb) {
292 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
293
294 obj->PosFdb_mrev = posFdb;
295
296 return;
297 } // end of STPOSCTL_setPositionFeedback_mrev function
298
302 static inline void STPOSCTL_setInertia(ST_POSCTL_Handle handle, _iq24 inertia) {
303 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
304
305 obj->Inertia = inertia;
306
307 return;
308 } // end of STPOSCTL_setInertia function
309
313 static inline _iq24 STPOSCTL_getInertia(ST_POSCTL_Handle handle) {
314 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
315
316 return(obj->Inertia);
317 } // end of STPOSCTL_getInertia function
318
322 static inline void STPOSCTL_setFriction(ST_POSCTL_Handle handle, _iq24 friction) {
323 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
324
325 obj->Friction = friction;
326
327 return;
328 } // end of STPOSCTL_setFriction function
329
333 static inline _iq24 STPOSCTL_getFriction(ST_POSCTL_Handle handle) {
334 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
335
336 return(obj->Friction);
337 } // end of STPOSCTL_getFriction function
338
342 static inline void STPOSCTL_setBandwidth_radps(ST_POSCTL_Handle handle, _iq20 bw) {
343 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
344
345 obj->Bw_radps = bw;
346
347 return;
348 } // end of STPOSCTL_setBandwidth_radps function
349
353 static inline _iq20 STPOSCTL_getBandwidth_radps(ST_POSCTL_Handle handle) {
354 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
355
356 return(obj->Bw_radps);
357 } // end of STPOSCTL_getBandwidth_radps function
358
362 static inline void STPOSCTL_setEnable(ST_POSCTL_Handle handle, bool enb) {
363 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
364
365 obj->ENB = enb;
366
367 return;
368 } // end of STPOSCTL_setEnable function
369
373 static inline bool STPOSCTL_getEnable(ST_POSCTL_Handle handle) {
374 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
375
376 return (obj->ENB);
377 } // end of STPOSCTL_getEnable function
378
382 static inline void STPOSCTL_setTorqueReference(ST_POSCTL_Handle handle, _iq24 out) {
383 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
384
385 obj->Out = out;
386
387 return;
388 } // end of STPOSCTL_setTorqueReference function
389
393 static inline _iq24 STPOSCTL_getTorqueReference(ST_POSCTL_Handle handle) {
394 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
395
396 return (obj->Out);
397
398 } // end of STPOSCTL_getTorqueReference function
399
403 static inline ST_CtlStatus_e STPOSCTL_getStatus(ST_POSCTL_Handle handle) {
404 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
405
406 return (obj->STATUS);
407
408 } // end of STPOSCTL_getStatus function
409
413 static inline uint16_t STPOSCTL_getErrorID(ST_POSCTL_Handle handle) {
414 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
415
416 return (obj->ERR_ID);
417
418 } // end of STPOSCTL_getErrorID function
419
423 static inline _iq24 STPOSCTL_getPositionError_mrev(ST_POSCTL_Handle handle) {
424 ST_PosCtl_t *obj = (ST_PosCtl_t *)handle;
425
426 return (obj->PosErr_mrev);
427
428 } // end of STPOSCTL_getPositionError function
429
434 ST_POSCTL_Handle STPOSCTL_init(void *pMemory, const size_t numBytes);
435
438 void STPOSCTL_run(ST_POSCTL_Handle handle);
440 #endif //__SPINTAC_POS_CTL_H__
STPOSCTL_getBandwidth_radps
static _iq20 STPOSCTL_getBandwidth_radps(ST_POSCTL_Handle handle)
Gets the Bandwidth (Bw_radps) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:353
ST_CTL_BUSY
ST_CTL in busy state.
Definition: spintac_pos_ctl.h:69
ST_PosCtl_t::Inertia
_iq24 Inertia
System inertia { unit: [PU/(pu/s^2)], value range: positive _IQ24 value }.
Definition: spintac_pos_ctl.h:103
ST_PosCtl_t::PosErr_mrev
_iq24 PosErr_mrev
Position error { unit: [MRev] }.
Definition: spintac_pos_ctl.h:113
ST_PosCtl_t::AccRef
_iq24 AccRef
Acceleration reference { unit: [pu/s^2] }.
Definition: spintac_pos_ctl.h:101
ST_CtlStatus_e
ST_CtlStatus_e
Enumeration for the Control Status states.
Definition: spintac_pos_ctl.h:64
STPOSCTL_setRampDisturbanceFlag
static void STPOSCTL_setRampDisturbanceFlag(ST_POSCTL_Handle handle, bool rampDist)
Sets the Ramp Disturbance Flag (cfg.RampDist) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:219
ST_PosCtl_t::PosFdb_mrev
_iq24 PosFdb_mrev
Position feedback { Unit: [MRev], value range: [-ROMax, ROMax) }.
Definition: spintac_pos_ctl.h:102
STPOSCTL_setPositionReference_mrev
static void STPOSCTL_setPositionReference_mrev(ST_POSCTL_Handle handle, _iq24 posRef)
Sets the Position Reference (PosRef_mrev) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:258
STPOSCTL_run
void STPOSCTL_run(ST_POSCTL_Handle handle)
Runs the SpinTAC Position Control Function.
ST_PosCtlCfg_t
Defines the ST_PosCtlCfg_t data.
Definition: spintac_pos_ctl.h:76
STPOSCTL_setAccelerationReference
static void STPOSCTL_setAccelerationReference(ST_POSCTL_Handle handle, _iq24 accRef)
Sets the Acceleration Reference (AccRef) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:280
ST_PosCtl_t::PosRef_mrev
_iq24 PosRef_mrev
Position reference { unit: [MRev], value range: [-ROMax, ROMax] }.
Definition: spintac_pos_ctl.h:99
ST_PosCtlCfg_t::Axis
ST_Axis_e Axis
Axis ID { ST_AXIS0: axis 0, ST_AXIS1: axis 1}.
Definition: spintac_pos_ctl.h:78
ST_PosCtlCfg_t::PosErrMax_mrev
_iq24 PosErrMax_mrev
Maximum allowable position error { unit: [MRev], value range (0, ROMax_mrev/2] }. ...
Definition: spintac_pos_ctl.h:82
ST_CTL_CONF
ST_CTL in conf state.
Definition: spintac_pos_ctl.h:68
STPOSCTL_setSampleTime_sec
static void STPOSCTL_setSampleTime_sec(ST_POSCTL_Handle handle, _iq24 sampleTime)
Sets the Sample Time (cfg.T_sec) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:136
STPOSCTL_getErrorID
static uint16_t STPOSCTL_getErrorID(ST_POSCTL_Handle handle)
Gets the Error value (ERR_ID) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:413
ST_PosCtl_t::Bw_radps
_iq20 Bw_radps
Controller Bandwidth { unit: [rad/s], value range: [0.01, 1000.0] }.
Definition: spintac_pos_ctl.h:105
STPOSCTL_getStatus
static ST_CtlStatus_e STPOSCTL_getStatus(ST_POSCTL_Handle handle)
Gets the Status value (STATUS) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:403
STPOSCTL_setPositionRolloverMaximum_mrev
static void STPOSCTL_setPositionRolloverMaximum_mrev(ST_POSCTL_Handle handle, _iq24 roMax)
Sets the Position Rollover Maximum (cfg.ROMax_mrev) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:192
ST_PosCtl_t::cfg
ST_PosCtlCfg_t cfg
Definition: spintac_pos_ctl.h:97
ST_CTL_IDLE
ST_CTL in idle state.
Definition: spintac_pos_ctl.h:66
ST_PosCtlCfg_t::mrev_TO_pu
_iq24 mrev_TO_pu
Conversion ratio from mechanical revolution to pu { value range: [0.002, 1]) }.
Definition: spintac_pos_ctl.h:81
_IQ24
#define _IQ24(A)
Definition: 32b/IQmathLib.h:275
ST_PosCtlCfg_t::T_sec
_iq24 T_sec
Sample time { unit: [s], value range: (0, 0.01] }.
Definition: spintac_pos_ctl.h:79
STPOSCTL_getTorqueReference
static _iq24 STPOSCTL_getTorqueReference(ST_POSCTL_Handle handle)
Gets the Torque (Iq) Reference (Out) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:393
STPOSCTL_getEnable
static bool STPOSCTL_getEnable(ST_POSCTL_Handle handle)
Gets the Enable signal (ENB) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:373
STPOSCTL_init
ST_POSCTL_Handle STPOSCTL_init(void *pMemory, const size_t numBytes)
Initializes the SpinTAC Position Controller object.
ST_PosCtl_t::ENB
bool ENB
Enable bit { false: disable; true: enable }.
Definition: spintac_pos_ctl.h:107
STPOSCTL_setInertia
static void STPOSCTL_setInertia(ST_POSCTL_Handle handle, _iq24 inertia)
Sets the Inertia (Inertia) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:302
STPOSCTL_setBandwidth_radps
static void STPOSCTL_setBandwidth_radps(ST_POSCTL_Handle handle, _iq20 bw)
Sets the Bandwidth (Bw_radps) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:342
ST_PosCtl_t
Defines the ST_PosCtl_t data.
Definition: spintac_pos_ctl.h:95
ST_PosCtlCfg_t::VelMax
_iq24 VelMax
Velocity reference signal upper limit { unit: [pu/s], Value range: (0, 1] }.
Definition: spintac_pos_ctl.h:89
ST_AXIS1
Second Axis.
Definition: spintac_pos_ctl.h:56
_iq24
long _iq24
Definition: 32b/IQmathLib.h:230
STPOSCTL_getInertia
static _iq24 STPOSCTL_getInertia(ST_POSCTL_Handle handle)
Gets the Inertia (Inertia) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:313
STPOSCTL_setPositionFeedback_mrev
static void STPOSCTL_setPositionFeedback_mrev(ST_POSCTL_Handle handle, _iq24 posFdb)
Sets the Position Feedback (PosFdb_mrev) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:291
ST_Axis_e
ST_Axis_e
Enumeration for the Axis Status states.
Definition: spintac_pos_ctl.h:53
ST_CTL_INIT
ST_CTL in init state.
Definition: spintac_pos_ctl.h:67
spintac_version.h
Public interface, object, and function definitions related to the SpinTAC Version object...
STPOSCTL_setOutputMaximums
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...
Definition: spintac_pos_ctl.h:169
ST_PosCtl_t::STATUS
ST_CtlStatus_e STATUS
Status { ST_CTL_IDLE, ST_CTL_INIT, ST_CTL_CONF, ST_CTL_BUSY }.
Definition: spintac_pos_ctl.h:111
STPOSCTL_getOutputMinimum
static _iq24 STPOSCTL_getOutputMinimum(ST_POSCTL_Handle handle)
Gets the Minimum Output (cfg.OutMin) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:158
ST_PosCtlCfg_t::FiltEN
bool FiltEN
Enable low-pass Filter { false: Filter Disabled; true: Filter Enabled }.
Definition: spintac_pos_ctl.h:84
ST_PosCtlCfg_t::OutMin
_iq24 OutMin
Control signal lower limit { unit: [PU], value range: [-1, OutMax) }.
Definition: spintac_pos_ctl.h:88
STPOSCTL_setFilterEnableFlag
static void STPOSCTL_setFilterEnableFlag(ST_POSCTL_Handle handle, bool filterEnable)
Sets the Feedback Filter Enable Flag (cfg.FiltEN) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:245
STPOSCTL_setEnable
static void STPOSCTL_setEnable(ST_POSCTL_Handle handle, bool enb)
Sets the Enable signal (ENB) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:362
STPOSCTL_setUnitConversion
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.
Definition: spintac_pos_ctl.h:206
ST_PosCtl_t::Friction
_iq24 Friction
Friction Coefficient { unit: [PU/(pu/s)], value range: positive _IQ24 value }.
Definition: spintac_pos_ctl.h:104
ST_AXIS0
First Axis.
Definition: spintac_pos_ctl.h:55
STPOSCTL_setPositionErrorMaximum_mrev
static void STPOSCTL_setPositionErrorMaximum_mrev(ST_POSCTL_Handle handle, _iq24 errMax)
Sets the Position Error Maximum (cfg.PosErrMax_mrev) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:232
ST_PosCtlCfg_t::RampDist
bool RampDist
Disturbance type { false: Step Disturbance, true: Ramp Disturbance }.
Definition: spintac_pos_ctl.h:83
STPOSCTL_getFriction
static _iq24 STPOSCTL_getFriction(ST_POSCTL_Handle handle)
Gets the Friction (Friction) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:333
STPOSCTL_setTorqueReference
static void STPOSCTL_setTorqueReference(ST_POSCTL_Handle handle, _iq24 out)
Sets the Torque (Iq) Reference (Out) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:382
_iq20
long _iq20
Definition: 32b/IQmathLib.h:234
ST_PosCtl_t::ERR_ID
uint16_t ERR_ID
Error ID { 0: no error; others: see error code }.
Definition: spintac_pos_ctl.h:112
ST_PosCtl_t::Out
_iq24 Out
Control output { unit: [PU] }.
Definition: spintac_pos_ctl.h:109
STPOSCTL_getOutputMaximum
static _iq24 STPOSCTL_getOutputMaximum(ST_POSCTL_Handle handle)
Gets the Maximum Output (cfg.OutMax) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:149
ST_POSCTL_Handle
struct _ST_POSCTL_Handle_ * ST_POSCTL_Handle
Definition: spintac_pos_ctl.h:118
ST_PosCtl_t::VelRef
_iq24 VelRef
Velocity reference { unit: [pu/s] }.
Definition: spintac_pos_ctl.h:100
STPOSCTL_setVelocityReference
static void STPOSCTL_setVelocityReference(ST_POSCTL_Handle handle, _iq24 velRef)
Sets the Velocity Reference (VelRef) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:269
STPOSCTL_getPositionError_mrev
static _iq24 STPOSCTL_getPositionError_mrev(ST_POSCTL_Handle handle)
Gets the Position Error (PosErr_mrev) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:423
STPOSCTL_setVelocityMaximum
static void STPOSCTL_setVelocityMaximum(ST_POSCTL_Handle handle, _iq24 velMax)
Sets the Maximum Velocity (cfg.VelMax) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:181
STPOSCTL_setAxis
static void STPOSCTL_setAxis(ST_POSCTL_Handle handle, ST_Axis_e axis)
Sets the Axis (cfg.Axis) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:123
ST_PosCtlCfg_t::OutMax
_iq24 OutMax
Control signal upper limit { unit: [PU], value range: (-1, 1] }.
Definition: spintac_pos_ctl.h:87
STPOSCTL_setFriction
static void STPOSCTL_setFriction(ST_POSCTL_Handle handle, _iq24 friction)
Sets the Friction (Friction) for SpinTAC Position Controller.
Definition: spintac_pos_ctl.h:322
ST_PosCtlCfg_t::ROMax_mrev
_iq24 ROMax_mrev
Position Rollover bound { unit: [MRev], value range: [2, 100] }.
Definition: spintac_pos_ctl.h:80
float_t
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
Definition: types.h:121