NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to enter a serial number in the main sequence, instead of in the "Pre UUT"?

Hello!

Is it possible to enter a serial number in the main sequence, instead of in the "Pre UUT"?

I still want the serial number in the Report.

I also want the serial number as file name of the report.
0 Kudos
Message 1 of 6
(5,418 Views)
You can enter the serial number in the main sequence instead ot the "Pre UUT" but there is no reason to do that.

if you still like to input serial number in your sequence You will need to make sure that you update the variable in the process model which stores the serial number ie. RunState.Caller.Locals.UUT.SerialNumber
This is used to generate the report.

the report can also contain the serial number of the uut if you select "New file for Each UUT" under Configure-Report options and in the "Report File name path"

The format of the name of the report will be
[123].txt
"123" was the serial number which I entered.

If you are not happy about the name of the file you can replace Locals.ReportFilePath to contain the right name using a statement step in the process mode
l. If you using the default process model please make sure that you add the statement step after "Determine Report File Path" step in the Process Model.
0 Kudos
Message 2 of 6
(5,418 Views)
We've just been facing this problem ourselves. One reason to set the serial number in the main sequence is if the serial number is read electronically from the UUT. It was assigned at a previous test station.

We tried setting UUT.SerialNumber, and it mostly works fine. The correct serial number appears in the report, but the report file name (which we do "per UUT") is incorrect. That's because "Determine Report File Path" runs before the main-sequence call.

I think ideally, "Determine Report File Path" should be split in two. Run it before the main-sequence call if you're not configured for one report per UUT, do it after the call if it is configured for one report per UUT. That way, everybody wins, as far as I can tell (but I'm still new to the
TestStand game).

- Ron
0 Kudos
Message 5 of 6
(5,418 Views)
If you want to avoid a lot of customization of your process model, I would recommend adding the PreUUT callback to your sequence file. You can then customize PreUUT in your sequence file, and it will override the PreUUT in the process model. If you don't know how to add a callback, go the the "All Sequences" view and right click. Then you can select "Sequence File Callbacks..." to add any callbacks you want to make specific to your sequence file. There are many callbacks available, and this is one of the very powerful features of the TestStand process model.
Message 6 of 6
(5,418 Views)
If you pass the UUT data type as a parameter in the "MainSequence Callback" step in the "Test UUTs" sequence of the process model, you will have access to the serial number in your mainsequence. I do this because I often need to know what the serial number is (and other info like config code, which I have added to the UUT data type) inside the mainsequence. This is useful if the serial number is generated electronically from the UUT or you are verifying the programmed serial number with the one that was entered from the PreUUT sequence.
0 Kudos
Message 3 of 6
(5,418 Views)
I do this all the time because I need to validate that the serial number is valid for the product being tested. I have a LabVIEW function that prompts for the serial number and is called as the first step in the Setup group. The last thing the function does is write the serial number to RunState.Root.Locals.UUT.SerialNumber so that it can be used in the report and for the report file name.
0 Kudos
Message 4 of 6
(5,418 Views)