NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

add arrays

Hi,

 

I have 2 Local Arrays in TestStand

 

Local1

1,2,3

10,20,30

 

Local2

9,8,7

90,80,70

 

 

I also have a Labview VI with a 1d Array input that is within a FOR loop (3 loops using Local INDEX)

 

Is there a way to index the 2 Arrays and add them in TestStand and pass the result to the Labview VI?

 

I thought it would be as easy as writing this expression on the input of the VI...

 

Locals.Local1[Locals.INDEX] + Locals.Locals2[0]

 

eg.      loop1--- add 1,10 to 9,90

           loop2 --- add 2,20 to 9,90

           loop3 --- add 3,30 to 9,90

 

I hope this makes sense

 

Chris

0 Kudos
Message 1 of 3
(2,140 Views)

Are these 2 dimensional arrays?

 

You could do Locals.Locals1[0][Locals.Index] + Locals.Locals1[1][Locals.Index]

 

You need 2 bracket sets to access a 2D array.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(2,130 Views)

Hi jigg,

 

Yes they are 2D Arrays that feed into a 1D array in Labview.

I guess what you have suggested would require the Labview Input to be a Numeric and not an Array.

 

I have attached an example to see if this can be done.

 

The answer in Labview I was expecting is as below...

 

Loop 1

[0] 10, [1] 100

 

Loop 2

[0] 11, [1] 110

 

Loop 3

[0] 12, [1] 120

 

Chris

Download All
0 Kudos
Message 3 of 3
(2,113 Views)