04-04-2019 12:27 AM
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
Solved! Go to Solution.
04-04-2019 05:34 AM - edited 04-04-2019 05:35 AM
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)
04-04-2019 05:59 AM
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.
04-04-2019 08:48 AM
These logfiles seems to be incorrect. Please post your code.
04-04-2019 10:35 AM
04-04-2019 10:52 AM
Your step image is missing...
And since images seem to be preferrable over code, here is what works well for me in the callback:
04-04-2019 11:14 AM - edited 04-04-2019 11:34 AM
Hi,
I m not getting that object reference in my UI Event Callbacks.
04-05-2019 06:14 AM
You can create a callback for Trace only. No need to use the UIMessage event....
04-05-2019 07:17 AM
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?
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
04-05-2019 08:15 AM
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.