Jump to content

VIPM and separate compiled code


Recommended Posts

I’m a big fan of JKI VIPM, and I’ve been usen Source code control with labview for some years (First with mercurial and now with GIT). Following the good practices with SCC and LabVIEW I always check the separate compiled code from vi to avoid unwanted changes on Vis.

In the other hand I’ve read that the performance of labview is better with the compiled code in the VI. Besides that the labview IDE does not allow you clear compiled cache of some of your vis, you have to delete all the compiled cache…When I have some compilation errors and I delete the compiled cache It takes a lot of time to open again the project…

My question is… VIPM allows you to execute some code after the package installation (post-installation-action). Could it be a good idea to unmark the separate compiled code programmatically on each installed file (vi, ctl, class, lvlib… )?.

Maybe I have to make this question in VIPM forums also, to check when is executed that post-installation-action, if it is executed before or after the masscompiling

 

Thanks!!

Link to post

Welcome to LAVA 🎉

2 hours ago, maristu said:

I’ve read that the performance of labview is better with the compiled code in the VI.

Not sure where you read that, here is what the LabVIEW help says:

Quote

LabVIEW can load source-only VIs more quickly than regular VIs. To maximize this benefit, separate compiled code from all the files in a VI hierarchy or project.

-- Separating Compiled Code from VIs and Other File Types - LabVIEW 2018 Help - National Instruments (ni.com)

 

2 hours ago, maristu said:

Could it be a good idea to unmark the separate compiled code programmatically on each installed file (vi, ctl, class, lvlib… )?

I don't see the benefit. Your projects will take longer to load and if the compiled code breaks you can't even delete the cache, which means you have to forcibly recompile your VIs, which is the same as what you have right now.

Link to post

I remove all compiled code from my vis and rarely see problems with it. Nothing that can't be resolved by clearing the compiled object cache. However, I found that the project-level check box doesn't work properly, so I wrote my own quick drop plugin that goes through the project to fix everything up.

In VIPM I usually keep the mass compile option after install checked, except for our build servers because they install a different set of packages with almost every build and it takes longer to mass compile everything.

Remove Compiled Code.vi

Link to post
On 3/11/2021 at 1:32 PM, ThomasGutzler said:

I remove all compiled code from my vis and rarely see problems with it. Nothing that can't be resolved by clearing the compiled object cache. However, I found that the project-level check box doesn't work properly, so I wrote my own quick drop plugin that goes through the project to fix everything up.

In VIPM I usually keep the mass compile option after install checked, except for our build servers because they install a different set of packages with almost every build and it takes longer to mass compile everything.

Remove Compiled Code.vi 36.91 kB · 1 download

Similar to the VI posted at the end of the blog post 3 above (with less granularity and the option to do the reverse by mistake! :-)

In what sense is the project-level check box not working? I am interested because I have set the app-scoped flag to "remove compiled code" but still occasionally find some new VIs (created by "Create sub VI from selection") with their flag turned OFF. It is probably time for me to ask whether I am just victim of a LV virus or this is indeed a reportable bug (very irreproducible, so not very convincingly reported).

Link to post

Thank you very much for your comments. My troubles started trying to use same clases in a realtime project and later in a PC project.

Thak you @joerghampelfor your blog, it is very useful. 

what it really annoys to me it is when a class or file is corrupted and then I have to clear the compiled cache... It takes a looooooot of time... and I was trying to avoid that. I think that I've found a workarround prior to clear the compiled cache. It is unmark all the content in a directory to remove compiled code and later mark again all the content... at least it worked for me twice.

Link to post
On 3/13/2021 at 4:44 AM, X___ said:

 I have set the app-scoped flag to "remove compiled code" but still occasionally find some new VIs (created by "Create sub VI from selection") with their flag turned OFF. It is probably time for me to ask whether I am just victim of a LV virus or this is indeed a reportable bug (very irreproducible, so not very convincingly reported).

