LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A very simple hex conversion question

I probably am not thinking it correctly. I have hex constant (string constant with hex) and I want its decimal value. Please see the attached vi for details.

Thanks in advance for your time.
0 Kudos
Message 1 of 6
(3,281 Views)
Use the Hexadecimal String to Number primitive instead (as shown in the attached VI)
0 Kudos
Message 2 of 6
(3,281 Views)
The basic assumption for using the Hexadecimal String to Number primitive is that the input is normal text. My input happens to be a 'Hex' input. Hence your solution fails.

Please correct me if I am wrong.

Thanks
0 Kudos
Message 3 of 6
(3,281 Views)
Oops ... I guess I was a litlle too fast.
Here is the conversion procedure you need.
0 Kudos
Message 4 of 6
(3,281 Views)
Hi,

Here is an alternavtive. Just a completely different solution.

Regards,

Wiebe.

"LocalDSP" wrote in message
news:506500000005000000046C0100-1079395200000@exchange.ni.com...
> Oops ... I guess I was a litlle too fast.
> Here is the conversion procedure you need.



[Attachment Hex-string_To_Decimal_alternative.vi, see below]
0 Kudos
Message 5 of 6
(3,281 Views)
Your original implementation will work if you change the representation of the integer wired to the type input to U16 (you have I32).

The four character hex constant you have wired is equivalent to a 2 byte integer, not 4 bytes.
0 Kudos
Message 6 of 6
(3,281 Views)