F_ToCHR
The function converts ASCII Code to STRING.
FUNCTION F_ToCHR: STRING
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

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