LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Sensor Values, averaging and storing data

Hi all, trying to learn labview for a work project. Havent dont much at all,the little I did was a couple years ago in school and I barely learned it then...

 

Here the problem:

 

I am reading a simple analog signal for 72 vacuum sensors via multiplexers and an arduino. The arduino fetches the data from the sensors and sends out a serial message in the form of:

 

"Sensor Number" "Space" "Sensor Value" "Return"

 

0 0.050
1 -0.026
2 0.050
3 -0.064
4 0.012
5 0.012
6 0.012
7 0.012
8 -3.695
9 -3.810
10 -3.810

This goes on to 71 and then starts over.

 

I am currently able to read and then sort the data into a 2 dimension array where the first column is the sensor number and the second is the sensor value.

 

My idea was labview is seeing "5 6.789" and saying, alright sensor 5 is 6.789, save 6.789 into the variable "sensor 5." This would go on through the other sensors and when it returned to sensor 5, rather than just updating the varible with the new reading it would add in a portion of the new reading via a smoothing function (.95(N-1)+.05(N)). I would probably set this to run for a certain amount of time or till the sensors stop fluctuating by some preset value.

 

At this point I would be left with every sensor having a running average of its value. I could display this on the control screen and add indicators for sensor being ok (green), bad (red), etc. Additionally, once the readings are taken I would need to export it to an excel file so that it can be printed.

 

Does anyone have any input on how to do this? I have attached my current progress.

 

If there are better ways to sort the data in labview I am completely open to it... this was just my guess on what would be easiest. 

 

Thanks

0 Kudos
Message 1 of 1
(2,756 Views)