show the entry list

S7-300 CPU 31x -- Configuring and programming communication -- Configuring the PROFIBUS interface 
How do you activate the "Prioritized OCM communication" function to improve the OP communication performance? 
How do you configure a connection between WinCC flexible Runtime (PC/Panel) and a SIMATIC S7-300/S7400 via PROFIBUS/MPI? 
Where can you find sample S7 programs and documentation for communication via PROFIBUS in the SIMATIC NET Quick Start Collection? 
What differences are there when configuring S7 connections? 
Transfer of analog values from and to the PROFIBUS DP slave 
What should you pay attention to when operating a DP slave temporarily on a PROFIBUS DP network? 
How do you configure an S7 connection via MPI with the SIMATIC NET OPC server and the SIMATIC NET PC software? 
How do you configure a PC station as DP slave for connecting an S7 station (as DP master) for the SIMATIC NET OPC server with the SIMATIC NET PC software? 
What are the differences between the integrated DP interface of a CPU (e.g. CPU 315-2 DP) and the DP interface of the CP 342-5? 
How do you read data consistently from a DP standard slave/PROFINET IO device and write it consistently to a DP standard slave/PROFINET IO device? 
What are the options for exchanging data between CPUs via MPI/PROFIBUS DP? 
Direct data exchange (internode communication) between two CPU modules 
S7 routing via PROFIBUS with S7-300 
Rules for accessing the CPU 315-2 DP on distributed I/O (integrated DP interface of CPU 315-2 DP) 
Startup of the S7-300 CPUs when slave is not available 
Routing with compact CPU and C7-635 as DP slave 
How can you tell whether your S7-300/400 master supports DPV1 functions? 

How do you activate the "Prioritized OCM communication" function to improve the OP communication performance?Go to beginning
Part number:

Description
With OP communication you exchange data between operator stations, for example Operator Panel (OP), Touch Panel (TP) or WinCC, and SIMATIC modules with communications capability. The service is possible by way of MPI, PROFIBUS and Industrial Ethernet subnetworks.

With OP communication we provide you with functions that you need for operator control and monitoring. These functions are integrated in the operating system of the SIMATIC S7 modules. A CPU maintain multiple connections to one or various different operator stations.

When you activate the "Prioritized OCM communication" function you can significantly accelerate the OP communication.

The CPUs below support the "Prioritized OCM communication" function.
 
CPU Order number Firmware
CPU315-2 PN/DP 6ES7315-2EH14-0AB0 from V3.2
CPU315F-2 PN/DP 6ES7315-2FJ14-0AB0 from V3.2
CPU317-2 PN/DP 6ES7317-2EK14-0AB0 from V3.2
CPU317F-2 PN/DP 6ES7317-2FK14-0AB0 from V3.2
CPU319-3 PN/DP 6ES7318-3EL01-0AB0 from V3.2
CPU319F-3 PN/DP 6ES7318-3FL01-0AB0 from V3.2

You activate the "Prioritized OCM communication" function for the CPUs above in the Hardware Configuration.
In the Hardware Configuration you double-click the configured CPU to open the Properties dialog. Go to the "Cycle/Clock Memory" tab and activate the "Prioritized OCM communication" function.


Fig. 01

Note

  • The consistency of the data to the user program is no longer guaranteed. The consistency must be provided by the user program.
  • The cycle time increases.

Data consistency with the PUT/GET functions

  • When you activate the "Prioritized OCM communication" function, the specified data consistency is no longer guaranteed, because the communication tags in blocks of up to 240 bytes are not copied consistently to and from the user memory in the cycle control point of the operating system. The communication tags are copied to and from the user memory during the runtime of the user program. The consistency must be provided by the user program.
    The following continue to be consistent:
    • Byte / Word / Double-word access
    • SFC14 "DPRD_DAT"
    • SFC15 "DPWR_DAT"
    • SFC81 "UBLKMOV"
  • If a defined data consistency is required, then the communication tags in the user program of the CPUs must not be greater than 240 bytes.

Further Information
The manual "SIMATIC S7-300 CPU 31xC and CPU 31x: Technical Data", sections 3.2.3 and 3.2.11 provide information about the "Prioritized OCM communication" function. The manual is available for downloading in Entry ID: 12996906.

How do you configure a connection between WinCC flexible Runtime (PC/Panel) and a SIMATIC S7-300/S7400 via PROFIBUS/MPI?Go to beginning
Part number:

Contents
The procedure is given in the attached PDF document with the following contents.

1 Introduction
2 Preliminary Considerations
   2.1 When should you use an HMI station and when a PC station?
   2.2 Which PROFIBUS CP should you select?
3 Connecting a Panel via PROFIBUS
   3.1 Requirements
   3.2 ‪‪Configuration in STEP 7 and WinCC flexible as well as on the panel
