03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 4-46. Graphical interpretation of the GFLIB_VectorLimit function.<br />

If an actual limitation occurs, the function will return the logical true (TRUE), otherwise<br />

the logical false will be returned (FALSE).<br />

For computational reasons, the output vector will be computed as zero if the input vector<br />

magnitude is lower than 2 -15 , regardless of the set maximum magnitude of the input<br />

vector. The function returns the logical true (TRUE) in this case.<br />

Also, the 16 least significant bits of the maximum vector magnitude in the parameters<br />

structure, the pParam->f32Limit, are ignored. This means that the defined magnitude<br />

must be equal to or greater than 2 -15 , otherwise the result is undefined.<br />

Note<br />

The function calls the MCLIB square root routine GFLIB_Sqrt.<br />

CAUTION<br />

The maximum vector magnitude in the parameters structure, the<br />

pParam->f32Limit, must be positive <strong>and</strong> equal to or greater<br />

than 2 -15 , otherwise the result is undefined. The function does<br />

not check <strong>for</strong> the valid range of pParam->f32Limit.<br />

4.91.5 Re-entrancy<br />

The function is re-entrant.<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

Chapter 4 API References<br />

Freescale Semiconductor, Inc. 441

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!