NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add variables (based on test socket) to report filename

I'm having a bit of trouble... My test station and test sequence can test a whole family of products. It can also test up to 4 units a time in parallel. I'm trying to find a way of adding the model number for the current UUT into the report path make it easier tfiring particular reports in the report folder.

 

I currently ask the operator the model number of the UUT in the PreUUT callback so that each run can have a different model etc. However, I cannot seem to find a way to get this into the report path. Is this possible? Am I missing something? 

 

I'm also open to adding the artificial limitation of sticking with the same model number for an execution,  but we would really like to keep the option to having different models in each test socket (this seems to be stopping me from using simple report filename expressions). I also am trying to avoid having lots of sequence files for our operator to choose from as that has caused headaches in the past (subsequence files are burried in a folder so that only the main sequence file is obviously visibile).

 

This is being developed in TestStand 2012, and any ideas would be greatly appreciated!

Thanks,

Shaun

 

 

0 Kudos
Message 1 of 9
(4,146 Views)

Hi Shaun,

 

If I understand what you're looking to do, then TestStand can definitely do that! If you are looking to append the UUT number and/or Test Socket number, check out the following steps.

 

You can go to the Report Options from Configure » Result Processing and then click on the Options button for Report. Under the Report File Pathname, there are checkboxes for "New UUT Report File for Each UUT" and "New UUT Report File for Each Test Socket" (the latter is only for process models that support multiple test sockets). 

 

This sounds like what you're looking for!

 

Cheers,

KyleP
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,123 Views)

Thanks, but I'm trying to add another field - Model Number (which ideally I prompt the operator to scan in the PreUUT callback)

 

Some examples showed I using a FileGlobal and "specify report using expression" but that seems to always error (I'm presuming its because the FileGlobal doesn't exist in the model's sequence files.

 

I also tried using a StationGlobal array (an element for each Test Socket) but could not seem to find a way to index it for the report filename generation.

 

Shaun

0 Kudos
Message 3 of 9
(4,118 Views)

Hi Shaun,

 

It seems you are on the right track. Could you be more specific on the error? Is there a reason you can't place the FileGlobal in the appropriate sequence file?

 

Cheers,

KyleP
Applications Engineer
National Instruments
0 Kudos
Message 4 of 9
(4,101 Views)

The Sequential Process Model  does not understand the File Globals defined in the Client Sequence in the Report Options Callback. I am having the exact same problem. I tried writing my expression as a string into the Parameter for File path generation in the Report Options Callback but the variable I am trying to use to name the file doesn't get called until the PreUUTLoop Callback. Using StationGlobals or modifying the process model are not an option because my program needs to function correctly in default Teststand installation. 

 

 

0 Kudos
Message 5 of 9
(3,763 Views)

Hi AustinLee,

 

Are you saying that you are trying to use the "ReportFilePath" parameter with a File Global variable in the string? Are you getting run-time errors or analyzer warnings?

 

Because of the order of the process model calling sequences, you won't be able to declare a File Global and modify it before getting into the ReportOptions callback.

 

You might be able to explicitly mention a couple of directories and change the directory in the UUT callback, such as explained in this KB: http://ae.natinst.com/public.nsf/webPreview/8ECD6E9D95F786338625729D0073451A

 

You could also programmatically create a station global using the NewSubProperty in your sequence, and refer to that station global variable for the file path.

Xavier
0 Kudos
Message 6 of 9
(3,731 Views)

The link provided above is an NI internal link, unfortunately.

0 Kudos
Message 7 of 9
(3,571 Views)
0 Kudos
Message 8 of 9
(3,557 Views)

Changing the report directory in ReportOptions callback depending on information collected in the PreUUT callback doesn't work , because the ReportOptions callback runs first. But using Runstale.Caller.Locals.ReportOptions.Directory from  PreUUT callback  seems to work. 

0 Kudos
Message 9 of 9
(3,539 Views)