08-10-2012 04:51 PM
TestStand Users,
Many TestStand users have expressed a desire for a part number field in the UUT container, so that they can store both a serial number and part number when identifying UUTs. In TestStand 2012, the default UUT type used in the preUUT callback of the process model contains a new PartNumber field to address these applications.
In the interest of backwards compatibility, the default serial number entry dialog has not been modified to provide an input for this field. You can modify the existing dialog using the modelsupport2 project, which contains the source code for the TestStand model dialogs. The code is located here:
<TestStand>\Components\Models\TestStandModels\modelsupport2.cws
As with any modification of TestStand files, be sure to create a copy in the public directory before making any changes, and only modify the copy.
12-03-2012
09:35 PM
- last edited on
10-29-2024
10:38 AM
by
Content Cleaner
Hi,
I need to add several more fields to the UUT container. There's a tutorial at http://www.ni.com/white-paper/3429/en that says to modify the UUT type.
I'm looking at an old project of mine from 1/2007 and instead of modifying the UUT type, I replaced all instances of the UUT type with a ** different ** UUT container type that added fields to the existing UUT type. I recall at the time there was an application note or something that recommended not to modify the UUT type that ships with TestStand because everything would break when you upgraded TestStand and changed the installed type back to the original UUT. I even discussed it with an AE.
I'm a little apprehensive about replacing all instances of the UUT type with some My.UUT type in TestStand 2012 now because of the plug-ins, there's a lot more places to change it. Is it now recommended to change the UUT type? I understand I would add fields only, not subtract any. Thanks.
cc
12-04-2012 04:20 PM
Hey DowNow,
As that tutorial mentions (and Al also mentioned this in his post), it's always a good idea to make a copy of the files before editing them. In the case of the tutorial, it recommends modifying a copy of the process model files. I would suggest doing as the tutorial says and working with a copy of the process model files rather than the original. Then, just modify the UUT type to add your fields.
12-05-2012 03:52 PM
Hi DowNow,
While the new models do introduce additional model files, you can still update your UUT type successfully without too much modification. I recommend modifying the existing type over trying to map everything to a new type or instance of a type. As long as you are only adding properties, I would suggest the following procedure:
12-05-2012 06:08 PM
Thanks for the procedure! It's helpful.
cc
01-11-2013 11:57 AM
Did this addition also add a "part number" macro for use in the Report File path expression? If not does anyone have a suggestion on how to get the part number into the report file name without post-processing?
Thanks,
Kevin
01-14-2013
12:47 PM
- last edited on
10-29-2024
10:39 AM
by
Content Cleaner
Hi kwkengineer!
You can customize the Report File Pathname a lot of ways! The Report Options dialog box (in 2012) is under the Configure menu. You can tweak the format there and see an example file name to get it the way you want, then script it in the "ReportOptions" sequence file callback using a statement. Here are all of the options for the report, which have corresponding properities in the API.
For example,I would want the part number, but not the date and time, and I wouldn't worry about unique file names because I only do one test an hour. I would probably use the following statements:
Parameters.ReportOptions.NewFileNameForEachUUT = True
Parameters.ReportOptions.IncludeTimes = False
Parameters.ReportOptions.ForceFileNameToBeUnique = False
Note that the Parameters.ReportOptions object is only available in the ReportOptions callback.
Hope this helps!
Regards,
Alexandra
01-14-2013 01:00 PM
So to be clear. You are saying there is not a <UUT_PartNumber> macro Like the other macros defined here. And there is not a way for me to add new macros that can be used in the Report Options dialog box.
My only option is to change the fle path from within the ReportOptions callback.
01-14-2013 03:34 PM
Hi kwkengineer,
You are correct that there are currently no plans to add a <PartNumber> macro for the report file pathname expressions, and there is no easy way to add custom macros (it would require modifications to the modelsupport2 support dll). However, you are not limited to using the macros to define report expressions. For example, you can add the part number to the path by accessing the property directly (bold added for emphasis):
"<ClientFileDir>\\<ClientFileName>_Report[<FileTime>][<FileDate>]<Unique>" + Runstate.Root.Locals.UUT.PartNumber +".<FileExtension>"
The use of runstate.root ensures that we are looking at the model entry point to access the property. If you would like to propose the addition of new macros (or the ability to easily add custom macros), please post a suggestion on the TestStand idea exchange.
Hopefully this clarifies things!
01-14-2013 07:28 PM
awesome....didn't think about trying to access it directly...Thanks!