105BCommunication processor
12.3 Point-to-Point (PtP) communication
S7-1200 Programmable controller
560
System Manual, 11/2011, A5E02486680-05
Example 1: Consider a message structured according to the following protocol:
Characters 3 to 14 counted by the length
STX
Len
(n)
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:
Characters 5 to 10 counted by length
SD1
Len (n) Len (n)
SD2
DA
SA
FA
Data unit=3 bytes
FCS
ED
1
2
3
4
5
6
7
8
9
10
11
12
xx
0x06
0x06
xx
xx
xx
xx
xx
xx
xx
xx
xx
Configure the receive message length parameters for this message as follows:
●
n = 3 (The message length starts at byte 3.)
●
Length size = 1 (The message length is defined in one byte.)
●
Length m = 3 (There are three characters following the length specifier that are not
counted in the length. In the protocol of this example, the characters SD2, FCS, and ED
are not counted in the length count. The other six characters are counted in the length
count; therefore the total number of characters following the length specifier is nine.)
In this example, the characters from 5 to 10 inclusive are the characters counted by Len (n).
12.3.4
Programming the PtP communications
STEP 7 provides extended instructions that enable the user program to perform Point-to-
Point communications with a protocol designed and specified in the user program. These
instructions can be considered in two categories:
●
Configuration instructions
●
Communication instructions