11
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.

Communication

Embed Size (px)

Citation preview

Page 1: Communication

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.

Page 2: Communication

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).

Page 3: Communication

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" .

Page 4: Communication

Fig. 4: Hardware configuration of the DP master

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

Page 5: Communication

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

Page 6: Communication

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.

Page 7: Communication

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 Addresses Read / write access Consistency of data1 byte E0/A0 Load / Transfer Consistency over unit2 bytes E1/A1 Word load / Word transfer Consistency over total

length5 bytes E3/A3 SFC14 / SFC15 Consistency over total

lengthTable 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:

Page 8: Communication

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:

Page 9: Communication

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

Page 10: Communication

"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&aktprim=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&aktprim=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