Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation fundamentals, platforms and components

String (data type)

Also known as: STRING, WSTRING, Character string

German: String

In programming, a string is a data type that holds a sequence of characters. IEC 61131-3 defines STRING for single-byte characters and WSTRING for double-byte characters; the maximum length can be declared, and the default length is implementation-dependent.

  • Automation components

In one sentence

A string holds a sequence of characters; IEC 61131-3 defines STRING (single-byte) and WSTRING (double-byte) with declarable length.

Example

The batch ID from the MES is stored in a STRING[20] variable and printed on the label together with the production date.

How it applies

  • Engineering: Strings in PLCs carry batch IDs, recipe names, messages and barcode data. Declared maximum lengths truncate longer texts, and character encoding matters when exchanging with other systems.
  • Integration: When strings are exchanged via fieldbus, OPC UA or registers, both sides must agree on length, encoding and termination. Non-ASCII characters, such as umlauts, often break STRING-based interfaces.
  • Documentation: Interface specifications give maximum length and encoding for each string field. Translation teams need to know text length limits for HMI and message strings, because translated texts are often longer than the original.

STRING vs. WSTRING

STRING uses one byte per character and suits ASCII or a single-byte code page. WSTRING uses two bytes per character and is needed for many non-Latin scripts.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: IEC 61131-3:2013, Programmable controllers — Part 3: Programming languages

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!