LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a start button instead of clicking on Run?

Hi, right now I have all my VIs within a for loop and when clicked on the Run button it operates well but I want to create a start button in my front panel so that I don't have to click on Run everytime, is there a way I can do this?
0 Kudos
Message 1 of 8
(10,793 Views)
Yes you can,

each VI has to option (vi-properties->execution) to run when opened. This will take over the function of the run arrow. To have a run button you have to do some programming afterwards which makes you're vi wait on a start button.
The express VI while loop makes a stop button which you can replace by a start button.

succes Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 8
(10,781 Views)
This would not help, because the VI needs to be running in order to react to the button. Catch 22! 😉
 
Solution: configure your VI to "Run when opened" and it will start automatically.. 🙂
0 Kudos
Message 3 of 8
(10,783 Views)
Hi Mr. Altenbach, I was wondering if there's other alternative ways that I could contact you beside posting it in NI.com?
 
Thank you.
Shoua
0 Kudos
Message 4 of 8
(10,766 Views)
Use the following code, put all of your code inside the True case, and configure your vi to run when opened.  Then when you open it, the vi will wait until the start button is pressed.  After your code finishes, it will wait again until the start button is pressed again.  To stop, put a stop button and wire it to the While loop stop sign.

Message Edited by tbob on 06-14-2006 03:22 PM

- tbob

Inventor of the WORM Global
Message 5 of 8
(10,757 Views)
Thank you very much Bob, it really help!
Thank you again.
0 Kudos
Message 6 of 8
(10,743 Views)
Thanks for the help, I was interested in this as well!  
Anthony Wong
University of Toronto
Chemistry Department
0 Kudos
Message 7 of 8
(10,739 Views)
And it is useful to have the mechanichal action of the button set to "latch when released",



so that your VI doesn't run again after finishing, because the button is still pressed, i.e. true. Fortunately most buttons used in Dialogs are per default set to this mechanichal action.
Dave

Message Edited by daveTW on 06-15-2006 01:18 PM

Greets, Dave
0 Kudos
Message 8 of 8
(10,724 Views)