NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

station global array

Hi,
 
Using a sequence with active X calls to  create an intialise station globals is the solution to our problem.
 
But,
 
There doesnt seem to be a way to set or get an Array.
 
Does anyone know how to do this ?
 
i.e
 
Using Active X steps:
 
Programatically create an array in the station globals.
Set values of this array.
 
 
 
 
0 Kudos
Message 1 of 2
(3,344 Views)

Hi,

Use the SetValVariant  method.

Your array must exist, as the option 0x01 (insert if missing) is not supported using the SetValVariant method.

As an example, Call PropertyObject.SetValVariant("MyArray", 0, {1.2, 2.3, 3.4}) using "StationGlobals" as the reference will fill the array called StationGlobals.MyArray. If the array is already sized and has contains then that contents will be overwritten and the array will be resized, e.g for my example it will become a size of 3 elements.

Check out the examples for accessing arrays with other languages in the examples folder of TestStand.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 2
(3,337 Views)