4 Connecting WinCC flexible Runtime to SIMATIC S7-300/400 Without
   Station Configuration Editor
   4.1 Requirements
   4.2 Connecting an HMI station
   4.3 Connecting a PC station
5 Connecting a WinCC flexible Runtime to SIMATIC S7-300/400 With
   Station Configuration Editor
   5.1 Requirements
   5.2 Connecting an HMI station
   5.3 Connecting a PC station

WinCC_flexible_Kommunikation_Profibus_V10_e.pdf ( 1168 KB )

Keywords
300 series, 400 series, Connection, Connect, Operator panel, Display, Communication, Drivers, Controller, PLC, MPI/DP interface, IF1B MPI/DP, Baud rate, Address, Only master on the bus, Controller connection

Where can you find sample S7 programs and documentation for communication via PROFIBUS in the SIMATIC NET Quick Start Collection?Go to beginning
Part number:

Description:
The SIMATIC NET Quick Start Collection provides simple sample programs designed to help when starting to configure plants with SIMATIC NET products.

The following links take you to the SIMATIC NET Quick Start Collection. There you will find sample programs and documentation for communication via PROFIBUS using the following protocols:

Here you will find sample S7 programs and documentation for the following SIMATIC NET products:

  • PROFIBUS CPs for S7-300, S7-400 and S7-200
  • PROFIBUS PC CPs, e.g. CP5611, CP5613
  • Gateway, e.g. DP/AS Interface Link

Keywords:
S7 communication, Send/Receive, DP Master, DP Slave, Connection configuration, FDL

What differences are there when configuring S7 connections?Go to beginning
Part number:

Description:
In this description of how to configure S7 connections it is assumed that all the stations are in one S7 project.

Types of S7 connections:
With S7 connections you differentiate between bilaterally configured and unilaterally configured S7 connections.

Bilaterally configured S7 connections
You recognize bilaterally configured connections by the fact that they receive a connection ID at both endpoints. The partner ID can be identical for both connection partners, but doesn't have to be. The remote endpoint of the S7 connection created is entered automatically in the connection table on the partner side.
You can use the following communication blocks in the S7-300 or S7-400 station for data communication via bilaterally configured S7 connections:

  • FB/SFB14 "GET" and FB/SFB15 "PUT"
  • FB/SFB12 "BSEND" and FB/SFB13 "BRCV" or
  • FB/SFB8 "USEND" and FB/SFB9 "URCV"

Unilaterally configured S7 connections
Unilaterally configured S7 connections are configured on the module that actively sets up the S7 connection.
You can use the communication blocks FB/SFB14 "GET" and FB/SFB15 "PUT" in the S7-300 or S7-400 station for data communication via unilaterally configured S7 connections. You can use these for data communication via unilaterally and bilaterally configured S7 connections. You can only use the communication blocks FB/SFB12 "BSEND" and FB/SFB13 "BRCV" and FB/SFB8 "USEND" and FB/SFB9 "URCV" for data communication via bilaterally configured S7 connections.

More information on the properties and special features of the S7 protocol and on the properties of the different S7 protocol services is available in Entry ID: 26483647.

In NetPro there is a connection table with all the configured communication connections. Unilaterally configured S7 connections have no entry in the "Partner ID" column of the connection table. This field remains empty in the connection table. No S7 connection is configured on the server and no communication blocks are called. The server is managed independently by the CPU's operating system and has resource 0x03. No system data is created for this in the connection partner.


Fig. 1: Bilaterally and unilaterally configured S7 connection

Summary:

  • All S7 connections that have a connection ID at both connection endpoints are bilaterally configured S7 connections.

  • S7 connections that have no partner ID are unilaterally configured S7 connections or have been created via "unspecified" S7 connections with resource 0x03.

Important:

  • With bilaterally configured S7 connections you must load the configuration in both connection partners after creating the S7 connection.
  • With unilaterally configured S7 connections you must load only the one station in whose connection table the S7 connection is shown.

Note:
In the sample S7 connection configuration given above all the stations are in one S7 project. You can also set up an S7 connection to an unspecified partner and the endpoints of these connections can be in different projects. More information on this is available in the Online Help of STEP 7:

  • Configuring cross-project connections.
  • Connection types for partners in other projects.
  • Creating cross-project subnetworks.

Keywords:
Connection configuration, S7-300, S7-400, SIMATIC, Connections, Creating a connection, Client, Server, Connection setup, NetPro

Transfer of analog values from and to the PROFIBUS DP slaveGo to beginning
Part number:

QUESTION:
The analog values are transferred only in part or not at all. How can I clear this problem?

