LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal to Hex conversion

Hello,

 

I wanted to ask,

1. Is there a way to convert a number bigger than 32bit to hex with labview 2015 32bit on windows pc?

2. If yes please share how. It'd be great if I can find a 64bit converter to hex.

3. If no can we input unsigned 32bit number to number to hex converter? 

 

Thanks,

Deep

0 Kudos
Message 1 of 39
(1,703 Views)

LabVIEW 32-bit supports I64 and U64 data types, if that is what you are after. You can change a Numeric Control / Indicator to one of these data types.

 

However your questions show some basic mis-understanding of number representations. Hex is a way of representing integer ("Decimal") data but it doesn't actually change the data at all - all the bits in the bytes are exactly the same as before, its just viewed from the perspective of a different number base (base-16 not base-10). 

 

So I assume what you are really asking for is either:

 

1) Display an 64-bit decimal integer number as Hex or

2) Convert the number to a string which is formatted as hex

 

The first you can accomplish by exploring the "Display Format" property of an Indicator set to a Data Type of U64 or I64. You can also enable visibility of the Radix so that you can dynamically change the Display Format on the Control.

 

The second you can accomplish by exploring the "Number/String Conversion" pallete under the String pallete. 

 

Explore those options and let us know if you have further questions.

0 Kudos
Message 2 of 39
(1,687 Views)

Assuming it's some sort of integer (e.g. 128 bit), you can convert it to an array of U8 and write each byte as hex, it'll yield the same result.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 39
(1,652 Views)

Also, how much bigger than a 32 bit number?

 

U64 big? Private key big? Largest prime big?

 

The number of bits of the target is of little relevance. An compiler can support 64 bit numbers on an 8 bit target.

0 Kudos
Message 4 of 39
(1,638 Views)

@deep_217 wrote:

2. If yes please share how. It'd be great if I can find a 64bit converter to hex.

 


Just one of the possible guesses:

 

64 bit to hex.png

Message 5 of 39
(1,635 Views)

Don't forget the Timestamp datatype.  It's a 128bit struct and can be used as a template for expanding to really really big integers.


"Should be" isn't "Is" -Jay
Message 6 of 39
(1,621 Views)

Its a date and time string with hour and minute... not too big but larger then 32bit because year changed to 2022 so instead of 21 we have to use 22 YYMMDDHHMM 

0 Kudos
Message 7 of 39
(1,600 Views)

Thanks for your response! To be specific I want to use number to hex converter which only accepts 32bit integer.

 ni.png

0 Kudos
Message 8 of 39
(1,600 Views)

its YYMMDDHHMM big

0 Kudos
Message 9 of 39
(1,594 Views)

@deep_217 wrote:

Thanks for your response! To be specific I want to use number to hex converter which only accepts 32bit integer.

 


No it doesn't.

 

You can wire an U64 to it...

0 Kudos
Message 10 of 39
(1,587 Views)