06-28-2010 12:54 PM
I have a program whereby I require it to run in a certain sequence.
First the run button is clicked, It will prompt the user to choose a test type (combo box). After choosing the test type, the user will then enter in the numeric and numeric 2 controls. After entering these controls, the user will click on a play button to start the case function.
Attached is the VI. The numerical controls inside doesnt make sense. I'm only put them in just for asking these question.
How do i alter this program to have the VI once started running to prompt the user to choose a "test type" (combo box selection) and than VI pauses(so the user has time to key in the numerical controls) and continues running when the user clicks a "play" button? I'll also need to know how to make the play button as well...
Thanks.
Solved! Go to Solution.
06-28-2010 01:09 PM
missed out attachment 😛
Here it is.
06-28-2010 02:15 PM
You could use a state machine architecture. To access a template navigate to File -> New.. and choose the State machine design pattern from the Design Patterns available. You can have a tab control, that can switch from one page to the other while going through each state. Give it a shot and let us know when you have any issues.
06-28-2010 02:31 PM - edited 06-28-2010 02:33 PM
@BPBP wrote:
I have a program whereby I require it to run in a certain sequence.First the run button is clicked, It will prompt the user to choose a test type (combo box). After choosing the test type, the user will then enter in the numeric and numeric 2 controls. After entering these controls, the user will click on a play button to start the case function.Attached is the VI. The numerical controls inside doesnt make sense. I'm only using this for asking these question.How do i alter this program to have the VI once started running to prompt the user to choose a "test type" (combo box selection) and than VI pauses(so the user has time to key in the numerical controls) and continues running when the user clicks a "play" button? The test type selection will also need to be fed into the case determination after the play button is clicked.
How do i alter this program to have the VI once started running to prompt the user to choose a "test type" (combo box selection) and than VI pauses(so the user has time to key in the numerical controls) and continues running when the user clicks a "play" button? I'll also need to know how to make the play button as well...
Thanks.
Quick and dirty method is: put the user interaction in a loop. See attached pcture. Use the One Button Dialog before the loop to alert user to do what they need to do.
However, to do it again without restarting the VI, you need a state machine, as mentioned.
I don't know what you need with the Play button. See my "OK" button.
06-28-2010 02:51 PM
If you want the button to say "Play", you can change the OK on an OK button to Play by double clicking on the OK text. A word of style. Make all your outputs go to the right. The VI should read from left to right. You have some outputs going up and some going down. You also have some wires going right to left. They should go left to right. Too many wire bends. Some of your wires at the bottom run into the border and disappear. All of this makes it hard for someone else to read and understand your vi. Please clean it up a bit before posting here.
06-28-2010 03:26 PM
This is the strat to what you are looking for. You will still need to impliment a state machine achitecture.
06-28-2010 03:47 PM
Now that is good progrmming style. Neat and easy to read.
Kudos to aeastet.
06-29-2010 07:18 AM
Thank you TBOB
06-29-2010 07:54 AM
Hi aeastet,
Can you save the example in older version than 8.6? I can't open V9.1 vi.
06-29-2010 08:18 AM
Here you go.