LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an application & it runs once,suspended is ticked

When I build an application I cannot seem to stop it running when it is opened, I use the VI properties and tick the suspend when called option but the VI still operates for at least one iteration.
0 Kudos
Message 1 of 3
(2,601 Views)

Having an exectuable run when opened is really the desired operation. It's generally considered bad style to have theuser of the app have to click on the run arrow on the tool bar. In fact, it's generally good practice to hide the toolbar completely in an executable. Most applications will have a "start" button than can be clicked after the user has entered front panel data. There's a couple of different ways to do this. You can use an event structure. You can have a separate while loop that runs prior to your main loop that exits when the start button is pressed (i'm not a big fan of this method). You can put a case statement around your code in the main loop wired to the start button.

If you just want to disable the run when opened property, that can be changed. From the app builder's VI Settings tab, select the upper level VI and click the Edit Build Settings button and change Run When Opened to "no".

Message 2 of 3
(2,591 Views)
The "Help" for Suspend when called reads, "Suspends a subVI when called and waits for user interaction."

Note that it specifies "subVI". Setting this bit does not affect your top level VI the same way it affects a subVI.

If you need to stop your top level VI, try something like in the image. This will stop everything until you hit the button configured in the Event Structure.

Ed


Message Edited by Ed Dickens on 07-28-2005 10:27 AM



Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 3
(2,589 Views)