# CODESYS CONCAT

Instructions · `CONCAT` · verification: source checked

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'.

## Specification

| Property | Value |
|---|---|
| Language | structured text |
| Code | CONCAT |
| Group | String Functions |
| Syntax | CONCAT(STR1, STR2) |
| Dialect | CODESYS |

### Parameters

| Name | Data type | Description |
|---|---|---|
| STR1 | STRING(255) | String 1 to be concatenated, max. 255 characters. |
| STR2 | STRING(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.

## Sources

1. [Beckhoff Information System](https://infosys.beckhoff.com/content/1033/tcplclib_tc2_standard/74411019.html) (accessed 2026-10-26)
2. [CODESYS Group](https://content.helpme-codesys.com/en/libs/Standard/Current/String-Functions/CONCAT.html) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/iec-concat  
JSON: https://machineschema.com/instruction/iec-concat.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
