NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating an Array with a name then sending data into array

Here is what I am trying to do, I have a test I have to run for some debugging of an issue.

1. Set UUT on

2. Capture some data (Voltage/Current, BIT), chasing down an error on boot up.

3. I want to set a new array from another array (clone), name array BIT_+ Time Stamp using Time(), want to use date as well but Date() returns wrong date, right year, wrong month and day, system time is correct so not sure why it is off by a week.

4. Copy the BIT Data into array.

5. Loop the whole thing X number of times.

6. Turn off UUT --> Loop back to 1.

 

Here is my Function for naming:

Time(True,Locals.Time.Hours,Locals.Time.Minutes,Locals.Time.Seconds),
//Date(False,Locals.Date[0],Locals.Date[1],Locals.Date[2],Locals.Date[3],Locals.Date[4],True),
//Generate name for Array
Locals.ArrayName = "BitStatus_Loop" + Str(Locals.Counters.Loops) + "_" + Str(Locals.Time.Hours) + Str(Locals.Time.Minutes) + Str(Locals.Time.Seconds) + Str(Locals.Date[0]) + Str(Locals.Date[1],"%02u") + Str(Locals.Date[2],"%02u")

 

Generating Clone Array

Locals.SetPropertyObject(Locals.ArrayName,1,Locals.BitStatusArrays[0].clone("",0)),

 

Feeding into Clone Array
#NoValidation(Str("Locals." + Locals.ArrayName)[0] = Str(Locals.SummaryBITStatus.Bit1)),

 

It errors out, so my question is how do I tell it what the Str("Locals." + Locals.ArrayName)[0], since I don't know what the name is since there is no name yet, how can I tell it the name?

 

I get Error it's not an Array so you cant use [0].

 

 

 

0 Kudos
Message 1 of 2
(773 Views)

Hi @Marious007,

 

Could you share images to see the error(s) and the way you are using these expressions? A simple sequence file with a random array and the expressions also would work to test.  

Staff Technical Support Engineer
0 Kudos
Message 2 of 2
(641 Views)