LabVIEW Idea Exchange

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

Growable Select Function

Can we have a select from multiple sources?

 

An expandable function with a selector, which returns the type default value if select is -1 or more than items number.

 

I guess NI guys can implement something more efficient than a build arrary/index.

 

multiple select.png

 

[admin edit: renaming idea to 'Growable Select Function' to better reflect the nature of the idea. Previous name was 'Multiple Select'.]

9 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

Let me rephrase your suggestion.

Your diagram illustrates a shortcut for this:

 

Screen Shot 2015-09-05 at 12.13.32.png

 

Seriously?

AristosQueue (NI)
NI Employee (retired)

Jimchertz: A reasonable idea. I can see its utility. However, if you're coding this today, use a case structure, not a build-array-then-index-array. You'll have better performance and lower memory usage.

 

Low priority... not something I'd strongly push for personally as the case structure works well for me, but I see the appeal. I'll put my kudos on the idea.

 

X: It's just a growable Select node. Such larege selector nodes are useful enough as "switch" statements in text languages. I suspect FPGA could make a fair amount of use out of such a node... avoids the heavier syntax of the case structure.

 

I used the compound arith node to model the idea.

 

JIM: One big question... how do you want to handle out of range errors? Just the same as index array (take the nearest index)? Or do you want error terminals? That's one advantage of the existing case structure syntax -- you get to decide these things on a case-by-case (no pun intended) basis.

Untitled.png

crossrulz
Knight of NI

Duplicate: Growable Multiplexor or multi Cases selection


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
AristosQueue (NI)
NI Employee (retired)

Ah. Thanks, crossrulz. I thought it was out there somewhere.

X.
Trusted Enthusiast
Trusted Enthusiast

I kudoed that other suggestion 3 years ago, but I am having doubts now... Probably because I have gotten used to drop a case structure each time I have more than a couple of alternatives.

Darren
Proven Zealot
jimchretz
Member

@

 

AristosQueue (NI)
NI Employee (retired)

jim: I asked to make sure you'd thought about the other option and consciously rejected it.

The link is in the duplicate idea.

jimchretz
Member

Well Ouadji made the Xnode, awesome!

 

https://lavag.org/topic/16842-my-xnode-select-n-inputs/