From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview

Hi
 
I am developing one application in labview in which i need to measure the temperature sensors data coming from three different channels &  average them.  This thing need to be done for another set of three temperature sensors.
 
Then i need to find out the difference in mean temperature of these two groups. (One group means three temperature sensors)
 
Please suggest how should i incorporate this. (Should i try to use array or developing one vi to measure signal coming from three sensors & then use it as sub VI in another program where i can use it twice for two groups & then find the difference)
 
 
Vaibhav
0 Kudos
Message 1 of 2
(2,145 Views)
The general rule of thumb is that if you're doing the same thing in more than one place, then one should reconsider making the repeated code into a subVI. As far as where to break it down ... that depends. You could have a subVI that acquires the readings and returns the array of readings. Whether or not this subVI returns a mean is more of a convenience issue. There's already a Mean VI that can be used for an array of values. So, if your subVI returned just the array you could plop it down twice and then use the Mean VI to get the mean of each group, and then use it again to get the mean of the groups. If the subVI already returned the mean (implying that bit of code is inside the subVI), then you would just be getting the mean of the groups.
0 Kudos
Message 2 of 2
(2,117 Views)