LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is a good averaging function to use?

Hello - I have a lot of static on my vi's graph and was told it is because I am on a laptop. So, I would just like to average the wave and get the number so I can graph it. Any suggestions? Thanks!
0 Kudos
Message 1 of 13
(3,299 Views)
Hello:
I am somewhat surprised that some one would pass off "static" on your signal as being caused by the use of a laptop! I use different laptops for data acquisition regularly, and with proper precautions, noise/static/garbage is normally not a problem.
I would strongly advise that you expend some effort in removing the noise at the source by means such as grounding/shielding/isolation, etc., as you will be much happier with the effort expended in this way, rather than you would be with simple averaging/filtering. As a last resort, if you cannot get the noise/interference down to an acceptable level, then a simple running average filter might be of use. However, use of the filter on extremely "noisy" data can mask information that you may wish to see
. Filtering is always a trade-off in this reguard.
Good luck

Dave
0 Kudos
Message 2 of 13
(3,299 Views)
Well then I think the problem is my cheapie 6024E daq board and the 68LP connector block (also an NI product) that is unshielded. I don't know how to do sheilding other than buying it with the board, so do you have a nice way to protect my signals from static that I could throw together myself?

Thanks!
0 Kudos
Message 3 of 13
(3,299 Views)
Something I did during my student times:
Wrap the cable in tin-foil (Aluminium foil) and ground it.

This works surprisingly well.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 13
(3,299 Views)
Well, again I come the the defence of NI. I have used the 6024 board with the 68LP block successfully. However, if you are in a noisy environment, then placing the 68LP in a metallic enclosure, grounding the board common to the enclosure, and running a separate ground braid from the metallic enclosure to a GOOD earth ground will often do wonders. The problem arises from the notebook/power supply combination being often floating off ground. A good indication of this is the fact that most laptop power supplies are switching supplies, and many do not have a 3-wire AC supply plug, hence no gound on either input or output of the supply. In fact, the switching AC power supply can become a source of spurious noise if you are trying to measure very
low level signals, such as the output of strain gauges or thermocouples.
I have had considerable experience removing noise/garbage from pc based DAQ systems, but I still do not consider myself an expert. There have been whole books written on the subject, so please do not take my comments as the be-all and end-all on the subject.
My general rule of thumb is to try and get a good earth ground (not the green wire in an AC line cord) as close to the DAQ board/computer combination as possible, and shield everything else that you can to this point. Also, try not to have more than one ground point in your measurement setup, as this is asking for common-mode ground voltage problems.

Good luck, this is not an easy subject to cover/solve.

Dave
0 Kudos
Message 5 of 13
(3,299 Views)
Hello - I have yet to take an EE class so I can wrap it with AL but how do I "ground" it? Thanks!
0 Kudos
Message 6 of 13
(3,299 Views)
The thing I don't understand is that in MAX the line shows up a great deal smoother. Also - the average reading doesn't jump all over the place like the average reading in my vi. What is the difference or why can't it just look like MAX? thanks...
0 Kudos
Message 7 of 13
(3,299 Views)
One way is to connect to the foil with a crocodile clip with an attached cable, and connect to the earth of the power outlet.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 8 of 13
(3,299 Views)
If the traces look significantly different in Max, then part of your troubles could be in the vi that you have written. Could you possibly post it, or at least the DAQ part of it so that we could be in a better position to attemp to assist you.

dave
0 Kudos
Message 9 of 13
(3,299 Views)
One thing I did was added the "mean.vi" function which helps a lot! However, like you said....I could be missing important changes in load cell values b/c it just squishes it together and agerages it anyway. The vi is attached.....thanks....
0 Kudos
Message 10 of 13
(3,299 Views)