# LabVIEW

cancel
Showing results for
Search instead for
Did you mean:

## how to cnovert an array of decimal numbers to a hexa decimal number

if i have a numbers like 163, 150,143 like this a three numbers how can I join them and form  a hexa decimal number. please kindly reply

Message 1 of 10
(2,322 Views)

## Re: how to convert an array of decimal numbers to a hexa decimal number

Hi perupadapu,

please explain "join" in this context. What is your expected result for the numbers given (\$A3, \$96, \$8F)?

There's a function "Number To Hex String" in the string->conversion palette...

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(2,314 Views)

## Re: how to cnovert an array of decimal numbers to a hexa decimal number

It's not clear to me how you convert the decimal into hex. Can you be more precise?

Here's my guess in the dark:

Message 3 of 10
(2,312 Views)

## Re: how to cnovert an array of decimal numbers to a hexa decimal number

not like this. In my motor  encoder the encoder will give the position as three decimal numbers of byte length one. so if it gives 150 , 160, 170. Then how can I get the original decimal number which it meant through these numbers. Please kindly help me.

Message 4 of 10
(2,282 Views)

## Re: how to cnovert an array of decimal numbers to a hexa decimal number

Hi perumpadapu,

do you read the answers on your question at all?

I repeat my question from message #2:

What is your expected result for the numbers given (\$A3, \$96, \$8F)?

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 10
(2,269 Views)

## Re: how to cnovert an array of decimal numbers to a hexa decimal number

i need it as a single number not like parts with commas as a single 64 bit decimal. Yoo understand I think

Message 6 of 10
(2,261 Views)

## Re: how to convert an array of decimal numbers to a hexadecimal number

Hi perumpadapu,

do you need your number as "163150143" ("single number not like parts with comma") or (as demonstrated above) as "10720911" after joining the bytes?

Yoo understand I think

Nope, you still doesn't give the expected result!

Again: WHAT IS THE EXPECTED RESULT?

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 10
(2,254 Views)

## Re: how to cnovert an array of decimal numbers to a hexa decimal number

Hi!

The example I provided does exactly what you need, then.

it joins 3  single byte numbers into a 32 bits integer (adding a 0 high byte).

The join order may be wrong but can easily be fixed....

Regards,

Marco

Message 8 of 10
(2,253 Views)

## Re: how to cnovert an array of decimal numbers to a hexa decimal number

I need

as like this

0

195

50

hexa decimal numbers corresponds to 50,000  the decimal number.

I need such a conversion. How we can do it

can you please reply

Message 9 of 10
(2,244 Views)

## Re: how to convert an array of decimal numbers to a hexadecimal number

Hi perumpadapu,

as has been shown to you by Marco you should try JoinNumbers for that task:

Your given numbers result in 49970, just a little bit off from your 50000. When there are different conversion rules you have to study your manual...

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 10
(2,241 Views)