This widget could not be displayed.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UIMSG_Trace

Solved!
Go to solution

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

Testcase1-->Running

Testcase1-->Running

Testcase2--> Running

Testcase2-->Running

 

Please help me to find the solution for above requirement

Vipinraj KK

Certified LabVIEW Architect

0 Kudos
Message 1 of 13
(4,120 Views)
Solution
Accepted by topic author VipinrajKK

The trace event is generated AFTER the step executed but BEFORE the next step starts execution.

You have to reference the "PreviousStep".

EDIT: Use callstack index 0 to get the correct one (Or use ctxt which is already the correct callstack index)

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

Dear Norbert,

 

Thanks for the reply!

 

I m attaching two different word file where i logged all the properties and values using ctxt -0 and ctxt-1.

 

also in my case i need to get only the subsequence name and the status of it. In main sequence i have flow control and wait steps, So if I use previous step, it is will show the name of flow control or wait and status is showing Done.

 

Can you please review it.

Download All
0 Kudos
Message 3 of 13
(4,089 Views)

These logfiles seems to be incorrect. Please post your code.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 13
(4,081 Views)

Code for Decoding UIMSG_TraceCode for Decoding UIMSG_TraceGet Sequence InfoGet Sequence InfoGet Step InfoGet Step Info

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

Your step image is missing...

And since images seem to be preferrable over code, here is what works well for me in the callback:

TraceCallbackVI.PNG

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 13
(4,072 Views)

Hi,

 

I m not getting that object reference in my UI Event Callbacks.

image.png

image.png

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

You can create a callback for Trace only. No need to use the UIMessage event....

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 13
(4,036 Views)

I think, we have to use Execution view manager reference for creating the Trace Event Callback,

I disabled the UI Message event and tried that, but I m not getting any event inside the trace Event callback VI.

 

Also Some of the UI Message i m using for identifying the client file loaded ,Final Test Result etc

 

Can I use both  UI Message event and Trace Event?

image.png

The above VI is Trace Event Callbacks, but i m not getting any event inside this. I used execution view manager reference to create this callback

image.png

 

0 Kudos
Message 9 of 13
(4,034 Views)
Solution
Accepted by topic author VipinrajKK

Yes, Execution View Manager is the one to use.


@VipinrajKK wrote:

[...]

Can I use both  UI Message event and Trace Event?

[...]


I've not tried this one specifically, however, using both won't create errors. However, it is possible that the UIMessage event is not triggered in LV as the Trace event callback might remove the UI Message object.

The biggest issue when developing callbacks is that errors in the execution do not popup up. That means that when you e.g. try to access "PreviousStep" and the reference is invalid, the next property node on that step reference will create an error. However, you are not notified.

So please insert code to publish error information like the error code and/or string in order to know if the callback ran into an error.

You might also want to implement a counter to know how often the callback executes.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 10 of 13
(4,029 Views)