LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

(X,Y) data to waveform vi

What vi or set of vi's can I use with LabView in order to take a stream of X,Y data to a waveform?
I am building a continuous signal through code and the two outputs will be the X and Y data.
I saw the XY plot vi function, but its output is a new picture which I don't think can be made into a waveform that I can send out on my waveform generator card.
0 Kudos
Message 1 of 5
(5,376 Views)
I would make sure that the X,Y data you are generating can be converted to a waveform, if so it is easy. A waveform is a t0, a deltat, and an array of data points. So to convert your X,Y data over you need make sure that the x points are evenly spaced. If they are take a look at the attached VI where I build the waveform up.

However if the data in the X array is not evenly spaced then the question is much harder, and depends on what you want to do. You could find the average dt between all the points, and then try to interpolate the Y value at each average dt, and end up dumping the original x and y values to be replaced with the average dt and interpolated values.

If you are in the second situation lets us know and we may be able to come up with some schemes to help.
0 Kudos
Message 2 of 5
(5,366 Views)

Hi Evan

 

Even if this ain't my thread, I currently have exactely the same problem 🙂

I have some X/Y value pairs which aren't spaced evenly. I'd need to convert them to a waveform with interpolated values so I can resample some other signal.

 

How could I do that ?

0 Kudos
Message 3 of 5
(5,325 Views)
Ok, I found a way ... do you see any problems with this approach ?
 
I input a path to a correction file which is built up like this:
f(Hz)  Value
1.0  1.0
2.0  10.0
3.0 100.0
 
so left column is frequency and right is the correction factor (the whole thing works in the frequency domain after a fft).
 
0 Kudos
Message 4 of 5
(5,321 Views)

Your x data needs to be evenly spaced values, then you can use the build waveform function with the Y array and dt value. If it is not, search interpolation in the example finder. Also see this thread.

http://forums.ni.com/ni/board/message?board.id=170&message.id=80811&requireLogin=False

0 Kudos
Message 5 of 5
(5,312 Views)