05-24-2016 03:16 AM
Hello everyone.
I have a parent class "View" that has some private data, for example "Name" (string) and "VI refnum" (refnum).
A child of "View" is "Single Graph", that has a .vi "_Display.vi" that is a simple graph view, that I will later put into a SubPanel.
The class also has a .vi "Start UI.vi", that will simply start "_Display.vi". The idea is that I want the possibility to have multiple "Single Graph" instances.
From the attached screenshot you can see how I for test purposes write to the "Name" property, and also read it out (again, for test purposes).
In the "Start UI" vi this works fine, and both the Name and VI refnum is available.
I pass the object into "Start Async Call" and the graph window shows up.
The first thing I do with the "Single Graph" object is to read out Name and Vi Refnum, and as you can see from the screenshot, these comes out empty.
I can not understand how this is possible, but I'm certain there is a good reason for this behaviour.
I hope someone here could help me understand this.
Thanks in advance!
Regards,
Oksavik
Solved! Go to Solution.
05-24-2016 03:39 AM
Oksavik,
sadly, a screenshot doesn't help much. Please attach the example code.
Norbert
05-24-2016 04:45 AM
I tried to reproduce my problem in a simple example, but as expected this example worked just fine.
I've tried to isolate and strip away from the original code, and this seems to show my problem.
See attached code, (it's messy).
Open ViewTest.lvproj
Open and run "Single Graph.lvlib / Single Graph.lvclass / Start UI.vi"
Name is written to the object, which is passed to the "Start async".
"_Display.vi" is shown, but the value of Name is now empty.
Thank you so much for taking the time.
Regards,
Odne
05-24-2016 04:56 AM
I'm sorry but your code doesn't work for me. I cannot load the PPL in LV 2015 but i assume that the PPL contains the parent class the SingleGraph is inherited from.
Which version of LV are you using?
Can you recompile the PPL for LV 2015 or provide the development project for it?
Norbert
05-24-2016 05:05 AM - edited 05-24-2016 05:05 AM
It appears that LabVIEW is unable to open a packed library buildt using an earlier version of LabVIEW (news to me).
I'm working in 2013, but I can compile to 2014 if that helps you.
I don't have 2015 installed unfortunately.
05-24-2016 05:11 AM
Installing 2015 now, and will upload a new version soon.
05-24-2016 05:50 AM
05-24-2016 05:53 AM
05-24-2016 06:18 AM
@mikeporter wrote:
[...] using PPLs [...] seem to be a lot more trouble than they are worth.
Mike...
Depending on the configuration, yes. But PPLs do have their place and can be very elegant for distribution of components.
However, breaking inheritance into different PPLs has its issues and should be avoided, correct.
Norbert
05-24-2016 06:40 AM
That was not straight forward, but I've ported the project to 2015.
Attached is the same test project.
Hope this works.