Example Code

Multi-window TestStand Operator Interface Using the .NET MDI API

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Teststand

Code and Documents

Attachment

Description

Overview

This example shows how to display each execution and sequence file in a separate window in a C# User Interface using the .NET Multiple Document Interface (MDI) API.

 

Description

The user interfaces that ship with TestStand 4.0 and later use a single window to display sequences and executions. The user must then use a ListBar control to select which execution or sequence file to display in the window.

If you prefer to display each execution and sequence file in a separate window, you can use this full featured example instead. This example creates a separate MDI child window for each execution and sequence file, providing a look and feel that is similar to the TestStand Sequence Editor.

 

multiWindowdotNet.png

 

Hardware and Software Requirements

Multi-Window Interface for TestStand 2012_NIVerified.zip

TestStand 2012 or Compatible

Microsoft Visual Studio 2005 or Compatible

.NET Framework 4.0

 

Multi-Window Interface for TestStand 4.0_NIVerified

TestStand 4.0 or Compatible

Microsoft Visual Studio 2005 or Compatible

.NET Framework 2.0

 

Steps to Implement or Execute Code

  1. Unzip folder contents
  2. Open TestExec.VS2005.csproj (2012 example) or TestExec.csproj (4.0 example) in Visual Studio

 

Additional Information or References

  • The source code in this example is written in C#.
  • The TestStand 2012 version of this example was developed in Visual Studio 2010 using the TestStand 2012 Interop assemblies. It is built using the 4.0 version of the .NET framework, and may not work correctly with older framework versions. Because TestStand 2012 is the first TestStand version to provide native 4.0 support, consider using the legacy version of the example if you are using an earlier TestStand version. This version of the example adds support for editing sequences, and has all of the functionality of the full featured user interface included with TestStand.
  • The TestStand 4.0 version of this example was developed from a TestStand 3.0 Operator Interface, so it is not as functional as a TestStand 4.x Full-Featured User Interface, but it is more functional than a TestStand 4.x Simple User Interface. This version of the example allows you to execute sequences and configure Model, Database and Report options. It also allows you to access any TestStand tools you have installed and debug sequences as they are executing. However, it does not allow you to modify the sequence by editing existing steps or inserting new steps.

 

Example Program: NI TestStand Featured Examples

Example Program: Multi-Window TestStand User Interface Example (LabVIEW)

Example Program: Dynamic LabVIEW Subpanel in a TestStand User Interface

Example Program: Passing Large Amounts of Data from a TestStand Sequence to a TestStand User Interfa...

Mark M.
Applications Engineering
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
TrialsriderAZ
Member
Member
on

All,

I am trying to do something similar to the above without the MDI in the equation, though.  I have a parallel model set up with "two" sockets for testing two DUTs side by side.  I am having trouble attaching the axExecutionViewMgr (0 and 1) to the correct socket on the screen.  I have attempted watching the axApplicationManager_DisplayExecution event in order to find the correct executionID, but this is not tied to the socket and continues to increment.  

In addition, i have tried programming to grab the "RunState.TestSockets.MyIndex" from the sequenceContext but it always returns zero at the above event.  My test screen looks something like the attached image.

Any help would be appreciated.

 

ToddScreenShot.png