LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV 2021 vs. newer, VI management in memory

Solved!
Go to solution

Hello!

The latest LV version we have in use in our company is 2021. Considering to update (need to renew our maintenance contract first) I would like to know one thing. Particular version 2021 has this, as I didn't experience it with version 2015 or older and didn't use the versions in between 2015 and 2021: I call it "annoyingly bad internal VI memory management".

 

What I mean: you load some VI with sub VIs. Then you open any of the sub VIs, modify and save. Switching back to the higher level VI you would expect LabVIEW to automatically load the modified sub VI though it has the old version in memory. LabVIEW does notice that the sub VI has changed and comes with a pop-up that asks to "Restore" the VI (whatever that means) or to "Cancel". What I would expect is an option to "Reload". If the concerned sub VI is used, let's say, 8 times in other sub VIs, this pop-up would up come 8 times. "Restore" is, of course, no option, because I want the higher level VI to use the modified version. The only way to get rid of the over and over popping up requesters is to close all VIs and to open the main/higher VI again. This is extremely annoying and cannot be the solution. Like I said, this hasn't been there before.

 

Is this solved in a higher LabVIEW version, like 2022 or 2023? 

0 Kudos
Message 1 of 29
(1,699 Views)

Hi MaSta,

 


@MaSta wrote:

What I mean: you load some VI with sub VIs. Then you open any of the sub VIs, modify and save. Switching back to the higher level VI you would expect LabVIEW to automatically load the modified sub VI though it has the old version in memory. LabVIEW does notice that the sub VI has changed and comes with a pop-up that asks to "Restore" the VI (whatever that means) or to "Cancel".


How do you organize your code?

Do you use a lvproj (as you should)?

How are the subVIs called from your mainVI?

Can you attach an example where we can reproduce your issue?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 29
(1,694 Views)

LabVIEW manages that stuff via having a Project file with your stuff in it. I've been using LV since ~8.2 and have used projects the whole time, and I've never had that issue. I'm currently on 2020 and it all works fine if I organize using Projects.

Message 3 of 29
(1,662 Views)

@MaSta wrote:

The only way to get rid of the over and over popping up requesters is to close all VIs and to open the main/higher VI again. This is extremely annoying and cannot be the solution. Like I said, this hasn't been there before.


sounds like "mass compiling"

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YJOjCAO&l=de-DE

Message 4 of 29
(1,630 Views)

I think we really need more details about what you are doing.  Video capture of you doing it would be great.  If you do, make sure to start with LabVIEW completely closed so we can see everything you are doing.  Because I have been using 2021 for quite some time and have never had that message come up in the scenario you describe. 

 

What you're describing sounds a little bit like what would happen if you had LabVIEW open, with a VI and subVIs loaded, and then you somehow replaced one of the subVIs on disk (like, if you downloaded a new version of it from source control), and then LabVIEW noticed that the version it has in memory no longer matches the version on disk.  So it's almost like you're loading different instances of LabVIEW at the same time for each VI somehow instead of just having one instance open.

 

When you open one of the subVIs to modify it, how are you doing it?  Do you:

  • Find a version on the block diagram of the main VI, and double click it to open
  • Find it in a project window that's already open
  • Find it in a file explorer window and open it from there
  • Other?
Message 5 of 29
(1,622 Views)

Hi

 

I have only seen the word "Restore" used in a dialog if a past session did not close properly in some way. If that is the case you could try to delete cache entries normally located here to clean up :

 

C:\Users\<user>\Documents\LabVIEW Data\LVAutoSave

 

As suggested a mass compile could help solve or pinpoint the problem.

 

Regards

  

Message 6 of 29
(1,598 Views)

@GerdW wrote:

Hi MaSta,



How do you organize your code?

Do you use a lvproj (as you should)?

How are the subVIs called from your mainVI?

Can you attach an example where we can reproduce your issue?


1. One main VI, many sub VIs

2. Back in the day there were no projects in LV and coding also worked, so I'm not sure why I would need a project file at all. However, I have one for later compilation. I don't use it to open VIs. Atm I open the main VI or sub VIs either directly from the source path or sub VIs by double-click in the code.

3. Most are placed in block diagram, a few are called by method. But as far as I saw, that didn't make a difference about how and when those pop-ups came. It's rather even better when you call a VI that's not currently open, so it would always load the latest version.

4. No. I cannot even trigger this behavior on purpose. It's very random. 

0 Kudos
Message 7 of 29
(1,568 Views)

@BertMcMahan wrote:

LabVIEW manages that stuff via having a Project file with your stuff in it. I've been using LV since ~8.2 and have used projects the whole time, and I've never had that issue. I'm currently on 2020 and it all works fine if I organize using Projects.


I came from LV 7 and never learned the purpose or benefit of these project files, except for compilation. Currently, I have 83 sub and 1 main VI, plus many from installed LVLIB. The main VI is added to the project, the dependencies show all the subs. Looks organized.

 

0 Kudos
Message 8 of 29
(1,566 Views)

@alexderjuengere wrote:

@MaSta wrote:

The only way to get rid of the over and over popping up requesters is to close all VIs and to open the main/higher VI again. This is extremely annoying and cannot be the solution. Like I said, this hasn't been there before.


sounds like "mass compiling"

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YJOjCAO&l=de-DE


Will try that though all VIs involved in the project were either created in LV 2021 or came from outside and then have been loaded, modified and saved. Well, those I use. Some may have slipped.

0 Kudos
Message 9 of 29
(1,556 Views)
Solution
Accepted by MaSta

Hi MaSta,

 


@MaSta wrote:
2. Back in the day there were no projects in LV and coding also worked, so I'm not sure why I would need a project file at all. However, I have one for later compilation. I don't use it to open VIs. Atm I open the main VI or sub VIs either directly from the source path or sub VIs by double-click in the code.

"Back in the day" means pre-LV8: before 2005 - which is 18 years ago!

Programming IDEs (not just LabVIEW) changed a lot in those 18 years…

 

Recommendation: ALWAYS open the project and ALWAYS work from inside the project…

 


@MaSta wrote:

I came from LV 7 and never learned the purpose or benefit of these project files, except for compilation.


What about dependencies management?

What about handling shared variables?

What about handling targets?

What about handling project symbols?

What about handling code separation to ease SCC usage?

 

(Strong) recommendation: You should not apply LV7 style on LV2021 anymore…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 29
(1,542 Views)