LabVIEW Idea Exchange

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

New Compound Arithmetic Function - "Equal"

Status: New

Hi,

 

My idea is as simple as the title states - an additional Compound Arithmetic function that works like "Equal?", but with multiple inputs and single boolean output.

 

I believe it is fairly easy to implement such functionality, and I can see no other single block that could compare multiple values, and offer easy expansion as well.

The easiest way to build similarly working VI (that comes to my mind right now) below.

Przechwytywanie.PNG

 

 

13 Comments
McTOM
Member

altenbach, Min&Max idea is cool as well, and I've just checked it works on strings as well. Good job!

I don't think that "Not Equal" would be necessary, since you can always invert the output. Note that there are no "NAND", "NOR", and "NXOR" functions implemented in Compund Arithmetic.

 

Guys, to make things clear, all that mattered for me is simplicity of the code. In my applications the amount of compared integers is around 10, so performance wasn't my top priority, and my code in first post was supposed to present the functionality only. I am well aware that as a CLAD I still have much to learn. 🙂

 

I've made a VI for my own purposes, which accepts an array as an input, and returns compound "equal". Still not as clean as it could get, but two blocks are far better than my previous suggestion. But creating morphs of this fuction for all data types is still a pain in the back, so I sticked to Min&Max solution for now.

 

I'm quite surprised that many of you didn't find this kind of feature useful. I guess you must be right, if it would take 20+ years of LabVIEW development to introduce such a basic functionality as "a = b = c = d". It must mean that nobody compares several values in their applications. 😉

Jeff-P
NI Employee (retired)

CAR 377978 discussed in this thread was fixed in  LabVIEW 2014.  For a more complete list of bugs fixed in LabVIEW 2014, check the LabVIEW 2014 Bug Fixes. You can download an evaluation copy of LabVIEW 2014 at http://www.ni.com/trylabview/ or if you have an earlier version of LabVIEW installed and an active SSP subscription, you will be able to download the latest version of LabVIEW through NI Update Service.

 

Regards,

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments | Certified LabVIEW Architect 

 

McTOM
Member

If someone is wondering, the CAR mentioned by Jeff-P was merely mentioned in the discussion, and the idea concerned something differend. 😉