Jump to content

Hex to decimal


j21

Recommended Posts

Hello...Problems.....

I have been trying just about every conversion known to man in serial communicaiton. What am I missing.

I have a value 0007 0008 coming as a hex value. If you try converting it to a number, its value is 0 is labview.

I have even tried trimming it, but trim function treat two digits 00 07 00 08 as one, so it trims 00 instead of 0 and also tried trimming whitespace, but labview hex values do not contain whitespace. So 00 00 cannot be trimmed.ahhhhhhhh.

I understand that the hex->number is reading the first value 00 and returning that as the number value. The only way the converter works is if the hex value was 0708 which is translates to the correct decimal value of 1800. What am I not doing? Or what do I need to do... Thanks.

Link to comment
Hello...Problems.....

I have been trying just about every conversion known to man in serial communicaiton. What am I missing.

I have a value 0007 0008 coming as a hex value. If you try converting it to a number, its value is 0 is labview.

I have even tried trimming it, but trim function treat two digits 00 07 00 08 as one, so it trims 00 instead of 0 and also tried trimming whitespace, but labview hex values do not contain whitespace. So 00 00 cannot be trimmed.ahhhhhhhh.

I understand that the hex->number is reading the first value 00 and returning that as the number value. The only way the converter works is if the hex value was 0708 which is translates to the correct decimal value of 1800. What am I not doing? Or what do I need to do... Thanks.

CROSSPOST :nono::nono::nono:

Hi j21,

show us your code and we might take a look at it. :angry: but the coffee was good so....

but first 00070008 is 458760.

This '0007 0008' is that ASCII,dec, hex, oct or unicode?, is there a space after the 7? How many bytes (2/3/4/5/8/9)

Ton

PS Michael when can we add 8.2 to our profile?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.