09-08-2005 02:40 PM
09-09-2005 03:08 AM
Are you only calling them dynamically? Are they found nowhere in your hierarchy? Are you explicitly including them in the build?
Do they call different VIs with the same name?
09-09-2005 08:28 AM
Yes, they are being called dynamically. If I run the application without creating an executable, everything runs just fine. This is how I include them in the build: the main dialog, from which I call the six different VI's is specified as the "Top-Level VI" and all the six other VI's as "Dynamic VI" in the Source File tab of the Application Builder.
Yes, they do call VI's with the same name. The program is designed such that the six dynamically called VI's share all the SubVI's in the subfolders underneath them. I didn't think that this should be a problem because only one of the six can be run at one time and use those subVI's.
I didn't quite understand what you meant by placing all of them in a single VI. Do you mean like a top level VI, which can call those six, and have the main dialog VI call this top-level VI.
This is the structure of my program:
C:\project\source\Main_Dialog.vi (top level)
C:\project\source\test1\First.vi, C:\project\source\test1\Second.vi, C:\project\source\test1\Third.vi... and so on (six dynamically called VI's)
C:\project\source\test1\shared1subVIs\... (folder 1 containing subVIs callable from First.vi, Second.vi etc...)
C:\project\source\test1\shared2_subVIs\... (folder 2 containing subVIs callable from First.vi, Second.vi etc...)
C:\project\source\test1\shared3_subVIs\... (folder 3 containing subVIs callable from First.vi, Second.vi etc...)
Again, the ...\sharedX_subVIs\... contains subVIs which can be used by only one dynamically called VI at a time (either First.vi or Second.vi or Third.vi and so on)
09-09-2005 09:25 AM
The reason I asked if they call VIs with different names is because if one VI tries to load a subVI and there is already one with the same name, it will take the open one and so it may break and be not executable. I was thinking that even if you only open one at a time, when LV builds it, it loads all of them and may find a conflict.
Placing the VIs First.vi, Second.vi and so on into a single VI will force them to be in memory at the same time so that it is clear. It will also allow you to include a single additional VI in the build, because including that VI (it doesn't need to have any code, just to call those VIs in a non-executing case) will include them as well.
Also, doing the force-compiling may help. Did you try it?
In general, you don't have to include the VIs in your build. Doing so will actually create copies inside the exe which the exe will call. If the VIs have been compiled (saved), then you copy the directory structure as it is.