LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transducer voltage average

I'm reading a single voltage signal from a pressure transducer and the signal jumps around alot.  When I hooked up a multimeter to the voltage outputs from the transducer the signal is constant.  I know that the multimeter automatically averages the signal about once a second.  My question is how do I implement the same logic in lab view.  How do I read from the transducer for a specified amount of time, average those readings and print that value to the screen?  I've used the search and examples extensively but can't seem to find my way.
Message 1 of 10
(2,995 Views)
You did not specify how you are reading the sensor output. Most DAQ devices can read a block of data (for example 100 samples per second for 1 second) and return the data in an array. You can also read single points in a loop, but the timing accuracy is much poorer. The array can be fed directly to the Mean.vi to get the average.

Lynn
Message 2 of 10
(2,991 Views)
I'm using a FP-AI-610.  Are you saying there is a function where you specify read time and then put the data in an array?
0 Kudos
Message 3 of 10
(2,988 Views)
Hello CJack,
 
Our Data Acquisition devices allow you to specify the read time. This can be done with Fieldpoint as well. The easiest way to do this is to look at a shipping example that comes with LabVIEW. Open the Example Finder (Help menu>>Find Examples) and Browse Hardware Input and Output>>FieldPoint>>Getting Started>>Analog Input.vi. This example allows you to change the control rate to specify how often you read in the data. Once you have your array of values you can use mean.vi to calculate the mean. The attached VI shows how to do with reading from one transducer. Please let me know if you have any questions. Have a great day!
 
Sincerely,
Marni S.
0 Kudos
Message 4 of 10
(2,904 Views)

Here is another example which takes the moving average of your FP-AI signal.

Hope this helps.

0 Kudos
Message 5 of 10
(2,903 Views)
Thanks very much for the responses but I'm using LV 6.1 is there a way you can capture the diagram so I can take a look at it?  Thanks....,
0 Kudos
Message 6 of 10
(2,888 Views)
Here's the one I posted:
0 Kudos
Message 7 of 10
(2,862 Views)
Here's the one David posted:
0 Kudos
Message 8 of 10
(2,861 Views)

Did these solve your problem? I am having a similar issue and I don't understand enough about labview yet to figure out whats going on.

 

So Marni or David, when I have my DAQ set up to collect data at 100 Hz from a transducer, that means that every second 1 array is produced (for that transducer) with 100 elements? So if I use the mean.vi function it averages all the elements in that 1 array, and spits out only a single number (the mean) for each second?

 

I am confused if the mean.vi function would continue and use a running average, or if it would average only the data collected for 1 second (or is there a way to set the amount of time/number of points) to average?

 

 

0 Kudos
Message 9 of 10
(2,307 Views)
The number of samples setting controls the size of the array and how often you acquire. If you request 10 samples, you acquire every 100 ms. Just basic arithmetic.

A new mean is calculated each time it is called. You could keep the samples in a shift register, a lossy queue, or perhaps the PtbyPt Mean. Look at the help descriptions and decide what you want to do.
0 Kudos
Message 10 of 10
(2,291 Views)