LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pasar un nº a un string hexadecimal

Hola
 
Necesito convertir un número a texto en hexadecimal por ejemplo 255 ---> xFF
 
Number to hexadecimal string te convierte 255 a FF que en hexadecimal es x46 x46.
 
 
Alguien tiene alguna idea de como hacer esto
 
0 Kudos
Message 1 of 7
(3,200 Views)
Hi Senper,
 
could you try to asked in english? I tried to understand your spanish (?) post, but I think I abortived Smiley Sad. What´s that with x46 x46?
 
 
Regards
ThomasD
0 Kudos
Message 2 of 7
(3,189 Views)
Hi, Senper:

Let's see if I understand what you say.

You have a number that you convert to HEX, and then you want to have the numbers, but you see them in HEX but you would see in DEC?

I think you can solve your problem with Format&Precision and take it back to Automatic formatting

Hope it helps,
Aitortxo.
0 Kudos
Message 3 of 7
(3,187 Views)

I´m sorry about the spanish, It is the first time that I use the Forum.

I need to convert a number (decimal) in to a hexadecimal string.

For example 255 (decimal number)  is FF (hexadecimal number) and I want FF as an hexadecimal string

When  I convert the number to a string, using It always use the ascii code FF (4646) and I want to get the hexadecimal FF

I think that the image will help in my explanation

Thanks in advance

 

Senper

 

0 Kudos
Message 4 of 7
(3,183 Views)
Hi Senper:

I think this is what you need:

You convert the number to string so you convert your number to 8bit array, and then you display them. In normal text, you will not understand anything, but in HEX you will see 8bit numbers in pairs of two as you want.

If you start with a I32 number you will get 4 pairs. If you start with a I8 number you will get one pair.

Hope it helps,
Aitortxo.
Message 5 of 7
(3,174 Views)
Yes that is what i need
 
thanks
0 Kudos
Message 6 of 7
(3,163 Views)
Yes that is what i need
 
thanks a
0 Kudos
Message 7 of 7
(3,163 Views)