04-12-2013 04:43 AM
Hi!
I realized that objects are by value, so how to realize my problem? I can not figure out how to get the reference to my object.
BR / Thomas
Solved! Go to Solution.
04-12-2013 04:56 AM
Search for "DVR" and "LVOOP".
There are plenty of discussions on teh topic.
Shane.
04-12-2013 06:47 AM
OOP in LabVIEW not based on by reference like in c++, but is based on by value.
So you will not be able to get any reference to your OOP object.
So what is happening in your code, is that a the fork of the object wire your are creating to copies of your object.
One thing you could do is have DVR in the private data of the class. Make a method that initialize the DVR, and call that method before the fork.
The in your read/write method, make use of the DVR to share the data.
04-12-2013 08:37 AM
Thanks to both of you!
It took me some time to get it all right but now it works.
So I now have to redefine all my inputs and outputs for the class functions.
If I understand it correctly, there are no 'new vi from template' for creating read/write vi.s for classes with DVR.
/thomas