ANSWER:
If none or only part of the analog values are transferred, or the transferred values are incorrect, then this might have something to do with the length of the consistent data of the slave (affects S7-300/400 CPUs).
If more than 4 bytes (or exactly 3 bytes) are consistent over the entire length, then you must access the analog values of the slave with the SFCs 14 "DPRD_DAT" and 15 "DPWR_DAT". A description of the SFCs is given in the manual "System Software for S7-300/400 System and Standard Functions". The information on consistent data lengths of the PROFIBUS DP slave are given in the HW Config.
Procedure:

  1. In the HW Config you mark the PROFIBUS slave.

  1. Double-click the module from which you want to know which consistent areas it has. In the "Address/ID" tab of the "Properties - DP slave" window you can see the length over which the data is consistent.

What should you pay attention to when operating a DP slave temporarily on a PROFIBUS DP network?Go to beginning
Part number:

Configuration notes:
Proceed as follows if you want to operate a DP slave temporarily on a PROFIBUS DP network or want to implement this DP slave flexibly at different points of a DP master system.

  • Configure the slave as usual in the STEP 7 Hardware Configuration.
  • When disabling, it is irrelevant whether the DP slave is connected to the PROFIBUS during the job or is not on the bus.
  • If you wish to disconnect the slave, then you disable it by calling the system function SFC12 "D_ACT_DP".
    Note:

    A sample program for enabling and disabling DP slaves is available in Entry ID: 5608020.
  • Reconnect the slave and enable it again via the system function SFC12 "D_ACT_DP".

Important:

  • If the DP slave is at the end of the line, refer to the appropriate information in Entry ID: 2157453.

How do you configure an S7 connection via MPI with the SIMATIC NET OPC server and the SIMATIC NET PC software?Go to beginning
Part number:

Instructions:
In this example, a CP5611 is used for the S7 communication via the SIMATIC NET OPC server to an S7 controller on the MPI bus.

Note:
The procedure described here also applies for communication processors CP5613, CP5511 and CP5512.

General information:
The requirement is that one of the two following configuration tools is installed.

  • NCM PC: 
    NCM PC is supplied with the SIMATIC NET CD and permits you to create PC projects and open STEP 7 projects. It is not possible to use this software to edit the S7 blocks in the STEP 7 project.
  • STEP 7:
    STEP 7 is a separate software package and permits you to create S7-400, S7-300 and PC projects. It is possible to use this software to edit the S7 blocks.

Only one of these configuration tools can be installed.

Please follow the instructions below for configuring the PC station.

Guide_S7_MPI_e.pdf ( 1741 KB )

Keywords: 
OPC server, S7 connection, MPI, Guideline, Instructions, SOFTNET S7, S7-5613, Set up connection, SIMATIC NET PC software

How do you configure a PC station as DP slave for connecting an S7 station (as DP master) for the SIMATIC NET OPC server with the SIMATIC NET PC software?Go to beginning
Part number:

Instructions:
In this example, a CP5611 is used for the communication via the OPC server as DP slave with an S7 station as DP master on the PROFIBUS.

Note:
The procedure described here also applies for communication processors CP5511, CP5512 and CP5621.

General information:
You can choose between two different configuration tools:

  • NCM PC:
    NCM PC is supplied with the SIMATIC NET CD and permits you to create PC projects and open STEP 7 projects. However, it is not possible to use this software to edit the S7 blocks in the STEP 7 project. 
  • STEP 7:
    STEP 7 is a separate software package and permits you to create S7-400, S7-300 and PC projects. It is possible to use this software to edit the S7 blocks.
The requirement is that STEP 7 is installed and that the DP master is already configured (for example, STEP 7 project with the configuration of an S7 station). If the DP master is also a PC station, then the configuration of the PC station as DP slave can also be made with NCM PC.

Please follow the instructions below for configuring the PC station.

Guide_DPSlave_e.pdf ( 1366 KB )

More information on using and configuring a PC station as DP slave or DP master is available in the applications listed below:
 
Title of application Entry ID
Distributed Automation with the PC - The SIMATIC NET OPC Server as PROFIBUS DP Slave 21040390
Controlling with the PC - The SIMATIC NET OPC Inproc Server as DP Master 21045282

Keywords:
DP-Slave, CP5611, CP5511, CP5512, CP5621, Hardware Configuration, SIMATIC NET PC software, Configuration, Guidelines, SOFTNET DP slave, Link DP slave, PC station.

What are the differences between the integrated DP interface of a CPU (e.g. CPU 315-2 DP) and the DP interface of the CP 342-5?Go to beginning
Part number:

Configuration Notes:
The fundamental differences between the integrated DP interface of a CPU and the DP interface of the CP 342-5 are shown in the tables below.
 

Configured as

CP 342-5

CPU 315-2

DP master

