06-12-2013 06:27 AM - edited 06-12-2013 06:30 AM
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.....
Solved! Go to Solution.
06-12-2013 06:38 AM - edited 06-12-2013 06:38 AM
Try this
06-12-2013 06:41 AM
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:
06-12-2013 08:34 AM
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...
06-12-2013 08:44 AM - edited 06-12-2013 08:47 AM
@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.
06-12-2013 09:05 AM
ya thats true...its also working fine....