NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I display TestStand OutputMessage on LabVIEW UI

Hi, 

 

I am trying to create a custom TestStand UI in LabVIEW. I am wanting to get the Output Pane that appears in the sequence editor during execution and have this on my LabVIEW UI. The output pane is served by the OutputMessage() function.

I cam across an old forum post that talks about this
How to display the Output messages on LabVIEW - NI Community
But does not work for me - I think things have been deprecated.

So my ask is some direction or a simple example. 

I am using 
TS  2025 Q2
LV 2025 Q1 (64bit)

Any help is greatly appreciated! 

0 Kudos
Message 1 of 7
(223 Views)

Probably, the easist thing is to use one of the TestStand UI controls and make connections accordingly.

IIRC, there should be an example in the Full Featured OI that ships wth TS.

 

If this is not an option, you may need to find your way through the API.

0 Kudos
Message 2 of 7
(217 Views)

I have a C# UI that handles the `ApplicationMgr_AfterUIMessageEvent` and the `UIMessageCodes.UIMsg_OutputMessages`. (using TS23 right now)

I then filter down the list based on the category (also important to ignore the profiler msgs because there can be a lot ...Engine.ProfilerOutputMessageCategoryName), and you can insert them into a table or list that you can display.

 

I happen to send them into a queue so that I'm not taking too much time in the uiMessageEvent. And another part of the code unloads that queue into a listview while also ensuring to clear out older messages. 

0 Kudos
Message 3 of 7
(179 Views)

Thanks for your reply, are you able to share your C# code or at least give the breadcrumbs of what you have done. Ideally i need this to work in LabVIEW

0 Kudos
Message 4 of 7
(163 Views)

I took a look through the LabVIEW UI examples that ship with TS and couldn't see anything for the OutputMessage, everything else is there. 

What's the best way to search through the API?

0 Kudos
Message 5 of 7
(162 Views)

Telling from Parker123456789 statement you should be able to receive output messages using standard UI Message events

 

Oli_Wachno_0-1770103374566.png

 

I have rechecked the Full Featured Example: I did not remeber correctly, sorry! I haven't found output message handling there myself (facepalm)

0 Kudos
Message 6 of 7
(156 Views)

LV doesn't make it easy to browse around. just use the NI Help. either searching via the offline helpviewer thing or their website. ApplicationMgr - NI . here's a starting point. and this OutputMessages - NI

I can share a little bit ya.

In an event handler for ApplicationMgr_AfterUIMessageEvent you can put something like this..

// ...
if (event.uiMsg.Event == UIMsg_OutputMessages) {
OutputMessages event_outputMessages = e.uiMsg.ActiveXData as OutputMessages;
OutputMessages appOutputMessages = engine.NewOutputMessages();
event_outputMessages.CopyMessagesToCollection(appOutputMessages);//recommended to copy to private collection
foreach (OutputMessage message in appOutputMessages)
{
if (message.Category == this.engine.ProfilerOutputMessageCategoryName) //"NI Data - Profiler"
continue;
// do something with the messages
SaveTheInfoSomewhere(message.Message, message.Category, message.Severity.ToString(), message.TimeStamp.ToString("HH:mm:ss.fff"))
}
}

 

Message 7 of 7
(145 Views)