04-20-2011 03:54 AM
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.
04-20-2011 04:11 AM
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"
04-20-2011 04:23 AM
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.
04-20-2011 05:27 AM
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.
04-20-2011 06:59 AM
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.
04-20-2011 08:36 AM
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.
04-20-2011 12:15 PM
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.
04-21-2011 12:50 AM
Maybe you could post some pictures of how you are interfacing to these VI's
04-21-2011 02:17 AM
I hope this cuold help you.
The RunIN_CriticalFailure.vi is the one I use to store and get the reference.
Thanks
04-27-2011 03:10 AM
Hi Ray, did you take a look to my atteched files?
What is your feeling? It is not possible?
Thanks a lot.