NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitor value changes of a variable in a labview code module from TestStand?

Solved!
Go to solution

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!

0 Kudos
Message 1 of 4
(3,859 Views)

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

0 Kudos
Message 2 of 4
(3,850 Views)

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.

0 Kudos
Message 3 of 4
(3,831 Views)
Solution
Accepted by topic author pvki

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

0 Kudos
Message 4 of 4
(3,824 Views)