05-06-2015 11:12 AM
I need to program labview so that when I hit the run button graphical options will display so that I can choose which option to run
05-06-2015 11:28 AM
05-06-2015 11:46 AM - edited 05-06-2015 12:07 PM
@gates123 wrote:
I need to program labview so that when I hit the run button graphical options will display so that I can choose which option to run
if you mean hitting the run time arrow of the "main vi" then....
otherwise if it's a create state "run", then use a case statement in your "main vi". note: there are many different ways to do this
05-06-2015 02:08 PM
The run buttton in the tool bar is for development, not for a final program. I guess you are just asking how to make the program provide a selection when it starts, right? Leave the run button out of the discussion. 😉
You need to be significantly more clear with your question. Most of your words are very ambiguous and mean different things to different people:
What is a "graphical option"? How does it look like? Is this a popup?
What do you mean by "option to run" (e.g. open a different program, switch the current program to a different mode)?
05-06-2015 02:47 PM
I am developing a program to run a stepper motor. The stepper motor is a part of a spectrometer that turn mirrors that should output wavelengths at different positions of the mirror. I want to develop a program in labview so that when I press the run button the vi it should give me two options. Option 1 is to take the mirror to home and option 2 is to start running normally. so it should pop up GO TO HOME or RUN NORMALLY. I should be able to choose either one.
Thanks
05-06-2015 03:04 PM
@apok wrote:
if you mean hitting the run time arrow of the "main vi" then....
That first WHILE loop is meaningless, because the loop always exits after exactly one iteration. Just wire the boolean output of the dialog to the second loop boundary and delete the first loop for the same functionality.
05-06-2015 03:08 PM
@gates123 wrote:
I am developing a program to run a stepper motor. The stepper motor is a part of a spectrometer that turn mirrors that should output wavelengths at different positions of the mirror. I want to develop a program in labview so that when I press the run button the vi it should give me two options. Option 1 is to take the mirror to home and option 2 is to start running normally. so it should pop up GO TO HOME or RUN NORMALLY. I should be able to choose either one.
Codewise, that's just a state machine with three states. (1) Ask for mode, (2) Mode#1, (3) Mode#2.
Still seems incomplete. Does the program need to be stopped to switch to a different mode or can it be used continuously?
What if the user wants to RUN NORMALLY after GO TO HOME has completed?