11-08-2023 02:56 PM
I'm looking at the TestStand 2017 Operator Interface examples, specifically the C# version (i.e. Program Files (x86)\National Instruments\TestStand 2017\UserInterfaces\Simple\CSharp). The example shows command buttons setup for "Test UUTs", "Single Pass" and "Run <selected sequence>". How would I go about setting up a ConnectCommand to "Run <selected sequence> using Single Pass" ?
I'm not seeing an obvious way to implement that.
Thanks,
Michael
11-09-2023 01:51 PM
Running a client sequence file using an entry point (single pass / test uuts ) of a NI process model (sequential/parallel batch) always run MainSequence of the client sequence file.
Run <selected sequence> does not invoke any process model.
11-10-2023 10:36 AM
Yes, I understand that's the way the example is currently set up.
My question is, how do I change the logic so that the "Run <selected sequence>" button uses the Single Pass process model? That ability is available in the standard TestStand sequence editor menu, so I assume there must be a way to implement that functionality in the example. My MainSequence has a number of subsequences, and I'd like the selected subsequence to be run in Single Pass.
11-12-2023 01:01 AM
@mostrowski wrote:
Yes, I understand that's the way the example is currently set up.
My question is, how do I change the logic so that the "Run <selected sequence>" button uses the Single Pass process model? That ability is available in the standard TestStand sequence editor menu, so I assume there must be a way to implement that functionality in the example. My MainSequence has a number of subsequences, and I'd like the selected subsequence to be run in Single Pass.
Also in SeqEdit, Run <selected sequence> never uses an entry point (like Single Pass) to a process model.
11-13-2023 11:02 AM - edited 11-13-2023 11:06 AM
I believe the only way to do this is to ConnectCommand to Run Selected Steps using > Single Pass
11-14-2023 02:31 AM
I have to partly rectify what I have written:
using the TestStand API directly, you can start start a new execution using an EntryPoint for an arbitrary Sequence
11-14-2023 08:08 AM
Thanks ee-jallen, using the CommandKind_RunSelectedStepsUsingEntryPoints_Set command seems to work, but only if steps of the selected subsequence are also selected. Unfortunately selecting a subsequence in the Simple OI Example doesn't also automatically select all the subsequence's steps, so I'm now trying to figure out how to make that happen. Steps are not displayed in the Simple OI Example, and I wouldn't want them to be, so I need to somehow programmatically select all the subsequence's steps. (I temporarily added a steps UI, manually selected steps, and the subsequence could then be run using CommandKind_RunSelectedStepsUsingEntryPoints_Set)
11-14-2023 09:21 AM
If a Sequence Call step is selected and Run Selected Step using Single Pass, the sequence is executed, and all of its steps will run. I use the Full Feature Custom UI, so I'm not sure why you don't get the same with the Simple UI
11-14-2023 09:57 AM
Yes, I agree the default Simple OI functionality seems to differ a bit.
When I'm using the TestStand Sequence Editor to execute a subsequence using Single Pass, it's steps are automatically selected. Also, the MainSequence 'Setup' and 'Cleanup' groups are run. When using the Simple OI to execute a subsequence using Single Pass the steps are not automatically selected, and the MainSequence 'Setup' and 'Cleanup' are not run. Yet the Single Pass report is still generated.
11-14-2023 12:20 PM - edited 11-14-2023 12:49 PM
The Setup and Cleanup are being executed if you run via the Process Model (Single Pass). They are not being displayed because in the Simple OI example has turned it off or if tracing is turned off or tracing is fast then you'll likely not see it as it flashes on the screen.
To easily prove this; set the StepGroupModes view settings of the View Managers to show all groups.
Are you using C# example. Put these before axApplicationMgr.Start();
// show all step groups at once in the execution sequence view
axExecutionViewMgr.StepGroupMode = StepGroupModes.StepGroupMode_AllGroups;
// show all step groups at once in the file sequence view
axSequenceFileViewMgr.StepGroupMode = StepGroupModes.StepGroupMode_AllGroups;
axApplicationMgr.Start(); // start up the TestStand User Interface Components. this also logs in the user
Also, you can force the single view to switch back and forth while idle and running by adding this at the beginning of MainForm_Load(...) with:
axApplicationMgr.StartExecution += AxApplicationMgr_StartExecution;
axApplicationMgr.EndExecution += AxApplicationMgr_EndExecution;
and then the event handlers look like this:
private void AxApplicationMgr_EndExecution(object sender, NationalInstruments.TestStand.Interop.UI.Ax._ApplicationMgrEvents_EndExecutionEvent e)
{
axSequenceFileViewMgr.ConnectSequenceView(axSequenceView);
}
private void AxApplicationMgr_StartExecution(object sender, NationalInstruments.TestStand.Interop.UI.Ax._ApplicationMgrEvents_StartExecutionEvent e)
{
axExecutionViewMgr.ConnectExecutionView(axSequenceView, ExecutionViewOptions.ExecutionViewConnection_NoOptions);
}
Please also note, that the default behavior for the Sequential Single Pass entry point is that the UUT serial number prompt will not be displayed.