LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert an integer into an ASC II character?

I am trying to use the serial communication to communicate with a microcontroller. I need to send numbers between 0 and 255 from LabVIEW to a microcontroller. The Write vi needs the input a string. I need to convert an unsigned byte in an ASC II character then after the microcontroller receive it to convert it back to a number. I am not sure this will work because I need to send numbers between 0 and 255 and the ASC II is up to 127. Thanks in advance for any other idea.
0 Kudos
Message 1 of 2
(2,888 Views)
There is a function in the string conversion and numeric conversion palettes to convert from U8 to string and back. Try these.

If they miss the mark because you need -127 to 127, and they give 0-255, a bit of simple subraction should do the trick.
0 Kudos
Message 2 of 2
(2,888 Views)