07-09-2010 04:20 PM
Hello all,
I have seen a couple of post where users have had similar problems, but they are not quite the same as what I am seeing here. I have a real-time application in which I am passing data across a network to a host for visualization of some of the data. The data is aggregated in a class, the class is flattened to string:
And then, on the other side, the data is unflattened from string:
When unflattening on the other side, I get the error code 1527: "Attempted to read flattened data of a LabVIEW class that is not currently loaded into LabVIEW."
The bytes I send are making it across, the problem is that I am not able to read them properly. I have tried Jarrod's suggestion (flattening to string and then to XML) but alas to no avail. I have also tried moving the class from the dependencies into the actual list of files in the project as described here (which I don't understand why this would have any impact) but this too did not work. Does anybody have any other thoughts?
Any help is appreciated.
Peace, Matt
07-09-2010 04:46 PM
OK - an update:
So, I should have said something about the object I was trying to pass as this might be enlightening to some (and it has proved so to me). I am passing a class that consists of not only standard LV data types (arrays, numerics etc) but also other classes which the object uses (in fact, there are two arrays of object data located within the class that is passed). It turns out that if I try to pass one of (or an array of) the objects that the main class uses, the data is transmitted just fine. The only time I get this error is when I attempt to pass the aggregate class. Hope this helps.
Cheers, Matt
07-09-2010 05:11 PM
Whoops! Turns out that I did not have all of the classes loaded into the project as in this post. I still don't fully understand this as I can write flatten and unflatten the data in a single VI in this project without having the classes explicitly loaded, but c'est la vie. I suppose this is a mystery that the NI folks might be able to explain. Just wish I could have my last several days back....![]()
m
07-12-2010 04:16 PM
Hi Matt,
This is expected as you need to have the class loaded so LabVIEW know how to turn the string back into the class.
Conceptually think of LV class as really powerful clusters with protection. Without a refence of what the class/cluster is it does not know enough about the the structure of the string to turn into into a class. This would be the same a using a bundle by name with not reference.
Hope this helps
07-20-2010 05:42 PM
Aaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrgh!
OK, so this problem was fixed initially simply by moving the classes out of the "Dependencies" and out under the "My Computer" portion of the project (as below - classes of interest are located in the floder DataClass). However, I was moving things around and removed then re-added the DataClass folder and now I am getting the same error. Any thoughts, Joe?
Matt
07-21-2010 10:02 AM
Oops...foiled by myself again. Disregard the above post. All is well. ![]()