LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to byte

ive got a hex-string like 88F4. with the "String To byte Array" the result is 56567052.
How can I convert my hex string in a byte array with 2 Numbers (88 and F4)?
0 Kudos
Message 1 of 4
(2,942 Views)
pass the string at first trough the from shexadezimal string functions
and th eresult trough the Quotient & Remainder of dezimal function and
build an array of the two result values.

Niko

WeberM wrote:

> ive got a hex-string like 88F4. with the "String To byte Array" the
> result is 56567052.
> How can I convert my hex string in a byte array with 2 Numbers (88 and
> F4)?
0 Kudos
Message 2 of 4
(2,942 Views)
String to byte array acts like a typecast and is not what you need if the string shows "88F4" when set to normal, not hex display. You need to scan values. A simple example is attached that works if your string is clean (even number of valid hex characters). There are probably better ways to do this.
Message 3 of 4
(2,942 Views)
thanks for this example. its the solution of my problem.
0 Kudos
Message 4 of 4
(2,942 Views)