DP link between CPU 315-2DP (slave) and S7-400 (master) with STEP 7 V5
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 nonconsistent 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.