From 9:00 AM - 12:00 PM CDT on Saturday, June 6th, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Hexadecimal String To Number Function

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: String/Number Conversion Functions

Requires: Base Development System

Interprets the characters 0 through 9, A through F, and a through f in string starting at offset as a hex integer and returns it in number.

The connector pane displays the default data types for this polymorphic function.


string can be a string, a cluster of strings, an array of strings, or an array of clusters of strings.
offset specifies number of characters into string at which the function starts searching for a match. offset must be numeric. The offset of the first character in string is 0. If offset is unwired or less than 0, the function takes offset as 0.
default is any object of numeric representation and specifies the numeric representation for number. The default is a 32-bit unsigned integer value of 0. To return a 64-bit integer output, wire a 64-bit integer to default.
offset past number is the index in string of the first character following the number. offset past number reflects the value from the last string if you input an array of strings.
number can be a number, a cluster, an array of numbers, or an array of clusters depending on the structure of string and offset. If the input string represents a number outside the range of the representation of number, number is set to the maximum value for that data type.

Hexadecimal String To Number Details

The following table illustrates how string, offset, and default affect number.

stringoffsetdefaultoffset past numbernumberComments
3ab03939The conversion starts from the first character 3, as offset specifies.
3ab2311The conversion starts from the third character b, as offset specifies.
1FFFFFFFF094294967295number is a 32-bit unsigned integer, as default specifies. The result of the conversion is saturated because it is too large to be represented.
1FFFFFFFF098589934591number is a 64-bit unsigned integer, as default specifies.
f3g02243g is not a valid hex character, so conversion stops there. The value of offset past number indicates the conversion stops at the third character g.
–30000Negative numbers are not permitted for hex.


Not Helpful