<img alt="" src="https://secure.intelligent-consortium.com/820374.png" style="display:none;">
Skip to content
  • There are no suggestions because the search field is empty.

How do I address Siemens S7 string tags in TOP Server using the Siemens TCP/IP Ethernet driver?

Raw String Addressing
For a raw string in a Siemens S7 data block, use the DB number, byte data type, starting byte offset, and string length in the TOP Server tag address. Then set the tag Data Type to String.

Raw string address format:

DBx,By.z
Where:
- DBx = Siemens data block number
- B = Byte data type
- y = Starting byte offset inside the data block
- .z = Number of bytes/characters to read

Example:
DB12,B100.16

In this example, TOP Server reads a raw string beginning at byte offset 100 in DB12 with a maximum length of 16 bytes. Raw string values are stored starting directly at byte offset y.

Raw strings are null-terminated. If a shorter string is written than the configured maximum length, the next character is set to NULL.

Do not use a second comma to specify the string length. The string length should be appended to the address with a period:

Correct:
DBx,By.z

Incorrect:
DBx,By,z

STEP 7 String Addressing
A native Siemens STEP 7 STRING[n] is stored with a 2-byte header before the character data:

- Byte y = maximum string length
- Byte y+1 = current string length
- Byte y+2 onward = character data

String length limits depend on the string type and negotiated PDU size. Raw strings can support larger lengths than native STEP 7 strings, but the total bytes requested cannot exceed the negotiated PDU data size.