ASCII

Gives the ASCII code of one character in a message string.
lrsf_as1
Arguments
IN
IN
MESSAGE
Any non-empty string
Pos
Pos
DINT
Position of the selected character in set [1.. len] (len is the length of the IN message)
ASCII
Code
DINT
Code of the selected character (in set [0 .. 255])
returns 0 is Pos is out of the string
Example
(* FBD Program using "ASCII" Function *)
lrsf_as2
(* ST Equivalence: *)
FirstChr := ASCII (message_input, 1); (* FirstChr is the ASCII code of the first character of the string *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal