10-23-2017 01:24 PM
Need to convert an array of 1024 element double numbers into an array of 16 bit integers in RT. This array of 16 bit integers will be read or used as a Look-up table in FPGA.
Solved! Go to Solution.
10-23-2017 01:48 PM
Functions -> Numeric -> Conversion -> To Word Integer
Note: This function will work on either a scalar or an array.
10-23-2017 02:03 PM
Hi Paul,
The list is of 1024 element double array that makes a waveform (first 4 are shown below). If I directly convert it to 16 bit word integer it rounds it to nearest integer.
0
0.00390625
0.0078125
0.0117187
.......
I want to convert it to a list of integers (may be scaled) that would give me a waveform that ranges from 32767 to -32767.
Thanks.
10-23-2017 02:32 PM - edited 10-23-2017 02:32 PM
Just some simple mathematics:
Regards, Jens
10-23-2017 03:01 PM
Run it through "Normalize Waveform.vi" and multiply by 32767