Configurar s7 Conection
Configurar s7 Conection
Configurar s7 Conection
This entry is from the Service&Support portal of Siemens AG, Sector Industry,
Industry Automation and Drive Technologies. The general terms of use
(http://www.siemens.com/terms_of_use) apply.
Clicking the link below directly displays the download page of this document.
http://support.automation.siemens.com/WW/view/en/17628518
Question
How do you configure a specified and an unspecified S7 connection for data
exchange between S7-300 and / or S7-400 over Industrial Ethernet CPs?
Answer
The instructions and notes listed in this document provide a detailed answer to this
question.
Table of Contents
1 Introduction........................................................................................................ 4
2 Configuration ..................................................................................................... 5
2.1 Configuring CP343-1 and CP443-1 Advanced .................................... 5
2.1.1 Assigning IP addresses to CP343-1 and CP443-1 Advanced ............. 5
2.1.2 Entering the IP address of CP343-1 in the Hardware Configuration
and downloading the configuration into the CPU................................. 8
2.1.3 Entering the IP address of CP443-1 Advanced in the Hardware
Configuration and downloading the configuration into the CPU ........ 10
2.2 Configuring the S7 Connection Bilaterally.......................................... 13
2.2.1 Configuring a specified S7 connection............................................... 14
2.2.2 Configuring an unspecified S7 connection......................................... 19
Configuring an unspecified S7 connection for the S7-300................. 19
Configuring an unspecified S7 connection for the S7-400................. 22
2.3 Configuring the S7 Connection Unilaterally ....................................... 27
2.3.1 Configuring an S7 connection unilaterally for the S7-300.................. 27
2.3.2 Configuring an S7 connection unilaterally for the S7-400.................. 31
1 Introduction
You can use the S7 communication through S7 connections for data exchange by
way of the Industrial Ethernet CPs of S7-300 and S7-400.
In this example an S7-300 is connected over the PROFINET interface of the
CP343-1 on the subnetwork 172.16.0.0. The S7-400 on the other hand is
connected over the GBIT interface of the CP443-1 Advanced on the subnetwork
172.16.0.0. The PROFINET interface of the CP443-1 Advanced is connected on
the subnetwork 192.168.99.0.
Configuration overview
Figure 1-1 shows an overview of the configuration.
Figure 1-1
S7-300 S7-400
CP343-1
CP443-1 Advanced
IP address PROFINET interface:
S7 connection 192.168.99.121
subnet mask: 255.255.255.0
IP address: 172.16.43.2 IP address Gigabit interface:
subnet mask: 255.255.0.0 172.16.49.99
subnet mask: 255.255.0.0
SCALALANCE X
2 Configuration
Below we describe how to configure an S7 connection for bilateral exchange of
data by way of the Industrial Ethernet CPs of S7-300 and S7-400.
The S7 connection is configured bilaterally in the S7-300 and in the S7-400.
Table 2-2
No. Configuration step Note
1. Connect the SIMATIC Field PG on
which the configuration created with
STEP 7 is stored to the PROFINET
interface of CP343-1.
In Windows network settings
LAN (Local Area Network) of the
SIMATIC Field PG you enter an IP
address that is in the same
subnetwork as that of CP343-1.
In this example the IP address
172.16.43.100 and subnetwork mask
255.255.0.0 are used for the
SIMATIC Field PG.
After you have assigned the IP address 172.16.43.2 and subnet mask 255.255.0.0
to CP343-1 you enter the assigned IP address in the Hardware Configuration.
Table 2-3
No. Configuration step Note
1. In the SIMATIC Manager you mark
the SIMATIC S7 300 station and
double-click "Hardware" in order to
open the Hardware Configuration of
the S7-300 station.
After you have assigned the IP address 192.168.99.121 and subnet mask
255.255.255.0 to CP343-1 you enter the assigned IP address in the Hardware
Configuration.
Table 2-4
No. Configuration step Note
1. In the SIMATIC Manager you mark
the SIMATIC S7 400 station and
double-click "Hardware" in order to
open the Hardware Configuration of
the S7-400 station.
Note If you use the BSEND and BRCV or USEND and URCV services for data
transfer, you must configure the S7 connection bilaterally for S7-300 and S7-400,
because the services are based on the client-client principle.
You can use the PUT and GET services for data transfer by way of S7
connections configured unilaterally as well as by way of S7 connections
configured bilaterally. They are based on the client-server principle.
If the S7-300 and S7-400 between which there is data exchange are configured in
the same STEP 7 project, then you configure a specified S7 connection.
The connection parameters below are used for the S7 connection in this example.
Table 2-5
Connection parameters S7-300 S7-400
Connection partners S7-400 CPU S7-300 CPU
Connection type S7 connection S7 connection
IP address 172.16.43.2 172.16.49.99
MAC address 00-0E-8C-D9-F0-1D 00-0E-8C-DB-D2-98
Partner IP address 172.16.49.99 172.16.43.2
Partner MAC address 00-0E-8C-DB-D2-98 00-0E-8C-D9-F0-1D
Connection setup Active Passive
ID (connection number) 2 2
LADDR W#16#0100 W#16#3FFA
(module start address)
Local TSAP 10.04 11.02
Partner TSAP 11.02 10.04
10. Call the function blocks below in the You will find function blocks in the library
user program of the S7-300. "SIMATIC_NET_CP CP CP 300 Blocks".
FB12 "BSEND" and FB13 At the link below is a sample program for the S7-300
"BRCV" or with the call of the function blocks FB12 "BSEND" and
FB8 "USEND" and FB9 "URCV" FB13 "BRCV".
or http://support.automation.siemens.com/WW/view/de/18
FB14 "GET" and FB15 "PUT" 516182
At the link below is a sample program for the S7-300
with the call of the function blocks FB8 "BSEND" and
FB9 "BRCV".
http://support.automation.siemens.com/WW/view/de/22
791526
At the link below is a sample program for the S7-300
with the call of the function blocks FB14 "GET" and
FB15 "PUT".
http://support.automation.siemens.com/WW/view/de/18
610307
11. Call the system functions below in the These system functions are available in the library
user program of the S7-400. "Standard Library System Function Blocks
SFB12 "BSEND" and SFB13 Blocks".
"BRCV" or At the link below is a sample program for the S7-400
SFB8 "USEND" and SFB9 with the call of the system functions SFB14 "GET" and
"URCV" or SFB15 "PUT".
SFB14 "GET" and SFB15 "PUT" http://support.automation.siemens.com/WW/view/de/18
19293
If the S7-300 and S7-400 between which there is data exchange are configured in
different STEP 7 projects, then you configure an unspecified S7 connection.
The connection parameters below are used for the S7 connection in this example.
Table 2-7
Connection parameters S7-300 S7-400
Connection partners Unspecified Unspecified
Connection type S7 connection S7 connection
IP address 172.16.43.2 172.16.49.99
MAC address 00-0E-8C-D9-F0-1D 00-0E-8C-DB-D2-98
Partner IP address 172.16.49.99 172.16.43.2
Partner MAC address 00-0E-8C-DB-D2-98 00-0E-8C-D9-F0-1D
Connection setup Active Passive
ID (connection number) 3 3
LADDR W#16#0100 W#16#3FFA
(module start address)
Local TSAP 11.04 12.02
Partner TSAP 12.02 11.04
Note The configurations of the connection parameters for the S7-300 and the S7-400
must match.
9. Call the function blocks below in the You will find function blocks in the library
user program of the S7-300. "SIMATIC_NET_CP CP CP 300 Blocks".
FB12 "BSEND" and FB13 At the link below is a sample program for the S7-300
"BRCV" or with the call of the function blocks FB12 "BSEND" and
FB8 "USEND" and FB9 "URCV" FB13 "BRCV".
or http://support.automation.siemens.com/WW/view/de/18
FB14 "GET" and FB15 "PUT" 516182
At the link below is a sample program for the S7-300
with the call of the function blocks FB8 "BSEND" and
FB9 "BRCV".
http://support.automation.siemens.com/WW/view/de/22
791526
At the link below is a sample program for the S7-300
with the call of the function blocks FB14 "GET" and
FB15 "PUT".
http://support.automation.siemens.com/WW/view/de/18
610307
Table 2-9
No. Configuration step Note
1. In the SIMATIC Manager you open
the STEP 7 project that contains the
configuration of S7-400 which is to
send and receive the data over an S7
connection.
By means of the menu Options
Configure Network you open
NetPro where you configure the S7
connection.
9. Call the system functions below in the These system functions are available in the library
user program of the S7-400. "Standard Library System Function Blocks
SFB12 "BSEND" and SFB13 Blocks".
"BRCV" or At the link below is a sample program for the S7-400
SFB8 "USEND" and SFB9 with the call of the system functions SFB14 "GET" and
"URCV" or SFB15 "PUT".
SFB14 "GET" and SFB15 "PUT" http://support.automation.siemens.com/WW/view/de/18
19293
Table 2-11
No. Configuration step Note
1. In the SIMATIC Manager you open
the STEP 7 project that contains the
configuration of S7-300 which is to
send and receive the data over an S7
connection.
By means of the menu Options
Configure Network you open
NetPro where you configure the S7
connection.
9. In the user program of the S7-300 You will find function blocks in the library
you call the functions FB14 "GET" "SIMATIC_NET_CP CP CP 300 Blocks".
and FB15 "PUT". At the link below is a sample program for the S7-300
with the call of the function blocks FB14 "GET" and
FB15 "PUT".
http://support.automation.siemens.com/WW/view/de/22
792404
9. In the user program of the S7-400 These system functions are available in the library
you call the system functions SFB14 "Standard Library System Function Blocks
"GET" and SFB15 "PUT". Blocks".
At the link below is a sample program for the S7-300
with the call of the function blocks SFB14 "GET" and
SFB15 "PUT".
http://support.automation.siemens.com/WW/view/de/18
19293