01-23-2009 02:32 PM
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
01-26-2009 02:07 PM - edited 01-26-2009 02:09 PM
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
01-26-2009 05:33 PM
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,
Sambit01-27-2009 04:26 PM
01-28-2009 03:30 PM
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
01-28-2009 07:23 PM
Richard,
Can you compile the vi for 8.5.1 🙂 . We don't have 8.6 yet 😞
Thanks again
Sambit
01-29-2009 10:13 AM
01-30-2009 03:16 PM
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
Sambit