03-18-2009 02:02 AM
Hi,
I am having a MAin VI that is calling a Sub VI. I am using call chain in SubVI to get the reference of the Main VI but giving me output as SubVI. Is this the way call chain works because I had feeling that call chain returns the caller Vi name.
Please help me if someone knows something about this or guide me in case have some other alternative to do it in a better way since adding a terminal and passing the reference to the SubVI is not our requirement.
Thanks in Advance
Regards,
Vivek
Solved! Go to Solution.
03-18-2009 03:14 AM
Hi Vivek,
Call chain returns an array of VI names. The first element is the current VI (SubVI), the second element is the caller.
Hope this helps,
Daniel
03-18-2009 03:25 AM
I am using call chain in SubVI to get the reference of the Main VI
03-18-2009 03:50 AM - edited 03-18-2009 03:51 AM
Depending on what you're trying to do, the following may also be interesting:
Drop a property node on the Block Diagram, set the class to "VI" and selest "Caller's names". this will give yout the names of ALL VIs which call the current VI within your program. It is perhaps useful if you need to update more than just the VI which called the VI this time.
Call Chain can give VI which called the current VI at this moment in time
Caller's names Property node can give ALL VIs which can call the current VI at ANY time.
Shane.
03-18-2009 04:08 AM
The OpenG toolkit has a function called 'Current VIs Parents Ref' that returns the reference of the VI calling the VI with this function.
Ton
03-18-2009 05:20 AM
Thanks for the answers and the soultion.
I practically used both the options i.e call chain and VI reference. I have now one doubt regarding the reading of Controls available in Main VI through SubVI. I tried with call chain but couldn't able to establish communication between the two VI's. What I am trying to do I'll continously read the value given by the user in MAin Vi and will process those value in the SubVI. I am having an array and hence for the first index able to do but not for the rest of the indices.
Please suggest me in case anyone have any knoweldge of this.
Thanks In Advance.
Regards,
Vivek
03-18-2009 07:05 AM
Hi Vivek!
Is it something like this you are trying to do?
Regards
/Thomas
03-18-2009 07:11 AM
03-18-2009 07:23 AM
Thanks A Million To All of You ....
Now I have acheived the requirement ...
06-05-2009 11:15 AM
Hi
I think your files are interesting for me as well but I just have an older version of labview installed on my computer. Is it possible for you to save your files in such a way that can be opend in LV 8.2.
BR
Afshin