NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Test stand - selecting hardware resources

Solved!
Go to solution

Hi all,

I am using TestStand 4.2.1 with the LabVIEW adapter (LV 2009). 

I am developing a test sequence that at the moment runs on the sequencial process model, and will later on be run on the parallel process model. I am also developing the OI in LabVIEW for this test sequence. The test involves usage of a SMU and a NISE Virtual device ( I preferred, up to this point, using NISE subVIs in the LabVIEW modules instead of the TestStand built-in NISE facilities).


1) In order to select the hardware device resources ( SMU reference, NISE virtual device name, NISE routes to be connected, etc) I have a dedicated LabVIEW module (VI) that runs first, in the Setup section. It is followed by other "Open&Configure" modules for each hardware resource It is a basic interface (dialog) with drop-downs that allow the user to select resources. However, if I want to use the parallel model for 4 UUTs, it will display 4 such dialogs; also, at each run, for each UUT, it will re-display the dialog.

My question is: how can I pass the handles/references to the hardware to be set up to the sequence from the OI I am building, in LabVIEW? Should these be passed as sequence parameters (params. for MainSequence)? The operator should select resources only once, when he starts the OI; after that everything should run without needing to reselect the device resources.


2) If I implement the parallel process model, how can I access each socket's (parallel execution of the test sequence) variables, etc. At this point, I`m doing this using the "Test Stand - Get property" subVI (passing the sequence context and the lookup string to this subVI). In case I have 4 running sockets, how do I get each socket's sequence context? Or is there another way to access properties? ( I see "ThisContext.RunState.TestSockets" under variables in TestStand ... is this a hint? 🙂

 

Thanks in advance for your help!

Have a great & productive day,


eng. Paul HARFAS
PhD Student
University POLITEHNICA of Timisoara, www.upt.ro
Faculty of Electronics and Telecommunications, www.etc.upt.ro
Applied Electronics Department, Room B114, http://www.ea.etc.upt.ro/
V.Parvan av, no.2, 300223 Timisoara, ROMANIA 

0 Kudos
Message 1 of 14
(5,702 Views)

Hello Paul,

 

In answer to your questions:

 

Question 1: There are several ways of doing this. 

Way #1: In this way you will add a dialog before the standard UUT dialog, so that user only needs to select information once. This dialog will save the information in a FileGlobal that can be accessed from each parallel sequence. These is how this would be done: 

1. Make a copy of ParallelModel.seq from C:\Program Files\National Instruments\TestStand 4.2.1\Components\Models\TestStandModels and move it here: 
\Components\Models 
Rename and open this copied seq file. 
2. Modify the Test UUTs Entry point in your new process model. 
3. Go to Start UUT Info Dialog and open this sequence 
4. In the Run UUT Info Dialog, add a step at the beginning of Main that will collect your hardware info. This step should save the data into a file global. 
5. From your sequence file (not process model), get the data saved in the File Global by accessing RunState.Caller.FileGlobals.YourGlobal. This will access the file globals from the process model, which is the "Caller" 

Way #2: 
This way is similar to way number 1, except that you actually modify the default dialog. The source code for the dialog DLL (modelsupport2.dll) here: 

C:\Program Files\National Instruments\TestStand 4.2.1\Components\Models\TestStandModels\ 

This dialog could save the data as a File Global as well. 

Question 2: ThisContext.Locals will give you locals for the parallel execution which check it. You don't have to do anything special to get the right local, using the TestStand Get Property VI. 

National Instruments
Applications Engineer
Message 2 of 14
(5,652 Views)

Hi Adam,

I solved (1) by adding a ProcessSetup sequence callback in my .seq file, no need to modify the model.

 

Regarding (2): I know how to acces anything from inside TestStand, I was referring to accessing local variables from a LabVIEW environment, I am building an operator interface. So I need to access locals for each test socket (I have 4 sockets) from LabVIEW. Can you please direct me how to achieve that?

 

All the best,

Paul HARFAS

0 Kudos
Message 3 of 14
(5,641 Views)

Each socket has it's own, separate set of local variables so I'm not sure what you are looking for.

Message 4 of 14
(5,634 Views)

Hi.

I know each socket has its own local variables. That's what I`m trying to access from the LV program.

Ex: let's say I have a boolean Locals.TestVar defined, and in my LV interface, I want to display 4 LEDs that show the status of Locals.TestVar for each of the 4 test sockets.

 

Thanks for your help,

Paul

0 Kudos
Message 5 of 14
(5,627 Views)

Hello Paul,

 

Whenever you access the locals it will be for the Test Socket that is calling that variable. I am attaching a sequence and a VI that shows how this is done. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
Download All
0 Kudos
Message 6 of 14
(5,604 Views)

Thanks very much for your reply. I have only 1 think to kindly ask you: can you please save the .vi for LV2009 and the .seq for TS 4.2.1.83? Thanks very very much.

Paul

0 Kudos
Message 7 of 14
(5,602 Views)

Hello Paul,

 

Here are version that will work in TestStand 4.2.1 and LabVIEW 2009. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
Download All
Message 8 of 14
(5,599 Views)

Hi.

Thanks for the new files. However, this is still not what I am referring to.

I am building a user interface VI (let's call it TestUI.vi), which calls the TestStand execution manager and starts an execution. I am NOT accessing TestUI.vi from the .seq file! Please take a look at <NI install root>/TestStand/<TestStandPublic>/UserInterfaces/Simple/LabVIEW. Based on that, somewhat modified, I started building my own TestUI.vi. I want to display, in this VIs front panel, simultaneously, variables from each test socket. Again, I mention, TestUI.vi is not called by any step from the .seq file, it is in fact quite the opposite - TestUI.vi "calls" the .seq file. 

 

All the best,

Paul

 

0 Kudos
Message 9 of 14
(5,597 Views)
Solution
Accepted by topic author Paul_Harfas

Hello Paul,

 

I am attaching an example that does this with a modified version of the LabVIEW Simple OI. It is displaying the variables from the Test.seq file in an array. This is just an example and will have to be modified in order to work with your application. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
Download All
Message 10 of 14
(5,584 Views)