EasyManuals Logo

Siemens Simatic S7-300 CPU 31xC Series User Manual

Siemens Simatic S7-300 CPU 31xC Series
272 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
Page #155 background imageLoading...
Page #155 background image
Commissioning
8.5 Commissioning PROFIBUS DP
S7-300, CPU 31xC and CPU 31x: Installation
Operating Instructions, Edition 08/2004, A5E00105492-05
8-31
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 In the DP master CPU
L 2
T MB 6
L IB 0
//Data preparation in DP slave
T MB 7
L MW 6
T PQW 310
// Forward data to DP master
L PIB 222
T MB 50
L PIB 223
//continued processing
of//received data in DP
master
L B#16#3
+ I
T MB 51
L 10 //Data preparation in DP
master
+ 3
T MB 60
CALL SFC 15 //Send data to
//DP slave
LADDR:= W#16#0
RECORD:= P#M60.0 Byte 20
RET_VAL:=MW 22
CALL SFC 14
LADDR:=W#16#D
//Receive data from
//DP master
RET_VAL:=MW 20
RECORD:=P#M30.0 byte 20
L MB 30
L MB 7
+ I
//Received
data//continue
processing
T MW 100

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7-300 CPU 31xC Series and is the answer not in the manual?

Siemens Simatic S7-300 CPU 31xC Series Specifications

General IconGeneral
SeriesS7-300 CPU 31xC
Power Supply24 V DC
Communication InterfacesMPI, PROFIBUS DP
Programming LanguagesLAD, STL, FBD, SCL
Operating Temperature0°C to +60°C
Memory48 KB - 512 KB
Dimensions40 x 125 x 130 mm (varies by model)

Related product manuals