NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically creating an array of containers

Solved!
Go to solution

Hello,

   I am am using Test Stand 4.2 and want to create an array of containers dynamically.  The number of containers comes from the device that I am testing.  What are the steps necessary to do this, The array element container will contain 3 numbers and an ascii string. 

0 Kudos
Message 1 of 2
(4,251 Views)
Solution
Accepted by topic author wrroberts

I do this using the SetNumElements method.

 

1) Create a custom data type for a container that has your number and string elements

2) Add a local variable in your sequence that is an array of this new type (and check empty box)

3) Add a function call in your sequence similar to:

SetNumElements(Locals.LocalContainerArray, Locals.NumElements)

 

Locals.NumElements is a variable for the size of the array.

Hope this helps.

0 Kudos
Message 2 of 2
(4,243 Views)