NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access/update Station Globals variable from OI?

I am using LabVIEW 8.0 and Test Stand 3.5.
 
I want to modify the Operator Interface that comes with Test Stand by adding a control that will read a Station Global variable (String) for its initial value and if changed will update the Station Global variable with the new value.  How do I go about accomplishing this? An example would be extremely helpful.
 
Thanks,
 
RG
0 Kudos
Message 1 of 4
(3,933 Views)

Hi,

 

Try this link http://forums.ni.com/ni/board/message?board.id=330&message.id=8921&query.id=0#M8921

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,928 Views)

Ray,

Thanks I'll check it out. A couple more questions come to mind. Do I have to do this with the Test Stand UI Controls or with LabView controls or does it matter? Also where within the OI would I need to add the code for this? Pardon my ignorance as this is all new to me.

RG

0 Kudos
Message 3 of 4
(3,924 Views)
RG,

If you are using LabVIEW, then you should insert an additional Button control to the Operator Interface.  You can use a LabVIEW control, however, for the sake of consistency, it makes more sense to use the TS UI Button control.  You need to add a Callback VI that will handle interactions with the Button.  You can do so by registering an Event Callback.  Take a look at the Configure Event Callbacks VI in the Simple Operator Interface that ships with TestStand to see how this is accomplished.  Each of the Callback VIs is executed when an event occurs.  In this case, you will want to capture the Button click event.  For a detailed description of Event Callbacks, please take a look at the Event Callbacks section of this tutorial:

http://zone.ni.com/devzone/conceptd.nsf/webmain/9796c70d7c40c309862570ad005aeb56

If you pass the ApplicationManager control as a User Parameter for the the Button Click event, then you can extract the Station Globals information in the Callback VI.  You can use the method that James suggests in the post linked by Ray.  You can use the ApplicationManager control to access the Engine reference.  With the Engine you can then get a handle for the Globals and access specific globals using the GetVal functions for the PropertyObject class.

I am attaching an example that demonstrates this functionality.  You can insert these VIs into the Simple Operator Interface found in the <TestStand>\OperatorInterfaces\NI\Simple\LabVIEW folder.  I recommend copying the LabVIEW folder and placing it into the <TestStand>\OperatorInterfaces\User\ directory before modifying the OI.  You can then replace the "Top Level.vi" and "Configure Event Callbacks.vi" in the TestExec.llb.

Let me know if you have any further questions.

Thanks,

Tyler Tigue
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,913 Views)