Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Apr 2, 2007


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Loading a Client Sequence File Dynamically in TestStand

2 ratings | 4.50 out of 5
Print

Downloads

Filename: dynamicclientmodel.seq
Requirements: View

In a manufacturing environment, it is very common that the product to be tested specifies the test procedure that is required. In many cases, the tester does not know in advance what kind of product to test until it acquires some data from the product itself (i.e. serial number, model number, etc). In this situation, the test system needs to provide a mechanism to dynamically load a test sequence based on some parameter.

When you run a sequence, the TestStand Engine performs the NewExecution method. This method takes parameters, two of which are the process model and sequence file to run. By default, this method sets the specified sequence file as the client of the specified process model. There may be situations where it is necessary to load a sequence file at run time. If the process model runs a sequence that does not contain Model callbacks that are defined in the process model, then the sequence should execute normally. If the sequence file does contain Model callbacks that are defined in the process model, then those callbacks may not be overridden. In order for Model callbacks to work properly, you must establish a link between the process model and the sequence file. You can achieve this by making the sequence file the client of the process model. You can use the TestStand API to set the ClientFile property of the Execution object to the desired sequence.

This example includes a modification of the Sequential Process Model that performs dynamic client sequence loading. It uses the Application Programming Interface (API) call to set the client file dynamically. To install the example, make the attached file the Station Model by selecting it on the Model tab of the Station Options dialog box. This process model is set to show its entry point in all windows. You don't need to have any sequence file open to start an execution. The sequence file to run will be selected at run time through a file dialog box.

Requirements


Filename: dynamicclientmodel.seq

Software Requirements


Application Software: NI TestStand Development System 2.0
Language(s): None

 
2 ratings | 4.50 out of 5
Print

Reader Comments | Submit a comment »

The best process model
This is the way to do it. Your should put this example into the shipping version of teststand.
- Tim Avalon, Micro Systems Engineering. tim.avalon@biotronik.com - Jul 3, 2003

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).