Professional Documents
Culture Documents
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:
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).
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.
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
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
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.
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
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