11-14-2024 08:26 AM
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
Solved! Go to Solution.
11-14-2024 11:35 AM
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
11-14-2024 04:56 PM
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.
See this article for explanation of all macros.
Specify Report File Path by Expression - NI
11-15-2024 05:42 AM
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
Diving deeper into the Plugins, the generation itself is happening in the NI_ReportGenerator.seq (Determine Report File Path Expression):
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?
11-15-2024 01:48 PM
PreUUT is the critical point in the process model where the Serial # is set. This is how the Execution status string knows the S/N and the reports will be able to print the serial number to the header and create the filename if used in the filename.
However, if you want to change the serial # later in MainSequence and then have the report filename name updated; please try putting a GetReportFilePath callback into your sequencefile. This callback will have the file path in Parameters.ReportFilePath. You could then use a copy or move command script to copy the file into a new filename of your choice.
11-18-2024 02:07 AM
Ok, thanks for the hint with the GetReportFilePath.
Maybe not the most comfortable solution with the file copying, but worth a try.