LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run in a particular sequence

Solved!
Go to solution

 

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. 

 

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.

0 Kudos
Message 1 of 18
(3,490 Views)

missed out attachment 😛

Here it is.

0 Kudos
Message 2 of 18
(3,484 Views)

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.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 3 of 18
(3,472 Views)

@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.

Richard






0 Kudos
Message 4 of 18
(3,461 Views)

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.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 18
(3,447 Views)

This is the strat to what you are looking for. You will still need to impliment a state machine achitecture.

 

Tim
GHSP
Message 6 of 18
(3,436 Views)

Now that is good progrmming style.  Neat and easy to read.

Kudos to aeastet.

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 18
(3,424 Views)

Thank you TBOB

Tim
GHSP
0 Kudos
Message 8 of 18
(3,389 Views)

Hi aeastet,

 

Can you save the example in older version than 8.6? I can't open V9.1 vi.

0 Kudos
Message 9 of 18
(3,380 Views)

Here you go.

Tim
GHSP
Message 10 of 18
(3,371 Views)