LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elegant Way to replace a case structure with an event structure

Since an Event Structure is like a Case Structure in some regards, I would think there would be an option to Replace With - of course with some modification of the triggers.  The issue is I would rather not delete the 
content of my case structure as this would be like starting from scratch.  But  I can't find a way to do a replace with between these two structures

Message 1 of 4
(3,046 Views)

They are similar in the sense that they are a mutually exclusive way of selecting what code to execute.

 

They differ greatly in how the selection is done.

 

Show us what you have now and what you would DREAM would be possible and perhaps one of can offer an idea.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(3,044 Views)

Yes, they are really quite different. Conditional Disable Structure will also decide which code gets run, but it works nothing like a case structure or event structure.

 

If you want to wait for button presses you could do it like the JKI state machine where one of the cases has an event structure inside of it.

0 Kudos
Message 3 of 4
(3,013 Views)

Step one: Give kudos to this idea.

Step two: wait for a long time, because it does not have many votes.

 

Comment:

Yes, I agree it would be useful to do a simple 1:1 conversion of the frame contents to the new structure. Cleaning up later would still be easier than to start from scratch. All the code and tunnels would still be in place. A good start!

 

(OTOH, we have completely useless tools, such as the capability to convert a stacked sequence to a case structure (or vice versa). I can only imagine the mess that would create, especially if there are many sequence locals. 😮 Has anyone actually ever used that?)

 

CaseStacker.png

Message 4 of 4
(3,001 Views)