LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update one VI in deployed application

Hi,

 

I wsa wondering if there is an easy way of doing the following: I have an application that is already at a customer. Part of it is classes, so the actual VIs of the classes are in subfolders of the application. I need to update one of these VIs. It is a very simple VI (small, not many subvi calls, all subvi calls are LabView built-in functions). Is there a way to do this wihtout rebuilding everything? Simply replacing the VI didn't work.

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 1 of 8
(2,701 Views)

Hi Danielle,

 

I have never tried to do a single VI but have added a new dynamically invoked class to an existing app. Since the Class knows about all of its members, I would attempt to replace the old class with the updated version.

 

I hope that helps,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(2,682 Views)

Hi,

 

Do you have a suggestion on how to do this? There is no class file. The subfolders are called (for example) MyClass.lvclass and inside the subfolder are the class VIs. Like I said, simply replacing one of the class VIs didn't work. Perhaps the class information exists somewhere else?

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 3 of 8
(2,658 Views)
There is an lvclass file which contains among other things a list of which vis are part of that class. The member vis are marked somehow so they know which class they belong to. You cannot just add a file to a class by putting it into a folder. You have to either use the project manager or the project api.
=====================
LabVIEW 2012


0 Kudos
Message 4 of 8
(2,644 Views)

The problem you are having is essentially one of name-spaces.  When you build a class in LVOOP then both the owning class and the owning VI get tags placed internally that link them together.  This is the way LabVIEW and the run-time engine know who can and who can't access a method.

 

So how did you generate the replacing VI?  Did you create it in a copy of the class running in the project?

 

Jason

Wire Warrior

Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!
Message 5 of 8
(2,628 Views)

Hi all,

 

I think there is a misunderstanding about my question. I am not asking how to update a class. I am asking if it is possible to update a class in a deployed application. Classes in deployed applications are not in the exe file, they are in subfolders name <name of class>.lvclass, where in the subfolder there are the method vis of the class without front panels. Ideally, I would like a way to update the class without rebuilding the entire application.

 

I suppose a more general questions would be: Is it possible to create a "patch" installer that updates only the necessary parts of the existing application, or do I need to rebuild the entire application each time (requiring my customer to uninstall and reinstall every time I have an update (if the customers don't uninstall installing a new version causes also configuration files and other similar files to be overwritten. For some reason uninstall leaves them intact)). For example, when program A has an update for you, they ask you to install a patch. They don't ask you to reinstall the entire program. Is there away to do this with LabView applications? Specifically, is there a way to do this with OO applications?

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 6 of 8
(2,608 Views)

Danielle,

 

I see that simply installing over the old executable causes your configuration files to be overwritten.  Is it possible to handle these files in a way that prevents this?  It honestly seems like more work than its worth to develop a patch than just reinstall, if you can find a way around this issue.

 

I'm not sure that simply replacing the methods and .lvclass file will work, although it would be simpler than what my next suggestion wil be.

 

This suggestion requires that you keep the lvclass file and associated VIs outside of the executable itself.  To do this you need to have a generic call within LabVIEW, which is then cast into the class which you want to update.  An exaple of the code to do this is located in the first table, second cell of this link http://zone.ni.com/devzone/cda/tut/p/id/3574#toc1.  This code gets a path to the class file, then uses the Get LV Class Default Value.vi to cast a generic

object to the correct type.

 

Drew T.

 

 

 

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 7 of 8
(2,591 Views)

By building the application with external classes that are loaded dynamcially I have added functionality to previously deployed and installed applications. I did this using the examples posted by Tomi Maila on LAVA. It works, my boss would never have let me develop the application if I had not proven the concept before hand. But in my case the application was written to go looking for others classes.

 

If the code you have deployed now was not set up to look for new classes, you may be limited.

 

please take a short walk with me to see a possible use for and a way to be able to "patch" a LVOOP app.

 

If application uses Class A to do something and the "Class A" constant is in the diagram, then it will only look for a Class library of that specific class. But if looks for children of Class A then the application would be able to make use of those as well. But how to decide when to use an over-ride Class? THat has to be concidered at design time. The code could could accept a class name from a configuration file (Expert say the caller would know what version it should use) so in that case the config file would result in the app loading "Class A1" which is a child of Class A but implement over-rides to fix the issue with Class A.

 

Other methods that I have used invloved implementing methods in the Class that returns a rev level.

 

I hope that helps,

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 8
(2,569 Views)