From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

normal string to hex string

Solved!
Go to solution

Hi all, 

 

This question has probably been posed before, but I cannot seem to find a situation that quite matches the issue that I am experiencing. I have a numeric array that I flatten to a data string, reverse order, take the first two elements, reverse the order again, and feed the characters into a for loop. I want the string to be in hexadecimal, thus having FE0C (in hex) going through the for loop, but when I highlight the execution I see that normal display characters are going through instead. When I display my string, I have already right clicked to show the hex display which is correct. How do I convert the normal string to a hex string?

 

Thanks,

J

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

You do not need to convert.  All you are commenting on is how the data is displayed.  THE DATA IS STILL THE SAME.


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 5
(3,597 Views)

Yes I do realize that. However; if you look at the attachment, the substring in the for loop is in normal display form and I wish to convert that to number. I cannot use the Hex to Number function as I have in the attachment. How would one change yoe into number?

0 Kudos
Message 3 of 5
(3,586 Views)
Solution
Accepted by topic author Jas.D

You could use Type Cast to change it to a U16 (since it is supposed to be 2 bytes) or Unflatten From String.


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
Message 4 of 5
(3,581 Views)

Fantastic! It worked. Thank you so much!

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