Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC PC modules by way of the Industrial Ethernet using the TCP protocol?
Description This entry includes sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC PC modules by way of the Industrial Ethernet using the TCP protocol.
Communication from SIMATIC S5 modules to SIMATIC PC modules is by means of the Layer 4 services "SEND" and "RECEIVE" with data lengths of up to 240 bytes.
Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC PC modules by way of the Industrial Ethernet using the ISO transport protocol?
How do you configure S5-compatible communication to the SIMATIC S5 by way of the Industrial Ethernet for the SIMATIC NET OPC server with the SIMATIC NET PC software?
How do you configure S5-compatible communication to the SIMATIC S5 for a user application by way of the Industrial Ethernet with the SIMATIC NET PC software?
Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC PC modules by way of the Industrial Ethernet using the ISO transport protocol?
Description This entry includes sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC PC modules by way of the Industrial Ethernet using the ISO transport protocol.
Communication from SIMATIC S5 modules to SIMATIC PC modules is by means of the Layer 4 services "SEND" and "RECEIVE" with data lengths of up to 240 bytes.
Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC PC modules by way of the Industrial Ethernet using the TCP protocol?
How do you configure S5-compatible communication to the SIMATIC S5 by way of the Industrial Ethernet for the SIMATIC NET OPC server with the SIMATIC NET PC software?
How do you configure S5-compatible communication to the SIMATIC S5 for a user application by way of Industrial Ethernet with the SIMATIC NET PC software?
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 PROFINET using the following protocols:
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 Industrial Ethernet using the following protocols:
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:
Configuration notes:
In version V6.1 of SIMATIC NET (CD 11/2002) and higher you can use the symbol table and the data block symbols of your STEP 7 project as a basis for generating the symbols of the SIMATIC NET OPC server.
This entry describes how to generate symbols for the SIMATIC NET OPC server from the STEP 7 symbol table.
A PC station with a standard Ethernet network card is used. Data exchange between PC station and S7 station is implemented via Industrial Ethernet using S7 Communication.
Requirements: Both PC station and S7 station must be configured in the same STEP 7 project.
Configuration of the S7 station: Use the SIMATIC Manager to open your STEP 7 project that contains the SIMATIC S7 station.
Fig. 01: STEP 7 project
Switch to the S7 program folder and double-click on "Symbols". The symbol table opens.
In the symbol table you define the symbol names you want.
Fig. 02: Symbols in the symbol table
Other variables with symbol names of the STEP 7 project are in the existing data blocks - DB1 in this example.
Fig. 03: Variables in DB1
Download the hardware configuration and the user program to the CPU of your S7 station.
Configuring the PC station: You insert a new PC station via the menu Insert -> Station -> SIMATIC PC Station.
Fig. 04: Inserting a PC Station
Please follow the instructions given in Entry ID 15355168 for configuring the PC station.
Incorporating STEP 7 symbols in the OPC server:
Then right-click the OPC server and open the Object Properties of the OPC server.
Fig. 05: Opening the Object Properties of the OPC server
In the Properties dialog of the OPC server you switch to the "S7" tab. In this dialog you define which STEP 7 symbols are used in the OPC server. Enable either the "All" or the "Configured" option.
Fig. 06: Properties dialog of the OPC server - "S7" tab
If you enable the "Configured" option, then you right-click the "Configure..." button. The following dialog opens.
Fig. 07: Configure Symbols dialog - variable symbols in the symbol table
Fig. 08: Configure Symbols dialog - variable symbols in the data block
In the "Configure Symbol" dialog you can make the variable symbols defined in the symbol table and data block visible for the OPC server and define their authorization (Read/Write, Read, Write or none).
Click the "OK" button to close the "Configure Symbols" dialog.
Then, in NetPro, you mark the PC station and save and compile the complete configuration.
Fig. 09: Saving and compiling the configuration
Mark your PC station.
Fig. 10: Save and Compile
If warnings are displayed when saving and compiling the configuration, then they should be treated as purely information. It is possible to download the configuration into the PC station. If errors occur when saving and compiling, it is not possible to download the configuration into the PC station.
In NetPro, you mark the PC station and click on the "Download" button to download the configuration into the PC station.
The following message reminds you that the downloading procedure will delete the data already on the components concerned and the new data will be downloaded to them.
Fig. 11: PLC download
Acknowledge the message with "OK". Now the download starts.
First the target modules are stopped. Acknowledge the subsequent message with "OK" to continue the download procedure.
Fig. 12: Stopping the target modules
Note:
The following entry provides information on possible causes of error messages during the downloading procedure 12033912.
Successful downloading completes configuration of the PC station.
Use the OPC Scout to check whether the STEP 7 symbols are available in the OPC server. This OPC client is included in the SIMATIC NET PC software.
Start the OPC Scout in the Windows START menu via SIMATIC -> SIMATIC NET -> OPC Scout.
Double-click on "OPC.SimaticNET" to connect to the SIMATIC NET OPC server.
Fig. 13: Connecting to the SIMATIC NET OPC server
In the dialog box that opens you enter a group name of your choice.
Fig. 14: Entering a group name
Double-click on the group name created, "S7" in this example, to open the OPC Navigator. In the OPC Navigator you can define the OPC items.
Fig. 15: Opening the OPC Navigator
The incorporated STEP 7 symbols are to be found in the OPC Navigator in the "...\SYM" folder.
Double-click on "\SYM". The S7 station from the STEP 7 project is displayed. This contains more subfolders (CPU and data blocks).
The variable symbols that you defined in the STEP 7 symbol table are contained in the CPU folder. Mark the CPU folder. The defined variable symbols are displayed in the middle window pane. Mark the variable names and click on the "->" button to add them to the OPC item list. Click "OK" to close the dialog.
The variable symbols defined in the data block are in the data block folder.
Fig. 16: OPC Navigator
The OPC Scout has added the selected variables with symbolic names to the list of OPC items.
If the quality of the OPC items is good, then the communication connection can be set up and you can read/write the values of the OPC items.
Fig. 17: List of OPC items
How do you configure S5-compatible communication to the SIMATIC S5 for a user application via Industrial Ethernet with the SIMATIC NET PC software?
Instructions: In this example, a CP1613 is used for the S5-compatible communication with an S5 controller on the Industrial Ethernet network.
Note:
The procedure described here also applies for communication processors CP1613 A2, CP1623, CP1612 and CP1512, as well as for commercially available network cards.
General information: You do not need any other configuration software on the PC station. All the relevant applications are installed automatically along with the SIMATIC NET PC software.
If you are using a CP1613, then on the PC station, you need the license for the SIMATIC NET PC software S7-1613. This license key is also needed when using a CP1613 A2 or CP1623.
If you are using a CP1612, CP1512 or a commercially available network card, then on the PC station, you need the license for the SIMATIC NET PC software SOFTNET S7 Lean or SOFTNET S7.
Please follow the instructions below for configuring the PC station.
Instructions: In this example, a CP1613 is used for the S5-compatible communication with an S7 controller on the Industrial Ethernet network.
Note:
The procedure described here also applies for communication processors CP1613 A2, CP1623, CP1612 and CP1512, as well as for commercially available network cards.
General Information:
You do not need any other configuration software on the PC station. All the relevant applications are installed automatically along with the SIMATIC NET PC software.
If you are using a CP1613, then on the PC station, you need the license for the SIMATIC NET PC software S7-1613. This license key is also needed when using a CP1613 A2 or CP1623.
If you are using a CP1612, CP1512 or a commercially available network card, then on the PC station, you need the license for the SIMATIC NET PC software SOFTNET S7 Lean or SOFTNET S7.
Please follow the instructions below for configuring the PC station.
How do you configure a PC station as PROFINET IO controller for connecting to a S7 station (as PROFINET IO device) for the SIMATIC NET OPC server with the SIMATIC NET PC software?
Instructions:
In this example, a standard network card is used that realizes the communication via the OPC server as PROFINET IO controller with a S7 station as PROFINET IO device on the Industrial Ethernet.
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.
It is a prerequisite that STEP 7 is installed and that the configuration of the S7 station already exists.
Please follow the instructions below for configuring the PC station.
QUESTION:
What do I have to consider when connecting a PC to a S7-300 and
S7-400?
ANSWER: In figure 1 you see a configured connection from an OPC-Server
to a SIMATIC 400 and an unconfigured connection from a OPC-Server
to the SIMATIC 300.
Figure 1 Connection configuration in NETPRO
Figure 2 Configured connection (S7 400)
Figure 3: Unconfigured connection (S7-300)
In figure 2 you can see that a bi-directional connection has
been configured for the SIMATIC 400.
In figure 3 you can see that a uni-directional connection has
been configured for the SIMATIC 300.
After the connection has been established the configuration has
to be transferred to the PC station.
Detailed informationen about this topic can be found on the
SIMATIC NET CD under "Advanced PC Configuration"
ATTENTION:
The configured connection has to be transferred also onto the
S7-400 station.
Explanation:
When configuring a connection to a S7-400 in NETPRO, the project
has to be transferred to both stations, here the "PC_Station" and
the "SIMATIC 400", with "Load to station". This is called a
configured connection. The S7 connections that have been defined on
the server as well as on the client side - e.g. from the PC to a AS
S7-400 station - are called also bi-directional connections.
When configuring a connection to a S7-300 in NETPRO, the project
has to be transferred only to the PC station. This is an
unconfigured connection. S7 connections that are defined only on
the client side - e.g. from a PC to an AS S7-300 station - are also
called uni-directional.
How do you configure S5-compatible communication to the SIMATIC S7 via Industrial Ethernet for the SIMATIC NET OPC server with the SIMATIC NET PC software?
Instructions: In this example, a standard Ethernet network card is used for the S5-compatible communication via the OPC server with the S7 station.
Note:
The procedure described here also applies for communication processors CP1613 (A2), CP1612 and CP1512.
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.
Only one of these tools can be installed.
Please follow the instructions below for configuring the PC station.
How do you set up a Fetch/Write connection (S5-compatible communication) to the SIMATIC S5 via Ethernet for the SIMATIC NET OPC server with the SIMATIC NET CD 07/2001 or higher?
Instructions:
In this example, a standard Ethernet network card is used for the S5-compatible communication with the S5 station using the FETCH and WRITE services via the OPC server.
Note:
The procedure described here also applies for communication processors CP1613, CP1512 and CP1612.
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.
Only one of these tools can be installed.
Please follow the instructions below for configuring the PC station.
Instructions: In this example, a standard Ethernet network card is used for the S7 communication via a user application with an S7 controller on the Industrial Ethernet.
Note: The procedure described here also applies for communication processors CP1613, CP1512 and CP1612.
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. 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.
Only one of these tools can be installed.
Please follow the instructions below for configuring the PC station.
Keywords: OPC server, S7 connection, Industrial Ethernet, Guideline, Instructions, SOFTNET S7 IE, SOFTNET S7 Lean, S7-1613, Network card, Set up connection, SIMATIC NET PC software
How do you configure S5-compatible communication to the SIMATIC S5 via Industrial Ethernet for the SIMATIC NET OPC server with the SIMATIC NET PC software?
Instructions:
In this example, a CP1613 is used for the S5-compatible communication via the OPC server with an S5 controller on the Industrial Ethernet network.
Note:
The same procedure also applies for communication processors CP1613 A2, CP1612, CP1512 and other standard network cards.
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.
Only one of these tools can be installed.
Please follow the instructions below for configuring the PC station.
Instructions:
In this example, a CP1613 is used for the S7 communication via the SIMATIC NET OPC server to an S7-400H system on the Ethernet.
The requirement for the procedure described is an existing configuration of the S7400-H system with network connection.
Warning: Fault-tolerant S7 connections are available exclusively in CP1613 (6GK1161-3AA00), CP1613 A2 (6GK1161-3AA01) and CP1623 (6GK1162-3AA00). If you use a CP1613 A2 or CP1623 then these modules must be configured as CP1613 in the STEP 7 hardware configuration.
It is not possible to use standard network cards in this case.
General information: The requirement is that one of the two following configuration tools is installed on the Engineering Station.
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.
Note: You need an Engineering Station with STEP 7 for commissioning the PC station. STEP 7 is mandatory for configuring a fault-tolerant S7 connection between PC station and S7400-H system.
You need the license for the SIMATIC NET PC software S7-REDCONNECT on the PC station that communicates with the S7400-H system via fault-tolerant S7 connections.
Please follow the instructions below for configuring the PC station.
More information on communication with S7-400H systems is available in the manual "S7-400H" in Entry ID 1186523. Refer in particular to the information on communication with the OPC server in section 11.8 "General Information on Communication".
Instructions: In this example, a CP1613 is used for the S7 communication for a user application to an S7-400H system on the Ethernet. The requirement for the procedure described is an existing configuration of the S7400-H system with network connection.
Warning: Fault-tolerant S7 connections are available only for CP1613 and CP1623. It is not possible to use standard network cards in this case.
General information: The requirement is that one of the two following configuration tools is installed on the Engineering Station.
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.
Note: You need an Engineering Station with STEP 7 for commissioning the PC station. STEP 7 is mandatory for configuring a fault-tolerant S7 connection between PC station and S7400-H system.
You need the license for the SIMATIC NET PC software S7-REDCONNECT on the PC station that communicates with the S7400-H system via fault-tolerant S7 connections.
Please follow the instructions below for configuring the PC station.
Instructions: In this example, a standard Ethernet network card is used for the S7 communication via the SIMATIC NET OPC server with an S7 controller on the Ethernet.
Note:
The procedure described here also applies for communication processors CP1613, CP1512 and CP1612.
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: STEP7 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 tools can be installed.
Please follow the instructions below for configuring the PC station.