LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Readed in Hexadecimal convert to Decimal.

Solved!
Go to solution

Hi Ravens and thx for your time. I have tried type cast but it keeps giving me the same 0 value. I have wired string subset to type cast and it doesn't work. Any idea?

0 Kudos
Message 11 of 15
(1,960 Views)

Post your VI with some actual string data saved into an indicator as a default value.

 

Also, search the forums on hexadecimal.  This topic comes up so frequently, you'll find hundreds of messages asking the same question.  Some of those will apply to your situation one way or the other.

0 Kudos
Message 12 of 15
(1,957 Views)

 Hi Raven, everything is posted now in this forum. What i read is 1901 1302 0031 339A. I need to convert only the 0031 part, that's why i am using a string subset. I have looked in the forums and checked a lot of examples but none of them works for me, dont know really why. Please check the vi's i posted for further information. I posted The conversion vi i used, and my main vi, but it doesn't work when i plug to my proyector. I guess is a problem with the conversion or the data readed.

0 Kudos
Message 13 of 15
(1,941 Views)

Hi Roundish,

 

I would convert the hex string to byte array, grab the 2 8 bit elements of interest, merge them into a 16 bit number then display to user as decimal.

 

See attached VI.

 

Steve.

Stephen C
Applications Engineer
0 Kudos
Message 14 of 15
(1,926 Views)

A snippet of Steve's VI, but I aslo added the string subset and typecast method, and it works great with one less function node.

 

0 Kudos
Message 15 of 15
(1,914 Views)