SPRUHJ1I January 2013 – October 2021 TMS320F2802-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027-Q1 , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M-Q1 , TMS320F2806-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
The primary function is STVELCTL_run(ST_VELCTL_Handle handle), where handle is a pointer to a specific ST_VelCtl_t object. This function runs SpinTAC Velocity Control. It is recommended to run this controller at one-fifth or one-tenth the rate of the current controller.
void STVELCTL_run(ST_VELCTL_Handle handle)
Parameters:
No. | Type | Parameters | Description |
---|---|---|---|
1 | ST_VELCTL_Handle | Handle | The pointer to a ST_VelCtl_t object |
The SpinTAC Velocity Control state transition map is shown in Figure 4-6. Note in Figure 4-6, the transitions from state IDLE to INIT, INIT to CONF, and CONF to BUSY, happen within one sample time. Therefore, the controller works directly at the sample time when it is enabled.
The SpinTAC Velocity Control states transitions are described in Table 4-6.
From State | To State | Transition Condition | Action |
---|---|---|---|
IDLE |
|
||
INIT | RES == false AND ENB is on rising edge AND ERR_ID == 0 | ||
INIT | Parameter validation
|
||
IDLE | ERR_ID != 0 | Set ENB = false | |
CONF | ERR_ID == 0 | ||
CONF | BUSY | Saturate Inertia, BwScale, and Friction by the specified bounds. If saturation occurs, ERR_ID will be 1012, or 1013, 1014, or 1016. | |
BUSY | Generate control signal | ||
IDLE | RES == true OR ENB == false | Set ENB = false | |
CONF | RES == false AND ENB == true AND changes in BwScale, Inertia, or Friction |