CONCAT2

CONCAT2 1:

The function concatenates two strings of the data type STRING of any length and checks whether the resulting string is longer than a specified output string. In this case the string is truncated.

The function returns:

The function stops the checking of the input length after Parameterlist.cMaxCharacters characters in order to avoid an infinite loop.

CONCAT2 2: Return value

Name

Type

Description

CONCAT2

BOOL

Concatenates two strings of any length of data type STRING and checks whether the resulting string is longer than a specified output string.

CONCAT2 3: Inputs

VAR_INPUT
    pSrcString1 : POINTER TO STRING;
    pSrcString2 : POINTER TO STRING;
    pDstString  : POINTER TO STRING;
    nDstSize    : UDINT;
END_VAR

Name

Type

Description

pSrcString1

POINTER TO STRING

Pointer to the first of the STRING variables to be concatenated (input string)

pSrcString2

POINTER TO STRING

Pointer to the second of the STRING variables to be concatenated (input string)

pDstString

POINTER TO STRING

Pointer to the resulting STRING variable following the concatenation (output string)

nDstSize

UDINT

Size of the resulting STRING variable (output string) in bytes. The operator SIZEOF() 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