NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding two array in teststand

Need to add two array in teststand locals. Array A need to plus ArrayB -1. I can get GetNumElements(ArrayA) to get max elements.Using a for loop to nest between 0 to 8. Teststand explains there is error, out of bounds, because teststand array stands from zero but when execution everything works.

How to stop the prompt? Or how to get the elements without minus one. Is there a function offsetToIndex(array,offset) which return the elements in the array

0 Kudos
Message 1 of 2
(139 Views)

To me it looks like you are adding two array with different sizes and the number of loops is using the number of elements of the larger one?

 

BTW... all decent programming languages start addressing arrays at 0 😉

0 Kudos
Message 2 of 2
(124 Views)