From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to spread sheets with more than single precision

Solved!
Go to solution

Hi everyone,

 

Im recording data by using the write to spread sheet VI in Labview 8,

it records single precision which is a problem for me as I require greater 

precision. 

 

Are there ways around this issue?

 

Thanks

0 Kudos
Message 1 of 5
(2,223 Views)

What do you mean by this? Is it possible for you to post code which only shows what you are trying to explain?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(2,219 Views)
Solution
Accepted by topic author Solar Surfer

The Write to Spreadsheet File.vi has an input for Format String. The default is "%.3f" which will give you less than single precision.  Change it to what you need.  Read the Detailed Help for more information about Format Strings.

 

Lynn

Message 3 of 5
(2,214 Views)

Thanks for your input, the change from%.3f to %#g has 

fixed my issue. I do find it confusing when reading the 

help function of the VI as it says "Converts a 2D or 1D 

array of single precision numbers to a text string ... "

0 Kudos
Message 4 of 5
(2,196 Views)

That help file has been changed in newer versions.  The interesting thing is that the VI itself has DBL arrays as inputs in LV 8.0.

 

Of course the default format may not even save enough precision to take full advantage of SGL data type.

 

Lynn

0 Kudos
Message 5 of 5
(2,186 Views)