LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constructing "waveforms" from single I32 elements

I have a stream of data arriving from my serial port which I build 32bit 2's complement words from. This process works fine. What I am having trouble with is getting this data into the "waveform" format to process it in the frequency domain.

The first problem is the conversion from I32 to DBL and the data that I will lose. The next problem is how to create this. If someone has some example VIs they would help out greatly. I have looked at the "Build Waveform" VI using the "to DBL" conversion in front of it without any luck.

Regards,
Jeremy
0 Kudos
Message 1 of 2
(2,714 Views)
As I understand it, you have successfully converted the byte stream from the serial port into I32s. A waveform cluster (or structure) contains the time information and an array of data. The data is dbl type which has 64bits. I am not certain, but I believe that there is a dbl representation for every integer possibly expressed by an I32. I did some quick checks near the roll over boundaries and at various other numbers, and I found unqiqueness for a scale factor of 1 in the conversion to dbl. As long as you don't scale the numbers to have extreme exponents, you should be okay. I would recommend a 1:1 scaling. You should not lose any data that way.
I have attached a vi that shows how I would convert an I32 array to a waveform.
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 2 of 2
(2,714 Views)