09-03-2008 06:20 PM - edited 09-03-2008 06:23 PM
Well, typically you want to scale the DBL data because once you convert to integer, you'll discard all fractional parts.
All your blue wires are integers, so placing small fractional scales on the graph will not do you any good anyway.
Maybe you want to do FXP datatype?
(I cannot download your megaupload, most likely or firewall prohibits it.)
09-04-2008 12:42 PM
09-04-2008 01:32 PM
Awesome! This works. So to see if I understand, you scaled the input data by a power of 2 raised to the 22 (arbitrary) to get a good sized signal, then converted it to 16 bits, and then readjusted the y-axis levels to make it fit..
Would you happen to know why converting to 16 bits have that affect on the input signal that you have to scale it by a power of 2^big?
You're a big help. Thanks
09-04-2008 01:35 PM
09-04-2008 02:30 PM
If your data is I16, it is an integer, so the smallest increment is 1. You cannot have any fractions! An I16 number can cover all whole numbers in the range -32768 to 32767, so to make most efficient use of all bits, you should make sure that your highest absolute value in your DBL array scales near (but below) 32767.
For the graph display, you might want to adjust x0 and dx of the y axis so it scales back to the original numbers. It's a simple linear transformation.
Jud~ wrote:Would you happen to know why converting to 16 bits have that affect on the input signal that you have to scale it by a power of 2^big?
Your original numbers are very small (<<1!), so there is no way to direct convert them to I16, you would get all zeroes.