LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please help, Convert this string format to number

Solved!
Go to solution

I send some command via RS232 to my machine and the machine sent me back with a number "40" display in normal display in my attatched picture. I tried to use the string convert to num tools but there is nothing happen just "0" .

I wondering with it, then I try displaying the string in different way as in attached, code display and hex display and see the format of it.

I want to get the string "40" to change it to number, how can I get it? please help

 

Untitled.gif

 

Thank you in advance.

0 Kudos
Message 1 of 4
(2,395 Views)

@lovemachinez wrote:

 I tried to use the string convert to num tools but there is nothing happen just "0" .



I don't know what "tools" you are talking about, but unless you show us what you tried, we cannot tell what you are doing wrong.

 

 

 

I don't seem to have a problem getting the 40 out this string, so try again. If you are still stuck, attach your code. Make sure the controls contain some typical default data 😉

Message 2 of 4
(2,386 Views)
Solution
Accepted by topic author lovemachinez

It worked fine for me. Just to be on the safe side you can use the Trim Whitespace function (strings palette) to clear the "\" characters.

string to number.png

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 3 of 4
(2,380 Views)

Got it!, Thank you very much to all Heart

0 Kudos
Message 4 of 4
(2,372 Views)