Share this

Research on Communication Implementation between S7-200 Series PLC and Monitoring Computer

2026-04-06 06:08:52 · · #1
Abstract: This paper addresses the practical problem of communication between a host computer and an S7-200 series PLC in a control system. Several communication methods between the monitoring computer and the S7-200 series PLC are summarized. These methods can effectively solve the communication problem between the monitoring computer and the S7-200 series PLC in different control systems. Keywords: PLC; communication; WINCC configuration software; OPC; PROFIBUS fieldbus; PPI 1 Introduction Siemens industrial control products have a high market share in the industrial control application field. The S7-200 series PLC is a member of the Siemens SIMATIC PLC family and occupies an important position in Siemens industrial control applications. The S7-200 series PLC is small in size, powerful in hardware and software functions, and easy to configure. Systems composed of it can be connected to the powerful PROFIBUS fieldbus. It has been widely used in various industries since its market launch. However, in practical engineering applications, communication problems between the monitoring computer and the S7-200 series PLC have been encountered. Because Siemens' S7-200 series PLC was released later than the monitoring configuration software WinCC, WinCC does not integrate communication drivers for the S7-200 series PLC; the communication protocol of the S7-200 series PLC is also not publicly available, and there are problems with using third-party software to develop monitoring programs. These problems have limited the application of the S7-200 series PLC. To solve this practical engineering problem, the author conducted some research, and this paper discusses the research results on the communication problem between the S7-200 series PLC and the monitoring computer. 2. Main Methods of Monitoring the S7-200 Series PLC In most control systems, simply implementing control is not enough; in many cases, a configuration monitoring interface is also needed to monitor the system. Monitoring increases human-machine interaction capabilities, allowing operators to monitor the system's operation in real time and making system operation more convenient. There are generally three methods for monitoring control systems composed of S7-200 series PLCs: configuration software monitoring, monitoring software developed with third-party software, and touch screen monitoring. Using the configuration software WinCC for monitoring offers powerful functions, good flexibility, and high reliability. However, the software is expensive and requires solving the communication problem between WinCC and the S7-200 series PLC. This method can be used in complex control systems. Monitoring software developed using third-party software offers good flexibility, low system investment, and applicability to various systems. However, system development is labor-intensive, reliability is difficult to guarantee, and it requires high experience and technical skills from technicians. Communication protocol software must also be purchased. This method can be used when system investment is limited and technicians have a high level of expertise. Touchscreen monitoring offers high reliability and is easy to implement. The communication problem between the touchscreen and the PLC is already handled by the manufacturer, so users don't need to worry about communication issues, which can greatly shorten the project cycle. However, flexibility is generally limited, functionality is limited, it cannot meet the monitoring requirements of complex control systems, and the price is high. This method can be used when system reliability requirements are high and the project timeline is short. 3. Communication between WinCC configuration software and S7-200 series PLC: SIMATIC WinCC is a process monitoring software using the latest 32-bit technology, offering good openness and flexibility. Whether for single-user systems or redundant multi-server/multi-user systems, WinCC is a good choice. Through standard interfaces such as ActiveX, OPC, and SQL, WinCC can easily communicate with other software. The communication between WinCC and S7-200 series PLC can be carried out using one of the two communication protocols, PPI and Profibus. 1. Implementation of communication between WinCC and S7-200 series PLC via Profibus protocol (1) Hardware and software requirements: * PC, Windows 98 operating system; * S7-200 series PLC; * CP5412 board or other similar boards, such as CP5611, CP5613; * EM277 Profibus DP module; * Profibus cable and connector; * Install the driver for CP5412 board; * Install WinCC 4.0 or above; * Install COM Profibus software. (2) Configuration Open SIMATIC NET\COM Profibus, add a new configuration, the master station is SOFTNET-DP, and the slave station is EM277 Profibus-DP. The master station address is selected from 1 to 126. The slave station address is selected from 3 to 99, which is consistent with the EM277 address. Then use the software to configure the slave station: open the slave station properties, in the Configure option, select 8 bytes in/8 bytes out (can be selected according to actual needs). In Parameterize, you can select the offset address, which corresponds to the data area (i.e., V area) of the S7-200 series PLC. The default is 0, which means it starts from VB0. After configuration, export the NCM file to generate *.txt and *.ldb files. (3) Set up the PG/PC interface. Select CP_L2_1 in Access Point of the Application, and select CP5412A2 (Profibus) in Interface Parameter Assignment. Activate the DP protocol in the properties, and enter the full path of the *.ldb file in the DP-Database parameter. After setting, you can diagnose whether the hardware configuration is correct and whether the communication is successful. (4) WinCC settings. Add a new driver in the WinCC variable manager. Select PROFIBUS DP.CHN as the new driver and CP5412(A2)Board 1. Set the parameters in System Parameters. The CP5412(A2)board parameter is 1, which represents the board number; the Config parameter is the full path of the *.txt file generated during configuration; the Watchdog time parameter is 0. Create a new connection, with the slave address matching the EM277 address. (5) Create variables. The variable types in WinCC are In and Out. In and Out are relative to the master station. In means that WinCC reads data from the S7-200 series PLC, and Out means that WinCC writes data to the S7-200 series PLC. In and Out correspond to the data storage area V. In this example, Out corresponds to VB0 to VB7 in the data storage area of ​​the PLC, and In corresponds to VB8 to VB15 in the PLC storage area. (6) Advantages and disadvantages. Advantages: This method has fast data transmission speed, is easy to expand, and has good real-time performance. Disadvantages: The data transmission area is limited (maximum 64 bytes), and corresponding processing must be performed in the PLC. The hardware cost is high, requiring hardware such as CP5412, EM277 Profibus-DP, and Profibus bus, as well as Com Profibus software. Application scenarios: Suitable for systems that require high-speed data communication and high real-time performance. 2. Implementation of communication between WinCC and S7-200 series PLC via PPI protocol. PPI protocol is a common communication protocol for Siemens S7-200 series PLC, but WinCC does not integrate this protocol, that is, WinCC cannot directly monitor the control system composed of S7-200 series PLC. S7-200 OPC Server is an interface software launched by Siemens to solve the problem of upper computer monitoring of S7-200 series PLC control system. Therefore, WinCC can easily establish communication with S7-200 series PLC through this software. (1) Hardware and software requirements: * PC, Windows 98 operating system; * S7-200 series PLC; * PC/PPI cable; * Install S7-200 OPC Server software; * Install WinCC 4.0 software. (2) Connection: Set the PG/PC interface parameters in the control panel. Select Computing in Access Point of the Application, and select PC/PPI Cable in Interface parameter. Add a new driver in the WinCC variable manager. Select OPC.CHN as the new driver. Create a new connection in the OPC GROUP, open the properties, select OPC Group Setting, and name the OPC server as OPCServer.MicroComputing. Then create a new variable in the newly added connection. The Item Name of the variable corresponds to the variable name used for monitoring in the S7-200 series PLC. For example: Item Name is M0.0. (3) Advantages and disadvantages Advantages: This method is simple to connect, requires less hardware investment, and can read and write all storage areas in the S7-200 series PLC. Disadvantages: The communication speed is relatively slow, OPC software and corresponding authorization are required, and system expansion is inconvenient. Application scenarios: Used for low-speed systems with low real-time requirements and limited system investment funds. In addition, communication can also be carried out through OPC software from other companies. For example, KEPServerEx from KEP can be used as the OPC server, and WinCC can be used as the OPC client to read and write the internal data area of ​​the S7-200 series PLC. Similar to the second method described above, the difference is that a tag must be established in the OPC server to correspond to the storage address in the S7-200 series PLC. In complex systems, if both S7-200 and S7-300 series PLCs exist, the S7-200 series PLC is generally connected to the PROFIBUS bus as a slave of the S7-300 series PLC. WinCC monitors the S7-200 series PLC through the S7-300 series PLC. 4. Connection between Third-Party Software and PLC Some systems have unique characteristics and lack readily available general-purpose software for data processing and system monitoring. This necessitates users developing monitoring software that meets the system requirements using a third-party software development platform. This approach satisfies system requirements while saving on system investment. However, it demands a high level of experience and technical expertise from the software developers. Interface software using the PPI protocol for communication between monitoring software developed on third-party software development platforms and the S7-200 series PLC includes: Prodave, MicroComputing, and OPC. The monitoring software developed by the third-party software development platform communicates with the S7-200 series PLC through the free port. If the protocol is customized, the developed monitoring software can call the MSComm control to realize the communication between the two. 1. Using the Prodave software package to realize the communication connection Prodave is a software package launched by Siemens for Siemens PLC products (S7-200, 300, 400 series PLC) and PC/PG to exchange data. Prodave integrates data exchange functions in *.DLL or *.LIB files. Various functions in the software can be easily called in the self-developed monitoring software. The main functions are: (1) load_tool Initialize the connection between the PC and the PLC system; (2) unload_tool Disconnect the connection between the PC and the PLC system; (3) and functions for reading and writing the PLC's internal storage area. The monitoring software can easily monitor the PLC control system through the read and write functions. 2. Using MicroComputing software to realize the communication connection After installing MicroComputing, controls can be directly inserted in VB or Delphi. The main insertable controls include: Data controls, Edit controls, Button controls, Label controls, and Slider controls. The main function of Data controls is to connect the remaining four controls to the S7-200 series PLC, set event trigger conditions, and configure the S7-200 series PLC address. Edit controls, Button controls, Label controls, and Slider controls can directly correspond to the S7-200 series PLC's storage resources. Third-party software can directly call these controls to monitor the PLC and can also perform read and write operations on the S7-200 series PLC using functions. 3. Establishing a communication connection using OPC Server software: After installing the S7-200 OPC Server software, an OPC server will be added to the operating system. The server name is "OPCServer.Computing". OPC client programs can be written in VB or Delphi to communicate with the OPC server. The following describes the process of writing an OPC client program in the VB development environment: First, add OPC Automation 2.0 to Project\References in the VB development environment. Then, write a program to connect to the OPC Server, add groups, add items, and read and write data. The functions used are as follows: connect function: establishes a connection with the OPC Server; OPCGroups.Add function: adds groups; OPCITems.Additems function: adds items; SyncRead function: synchronous read; SyncWrite function: synchronous write. The OPC server name is "OPCServer.Computing", and the item names correspond to the variable names used for monitoring in the S7-200 series PLC. The structure diagram of third-party software obtaining S7-200 series PLC data through OPC or MicroComputing is as follows: Text boxes: Communication processing card or PC/PPI cable text box: Data control text box: Slider control text box: Label control text box: Edit control text box: Button control text box: Third-party software text box: OPC Server text box: OPC Client: Third-party software implementation. Text box: Micro computing Text box: Figure 2: Structure diagram of obtaining PLC data using OPC or Micro computing Text box: S7-200 PLC 4. Implement communication connection using free port Insert the MSComm control in VB or Delphi, send and receive data through the serial port according to the custom protocol, process the data and implement monitoring. A communication program must also be written in the PLC, the process is as follows. 5. Summary of advantages and disadvantages: Using Prodave, it is simple to implement, has good flexibility, can directly call Prodave functions to read and write the internal storage area of ​​S7-200 series PLC, and can meet the transmission of large-scale data. Debugging is simple, and it is very suitable for engineering applications. However, it requires the purchase of software and the programming is more complex. Using MicroComputing, it is easy to use, and the programming is implemented with controls, which is simple to write. However, it has poor flexibility and requires the purchase of software and licenses. Using OPC to implement communication, the programming is flexible and relatively simple, and the debugging is simple. Since the OPC protocol is a universal protocol, it has been supported by many companies and has good universality. However, it requires the purchase of software and licenses. Using free port communication, the communication protocol can be customized, which is flexible and expands the scope of use. No special software needs to be purchased. However, the programming is complicated. Complex programs need to be written in the PLC, which uses a lot of PLC resources. In VB or Delphi, the MSComm control is used to read and write the serial port. The program is complicated and the real-time performance is poor. 5 Conclusion The above presents 6 methods for implementing communication between the monitoring computer and the S7-200 series PLC. Each of them has its own advantages and disadvantages and is suitable for monitoring and control systems under different conditions. Research shows that the above 6 methods can achieve good communication between the monitoring computer and the S7-200 series PLC for systems with different requirements. They have high reference value for engineering practice. References: [1] SIMATIC MicroComputing User Manual. SIEMENS. [2] Liao Changchu, ed. PLC Programming and Application. Beijing. Machinery Industry Press. 2002.
Read next

CATDOLL 123CM Laura (TPE Body with Hard Silicone Head)

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22