LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected aggregate comparison behaviour when using cluster or array inputs

Solved!
Go to solution

Is this a bug, feature or user incompetence? It has just caused a bug which took me a long time to find.

 

It appears that when using a greater than or less than comparison with cluster inputs and the comparison node set to 'compare aggregates' it only returns the result of the first element rather than doing an 'and' on all the individual element comparisons.

 

The equals/not equals comparisons do not have this behaviour.

 

Is this expected behaviour or not? I can't find anything in the help documentation detailing this.

 

Niatross_0-1675698467590.png

 

0 Kudos
Message 1 of 5
(940 Views)
Solution
Accepted by Worle

I think it is documented here.

 

If you want a specific behavior, do a "compare elements" followed by "AND array elements" or "OR array elements" on the boolean output, depending on the desired result.

 

Message 2 of 5
(924 Views)

@altenbach wrote:

On a related note, also have a look at this old post.


Besides being amazed by your ability to reduce code size to postage stamps, extremely impressed how you can recall a post from 10 years ago.

Message 4 of 5
(834 Views)

I suppose I am just surprised at what I consider a very unintuitive behaviour.

0 Kudos
Message 5 of 5
(813 Views)