LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to numeric

Solved!
Go to solution

 Hi.

 

I try make a comunication RS232 with Labview with  Flexis freescale's microcontroller, the comunication is made, but  the data becomes  how a string data, and  try connect it  with a termometer but send me a error menssage, weel  the problem is that  i can't  convert the string data to numeric data.

 

Please help me.

 

 sorry  with my english but i only speak spanish

 

 

0 Kudos
Message 1 of 8
(3,484 Views)
If you really want help, you need to provide the error code/message.
0 Kudos
Message 2 of 8
(3,474 Views)
not really the error, if not provide me a code that performs the conversion from string to numeric
0 Kudos
Message 3 of 8
(3,469 Views)

That vi requires a string input. And your string is empty. This is why you get an error. You can not convert an empty string into number.

 

P.S. If the string is empty because of that I lack of some hardware to acquire the data, then I apologize.

Message Edited by Giedrius.S on 02-11-2010 10:14 PM
Message Edited by Giedrius.S on 02-11-2010 10:15 PM
---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
0 Kudos
Message 4 of 8
(3,466 Views)
oh, i have a  input, the input is the signal from my microcontroller, but i understand that you cant run the program  becouse you dont have the microcontroller, but you will would  imagine that signal for example  22 , but that is a string not a numeric data, my problem is convert that string data to  numeric data.



 example Data readed=234
I want convert this  a numeric data, so:

Data Convert=234 but that  is numeric data, not a string data
0 Kudos
Message 5 of 8
(3,452 Views)
Solution
Accepted by topic author covenan

There is a decimal string to number function that you might try.

 

If the string is just the digits of a decimal number representing the temperature, that should take care of it.

 

Hope that helps

 

Hummer1

0 Kudos
Message 6 of 8
(3,434 Views)

If you actually have a string such as '24' then your VI will work perfectly fine. You will only have an error if you have an empty string or the string is a different format. In other words, the function you are using is correct.

 

Do everyone a favor and create a string indicator on the output of the VISA Read. Run the VI. If there is something in the string indicator, select from the Edit menu, Make Current Values Default. Save the VI and post it.

Message 7 of 8
(3,424 Views)
oh my friends  thanks for your help, the problem was resolved, is easy, exist a block diagram for  this conversion.

 

THANKS
0 Kudos
Message 8 of 8
(3,393 Views)