ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows cross button Problem.

Solved!
Go to solution

Hi 

 

I am Trying to replace a Stop button of a while loop by windows cross button by using event structure. Looks like the VI window closes but it does not stop. I am using this vi as a sub vi. So the block diagram might look stange. Please try running the main vi. Can you help me figure out what is wrong? I want the same funtionality for both the cases.

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

The windows x button closes the panel. It will not influence the running operation.

 

To do what you want, you need to create an event structure with a "windows close?" filtering event, discard the event and send a TRUE to the stop terminal of the while loop.

0 Kudos
Message 2 of 4
(2,896 Views)
Solution
Accepted by babu726

Here's a quick draft. Make sure the subVI is set to open the front panel and close afterwards, then close it before running.

 

 

0 Kudos
Message 3 of 4
(2,892 Views)

Hi Altenbach,

 

 Thanks. It works after a little modifications.

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