Quantcast
Viewing all articles
Browse latest Browse all 69264

creating an array/averaging question

I'm new to labview and I'm having problems understanding how to create an array.

 

I'm using a Arduino Uno as my DAQ and when I take an anolog measurement I've seen a lot of fuctuation in my measurement. I know with arduino you can perform simple averaging using the "Get Finite Analog Sample" function, but I know I won't be using an Arduino long term and trying to figure out the proper way to do it.

 

When I average with the Arduino IDE I usually have code that looks like this:

 

float analogsum = 0;

for(int i = 0; i < 10; i++){

    analogSum += analogRead(analogPin); //where analogRead converts the analog value to a 10-bit digital value\

}

average = analogSum/10;

 

I'm trying to create this same function in LabView. The only way I can imagine to sum the analog value from each iteration, would be to store each value in an array, and then add them together and divide by the number of iterations in my for loop.

 

How would I do this in Labview?


Viewing all articles
Browse latest Browse all 69264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>