STRING - Manual - SIMATIC S7 Connector - Industrial Edge - Industrial Edge App

SIMATIC S7 Connector

Product
SIMATIC S7 Connector
Product Version
v2.2.1
Edition
08/2024
Language
en-US (original)

An operand of the STRING data type saves several characters in a character string that can consist of up to 254 characters. In a character string, all characters of the codepage created on the system are permitted. The characters are specified in single quotation marks.

A character string can also contain special characters. The escape character $ is used to identify control characters, dollar signs, and single quotation marks.

NOTE

Different code pages
Please note that the special characters are coded using the code page currently set in Windows. This means that a string that contains special characters can be displayed differently on a different operating system with a different code page.

The dependency of the codepage on the created system makes an international use of the user program more difficult. Only the characters from the 7-bit ASCII coding are internationally valid.

The following table shows the properties of a STRING tag:

Length (bytes) Format Value range Examples of value input
n + 2 1) ASCII character string incl. special characters 0 to 254 characters
  • 'Name'
  • STRING#'NAME'
  • STRING#'Na... (The actual length of the string is longer than the space available on the screen.)
  • STRING#'' (The string is empty.)

1) An operand of the STRING data type occupies two bytes more than the specified maximum length in the memory.