LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble converting working with a 1D array waveform?

I have made a vi that outputs a signal to a pinger in the water, the vi then receives the same output signal so the trigger is always the same and also receives the signal from the hydrophone. The problem is I want to only use the part of the received signal from the hydrophone when I try to use the vis to do this I get an error saying "The typ of source is 1D array of waveform, the type of sink is waveform" What is the difference between these two and how could I go about trying to pick off only a peice of the waveform in the 1D array waveform?
0 Kudos
Message 1 of 4
(2,921 Views)
Sounds to me like you're asking two questions. One is about your error -- in order to fix that, you either need to put your waveform handling VI in a for loop or index the array of waveforms to select the waveform you want to select a part of. If you notice, the output from AI read is an array of waveforms, not a single waveform. In fact, I suspect you aren't getting the output you want for your array of DBLs either. The coercion of a 1D array of waveforms to a 1D array of DBLs just shows a single element of each waveform in my testing.

Once you select a waveform (or use the for loop to auto-index the waveforms), just use the Waveform Subset.vi to pick off the piece that you want. It's located in the Waveform menu under Waveform Operations.
Message 2 of 4
(2,921 Views)
To convert a 1D arry to a waveform, use the Build Waveform function on the Waveform palette. Grow the function to add dt and y (your 1D array) or just right click on it to get Select Item or Add Element. It works just like bundle by name. On the same palette is Get Waveform Components which does the opposite - extract the t0, dt, or y array.
0 Kudos
Message 3 of 4
(2,921 Views)
Which array of doubles do you suspect is wrong? Thanks for the help too
0 Kudos
Message 4 of 4
(2,921 Views)