LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble using Align and Resample vi

Hi all,

I am fairly new to LabView and I am having some trouble with align and resample vi.

At the moment I have two signals coming in on my PXI-6259 Multi function DAQ one being a 4-20ma position signal and the other being a audio waveform. I want to be able to log the raw data of the position and the tone measurement analysis at the same sampling rate so that when I log it into a .lvm file I can easily create a chart in excel.

Using the Align and Resample vi seems to have no effect on the data being logged.

The way I have it setup is that the processed tone measurement data is used as a reference signal and the raw data is the main signal input to the A&R vi, yet my log file is still full of the old data points from the raw DAQ input.

If the tone measurements only puts out 250 samples or so in 30 seconds of recordings how do I only get 250 samples of the raw data in the log file as opposed to the 10,000 or more I get now.
 
0 Kudos
Message 1 of 5
(3,322 Views)
My suggestion would be:
 
1.  Separate the piece of code that gets the data (to the left of what is pictured) into a separate VI temporarily.
2.  Create a graph indicator off each of the signal wires to capture the data.
3.  Run the VI.
4.  Right-click on each of the graphs and "Make current value default".
5.  Copy these graphs into the VI pictured, with the acquisition pieces removed.
6.  Right-click them and change them to controls, and wire them up to the corresponding piece of the pictured diagram.
7.  Save this VI and attach it to your next reply.
 
In following these instructions, you might keep in mind that the data could be very large, and by saving it as default, it will make your VI large, possibly too large to attach here, I'm not familiar with what any size limitations might be.  If that's the case maybe you could record a smaller set of data for demonstration purposes, or maybe we can figure something else out.
0 Kudos
Message 2 of 5
(3,297 Views)
Gday,
Thanks for the reply. I have followed your instruction and have attached my modified vi.

As you can see with the generated measurement file that there is only one sample from the tone measurement and a whole bunch of raw data from the position input. What I really want is just one sample of position data for every sample from the tone measurement vi. I found I get this if I use the align and resample tool and have a specific dt of 1, although changing it seems to have no visual effect and I am pretty sure this is not the way I am supposed to go about it.

Any help would be much appreciated

Regards
Ben

21_1_2008 Downsampling.vi
0 Kudos
Message 3 of 5
(3,276 Views)
The Tone Measurements Express VI returns scalar data, such as amplitude, as you're displaying on your front panel.  You're using this scalar value for the reference input signal for the Align and Resample Express VI, which doesn't really make sense.
 
I think you would want to use your "Audio Waveform" as both your reference signal and the second signal for the Write to Measurement File.
 
Hope this helps!
0 Kudos
Message 4 of 5
(3,260 Views)
Thanks again for the reply Jeff.

I have converted the scalar value to a waveform and now I am getting the correct output in my measurement files.

22_1_2008 Downsampling.vi
Thanks for all the help

Regards
Ben
0 Kudos
Message 5 of 5
(3,251 Views)