From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

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
(11,224 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
(11,217 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
(11,210 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
(11,198 Views)

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

0 Kudos
Message 5 of 9
(11,189 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
(11,184 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
(11,183 Views)
Solution
Accepted by topic author 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
(11,179 Views)

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

 

 

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

0 Kudos
Message 9 of 9
(11,172 Views)