LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hexadecimal to Decimal Conversion

Solved!
Go to solution
Solution
Accepted by topic author Fredo123Danzel

Here's some code showing two alternatives (It is possible that it is I16, so adjust accordingly):

 

altenbach_0-1750354753615.png

 

Most likely all other bytes in the string also have meaning and if you know the entire structure you can cast it to a cluster with all the values at once. (not shown).

 

Do you have documentation?

 

On a side note, none of this has anything to do with "hexadecimal to decimal conversion" (sic). You have 2 bytes in a string and need to reinterpret it as 2 byte numeric integer datatype. Hexadecimal and decimal are a formatting convention to display values in a certain readable format. using ASCII characters 0..9 or 0..F. You can change the display format of the numeric indicators to hex, octal, binary, or decimal and this will not change the underlying value of it!

Message 11 of 13
(82 Views)

Hi Knight of NI,

 

 You answered my question. I have an instrument that I query, and it always returns a frame with the same amount of data. Your answers helped me solve my problem. Thank you very much!

0 Kudos
Message 12 of 13
(70 Views)
Solution
Accepted by topic author Fredo123Danzel

Hello,

 

perhaps this in general can help you with these kind of conversion:

https://forums.ni.com/t5/LabVIEW/Complete-String-Conversion-Tutorial/td-p/4245188/jump-to/first-unre...

Greets, Dave
0 Kudos
Message 13 of 13
(32 Views)