LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getting correct waveform

Hi
I am using LabView 7.1 on Windows xp. I am acquiring the pressure transducer data using DAQ Assistant. The sampling frequency is set at 10 kHz and no. of samples as 2000. I require the data for 0.2 seconds only but as the operation where the data is to be taken is transient in nature, I have to acquire it for about 8-10 seconds. When I acquire the data for 0.2 seconds, it shows the correct waveform as shown in attachment. But when I acquire the data for 8-10 seconds then it shows the straight lines instead of true waveform as shown in the attachment. For getting the data for 8-10 seconds, I have added while loop to make the continuous run. The vi for 0.2_sec_data_acquisition is shown in the attachment.

I need the correct waveform for the period of about 20 seconds out of which I have to chose and extract the data of 0.2 seconds.

I would be highly obliged if anyone helps me.

Thanks

Pramod
0 Kudos
Message 1 of 8
(3,516 Views)

How did your VI get to be so large on disk (~740kB)?

Your problem may be the number of data points you are trying to display.  2000 samples for 0.2 seconds would show up on a graph reasonable well.  8-10 seconds would be 80,000 - 100,000 data points on a graph that may only be hundreds of pixels wide.  So several hundred to a thousand data points would have to be averaged together to show up as a single pixel on the graph.  If you zoom in on a section of the longer acquisition, do the curves start to look more like the shorter acquisition graph?

0 Kudos
Message 2 of 8
(3,484 Views)
Hi
Thank you very much for your reply.
I tried as per your suggestion and got the correct waveform.
But I am not getting last 0.1 seconds data as compared to actual acquisition data. The total acquisition time is 8-10 seconds.
I am replaying the data using the Read LVM.

Pramod

0 Kudos
Message 3 of 8
(3,453 Views)

Hi Pramod,

I am guessing that when you say you got the correct waveform, you took the suggestion to zoom in on the graph and you were able to see the correct shape of the waveform.

I am a bit confused about your last statement about not getting the last 0.1 seconds of data.  Do you mean that if you acquire data for 8 seconds your measurement file only has 7.9 seconds of data? Do you mean that if you zoom in on the graph to look at a transient event that should span 0.2 seconds, it only lasts 0.1 seconds?

How are you stopping your VI? Are you using the abort button, or do you have a stop control wired to the conditional terminal of your while loop?

Jared T.
0 Kudos
Message 4 of 8
(3,426 Views)
Hi Jared

Thanks for your reply.

You are right.>>Do you mean that if you acquire data for 8 seconds your measurement file only has 7.9 seconds of data?
I am stopping the code using stop button on the front panel.

My another problem is I am saving the data of 2 channels separately and using those data to do the cross-correlation. However, the waveform is not coming straight and in the range of -1 to +1.
I have attached the image file of front panel and cross-correlation code.

Can you please suggest a solution for this?

Thanks

Pramod
Download All
0 Kudos
Message 5 of 8
(3,406 Views)

Hi Pramod,

I think an understanding of the way that LabVIEW does cross correlation in the express VI may help explain what is going on in your measurement.

Open LabVIEW and go to Help >> Search the LabVIEW Help…  Do a search for “convolution and correlation” (to look at the functionality of the Express VI you are using) and then do a search for “crosscorrelation”  It is possible that the Express VI is computing the correct correlation, but not in the form that you desire it.  I believe what you are referring to is a normalized correlation as the cross correlation function can return any number.

I found an example program in LabVIEW that may be of help.  Open LabVIEW and then go to Help >> Find Examples.  Do a search for correlation and then open the Correlation Analysis VI. This appears to have the correlation you are looking for.

Jared T.
0 Kudos
Message 6 of 8
(3,347 Views)
Hi Jared

Thanks for your reply.
I am using LabView 7.1.  I searched in the Help>>Find example but find only Statistics solver.vi. I didn't found Correlation analysis.vi.  Is it available in LabView 8.2 only?

You are right. I need the normalized cross correlation which can be obtained by dividing the sum of product of two different series by the standard deviation. I went through the help on cross-correlation and saw that it calculates only the sum of product of two different series.
I have to divide this by the standard deviation. Is there any other Express vi or any other tool to do this?

Pramod
0 Kudos
Message 7 of 8
(3,323 Views)

Sorry Pramod.  I didn’t catch that the Correlation Analysis VI is part of the Advanced Signal Processing Toolkit.  If you have this toolkit available to you, then you could use this example.  I don’t believe there is another VI that will do it directly. You might need to use the lower level VIs like the Crosscorrelation VI and apply any normalization yourself.

Jared T.
0 Kudos
Message 8 of 8
(3,290 Views)