ASCII code conversion

In LabVIEW when we interface with hardware, sometimes we have to send some control characters which will be sent using corresponding ASCII code.

Type cast is the function which casts the input to the required data type. When input is string and the type to convert is U8 array, output will be the corresponding array of ASCII codes for each character. Same thing can be done using String to byte array function. Following are some basic examples,

String to ASCII:


ASCII to String:

Similarly, from ASCII code to string type cast function or Byte array to string functions can be used:



Similarly any symbols or control characters can be used in the same way. If any symbol has to be displayed in the front panels just change the font to symbol font. Following is the list of ASCII characters from 0 to 255.It is in symbol font for clear visibility.



How can i convert ASCII characters to ASCII codes

Leave a Reply