LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hex string conversion problem

Hi,

 

I need to convert a hexadecimal string (returned by VISA read) 01 to ascii string or/and to a number. Please look at the attachment. Constant has my hex string value. It is 01 in string indicator in hex display but somehow I can not convert it correctly.

 

BR,
Jick

0 Kudos
Message 1 of 3
(2,370 Views)

Hi,

exp.png

Reg
0 Kudos
Message 2 of 3
(2,355 Views)

Don's snippet should do what you want.  The problem with your VI is you were using the wrong function.

 

Scan from string takes a string of characters that make up a human readable number and converts them to a number.  So if your screen consisted of a "0" and a "1" (in normal display), it would have worked.  Instead you had a single byte of ASCII value 01, which is a control code in the ASCII chart and not a numeric digit.

0 Kudos
Message 3 of 3
(2,338 Views)