In more recent releases of the CP 342-5/CP342-5 FO (6GK7 342-5DA01-0XE0, 6GK7 342-5DA02-0XE0 or
6GK7 342-5F00-0XE0), you can select the DP slaves directly from the standard catalog.

The CP342-5
(6GK7 342-5DA00-0XE0) only supports standard slaves. Consequently, you can only use the slaves that are contained in the HW Catalog under "PROFIBUS-DP > CP 342-5 as DP-Master" or "PROFIBUS-DP > DP V0-Slaves". Whenever GSD files are used, please bear in mind that you can only use DP standard slaves here, too.

You can select all the DP slaves directly from the standard catalog.

DP slave

The I/O modules are configured via universal modules which are then adapted in accordance with the slave's actual I/O data.

Table 1: Differences in configuration

 

CP 342-5

CPU 315-2

Data transfer between the CPU and the CP takes place via special block calls (FC1 "DP_SEND" and FC2 "DP_RECV"). The user is free to select the source or target areas of the data being received or sent. You can use a data block, the bit memory address area or the I/O area for this.

As the I/O area cannot be accessed directly, the I/O addresses may occur repeatedly if there is more than one CP in use.

You can find a description of these blocks in the "SIMATIC NET NCM S7 for PROFIBUS" manual under Entry ID: 1158693.

As in centrally plugged-in modules, the DP slave data is located in the CPU's I/O area. This data can be accessed directly via load and transfer commands, such as "U E 1.0".

Table 2: Programming the data transfer

The volume of project data supported by the modules is release-dependent.
Various modules are compared in the table below:
 

DP master interface

Max. number of DP slaves

I/O area as a ...

DP master

DP slave

CPU 315-2DP
(6ES7 315-2AF03-0AB0)

64

1 KB

244 bytes

CPU 316-2DP
(6ES7 316-2AG00-0BA0)

125

2 KB

244 bytes

CPU 318-2DP
(6ES7 318-2AJ00-0AB0)

125

8 KB

244 bytes

CP 342-5
(6GK7 342-5DA00-0XE0)

124

240 bytes

86 bytes

CP 342-5
(6GK7 342-5DA02-0XE0)

124

2160 bytes

240 bytes

Table 3: Differences in the volume of project data

 

CP 342-5

CPU 315-2

The entire data area (up to 2160 bytes) can be regarded as consistent if the following procedure is followed:

  • The received data can only be analyzed if the block signals that new data has been received error-free.
  • The data being sent is left unchanged until the block reports that the data has been transmitted error-free.

If the procedure differs, this results in a data consistency of 32 bytes.

SFC calls (SFC14/15) have to be used in order to transmit consistent data measuring 3 or 4 bytes in length. SFC14 "DPRD_DAT" is used to read and SFC15 "DPWR_DAT" is used to write consistent data.

The maximum number of pieces of consistent data is dependent on the CPU used. You can find these details in the "CPU Data" manuals.

Table 4: Differences in consistent data

 

CP 342-5

CPU 315-2

CPs 342-5 (from 6GK7 342-5DA02-0XE0) or CPs 342-FO (6GK 342-5DF00-0XE0) support baud rates of up to 12 MB.

Exception:
CP 342-FO supports neither 3 nor 6 MB.

Previous releases of CPs
(6GK7 342-5DA00-0XE0 or
6GK7 342-5DA01-0XE0) only support baud rates of up to 1.5 MB.

The integrated interfaces of the CPU support baud rates of up to 12 MB.

Table 5: Differences in the supported baud rate

You can find further information about this topic in the following Entry IDs:
 
Topic: Entry ID:
Frequent user errors when using the CP 342-5 as DP master 18208090
Version of the function blocks needed to operate a CP 342-5? 187699
What should you watch out for when upgrading the CP 342-5 or fitting spare parts? 7806643
CP342-5 manual 8773570
Manual "SIMATIC NET NCM S7 for PROFIBUS", chapter 4 "DP Master Mode" 1158693

How do you read data consistently from a DP standard slave/PROFINET IO device and write it consistently to a DP standard slave/PROFINET IO device?Go to beginning
Part number:

Description

SFC14 "DPRD_DAT"
Using the system function SFC 14 "DPRD_DAT" (read consistent data of a DP standard slave) you read out the data of a DP standard slave/PROFINET IO device. If no errors occurred during the data transfer, the data read is entered into the target area set up by RECORD. The target area must have the same length as you configured with STEP 7 for the selected module. With a DP standard slave with modular structure and with multiple DP identifications, with an SFC 14 call you can only ever access the data of one module / DP identification under the start address configured.

SFC15 "DPWR_DAT"
Using the system function SFC 15 "DPWR_DAT" (write consistent data to a DP standard slave) you transfer the data in RECORD consistently to the addressed DP standard slave/PROFINET IO device. The source area must have the same length as you configured with STEP 7 for the selected module.
With a DP standard slave with modular structure you can only access one module of the DP slave.

