LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Byte order of HEX string

Hello,

 

I am having trouble with changing the byte order of a HEX string, I hope you low level gurus can help me out.

 

I have a HEX input string 12345678, and I need to change it to 78563412.

 

I tried using the Byte Swap vi, but it does not do anything.

 

I am told this is an endian issue, but when I try to convert this to a number, and then back, it does not look right.

 

HELP!

Kenny

0 Kudos
Message 1 of 4
(2,656 Views)

Seems to me all you need is the Reverse String function.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,654 Views)

Well that was easy....good lord.....

 

I had assumed it would have taken 12345678 into 87654321 so I didnt try it.  But LV must know it is in hex and handle is differently.

 

Thanks.

Kenny

0 Kudos
Message 3 of 4
(2,649 Views)

Reverse String just reverses the BYTES (2 hex characters), not NIBBLES (1 hex character).  Almost everything comse down to the byte.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,639 Views)