From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing TestStand StationGlobal within LabVIEW

For a current project I am attempting to access and set an existing StationGlobal "SimulationMode" of type Boolean in TestStand from within a LabVIEW VI, using the following code depicted below:

 

StationGlobal accessStationGlobal access

 

A fair number of examples depict this being done in the same manner, yet somehow I am not able to access this particular StationGlobal "SimulationMode". Even just trying to get the Boolean value (without the prior set Boolean) does not yield me the value of the StationGlobal Boolean. I am certain that I have correctly applied the Application Manager to link to the TestStand application, as per the following paragraph.

 

In a separate VI I was able to find that LabVIEW can determine that this StationGlobal exists: by using PropertyObject with the 'Exists' method I am able to obtain the accurate Boolean condition for whether the specified StationGlobal exists or not. It returns a true on "SimulationMode" as string input, whilst any other input (such as "SimMode") returns a false.

 

How would I be able to access and set the value of this StationGlobal of type Boolean in Teststand from within a LabVIEW VI? I am using LabVIEW 2017 SP1 and TestStand 2017 (TestStand 2017 API Ver 1.0).

0 Kudos
Message 1 of 8
(2,967 Views)

You just need the SequenceContext and then use the TestStand - Get Property Value.vi or the TestStand - Set Property Value.vi.  Both are in the TestStand palette.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(2,936 Views)

Wow, thanks! I am now able to get the accurate value from the TestStand StationGlobal using the TestStand - Get Property Value VI . However, when I attempt to write to it using the Set Property Value VI it will not change the value in TestStand for this StationGlobal. I am using the following program:

new program.png

 Also, per the Sequence Context In this will only function if I call the Labview from the sequence, correct? Can the LabVIEW VI not modify StationGlobals by its own, just running as standalone?

 

0 Kudos
Message 3 of 8
(2,930 Views)

Hi,

to get the Station Globals values do you have to run the VI from Teststand?

 

I am not sure how to set up the Sequence Context in to allow me to access the Teststand Station Globals.

 

I have Teststand open and I have a labview VI open trying to get a value from the Teststand Globals but I just get an error.

 

BillyJ_0-1642417286840.png

 

0 Kudos
Message 4 of 8
(1,705 Views)

Here are the station globals

 

BillyJ_0-1642423567829.png

 

0 Kudos
Message 5 of 8
(1,690 Views)

SequenceContext is available only when the VI is called in TestStand.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 8
(1,672 Views)

Hi, thanks for your reply.

 

So I want to customise the basic Labview Operator Interface.

 

I need to add two combo boxes.

Then I need to pass the selected values into the station globals execution for two string variables called ProductClass and ProductType

 

The Operator Interface is Labview and I want to change the variables in Teststand.

 

It looks like TestStand is started prior to the main loop in the Operator Interface so it should be running.

 

I get an error when trying to write the variables.

 

BillyJ_1-1642685450256.png

 

 

BillyJ_0-1642685409111.png

 

0 Kudos
Message 7 of 8
(1,655 Views)

So I managed to the get the Product_Class and Product_Type sorted out but I have another issue and hope someone can help.

 

Based on the values of the Product_Class and Product_Type I want to pass a path to the sequence file rather than selecting the sequence from the SequenceFile ComboBox that comes with the Labview user interface.

With the Activex Combobox that comes with the UI I don't see any way to pass a value to the Combobox programatically. It seems that you can only select the value from the dropdown Combobox.

I don't want the operator to select the sequence.

I want the operator to select the Product_Class and Product_Type and based on these values I want to specify the path to the sequence file to be used.

 

Does anyone know how I can do this?

 

0 Kudos
Message 8 of 8
(1,607 Views)