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: 

String to double conversion

Solved!
Go to solution

Hello,

 

I'm trying to convert the following string to a double:

 

it=55,55

 

Does anyone have any suggestions?

 

 

Thanks,

0 Kudos
Message 1 of 9
(15,605 Views)

Hi,

 

       Use Scan From String with input format "%,;%f" or use Fract/Exp String To Number with use system decimal point = FALSE if decimal point is "." or use sytem decimal point = TRUE if decimal point is ",".

 

Scan From String.png

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 2 of 9
(15,598 Views)

@floresma wrote:

Hello,

 

I'm trying to convert the following string to a double:

 

it=55,55

 

Does anyone have any suggestions?

 

 

Thanks,


What are you trying to convert into a double?  The whole string (it=55,55)?  By "double," do you mean "ascii codes?"

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 9
(15,591 Views)

Thanks for the help, however, i keep getting the following error:

 

Error 85 occurred at Scan From String (arg 1) in Untitled 3

Am I missing an element?

 

 

Thanks,

 

0 Kudos
Message 4 of 9
(15,579 Views)

I'm trying to convert the number vlues into seperate double indicators.

0 Kudos
Message 5 of 9
(15,570 Views)

Hi,

 

       billko read better that me, change format string to:

                                          it=%,;%f

 

Scan From String (it=55,55).png

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
Message 6 of 9
(15,565 Views)

Post your VI, that way we can see what you are doing wrong.

 

Be sure that you have any data in controls saved as the default values.

0 Kudos
Message 7 of 9
(15,564 Views)
Solution
Accepted by floresma

Hi,

 

   Two numbers, ok.

 

   Try this:

 

Scan From String 3.png

PS: You can erase %.; if you system decimal point is ".".

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
Message 8 of 9
(15,560 Views)

Thanks for the help:) this worked perfectly....

 

 

Also, thanks to everyone for all your feedback...

0 Kudos
Message 9 of 9
(15,553 Views)