LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert a string to an array of 16bit unsigned integers

Solved!
Go to solution

I have a string represented in hex format, how can I convert this to an array of 16 bit unsigned integers?

 

I know I can use string to byte array to easily convert it to 8 but unsigned integers, is there a simple way for 16 bit unsigned integers?

0 Kudos
Message 1 of 4
(5,376 Views)
Solution
Accepted by topic author hydzik

Use 'Type Cast' function.

 

String to U16[]


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


Message 2 of 4
(5,369 Views)

@hydzik wrote:

I have a string represented in hex format, how can I convert this to an array of 16 bit unsigned integers?

 

I know I can use string to byte array to easily convert it to 8 but unsigned integers, is there a simple way for 16 bit unsigned integers?


While your description is somewhat vague and not very clear, I think the typecast solution from the previous poster may not be what you look for. You may more likely look for something along these lines:

 

 HexToU16.png

Rolf Kalbermatter
My Blog
Message 3 of 4
(5,350 Views)

Thanks, type cast was what I was after.

0 Kudos
Message 4 of 4
(5,340 Views)