LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start Button and User Inputs

I would like to create a start button for my VI for when I export the program to be used without being able to edit. 

 

I know that I can select start VI upon opening and I have then created a start button by using a while loop where the stop button is linked to the start button. (So loop finishes and VI continues once the stop button has been pressed). However, my issue is that my VI has user inputs that are required and when I press run and then try to change the user inputs before pressing start, these are not registered. 

 

Is there a way to make this work so that the VI can be started via opening and user inputs can be changed before pressing start?

 

Thanks

0 Kudos
Message 1 of 7
(4,100 Views)

sr.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 7
(4,077 Views)

Thank you, would you mind please explaining how your solution works. I am not familiar with the functionality of event structures. 

 

By 'code to process inputs' do you mean the rest of my VI?

 

Thanks

0 Kudos
Message 3 of 7
(4,071 Views)

http://zone.ni.com/reference/en-XX/help/371361K-01/glang/event_structure/

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 7
(4,059 Views)

I have solved this issue by putting my entire VI into a flat sequence with the start button before it. I can then change inputs before pressing the stop button. 

0 Kudos
Message 5 of 7
(4,047 Views)

Flat structure - is an evil; you'd better use Event Structure. Moreover, it's very easy to use it, nothing complicated - but it gives much more benefits, then flat structure.

 

Sincerely, kosist90

 

logos_middle.jpg

Check out new features and changes in LabVIEW 2017!

0 Kudos
Message 6 of 7
(4,023 Views)

Design your code as a proper state machine. The distributed version should be set to "Run when opened" and start up in an idle state.

 

You are throwing things like "solved" and "flat sequence" together in one sentence and that tells us that it is probably not solved.

 

Please attach your code so we can give constructive comments on how to do it better. 😄

0 Kudos
Message 7 of 7
(4,018 Views)