LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exit function in stack structure

Hi,
 
Is there any Exit function available to break off For loop/ stacked structure in between.
 
I am using stacked case structure in the event structure to save user filled data to the disk. After validation of some fields in the stack0, need to proceed to stack1, stack2 etc. If the validation fails in the stack0, dont want to pass thru other stacks using sequence locals with case structure. Is there any simple method available?
 
Kousy
 
0 Kudos
Message 1 of 7
(3,592 Views)

Hi,

In 8.5 you can add a conditional terminal in a for loop in order to stop the loop.

Try use a state-machine design instead. In this matter you can jump between different states and thereby diverge from the sequential execution order. You can find a template of this design under File>>New...

Hope it helps

Pelle S
Account Manager
National Instruments Sweden
0 Kudos
Message 2 of 7
(3,584 Views)
OK. Iam using LV8.
 
Is it possible to use state machine design to save set of user entered parameters on the front panel to disk?
 
 
Kousy
0 Kudos
Message 3 of 7
(3,563 Views)

I don't understand exactly what you mean but the state-machine can solve anything that a sequence structure can. But if you want an event-driven execution I recommend you to use the event structure in a while loop. You can also implement the event structure with a producer/consumer-design to que tasks.

Pelle S
Account Manager
National Instruments Sweden
0 Kudos
Message 4 of 7
(3,559 Views)

 

In our application,  we have a set up like Main vi & different vis called & loaded into subpanel on main vi, depends on the menu selection.

In that i need to call a vi ( having tabs comprising 5 pages of data, one save button) which will accept & save all the parameters required to run the application from the user. There I am using event structure inside a while loop. i dont  understand how should i use state machine design in this. process based events i can go for this kind of design.

Hope this helps you understand what i meant.

 

0 Kudos
Message 5 of 7
(3,528 Views)
You can add a select fuction in you state machine: If Stack(i) fails then goto stop_sequence else goto Stack(i+1). In this way you manipulate the execution order.
To be honest, I am still confused about the relation between your events and the sequences...
Pelle S
Account Manager
National Instruments Sweden
0 Kudos
Message 6 of 7
(3,524 Views)
0 Kudos
Message 7 of 7
(3,519 Views)