LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating libraries....?

Hi everyone,

My Labview program has several VIs, some of which are in different directories on my hard drive. I'd like to make a library so that they can all be read from the same location when my main VI is started (at least, I thought that was a reason for making a library) . To do this, I used "File/Save As with Options", chose "Development Distribution" which proceeded to save all my SubVis into one library (*.llb). However, when I run my VI, the SubVis used are the ones from their original directories and not the library. How can I make a library of SubVis so that when I run my main VI, they are all read from the library? So far the only way I can see how to do this is if I opened each SubVi, and save each one in the library. I am usin
g Labview 6.1.

Remington.
0 Kudos
Message 1 of 8
(3,470 Views)
Either run the main program from the copy in the LLB or , when you do a save with options, instead of clicking the save button, select the "Select Curr Dir" button. This will save the VI's to the directory selected instead of a llb.
Message 2 of 8
(3,470 Views)
Hi,

I just realized that I needed to run the main VI from the library.

Thanks,
Remington.
0 Kudos
Message 3 of 8
(3,470 Views)
> I just realized that I needed to run the main VI from the library.
>

Also, be sure to kick VIs out of memory before loading your newly saved
VIs. The first place LV looks for subVIs is in memory, then where the
VI was saved relative to its caller, then LV starts searching using the
search path.

Greg McKaskle
0 Kudos
Message 4 of 8
(3,470 Views)
Hi,

Now that you mention it, I wonder if this is indeed what was happening. How do you remove the VIs from memory before loading the new ones? Should I exit Labview and re-open?

Remington.
0 Kudos
Message 5 of 8
(3,470 Views)
> Now that you mention it, I wonder if this is indeed what was
> happening. How do you remove the VIs from memory before loading the
> new ones? Should I exit Labview and re-open?
>

Close the VI windows. You shouldn't have to restart LV, but that will
also work. You can use the hierarchy window from the Browse menu to see
what is currently in memory, where it came from, who it calls, etc.

Greg McKaskle
0 Kudos
Message 6 of 8
(3,470 Views)
Hi,

Thanks for your reply. I am interested though in knowing what is the inherent advantage for Labview to keep the VIs in memory? Is it because it takes up less resources to call the SubVIs from memory than it does from disk? If so, how much of a difference is it?

Remington.
0 Kudos
Message 7 of 8
(3,470 Views)
> Thanks for your reply. I am interested though in knowing what is the
> inherent advantage for Labview to keep the VIs in memory? Is it
> because it takes up less resources to call the SubVIs from memory than
> it does from disk? If so, how much of a difference is it?
>

The code generated from a VI has to be in memory, or at least mapped to
virtual memory in order to be able to execute. LV does this in advance
in most situations to better detect problems such as missing files that
would affect execution.

The difference in speed between memory and disk is generally something
like 1000 to 10,000x.

Greg McKaskle
0 Kudos
Message 8 of 8
(3,470 Views)