EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 1104

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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:
Example 1:
Consider a message structured according to the following protocol:
STX
Len
(n)
Characters 3 to 14 counted by the length
ADR
PKE
INDEX
PWD
STW
HSW
BCC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
STX
0x0C
xx
xxxx
xxxx
xxxx
xxxx
xxxx
xx
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).
Example 2:
Consider another message structured according to the following protocol:
SD1
Len (n)
Len (n)
SD2
Characters 5 to 10 counted by length
FCS
ED
DA
SA
FA
Data unit=3 bytes
1
2
3
4
5
6
7
8
9
10
11
12
xx
0x06
0x06
xx
xx
xx
xx
xx
xx
xx
xx
xx

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals