LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I convert an xy graph a waveform graph?

hi!!
 
Everything is in the title!! I've made an XY graph and I would like to convert it into a waveform. To create this XY graph I give only the coordinates of each point.
 
Thanks
The image “file:///C:/Documents%20and%20Settings/TMR01/Bureau/1.JPG” cannot be displayed, because it contains errors.
0 Kudos
Message 1 of 2
(3,770 Views)
Hi
 
As far as I know this is not really possible with a built in function, you will have to do it yourself. In a XY-graph, XY-pairs are painted and connected. A waveform is defined by starttime, dt and the y-values. So if you want to make a waveform, you have to find a dt for the data in your xy-graph. This value will replace the x-value, as each y is at a defined x (yi = t0 + dt*i). In addition to that, you will have to set the y-values at the correct index, which obviously results in an array with zeros between the given values. To avoid this, you will have to interpolate the y-values between your given y-values.
 
Just an example:
 
xy-data (x/y): (0/2),(1/4),(1.5/3),(2.5/0)
 
This would result in the following waveform:
t0 = 0
dt = 0.5
y (before interpolation) 2,0,4,3,0,0,0
 
Interpolate the missing y values and you should get this waveform:
to = 0
dt = 0.5
y (after interpolation) 2,3,4,3,1.5,0
 
Hope this helps.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 2
(3,745 Views)