Maximum length and addressing of consistent user data areas on the PROFIBUS DP
In the manuals listed below you will find more information about the maximum length and addressing of consistent user data areas on the PROFIBUS DP.
 
Manual Chapter / Section Entry ID
SIMATIC S7-300 CPU 31xC and CPU 31x: Configure Addressing 13008499
SIMATIC Distributed IO ET 200S Interface Module IM151-7 CPU Addressing 56046285
SIMATIC Distributed IO ET 200S Interface Module IM151-8 PN/DP CPU Addressing 47409312
SIMATIC ET 200pro Interface Module IM 154-8 PN/DP CPU Addressing 44251850
SIMATIC Basic Module BM 147/CPU Addressing 1142364
Automation System SIMATIC S7-400 CPU Specifications Consistent Data 53385241
Table 01

Maximum length and addressing of consistent user data areas on the PROFIBUS IO
In the manuals listed below you will find more information about the maximum length and addressing of consistent user data areas on the PROFIBUS IO.
 
Manual Chapter / Section Entry ID
SIMATIC S7-300 CPU 31xC and CPU 31x: Configure Addressing 13008499
SIMATIC Distributed IO ET 200S Interface Module IM151-8 PN/DP CPU Addressing 47409312
SIMATIC ET 200pro Interface Module IM 154-8 PN/DP CPU Addressing 44251850
Automation System SIMATIC S7-400 CPU Specifications Consistent Data 53385241
Table 02

For communication processors (CPs) the size of the consistent area for a submodule is defined as follows.
 
CP MLFB Upper limit
CP 443-1 6GK7443-1EX20-0XE0 240 bytes
CP 443-1 6GK7443-1EX30-0XE0 240 bytes
CP 443-1 Advanced 6GK7443-1EX40-0XE0 128 bytes
CP 443-1 Advanced 6GK7443-1EX41-0XE0 240 bytes
CP 443-1 Advanced 6GK7443-1GX20-0XE0 240 bytes
CP 443-1 Advanced 6GK7443-1GX30-0XE0 240 bytes
CP 343-1 6GK7343-1EX21-0XE0 128 bytes
CP 343-1 6GK7343-1EX30-0XE0 240 bytes
CP 343-1 Advanced 6GK7343-1GX21-0XE0 128 bytes
CP 343-1 Advanced 6GK7343-1GX30-0XE0 240 bytes
CP 343-1 Advanced 6GK7343-1GX31-0XE0 240 bytes
Table 03

Notes
The PROFIBUS DP standard defines upper limits for the transfer of consistent user data. Current DP standard slaves keep to these upper limits. Older CPUs (<1999) have CPU-specific restrictions for the transfer of consistent user data.
The maximum length of data that these CPUs can read consistently from a DP standard slave or write consistently to a DP standard slave is given in the technical data under "DP master – user data per DP slave". With the value, more recent CPUs exceed the length of the data that a DP standard slave provides or receives.

Important
Distributed reading and writing of consistent data (<4 bytes) is also possible without system functions SFC14 and SFC15. Which modules you can use for this is described in Entry ID 8751062.

The table below shows the access to consistent data outside the process image.
 
Length of data area Read/write access Consistency of data
1 byte Load / Transfer Consistency over unit
2 bytes Word Load / Word Transfer Consistency over total length
3 bytes SFC14 / SFC15 Consistency over total length
4 bytes Double-word Load / Double-word Transfer Consistency over total length
5 bytes SFC14 / SFC15 Consistency over total length
Table 04

Example
In the example below an S7-400 CPU is used as DP master and a CP342-5 as DP slave.

The consistency area below is defined for the inputs and outputs of the DP slave:

  • For the outputs, 50 bytes are transferred consistently over the total length. These 50 bytes are available consistently in the process image partition 3 (PIP 3) of the S7-400 CPU and can therefore be read using load/transfer commands.
  • For the inputs, 20 bytes are transferred consistently over the total length. These 20 bytes are not stored in the process image or in process image partition and can only be written with the system function SFC14/15.


Fig. 01

The operating system of the CPU transfers the data consistently during process image updating. You can access this data in the process image using the load and transfer commands.
Alternatively, with S7-400 CPUs you can use system function SFC 26 "UPDAT_PI" or SFC 27 "UPDAT_PO" at any point in the program to update the process images. However, in this case the relevant PIP may not be updated by the system. If you do not or cannot place the data in a process image, then you should use the system functions SFC14 and SFC15 for data communications.

More information about this is available in the following entries:

  • "Consistent data in S7-400, summary of mechanisms" - Entry ID: 11646774
  • "Use of Process Image Partitions in Organization Blocks" - Entry ID:18325216

