NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using same Process Model Sequence in Different Test Systems

Hello,
 
   I am using TestStand for 2 different test environments. I am using the same process model sequence (sequential model) for both test environments. The test sequences that run in these test environments, use callbacks (i.e. PreUUT, Post UUT, etc.) to perform the different pre-test (i.e. initialize the unique test equipment for a test environment) and post-test routines (i.e. close intrument handles) that are unique to each test environment, in the sequential process model sequence.
 
   Since I am still architecting how TestStand will fit into these 2 different test environment, a major issue I am trying to resolve is how to handle the different pieces of test equipment that is unique to each test environment, yet still use the same process model sequence for each test environment. Here is the scenario. Test environment 1 uses a DMM and GPIB controlled DC power supplies. The data for these instruments (i.e. GPIB address, session handles, etc.) are stored in a TestStand container. This container is passed between the MainSequence of the process model (container is actually a local variable in the Process model sequence), the PreUUT and PostUUT callbacks, and the MainSequence (callback) of the test sequences. Test environment 2 uses different test equipment such as a logic analyzer and scope. Again, the data for these instruments are stored in a unique container, different  from test environment 1.
 
   My concern is that I would like to use the same process model sequence for both test environment (since both test environment processes are similar), yet have this process model sequence handle the different test instrument containers used in the different test environments. THis becomes an issue when I need to pass the instrument container from teh MainSequence of the process model to the PreUUT and PostUUT callback. The probelm is that I am using the same process model for both test environments, yet each test environemnt has a unique test instrument. container. Presently, the only solution I can think of is to make all of the instrument containers StationGlobal variables and simply call these global containers from the callbacks.  Again keep in mind I am trying to user the same process model sequence to handle different test instrument containers for each test environement.
 
  I am hoping there might be a better solution than using globals and that someone else out there might have come up with a better solution. Hopefully I have clearly explained my dilemma. If not, please feel free to follow up with any questions, and hopefully someone might have a better solution.
 
Thank you
0 Kudos
Message 1 of 4
(2,997 Views)
Hi,

    I am unclear on some parts of your application.  First, if you are using PreUUT and PostUUT callbacks for instrument initialization and cleanup, these will be executed in each iteration of your test loop.  For each Unit Under Test, you would reinitialize and cleanup your instruments.  Instead, you should use the PreUUTLoop and PostUUTLoop callback.

    Are you attempting to pass your containers as parameters to the various sequences in which they are used?  Using globals would suffice in this situation.  Is there a particular reason you did not want to use globals?  Instead of Station Globals, you may instead use File Globals, which will be distributed to your seperate test environments.

    To make things cleaner, you may also try implementing a custom data type of the containers you are using for your various instruments.  This would only work, if your instruments have the same types of data, however.  You could use the instrument container type to hold the various instrument information, even in different test environments.  That way, you could maintain your Process Model.

Regards,

Tyler T.
0 Kudos
Message 2 of 4
(2,979 Views)

Hi Tyler T.,

     Thank you very much for your response. Here is my follow up to some of YOUR questions.

      My apologies for the confusion regarding which callbacks I am using. I am using the Test UUTs entry point, and I am using the ProcessSetup and ProcessCleanup call backs to initialize and close the instruments, respectively.

      Yes, I am passing the containers as parameters between the callbacks in the model sequence file as well as to the MainSequence of the UUT's test sequence (i.e. the MainSequence callback step in the Test UUTs entry point sequence).

       I am hesitant to use globals, probably because of my software programming background where I try to limit the use of global variables (harder to trace) versus passing varaibles from one function (or in this case, sequence) to another. Because this container gets passed between different sequence files, I do not think that using a File Global will work.

      Would it be possible for you to elaborate more on the custom data type? The container I am using is a custom data type, persay, residing in my own type palletes.ini file, however there will be a different container for each test environment.

      Again, I appreciate your time and response.

Thank you,

Jim

 

0 Kudos
Message 3 of 4
(2,970 Views)

Hi Jim,

So this is my understanding. You have two different sequence files that are run for two different Test Environments. These two environments uses two different data structures to perform some initialization on two different instruments.

The best way to do so without any modification to the sequential process model is to create Sequence File Globals. So lets say that you have test sequence 1 and test Sequence 2. The two data structures will be DataStruct 1 and DataStruct 2. So open your Test sequence 1 in the sequence editor. From the "View" drop down box on the sequence editor, select "Sequence File Types" and create your DataStruct 1 here. Similarly do that same for Test Sequence 2, create DataStruct2.

Now use the ProcessSetup and ProcessCleanup callback. Again you shouldn't modify your process model. Go to Edit Menu >> Sequence File Callbacks. Select your callbacks and click add. This will automatically add your callbacks to your Test Sequence files. Now you can add the code relevant to your instruments here and you have access to your datastructure as well. The beauty with callbacks is, you can override the ones in your process model by the ones in your sequence files. This is automatically done, when you place the callback in your sequence file. Now we have accomplished what you wanted to do without a single modification to your process model.

I hope this helps

Sijin Karayil

National Instruments

0 Kudos
Message 4 of 4
(2,952 Views)