08-16-2017 03:04 PM
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!
08-16-2017 03:09 PM
@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!
08-16-2017 03:49 PM
I second Jeff's suggestion. The advantage of the Dialog Box is several-fold:
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
08-16-2017 04:34 PM
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)