WCHAR_TO_CHAR

WCHAR_TO_CHAR 1:

The function converts a variable of the data type WSTRING into a variable of the data type STRING (with null termination). The conversion is possible only if the WSTRING character corresponds to the STRING character. Otherwise no character is returned.

FUNCTION WCHAR_TO_CHAR : STRING(1)

VAR_INPUT

VAR_INPUT
    sTextIn : WSTRING(1);
END_VAR

sTextIn: WSTRING variable to be converted.

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.4022

PC or CX (x86, x64, ARM)

Tc2_Utilities (System) >= 3.3.21.0