Don't know about new VIs, but there is a bug where if you crash LV and then restore auto-saved VIs, they always have the flag turned off.

Link to post
On 3/18/2021 at 8:27 AM, Yair said:

Don't know about new VIs, but there is a bug where if you crash LV and then restore auto-saved VIs, they always have the flag turned off.

New VIs should simply inherit the default setting you made in your Tools->Options->Environment->General unless you create them from inside a project, in which case they inherit the setting as made in the project properties.

The bug mentioned by Yair may be related to the fact that the restoring of auto-saved VIs is not happening in the project context but in the global LabVIEW context and therefore uses the global settings from the Tools menu.

Edited by Rolf Kalbermatter
Link to post

Yeah, I meant "I don't know about anything wrong with new VIs, but here's one way to cause this with a VI you create".

The global setting I have is also configured to separate, so I think your idea is unlikely to be the cause.

Anyway, the bug# for that one is 961456. By the time I thought about reporting it, the 2020 beta was already happening, so I don't know if NI fixed it for 2020 or SP1 or 2021 if it ever comes out.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By rharmon@sandia.gov
      So I spent much of the afternoon looking over postings here on Source Control Software and LabVIEW. I must say I came away discouraged.
      I've been programming LabVIEW for over 20 years in a single one technician lab and never really needed any stinking source control. Well now that's not the case. But thought I'd just read some posts, determine what everyone else likes and be done!!!!! That didn't work out for me ether... Seems nobody really likes source control after all. Or at least there are issues with just about every option.
      So here is my situation. I'm still the single labVIEW developer on a project. But the project requires a more structured source control environment. So I'm looking for source control that works flawlessly within LabVIEW and  is easy to use, I'm Using latest versions of LabVIEW.  
      Since most of the posts I read today are from years back, I'm hoping things have really improved in the last couple years and you guys are happy as a lark with your source control environment.
      If you could take a minute and tell me:
      1. What type of source control software you are using?
      2. You love it, or hate it?
      3. Are you forced to use this source control because it's the method used in your company, but you would rather use something else
      4. Pro's and Con's of the source control you are using?
      5. Just how often does your source control software screw up and cause you major pain?
      Thank you in advance.
      Bob Harmon
    • By javier_r
      VIPM.io now allows you to post LabVIEW Resources, Ideas, and Tools. For example, you could post a link to a video tutorial or blog article about a package. You can also post ideas, like feature requests or new tools. Best of all, package developers are notified when you post your ideas and resources, and you can comment and discuss posts with the community. Take a look at this video to learn more: https://www.vipm.io/posts/664960df-f111-4e13-989a-24be8207182d/

    • By drjdpowell
      Who uses Git Submodules?  I know Greg Payne does and have watched his talk, but does anyone else have experience.   I'm especially interested in experience with projects with multiple developers and multiple products (that might need to use different versions of the subprojects).  
    • By javier_r
      Hello everybody!
      Wondering how many people have tried the new vipm.io site. We have added a ton of features to make it easy to Discover LabVIEW Tools and there are some cool ones coming soon.
      Check it out and let me know what you think 😀
       
      Javier

    • By dblk22vball
      I am using the newest version (2020.1) of VIPM, but I had this same issue with the release of 2020.
      For two of the packages that I have created for internal repos, VIPM has decided that I need a System Package.   The posts I have seem from JKI indicate that this is a sub-package that is used internally to the main package, and should be automatically included.
      However, after I am seeing issues on any PC other than the PC where the package was built.
      Is there a setting I am missing?
       
      Showing the (System) package as a dependency:

       
      Package Configuration in the VI Package Configuration Editor
       

       
      Package installed, on the PC where the package was initially created (no issues, no exclamation mark)
       

       

       
      Package when installed on another PC (NOTICE: the System Package name has changed and there is a red exclamation mark, but there are no errors shown on install of the package).

       


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.