F_ToCHR

F_ToCHR 1:

The function converts ASCII Code to STRING.

FUNCTION F_ToCHR: STRING

VAR_INPUT
    c : BYTE;
END_VAR

c: ASCII-Code to be converted

Example for a call in FBD:

PROGRAM P_TEST
VAR
    sCharacter : STRING(1) := '';
    cAsciiCode : BYTE := 16#31;
END_VAR

F_ToCHR 2:

Requirements

Development environment

Target system type

PLC libraries to include (Category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_System (System)