NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

PostUIMessage between two applications (OI.exe and Server.exe)

Hi,

I use the PostUIMessage method to pass custom data from my test sequence to my Operator Interface (OI). This is pretty simple by an ActiveX call with RunState.Thread as the reference to an ActiveX test step or some LabVIEW code that handle this. See (TSEngine_PostCustomUIMessage.seq).

But I also have an other LabVIEW application (Server.exe) that should notify my OI if some conditions occurs. I have in mind to do this through the TS API (ActiveX server) with at PostUIMessage. But my problem is to get the right reference to my OI from my Server.exe. As seen in my two examples VI, I have used the Automation open to create a reference to the NI TestStand API. But the only creatable object is the TS.Engine. But when I connect this and select the PostUIMessage method I need to pass the executionParam and the threadParam to the message (See. Option 1 in TSEngine_PostCustomUIMessage.vi diagram). How did I get them? If I add a control the message is send but not received (I think receiver is unknown by TS API).

In Option 2 I have added the VI I used to send PostUIMessage with the RunState.Thread. Is it possible to get this reference from my Server.exe and use the same VI from this?

Is it possible to send a Custom Message (E.g. PostUIMessage) FROM my OI to my application (Server.exe) through the NI TestStand API?

I have attached the seq and vi’s described above.

I’am looking forward to hear from you.

Best regards,

Morten Pedersen
CIM Industrial Systems A/S
Denmark
0 Kudos
Message 1 of 2
(2,889 Views)
It sounds like you have two distinct processes.

Whenever you create an instance of the TestStand engine, it is unique per process. This means that if you create two instances of the engine from the same process, it will really be the same engine. However, if you create another engine from a seperate process, it will be completely unique. This means that you will be unable to post a UI message between the two engines.

There are a couple of other solutions around this.

1) You can pass the engine from the OI to the Server somehow. (This may not be feasable for your design)

2) You can use another method to pass information back and forth between the server and the OI. Possible candidates would include DataSockets, TCP, or even the TestStand Synchronization Server (used for the Syncrhonization Step Types). The documentation for this feature is only in 3.1.

Allen P.
NI
0 Kudos
Message 2 of 2
(2,882 Views)