LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do you update a sub-vi when its control labels are renamed

I have a sub-vi that has many control inputs to it and I use it many times in the main VI. But I found that I had to go back and rename some of the control labels, but they do not reflect this change in the main VI. And I do not see an option to update them. There are not Under-intensified.
0 Kudos
Message 1 of 7
(3,185 Views)
Try right clicking on your sub-vi in your main application and then selecting "Relink To Sub-VI". This should take care of your issue.
 
Please let me know if you need more assistance.
 
Casey Weltzin
National Instruments
0 Kudos
Message 2 of 7
(3,180 Views)
But since it is not not under-intensified (i.e. no broken arrow) I do not have the option to relink to sub-vi, for that too is under-intensified.
0 Kudos
Message 3 of 7
(3,169 Views)
Thanks for your post, now I understand exactly what you are saying. Would it be possible to attach your code (just the part that isn't working) so that I can verify the problem?
 
Casey Weltzin
National Instruments
0 Kudos
Message 4 of 7
(3,168 Views)
Are you trying to update the terminals on the subVI or update controls and indicators that you created from it?  If it is the former, it should just happen.  If it is the latter, you can't do it.

Hope that this helps,
Bob Young

0 Kudos
Message 5 of 7
(3,166 Views)

It's the latter. The work around is to delete the control on the main VI that links it to the sub-vi, and then create a new control for it. This will then have the latest naming convention tied to it.

Just a note here, I really am dealing with constants and not controls, but I take it they would act the same way when it comes to their labeling link.

Message Edited by erdccc on 06-08-2006 03:46 PM

0 Kudos
Message 6 of 7
(3,164 Views)
Labeling of controls/indicators on main vi's and subvi's are independent of each other.  You can name a subvi control C1 and in your main you can create a control labeled M1 and connect the two together.  The labels are independent.  Correct me if I'm wrong but I think what you did is to create the subvi first, then you call it from the main, right click on the subvi input terminal, and select Create - Control.  This will create a control in main and label it the same as the subvi.  Then you opened the subvi and changed the label.  You can't expect that change to show up in main.  Labels are not linked that way.  What is important is that the values are passed correctly, and it is unimportant what they are labeled.  If you want consistency in labeling, you would have to manually change the labels in the main to match any changes made in the subvi.  There is no automatic way to do it except to delete and create again as you mentioned.  The best thing to do is to make the labels in a subvi as generic as possible.  The labels in the main vi can then resemble their function, but does not have to match exactly.  For example, my subvi has an array input called "State Buffer".  My main passes an array into the subvi, and is called State Buf 1 in main.  Later on in main, I may call the subvi again with a separate input called State Buf 2.  Labels need not match, but it is apparent from my labelling that I am passing in a buffer of data of some sort.
- tbob

Inventor of the WORM Global
Message 7 of 7
(3,152 Views)