LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform averaging results using labview from O-scope

Solved!
Go to solution

I cannot open the file since the labview version I used is 8.5. Can you send it as image file?. Or, do you have a labview version 8.5 or lower?  Thank you, you have been really helping me a lot.

0 Kudos
Message 11 of 26
(1,638 Views)

I looked at the modified code, it works fine. However, I could average the waveform like this just by control scope manually. By doing this, the labview can control the average inside the O-scope(it can be averaged 4,16 64,128 times, that is the setting inside the o-scope). What I need is to average the waveform more besides averaging the signal by using o-scope, so that I can get more clean signal. For example, scope can average signal 64 times, then I use labview code to average 100 times. Then total, it will give me 64*100 times. That is why I need to use "iviscope configure number of averages" rather than use the function in the instrument drivers. Do you know how can I do that? Do I need to use shift register? Thanks. 

0 Kudos
Message 13 of 26
(1,628 Views)
Solution
Accepted by topic author Weiye Zhu

Sorry, I misunderstood what you wanted to do.

 

The IVI function will not be able to perform any more averages than what you can do manually. It is simply a limitation of the scope. So, instead of that inner for loop in your original code, create a shift register on the main while loop. Outside the loop, take a single reading (Y array) and wire that to the shift register. This will initialize the loop. Then inside the loop, get the Y data from the scope waveform. Add this to the value from shift register on the left side. Divide by 2, Wire this to the shift register on the right side. You can set the while loop to iterate for x number of times based on how many averages you set the scope itself to do.

 

See if the attached is closer to what you want.

0 Kudos
Message 14 of 26
(1,621 Views)

Thank you so much! That's something I need. How can I tell from this code that how many averages is done by the loop?

0 Kudos
Message 15 of 26
(1,616 Views)

Watch the iteration terminal of the loop. Say you set the scope to acquire 64 waveforms and the loop only runs once. The iteration count will be 0. You have acquired 64 averaged waveforms outside the loop and 64 averaged waveforms inside the loop - 128 in total. The iteration terminal starts at 0 and if my math is correct after a long day, the number of waveforms = ((i+1) * averagecount) + averagecount).

0 Kudos
Message 16 of 26
(1,609 Views)

Thank you for your help yesterday. I got a very similar program regarding to average signal today.. I read signal from a function generator. DAQ board and BNC cable are used to communicate with computer through labview. After I trigger the signal, the signal is sent to a while loop to average. I wrote a very simple code to average and record the data. It should work, but it doesn't. Can you look at my code and help me out?

0 Kudos
Message 17 of 26
(1,595 Views)

Sorry, I've never used the Express VI Trigger and Gate and think the dynamic data type is just evil and never, ever use that.

 

In you inner most loop, you do not do any acquisition of a signal so I don't understand what would be averaged.

0 Kudos
Message 18 of 26
(1,585 Views)

Then how can I trigger the signal without using that express VI trigger? Then, get rid of that express vi trigger, do you know how to average the signal which is coming out of the DAQ assistant? Can you show me how to do that?

0 Kudos
Message 19 of 26
(1,580 Views)

You think the Express VI triggers an acquisition? Well, it doesn't. Put another DAQ Assistant inside the loop so you are actually acquiring a signal so that you can get a subset with the Express Trigger. Read the help for it, that is what it does.

0 Kudos
Message 20 of 26
(1,572 Views)