Attention

IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.

STRING

Single-byte character string with a maximum length.

Size

Variable (default max 254 characters)

Default

'' (empty string)

IEC 61131-3

Section 2.3.1

Support

Not yet supported

Literals

'Hello, world!'
'It''s escaped'
STRING#'typed literal'

The maximum length can be specified in the declaration:

VAR
    name : STRING[50];   (* max 50 characters *)
    msg  : STRING;       (* default max length *)
END_VAR

See Also

  • WSTRING — double-byte character string

  • LEN — string length

  • CONCAT — string concatenation