NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass serial number read from a PCB.

Hi,

 

I have a question:

How do I pass serial number read from a PCB so it will be embedded in Test Report file name for that test sequence. I am running Sequence in “New Execution" - Single Pass.

My test report file after I run test does not have serial number: “TEST_Rev6_Report[NO_UUT_SERIAL_NUM0][2 32 24 PM][4 26 2013].xml” but my Report Header has serial number present.

 

Thank you,

Henry

0 Kudos
Message 1 of 8
(4,381 Views)

In the "Single Pass" execution (using the sequential model) the Report path is set before the call to your mainsequence. You have 2 options to fix this:

 

1. Adjust the Single pass sequence in the SequentialModel.seq file (or create a new process model based on this file). Add a callback to get the serial number before the "Determine Report File Path" step or copy the "Determine Report File Path" to a position in the sequence where the serialnumber is known.

 

2. Create a path by expression and set the report option to create a new file for each UUT status, the following booleans will be true in this case Locals.GeneratePathByExpression && Locals.ReportOptions.NewFileNameForEachUUTStatus. The "Determine Report File Path Expression" after the MainSequence call will be executed in this case. You don't have to edit the process model if you choose this solution.

Message 2 of 8
(4,351 Views)

Will option 1 works for "Single Pass" execution using the parallel model?

 

Could you please provide an example how to create a path by expression and set the report option to create a new file for each UUT STATUS?

 

Thank you,

Henry

0 Kudos
Message 3 of 8
(4,327 Views)

The attached screenshot shows how to set your report options, make sure you have the <TestSocket> and <UUTStatus> macros included in the Report File Path otherwise the serial will not be filled in the filename (Generate path is called a second time from the Single Pass -- Test Socket Entry Point sequence).

I used the ParallelModel.seq to test it.

 

 

The attached sequence file shows how to set the serial number.

 

Search for "Specifying Report File Paths by Expression" in the help for more macros.

Download All
0 Kudos
Message 4 of 8
(4,319 Views)

Can this method be used in TestStand 3.1?

Also, could you please elaborate more on the first option (Adjust the Single pass sequence in the ParallelModel.seq file).

Can you provide an example?

Thank you,

Henry

0 Kudos
Message 5 of 8
(4,280 Views)

Hi HenryG

 

One other approach you can look at, specific to TestStand 3.1, to include the serial number is to use a Message Popup and add it to the step response. The lookup for the Serial Number is RunState.Root.Locals.UUT.SerialNumber

 

You can find more specific documentation here:

 

http://digital.ni.com/public.nsf/allkb/ECCDA0BB2DBBB863862570310070E732

 

Regards,

James W.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(4,254 Views)

I don't know if it can be used in TestStand 3.1, I only have experience with TestStand 2010 SP1.

 

I've attached a modified parallel model, in the "Single Pass -- Test Socket Entry Point" sequence I've added a step to determine the path specified by the expression in the report options. This step has no preconditions and will always be executed, the "old" steps are set to "skipped".

 

0 Kudos
Message 7 of 8
(4,238 Views)

Hi James,

 

In my case, this solution will not include the serial number in the Test report file.

I am running my Sequence in “New Execution" - Single Pass. I’m reading serial number from the PCB and storing it in “Parameters.SerialNumber” variable. I update my test report by Statement” RunState.Root.Parameters.TestSocket.UUT.SerialNumber = Parameters.SerialNumber”. After I execute this step, the serial number is embedded in my test report header but my test report file does not have serial number: “TEST_Rev6_Report[NO_UUT_SERIAL_NUM0][2 32 24 PM][4 26 2013].xml”.  This report file is generated before I even red my serial number. I’m using “On-the-Fly–Reporting and XML report format.

 

Thank you,

Henry

0 Kudos
Message 8 of 8
(4,216 Views)