NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting elements to 2D array

Hello,

I have just started to use TestStand in my current job and I would need a bit help.

 

I have a 2D array as local (Locals.2Darray). I have to add more elements to both columns of the array during the testsequence.

What would be the easiest way to do that?

 

Thank you in advance for all help!

0 Kudos
Message 1 of 4
(3,569 Views)

Hi, Try below expression please:

InsertElements( Locals.2DArray,"[0]",0), SetElements(Locals.2DArray,1.23456,"[0][0]")

0 Kudos
Message 2 of 4
(3,535 Views)

I am wondering why your teststand did not give an error while your local variable name start with number.

Second as you suggest


InsertElements( Locals.2DArray,"[0]",0), SetElements(Locals.2DArray,1.23456,"[0][0]")


This method only useful for one dimensional array.

This thread may answer your question.

Array in Teststand

Kuddo welcomed
CLAD-CTD
0 Kudos
Message 3 of 4
(3,532 Views)

 Sorry for the wrong parameter name staring with a digital, below expression works:

InsertElements( Locals.Array2D,"[0]",0), SetElements(Locals.Array2D,1.23456,"[0][0]")

Message 4 of 4
(3,519 Views)