LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal to Hexadecimal conversion

Solved!
Go to solution

Hi all, I am trying to convert decimal number to hexadecimal number by normal conversion in the string palate, I am getting the proper hexadecimal value when my string indicator is in Normal display mode, when I change it to hex display I am getting ASCII code. I want to convert decimal value to proper hexadecimal value for my application please some one help.

0 Kudos
Message 1 of 12
(12,141 Views)

Post your VI.  Give examples of what you have and what you want it to look like.

 

The problem with terms like decimal, hexadecimal, and ASCII is that they are frequently misused, and everyone has a slightly different intepretation as to what they mean by them.  For instance, I don't know what you mean exactly by "when I change to hex display I am getting ASCII code."

0 Kudos
Message 2 of 12
(12,127 Views)

Thanks friend I got solution for it my self.

0 Kudos
Message 3 of 12
(12,123 Views)
Solution
Accepted by topic author whitecr

Please find the attached VI, I got answer.

0 Kudos
Message 4 of 12
(12,113 Views)

Well, yes... but more conventionally, you would use the Number to Hexadecimal String node in the Number/String Conversion palette.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 12
(12,106 Views)

@billko wrote:

Well, yes... but more conventionally, you would use the Number to Hexadecimal String node in the Number/String Conversion palette.


No, his string is in hex display, your conversion would give something entirely different.

 

(Granted, the original problem description was completely ambiguous and was not sufficient to give a solution.)

0 Kudos
Message 6 of 12
(12,077 Views)

@altenbach wrote:

@billko wrote:

Well, yes... but more conventionally, you would use the Number to Hexadecimal String node in the Number/String Conversion palette.


No, his string is in hex display, your conversion would give something entirely different.

 

(Granted, the original problem description was completely ambiguous and was not sufficient to give a solution.)


Nah, it wasn't the OPs fault.  I probably shouldn't be answering questions at midnight.  Upon looking at it in the morning, his solution is totally appropriate - that's the classic way of using the Type Cast Function.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 12
(12,056 Views)

HI all,

          While we are doing serial communication like RS 232 we need to transfer the comands to the registers in the slave in the form of hexa decimal code, If we use normal conversion like number to hexadecimal string we will get the convertion value, but during transmission, only corrosponding ASCII code is been transmited to the slave which results in instable operation. 

 

To avoid it we must do proper hexa transmission.

See the VI attached below.

 

 

Karthick K

INDIA

0 Kudos
Message 8 of 12
(12,028 Views)

This is all obvious once we know what you actually want. "Hexadecmal" is a display format while the device is apparently interested in the raw binary data, no matter how it is displayed.

0 Kudos
Message 9 of 12
(12,020 Views)

Hi,

But the device is not supporting the normal formate, we have to do like this only. I have tested with my device.

0 Kudos
Message 10 of 12
(11,993 Views)