LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change the reference to a shared variable programatically? (i.e. "Select variable...")

I'm using LabView 8.5 Full development system.  I have a simple project where I created five shared variables (sv_one, sv_two, sv_three, sv_four, sv_five). I also have a simple vi which writes to one of my shared variables, let's say sv_one.  If I want to write to sv_two, I need to manually right click on the shared variable which lies on my vi and select "Select variable..." and select sv_two, or sv_three, etc.

 

My question is, how can I do this programatically? I mean renaming (selecting) the variable.  I'm quite new to LV so a step by step help would be appreciated.

 

Thank you

 

Marc 

0 Kudos
Message 1 of 3
(2,615 Views)
You could place them in different cases of a case structure and then programmatically select the case with the desired target.
0 Kudos
Message 2 of 3
(2,614 Views)

Altenbach,

 

Thank you for your answer.  That would be a possibility but I was looking something more into accessing the properties of the references to the shared variables as in http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/sharvarref/

Unfortunately this article does not specify too much and I gave up on that.  Any ideas?  

 

Mark 

 

  

0 Kudos
Message 3 of 3
(2,610 Views)