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 STPOSCTL_run(ST_POSCTL_Handle handle), where handle is the pointer to a specific ST_PosCtl_t object, this handle needs to be established by the initialize function STPOSCTL_init.
void STPOSCTL_run(ST_POSCTL_Handle handle)
Parameters:
No. | Type | Parameters | Description |
---|---|---|---|
1 | ST_POSCTL_Handle | Handle | The pointer to a ST_PosCtl_t object |
The SpinTAC Position Control state transition map is shown in Figure 4-16. Note in Figure 4-16, 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 state transitions of SpinTAC Position Control are described in Table 4-17.
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 and BwScale by the specified bounds. If saturation occurs, ERR_ID will be 1012, or 1013, or 1014, or 1015. | |
BUSY |
| ||
IDLE | RES == true OR ENB == false OR ERR_ID == 2002 | Set ENB = false | |
CONF | RES == false AND ENB == true AND changes in BwScale or Inertia AND ERR_ID != 2002 |