From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure

Dear all,

I have the a sequence structure needled into a case structure needled into another sequence structure. You can see the figure I attached. Is there a simple and quick way to add the cases of the sequence structure inside to the sequence structure outside? About the case structure I can either delete it either copy it inside all the cases of the resulting sequence structure.

Thanks for the support

0 Kudos
Message 1 of 4
(2,293 Views)

@FabioBone wrote:

 

 simple and quick way to add the cases of the sequence structure inside to the sequence structure outside? About the case structure I can either delete it either copy it inside all the cases of the resulting sequence structure.



I really don't understand what you are asking here.

 

But looking at your screenshot with where you have a 40 frame stacked sequence structure and also a 5-frame, it looks like you've already started down the wrong path with your program architecture.

 

Search the forums and LabVIEW examples for "state machine".

0 Kudos
Message 2 of 4
(2,282 Views)

That program will be a hard and valuable lesson to fix. 🙂

 

Sub vi's and state machines are your friend.

 

I guess there's also some code copies in the frames?

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,274 Views)

You have received good advice about state machines.

 

Although it may not work (depending on how the rest of the code is written), you can replace the sequence stuctures with case structures. Certainly things like sequence locals will leave you with a lot of broken wires.  Then gradually combine the case structures into one for the state machine.  You might be better off developing a state machine from the Desing Patterns or Examples.

 

Lynn

0 Kudos
Message 4 of 4
(2,260 Views)