Jump to content

Using UIMSG_Trace

Recommended Posts

Dear Members,


Is anyone utilised the Default Teststand UI Messages?


Whenever a step is executing I m getting the UIMSG_Trace(4) Event from Teststand to LabVIEW User Interface. I m trying to use the same to know the current step executing and the status of it and I could get the current step executing but i m not getting the status of the step executed.


Below are the Procedure I m following to run the sequence.

1. Run Test UUTs (Running Sequential Model Directly)

2. Enter Serial Number

3. Load Client file based on serial number entered.

Below are the LabVIEW code i m using to get he Step info through UIMSG_Trace Event.




Here I need to take only the name of current subsequence executing and its status.

I M getting the name of subsequence here, but the status is showing running ,like below formate



Testcase2--> Running



Please help me to find the solution for above requirement

Vipinraj KK

Certified LabVIEW Architect



Link to comment
  • 4 weeks later...

Hi Vipinraj,

I don't think you can get what you need from the trace event, at least I have never got it to work. This is how I get the step result, this is using C# .NET rather than LabVIEW but the call parameters and property names are very similar:

SequenceContext context = e.uiMsg.Thread.GetSequenceContext(0, out frameId);
PropertyObject resultList = context.Locals.GetPropertyObject("ResultList", 0);
int numElements = resultList.GetNumElements();
if (numElements != 0)
  PropertyObject lastResult = resultList.GetPropertyObjectByOffset(numElements - 1, 0);
  string status = lastResult.GetValString("Status", 0); // "Done", "Passed", etc. depending on step type

Note: the result for the currently-executing step has not yet been posted into ResultList, so I think you get the result for the step preceding the one being traced. There may well be a better way to do this but it is hard to find out especially as the documentation is not good, repeated trial and error is my usual MO! If you have found how to do it differently please post here as it will be useful to me :-)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.