DP communication between WinCC and Siemens S7-200 PLC
1.1 Communication through OPC
S7-200 PC Access
OPC communication between S7-200 and WinCC can be established using the OPC server PC Access of S7-200.
SIMATIC NET OPC Server
A connection between S7-200 and WinCC can be established using the OPC server of SIMATIC NET.
1.2 Communication using PROFIBUS DP
Connecting through PROFIBUS DP is a relatively fast communication method. In order to communicate using PROFIBUS DP, the S7-200 communication module EM277 is required. This document mainly provides a detailed introduction to this method.
How to communicate Profibus DP between WinCC and 200PLC through EM277
2.1 Network Configuration
CP5611 serves as the main station, EM277 serves as a standard master-slave network for the slave station, as shown in Figure 1.
2.2 Hardware and software used
Hardware:
1) S7-200 CPU224
2) EM277
3) CP5611
4) PROFIBUS cables and connectors
Software:
1) WinCC 7.0 SP1
2) SOFTNET-DP V7.1
2.3 Network configuration and parameter settings
Configure PC station
1. Insert into PC station
Create a new project in STEP7, select the corresponding Application based on WINCC and Simatic Net versions in the hardware configuration, insert it into the slot, as shown in Figure 2 and Figure 3.
Figure 2
Fig 3
2. Configure network card
Figure 4
Insert a CP5611 and create a PROFIBUS network, set the network address and baud rate, as shown in Figure 4. Configure CP5611 as DP-MASTER, as shown in Figure 5.
Figure 5
3 Insert EM277
EM277 serves as a standard master-slave network for the slave station.
Download the GSD file of EM277 from the internet and save it to the local path.
Download link: one hundred and thirteen thousand six hundred and fifty-two
In STEP7, click on the option "Option" - "Install New GSD", find the directory of the EM277 GSD file, and install the GSD file into STEP7, as shown in Figure 6. After installation, EM277 can be found in the hardware directory "PROFIBUS DP" - "Additions Field Devices" - "SIMATIC".
Hang EM277 onto the PROFIBUS network. Set the address to 4 and configure the communication interface area for communication. Input 16 bytes after VW1200 in S7-200, output 16 bytes as the data exchange area on the S7-200 side, VB1200-1231 as the input area of S7-200, and VB1232-1263 as the output area of S7-200, as shown in Figure 7.
Figure 6
Figure 7
Double click EM277 and configure the address offset of EM277 to 1200, as shown in Figure 8, where the address starting from VB1200 on the S7-200 side is the data exchange area
Figure 8
4 Compilation and Download
After compiling and saving, configure PC STATION,
Figure 9
1) Click on "Start" - "Simatic" - "SIMATIC NET" - "Settings" - "Configuration Console" to enter the network card configuration interface, select "CP5611", choose "Configure Mode" in the "General" interface, select 4 in Index, and click the "Apply" button, as shown in Figure 9.
2) Click "Start" - "Station Configurator" to enter the configuration screen, click "Add", add "Application", Index represents the number of rows, as shown in Figure 10 and Figure 11.
Figure 10
Figure 11
3) Open "Set PG/PC Interface" in the control panel, set the access point S7 ONLINE to point to "PC Internal", and the access point CPL_L2_1 to point to "CP5611 (PROFIBUS)", as shown in Figure 12.
Figure 12
4) Change the station name of PC STATION to match the PC station name in STEP7 by clicking on "Station Name". This example uses the default name "SIMATIC PC Station (1)", As shown in Figure 13.
Figure 13
(Simple method: Click the "Import Station" button, find the XDBs folder in the project file home, and import the XDB file.)
(5) Download the configuration to PC STATION in STEP7.
WinCC configuration
(1) In WinCC, add the PROFIBUS DP protocol as shown in Figure 14.
Figure 14
(2) Under the PROFIBUS DP protocol, add a new connection and set the connection slave address to 4, as shown in Figure 15.
Figure 15
(3) Configure system parameters: Select CP5412 (A2) Board 1, choose "System Parameter" from the right-click menu to set the system parameters, and set the communication template number to 1, as shown in Figure 16.
Figure 16
(4) Add variables and connect input and output addresses, as shown in Figure 17.
The output offset of 0 is for VB1200 on the S7-200 side, and the input offset of 0 is for VB1232 on the S7-200 side.
Figure 17
At this point, all configurations have been completed.
Connecting through PROFIBUS DP is a relatively fast communication method, and its performance follows the performance limitations of PROFIBUS DP. In addition to using CP5611, commonly used boards include CP5613 CP5512、Cp5614, When they act as the master station, the number of slave stations they can connect to is shown in Figure 18, which also lists the byte limit for input and output. By using the S7-200 PC Access OPC server, data can be read from up to 8 S7-200 target systems simultaneously. For more information about the S7-200 OPC server, please refer to the S7-200 PC Access online help, entry ID: 19301654. When establishing a connection using an OPC server with SIMATIC NET, which version of SIMATIC WinCC is released for which version of SIMATIC NET, and which version of SIMATIC NET is provided by SIMATIC WinCC, please refer to entry ID: 21927773 for information.