LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared variable library advice

Hello, folks!

 

I have been having fun with the application builder in LabVIEW 8.5; I had thought deploying shared variables in executables would be difficult, but I'm finding that it's pretty straightforward.  However, my concern is that, when I deploy the library containing the variables, all the other VIs in the library go with it.  This seems a little clumsy to me, so I was wondering: is it better to keep the shared variables in their own library (not a sublibrary) so they can be deployed separately?  What do you think?  (Or maybe I'm just missing something obvious, as usual... 😉 )

 

Thanks,

 

Slowpoke 

Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 1 of 6
(3,466 Views)

Slowpoke -

 

I recomend that you organize your library in a way that you bundle together variables that are always called together.  In other words, if you are using a shared variable that is used by it self creat a library just for it, while if you call the same variables together all the time link them together (i.e. a group of variables for temperature control).  I prefer to do this to keep things more organized. You might have a couple more libraries but it is easier to know where things are and what they do and it makes things easier when you are debugging.

 

 

Best Regards

 

Bruno Noronha

Bruno Noronha

Certified LabVIEW Associate Developer





Using LabVIEW 8.6
0 Kudos
Message 2 of 6
(3,439 Views)

Good Afternoon Slowpoke,

 

I am glad to hear you have been enjoying your time with our Application Builder.  Depending on your VIs and available system resources, you may notice a slight difference in performance with different deployment strategies.

 

However, purely from a general programming standpoint, bnoronha is right on target with his suggestion.  I agree completely to organize your project (libraries, VIs, variables, etc.) in a manner that groups elements according to their function and use.

0 Kudos
Message 3 of 6
(3,427 Views)

Hi Bruno and Charlie,

 

Thanks for your replies!   I agree with you both, and would like to do that, except that when I deploy my library containing the shared variables, all the other VIs in the library (operations on the variables and so forth) are dragged along with them to the executable's "data" folder (naturally, since the VIs are library members as well).  I was just wondering if this is something other developers just tolerate, or if they separate the shared variables, and any other VIs that operate on the shared variables, into two separate libraries (not sublibraries of each other) to avoid it.

 

Thanks!

 

Slowpoke 

Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 4 of 6
(3,419 Views)

Hello Slowpoke,

 

Since the creation of the LabVIEW Project in LabVIEW 8.0, my use of libraries has decreased because of the organization that the LabVIEW Project allows.

 

Personally, I do not keep VIs in libraries.  If I have several VIs in a Project that I would like to group, I will use Virtual Folders (In the Project Explorer, right-click My Computer » New » Virtual Folder).  As the name implies, these folders do not actually exist anywhere on your computer; they simply to add structure and organization to your project.  By using this method, you can eliminate some overhead on your deployed libraries and still have the structure that you desire.

0 Kudos
Message 5 of 6
(3,397 Views)

Hello again!  I've realized that my problem emerges from a misunderstanding of the project library itself.  Shared variables should exist in their own library and be deployed from the project in which they are being used.  It doesn't make any sense to keep a "standing" library of shared variables and VIs together when it only takes a few seconds to create a shared variable in the first place.

 

Thanks for your input and advice, y'all.  

 

Slowpoke

Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 6 of 6
(3,339 Views)