LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert fractional string value to fractional number

Solved!
Go to solution

Hello,

 

I think this is a basic labview question. I have a fractional string value 2.01. I want it to convert it to the number format. I used fractional/exponential string to number but the output I am getting in number is only 2. How can I get the whole value 2.01 in number.

0 Kudos
Message 1 of 4
(2,436 Views)
Solution
Accepted by topic author govindsankar

Hi govindsankar,

 

you have been so long a participant of this forum so you should know you have to provide an example VI to explain your problem!

 


@govindsankar wrote:

I have a fractional string value 2.01. I want it to convert it to the number format. I used fractional/exponential string to number but the output I am getting in number is only 2.


For me it works as expected:

Your computer is using the point as decimal separator char?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,427 Views)

Thank you, that was the problem. I live in Germany, here comma is used instead of point. So the number is 2,01. 

Message 3 of 4
(2,413 Views)

Luckily there is a Boolean input on the top of the Fract/Exp String To Number function to "Use System Decimal Point" that you can just set to FALSE.  The function will always assume a period for the decimal separator then.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,347 Views)