LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rise time for analog input voltage reading on indicator is too slow

Solved!
Go to solution

Hi there,

 

I have an indicator on my front panel with an analog input that is reading a 0-5V signal. I am trying to get rid of some of the noise by taking a moving average of the last 8 readings.

I have tried using the express filter VI and also a moving average VI (see attached VI) example that I found which uses shift registers.

I am interested in the rise time of the analog signal. Normally, this analog signal goes from 0-5V in less than a second. Without the filter, the rise time is fast as expected and everything is fine. But when I use the filter, the indicator value update rate shows the rise time as being very slow (0-5V in 4+ seconds). Is there any way to speed this up? I do not have any graphs on my front panel, I am just looking at an indicator which has the voltage reading.

Any help is greatly appreciated.

Thanks,

 

Don't think twice.
0 Kudos
Message 1 of 3
(2,389 Views)
Solution
Accepted by topic author sb_oxinst

Unfortunately taking a moving average will automatically build in a lag when you have a step change in your input, check it out with simple numbers and a calculator and you’ll see why.

 

The most important thing you can do is to remove as much noise in your signal before it goes to your DAQ, do a search for noise on the NI site and you’ll find some useful information.

 

Depending on the type of noise you have there are still things you can do to help in your software. You need to consider what update rate you need for your signal. Many of my projects need to collect data at 20 scans/s for up to 120 channels. If I set the DAQ to scan at 2000 scans/s  I collect 100 scans in my DAQ loop and take the average of those 100 samples, this will reduce any random noise. If you have mains noise then make sure you take samples over one or more complete power line cycles (50 Hz in the UK).

 

I hope this gives you some ideas.

0 Kudos
Message 2 of 3
(2,370 Views)

I see, that makes sense. I will see what else I can do on the hardware side and then go from there.

Thanks for the example!

Don't think twice.
0 Kudos
Message 3 of 3
(2,352 Views)