LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flatten to XML bug with unit variables in classes

Solved!
Go to solution

Hi,

 

I just spent about 5 hours trying to figure out why some of my class data kept resetting itself to zero.  Turns out that the part that kept resetting was the part that had a unit variable in it, and that fails to load properly from the Unflatten From XML VI.  It works fine if it's just a cluster, it's being in a class that's the problem.

 

 Unit fail block diagram.png

Unit fail front panel.png

 

I've attached the zip file with the example VIs.

 

Could I ask that someone with LV 2014 try this to see if the bug exists there?  

 

Right now we're running 2011, but we plan a companywide shift to 2015 as soon as it comes out (and therefore, 2011 drops from extended support).  I'd like to know if I can just wait for the upgrade and then it will work, or if I need to redo about ~15 variables in classes with units on them that I had been counting on loading and saving using the built-in XML functions.

0 Kudos
Message 1 of 6
(3,815 Views)

Hello,

 

I ran your VI on LabVIEW2014SP1 and have to say that the bug is still there.

 

UliB

Message 2 of 6
(3,750 Views)

Have you raised a support request with NI? Sounds CAR-worthy to me.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 3 of 6
(3,730 Views)

I was planning on trying for a CAR only after confirming the problem hadn't been quietly fixed in the last 3 years.  I couldn't find anything in the changelogs but sometimes you never know...

 

Now that UliB has confirmed it's still a problem I will likely do so.

0 Kudos
Message 4 of 6
(3,671 Views)

This is a known issue with the unit variable in Unflatten from XML, but I have added this forum post information to the exisiting CAR #291163.

0 Kudos
Message 5 of 6
(3,623 Views)
Solution
Accepted by topic author Kyle97330

For the benefit of any future people who have the same problem and find this post, NI contacted me and let me know that as a workaround if a numeric is placed in a cluster inside of the class private data control, it will flatten and unflatten successfully.  I confirmed this works by adding a 3rd member to my example.

Message 6 of 6
(3,540 Views)