WSTRNCPY

WSTRNCPY 1:

The function copies the string of a variable of the data type WSTRING and checks whether the string was completely copied.

The function returns

FUNCTION WSTRNCPY : BOOL

WSTRNCPY 2: Inputs

VAR_INPUT
    pDst     : POINTER TO WSTRING;
    pSrc     : POINTER TO WSTRING;
    nDstSize : UDINT;
END_VAR

Name

Type

Description

pDst

POINTER TO WSTRING

Pointer to the copied WSTRING variable (input string)

pSrc

POINTER TO WSTRING

Pointer to the WSTRING variable to be copied (output string)

nDstSize

UDINT

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

WSTRNCPY 3: Outputs

VAR_OUTPUT
    nSrcLen  : UDINT;
    nDstLen  : UDINT;
END_VAR

Name

Type

Description

nSrcLen

UDINT

Length of the specified WSTRING variables to be copied

nDstLen

UDINT

Length of the copied WSTRING variables

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