LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
DanielRoth

Compare Node (Like "Expression Node" but the result type is boolean )

Status: Declined

Any idea that has received less than 7 kudos within 7 years after posting will be automatically declined.

Example:

 

Normally we need "Equal?" function combined with a constant.

With this idea the code is smaller ...

6 Comments
PhillipBrooks
Active Participant

You can compare two clusters directly. To get the summary comarison, you must right-click the comparison function and select "Compare Aggregates"

 

Compare Aggregates.JPG


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

DanielRoth
Member

Yes - I know this feature - but if there are 20 Items in the Cluster and you need just 2-3 ... this solution is not as readable like my idea.

 

Thanks Daniel

PhillipBrooks
Active Participant

You can compare the clusters conventionally, then AND with a cluster of Booleans; set the items that you want to match to TRUE.  Use the Compare Aggregates with the output of the first cluster AND comparison. See below...

 

I learned this trick some time ago on the LAVA forums...

 

Compare Aggregates.JPG

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

AristosQueue (NI)
NI Employee (retired)

I think that LoveVIEW's point is that just as the "Equals Zero" primitive is useful for integers as a common compare, something similar would be useful for enums etc.

DanielRoth
Member

 

@ Phillip Brooks: 1. solution is to big and the second one - i dont have any adjective for it 😉

@ Aristos Queue: Thanks for your comment 😉

 

 

in general:

my idea was to have something like a "Expression Node" but for "comparing the input with constants" with a boolean output.

please see:

 

LVIE_0001_EnumerateComparer.png

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 7 kudos within 7 years after posting will be automatically declined.