NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

access UUT data in batchmodel from sequence

Hallo,
we are using teststand 3.0 and
need to access a field in our modified  UUT data container from our sequence running in the batch model.
 
We are trying the following expression to access our additional field in UUTdata:
 
RunState.Caller.RunState.SequenceFile.Data.Seq["Test UUTs"].Locals.ModelData.TestSockets[RunState.TestSockets.MyIndex].UUT.Version_ID_Parameterlist = StationGlobals.VersionID_Parameterlist.
 
That expression gives us a "Out of bounds error" for the index. Why ?
 
0 Kudos
Message 1 of 2
(2,789 Views)

You are getting the out of bounds error because SequenceFile.Data leads to the edit time copy of the sequence file. Thus when you reach the array, it hasn't been resized to match the number of sockets.

The TestSocket is a parameter to the root point for each socket execution.  Try using:

RunState.Root.Parameters.TestSocket.UUT
 
 
The best way to discover property paths like this is to put a breakpoint in your sequence and examine the Context tab. For process model information, you usually want to start looking at RunState.Root.  Never go into RunState.SequenceFile, unless you are interested in the pre-execution edit-time values of properties or variables.
 
To access locals variables, browse to the desired sequence context using RunState.Root/RunState.Caller/RunState.Main and then examine the Locals container.
 
To access runtime step properties, browse to the desired sequence context using RunState.Root/RunState.Caller/RunState.Main and then examine the RunState.Sequence property.  Unlike RunState.SequenceFile, this is the execution time copy of the sequence.
Message 2 of 2
(2,785 Views)