You are on page 1of 10

QUESTION:

How can I link up a CPU 315-2DP as DP slave to an S7-400?

ANSWER:
In this entry we will describe how to configure a CPU 315-2DP as slave to an S7-400 as DP master. For
data communication we will be using consistent and non-consistent data.
The sample project includes the following configuration:

Fig. 1: Master-slave connection

Configuring the DP slave:


1- Create a new project and add an S7-300 station.
2- Open the Hardware Configuration.
3- Add the rack, power supply and CPU315-2DP. Here you will be prompted to connect your CPU to a
bus network. Set the bus parameters.

Fig. 2: Hardware configuration of the DP slave


4- Switch to the Object Properties of the DP interface to set the CPU315-2DP to the DP slave
operating mode.
5- Define the input/output areas in the "Configuration" tab in the Object Properties. Press the "New"
button to create a new configuration row in which you specify the address type, I/O address and the
length, unit and consistency of the I/O data.

Note:
For implementing consistent data transfer you set "Over complete length" in the "Consistency" field. For this
you click in the field concerned and select from the dialog box that opens.
To emphasize the difference between consistent and non-consistent data we have configured different data
areas in this sample project (cf. Table 1 in the "Description of the sample project" section below).

Fig. 3: Configuration of the DP interface on the DP slave


6- Save and compile your project.
7- Load the configuration into the CPU315 - 2DP.

Configuring the master


1- Add an S7-400 station to your project.
2- Open the Hardware Configuration, add your rack, power supply and CPU and connect them to the
existing PROFIBUS network.
3- Drag-and-drop a CPU 31x station to the network from the hardware catalog under "PROFIBUS - DP
> Stations already configured" .

Fig. 4: Hardware configuration of the DP master


4- Link the CPU315 - 2DP station to the station already configured.

Fig. 5: "Link" dialog of the master-slave configuration


5- Define the input/output areas of the DP master by calling "Object Properties > Configuration" of the
DP slave in the master project.

Fig. 6: Calling the configuration of the DP slave in the master project

6- Specify for each row in the I/O configuration the address type and I/O address on the DP master
side.

Fig. 7: Completing the I/O configuration on the "DP partner: master" side
7- After completing the configuration dialog you can close it without any error messages occurring.

Fig. 8: Completed configuration of the data communication


8- Save and compile your project.
9- Load the configuration into the S7-400 CPU.

Description of the sample project:

The project has been created with STEP 7 V5.3 HF 1 and includes the configuration described above. Data
communication takes place in OB1 by accessing the configured inputs and outputs.
Length of data area
byte 1
bytes 2
bytes 5

Addresses
E0/A0
E1/A1

Read / write access


Load / Transfer
Word load / Word
transfer
SFC14 / SFC15

Consistency of data
Consistency over unit
Consistency over total
length
E3/A3
Consistency over total
length
Table 1: Data areas configured and access used in the program

In order to test communication from the DP master, the data sent from the DP master is diverted to the
outputs in the DP slave.

Important:
When transmitting consistent data of a length of 3 byte or greater than 4 byte, you must call system
function blocks SFC14 and SFC15 in OB1.

In order to ease commissioning, OB82 (diagnostic alarm) and OB86 (OB rack failure) were inserted.
Information on using OBs you find in manual "System Software for S7-300/400 System and Standard
Functions", Entry-ID 1214574
https://support.automation.siemens.com/WW/llisapi.dll?
func=cslib.csinfo&objId=1214574&objAction=csOpen&nodeid0=10805188&lang=en&siteid=cseus&aktprim
=0&extranet=standard&viewreg=WW
Note:
Distributed reading and writing of consistent data (> 4 bytes) is possible without system functions SFC14
and SFC15. With firmware version 3.0 of the CPU318-2DP and of the CPUs 41x the access to consistent
data area is also possible via the process image (e. g. with L EW...). Which block can be used for this

purpose, is described in Entry-ID 8751062. In tab "Addresses" of DP slaves of the HW Config you can
determine the consistency area of these blocks via fields "Length"," Unit" and "Consistency via". In field
"Partial Process Image 3" you can assign a partial process image ((e. g. TPA3) to the data.
https://support.automation.siemens.com/WW/llisapi.dll?
func=cslib.csinfo&objId=8751062&objAction=csOpen&nodeid0=10805188&lang=en&siteid=cseus&aktprim
=0&extranet=standard&viewreg=WW

Fig. 10: Properties DP Slave - Selection of TPA3 (Partial Process Image 3)

The operating system transfers consistently these data when updating the process image. With the
command of loading and transferring you can access these data in the process image. Alternatively, SFC
26 "UPDAT_PI" or SFC 27 "UPDAT_PO" can be used for updating the image at any point inside the
program. This TPA, however, must not be updated from the system. If you cannot put the data into a
process image, then used SFC14 and SFC15 for the data exchange.

You find further information in the subsequent entries:


"Consistent data access possible even without SFC14/15 as process image partition" - Entry-ID: 8751062
https://support.automation.siemens.com/WW/llisapi.dll?
func=cslib.csinfo&objId=8751062&objAction=csOpen&nodeid0=10805188&lang=en&siteid=cseus&aktprim
=0&extranet=standard&viewreg=WW

"Consistent data in S7-400, summary of mechanisms" - Entry-ID: 11646774

https://support.automation.siemens.com/WW/llisapi.dll?
func=cslib.csinfo&objId=11646774&objAction=csOpen&nodeid0=10805188&lang=en&siteid=cseus&aktpri
m=0&extranet=standard&viewreg=WW

"Use of Process Image Partitions in Organization Blocks" - Entry-ID: 18325216


https://support.automation.siemens.com/WW/llisapi.dll?
func=cslib.csinfo&objId=18325216&objAction=csOpen&nodeid0=10805188&lang=en&siteid=cseus&aktpri
m=0&extranet=standard&viewreg=WW
Copy file "s7400cpu315_02.exe" into a separate directory and start it with a double click. The project will
then be unpacked as well as all related subdirectory. Then you can open and edit the unpacked project with
the SIMATIC Manager.

Note
You can also use other S7 CPUs (S7-300/S7-400) as DP master or DP slave in addition to the
configuration described above.

Download:
The download contains a STEP 7 project with above described configuration and the test program.
https://support.automation.siemens.com/WW/llisapi.dll/csfetch/6518822/s7400cpu315_02.exe?
func=cslib.csFetch&nodeid=21918228

You might also like