CONCAT - Concatenate two or more strings

Introduction

Returns the concatenation of two or more strings.

Informal Syntax:

CONCAT( In0, In1, ..., InX )

Formal Syntax:

CONCAT( In0:=expression, In1:=expression, ..., InX:=expression )

Parameters

ParameterTypeDescription
In0ANY_STRINGThe first string.
In1ANY_CHARSThe second string.
.........
InXANY_CHARSThe last input string.

The function is overloaded and accepts a range of types for the In0 to InX parameters:

Return value

The returned string is the result of adding together (concatenate) all of the input parameters In0 to InX.

The type of the return value is determined by the type of the first parameter In0. All other inputs are converted to the same type as In0.

Examples

ExampleReturn Value
CONCAT('Fernhill', ' Software')STRING#'Fernhill Software'
CONCAT("Fernhill", ' SCADA')WSTRING#"Fernhill SCADA"
CONCAT("Fill", WCHAR#'s')WSTRING#"Fills"
CONCAT('Value = ', '12', ' kg')STRING#'Value = 12 kg'

Standards Compliance

Table 29.5 - IEC 61131-3 Second Edition.

Table 34.5 - IEC 61131-3 Third Edition.

Note: The function allows different string types as parameters. The IEC 61131-3 Third Edition standard states this should be an error.

Further Information

String Functions

To learn about other String Functions.

Common Elements

To learn about other IEC 61131-3 Common Elements.

Glossary

For the meaning of terms used in Fernhill SCADA.