5 MODBUS RTU Protocol communication
CP340/CP341/CP440/CP441 Communication and Programming
Entry-ID: 88867653, V1.0, 02/2014
59
S
ie
m
e
n
s
A
G
2014
A
ll r
ig
h
ts
r
e
s
e
rv
e
d
Function
code
01
02
03
04
05
06
07
08
11
12
15
16
Length
(in bytes)
6
6
6
6
6
6
2
6
2
2
>6
>6
4. The instance data block of FB13 is DB13, and the receive data DB block DB2 is
created.
Fig. 106: Receive data block DB2
5. Invoke receive function block
Fig. 107: Invoke SFB13 in OB1
The "R_ID" in SFB13 must be set in consistence with the "R_ID" in SFB12 that is
invoked in pair in order to activate the receive information program, so it must be
set as DW#16#1 here. The information on Receive Data length may be seen in
MW20.