LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Assistance Needed: Averaging N Amount of Waveforms

Solved!
Go to solution

@crossrulz wrote:

@AT12 wrote:

If I do this wont it just give out the unaveraged data like before?


Isn't that what you wanted?  That's your I(t), isn't it?

 

Ok, that data plot is after a divider.  This signal is what you want to add to the Merge Signals.


Are my Convert to DDT set-up OK for the case structure?

 

The file named 25 attached is what I'm recording. As you can see only the PSD is recorded - I'm not getting any averaged data from your case structure. I recorded this with 25 in the shift register constant - is this correct to average 25 acquisitions?

 

Just to confirm - it is the average of the data from the DAQ Assistant that I want to record - not the raw data as it comes (there's too much of this, hence why I just want the average recorded). Average I(t).

 

In the saved file I want Average I(t) and PSD side by side (both from the same amount of averages). This is why the data from your case structure is going into merge signals.

 

Thanks,

 

AT12

Download All
0 Kudos
Message 31 of 40
(1,234 Views)

Here's the probelem with your case structure.  On the first loop (TRUE case), you need to pass the newly acquired data through.  This will initialize the averaging.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 32 of 40
(1,223 Views)

Hi Crossrulz,

 

We're nearly there!! The data is now saved and as averages. However, there is one slight problem.

 

The case structure records each acquisition, e.g. it records the first acquisition, I'll call this Plot1, and then it records the second plot, Plot2, which is an average of the first and second (1+2)/2, and the third saved plot, Plot3, is (1+2+3)/3 etc. The last saved data, is the only one I want, i.e Plot25 (1+2+...25)/25 . How do I only save this last one to my file?

 

Once this is done it will be finished and I will be proclaiming your genius far and wide! Seriously, a big thank you with this.

 

Thanks also to everyone else who had a go at this problem. Very kind of you all.

 

AT12.

 

 

 

0 Kudos
Message 33 of 40
(1,217 Views)

Ok, so let me make sure I have this straight.  You want to acquire 25 waveforms (# subject to change).  You are going to average those waveforms.  Using the averaged data, you want to perform PSDs and save the data.  You do not need to save any of the intermediate captures.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 34 of 40
(1,215 Views)

@crossrulz wrote:

Ok, so let me make sure I have this straight.  You want to acquire 25 waveforms (# subject to change).  You are going to average those waveforms.  Using the averaged data, you want to perform PSDs and save the data.  You do not need to save any of the intermediate captures.


That's 100% correct.

For the time being leave the PSD out of it, as I can alter this later at my leisure.

 

So, I want to acquire 25 waveforms (I(t) waveforms), average them and save this average waveform without the intermediate captures.

 

The only thing wrong at the moment is the saving of the intermediate captures.

 

Many thanks,

 

AT12

 

 

0 Kudos
Message 35 of 40
(1,213 Views)
Solution
Accepted by topic author AT12

Given this clearification, your architecture is more complicated than it really needs to be.  Something like this should work well for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Download All
Message 36 of 40
(1,208 Views)

Hi crossrulz,

 

I think it works OK, but I also need to record the PSD into the same file and I don't know how to do that on your version. On my version I had the Merge Signals putting everything into the Bundle, and then syncing into one file.

 

The reason I wanted you to forget about PSD was because I was going to just wire it into the bundle after you finished! I will want to add histogram data to this also and maybe some extra simple maths, which was easily done through the merge signals. Can I still append everything in sync this way? Do I need to bring the queue system back?

 

Sorry about this,

 

AT12.

0 Kudos
Message 37 of 40
(1,203 Views)

@AT12 wrote:

Hi crossrulz,

 

I think it works OK, but I also need to record the PSD into the same file and I don't know how to do that on your version. On my version I had the Merge Signals putting everything into the Bundle, and then syncing into one file.

 

The reason I wanted you to forget about PSD was because I was going to just wire it into the bundle after you finished! I will want to add histogram data to this also and maybe some extra simple maths, which was easily done through the merge signals. Can I still append everything in sync this way? Do I need to bring the queue system back?

 

Sorry about this,

 

AT12.


I'll be honest, I never use dynamic data and it confuses the bajeegus out of me. I think it can also be confusing to new users. I prefer to stick with more native/common datatypes. I think your problem is all stemming from the use of a CSV file to log all these different things. I would suggest using TDMS files if you have it available. Mixing and matching all this into a CSV file is going to be much trickier than if you just use TDMS. It looks like you have the sound and vibration toolkit (SVTK) so you should have the TDMS logging functions for a spectrum available. It's as simple as just wiring your spectrum into it and you'll be done. You can then use the TDMS viewer that ships with LabVIEW to see your data.

Message 38 of 40
(1,201 Views)

The problem here is that you are dealing with a time-based signal and a freqeuency-based signal.  For that reason, I would recommend a separate file for the PSD.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 39 of 40
(1,194 Views)

OK - thanks for all your help Crossrulz. Smiley Happy

 

Big Kudos,

 

AT12

0 Kudos
Message 40 of 40
(1,189 Views)