LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing TestStand variables from a subVI

Your global is a sequence context control. This is the same control you place on the top level VI, right? It's the control that's on the TestStand>Legacy palette.

 

What is not starting to make any sense is why you are even bothering with the Get Property Value VI when you can directly pass a value through the connector pane. Then  your global would be the same type as the TestStand variable.

 

There can be legitimate reasons for using the sequence context but it sounds like it's not being used now so why making it any more complex than you have to.

Message Edited by Dennis Knutson on 06-16-2010 02:06 PM
0 Kudos
Message 11 of 16
(779 Views)
Object reference type.
0 Kudos
Message 12 of 16
(768 Views)

Dennis Knutson wrote:

 

What is not starting to make any sense is why you are even bothering with the Get Property Value VI when you can directly pass a value through the connector pane. Then  your global would be the same type as the TestStand variable.

 


Dennis:  If he passes the value through a connector pane, and the value changes before it is used by the subvi buried 10 levels deep, then the subvi will not have the current value.  With Get Property Value, he can get the value at that instant.  This would be the only reason to use Get Property Value.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 13 of 16
(757 Views)

Possibly, since the op mentions file or station globals. Though I think there would have to be some parallel threads going on in order to change the value.

 

I actually use nothing but a single sequence context control in my VIs. I started with version 1.0 and was stuck with 2.0 for sesveral years. Passing values via the connector pane did not come out until 3.x or something. When I started writing custom steps (VIs built into a DLL), I used as a model the way NI wrote the IVI steps. They have a single parameter - sequence context.

0 Kudos
Message 14 of 16
(750 Views)

 

There can be legitimate reasons for using the sequence context but it sounds like it's not being used now so why making it any more complex than you have to?

 

The original code was written for a single model type. We now have many model types. The affected VIs are six levels deep and need to behave differently (control, timing, and range values) based upon the model number and other parameters that are known to TestStand. Having these parameters allows the VI to know what parameters to use.

 

 

 

0 Kudos
Message 15 of 16
(730 Views)
Fine, but how is that relevant? You can either pass the parameters by using the sequence context and using the Get Property Value VI or pass the parameters via the connector pane. If you directly passing the parameters, then it makes more sense to me to keep using that. If you are now using the sequence context, then stick with that. If you are not currently passing anything to the VI, then it's up to you to determine which method to use. An advantage of using the connector pane is that you can run and debug the VI outside of TestStand.
0 Kudos
Message 16 of 16
(720 Views)