LabVIEW Idea Exchange

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

Resizable Boolean and Numeric Operations

Status: New

NXG had a neat feature I miss in LabVIEW 20xx and that is resizable nodes for operations like OR, AND, and Add.  There are other nodes that could benefit from this too like subtract and multiply, but here is the idea.

 

Resize Nodes.png

 

I'm aware that the Compound Arithmetic is a resizable node that covers the examples I have here.  But often times I will start with just two inputs so I'll use the OR, then later on I'll need to add a node and now I need to replace it with the Compound Arithmetic and then add the other inputs.  If the suggestion is to just use Compound Arithmetic, then why even have an OR node?

18 Comments
GregR
Active Participant

The reason that subtract and divide were not growable in NXG is potential confusion. If we make them growable, do they also support inversion? Without supporting both growth and inversion, then subtract and divide are a subset of the functionality of add and multiply. With supporting both growth and inversion, then subtract and divide are an alternate representation of the same capabilities as add and multiply. In the end we decided that having multiple representations for the entire set of add/multiply operations was not desirable and if they were going to be subsets, then we'd stick with the smallest subset which is 2 inputs only.

 

A different approach is that subtract and divide are not their own nodes. They were special case visuals of the add and multiply nodes. A 2 input add with the second input inverted would use the subtract visual. Growing would switch to the add visual and show the inversion. Shrinking back down would switch back. This eliminates the "2 ways to represent the same operation" issue.

 

What exactly would you want the behavior of subtract and divide to be?

 

 

ThamS
Member

For me it would be easier to just right click and select replace to arithmetic compound rather than resizable gate (operation node).

 

I agree with GregR , It will make confusion. Especially for beginners, like me.


Hooovahh
Proven Zealot

Another option that I think is pretty easy for NI, is to replace the non-growable nodes on the palette, with the Compound Arithmetic set to that mode.  I mean if the Compound Arithmetic is a super-set of the node, why even have it?  I get that there could be confusion with subtract and divide.  That being said I do occasionally use the invert on the input and output.  I guess what I'm discovering is the Compound Arithmetic is just so flexible it makes me regret using other nodes, that I then later have to replace.  From a readability standpoint I guess Compound Arithmetic loses. 

 

I just keep going back to the fact that NI specifically wanted this feature in NXG.  And after using it I realized it would be nice to have in the other LabVIEW variant.

AristosQueue (NI)
NI Employee (retired)

> replace the non-growable nodes on the palette

 

I mentioned that idea off hand many years ago at a lunch gathering, and a marketing person had a mild panic attack about us removing the product logo node from the product. 🙂 I have no idea if that would still be a concern today, but I imagine some people would rest easier if the triangle stayed around.

 

_carl
Member

I would totally use this. Find myself replacing AND, OR, and add all the time with the compound arithmetic node, either because I want to add in an extra input, or because I want to invert one of the terminals.

 

(As for division and subtraction...I wouldn't expect them to expand)

GregR
Active Participant

The visual are not the only reason I consider the compound arithmetic node insufficient to replace the non-growable nodes today. The other issue is whether it is one node with a configured operation vs multiple nodes. There is no justifiable reason to support selection of the operation directly instead of using replace like the non-growable nodes do today.

 

Change those 2 things and the difference between making the arithmetic nodes growable and replacing them with the compound arithmetic node is just an implementation detail. The important thing is the resulting behavior in the product.

wiebe@CARYA
Knight of NI

I have also noticed in the past (LV13?) that a compound arithmetic is slower then the function. This is only noticeable in very tight loops, but still. 

BertMcMahan
Trusted Enthusiast

Seems like a solid Quick Drop shortcut could swap your Add/Multiply/etc with a CAR node. I'm too busy to write one at the moment, but I'd definitely install it if someone else did 🙂

crossrulz
Knight of NI

BertMcMahan, it already exists.  type "car" (the shortcut for Compount Arithmetic Node) and then Ctrl+P (for rePlace).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
BertMcMahan
Trusted Enthusiast

Well holy cow. I knew about the replacement tool, but I didn't know it could auto-configure the CAR like that. I would've assumed it would just plonk down a CAR configured as normal, but it doesn't!

 

If you replace a Divide with a CAR, it puts in a CAR configured as a Multiply then inverts the second input. Same with Subtract- it puts in a CAR configured as Add, then inverts the second input. Very neat 🙂