ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems converting string to floating point

Solved!
Go to solution
Dear reader,

System:
Windows 2000 with Labview 8.0 updated to 8.0.1

I have problems converting a string to a floating point number. The string I want to convert is "+000.41". If I feed this string into a Fract/Exp String to Number object the result is 0. I found this a little bit strange so I check it at a differnt computer and there the result was 0.41. The only differentses between the systems was the version 8.0 and 8.0.1 and the opperating system windows 2000 and Xp. So I run an update to update the version to 8.0.1, but that didn't work.
Now I'm stuck and don't know where to look for a solution. So can you help me?

With best regards,

K. Zwetsloot
Message 1 of 5
(3,867 Views)
Just an idea... Have you checked the definition of the decimal point in the Windows settings ?
Message 2 of 5
(3,862 Views)
Solution
Accepted by topic author KHZ


@KHZ wrote:
 If I feed this string into a Fract/Exp String to Number object the result is 0.

One of yoiur computers is set to german (or similar), with a comma as decimal seperator. Go back to the "Fract/Exp String to Number" and wire a FALSE to the top terminal.

From the help:

"use system decimal point defines the decimal separator. If TRUE (default), the decimal separator uses the localized decimal separator. If FALSE, the decimal separator is a period"

Message Edited by altenbach on 07-25-2006 08:11 AM

Message 3 of 5
(3,856 Views)
Thanks everyone. That was the problem, so it is fixed now!
0 Kudos
Message 4 of 5
(3,812 Views)
If I read his name right, I think the language is dutch!

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 5
(3,810 Views)