10-16-2023 07:52 AM
Hi,
I'm probably missing something very simple here.
I am trying to Post a UI Message from the Sequence Editor to a LabVIEW VI.
RunState.Thread.PostUIMessageEx(
UIMsg_UserMessageBase+1,
123,
"",
Nothing,
True)
Below: LabVIEW Action Step
Below: The VI being Async called
In the call back I am just throwing up a 1-button dialog
Where am I go wrong?
Once ive got this going, I want to Post a UI message from LabVIEW to the Sequence Editor.
Again sorry for such a basic question and thank in advance for any pointers in the right direction
Solved! Go to Solution.
10-17-2023 10:37 AM
This is not the proper use of UI Messages. You need to read up on how to use them correctly.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x3tWCAQ&l=en-US
They are meant for the User Interface. Not for communicating between your sequence file and VIs. Use the Sequence Context for that.
10-18-2023 03:03 AM
Hi jigg,
Thanks for your reply and sharing the link.
I am properly confused...
"TestStand uses UI message objects to pass information about the state of the engine and the current executions to the Operator Interface or Sequence Editor"
Am I misunderstand this then, I cant post a UI Message from the sequence Editor to my LabVIEW UI (VI)?
Even if it is the same TS Engine and Same execution?
What would you suggest as a method for communicating to my Async VI being called through the sequence Editor.
I saw this and thought this would work
"UI messages are the best way to communicate between the TestStand User Interface and sequence files"
I guess I'm misunderstanding again.
Thanks in advance for your support.
Kev
10-18-2023 03:39 PM
I think you are confused as to what a UI (User Interface or sometimes called Operator Interface) in TestStand means. It has a very specific meaning. A UI in TestStand means that it is an application that has an Application Manager control and possibly the other two manager controls, as well as many TestStand activeX UI components. Calling a VI that pops up from you sequence file is NOT a UI. It is what we would refer to as a code module. The Sequence Editor is a UI (underneath the hood there is an application manager running).
You CANNOT have 2 UIs in TestStand share the same engine. It is impossible. UI Messages are used to pass data from your sequence file to the UI (in many cases Sequence Editor). UI Messages are not meant, nor should they be, used to pass data from your sequence file to a code module (in your case a LabVIEW VI).
Here's a document on stopping an Asynchronous VI: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000g0sqSAA&l=en-US#:~:text=In%20the%20Ru....
I think the same thing would apply for passing data to and from the Asynch VI as well.
If you want to do it in the UI then you would use UI Messages and create a custom UI.
Let me know if you have other questions or need clarification on anything.
Hope this helps,
10-19-2023 01:43 AM
Thanks for the clear explanation, that makes sense now! I have created a File Global in my Sequence File and read that by my Async VI, works a treat.
Thank you for being patient with me and educating me! Greatly appreciated!
On to the next one =]