Vipinraj KK Posted April 4, 2019 Report Share Posted April 4, 2019 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 Quote Link to comment
SometimesRight Posted April 29, 2019 Report Share Posted April 29, 2019 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 :-) Quote Link to comment
Vipinraj KK Posted May 2, 2019 Author Report Share Posted May 2, 2019 Hi, Thanks for your reply! Please refer below link https://forums.ni.com/t5/NI-TestStand/UIMSG-Trace/m-p/3912388#M59433 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.