Siemens Simatic S7-300 CPU 31xC Series Installation And Operating Instructions Manual page 155

Hide thumbs Also See for Simatic S7-300 CPU 31xC Series:
Table of Contents

Advertisement

Sample program
Below you will see a small sample program for data exchange between DP master and DP
slave. The addresses used in the example are found in the table above.
In the DP slave CPU
L
2
//Data preparation in DP slave
T
MB
6
L
IB
0
T
MB
7
L
MW
6
// Forward data to DP master
T
PQW
310
CALL
SFC
14
LADDR:=W#16#D
RET_VAL:=MW 20
RECORD:=P#M30.0 byte 20
L
MB
30
L
MB
7
+
I
T
MW
100
S7-300, CPU 31xC and CPU 31x: Installation
Operating Instructions, Edition 08/2004, A5E00105492-05
//Receive data from
//DP master
//Received
data//continue
processing
8.5 Commissioning PROFIBUS DP
In the DP master CPU
L
PIB
222
T
MB
50
L
PIB
223
L
B#16#3
+
I
T
MB
51
L
10
+
3
T
MB
60
CALL
SFC
15
LADDR:= W#16#0
RECORD:= P#M60.0 Byte 20
RET_VAL:=MW 22
Commissioning
//continued processing
of//received data in DP
master
//Data preparation in DP
master
//Send data to
//DP slave
8-31

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-300 cpu 312cSimatic s7-300 cpu 313c-2 dpSimatic s7-300 cpu 314c-2 ptpSimatic s7-300 cpu 314c-2 dpSimatic s7-300 cpu 312Simatic s7-300 cpu 31 series ... Show all

Table of Contents