NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion of ASCII char to ASCII code

Hi everybody,

 

is there any string function that converts a single character into its accoring ASCII code number?

 

By the way, Chr() works in the opposite way (ASCII code number -> string char).

 

Thanks in advance

 

Stefan

Message 1 of 4
(7,418 Views)

This might work....

 

Under Functions:Numeric. Try the Asc() 'Obtain character value' function.

 

Number Asc(String string)
This function returns the character code value of the first character in a string.
Parameter 1: A string.
Returns:     The character code value of the first character in the string.

 

Thanks,

 

PH

Message 2 of 4
(7,410 Views)

Could you please share program VI which converts the ASCII value to character.

Actually I need to show "tick mark"in one of the cell of the table.

Would you please help me out.

0 Kudos
Message 3 of 4
(7,307 Views)

Labview:

How do you get a single char in Labview? I asume you have a string right?

Pallete: Programming->String->conversion->String to Byte array  (byte = ascii code)

 

If the string contains only one char (the first) then you look at the first element

 

Teststand:

numeric->val()

 

edit: sorry Ted overread your reply, probably Asc() works better.

0 Kudos
Message 4 of 4
(7,303 Views)