NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I send asynchronous messages from the UI (LabWindows/CVI) to the TestStand Engine ?

Hi,

Use the API method: -

Thread.PostUIMessage( eventCode, numericDataParam, stringDataParam, synchronous)

setting the boolean synchronous to False.


Hope this helps
Ray
Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,635 Views)
MatsA,

Ray is correct. I just want to clarify that Thread.PostUIMessage() "Posts a UIMessage to the current operator interface or sequence editor.". Typically the TS engine automatically sends asynchronous UIMessages to the operator interface so that the operator interface can update its GUI (e.g. trace UIMessages indicate that a step has just completed).

In contrast, you asked about sending a message from the UI to the TS engine. If you are looking for a solution other than that provided by Ray, it might be useful if you explained your end goal in sending these messages.
Message 3 of 6
(3,635 Views)
The most important in my question was the direction of the UIMessage - is it possible to send a UIMessage FROM the UI TO the TS engine ?
In other words, if something asynchronous happens in my UI - how can I catch that in my TS engine (and call some DLL function) ?
0 Kudos
Message 4 of 6
(3,635 Views)
It is not "possible to send a UIMessage FROM the UI TO the TS engine", but I don't understand why you would want this.

When your UI event occurs you want to call a DLL function. Why do you want to do this through the engine? In contrast for example, in CVI I could program a callback triggered by the event, where the callback calls a DLL function. If you are looking to control your executions before the DLL function is called, you could do this from within your callback (e.g. Engine.BreakAll). I am trying to clarify the purpose of posting your message through the engine.
0 Kudos
Message 5 of 6
(3,635 Views)
Thank you very much for this clarification.
I'm quit new with this TS-engine stuff !!

/MatsA
0 Kudos
Message 6 of 6
(3,635 Views)