What are the options for exchanging data between CPUs via MPI/PROFIBUS DP?Go to beginning
Part number:

 
Description:
SIMATIC S7 provides diverse communication services and connections.
Here we present a selection of options for data exchange between CPUs (S7-300, S7-400). The select does not include all conceivable possibilities.
Usually the MPI/PROFIBUS DP interface is used for CPU-CPU communication.
Please also note the different data and consistency areas in the individual CPUs and services.

1. MPI interface and communication services
 
Communication services Further information and notes
Global data SFC manual 1) Chapter 19;
FAQ 430498 with detailed instructions.
S7 basic communication with X_PUT, X_GET SFC manual, sections 22.5 and 22.6
1) SFC manual is used in the FAQ as an abbreviation for the manual "System Software for S7-300/400 System and Standard Functions" that is available in Entry ID: 1214574 .

An overview of the communication options via MPI is available in Entry ID: 21537047. A detailed explanation is available in the SFC manual, chapters 19 - 22.

2. PROFIBUS DP interface and communication services
 
Type of connection Further information and notes
Master/Master DP-DP coupler links two networks;
manual in Entry ID: 1179382
  CPUs connected via CP 342-5;
application in Entry ID: 20987807
Master/Slave S7 basic communication with X_PUT, X_GET:
SFC manual, sections 22.8 and 22.9; application in Entry ID: 20987910
Master and slave must be in the same project, one CPU is I slave.
Slave/Slave (internode communication) FAQ with Entry ID: 1016961

Further information and notes

  • A systematic overview of all communication with SIMATIC S7 is available in Entry ID: 20982954 and in the manual "Communication with SIMATIC" in Entry ID: 1254686.
  • Additional communication services are available in the SFB manual in the chapters on communication.
  • Connection between S7-300/400 and S7-200 is described in the FAQ in Entry ID: 747743 .

Direct data exchange (internode communication) between two CPU modulesGo to beginning
Part number:

QUESTION:
How do I configure direct data exchange (internode communication) between two CPU modules configured as DP slaves?

ANSWER:
Communication between two CPU stations configured as DP slaves and operated by the same DP master is called direct data exchange. The following configuration is implemented in the following sample project.

Fig. 1: Configuration of the sample project

First incorporate the three CPU stations in your STEP 7 project and link both slave stations to the master, then proceed as follows to configure direct data exchange:

  1. Go to the Hardware Configuration of the DP master.
  2. In the first slave station configure at least one row as data exchange for master-slave communication.

Fig. 2: Configuration of the CPU 315-2DP with DP address 3

  1. You should configure at least one slot with input data on the master and output data on the slave. This data will be "listened to" by the second DP slave.

Fig. 3: Master-slave configuration

  1. Switch to the configuration of the second DP slave in Hardware Configuration of the DP master.
  2. If you enter a new row here, you are offered two options in the data exchange mode. Select the DX mode for direct data exchange and specify the parameters.

Fig. 4: Configuration of the CPU 315-2DP with DP address 4

  1. This enables the second DP slave to "listen in" on the data that the first DP slave sends to the DP master.

In the following is a sample project - created in STEP 7 V5.2 SP1 - for internode communication (German = Querverkehr) between two CPUs. Proceed as follows:

  1. Save "QuerVerkehr.exe" in an empty directory.
  2. Double-click this file to unpack the project.
  3. Start the SIMATIC Manager.
  4. Open the project.

 QuerVerkehr.exe ( 448 KB )  

A CPU 318 is used as master in the sample project. An active communication is is set up between the master and a CPU 315 as slave. The second CPU 315 "listens in" on this data communication and can respond to events directly. It is not necessary for the master to trigger these events.

Requirements for using internode communication:

  • The master CPU and both DP slaves must be integrated in one STEP 7 project.
  • All stations involved in the internode communication must support "Send and receive capability for direct data exchange".

S7 routing via PROFIBUS with S7-300Go to beginning
Part number:

QUESTION:
What are the settings of the DP slave interface on an S7-300 CPU so that I can route via this?

ANSWER:
If you wish to use the CPU as an I slave and this CPU is also to be an S7 router, then please note the following:

  • The DP interface of the slave via which the routing is to take place must be activated. This is done in the hardware configuration. In the Properties dialog of the DP interface you must set a check mark for "Commissioning/Test operation" or for "Programming, status/modify...". Notes on this are in the enclosed table.

  • The table shows the connection resources available for S7 routing connections - regardless of the other connection resources. Connection resources of the PG/OP or the S7 basis communication are not occupied.

  • The following holds for CPUs 313, 314, 315 and 316:
    A routing connection resource is also occupied when a connection is to be set up via the DP interface to/from a node in the own rack (e.g. a CP 343-1). In the case of connection setup to/from a node in the own rack via the MPI interface no routing connection resources are occupied, because here the node can be reached directly.

  • The following holds for CPUs 317:
    A routing connection resource is also occupied when a connection is to be set up via the DP interface or the MPI/DP interface to/from a node in the own rack (e.g. a CP 343-1).

  • The following holds for CPU 318:
    The resources for routing and the other connections are managed together. More information on this is available in the reference manual "S7-300 Instruction List CPU Specifications CPUs 312 IFM to 318-2 DP", section 1.2 Connection Resources of the CPU 318-2. The reference manual is available in Entry ID : 8861817.
  • It is not possible to check routing resources online.

