05-17-2018 01:54 AM
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?
Solved! Go to Solution.
05-18-2018 05:16 AM
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