LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

6 temperature displays - with an average option

Hi,
 
I currently have a variety of probes im measuring and show the temperaturs on the screen, these are also linked to alarms. Sometimes though not all the probes will be connected, ether due to failure or them not being required for a particular test.
Id like to be able to average the value of any probe off the others. So i have put buttons beside each value and if its clicked in, that on screen value will immediately be the average of the other 5, the operator will be able to set a maximum of 4 out of the 6 probes to average, leaving a minimum of 2 probes always showing the actual values i.e. you could have 4 probes showing the average of the other 2, 3 probes showing the average of the other 3 etc etc
Is there a nice "slick" way of achieving this rather than nested case structures?, or a sequence of case structures?
 
Many thanks
 
Mike
 
P.S Nearly forgot, running LabVIEW 8.5

Message Edited by MikeW1973 on 10-15-2007 03:46 AM

Message Edited by MikeW1973 on 10-15-2007 03:46 AM

0 Kudos
Message 1 of 2
(2,689 Views)
One way to do this would be to create an array of your sensor values. If a sensor is not working or disabled, use a default value of "NaN". Use a for loop to check if the indexed value is NaN. If it's NOT NaN, then append the value to a new array. then sum the contents of the new array and divide by the number of elements.

Note that if you pass the array into a waveform chart, the NaN values will not plot.




0 Kudos
Message 2 of 2
(2,661 Views)