LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best method for implementing a next button in a program with a series of pauses between parts?

We have a sequence with three(or more maybe) pauses we'd like implement where the operator must a next button before the sequence continues on. 

In the first section, some motors will move to home and the operator will want to move some things around before hitting a button to continue the process, the motors will move somewhere else, the program will pause again until the operator hits "next" then some loops with Data Acquisition and another loops with some state machine timings will start as well. The program will pause again, operator unloads some stuff, and they will then hit another "next" button to end the program.

 

What's generally considered to be the right way to go about something like this? Should I be using event structure or would implementing another set of state machines controlled by an incremental button be enough?  

 

Thanks!

0 Kudos
Message 1 of 4
(2,956 Views)

@jtboik wrote:

We have a sequence with three(or more maybe) pauses we'd like implement where the operator must a next button before the sequence continues on. 

In the first section, some motors will move to home and the operator will want to move some things around before hitting a button to continue the process, the motors will move somewhere else, the program will pause again until the operator hits "next" then some loops with Data Acquisition and another loops with some state machine timings will start as well. The program will pause again, operator unloads some stuff, and they will then hit another "next" button to end the program.

 

What's generally considered to be the right way to go about something like this? Should I be using event structure or would implementing another set of state machines controlled by an incremental button be enough?  

 

Thanks!


Use a Two (or Three) button Dialog.  Very effective!Smiley Wink


"Should be" isn't "Is" -Jay
Message 2 of 4
(2,953 Views)

I second Jeff's suggestion.  The advantage of the Dialog Box is several-fold:

  • It is "invisible" (i.e. not on your Front Panel), but pops up (like ... a Dialog Box ...) when you need to use it.
  • It displays a Message that can be specific to the task, be multi-line, can even be changed at Run-Time.
  • The Buttons can be Yes/No, True/False, or whatever is best (there is a 3-button option, as well).
  • When you finish making your choice, the Dialog box conveniently vanishes.

You'd put this code (it can even be in a sub-VI so it's out-of-the-way of your main VI) where you need to make a decision.  Until you push the button (and "export" a choice), Data Flow keeps you right there, but once the choice is made, you can use it to do whatever is appropriate.

 

Bob Schor

Message 3 of 4
(2,927 Views)

I don't know what you mean by "...another set of state machines ...". How many do you have?

 

Typically it would just be inserting a new state ("wait for user") into the existing state machine. It can be a button or a dialog popup. (If using a button, you could grey/disable anything that should be off limits at that specific state. Often only a few things are not allowed, so you can leave the operator a multiple choice subset of all possible actions. (Sometimes in addition to [next] you might want a [Quit], [skip one state], [repeat previous state], [start over], etc available. Giving a user only one choice is limiting and can sometimes be annoying 😉 Imagine the operator detects an equipment malfunction, missing wire, leak, etc.. Forcing him to proceed through all the rest of the states is not nice)

Message 4 of 4
(2,912 Views)