NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Access to resultlist



@LVKevin wrote:
Hello,

How do you access the test results found in "ResultList" which are generated while in the main sequence? When I am back in the SequentialModel sequence I am unable to find the data that was just generated. Actually, I would like to access this information from within a subsequence call (PostUUT Callback). I have thought about the reference that is being used in other subsequence calls (TestReport Callback) but I cannot seem to change the inputs to PostUUT Callback (i.e. add the reference) futhermore if I were able to get the reference in there how would I decode it in LabVIEW?

Thanks,

Kevin


This thread is as close as I can find to my question about accessing the ResultList array.

How do I index the ResultList[index] which is generated while in a sub-sequence of my main sequence.  This particular sub-sequence has 4 Numeric Result Tests that each return a result.

Each test fill in ResultList[x] where x is 0..n

After each test step within the sub-sequence I have a callback function that logs the results of this step (step name, limits, result, etc.)  This function is passed ThisContext.

SUB-SEQUENCE
    TestStep1    ResultList[0]
    Log_Step
    TestStep2   ResultList[1]
    Log_Step
...
END SUB-SEQUENCE

    /* Test Step Type- determines the form of the result value
        NOTE: The ResultList[0] implies only one result returning
        action per sub-sequence.
        How do we get the index programatically in our callback function?
     */
    TS_PropertyGetValString(thisContext, NULL,
        "ThisContext.Locals.ResultList[0].TS.StepType", 0, &stepType);

This all works just fine for one test per sub-sequence but obviously doesn't work in the general case.

Any suggestions?
0 Kudos
Message 11 of 17
(2,733 Views)

Hi Mhousel

I have done such thing, not with logging but with renaming the last step in the resultlist.
But now I am at home and have just spent a hour write is simple Example, sorry but wont work at all.

So please wait till monday and i will post the example.

good night

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 12 of 17
(2,717 Views)

Hi Mhousel

here is a example for accessing the ResultList

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 13 of 17
(2,706 Views)


@j_dodek wrote:

Hi Mhousel

here is a example for accessing the ResultList

juergen



Thank you Juergen.

That method simplifies what I'd finally got to work. 

Since all my standard test sequences use sub-sequence calls for each "Test", some of which may incoroprate several "sub-steps", say to run a single test across all of the ports of a product.

POWER_SEQUENCER_ADDRESS // Call the POWER_SEQUENCER sub-sequence

Pre-test
TST_PowerSequencerAddress Slot0  // Calls the LabWindows/CVI test code, updates the overall step# and sub-sequence index
TST_PowerSequencerAddress Slot1
TST_PowerSequencerAddress Slot2
TST_PowerSequencerAddress Slot3
Post-test  // logs all tests in this sub-sequence (typically only one, and why my original use of index 0 of the results array worked mostly)

I already keep track of an overall step number for data logging, and now track the index of each sub step separately in my code to access the Results array.

Then when the Cleanup callback runs to perform my custom data logging I'm taking that index and  logging all of the sub-steps of each "Test" in a loop at that time.

Your method would eliminate all of that housekeeping on my part by placing that in the sequence file itself.

It took me a bit of work to get the indexing right but it works well across all of my sequence files without having to go back to change them. 

Thanks again for the example.  Seeing more examples of the use of variables that are not visible except at run-time helps me have a better understanding of what is possible.

0 Kudos
Message 14 of 17
(2,694 Views)

I also have the same problem to access the resultlist. The original test sequence was working under batch model. I changed the process model to sequencial model. In the PostUUT sequence callback, it accessed the resultlist through the parameters ModelData and TestSocket, but once I changed the process model there are no these two parameters in sequencial process model. The PostUUT callback is used to generate a CSV report. In order not to change the sequence too much, is there any easy way to access the resultlist.

0 Kudos
Message 15 of 17
(2,146 Views)

I am currently facing the same problem as described in the first post. I am using both TS and LV 2012.

I found your answers quite helpful and did some tinkering myself. The problem is quite simple if the results are stored only from the local sequence or if there are no nested sequence calls, but what if that is not the case?

I want to access every test name and test result in LabVIEW after the mainsequence has run (for example in cleanup).

 

The problem I ran into is that if a Step is a nested sequence call then the ResultList looks like this:

ResultList[x].TS.SequenceCall.ResultList[y].TS.SequenceCall.ResultList[z].TS...

My recursion detector was really buzzing...

 

I am now trying to put together some recursive VI to get the Step names and Results from the Test steps (and only of the Test steps and nothing else). The thing is that I am now stuck.

As a first step I built a VI which in theory (at least in my head 🙂 ) should gather the Step name of everything that is not a sequence call but it always crashes (probably endless recursion)

 

Am I overcomplicating this? Is there a simple way to get the full content of the ResultList into LabVIEW?

If not, then could someone help me find what is wrong with my VI?

 

Many thanks!

Message 16 of 17
(2,067 Views)

Hi ryz,

 

This is probably 9 years too late, but if anyone has the same question, I just wanted them to know that there is an example of getting results from nested sequence calls in the Simple Text Report example provided in TestStand. The example provides LabVIEW code along with DotNet and CVI versions.  I have been able to successfully adapt it for other uses.

 

It is located at

C:\Users\Public\Documents\National Instruments\TestStand <your version> (32-bit)\Examples\Customizing Result Processing\Model Plugin - Simple Text Report\LabVIEW

 and the code installs to C:\Users\Public\Documents\National Instruments\TestStand <your version> (32-bit)\Components\Models\ModelPlugins\NI_SimpleTextReport_LabVIEW

 

Cheers

0 Kudos
Message 17 of 17
(795 Views)