Table 1 shows the assignment of the CPU to the different hardware configurations.

CPU order number Number of connection resources Fig. 1 Fig. 2 Fig. 3
6ES7 313-6CE01-0AB0 4 - X -
6ES7 314-6CF01-0AB0 4 - X -
6ES7 315-2AF03-0AB0 4 X - -
6ES7 315-2AF83-0AB0 4 X - -
6ES7 315-2AG10-0AB0 4 - X -
6ES7 315-6FF01-0AB0 4 - X -
6ES7 316-2AG00-0AB0 4 X - -
6ES7 317-2AJ10-0AB0 8 X - -
6ES7 317-2EJ10-0AB0 up to 24 - X -
6ES7 317-6FF00-0AB0 8 - - X
6ES7 318-2AJ00-0AB0 see manual X - -

Table 1: CPU assignment

Routing as DP slave is not possible for Compact CPUs with firmware version 1.0.x.

Below you see how to make the setting for the DP slave in the Hardware Configuration according to the CPU used.

Fig. 1: Settings in Hardware Configuration_1

Fig. 2: Settings in Hardware Configuration_2

Fig. 3: Settings in Hardware Configuration_3


Rules for accessing the CPU 315-2 DP on distributed I/O (integrated DP interface of CPU 315-2 DP)Go to beginning
Part number:

QUESTION:
What should you watch out for when accessing data of the distributed I/O in connection with CPU315-2 DP?

ANSWER:
Depending on the type of CPU 315-2DP you are using (6ES7 315-2AFxx-0AB0 or 6ES7 315-2AG10-0AB0) there are differences in the size of the address area available.
Address area - user data 6ES7 315-2AFxx-0AB0 6ES7 315-2AG10-0AB0
Address area / CPU Byte 0 to 1023 Byte 0 to 2047
In the PII/ PIQ Byte 0 to 127 Byte 0 to 127
Consistent data 32 bytes 128 bytes
User data of a station 244 bytes input / 244 bytes output  244 bytes input / 244 bytes output

Table 1: CPU data of the I/O

  1. Addresses that are greater than the address area of the CPU, cannot be addressed either by load or by transfer commands and cannot be addressed either by SFCs.
  2. If there is no consistency, then you must always use load/transfer commands with CPU 315-2 DP (6ES7 2AFxx-0AB0). It is not possible to use SFC14 and SFC15 here.
  3. With CPU 315-2DP (6ES7 315-2AG10-0AB0) you can also use system functions SFC 14/15 to access areas with 1, 2 and 4 bytes. In doing so however the complete consistent area has to be read/written. If the area is 1 word with consistency over the entire length, then with SFC 14/15 you can only read/write the whole word. If the area is 1 word and has byte consistency, then with SFC 14/15 you can read/write a length of both 1 byte and 1 word.
  4. If there is consistency and this is 3 bytes or more than 4 bytes (maximum permissible is 128 bytes, depending on the CPU), then for CPU 315-2 DP (6ES7 2AFxx-0AB0) you are obliged to work with SFC14 and SFC15. It is not possible to use load/transfer commands.
    For CPU 315-2 DP (6ES7 2AG10-0AB0) you should normally also use SFC14 and SFC 15. However, it is possible to use load/transfer commands on consistent areas in order to read or write just parts of the consistent area.
  5. If there are consistent areas in the process image, then with CPU 315-2 DP (6ES7 2AG10-0AB0) the consistent areas can also be updated through the process image transfer, so that you don't need SFC14/15 at all in such cases.
Consistency 6ES7 315-2AFxx-0AB0 6ES7 315-2AG10-0AB0
None Access via load/transfer commands Access via load/transfer commands
or also with SFC14/15 for lengths of 1, 2 or 4 bytes, or 1 or 2 words, or 1 double word
1 byte Access via load/transfer commands Access via load/transfer commands or access via SFC 14/15
2 bytes Access via load/transfer commands Access via load/transfer commands or access via SFC 14/15
3 bytes Access via
SFC 14/15
Access via load/transfer commands or access via SFC 14/15
4 bytes Access via load/transfer commands Access via load/transfer commands or access via SFC 14/15
4 - 128 bytes Access via
SFC 14/15 (1)
Access via load/transfer commands or access via SFC 14/15

