LabVIEW 2021 Public Beta

cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug?] LabVIEW repeatedly tries to re-compile and re-save SystemLink VIs in multi-target projects

Suppose I have a multi-target project that uses SystemLink VIs. Every time I switch targets (Desktop -> Real-Time or vice-versa), LabVIEW tries to re-compile all the SystemLink VIs (there are hundreds so this can take a few minutes) and I get prompted to save them when I quit.

 

This makes it very tedious to develop a project that uses SystemLink for communicating between a desktop client and a CompactRIO client. This also degrades project load times, IIRC (I recall reading somewhere that LV2020 had an optimization which significantly improved project load times, but only if all of the project's VIs have "Separate Compiled Code from Source").

 

To address this issue, please enable "Separate Compiled Code from Source" for all SystemLink VIs (and all official NI VIs for that matter) before shipping.

 

lv-skyline-save-changes.png

Certified LabVIEW Developer
0 Kudos
Message 1 of 6
(2,887 Views)

This is also very annoying for external user.lib libraries which are installed with VIPM for example. You can use this vi to set it programmatically to make life a bit easier:

C:\Program Files (x86)\National Instruments\LabVIEW 2020\vi.lib\SourceOnly\Set Remove SourceOnly Tag.vi

Message 2 of 6
(2,877 Views)

Sorry to hear you are running into this issue with the SystemLink LabVIEW APIs. Our shipping SystemLink VIs should already have 'Separate Compiled Code from Source' enabled.

 

Based on the forum you posted to, I thought you were running into issues using a LabVIEW 2021 Beta but the image you included leads me to believe you are using LV2020. Could you confirm this and also let me know what version of the SystemLink LabVIEW Toolkit you are using?

0 Kudos
Message 3 of 6
(2,812 Views)
@maxbrown wrote:

the image you included leads me to believe you are using LV2020. Could you confirm this and also let me know what version of the SystemLink LabVIEW Toolkit you are using?


Hi Max, thanks for following up.

 

My screenshot was taken from LabVIEW 2021 beta, and I installed the LabVIEW SystemLink Toolkit 21.0.

 

Since the Toolkit doesn't seem to support LV2021 yet, I installed NI SystemLink Tag Support for LabVIEW 2020 (32-bit) 21.0. Then, I copied the following files from the LV2020 folder to the LV2021 folder, to test their behaviour in LV2021b:

  • <LABVIEW>\menus\Categories\Data Communication\skyline.mnu
  • <LABVIEW>\menus\Categories\Data Communication\_skyline\*
  • <LABVIEW>\resource\objmgr\niTag*
  • <LABVIEW>\vi.lib\Skyline\*
  • <LABVIEW>\vi.lib\userdefined\niTag.ctl

lv-2021b-systemlink.pngsystemlink-lv-nipm.png

 

 


@maxbrown wrote:

Our shipping SystemLink VIs should already have 'Separate Compiled Code from Source' enabled.


Actually, they don't.

systemlink-vi-unseparated.png

Certified LabVIEW Developer
0 Kudos
Message 4 of 6
(2,805 Views)

@JKSH wrote:
Actually, they don't.

systemlink-vi-unseparated.png


Sorry about that, I misspoke. It turns out the VIs are stored with 'Separate compiled code from source file' in source but during the build process, this is intentionally disabled and the VIs are mass-compiled for each version of LV we support. Storing the compiled code with the VI alleviates the need for compiling at load time. 
I'll continue to look into this to determine if we need to adjust our approach. There likely will not be any changes made for the upcoming SystemLink 2021 R2 release though.

Message 5 of 6
(2,780 Views)

@maxbrown wrote:

I'll continue to look into this to determine if we need to adjust our approach. There likely will not be any changes made for the upcoming SystemLink 2021 R2 release though.


Thanks! Much appreciated.

 

I understand that the next release is imminent so many things are already locked in, but it would be good to improve things for future releases.

 

 


@maxbrown wrote:

Storing the compiled code with the VI alleviates the need for compiling at load time. 

If the compiled code is separated from source, the compilation only happens once, at the first load per target (until someone clears the compiled object cache).

 

Storing the compiled code forces recompilation every single time we switch targets. That's a lot worse than having to wait for the first load.

Certified LabVIEW Developer
0 Kudos
Message 6 of 6
(2,770 Views)