ASCII
Gives the ASCII code of one character in a message string.

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 *)

(* ST Equivalence: *)
FirstChr := ASCII (message_input, 1); (* FirstChr is the ASCII code of the first character of the string *)
Provide Feedback