LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hexadecimal string to Hexadecimal number

I need to convert a hexadecimal string into a hexadecimal number to use that value as input to a Modbus block .. How is it done?

0 Kudos
Message 1 of 5
(3,694 Views)

String >> Number/String Conversion palette.

0 Kudos
Message 2 of 5
(3,680 Views)

The built in function "hexidecimal string to number".

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 5
(3,678 Views)

Note that what you want is to "convert a hexadecimal string into a number", not a  "hexadecimal number".  The output is a number, stored internally as binary, and the number base isn't specified until it is converted back into a string.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 5
(3,652 Views)

@hierromovil wrote:

I need to convert a hexadecimal string into a hexadecimal number to use that value as input to a Modbus block .. How is it done?


Your question is very ambiguous, because all we know is that you have a string and probably want another string.

 

(The word hexadecimal is a visual format, not an internal representation).

 

You need to be careful to make a distinction between internal representation and formatting for human consumption.

 

You could be talking about:

  1. A binary string possibly containing all 256 possible byte patterns (00..FF) with the string indicator set to hext display.
  2. A hexadecimally formatted string containing exclusively the 16 characters 0..F (and maybe some spaces for readability).
  3. A numeric with the display set to hexadecimal formatting.
  4. etc.

So: 

  • What do you have? (what is a hexadecimal string????)
  • What do you want? (what is a hexadecimal number????)

Easiest would be if you could attach a simple VI containing diagram constants of your actual data and what you want out of it.

0 Kudos
Message 5 of 5
(3,634 Views)