NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

write teststand globals from labview

Hi all,

 

i just started using teststand and i am not too familiar with the program up to now.

 

What I want to do is, writing teststand station globals from a vi that i started asynchronously. What steps do i need to execute in teststand before starting the vi? A small example would also be great.

 

thanks for your help.

Walter

0 Kudos
Message 1 of 5
(3,778 Views)

Walter,

 

is there a specific reason why you are using global variables?

Global variables should be used primarily for configuration settings, so data which is written once (e.g. during start-up) and then only read. I don't recommend them to be used for continuous data transfer.

 

That being said, you have to pass the SequenceContext to the module when it is called by your sequence execution. Use the TS API to access the variables you want to write to.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(3,777 Views)

I need to lock and unlock a device, during my teststand sequence executes. Therefore i use the global variable because i need the access from labview all the time.

I already use the actvex module but i can't read the teststand values from labview. Can u tell me the correct way to configure the activeX modules?

0 Kudos
Message 3 of 5
(3,775 Views)

When using instruments in LV code modules, the code module itself presents a lock (default execution setting of LV VIs when not changed to reentrant execution).

So if the instrument is used in a single code module (which is used several times in your TS sequence(s)), there is nothing you have to worry about.

If the instrument is used in multiple (different) LV code modules (by passing its handle from module to module), you might require to include some locking.

 

I recommend you to provide the lock in TestStand. Use the Lock steptype in the synchronization palette to do so.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(3,767 Views)

Please refer TestStand examples for accessing Teststand variables from a VI :

 

C:\Users\Public\Documents\National Instruments\TestStand 4.2.1\Examples\AccessingArraysUsingAPI\UsingLabVIEW

 

As suggested earlier you can use the Lock step type which can lock your resources in multithread applications.

0 Kudos
Message 5 of 5
(3,747 Views)