NI TestStand

Showing results for 
Search instead for 
Did you mean: 

report file name

Go to solution

During my test sequence, I assign a serial number to the UUT.

(This number is different from the number entered when starting the test)


Is it at all possible to list this serial number given during test, in the report file name?



0 Kudos
Message 1 of 16
Accepted by morngoose

I assume you are using a Process model.


RunState.Root.Locals.UUT.SerialNumber = Locals.NewSerialNumber


It should use the new serial number in the report's header.

0 Kudos
Message 2 of 16

Thanks for your reply!


Is it possible to change the path of where the report files will be saved within the sequence file?


Reason I am asking, I have 5 different products, so I would like to save the report files in 5 different locations.



0 Kudos
Message 3 of 16

Just set a breakpoint in your sequence and go in the Variable View.




You should find the container ReportOptions and the string ReportFilePath.

Message 4 of 16
It would be less brittle to access Parameters.ReportOptions.ReportFilePath in a ReportOptions callback instead of assuming the presence of particular process model local variables. However, note the ReportOptions is only called once per UUT loop in the current models, so this might not be an option.
Message 5 of 16

When during the sequence, would it be best to edit the report options?

Last step during Main sequence maybe ?

0 Kudos
Message 6 of 16

I think your best bet would be in the process model (PM). You should definitely consider customizing the PM (creating your own by editing the default one). Go see the report callbacks that are called in the entry point (Test UUT, etc.) and try to figure out where the info of the UUT serial # is passed. You could probably send that UUT info (with empty serial # since you don't know yet) to the MainSequence call as a parameter and replace it with the one which is determined later in your sequence (if I understand your case). By passing the variable used to contains the uut infor in the PM and modifying the variable in your mainsequence and passing it back to the PM after the MainSequence call, the reports generation steps will use the right serial number with minimal changes in the PM.


My solutions, like James said, is quick and assumes you are using a TS default PM all the time. I wouldn't recommend it on a project that would be used by many persons or is not simple. Modifying a variable in the PM from the test sequence (MainSequence) is hard for other programmers on the project to see. It is better to user parameters so we can explicitly see that you are doing this. I'm not sure how comfortable you are with editing PM, but it's worth a shot since usually reports are handled there since every UUT generates one usually.


Hope this helps. There's a great document in the Advanced Architecture series explaining Process models written by one of my colleagues. Check it out.


If you could give us more details why you need to set the serial number other than at the beginning of the execution (beginning of PM). Usually, this part is done at the beginning of the PM and maybe you could simply move the steps that handles serial# input in the Process Model, it would avoid a lot of changes in the PM.



0 Kudos
Message 7 of 16

Hi There,

I played around a bit, but I still dont know what to do.


In my sequence file, during Setup, I obtain the unit serial number, and read from an ini file where the reports needs to be saved.

(We have a directory structure where we save reports for each different product in a different folder)


In the Setup seq, I then Statement where I set the report filename and format, eg  Runstate.Root.Locals.ReportOptioins.Format = "html"


Problem is, TS created the report before starting the Setup Sequence....then I end up with 2 report files.


PLease help...I am using the standard process model and sequentualmodel.seq.

No idea how to modify these correctly



0 Kudos
Message 8 of 16

What entry point are you using in your process model? Test UUT?


Are both reports are named the same?

What is a concrete example of two report file name generated?

Are they both at the correct path defined in the .ini file?


The step writing the report is Write UUT Report in process model and you can see the path where file is saved in one of its parameter.


Also, are you writing in html format all the time? If so, you might want to go in the menu Configure->Report Options and select html instead of setting it during your mainsequence.


By tracing, can you find what step creates the report before the setup?


0 Kudos
Message 9 of 16

Thanks for your reply


I have no idea what entry point I am using....Just a normal sequence file which has setup, main and cleanup.


In setup, I set report directory to xxxxxx, and format as html


Looking at TS report options, it saved the reports in the seq directory as xml.


So, I get my report as I want it in html in my xxx directory, but I also get a xml report of 0kb size in the sequence directory.



0 Kudos
Message 10 of 16