LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Run And Stop Buttons on Front Panel, rather than using the toolbar run/stop

I would like to make my vi more user friendly by creating start and stop buttons on the front panel. I havent found much info on how to create them. I have created a boolean stop button to stop my FOR LOOP.

-Chris
0 Kudos
Message 1 of 4
(6,911 Views)
Chris

attached is a very basic solution to give you an idea of one option. if i understood your question properly
0 Kudos
Message 2 of 4
(6,911 Views)
Creating the buttons is easy - just select the style you want from the Boolean palette. What you need to do is change your diagram and the VI properties. To have a VI automatically start running when opened, open VI Properties by selecting that under the File menu or right clicking the VI's icon. Select Execution and check the Run when opened box. If you need the user to enter some data or change parameters before running the program, there's a couple of ways to go about it with a front panel Start button. You could have a separate while loop with just the start button in it and connect an output of that to a main while loop. This creates data flow and ensures that the start while loop executes before the main. You could create a simple state machine. T
here's a couple of shipping examples. Just open the Example Finder and enter state for the keyword. You could also use the Event structure. Again, there are several shipping examples. Instead of doing a search, you could also browse the Example Finder and look at what's underneath the Building User Interfaces topic.

p.s. I don't think you created a stop button for a for loop as there is no way to stop a for loop. What you can stop is a while loop.
Message 3 of 4
(6,911 Views)
Chris

here is another option using an event structure
Download All
Message 4 of 4
(6,911 Views)