04-15-2013 05:48 AM
As UUT.PartNumber is now part of the UUT data type with TestStand 2012 can we have a Macro added to allow this to be used for the result file name (or is there an undocumented one already)?
Also I would suggest using the PropertyExists function in the result path expression so it will work with any process model (including those that may not have the variable in this path. So :
"<ClientFileDir>\\<ClientFileName>_Report[<FileTime>][<FileDate>]<Unique>" + (PropertyExists("Runstate.Root.Locals.UUT.PartNumber") ? Runstate.Root.Locals.UUT.PartNumber : "" )+".<FileExtension>"
Regards,
Chris
04-15-2013 02:09 PM
Hi Chris,
We appreciate the feedback! Adding this macro is under consideration for a later release.
04-17-2013 01:18 PM
Hey Chris,
In the meantime, you could use the following workaround to add the part number field to your report file name:
1. Select to specify report path by expression
2. For sequential model, use the following: PropertyExists("Parameters.UUT.PartNumber")?Parameters.UUT.PartNumber:"")
For batch/parallel test socket, you can use: PropertyExists("Parameters.TestSocket.UUT.PartNumber")?Parameters.TestSocket.UUT.PartNumber:"")
As Al mentioned, adding a macro is under consideration for a later release, but for now, you can use the above process to get the functionality.
10-09-2014 10:07 AM - edited 10-09-2014 10:14 AM
I'm trying to use the PartNumber field in TestStand 2013 with Specify Report File Path by Expression to store results in a PartNumber specific sub-folder.
Here is what I use:
"C:\\Sonus\\Reports\\" + (PropertyExists("Runstate.Root.Locals.UUT.PartNumber") ? (RunState.Root.Locals.UUT.PartNumber + "\\") : "" ) + "[SN_<UUT>][<FileYear> <FileMonth> <FileDay>][<FileTime>][<UUTStatus>].<FileExtension>"
Using the sequential model and Test UUTs, this expression works fine IF I define a PartNumber.
If I don't define a PartNumber, HTML reports are created in the parent folder (as I would expect), but when I select Stop to end Test UUTs I get a TestStand run-time error.
Specifically:
Details:
The precondition for the step 'Read Entire Socket Report' could not be evaluated.
Error in argument 1, 'Parameters.ModelPlugin.PluginSpecific.RuntimeVariables.PerSocket[RunState.TestSockets.MyIndex].Path', in call to the expression function 'FindFile'.
Pathname is invalid.
Error Code:
-17204; Pathname is invalid.
Location:
Step 'Read Entire Socket Report' of sequence 'Model Plugin - End' in 'NI_ReportGenerator.seq'
So the expression works, but NI_ReportGenerator.seq fails if Runstate.Root.Locals.UUT.PartNumber does not exist.
10-09-2014 10:22 AM
You have to make sure that your partnumber does not contain any characters that are invalid in a path. Just taking the part number as entered by the user could cause the issues you are having depending on the part number value.
Chris
10-09-2014 11:32 AM - edited 10-09-2014 11:33 AM
@ChrisAtNSN wrote:
You have to make sure that your partnumber does not contain any characters that are invalid in a path.
My part numbers will come from a LabVIEW Combo Box that I will control. There will be only valid folder names.
The expression actually works with the exception that if the UUT.PartNumber is not defined (not all of my sequences will include the part number), the NI provided NI_ReportGenerator.seq throws a run-time error; but only after I try to stop execution. I can run multiple UUTs with distinct serial numbers and generate reports, the run-time error only occurs after stopping the sequence.
10-09-2014 01:09 PM
So, after setting a breakpoint in the offending NI sequence and looking at my expression, I discovered that UUT.PartNumber always evaluated as TRUE (the property always present); so even when UUT.PartNumber was empty, the logic added an additional "\" creating an invalid path.
I added an AND to check if the length of UUT.PartNumber was > 0 and was able to fix the problem.
"C:\\Sonus\\Reports\\" + (PropertyExists("Runstate.Root.Locals.UUT.PartNumber") && Len(RunState.Root.Locals.UUT.PartNumber) > 0 ? (RunState.Root.Locals.UUT.PartNumber + "\\") : "" ) + "[SN_<UUT>][<FileYear> <FileMonth> <FileDay>][<FileTime>][<UUTStatus>].<FileExtension>"
10-08-2015 03:32 PM - edited 10-08-2015 03:32 PM
I'm picking up an effor that has been idle for a year or more where a previous programmer added a few fields to the UUT container everywhere it appears (I think) as mentioned in previous posts, but these new fields don't appear anywhere in our report files so I know something is left to be implemented.
Basically, we want to add a handful of rows to what displays in the header of ATML reports. Is there a built in way to do this once the fields have been added to the UUT container?
Thanks
10-09-2015
04:39 PM
- last edited on
10-29-2024
10:40 AM
by
Content Cleaner
Hi SmokeMonster,
If you navigate to "Configure >> Result Processing" and select the crossed wrench and hammer icon on the line item for your ATML report you will see the Report Options dialog. In the dialog, it lists the style sheet which is being used to generate the header for the report. You will want to navigate to that location (mine is at C:\Program Files (x86)\National Instruments\TestStand 2014\Components\Models\TestStandModels\ATML\StyleSheets) and make a copy of that file. You will have to edit the xml code in that style sheet and save it with a new file name. Then, in your report options, change the style sheet to the newly formatted style sheet. Here's fourm post that deals with editing the ATML header:
Customizin
https://forums.ni.com/t5/NI-TestStand/Customizing-ATML-report-header/td-p/2155572
and another which deals with doing the same for XML headers"
How to modify a TestStand XML Report Header
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGlBCAW&l=en-US