01-13-2019 08:07 PM
Hello, I've to input a hexadecimal number as input to a VI. This hexadecimal numbers is to be converted from a binary string. So far I've converted the binary string to a decimal number. How do I convert a decimal number to a hexadecimal number? (I've searched the forums and most examples I found instructed about 'DISPLAYING' the hexadecimal number in an indicator. However, I need a hexadecimal number for inputting into a VI.)
I'm using the scan value function to convert the binary string to a decimal number. How do I convert it to a hexadecimal number? Also, I'm attaching the VI here. Thanks!
Solved! Go to Solution.
01-13-2019 08:36 PM
So you have a number and you want a string that shows the hexadecimal value? Just use the Number To Hexadecimal String function. You are already using the similar function to convert into a decimal string.
01-13-2019 10:02 PM
Thanks for the reply!
I am using the 'scan value' funciton to convert a binary 'string' into a decimal 'numeric'. The words in quotes are data types. If I convert the decimal 'numeric' into a hexadecimal 'string', my VI won't accept the input, as it requires a hexadecimal 'numeric' input. So how do I convert my decimal 'numeric' into a hexadecimal 'numeric'?
01-13-2019 10:30 PM
There is no difference between a decimal numeric and a hexadecimal numeric. All numerics are numbers. You can set the display style to show the value as a binary, octal, decimal, or hexadecimal format. But the underlying value is always a numeric.
If you want the output to be a string, then the messages you have already gotten will help you. (Number to Decimal String, or Number to Hexadecimal String.)