NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UUT Serial Number not used in NI report file path name

Hello all,

 

I'm facing an issue with the TestStand UUT serial number together with the NI Report Generator File Path Name.

 

In the beginning i was programatically assigning the serial number in the PreUUT Callback (also according to https://www.ni.com/en/support/documentation/supplemental/17/programmatically-change-the-uut-or-batch...).

 

Parameters.ModelData.TestSockets[RunState.TestSockets.MyIndex].UUT.SerialNumber = "MySerialNumber".

 

The built-in Report Generator then automatically filled the Serial Number in the report and also in the report file path name like MyReport[MySerialNumber][0][14 04 45][14.11.2024].xml.html.

 

 

But now i had to change the from the assingment in the PreUUT directly to the MainSequence, so the expression looks like this:

 

RunState.Root.Parameters.ModelData.TestSockets[RunState.TestSockets.MyIndex].UUT.SerialNumber = "MySerialNumber"

 

Here also the built in Report Generator automatically filled the Serial Number in the report, but now the report file path name looks like this:

MyReport[Emtpy_UUT_SerialNo][0][14 04 45][14.11.2024].xml.html.

 

So I can not see the expected Serial Number in the file path name.

 

What changes need to be made that in the latter case the report file path name is generated with "MySerialNumber"?

 

 

Best regards

0 Kudos
Message 1 of 4
(77 Views)

I‘m not exactly sure, I have no system available at the moment, yet I would bet the serial number in the ModelData Object is not used for report generation.

 

I would bet on 

 

RunState.Root.Locals.UUT.SerialNumber


or similar in the ProcessModel you are using

 

0 Kudos
Message 2 of 4
(52 Views)

Can you use NI's built in macros?  There is a macro for Serial Number and it will dynamically put the value in for you.

eejallen_0-1731624474279.png

 

eejallen_1-1731624765002.png

See this article for explanation of all macros.

Specify Report File Path by Expression - NI

 

0 Kudos
Message 3 of 4
(37 Views)

Thank you very much for the answers/hints.


I tried the build in macro $(UUT). Unfortunately this does also not work when assigning in the MainSequence, i still get the MyReport[Emtpy_UUT_SerialNo][0][14 04 45][14.11.2024].xml.html.

 

It seems like that the relevant information needs to be present at the PreUUT for the Report Generator.

After some debugging i found out, that the initial file is already generated at the ParallelModel.seq --> ModelPlugins - UUT Start

ulliman_0-1731670645163.png

Diving deeper into the Plugins, the generation itself is happening in the NI_ReportGenerator.seq (Determine Report File Path Expression):

ulliman_1-1731670722647.png

 

 

So that's why it now working for me because this is happening before the MainSequence already.

 

Is there maybe another possibility to generate this report path file name when assigning the serial number in the MainSequence? Or am i bound to the PreUUT?

0 Kudos
Message 4 of 4
(15 Views)