F_ToASC
This function converts STRING to ASCII Code. Only the first sign of the STRING will be converted. An empty STRING delivers a zero.
FUNCTION F_ToASC : BYTE
Inputs
VAR_INPUT
str : STRING;
END_VAR
Name | Type | Description |
---|---|---|
str | STRING | String to convert |
Sample of calling the function in FBD:
PROGRAM P_TEST
VAR
sCharacter : STRING(1) := '1';
cAsciiCode : BYTE := 0;
END_VAR
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) |