LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop while loops inside a case structure

The event structure has a timeout terminal - the hourglass in the upper left corner. When unwired, as in your VI, or connected to a negative value, the structure will wait forever. When a nonnegative value is wired to the terminal, the structure will wait that many milliseconds. If no event has occurred within that time, then the timeout case will execute and the wait will start again.

Lynn
0 Kudos
Message 11 of 17
(1,794 Views)
You need Event Cases for Page:Value Changed and Stop:Value Changed (otherwise the Event Structure does not execute). I would also suggest to place the boolean indicator in the corresponding Event cases.

Felix
0 Kudos
Message 12 of 17
(1,793 Views)

All,

I put a timeout event in, and all is working OK now.  Thanks for all your help.   I will mark this thread as completed.

0 Kudos
Message 13 of 17
(1,792 Views)

@smercurio_fc wrote:
Based on the modified example you posted I can't replicate what you're seeing. I wrote up a small VI to do what you explained, and the loops stopped whenever I changed tabs. Attached is the sample VI I wrote. Can you run it and see what happens?
 


Could you edit this to have multiple tabs working at the same time?

0 Kudos
Message 14 of 17
(1,391 Views)

@Punsach wrote:

Could you edit this to have multiple tabs working at the same time?


You revived a 7 year old thread and is is not clear what you actually want.

 

A tab is a mostly cosmetic FP element.

 

  • Define "working".
  • Define "at the same time"
0 Kudos
Message 15 of 17
(1,385 Views)

 


@altenbach wrote:

@Punsach wrote:

Could you edit this to have multiple tabs working at the same time?


You revived a 7 year old thread and is is not clear what you actually want.

 

A tab is a mostly cosmetic FP element.

 

  • Define "working".
  • Define "at the same time"
In this program, the user selects which tab they want to see and only one is active at a time. I want it to be that multiple tabs can function simulatneously so that the user can select which ones are working and which ones are not. 

 

0 Kudos
Message 16 of 17
(1,383 Views)

The code does not need to care which tab is visible. All code parts can run at the same time, even if they are working on controls/indicators that are on tabs that are currently not visible. You don't even need to connect the terminal of the tab structure to anything.

 

If you have problems with this, please attach a simplified version of your code that illustrates your problem.

0 Kudos
Message 17 of 17
(1,381 Views)