LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subvi calling

I am using LabVIEW7.1. There are two vis. One Main.vi and second SubVi1.vi. Calling SubVI1.vi in Main.vi. Now when I copy the Main.vi to some other folder on the PC it is not able to find the SubVI1.vi? (I have not moved SubVI1.vi.)

Earlier it was used to find properly. It is working fine in other PC. Does any specific settings needs to be done?
br,
vishal

0 Kudos
Message 1 of 6
(3,041 Views)
Vishal,

copying the Main into another folder and loading it from there, you will most often have the issue you are observing: The SubVI is not found.
This happens, because LV just saves the relative path to the sub if possible. So if you copy the subvi as well into the new folder, everything will work fine for you again.
But please note that, if a vi of the same name is already in memory, LV will use this vi instead of the one you (maybe) want to have....

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(3,038 Views)
Is there any way we can set the subVI of the LabVIEW with absolute path?
0 Kudos
Message 3 of 6
(3,026 Views)
No, there is no way if you are using static subvis.

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(3,012 Views)
You can include the directory where "subVI1" and "subVI2" are in your search path. Tools -> Options, then select the "Paths" page. Note that this setting is "global" for every time you run LabVIEW.
0 Kudos
Message 5 of 6
(2,994 Views)
Also, instead of having multiple VIs with the same name floating around in memory, you could just point LabVIEW to the original SubVI after you move your Main.vi, and that way all VIs that rely on your SubVI point to the same copy, so any changes you make affect all callers, for good or ill.
0 Kudos
Message 6 of 6
(2,991 Views)