NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Globals ref in runtime

Hi, I have the need of changing stattionGlobals variables value in runtime from LabView. This could not be a problem if I can pass the a reference object to the VI.

The problem is that I have a Labview library and I can not change the connector panel of the VIs. Inside of severals VIs I should have the chance of changing some stationglobals variable value but without changing their connector panel. I guessed I could have store the Globals reference ( from engine-->globals) into a labview functional globals at the beginning of the sequence and then use it. But this reference change continually. And the Engine reference change continually too.

 

Does anyone have some ideas?

 

Thanks a lot.

0 Kudos
Message 1 of 11
(4,019 Views)

Hi,

 

If you are passing the Engine reference to your VI's, then you can use Engine.Globals to get a reference to the StationGlobals then use the PropertyObject to Get or Set the value to your StationGlobals variable.

 

If you are passing the SequenceContext to your VI's, then you can use SequenceContext.StationGlobals to get a reference to the StationGlobals then you can use the PropertyObject to Get or Set the value to your StationGlobals variable.

 

In both cases the Lookup String would be just the name of the variable

eg StationGlobals.MyString the lookup string would be "MyString"

 

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 11
(4,017 Views)

It was not very clear. I can not pass Engine or SequenceContext to my VIs. They are included into a customer Labview library and I cannot change the connector panels in order to pass any reference.

 

I need to store a reference into another VI (using it as functional global). Then call this VI inside the customer library VIs in order to change the station globals.

 

The problem I faced is that I should store the reference in this functional global VI in one step of TS and in another step call the customer library VI, but changing the reference changes too.

 

Thanks.

0 Kudos
Message 3 of 11
(4,015 Views)

Hi,

 

So what is connected to the connector pane of the VI, because if you are not passing either the Engine or SequenceContext you will not be able to access the StationGlobals within your VI. That means you will have to change your StationGlobals within your TestStand Sequence.

 

Regards
Ray Farmer
0 Kudos
Message 4 of 11
(4,012 Views)

So,  there is no way to store a reference into a global variable in LV  and then use it when it is necessary. All the references change their values during the execution. Is it correct?

 

But into the LV full feature operator inteface the application manager ref, the engine ref and many other are stored into globals variable. In that case it works. I need to understand better.

 

Thanks.

0 Kudos
Message 5 of 11
(4,008 Views)

Hi,

 

Maybe I am missing something here, but if you can not get either reference into your VI, how do you think you are going to store it into a LabVIEW global variable.

 

 

Regards
Ray Farmer
0 Kudos
Message 6 of 11
(4,000 Views)

I guess to have a VI at the beginning of the test sequence where storing a reference and I will call it "Store.vi". I could make this VI as I want because is my VI and it does not included into the customer library.

 

The calls to the VI of the customer library are spread in the test seq. In this VIs I guess to insert the "Store.vi" where I can get the reference and use it to write the station globals.

0 Kudos
Message 7 of 11
(3,989 Views)

Maybe you could post some pictures of how you are interfacing to these VI's

 

 

Regards
Ray Farmer
0 Kudos
Message 8 of 11
(3,979 Views)

I hope this cuold help you.

 

The RunIN_CriticalFailure.vi is the one I use to store and get the reference.

 

Thanks 

0 Kudos
Message 9 of 11
(3,975 Views)

Hi Ray, did you take a look to my atteched files?

What is your feeling? It is not possible?

 

Thanks a lot.

0 Kudos
Message 10 of 11
(3,952 Views)