08-24-2016 11:59 PM
It sounds like the write and the read are not connected through data flow. The zero value is probably the default value. Do you branch the class wire?
Treat class wires as special clusters. Just like clusters if you branch the cluster wire and write in one branch and read in another, the value is not passed between them.
Here is a picture of the example code attached: (wires are not broken in the attach code)
Output 1 will read the correct value that was written. Output 2 read the default value which is zero.
View of Front Panel:
Hope this helps.
Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner
08-25-2016 01:23 AM - edited 08-25-2016 01:42 AM
08-25-2016 03:09 AM
Post your code. I think you're making a simple mistake but it's hard to help without any code to go by.
08-25-2016 08:21 AM - edited 08-25-2016 08:23 AM
08-25-2016 08:51 AM
Do you have a String data fiels included in each level of the class hierarchy? A Child:String is NOT the same data field as Parent:String. I made this mistake at the beginning until I properly understood how to use inheritance in LabVIEW.
If you are mixing methods between different levels of your hierarchy, this can lead to problems. Make sure that all VIs are trying to access the same data field by making a single "String" data field in the parent and access ALWAYS via accessor.
As a hint, try flattening the class to string and displaying the data before and after writing the data.
08-25-2016 10:32 AM
08-25-2016 10:33 AM
Yes you ask, but you provide so little.
Post an example of the code where you write to and then read from a class which does not retain the value. Just posting the accessors does not tell my HOW you are using these.
08-25-2016 10:44 AM
08-25-2016 10:50 AM
Code, code, code. Please let us see some code.
Your words do not help me at this point. If you really want help, at least post pictures of the code if you don't want to atcually post the real code.
08-25-2016 11:43 AM