LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the ASCII code for a character

Hello,

   I have a a character string that I want to obtain ASCII code for it so that I can send it to a numerical indicator. For example, the single character string is a
"?", that has a ASCII code of decimal 63. I am using the following conversions to do this, they are the "string to byte array" and then the "index array" to get
operation done that I want to perform. Are there any other "better ways" to get this done?

P.S. How do you put images in the forum postings?


Regards,


Kaspar
0 Kudos
Message 1 of 4
(3,074 Views)
If you just want an indicator showing the ASCII codes, keep it as a plain string indicator, but set it to display hex (right-click...hex display). 🙂
0 Kudos
Message 2 of 4
(3,074 Views)
Hello,

  I am using a numeroical indicator, the one that looks like a thermomter. I am getting strings back from a PIC that represent the temperature, so I need to convert
each char in the string to a number to display the temp to a person as a number via the numerical indicator that looks like a thermometer
Regards,


Kaspar
0 Kudos
Message 3 of 4
(3,063 Views)

Is it alway exactly one character (i.e. an 8bit value between 0 and 255)? In this case just typecast it to U8.

 

...see example (LabVIEW 7.0) 🙂

0 Kudos
Message 4 of 4
(3,055 Views)