NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

assigning a variable

In Test Stand 2 how do I create a global variable (bool) that takes the value of an element (bool) of a global array?
 
 
0 Kudos
Message 1 of 7
(3,442 Views)
StationGlobals.MyBool = StationGlobals.BoolArray[5] will get the 6th element of the Boolean array.
 
Allen P.
NI
0 Kudos
Message 2 of 7
(3,417 Views)
Creating an expression statement step is not what I want.
What I want is to have a global variable (that is in sequence file globals), named appropriately, and takes the value of an element of an array. Then the particular element of the array will have an appropriate name referenced to a element in an array,rather than having to put a expression into a step sequence.
 
 
0 Kudos
Message 3 of 7
(3,406 Views)
It is not possible to bind the value of one variable to another.  You will have to use an expression (either as a statement step, or a pre/post-expression).
0 Kudos
Message 4 of 7
(3,393 Views)
Here is an example that I think does what you want.
 
While the alias variable must be established programmatically, you could hide that in your setup step group or in a SequenceFileLoad callback.
0 Kudos
Message 5 of 7
(3,381 Views)
Globalref sequence appears to be written in TestStand 3 and so will not load into my TestStand 2, and so cannot review it.  Anyway I think that an assignment of a alias variable without introducing a step should simple, as it is in all other languages, however this is just another example of how poor TestStand 2 is. 
0 Kudos
Message 6 of 7
(3,370 Views)
Here is the same file saved in 2.0.
 
 
0 Kudos
Message 7 of 7
(3,356 Views)