CODESYS CONCAT

CONCAT is a function in the CODESYS Standard library that joins two strings into one. It takes two STRING(255) inputs, STR1 and STR2, and returns a single STRING(255) containing STR1 immediately followed by STR2. In the documented example, CONCAT('SUSI','WILLI') returns 'SUSIWILLI'.

Source checked9/9 values · 2026-10-26

Specification

2 sources
Languagestructured text
CodeCONCAT
GroupString Functions
SyntaxCONCAT(STR1, STR2)
DialectCODESYS

Parameters

NameData typeDescription
STR1STRING(255)String 1 to be concatenated, max. 255 characters.
STR2STRING(255)String 2 to be concatenated, max. 255 characters.

Study notes

  • Declared as FUNCTION CONCAT : STRING(255).
  • Return value is limited to 255 characters; if the result does not fit into 255 bytes it is silently truncated and no error is produced.
  • Both inputs STR1 and STR2 are of type STRING(255).
  • Example in ST: VarSTRING1 := CONCAT('SUSI','WILLI'); gives the result 'SUSIWILLI'.
  • The document shows an InOut section with no entries.
↑↓ navigate↵ openesc close