Hi Andrew,
limiting the multi-threading capabilites of the TestStand engine is a little more complicated than setting a single variable.
The easiest thing to do is to make your operator interface only allow one execution to be launched at a time. i.e. after a "Test UUTs" button press, disable the button / menu item.
Alternatively, you could check with the UI Messages for execution start if someone tries to start another sequence, and block it there until the execution terminate, or execution end is found for the previous execution run.
If you want to block this in the sequence editor or any operator interface running this specific process model, you could modify the process model to check for a global flag that you would set when the process model gets called su
ccessfully, i.e.
Check flag
If flag says execution in progress, then goto cleanup
Else Set flag
....rest of execution entry point....
Clear flag
Make sense?
That could cause problems however, if you have a sequence which has a sequence call step in it that launches the called sequence with a new execution. You would find that the launched sequence doesn't then run.
Another option using the process model would be to modify the properties for the menu display for the execution entry point. In the process model, find the appropriate execution entry point sequence, and go to its properties. Under there is a model tab, and you should find an entry point enabled expression you could modify to disable the item if a certain flag was set in the file/station globals.
Of course, if you simply use for example "run mainseqeunce", then preventing another "run mainsequence" technically allowing two executions at once is going to be difficult in the sequence editor, but easier in the
operator interface since you can limit the menu list since you have the source code for that.
Hope that helps
Thanks
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer