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 

0 Kudos
Message 1 of 10
(3,562 Views)

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
0 Kudos
Message 2 of 10
(3,554 Views)

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:

hex.png

0 Kudos
Message 3 of 10
(3,552 Views)

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.

 

0 Kudos
Message 4 of 10
(3,522 Views)

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
0 Kudos
Message 5 of 10
(3,509 Views)

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

 

0 Kudos
Message 6 of 10
(3,501 Views)

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
0 Kudos
Message 7 of 10
(3,494 Views)

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

 

 

0 Kudos
Message 8 of 10
(3,493 Views)

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

 

0 Kudos
Message 9 of 10
(3,484 Views)

Hi perumpadapu,

 

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

check.png

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
0 Kudos
Message 10 of 10
(3,481 Views)