LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I compare single value with multiple value...

Solved!
Go to solution

Hello,

I want to compare one value with multiple values, how can it possible ?

Here in attachment I tried to design same logic but I got problem that when I entered value in y that is compared with only minimum value of x, I don't want that I want to compare y value with all the x value and then if y is less then x while loop should be stop.

I want to do so because in my program some time I didn't get result what I want, for example x values is 4,5,6,7,8  and y value is  suppose 6 then while loop should be stop but here it consider only minimum number and its 4 here so while loop is not stop even y is less then 7 and 8. So I want to compare y value with all the entered values of x and if y is less then any of x values then while loop should be stop and led should be ON.

Please guide me how can I do so.....

0 Kudos
Message 1 of 6
(3,841 Views)

Try this

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 6
(3,828 Views)
Solution
Accepted by topic author AnkitRamani

I don't get it?  If y is less than the minimum value in X then it is less than all of the values in X.  This is what I would do anyway:

Code Snip.png

Lewis Gear CLA
LabVIEW UAV

Message 3 of 6
(3,823 Views)

Thank you very mach for your help..

may be i have solved this ....i have made one change in my vi that instead of min. i select max and max. value is compare with the value of y and then if y is less then the max. while loop will be stop other wise its run continuously.

this is working fine...

any ways thanks again for your help and time...

0 Kudos
Message 4 of 6
(3,798 Views)

@AnkitRamani wrote:

Thank you very mach for your help..

may be i have solved this ....i have made one change in my vi that instead of min. i select max and max. value is compare with the value of y and then if y is less then the max. while loop will be stop other wise its run continuously.

this is working fine...

any ways thanks again for your help and time...


I have to agree with Lewis - his way is more efficient.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 6
(3,791 Views)

ya thats true...its also working fine....

 

0 Kudos
Message 6 of 6
(3,777 Views)