Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

convert hexadecimal to decimal

Hi 

Iam using the shipped example with Labview 2010 "Basic Serial Read and Write Vi" to establish communication with a digital anemometer. Communication with the device is fine and Iam using a Subset Array to display the specific number of bytes that Iam interested in. The problem is that how do I Display this data in standard numeric decimal form.  

0 Kudos
Message 1 of 4
(3,756 Views)

I did not understand clearly your problem and may be you just try to look into the String pallet-> String to number converstion or you can try with type cast function.

0 Kudos
Message 2 of 4
(3,748 Views)

Hi

The Vi is reading 15 Bytes of data from the  anemometer every second. Iam only interested in the last 4 Bytes of data as this displays the wind velocity. Iam able to segment this data from the rest. The data is an hexadecimal format. Iam trying to convert this data to standard numeric from .I Tried using the Hexadecimal string to number function with no success

0 Kudos
Message 3 of 4
(3,743 Views)

How do you need to interpret the last four bytes ?  Is this a string ( like " 3AF0") which  hast to be converted to a number. In that case prepend a "0x"  and use the Hexadecimal string to number function. Or do you have to interpret them as 32bit number in raw binary format. Then you have to use a typecast. Might be after reversing the order of the bytes for low endian <->big endean conversion. 

0 Kudos
Message 4 of 4
(3,728 Views)