LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with making average of three different levels

Hello

          

            I Freshly Started to Use Labview and im doing some project, I have problem with making average of Three levels(water), for example 3 different levels should be added only when There level is 20-80%, and should not be added to average if any level is not within the limit. which Function should I use? Please any one suggest.

0 Kudos
Message 1 of 3
(1,054 Views)

Hi MMM,

 

whenever you have terms like "if x then y" you should use a case structure...

For checking a range you could use the InRangeAndCoerce function.

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 3
(1,023 Views)

MMM@13 wrote:

 

I have problem with making average of Three levels(water), for example 3 different levels should be added only when There level is 20-80%, and should not be added to average if any level is not within the limit. 


You need to explain in more details, because your problem description is ambiguous.

 

So you get three values in the range of 0-100% and you only want values in the range 20-80%. If only one of the three values is out of range, do you still want to average the other two or take no average at all? When you say the average should be "added" we typically talk about this function, but then you need to explain what other value it should be added to. Could it be that you mean "appended", e.g. to an array of history data? Could it mean sent to a chart or not??

 

Please explain. Maybe you could attach a simplified copy of your VI.

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 3 of 3
(1,003 Views)