Learn PLCs free
String OperationsIntermediateIEC 61131-3

CONCAT (String Concatenation)

Joins two or more strings into a single combined string.

The CONCAT function joins two or more strings together into a single string. It is the primary string-building operation in IEC 61131-3, used for constructing display messages, log entries, communication frames, and formatted output. CONCAT appends the second string to the end of the first string and returns the combined result.

Parameters

Inputs

NameTypeDescription
IN1STRINGFirst string
IN2STRINGSecond string to append

Outputs

NameTypeDescription
OUTSTRINGConcatenated result (IN1 + IN2)

Structured Text Example

// Build alarm message
Alarm_Msg := CONCAT('ALARM: ', Alarm_Description);

// Build log entry with multiple parts
Log_Entry := CONCAT(CONCAT(Date_Str, ' - '), Event_Description);

// Build communication frame
Telegram := CONCAT(CONCAT(Header, Data_Payload), Checksum_Str);

20 Production-Ready Ladder Logic Templates

Stop writing the same rungs from scratch. Get copy-paste-ready templates for motor control, PID loops, safety interlocks, conveyors, and more.

Platform-Specific Implementation

S

Siemens (TIA Portal)

Use CONCAT instruction in TIA Portal. Max string length is 254 characters.

AB

Allen-Bradley (Studio 5000)

Use CONCAT instruction in Studio 5000. STRING data type max 82 characters default.

C

CODESYS

Use CONCAT() function in ST. String length depends on declaration.

Common Applications

  • Alarm message construction
  • Log entry formatting
  • Communication frame building
  • HMI display text
  • Report generation

Frequently Asked Questions

What is CONCAT (String Concatenation) in PLC programming?

Joins two or more strings into a single combined string. The CONCAT function joins two or more strings together into a single string. It is the primary string-building operation in IEC 61131-3, used for constructing display messages, log entries, communication frames, and formatted output.

What are common applications of CONCAT (String Concatenation)?

CONCAT (String Concatenation) is commonly used for: Alarm message construction, Log entry formatting, Communication frame building, HMI display text, Report generation.

How do I use CONCAT (String Concatenation) in different PLC platforms?

Siemens: Use CONCAT instruction in TIA Portal. Max string length is 254 characters. Allen-Bradley: Use CONCAT instruction in Studio 5000. STRING data type max 82 characters default. CODESYS: Use CONCAT() function in ST. String length depends on declaration.

Stop Writing Ladder Logic From Scratch

Get 20 production-ready ladder logic templates for $29 -- download instantly and use them on your next project today.

20
Ready-Made Templates
LD + ST
Both Languages Included
$29
One-Time Purchase
Get Instant Access -- $29

Instant download - 30-day money-back guarantee - Use on unlimited projects

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →