08-21-2013 10:59 AM
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???
08-21-2013 11:16 AM
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: