10-19-2012 10:07 AM
Hello,
i am using the Teststand 2012 default SequentialModel.seq.
In the menu Configure + Result-Processing i changed the Report Format to ASCII.
Now after each testrun it creates a textfile with a header and about 6 lines for each measurement.
My question is: How can i modify the style of the report?
I need to create a format that is semicolon-separated.
Testname1;Result;Limit-High;Limit-Low;PassFail;
Testname2;Result;Limit-High;Limit-Low;PassFail;
Testname3;Result;Limit-High;Limit-Low;PassFail;
How can this be done?
Thanks for help
10-19-2012 11:10 AM
The report is generated using a TestStand sequence.
C:\Program Files\National Instruments\TestStand 4.1.1\Components\Models\TestStandModels\reportgen_txt.seq
There is a subsequence called 'PutOneResultInReport' that you modify to replace the \n characters at then end of report elements with your separator of choice.
10-22-2012 03:34 AM
Hi, thanks for your help.
Some questions for this:
1.) I am using Windows 7. Which means that i downt have write-access to the specified file in:
C:\Program Files (x86)\Nation Instruments\TestsStand 2012\Components\Models\TestStandModels\reportgen_txt.seq
There is a link in the NI-folder to the folder C:\Users\Public\Documents\Nations Inststruments\TestSTand 2012\Components\Models\
but in there is not directory called TestStandModels. So where can i modify the file that you mean?
2.) Can you give me a hint where to search? When i go in the PutOneResultinReport then i find a subsequence "PutOneResultinReport_Impl" that contains the attached steps in screenshot.
At which position is where i should change? Currently it creates a report as attached.
Thanks for the help
10-22-2012
07:09 AM
- last edited on
11-01-2024
05:09 PM
by
Content Cleaner
I'm still clunking along on XP / LV 8.6 / TS 4.1 so I can't say for sure, but you can create/copy the file from the Program Files folder into the Documents and Settings folder.
I think the default settings in the TestStand Search Directories will find the Public version before the Program Files version and use that. You will probably need to restart TestStand in order for it to find the Public version first.
https://www.ni.com/docs/en-US/bundle/teststand/page/teststand-directory-structure.html
10-22-2012 07:14 AM
Meanwhile i just copied the complete directory with all files and subdirs into the "Public"-path.
Now the model is loaded from there.
Can you give me a hint/example how and where to change the Sequence that you mention?
Thanks
10-22-2012 07:46 AM - edited 10-22-2012 07:51 AM
"PutOneResultinReport_Impl" appears to be the name of the subsequence in TS2012
The data for the entry is built up in 'Locals.ReportEntry'. For each part that you want to concatenate with custom separators, you will need to edit the expression to replace \n with ;
So, if you want to have the test name and data on a single line, you would change the post expression 'Add Step Name and Status' to include a ; instead of a \n in Locals.ReportEntry
Your actual data will depend on the step type (pass/fail numeric limit, string, etc...)
This seems to be handled by a common step called 'Add Flagged Values' which is a DLL call. You proabably don't want to get into modifying that, so you can modify the post expression to replace all \n in the Step.Result.ReportText with a ; and then append that to Locals.ReportEntry.
something along the lines of
Locals.ReportEntry += SearchAndReplace(Step.Result.ReportText,"\n",";")
10-23-2012 10:58 AM
Hi Phillip,
thanks for your hints.
As you can see in my attached result-file it was possible to do what you explained.
Currently two more things are making problems:
1) How can i remove the name of the sequence-call (line "The Call: failed)?
Normally there is also a test inside of this sequence which is currently not displayed in the result file. I think i skipped there a needed line..
But the main thing is how to remove the sequence-name.
2) What to do with the multinumeric-teststep. (It has three results). They are currently all in one line. What can i do that they are displayed in the style as the other results?
So that they are displayed in the same order in each line
Name;Pass/Fail;Measurement;Low;High;Comparison Type
3) There will be then also a problem with the string-limit-tests as they dont have a Low-Limit and so not so much ";" per line which makes it hard to import in somewhere.
Do you have an idea what to do here?
3) I think the removal of the empty spaces will not be a problem.
==> Perhaps it is easier to delete everything here and create a Lalview-vi to handle all this? What is the start reference that i can use in labview?
Thanks for the help.
10-23-2012 11:37 AM
Since you are using TestStand 2012, you should probably look into creating your own result processing model-plugin in order to print results in any way you want instead of trying to modify the existing result processors. TestStand 2012 already includes an example that creates a CSV (comma separated values) file, which you could very easily modify to be semicolon separated.
See:
<TestStand Public>\Examples\ModelPlugins\SimpleTextReport
10-24-2012 06:18 AM
Hell flaborde,
thank you for the help.
I installed this report-type and its running.
Do you know where i can define the columns?
By default there is:
SequenceName, StepName, StatusaDateaTime, AsyncID, ResultID, SqeunceFileName
Where can i enable the measurements & Limits?
Thank you
10-24-2012 10:03 AM
In the sequence file of the model plugin (which after installing should be located in <TestStand Public>\Components\Models\ModelPlugins) in the sequence "Model Plugin - Initialize" the step "Set Report Columns" will set the columns that are shown. These columns have a name (that is the header that is displayed) and a key, which is the key that is read from the result list element when printing a result.
In the result elements, the limits are located in "Limits.Low" and "Limits.High", while the measurements are located in "Numeric" for the Numeric limit test (which means that these values are what you would have to set in the key section of your new column). In order to get these values (and other values you might need) you can set a breakpoint on the "Model Plugin - UUT Done" sequence of your model plugin and navigate to Parameters.MainSequenceResult.TS.SequenceCall.ResultList and each element of that array will be one of your steps with all the information TestStand logs for it.
For more information, the full source for this model plugin is included in LabVIEW, CVI and C# in the examples folder.