(1) With CPU 6ES7 315-2AFxx-0AB0 a maximum of 32 bytes can be read/written consistently.

Table 2: Access rules

Keywords:
Consistent data

Startup of the S7-300 CPUs when slave is not availableGo to beginning
Part number:

QUESTION:  
What is the monitoring time for a S7-300 CPU on the PROFIBUS when a DP slave is not available?

ANSWER:  
You are operating a PROFIBUS network with DP slaves on the PROFIBUS interface of your CPU and during Startup you wish to check whether the expected configuration matches the actual configuration. There are two different times given in the Properties dialog of the CPU, in the Startup tab.

Fig. 1: Startup properties of the CPU

An S7-300 CPU waits the time for transfer of the parameters to the modules until it checks whether there is a difference between the expected configuration and the actual configuration. If at this point in time one of the DP slaves is not available and there should not be startup if there is a difference between the expected configuration and the actual configuration, then the CPU goes into STOP mode. In this case the CPU has to be set back into the RUN mode when all the DP slaves are available.


Routing with compact CPU and C7-635 as DP slaveGo to beginning
Part number:

QUESTION:
Why can't I route via the DP interface with a compact CPU and with the C7-635 when the DP interface has been configured as a slave?

ANSWER:
In STEP 7 V 5.2 there is no provision for routing with the compact CPUs (V1.x) via the interface when this has been configured as a slave. If the compact CPU is configured as a DP master however, routing is possible.

Compact CPUs V2.0 and higher can route as DP slaves (table 1). For this you need STEP 7 V 5.2 SP1. In addition, in the hardware configuration you must set a check mark for "Commissioning/Test Mode" in the Properties dialog of the DP interface. This makes the CPUs also become active nodes (I slaves) on the bus.

Designation

Order No.

CPU 313C 2DP

6ES7313-6CE01-0AB0

CPU 314C 2DP

6ES7314-6CF01-0AB0

C7-635 Key

6ES7635-2EC01-0AE3

C7-635 Touch

6ES7635-2EB01-0AE3

C7-636 Key

6ES7636-2CE00-0AE3

Table 1: Routing-compliant compact CPUs/C7 complete systems (from FW V2.0)

Note:
In order to use this function, STEP 7 V5.3 is required for the C7-635 / C7-636 complete systems.


How can you tell whether your S7-300/400 master supports DPV1 functions?Go to beginning
Part number:

Configuration Notes:

S7-400 CPUs:
With the CPUs of S7-400 you can tell what is supported by the setting on the DP interface. For the DP interface to support alarm handling, the DP mode should be set to DPV1 in the object properties of the DP interface in HW Config.


Fig. 01
 

S7-300 CPUs:
With an S7-300 (except CPU 318-2 DP) the DP mode of a DP interface cannot be parameterized. Here you can recognize the DP functionality from the following procedures:

Incorporating a GSD file of a DPV1 slave
With some slaves the DPV1 functionality can be parameterized in the GSD file.
As an example we have taken the GSD file si01801e.gsg for the station type ET 200M (IM 153-2) DPV1 as in Entry ID: 113498.
Here STEP 7 checks whether the parameter can be edited. If after configuration you can use this file to switch between DPV0 mode and DPV1 mode, then the master supports the DPV1 functionality.

Slot model
Take the slot model of an incorporated ET 200M HighFeature IM 153-2 (MLFB: 6ES7 153-2BA00-0XB0). Configure the DP slave from the hardware catalog folder PROFIBUS DP > ET 200M > IM 153-2.


Fig. 02
 

As shown in Fig. 02, you have the following properties when configuring on a DPV1 master:

  • The DPV1 slot model starts with slot 1.
  • The IM 153-2 is plugged in slot 2.
  • The first I/O module can be positioned as from slot 4.
  • An additional input address, the so-called diagnostics address, is assigned for the interface module.

If the ET 200M has been configured on a DPV0 master, the following properties are the determining factors:

  • The slot model starts only with slot 4.
  • There is no other diagnostics address available for the interface module.

A list of all the S7 masters that support DPV1 is given in Entry ID 24161884.

At the moment the external DP interface of the S7-300 CP 342-5 only supports DPV0 functions.

More information on differentiating between the DP standards for migrating from DPV0 to DPV1 are available in the guidelines in Entry ID 7027576.

 

 Entry ID:23430648   Date:2012-12-20 
I regard this article....as helpfulas not helpful                                 






























related links
What are the differences between ...
How do you configure an S7 connec ...
How do you configure S5-compatibl ...
How do you configure a PC station ...
How do you configure an S7 connec ...
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour