I have a 2D array that I need to append another 2D array onto to add more columns. I'm performing a test which returns a 2D array of data. I then change a power supply setting and perform the test again. I collect the returned data into a 2D array that I'll reuse for each iteration. I the want a Statement step that will append the 2 D array to the end of a 2D array that starts out empty and will grow as the original 2D array is appended to it.
A00 A10 A20 B00 B10 B20 A00 A10 A20 B00 B10 B20
A01 A11 A21 B01 B11 B21 A01 A11 A21 B01 B11 B21
A02 A12 A22 + B02 B12 B22 = A02 A12 A22 B02 B12 B22
A03 A13 A23 B03 B13 B23 A03 A13 A23 B03 B13 B23
A04 A14 A24 B04 B14 B24 A04 A14 A24 B04 B14 B24
A05 A15 A25 B05 B15 B25 A05 A15 A25 B05 B15 B25
Solved! Go to Solution.
I found that solution while searching but I'm actually trying to append a 2D to a 2D, not a 1D to a 2D. I may have to do a loop using that solution but I was hoping to find a way to just do it directly.
This is exactly what I was working on. I'm new enough to TestStand that I was struggling with the syntax of redimensioning the arrays.
It's interesting that when you readimension the arrays from 2D to 1D you don't have to move the data around. As long as there are the same number of elements they get populated with the data automatically. What happens if there are
more elements in the new 1D array than in the 2D array? Do I end up with empty elements or do I just lose all the data?
BTW- I think it's a lot easier in the newer versions of TestStand. I haven't played with the new version though enough yet.
I do not like how the functions require "" syntax. I wish it would just take in an index but I do understand why they do it... for the multi dimensional functionality.