NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

access to ResultList objects from Labview user interface

Solved!
Go to solution

Hi!

I would like to have access to TS Locals.ResultList[] objects from user interface (LV) after test report is generated.

According to TS Help in this point I can get sequence context for the process model sequence file which posts UIMsg_ModelState_PostProcessingComplete message.

But objects of my interest are located in context of client sequence file.

 

Can I get access to Locals.ResultList objects with use provided model file context?

Are there another ways to get wanted data?

 

I have references to sequence file and execution in this point and tried to use Execution.RunTimeVariables property.

But could not get wanted data with any supposed lookup string from this object.

 

Thanks in advance for any ideas.

 

0 Kudos
Message 1 of 13
(4,545 Views)

The general idea is the following:

 

PostProcessingCompleteCB.PNG

 

You have to keep in mind that Locals.ResultList on the model level (callstack) is simply the return value of a sequence call step (MainSequence). Therefore, you will only have this single entry [0].

To get access to the results of the steps inside you MainSequence (and any other sublevel in the callstack), you have to dig into this callstack using this "root-property":

Locals.ResultList[0].TS.SequenceCall.ResultList

 

hope this helps,

Norbert

 

[EDIT]: Since i have not stated it: The screenshot displays the UIMessageEvent callback function in a simple oi where the manager control is the Application Manager.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 13
(4,544 Views)
Solution
Accepted by topic author anpis

Hi, Horbert

 

Thanks a lot for help!

This time I have found useful object for me: Execution.ResultObject.

It directly refers to ResultList.

Nevertheless your variant is very useful too.

Thank you once more and I cancel this topic.

Message 3 of 13
(4,538 Views)

Anpis,

You have an interesting solution.  Would you mind sharing more details?

I would like to do what you are doing, but from a callback inside the TestStand API.

The bottom line is I can't figure out at what point do you get the ResultList from TS?  If I try from any of the callbacks I get the resultlist of that particular callback, which is not the result from the executing sequence.

 

Any help here would be greatly appreciated.

Thanks,

Newb-D

0 Kudos
Message 4 of 13
(4,345 Views)

Hi Newb-D,

 

It sounds like you are interested in retrieving the result status of certain steps within a model/engine callback?  If this is the case, I would suggest storing the results you are interested in a FileGlobal variable in order to have access to the results that you need from within a callback.  You can find a few additional details as well as a situation where somebody used this successfully on this forum post.

 

Regards,

Trey C.

Applications Engineer

National Instruments

0 Kudos
Message 5 of 13
(4,326 Views)

Trey,

Thanks so much for the reply.  Your information is helpful but not quite what I'm looking for.

 

What I'm trying to do is get the results, including limits if there are any, into the Post UUT callback.  Once there I want to use those results for a custom report built in LabVIEW, and saved to Excel.

Why you ask?  Because the company doesn't want to change current methods.  I don't know XML to go manipulating the stylesheet and make it look like our current datasheets, I'm not good with parsing the info from a database, but I have built a good OI and I'm getting better at LabVIEW.  I think if I could just get to the ResultList outside the actual test sequence, I should be able to use LabVIEW to create the report.

 

LabVIEW 2010

TestStand 2010

Excel 2010

 

Thanks,

Newb-D

0 Kudos
Message 6 of 13
(4,323 Views)

Hi Newb-D,

 

The easiest way to do this is still going to be to store the results in a file global - just in a slightly different fashion.  If you need all of this information then you can copy the ResultList variable from ThisContext.Locals.ResultList into FileGlobals and then at the end of your program, simply use a Statement that says FileGlobals.ResultList = ThisContext.Locals.ResultList  .

 

The only caveat to this is that there will be a partially blank result as the last element in the array.  To delete this, you will need one more statement at the end that does something like this:  FileGlobals.ResultList.DeleteElements(FileGlobals.ResultList.GetNumElements() - 1, 1, 0)  .

 

This will store all of the results (minus the two steps mentioned above) in a FileGlobal that you can then access in your Post UUT Callback.

 

Regards,

Trey C.

Applications Engineer

National Instruments

0 Kudos
Message 7 of 13
(4,308 Views)

Trey, thank you so much for trying to help me out here.

I did what you suggested, but still any FileGlobal variable I add in my test sequence is not available in the PostUUT callback.  This is the same for Locals and Parameters.

I even created the variable "ResultList" in the PostUUT callback FileGlobals hoping it would see the variable and update it...nope.

 

I can do it with StationGlobals, but really don't want to.

 

Am I missing some step to get the FileGlobals.ResultList from my test sequence into the PostUUT FileGlobals, it doesn't just show up? 

0 Kudos
Message 8 of 13
(4,306 Views)

Where is your FileGlobals defined, is it in the Process Model or in your Sequence File. If it's in your Sequence File then make sure you use a the Callback PostUUT in your sequence file then you will see the fileglobals.ResultList.

Regards
Ray Farmer
0 Kudos
Message 9 of 13
(4,298 Views)

Thanks for the reply Ray.

I don't want to need to use the model callbacks in my sequence file because my goal is to make an OI for the company.  If I use a PostUUT callback to make this happen in my sequence file, then every engineer in the company must use a call back in there sequence files.

 

However, if I can I want to call the resultlist from a model callback so the engineers never have to worry about it.  I hope I'm makeing sense.

 

Thank you,

Newb-D

0 Kudos
Message 10 of 13
(4,288 Views)