LabVIEW Idea Exchange

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

Growable Multiplexor or multi Cases selection

Status: New

Actually for a multi choice selection by enum or numeric,  we have 3 possibilities:

 

1) Creat multi case structure  and connect and enum to it.

2) Creat an  array and select element by index

3) use few "bipolar" selectors

 Multi case.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I think it will be better if a growable multiplexor exist and be polymorphic, with selection made by enum or numeric. Something like that:

 

Multiplexor.PNG

 

 

 

 

 

 

 

 

 

Eric

8 Comments
altenbach
Knight of NI

A better choice is to make the control itself an array of strings and always carry the data as an array, so "index arrray" is all we need. (and we already have that!). 🙂

Eric_BOB
Member
Yes , but my exempl is just a spcial case. If my signal sources are  few clusters elements or constant or dynamique sources , i can't convert it to an array control. An it's for this reason, i think than a multiplexor can be a good solution. 
rgvdh@rdf
Member

This is in a sense a generalization of the "select" function, in the same way that "compound arithmetic" generalizes the basic boolean operations.

Kosta
Member

I would like the node to be more similar to the case structure.  Specifically, I would value an equivalent of selector case labels from the case structure in this node, because it would make code easier to review, especially when working with enums.  The picture below shows a case structure with three cases and equivalent design with the growable mux.

 

Growable mux

 

Possible extensions, all consistent with the case structure:

  1. specification of multiple selector values for one choice (e.g., 1..5 to specify 1, 2, 3, 4, and 5).
  2. an explicit default value
  3. selections based on strings
Kosta
Kosta
Member

I got asked by a co-worker to clarify consistency between the proposed node and the case structure.  I hope the following picture conveys the point:

 

structue and node with arrows

 

Here is a mock-up of a node with ranges:

mux with ranges

Kosta
vitoi
Active Participant

What about demultiplexer?

Hooovahh
Proven Zealot

So this has been implemented as an XNode by someone other then NI.  Here is the post on LAVA talking about it.

 

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

 

I really like the function and on the non english board it has been updated to have other neat features

 

http://forums.ni.com/t5/Discussions-au-sujet-de-NI/Mon-dernier-XNode-Select-N-inputs/td-p/2397710/pa...

 

But this uses a function that NI says to stay away from.  I love what XNodes can do and I want to use them but until NI says it is a stable feature and supports it I won't use it...but I really want to.

ouadji
Trusted Enthusiast

thank you Hooovahh for the "product promotion"   Smiley Happy