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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Function GFLIB_VectorLimit_F16<br />

• x in, y in <strong>and</strong> x out, y out are the co-ordinates of the input <strong>and</strong> output vector,<br />

respectively<br />

• L is the maximum magnitude of the vector<br />

The input vector co-ordinates are defined by the structure pointed to by the pIn<br />

parameter, <strong>and</strong> the output vector co-ordinates be found in the structure pointed by the<br />

pOut parameter. The maximum vector magnitude is defined in the parameters structure<br />

pointed to by the pParam function parameter.<br />

A graphical interpretation of the function can be seen in the figure below.<br />

Figure 4-47. 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 />

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->f16Limit, must be positive <strong>and</strong> equal to or greater<br />

than "0", otherwise the result is undefined. The function does<br />

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

>f16Limit.<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 />

444 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!