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: 

greater than function not sourcing bool?

HI,

 

Boolean.JPG

This is what I have should I be converting the output of the logic gates? The error says that I need that the sink is a Bool but the source is a 1D array of Bools?

 

0 Kudos
Message 11 of 19
(840 Views)

Right-click the comparison and change the comparison mode. If you want a single boolean, select "compare aggregates".

 

(You are comparing the arrays element by element at the moment.)

0 Kudos
Message 12 of 19
(836 Views)

If I do that this happens,

 

Boolean.JPG

0 Kudos
Message 13 of 19
(834 Views)

Don't do it on the first ones.

0 Kudos
Message 14 of 19
(830 Views)

Sorry I dont follow you.

0 Kudos
Message 15 of 19
(826 Views)

For the four leftmost comparisons (the ones comparing with scalar diagram constants), leave the setting at "compare elements" instead of "compare aggregates.

 

Please look into in range and coerce for simpler logic.

0 Kudos
Message 16 of 19
(823 Views)

I'm lost. The only blocks that have the comparison option are the four blocks on the left of the logic gates. The gates dont have that option.

0 Kudos
Message 17 of 19
(821 Views)

OK have sorted it,

 

Boolean.JPG

 

Seriously though, it no wonder embedded system guys stay well away from LabVIEW when something this simple is so complicated.

 

Thanks for your help.

 

Nic

0 Kudos
Message 18 of 19
(819 Views)

Ah, sorry. Just pipe it through a AND array elements or OR array elements, depending on what you want. 🙂

 

(Do you want it to be true if all elements are true or if at least one element is true?)

0 Kudos
Message 19 of 19
(814 Views)