05-02-2016 03:37 PM
Hi, BRAND SPANKING NEW GUY here, with what is probably a quite Newb question:
Levelset: LabView & TestStand 2014
In Labview, I have a VI that takes data from an XML file, processes it, and spits out another XML File
The Output is:
Name, Raw Score, Grade
In Test stand, I want to run the VI, Take the output file, and report
Name Grade, Pass(/Fail) based on the raw score... < 60 = Fail
All I have been able to do successfully is to create a report with all the elements from the output XML (1 element per line)
So,
1. Is there a way to create a report with more then 1 element reporting per line?
[Have
Name: John
Score: 100
Grade: A
Name: Fido
Score: 50
Grade: F
...
want:
John, A, Pass
Fido, F, Fail
...]
2. How do I read & USE the XML data, producing an element that was not in the XML?
Solved! Go to Solution.
05-03-2016 08:06 AM
Let's say you have LabVIEW code that creates 3 arrays for Name, Raw Score, and Grade by doing the parsing that it seems you are already able to do.
In TestStand, you use a For loop to get each element of the 3 arrays. Then, you have a None adapter step that is a Numeric Limit Test. The Data Source for this step is the Raw Score and set the limits to be less than 60. In the post expression, you could add the line Step.Name = Name[i] + ", " + Grade[i]. (i is the index of your For loop.)
I don't think I understand what you're getting at with your second question.
05-03-2016 08:57 AM
I think this may help with that other part:
For example, say my current report is
Action |
| |
Status: | Done |
|
Class Grade Report [Out]: |
| |
Class Grade Report [Out][0]: |
| |
Name: | Tom Jones | |
Final_Score: | 77.325 | |
Letter_Grade: | C | |
Class Grade Report [Out][1]: |
| |
Name: | Johan Dough | |
Final_Score: | 55.075 | |
Letter_Grade: | F |
I would like to render it differently, like this: (Some sort of multi-variable formatting structure perhaps?)
Action |
| |
Status: | Done |
|
Class Grade Report [Out]: |
| |
Student | Tom Jones 77.325 C Pass | |
Student | Johan Dough 55.075 F Fail |
05-03-2016 09:09 AM
What you propose changing looks like it could be done by modifying the stylesheet for your XML file. And really, I don't think this part of your question has anything to do with TestStand.
05-03-2016 09:38 AM
Ummmm... The file In question is the TestStand stock report.......
Part 1: handle data from LabView currently being sent to an XML file
Method: LabView passes 3 arrays to TestStand. Who cares how labview does it's XML output file...
Test Stand does the processing in a loop to get all elements
(Done... well, I have a place to begin to work)
Part 2: Have Test Stand display the results in the stock report
Part2a - can the stock report be modified in some fashion
05-03-2016 03:50 PM
To me it doesn't sound like you really want to change the data, just the way it is displayed, which is controlled by the stylesheet, not TestStand. It looks like you might be using report.xsl; I would try changing to horizontal.xsl and see if some minor modifications to horizontal.xsl gets you what you need.
You could modify reportgen_xml.seq, but that only modifies how data is saved as an XML file, not how it's displayed when converted to HTML.
05-04-2016 07:58 AM - edited 05-04-2016 08:01 AM
In the end, I got what I needed by relying on LabView.
I used it to concatenate the data I needed into 1 string, then passed that out as a simple array that teststand could report
The above was all an attempt to solve a challenge posed to me (Yes, I was told I could use the forum if I got stuck)
In the end, my mentor was pleased with the result. So, I thank you for pointing me in the right directions
Oh, Also did a dive into XSL StyleSheets... That was interesting... (Kind of the way it is "Interesting" to watch a car crash but....)