NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

different copies of same global variables for different test stand instances

Hi,

 

We are having our present Test Stand sequence steps access a global variable(LV global variable) which contains information such as GPIB addresses, other unique information such as I2C addresses, other address information which is unique to each instance of Teststand.

The reason we are using globals is because different steps of the same sequence each access this information for communication and other tasks.

 

We now have extra setups and were wondering if we could use the same teststand sequences, but load a different set of globals for different test sequences on the same computer. 

 

I do know that we can have multiple instances of Test Stand running at the same time. 

 

Will it be possible that we have one instance access one set of globals and other access other set ? Since the LabVIEW global file ( Globals.vi ) is the same name, how can we acheive this ? 

 

Will using sharing variable help ?

 

Regards,

Sambit

0 Kudos
Message 1 of 8
(4,132 Views)

You can certainly run multiple instances of TestStand at the same time.
Those instances can run the same VIs but you need to make sure that they are
configured to run as Reentrant VIs. Open your Globals.vi  right click on
the  VI icon»VI Properties. Under Category select Execution. Check Reentrant
execution
, and select Prealocate clone. Now each VI will run in its
own memory space.


If you have two VIs open that each have the same global variables, each VI will
use the same variables, meaning each copy of Global.vi would go to the same
GPIB address. I would not recommend attempting to run multiple VIs that are
accessing the same global variables, because it would be impossible to
determine which VI has taken "control" of the variable. Instead I
would recommend passing a parameter to the LabVIEW VI each time you call
it in TestStand. By passing a parameter, you will completely remove any

Message Edited by Richard S. on 01-26-2009 02:09 PM
Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 2 of 8
(4,095 Views)

Richard,

 

 Thanks for the reply. 

 

  What kind of parameter do you want us to pass to the global vi ? A station identifier indicating whether TS station 1/ station 2, etc indicating which TS instance is accessing that variable ? 

 

 So do we need to have some kind of boolean/numeric control in the global vi which will switch between the different data sets and supply those variables based on which TS instance it is being called from ... ? 

 

 Can you attach an example global vi to clarify what you have in mind.

 

 Thanks again for the reply !!

 

Regards,

SambitRobot Very Happy
0 Kudos
Message 3 of 8
(4,075 Views)
Here is an example of sending a LabviewIO control to a VI through the params in TestStand. The device name is changeable via a popup message, but this could be easily changed, so the operator would select "test device x" or "test device y" and you could save default values in a local variables container. The sequence calls params.vi inputs your value, and reads the value back out. This should give you a general Idea of how you could architect your sequence.
Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
Download All
0 Kudos
Message 4 of 8
(4,049 Views)

Here is a slightly better example, you can open two instances (or 22 instances though i wouldn't recommend it) of TestStand and each instance will call the same VI, but because it is reentrant they will all act independently of one another. In this sequence you select which COM you would like to test by selecting a button. Note that the result of "Com2" and not "COM2" is the expected result if you don't have a COM2 on your computer. Let me know if you have any questions

 

 

Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
Download All
0 Kudos
Message 5 of 8
(4,031 Views)

Richard,

 

Can you compile the vi for 8.5.1 🙂 . We don't have 8.6 yet 😞

 

Thanks again  Smiley Very Happy

 

Sambit 

0 Kudos
Message 6 of 8
(4,017 Views)
I saved the VI down to version 8.0 so, you should definetly be able to open it. Again let me know if you have any questions about what is going on.
Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 7 of 8
(3,997 Views)

Richard,

 

That definitely helps. I think if we can have each instance of TS access a different set of global variables ( similar in structure, but having different names ) , we maybe able to get this working. I will try this approach and let you know what we find out !! 

 

Thx for the help Robot Very Happy

Sambit

0 Kudos
Message 8 of 8
(3,979 Views)