LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flatten to XML doesn't work well with waveform attributes

Hello,

 

I have an application where I have a data class containing waveforms acquired from DAQmx.  I'm using the "flatten to XML" and "write to XML file" to save the class object.  I get an error reading the class back in, in "unflatten from XML" I get error 1403 "Attempted to read flattened data of a LabVIEW class. The data is corrupt. LabVIEW could not interpret the data as any valid flattened LabVIEW class."

 

When I dig into the XML files, I see an entry for attributes, but it contains no data:

<Name>attributes</Name>

<Default>
<Name></Name>
</Default>

 

As a workaround, I'm able to strip out the attributes before I save the data. But I have to store the data somewhere else. Is there an easy way to save a class where all the data is preserved?

 

I've attached a example project in LV2013 SP1, run the "test class flatten and unflatten.vi". I get the error when I try to unflatten the waveform with the attribute, but not the one without.

 

-Jeff

 

 

0 Kudos
Message 1 of 2
(2,531 Views)

But I have to store the data somewhere else. Is there an easy way to save a class where all the data is preserved?


 

NO.  and lets look at the options:

  • TDMS: Does not support lvclass but, supports waveform attibutes
  • BIN file and datalog file:  generates error 4 on read
  • Scan to file: does not support lvclass does not mind waveform attributes

That throws out a whole lot of options.

 

That really only leaves a flattened string

!1-1.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(2,519 Views)