LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal to hex convert

Solved!
Go to solution

Hello,

 

sorry but i have a simple question. I want to convert decimal number 0-10000 (like 10000 (decimal) to 27 and 10 (hex) or 1000 (decimal) to  03 and E8 (hex)) to two hex numbers and back. Iám searching for an easy way.

 

I tried different ways but i can`t find a solution.

 

greetings Schwede

Message Edited by Schwede on 12-10-2008 07:11 AM
0 Kudos
Message 1 of 9
(5,046 Views)
Just use the "Number to Hexadecimal String" function and then split the string in half.
0 Kudos
Message 2 of 9
(5,043 Views)

Thankyou,

 

but i don`t want to have a string i need numbers to put them in a byte array.

 

greeting Schwede

0 Kudos
Message 3 of 9
(5,040 Views)
Solution
Accepted by topic author Schwede
0 Kudos
Message 4 of 9
(5,036 Views)
That`s great, but didn`t help. The result are two decimal numbers. And i need two hex numbers that i can put in a byte array. This byte array i give over to teststand.
0 Kudos
Message 5 of 9
(5,009 Views)

Schwede,

 

please see attached VI. If you need different amount of Bytes, please modify the "Bytes" constant for the second for loop.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 9
(4,992 Views)
A very quick an easy method. For numbers go to palette numeric>>data manipulation>>join numbers and split numbers
Message Edited by t06afre on 12-10-2008 07:59 AM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 9
(4,974 Views)

Thankyou Norbert,

 

but the solution comes from Pnt (yours and t06afres is fine, too).

 

I don`t think about that the numbers are converted automatically. Now it works fine.

 

Schwede

0 Kudos
Message 8 of 9
(4,959 Views)
Use the Split Number and Join Number
Omar
0 Kudos
Message 9 of 9
(4,957 Views)