LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with boolean

Solved!
Go to solution

Can anyone help me to understand how to use boolean. The way that i wired it is such that only one boolean should light up as the input value is the same for both sequence but when i run the code, both boolean are constantly lit up. Can someone help me please.

0 Kudos
Message 1 of 8
(1,158 Views)

Hello,

 

We cannot know what is inside your constant double comparison arrays.

Please join your .vi with default data and then we can try it.

 

Have you tried to probe the comparison outputs to check its boolean values?

0 Kudos
Message 2 of 8
(1,145 Views)

Hi, im not sure what probe means im kinda new to labview but here is the vi. Appreciate any help i can get

0 Kudos
Message 3 of 8
(1,138 Views)

That is the probe in the tools palette :

 

Defaphe_0-1648020540990.png

 

Hum lot of comments because first your vi is unmanageable :

- no sub-vi or functions

- too big and need at least 3 screens to see all of it

 

Depending of your licence you have maybe access to training and core 1, do at least that one.

 

Then for your issue two of your arrays are empty, thus comparing nothing and your And boolean is giving you a True. Give some good values to those arrays and it wil be better.

Defaphe_1-1648020843454.png

Defaphe_2-1648020882386.png

 

 

 

Message 4 of 8
(1,129 Views)

@Defaphe wrote:

 

Defaphe_1-1648020843454.png

Defaphe_2-1648020882386.png

 


To expand on what Defaphe wrote, the array value is not 50 and 41, those are 50th and 41st values in your array, which are empty.

If you are trying to compare values in an array to a single number, you don't need an array with that number. You can have it like this instead

 

AeroSoul_0-1648023821570.png

 

Message 5 of 8
(1,118 Views)

Thank you for the clarifications. Could you tell me where to find that boolean symbol that you are using in your second picture and also how do i compare to a specific range of values that i require. For eg. i need 40 - 50 and i need a boolean to tell me whether my array is between that range or not.

0 Kudos
Message 6 of 8
(1,113 Views)
Solution
Accepted by topic author MBSHIRAZIZ

Here an example to check if all values from an array are between two values.

 

snip_compa.png

Which boolean symbol do you mean ?

Here the comparison symbol from the palette.

 

Defaphe_0-1648025814800.png

 

Message 7 of 8
(1,106 Views)

I see okay thank you very much.

0 Kudos
Message 8 of 8
(1,097 Views)