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 MLIB_ConvertPU_F16FLT<br />

4.134 Function MLIB_ConvertPU_F16FLT<br />

This function converts the input value to different representation without scale.<br />

4.134.1 Declaration<br />

tFrac16 MLIB_ConvertPU_F16FLT(register tFloat fltIn);<br />

4.134.2 Arguments<br />

Table 4-171. MLIB_ConvertPU_F16FLT arguments<br />

Type Name Direction Description<br />

register tFloat fltIn input Input value in single precision floating point <strong>for</strong>mat to be<br />

converted.<br />

4.134.3 Return<br />

Converted input value in 16-bit fractional <strong>for</strong>mat.<br />

4.134.4 Description<br />

This inline function returns converted input value. The input value is considered as single<br />

precision floating point data type <strong>and</strong> output value is considered as 16-bit fractional data<br />

type. The output value represents the values in unity model. The output saturation is<br />

implemented in this function, thus in case the input value is outside the (-1, 1) interval,<br />

the output value is limited to the boundary value.<br />

The output of the function is defined by the following simple equation:<br />

Equation MLIB_ConvertPU_Eq1<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 />

582 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!