I have hexadecimal data that I am receiving using Bluetooth. I want to convert this hexadecimal 2 byte data into a numerical value so I can plot it in a waveform as the data I am receiving is an analog voltage from a sensor.
The data format is like this: 020F so the numerical (decimal) value I need would be 527. I can them manipulate this and convert it to a useful voltage value.
Help please, I tried converting it to a string first and then using the "Hexadecimal string to number" function but it didn't work.
How are you displaying the hexadecimal values? I was trying to reproduce what you are seeing and having a hard time. Is it possible for you to post your VI?
It depends if you have a hexadecimally formatted string of 4 bytes containing the characters 0..F excusively or if you have a binary string of two bytes that, if set to hex display mode displays what you describe.
Once you know what you have, you can do one of the following (Seems the byte order is big endian).
(The function at the bottom is "unflatten from string")