LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I convert a deciaml input to a hexidecimal output in labview?

Can somebody please explain what seems like a simple conversion ?
I would like to convert a decimal input to a Hexidecimal output:
i.e input value of 20000
converting to a hexidecimal output of 4E20
 
hope you can help
 
AW
Message 1 of 21
(19,383 Views)

This just has to do with formatting. There is no actual conversion taking place.

Make sure your numeric is an integer (I or U representation), right click it and select Format & Precision and select hex from the list.


___________________
Try to take over the world!
Message 2 of 21
(19,378 Views)
Thanks, that seems to do the trick!Smiley Happy
0 Kudos
Message 3 of 21
(19,375 Views)
Hi!
There are two simple ways to convert decimal to Hex.
1. just simply make your indicator format to Hex (I 32). Just right click on indicator and go to format and
    precision. Select data range and format.
2. Use convert decimal string to hex converter in string palet at block diagram.
Refer vi.
 
Kaustubh
VC (Pune)]
INDIA
Message 4 of 21
(19,358 Views)

I want to convert 16.234 to Hex Value. Kindly suggest...

Advance Thanks

Anil

0 Kudos
Message 5 of 21
(17,910 Views)

Hi Anil,

           Are you looking for this one?

          

           See the attachment:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
Message 6 of 21
(17,901 Views)

Hi danil,

 

some rework to adapt for non-English regional settings and preparation for more decimal digits:

check.png

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 21
(17,892 Views)

Dear D Anil33

 

Thanks for reply

 

One of the example to communication they have given 16.000V - Hex = 0X00003EB0.  if we convert directly hex it will show 10..

 

I am little bit confused.

 

 

 

0 Kudos
Message 8 of 21
(17,888 Views)

Hi Anil,

 

3eb0h is 16048d...

 

Could you tell more about the background of your question?

Is the device using that number using some scaling? Is your decimal float number scaled to a certain range? Then you would need to "pre-scale" your float and convert it to a simple (integer) hex number...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 21
(17,885 Views)

I want to communicate IT6800 Power supply through RS232 communication. total 25 byte String 26th is check sum.

0 Kudos
Message 10 of 21
(17,880 Views)