Communication processor and Modbus TCP
13.3 Point-to-point (PtP) communication
S7-1200 Programmable controller
1104 System Manual, V4.2, 09/2016, A5E02486680-AK
Specification of message length within the message
When you select the special condition where the message length is included in the message,
you must provide three parameters that define information about the message length.
The actual message structure varies according to the protocol in use. The three parameters
are as follows:
● n: the character position (1-based) within the message that starts the length specifier
● Length size: The number of bytes (one, two, or four) of the length specifier
● Length m: the number of characters following the length specifier that are not included in
the length count
The ending characters do not need to be contiguous. The "Length m" value can be used to
specify the length of a checksum field whose size is not included in the length field.
These fields appear in the Receive message configuration of the device properties:
Consider a message structured according to the following protocol:
Characters 3 to 14 counted by the length
Configure the receive message length parameters for this message as follows:
● n = 2 (The message length starts with byte 2.)
● Length size = 1 (The message length is defined in one byte.)
● Length m = 0 (There are no additional characters following the length specifier that are
not counted in the length count. Twelve characters follow the length specifier.)
In this example, the characters from 3 to 14 inclusive are the characters counted by Len (n).
Consider another message structured according to the following protocol:
Characters 5 to 10 counted by length