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:

Prerequisites

Development Environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, Arm®)

Tc2_System (system)