LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Fixed number

Hi,

my problem is how we can convert float number the range of it from  11,10.999..... To -11 to fixed number to be used with PID block???

0 Kudos
Message 1 of 2
(2,212 Views)

The FPGA PID function requires fixed point numbers with a word length of 16-bits, but you can use any integer length.  For numbers that will always ben in the range of [-11, 11], you might use an integer length of 5-bits.  Cast your floating point number into a FXP number with 16-bit word length and 5-bit integer length like this:

convert to FXP.png

0 Kudos
Message 2 of 2
(2,204 Views)