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,490 Views)
Just use the "Number to Hexadecimal String" function and then split the string in half.
0 Kudos
Message 2 of 9
(5,487 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,484 Views)
Solution
Accepted by topic author Schwede
0 Kudos
Message 4 of 9
(5,480 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,453 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
(5,436 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
(5,418 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
(5,403 Views)
Use the Split Number and Join Number
Omar
0 Kudos
Message 9 of 9
(5,401 Views)