LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
DeltaJ

Some Changes to Case Structures

Status: Duplicate

Hi All,

 

I'd like to put up an idea I had about a 'pass through' node for case structures. I had the idea when working with the in-place element. What I would like is a pair of nodes - like shift register nodes - where the input and output are identical unless the inner loop is wired. In this way it would be like a shift register on a FOR LOOP when the index is wired to zero.

 

The idea of this would be to clean up case structures - in particular where you might have 3 or 4 wires going through multiple cases in a state machine. You have to make sure they are all wired up and they clutter up your block diagram. With these nodes you only have to work on the wire you are actually changing in a particular case and then ignore the rest of them.

 

I also though that if you wire a cluster to a 'pass through' node you could have the option to 'Unbundle/Bundle Elements' similar to the option in the InPlace Element Structure. Please note this change I'm suggesting is cosmetic/useability - I don't think this should have inplaceness associated with it. I reused the nodes because they were easy to copy and paste.

 

I've added an example of what it could look like - this is a simple case structure to initialise a cluster, increment it and exit the state machine. In the initialise state the inside of the 'pass through node' is wired and then goes into the shift register. For the increment case it is unbundled, incremented, rebundled and passed back out. Note that for both these cases the False boolean is passed through the shift register - without a wire - and then enters the stop node. In the exit case the cluster data is passed through the case without a wire and could be read outside the loop by wiring to the shift register (if I'd thought to draw it) whlie in this case the boolean now reads true and the loop is stopped.

 

LV_Case_Structure.png

 

 The second change I'd like to suggest is to allow a case structure node to be associated with a specific element in a cluster. Allow us to wire a cluster - which contains at least one string, enum, boolean etc - straight to the case structure node and out the other side. Then right click on the case structure node to choose which element the case structure reads!

 

LV_Case02.png

 

 And of course allow the 'case structure node' to double as a 'pass through node' also and I would be very happy programmer! 

 

I look forward to your comments - and Kudos,

 

Thanks,

Dave

 

 

 

 

PS if anyone has a better name than 'pass though node' please holler - it sounds worrying like a laxative;-)

5 Comments
Darin.K
Trusted Enthusiast

As you have drawn it, the passthrough node looks an awful lot like the dreaded sequence local, the biggest abomination to strike LV, so bad it brings the potentially useful stacked sequence down with it. It does, however, sound a bit like the following:

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/A-better-way-to-define-the-output-of-unwired-output-tu...

 

As for Clusters, there is this idea:

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Cluster-to-Case-Selection/idi-p/944803

For a single element, I do not see a huge win here. The Unbundle by Name is functional and self-documenting, in your picture it is not clear which element is linked. Now for multiple elements there is potential, but personally, I would be happy to unbundle the cluster and use multiple case selectors in this situation:

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-Multiple-Case-Selectors/idi-p/1301780

tst
Knight of NI Knight of NI
Knight of NI

This has also already been suggested - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-feedthrough-shift-register-nodes-to-Event-and-Case...


___________________
Try to take over the world!
DeltaJ
Member

Thanks for the comments guys - it seems the good ideas are already taken.....maybe next time!

 

If the forum moderator could mark this as duplicate that would be great.

 

Dave

 

 

GregR
Active Participant

Other than having the wire actually drawn, the first suggestion provides the same functionality already provided by the "Linked Input Tunnel". The desire to not see the wire does not seem to warrant introducing 2 ways of doing the same thing.

JordanG
NI Employee (retired)
Status changed to: Duplicate