08-28-2005 12:58 AM
08-28-2005 01:36 AM - edited 08-28-2005 01:36 AM
Message Edited by SG_ENGINEER on 08-28-2005 01:37 AM
08-28-2005 02:10 AM
As you said, the paths to the subVIs are relative to the caller's location (e.g. go 3 directories up, then go into directory called aaa and find the file bbb.vi). This means that if you move your files to a different location and they call a VI, they will try to find it in the same location. If they can't, LV will start searching for it. It will start by looking in the same directory your VI is in, then it will go through the directories configured in the VI search paths screen of the options menu (and if it doesn't find it, it will ask you to find it yourself).
The other point, as mentioned by Goy, is that only one VI of a certain name can be in memory at any one time. That means if you have a VI open and you try to open a VI calling a different VI with the same name, the opened VI will now form a link to the already opened subVI and that link will stay permanent (unless you don't save the calling VI).
For directory structure, you can try having subdirectories and keeping project prefixes or suffixes for VI names, to avoid duplicates. Common utility VIs can be saved in a central location. You can try looking at OpenG for an example.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
I think the style guide has some more details on this.
08-28-2005 02:22 AM
Here is a good discussion on how LabVIEW loads VIs in general -- good to know to manage such issues:
http://messages.info-labview.org/2004/02/29/09.html
Regards,
-Khalid
08-28-2005 07:39 PM