LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Precision of Flatten to XML

In LabVIEW 6.1 the Flatten to XML function seems to truncate double precision data to 5 decimal places. Is there a way to extend the precision to 10 or 15 decimal places?
0 Kudos
Message 1 of 7
(3,562 Views)
In LabVIEW 6.1, when using Flatten To XML, all floating point values are truncated to 5 decimal places. The same is true when Unflattening From XML.
0 Kudos
Message 2 of 7
(3,562 Views)
Your answer simply restates my initial statement.
0 Kudos
Message 3 of 7
(3,562 Views)
Sorry. I simply meant to confirm your statement that all floating point values are truncated to 5 decimal places. There is no real workaround in LV 6.1. The only workaround would be to replace the text with string functions after the value is flattened, or to create a simple flatten VI for floating point data.
However, the value would still be truncated by Unflatten From XML (if that was the ultimate destination for the data).
0 Kudos
Message 4 of 7
(3,562 Views)
I know that this thread is quite out of date, but afaik there is still no solution for this problem.

I wrote a .NET dll to parse and reformat the LabView-Xml to a more human-readable form, and also not type specific (only specific on the control names). I thought the double-precision problem was already solved, but it is definitely not. Is there any reason that the precision is always truncated? As Xml nowadays is a common way to share data, for me it was no question that LabView supports it completely, but now I know it doesnt. Is there any workaround? I dont want to use OpenG as its to slow, and also not localization-independent; it shouldnt be a problem just to extend the precision to the maximum possible, printf() always supported this.
0 Kudos
Message 5 of 7
(3,250 Views)
Can't remember if it was the XML or something else I was working on years ago that truncated my decimal places. I worked around it by multiplying then dividing everything by 1000 to get the extra decimal places I needed. In your case multiply by 10 or 15^10. I know it sounds clunky but it worked for me.
PaulG.
Retired
0 Kudos
Message 6 of 7
(3,237 Views)

Hi Volki,

You might want to refer to the forum post Floating point precision of "Flatten to XML" .

This post goes further into the problem.

Hopefully this helps!!

Aashish M
CEO
TransferFi
www.transferfi.com
0 Kudos
Message 7 of 7
(3,205 Views)