05-18-2012 04:42 AM
Hello all,
A code module in Labview called from an action step has a specific variable that changes its value during the vi execution. Is it possible to monitor these changes through e.g. a local variable in TestStand and display the different values on the user interface at real time via UIMessages?
Thanks a lot!
Solved! Go to Solution.
05-18-2012 09:38 AM
You can send the value directly with UI messages. You can even send complex data by calling Engine.NewPropertyObject and passing the object as the activeX data parameter to the UI. You should post the UImessages synchronously in most cases.
Hope this helps,
-Doug
05-21-2012 01:58 AM
Doug, thank you very much for the reply. Unfortunately I am very new to TestStand and I am not sure if I have understood correctly.
What I did till now is to create a vi with a changing variable and connect its output to a local variable in TestStand (locals.xxx). What happens is, that the local variable returns only the last value of the vi's variable when the vi has stopped executing and is empty while the vi is running. Another thing that hasn't worked for me yet is to synchronize an UIMessage step with a LabView action step so that i can monitor the values of the vi on the fly. Any solution to these problems would be greatly appreciated.
05-21-2012 08:09 AM
You would need to post a UIMessage during the execution of your VI. Such as the following picture below, you can ignore the SequenceErrorMessage string and use the value of your variable as the numericDataParam. I suppose the trick is to determine when to post the UI Message, in your case, is the variable updating at certain times or it it constantly updating? I am not sure of the performance lag if you continously post a UIMessage say every 100ms.
On the other end, in your UI you will need to create an Interface callback to handle the UIMessage. See the following link for more details.
http://www.ni.com/white-paper/4532/en
Enjoy,
PH