F_ToCHR

F_ToCHR 1:

The function converts ASCII Code to STRING.

FUNCTION F_ToCHR: STRING

F_ToCHR 2: Inputs

VAR_INPUT
    c : BYTE;
END_VAR

Name

Type

Description

c

BYTE

ASCII code to be converted

Sample of calling the function in FBD:

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

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)