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

4.57 Function GFLIB_Hyst_FLT<br />

This function implements the hysteresis functionality.<br />

4.57.1 Declaration<br />

tFloat GFLIB_Hyst_FLT(tFloat fltIn, GFLIB_HYST_T_FLT *const pParam);<br />

4.57.2 Arguments<br />

Table 4-74. GFLIB_Hyst_FLT arguments<br />

Type Name Direction Description<br />

tFloat fltIn input Input value, in single precision floating point data <strong>for</strong>mat.<br />

GFLIB_HYST_T_FLT<br />

*const<br />

4.57.3 Return<br />

pParam input,<br />

output<br />

Pointer to the structure with parameters <strong>and</strong> states of the<br />

hysteresis function. Arguments of the structure contain a<br />

single precision floating point values.<br />

The function returns the value of the hysteresis output, which is equal to either<br />

fltOutValOn or fltOutValOff depending on the value of the input <strong>and</strong> the state of the<br />

function output in the previous calculation step. The output value is in single precision<br />

floating point <strong>for</strong>mat.<br />

4.57.4 Description<br />

The GFLIB_Hyst function provides a computational method <strong>for</strong> the calculation of a<br />

hysteresis (relay) function. The function switches the output between the two predefined<br />

values stored in the fltOutValOn <strong>and</strong> fltOutValOff members of structure<br />

GFLIB_HYST_T_FLT. When the value of the input is higher than the upper threshold<br />

fltHystOn, then the output value is equal to fltOutValOn. On the other h<strong>and</strong>, when the<br />

input value is lower than the lower threshold fltHystOff, then the output value is equal to<br />

fltOutValOff. When the input value is between these two threshold values then the output<br />

retains its value (the previous state).<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 />

336 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!