NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the OUTPUT pane`s message

Solved!
Go to solution

Hi, I have a question about how to get the output pane`s message.

Actually i have find the property (engine.getoutputmessage) from the help file, but the confusing thing is that i can`t find this property in teststand and labview.

I just use the labview2014 and Teststand2014.

I hope someone can help me. Thank you in advance!

 

Download All
0 Kudos
Message 1 of 9
(1,356 Views)
Solution
Accepted by open28

Hello,

 

I'm not sure I fully understand the question. But, if you are looking for a way to display OutputMessage in your operator interface, it's a matter of UIMessage.

 

The OutputMessage is sending an UIMessage, so you have to register a callback on UIMessage (already done in operator interface examples) and to handle event code 40 (UIMsg_OutputMessages constant, see UIMessageCodes Enumeration).

 

I implemented something like that few years ago (TestStand 4.2.1). The callback VI looks like this :

 

TestStandOutputMessages.png

 

I needed to get a reference to an OutputMessage (PrivateOutputMessage in global variable) from Engine with the NewOutputMessage Method. In the callback, you need to cast the ActiveXData to an OutputMessage object, and to use the method CopyMessagesToCollection.

 

The SubVIs that follow handle the copied messages to display them in a multi-column listbox (with dirty constant, oops...). In my case, the association icon / output message category is handled in the sub-VI that follow the node Item property on the OutputMessage reference :

 

TestStandOutputMessages_2.png

 

 

See also the OutputMessage object for more details on available data.

 

Hope this helps,

Message 2 of 9
(1,305 Views)

thank you for your response.

My purpose is to save the data in the output pane. so i think i need to find the output`s reference, then i can get the property to realize my function .but actually ,i can`t find the reference.for example OutputMessage reference.

If it is possible ,can you send me your code .

Thank you !

0 Kudos
Message 3 of 9
(1,296 Views)

To answer the first question, about the GetOutputMessages Method, this method is deprecated :

 

  Note  This method is obsolete. Use the OutputMessages.CopyMessagesToCollection method instead.

 

... so I guess that's why it is not shown in LabVIEW.

 

I cannot send you the code, as long it is part of a whole Operator Interface developped for a customer. And I'm not sure it adresses your need.

 

If I understand, your need is to get a kind of export of the OutputMessage pane, right ?

0 Kudos
Message 4 of 9
(1,291 Views)

yes, you are right.

thank you  any way!

0 Kudos
Message 5 of 9
(1,281 Views)

Hello Mathieu,

 

I know this is an old thread but I am trying to do exactly the same as you do show in your code snippets.
Unfortunately I am running in some errors.

The CopyMessagesToCollection invoke node is throwing error -17500 in my tests.

 

I am also a bit confused since in your explanations you are talking about OutputMessage objects as your code snippets seem to be showing OutputMessages objects.
What exactly is the object inside your global variable and also the type you cast the ActiveX data to?

 

Thanks alot

 

Stefan

0 Kudos
Message 6 of 9
(464 Views)

Hello,

 

Not sure, I didn't reopen the code, but I think the OutputMessages reference stored in the Global Variable is get from Engine, with the NewOutputMessages Method. It's an empty collection that will handle the OutputMessage object you copy to it.

 

Hope this helps,

Message 7 of 9
(461 Views)

Hello Mathieu,

 

you are correct.
By creating a NewOutputMessages object and casting the ActiveXData of the UIMessage event to it, I could invoke the CopyMessagesToCollection method with my NewOutputMessages object as target and read out the output messages from the Item list afterwards.

 

Thanks alot!

0 Kudos
Message 8 of 9
(285 Views)
0 Kudos
Message 9 of 9
(281 Views)