NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass different parameters for each UUT in Batch model

Solved!
Go to solution

I have 2D array of integers defined in Labview as:

 

my2DArray[1][2] = { {Num1, Num2, Num3} , {Num4, Num5, Num6} };

 

I want to run batch model for 2 sockets. First socket is using elements Num1, Num2, Num3, and the second socket is using Num4, Num5, Num6.

 

In Teststand, I tried to pass numbers from my2DArray into socket as:

StationGlobals.my2DArray[RunState.TestSocket.MyIndex][0]

StationGlobals.my2DArray[RunState.TestSocket.MyIndex][1]

StationGlobals.my2DArray[RunState.TestSocket.MyIndex][2]

 

Station  global "my2DArray" is defined as Array of Numbers[1..2][0..2].

 

When I run batch model I get an error that says:

-17324; Array index out of bounds.

 

Please help me resolve the problem!

 

If I understand stuff correctly -> RunState.TestSocket.MyIndex ranges from 0 to 1, and station global my2DArray is defined for this. so Array of Numbers[1..2][0..2], where [1..2] is MyIndex and [0..2] is number of elements in array! What am I doing wrong here?

0 Kudos
Message 1 of 2
(1,904 Views)
Solution
Accepted by Skoda3

Hi,

I just read your post and the thing you must change is to define station  global "my2DArray" as Array of Numbers[0..1][0..2]

 

Regards

Laurent

Message 2 of 2
(1,876 Views)