NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UI Message Post from Labview VI running on another thread

Solved!
Go to solution

I have a Labview GUI that will display information about my oven. 

 

this is the thread that runs on the background, it querys my oven, then i save the variables to stationglobals and then send a UI message. this works fine.

 

ts ques.png

 

Now i made an improved OVEN that not only monitors but also controls the oven. It is written in labview.

 

on the example above i use a statement for the UI Message:

RunState.Thread.PostUIMessageEx(UIMsg_UserMessageBase + 1, 0, "",StationGlobals.ovenDatum, True)

 

Where StationGolbals.ovenDatum is a container with numbers and strings.

 

 

Now on my Labview code

tsques2.png

 

 

I have this already wire up in labview. So my question is... Can i just wire my ovenDatum Container into the ActiveXdataParameter or do i need to make some kind of conversion.? am i doing it right?

CLAD, CTD
0 Kudos
Message 1 of 4
(4,387 Views)

I have never used the ActiveX Event Data. Especially when it comes to Numeric Values like an oven's temperature, why should you want to do typecasts to and from variant....

 

BTW... do you mean to handle this message synchronously?

0 Kudos
Message 2 of 4
(4,363 Views)
Solution
Accepted by topic author buton

Problem solved after trying and searching for a solutiong...

 

solvedproglem.png

CLAD, CTD
Message 3 of 4
(4,361 Views)

I know this conversation is an older one but I want to give my two cents anyway...

 

Are you aware of the leaking objects in your code?

- The object coming out of "AsPropertyObject" (this one is easy)

- The object coming out of "GetPropertyObject" as well(!) just sinking it into the message will not release it. (This one is a beast)

Execute that code in a loop and watch your computer slowly slowing down for no obvious reason.

 

I'm not aware of any tools which will point the open references out for you (DesktopExecutionToolkit didn't - at least in the version I used at the time).

Searching this was not funny - finding it even more rewarding...

 

Edit: My case was a third party ActiveX as a source and sink for the object. I haven't tried with ActiveX-object and PostUIMessageEx but I saw the behavior with several calls so I'm sure it applies there as well.

Message 4 of 4
(2,202 Views)