ASC

The function Asc returns the ASCII code of the first character of the input sting as one byte.
Interface
FUNCTION ASC : BYTE
VAR_INPUT
str : STRING;
END_VARBackground:
Send data is often available as a string of characters. If it is to be sent, the individual characters are required as bytes.
Requirements
Development environment | Target platform | PLC libraries to include |
|---|---|---|
TwinCAT v3.1.4012 | PC or CX (x86, x64, Arm®) | Tc2_SerialCom |