LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a waveform with different dt time values tia sal22

Building a waveform with different dt time values tia sal22
Greetings All

I'm importing a csv file with values to build a wave form for playing an
audio signal

example csv file below:
t,y
0,0
1,2
2.1,5
6,3
45,1
51,7
78,3
93.2,8
450.2,1


I can get the x and y values on the xy graph to work correctly but when I use the
Build Waveform vi it only allows the dt option to increment at one set value
but my dt values varies example: 0,1,2.1,6,45,51,78,93.2,450.2  How can I work around this?

What I intend to do is import the csv file and build a waveform then
play that waveform at 30hz to 2000hz.

TIA
Sal22

0 Kudos
Message 1 of 3
(3,004 Views)

You can't.  By definition a waveform is an array of data where the dT is constant between elements.

 

What you would need to do it is create an array and fill the new elements with the Y values that are interpolated by between the ones you have defined.  Since it seems like your t elements have a resolution of 0.1 seconds, you will want to build an array of Y values that has 4503 elements from index 0 to index 4502.

Message 2 of 3
(2,988 Views)
Thanks I'll just build the waveform in mathematica using interpolation than read the file into labview
0 Kudos
Message 3 of 3
(2,968 Views)