NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

convert local variable to global - labView

I have a sequence with a VI that contains a local variable array. Now I need that data saved for use by a VI in a later sequence. Can locals be converted to globals or must it be re-created and all references to it changed?

 

Thanks,

 

jvh 

0 Kudos
Message 1 of 6
(4,600 Views)

Hi,

 

If you are using the SequenceContext as the reference, then your lookup string to your variable would need to change.

eg "Locals.MyArray" would become "StationGlobals.MyArray"

 

Does this help

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(4,587 Views)

jvh -

 

If this variable is to be used in a later sequence during the same execution, you may want to consider passing it to and from sequences as a parameter.

 

Hope this helps.

Manooch H.
National Instruments
0 Kudos
Message 3 of 6
(4,579 Views)
How do you pass it out as a parameter, just wire it to an indicator terminal? Then would I need to save it in a FileGlobal variable?
0 Kudos
Message 4 of 6
(4,569 Views)
Still studying this approach, looks like I will need to change a very large number of items. When I tried just changing Locals to FileGlobals it didn't change the individual variables.
0 Kudos
Message 5 of 6
(4,568 Views)

jvh -

 

Sequence Parameters can be passed by reference such that changes made in the sub-sequence are reflected in the properties that were passed in from the calling sequence.

 

Unfortunately, TestStand does not update instances where your variable is used automatically, however, you could potentially write a tool to do this for you.

Manooch H.
National Instruments
0 Kudos
Message 6 of 6
(4,554 Views)