08-30-2013 04:13 AM
Hey,
thanks for all your solutions.
I will make it now as an extra input as you suggested me. I think thats the easiest way to do this.
kind regards
Luke
08-30-2013 07:22 AM
Only if the VI is reentrant, each called instance is unique. Otherwise there is one shared instance among all calls and if you change the label of one call it would not even make a difference overall.
You have not told us why you think you need this. Changing the label of a subVI instance seems like a bad idea in general and will just obfuscate the code. Having a unique input as suggested is one way to let the subVI be aware of the called instance, but there is no guarantee that it will be unique or make sense to the next programmer to work on this code. If you just want to know from where the subVI has just been called, you could use the call chain function inside the subVI.
08-30-2013 08:02 AM - edited 08-30-2013 08:23 AM
Honestly, i don't get the question.
If i drop a subVI into a calling BD and display the label of the subVI, this label cannot be changed.
So the initial description in the OP is incorrect as technically not possible (tested LV 7.1 and 2013).
So i am wondering if i only misunderstood the question or Luke has found a way to change things which should not be changeable.....
Norbert
EDIT: After some testing, i found out that modifying the label is possible, but only using the property dialog. Strangely, it is not possible for all VIs (some have greyed out text).
Alos, reading that label using VI Scripting for subVI call nodes is possible. But it fails for certain call instances like DAQmx Timing.vi and Write To Spreadsheet File.vi. Changing the label (if possible) does not change this.
I also concur with altenbach:
There is no reasonable reason for this to work at all. So what is it what you really want to do? Why is a string parameter not a valid way to pass configuration information?