04-30-2014 10:38 AM
Hi,
I've got a main interface VI displaying in a subpanel the front panel of VIs stored in packed libraries.
When initializing the main interface VI, I create a user event and store its reference in an FGV. This event is then registered by an event structre in the main interface VI
.
The FGV is stored in a lvlib, this lvlib is referenced as an 'always included' source file in my packed libraries builds.
However, event generated from the displayed VIs (stored inpacked library) are never trapped by my main interface.
Is there any reason to this behavior ?
Solved! Go to Solution.
04-30-2014 10:51 AM
Your Paked Project Libraries are like a Sperate Executable. It is like trying to communicate between two executable which uses its own differnt data space.
PPL will have its own data space. FGV will work only when the caller and callee use same data space.
You can create a data communication mechanism (Like Queue) between the application and PPL to pass the event reference to the PPL.
Hope this helps.
04-30-2014 10:56 AM
The packed library keeps its own copy of the FGV. Are you calling the FGV from the lvlib or the lvlibp? They are two totally different instances.
04-30-2014 11:05 AM
OK, I just figured out that the event ref in the VI stored in the packed library is empty. Which means that the shift registered in the FGV are not initialized.
So it confirms that I've got 2 separate instances of the FGV.
The FGV is stored in an LVLIB named 'Tools.lvlib'. 'Tools.lvlib' is set to be a dependance of the lvlibp. Tools.lvlilb is also seen as dependance of my main interface VI.
But I just noticed that the lvlibp stores a copy of Tools.lvlib in its own space...
Will it be the same if I create a Queue or Notifer to share the event ref between my main interface VI and VIs in the lvlibp ?
04-30-2014 11:23 AM
I almost hate to ask but.... Why not just drag the lvlibp from dependancies into your project and enclude the lvlibp in your project. Not a dependancy of your project but actually in the project. Heck "Tools.lvlib" can be used in all your projects if you want.
Now that tools.lvlib is in context it is in context and uses the same application instance. Simple.
04-30-2014 11:26 AM
Application shall create a single element queue with a unique identifier and Enqueue the data and then launch or Load the PPL.
Design shall ensure both PPL as well as Application knows and refers the Unique Identifier name
PPL VI's shall use the same identifier and obtain the queue and then Preview data. It is one of the solution.
04-30-2014 11:27 AM
THe lvlibp are not included in the project because they are 'plugins'.
To summarize, the main interface is just a visualizer, and customers can add any lvlibp libraries they want in a specific folder to display their plugin interfaces in the main interface VI...
04-30-2014 11:35 AM
In your case you will need to pass the Main VI sub panel reference to the Plugin so as load the Plugin Interface in main VI subpane, is that correct? if yes you can use the same mechanism to Pass event references as well.