LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
X.

General Comparison Operator (as an Express VI?)

Status: New

I rarely use boolean operators to solve logical problems. Instead, as I would suppose the majority of users, I use them to respond to a set of conditions and perform actions in response to different cases.

The current set of operators:

 

ScreenHunter_002.jpg

 

is, to say the least, quite difficult to use. For instance, for the third operator, the help window provides the following explanation:

ScreenHunter_003.jpg

 

Now if you invert one of the inputs, good luck to figure out at first glance, when you revisit your diagram, what the outcome of the comparison will be.

In fact, what we need is some kind of matrix operator for which we type in the output of the comparison of A (input 1) and B (input 2) for the different cases:

 

ScreenHunter_005.jpg

 

Here I have supposed the inputs are "modified-booleans" with an "undefined" case, and the output of the comparison is an integer value, just to illustrate that operators for non-booleans could be treated the same way.

In the strict boolean operator case, there would be no "U: case and the output would be T or F. It would be a simple matter (I guess) to let the boolean operator icon show the outcome of the comparison in a way similar to something like that:

 

ScreenHunter_009.jpg

In general I find useful to have non-boolean outputs (as in the matrix above where integers were used) to be able to handle complex situations. Of course the icon would have to reflect the values selected by the user...

Which brings the issue of the configuration of this operator. Considering that the interface for this operator would be quite sophisticated, it would make sense to provide it as one of the Express VIs (such as the "Formula" or "Comparison" functions).

 

22 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

And obviously you can fill the whole Truth Table (2^N rows, N columns, where N is the numebr of inputs) by pressing the "Fill" Button, or directly fill the Truth Table by clicking on the LEDs (that was the original design, but I figured that it would be difficult to remember which input is which, hence the Input entry mechanism I suggested above).

TomOrr0W
Member

Looking at the comments on this idea, I ended up searching invert, negate, bubble, and circle (skipping anything that was already marked duplicate).  I figured I might as well link the related ideas.  I ended up dropping most of the ideas that I linked to this idea, as it doesn't really involve inversion bubbles (so the link only goes one way).

 

Strongly Related:

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Simplifying-Boolean-expressions/idi-p/1890963