LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

separating compiled code question

Solved!
Go to solution

Hi there!

An interesting feature of LV 2011 is the possibility to separate (detach) the compiled code from a VI, which is mostly useful for source or version control purposes (if you modify a VI that is called by a bunch of others, only that VI will appear as "modified", whereas in the past, all calling VIs would be recompiled and appear "modified", although there actual diagrams and panels would remain identical).

One of the warnings in the help file, though, is that since the compiled code is cached in some other location than the VI, you are discouraged from using that if "you intend to load or run using the LabVIEW Run Time Engine".

I am not sure I am quite clear how this works for a project that I will eventually want to release as a standalone application. Does it say that I cannot detach the compiled code from any of the VIs in the project? Of any dynamically called VI in the project? Or it does not apply (if everything is recompiled for the standalone application)?

Thanks for clarifying.

0 Kudos
Message 1 of 11
(2,987 Views)

I actually realized that this has been around since LV 2010 (but not as a option applying to all new VIs?). Anyway, my question remains, regardless of the LV version...

0 Kudos
Message 2 of 11
(2,984 Views)

It does not apply if you use the application builder to build your executable, because all VIs going into the application will have their machine code.

It does apply if you create an application which dynamically calls VIs which you didn't originally put into the application, such as plugins (although even then you can create a build spec which will resave those VIs with the machine code).


___________________
Try to take over the world!
0 Kudos
Message 3 of 11
(2,971 Views)

What kind of build specification are we talking about? The choices I see do not include mere VIs or even llb, just packed library, shared libray, source distribution (maybe that one?), etc...

0 Kudos
Message 4 of 11
(2,954 Views)
Solution
Accepted by topic author X.

Yes, a source distribution. Alternatively, you could try using something like VIPM to build your collection of VIs.

 

Never having created an application which needs this, I can't offer any practical advice (assuming you even need it).


___________________
Try to take over the world!
Message 5 of 11
(2,946 Views)

Is there actually a simple way to remove the compiled code from VIs which were previously created and saved with compiled code attached? Right now I am going through an endless list of VIs selecting Properties and checking the damn box for each one...

0 Kudos
Message 6 of 11
(2,908 Views)

Too late to edit the previous message... The additional annoyance to having to Select Properties and check the box is that it is impossible if the VI has no changes (has been saved), since the box is grayed out in this case. So you have to actually modify the VI to be able to detach its compiled code.

0 Kudos
Message 7 of 11
(2,906 Views)

I still use 2009, which doesn't have this feature, so I can't provide the exact details, but you can create a new project, add your code as an autopopulating folder and then right click *something* (the project, the target, the folder) and select an option which will open a new dialog which allows you to modify all the VIs in that something together.

 

There should also be VIs online which simply iterate over a hierarchy of folders and set this property on all the VIs.


___________________
Try to take over the world!
Message 8 of 11
(2,884 Views)

Very useful trick, tst. The object to right click is the project itself. Then Properties shows the check box mentioned earlier.

I am wondering whether VIs in "Dependencies" are affected as well? I should probably try it...when I have time to experiment.

0 Kudos
Message 9 of 11
(2,859 Views)

@X. wrote:

 

I am wondering whether VIs in "Dependencies" are affected as well?


I'm pretty sure they're not, which is why I suggested the new project with the auto-pop. folders. This makes sure you get all the VIs in the file hierarchy.


___________________
Try to take over the world!
0 Kudos
Message 10 of 11
(2,845 Views)