STRING_TO_WSTRING2

STRING_TO_WSTRING2 1:

The function converts a variable of the data type STRING into a variable of the data type WSTRING and checks whether the input string is longer than the output string. In this case the string is truncated.

The function returns

The function stops the conversion after Parameterlist.cMaxCharacters characters in order to avoid an infinite loop.

FUNCTION STRING_TO_WSTRING2 : BOOL

STRING_TO_WSTRING2 2: Inputs

VAR_INPUT
    pDstWSTRING : POINTER TO WSTRING;
    pSrcSTRING  : POINTER TO STRING;
    nDstSize    : UDINT;
END_VAR

Name

Type

Description

pDstWSTRING

POINTER TO WSTRING

Pointer to the converted WSTRING variable (output string)

pSrcSTRING

POINTER TO STRING

Pointer to the STRING variable to be converted (input string)

nDstSize

UDINT

Size of the resulting WSTRING variable (output string) in bytes. The SIZEOF() operator can be used for the assignment.

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