unicorn Posted November 8, 2013 Report Share Posted November 8, 2013 I would like to create a software, where plugins can be installed and used after having the main program already installed and running on a customer System. So I am trying the "Plug-in Architecture using Packed Project Libraries (lvlibp) (see http://decibel.ni.com/content/docs/DOC-19176)" but I am running into problems. Which datatypes can be used in connectors of VIs applying the "Plug-in Architecture using Packed Project Libraries (lvlibp)"? Which datatypes cannot be used in Packed Projects Libraries, if I want to create child classes from the packed libraries? Quote Link to comment
Tim_S Posted November 8, 2013 Report Share Posted November 8, 2013 The only data type that I've found that cannot be used is an xcontrol, but that's true of objects in general (http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/defin_priv_data_class/). I did have some issues with typedefs, unfortunately, I'm scratching my head as to how or why. What I had to do with creating an executable as the main application is to build the parent class and associated typedefs as a packed library. The parent object in the library is used by the child object and the executable. The reason I had to build the parent packed library was: 1) I wanted non-core code developers to be able to add functionality, and 2) I was having errors loading the child object once I built the application as an executable. The errors seemed to be related to the build creating a new unique identifier for the parent object than the source code. (This was LV2011.) Quote Link to comment
unicorn Posted November 8, 2013 Author Report Share Posted November 8, 2013 I tried to use a class, which I created. (the class is like the configuration file VIs that a shipped with LabVIEW. But my VIs write XML files.) Now I wanted to call a VI from the packed project library and pass this class to the VI. In the caller the wire with that class is broken. So I cannot use my class on the connector. Quote Link to comment
Tim_S Posted November 11, 2013 Report Share Posted November 11, 2013 I tried to use a class, which I created. (the class is like the configuration file VIs that a shipped with LabVIEW. But my VIs write XML files.) Now I wanted to call a VI from the packed project library and pass this class to the VI. In the caller the wire with that class is broken. So I cannot use my class on the connector. Are you using source code of the parent in both the child and the application? I'm not clear on the internal workings, but this is what I've found experimentally (so take it with a grain of salt). Building the packed library creates a new identifying information when you build the packed library, so, even though you have the same parent object, the identifying information for the parent object is different, so LabVIEW treats them as different objects, hence giving you a broken wire. Quote Link to comment
unicorn Posted November 14, 2013 Author Report Share Posted November 14, 2013 I tried to use source code in the main application as well as in the packed library. But ended up with broken wires in the main when calling VIs from the packed lib. Does the difference in identifying Information also applies for LabVIEW specific types like the configuration files refnum? Currently I try to pass a configuration file refnum to a VI from my packed lib. When loading the packed lib, LabVIEW produces error 1498 at Get LV Class Default Value.vi. Before building the lib, there were no Errors. Details: Possible reason(s): LabVIEW: Library has errors. Fix the errors before attempting this operation. Complete call chain: Get LV Class Default Value.vi XiraView 4.0.2.lvlib:XiraView 4.0.2.lvclass:detect Data Source.vi XiraView 4.0.2.lvlib:XiraView 4.0.2.lvclass:Read Config File.vi XiraView 4.0.2.lvlib:XiraView 4.0.2.lvclass:Load App.vi XiraView 4.0.2 Launcher.lvlib:Splash Screen.vi LabVIEW attempted to load the class at this path:D:LV12XV4buildsXVDIOXV3-6FileDIO.lvlibpXiraDataIOXV36FileXV3-6FileDIO.lvclass Quote Link to comment
Tim_S Posted November 14, 2013 Report Share Posted November 14, 2013 Building the parent class into a packed library, and using the packed library parent in the child class and application should resolve many of your issues. I've not had issue passing references, though I've not tried a file reference. Based on the error, I'd guess there are other issues that are breaking the compiled child class. One downside to classes is a broken VI/control in the class will break the class and all VIs/controls in the class. Quote Link to comment
unicorn Posted November 14, 2013 Author Report Share Posted November 14, 2013 My XV3-6FileDIO.lvclass is a child class of some template class. This template class (parent class) is already in a packed lib. In order to compile the child class I had to check the option "Additional Exclusions > Disconnect type definitions". If this option is not checked the following error occurs: Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference: Error 7 occurred at Set Permissions in AB_Engine_Update_Paths_In_Palette_File.vi->AB_Engine_Update_Palette_Files.vi->AB_PackedLibrary.lvclass:Save.vi->AB_Build.lvclass:Copy_Files.vi->AB_Build.lvclass:Build.vi->AB_PackedLibrary.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller Possible reason(s): LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use as path separators on Windows, : on Mac OS X, and / on Linux. Verify that the path is correct using the command prompt or file explorer. D:LV12XV4buildsXVDIOXVDataInOut.lvlibp1abvi3wmenusCategoriesProgramming_File IOconfig.mnu I find it a bit strange that the palette menu configuration of the configuration files palette is included in the build and causes an error. If a VI of a class is broken I get immediately an error if I try to compile a packed library. So I expect that there are no broken VI if I can compile my packed library. If I look at the VI hierarchy of XV3-6FileDIO.lvclass I don't see any VI which might cause the class to break. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.