From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FGV in a packed library doesn't seem to share data

Solved!
Go to solution

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 ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 8
(3,336 Views)

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.

 

Message 2 of 8
(3,331 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 8
(3,324 Views)

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 ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 4 of 8
(3,319 Views)

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.


"Should be" isn't "Is" -Jay
Message 5 of 8
(3,308 Views)
Solution
Accepted by topic author CyGa

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.

Message 6 of 8
(3,306 Views)

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...

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 7 of 8
(3,304 Views)

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.

Message 8 of 8
(3,301 Views)