Share this

Profibus-DP-based PLC and PC fieldbus control system

2026-04-06 06:21:47 · · #1
Abstract: Currently, most microcomputer-based oil pump control systems used in the petrochemical industry employ self-developed single-chip microcomputer systems to control oil pumps, connecting to a PC's serial port via an RS-485 bus (using an RS-232 to 485 converter), relying on upper-computer management software to monitor the lower-level machine. However, the equipment in the chemical industry is complex, and the RS-485 bus method has weak anti-interference capabilities, leading to decreased system stability and complex debugging. This system adopts PROFIBUS-DP fieldbus technology, with the lower-level machine being a PLC with extremely strong anti-interference capabilities, and the upper-level machine using a dedicated PROFIBUS communication card CP5611. The entire system is constructed, greatly improving its distribution, reliability, and scalability. This article, based on a currently developed petrochemical oil pump control system based on PROFIBUS-DP, mainly introduces fieldbus technology and the related technologies for achieving PROFIBUS bus and PLC communication. Keywords: PROFIBUS-DP; PLC; Fieldbus; Introduction The development of technologies such as automation control, computers, communications, and networks has led to profound changes in the field of automation. The rapid development of information technology has led to the gradual formation of fully distributed network-integrated automatic control systems in automation systems. Fieldbus is a new technology that has developed in response to this trend. Fieldbus is a system used in production sites to achieve bidirectional serial multi-node digital communication between microcomputer-based measurement and control equipment. It is also known as an open, digital, multi-point communication underlying control network. Fieldbus control systems (FCS) are a new generation of control systems based on fieldbus, following base-type pneumatic instrument control systems, electric unit combined analog instrument control systems, centralized digital control systems, and distributed control systems (DCS). Currently, influential fieldbuses include Foundation Fieldbus (FF), LonWorks, PROFIBUS, CAN, and HART, among others. PROFIBUS is one of the most popular fieldbus technologies. PROFIBUS is a national industrial fieldbus protocol standard developed in Germany in the early 1990s, designated DIN19245. PROFIBUS became the European standard EN50170 in 1996 and a component of the international standard IEC61158 at the end of 1999, and has been accepted worldwide. PROFIBUS can be divided into three compatible versions based on application characteristics: PROFIBUS-DP, PROFIBUS-FMS, and PROFIBUS-PA. PROFIBUS-DP: An optimized high-speed, low-cost communication connection designed for communication between automatic control systems and distributed I/O at the device level. Using PROFIBUS-DP modules can replace expensive 24V or 0-20mA parallel signal lines for data transmission in distributed control systems. PROFIBUS-FMS: Solves general-purpose communication tasks at the workshop level, improves a large number of communication services, and completes medium-speed cyclic and non-cyclic communication tasks. It is used in general automation control such as textile industry, building automation, electrical drives, sensors and actuators, programmable logic controllers, and low-voltage switchgear. PROFIBUS-PA: Designed specifically for process automation, it uses standard intrinsically safe transmission technology and implements the communication protocols specified in IEC 1158-2. It is used in applications with high security requirements and bus-powered stations. 1 PROFIBUS Basic Characteristics 1.1 Protocol Structure The PROFIBUS protocol structure is based on the ISO 7498 international standard and uses the Open Systems Interconnection (OSI) model as a reference. The PROFIBUS protocol architecture adopts the OSI layers 1, 2, and 7. The physical layer defines the physical characteristics, connecting the data link layer above and the medium below. During transmission, the physical layer encodes and modulates information from the data link layer, driving the medium with physical signals. During reception, the physical layer demodulates and decodes the signals from the medium. The data link layer defines the bus storage protocol, executes bus communication rules, and handles error detection, error recovery, arbitration, and scheduling. The application layer defines application functions, translates information commands, and understands the structure and meaning of data. The user layer contains data and application software. 1.2 Transmission Technology Since a single transmission technology cannot simultaneously meet requirements for transmission reliability, transmission distance, and high-speed transmission, PROFIBUS provides three types: RS485 transmission via DP and FMS; IEC1158-2 transmission via PA; and fiber optic (FO) transmission. PROFIBUS-DP and PROFIBUS-PA can be connected via a DP/PA coupler or link. 1.3 Access Protocol PROFIBUS's DP, FMS, and PA all use a single bus access protocol, implemented through Layer 2 of the OSI reference model, including data reliability, transmission protocols, and message processing. The PROFIBUS bus access protocol includes token passing between masters and master-slave passing between slaves. Only one master can hold a token at any given time, and the token is passed to the next master in a loop until its time slice expires or there is no more information to transmit. This ensures that each master has control of the bus for a limited time. Simultaneously, the master and slave stations use a polling access method, allowing for three possible system configurations: pure master-slave system; pure master-master system; and hybrid system. 2. Basic Communication Methods of SIMATIC S7-200 Series PLCs SIMATIC S7-200 series PLCs are suitable for automation of detection, monitoring, and control in various industries and applications. The powerful functions of the S7-200 series enable it to perform complex control functions whether operating independently or connected in a network. The CPU models in this PLC series are: CPU 221, CPU 222, CPU 224, CPU 226, and CPU 226XM. This control system uses the CPU224, which has four communication modes: 1. PPI Mode: The PPI communication protocol uses a standard two-core shielded twisted-pair cable for networking, physically employing RS485 level with baud rates of 9.6 kbit/s, 19.2 kbit/s, and 187.5 kbit/s. The PPI communication network is a token-passing network. 2. MPI Mode: The S7-200 can connect to the MPI network via its built-in interface, with baud rates of 19.2 kbit/s and 187.5 kbit/s. The S7-200 CPU acts as a slave in the MPI network, and they cannot communicate with each other. 3. Free Communication Mode: The S7-200 allows users to define their own communication protocols, enabling communication with any other devices or controllers using publicly available communication protocols. The maximum baud rate is 38.4 kbit/s (adjustable). 4. PROFIBUS-DP network: In S7-200 series CPUs, the PROFIBUS-DP network protocol can be supported by adding the EM277 expansion module. The maximum transmission rate can reach 12 Mbit/s. 3. The connection bridge between field signals and system monitoring software—OPC fieldbus: As a developed control network, it enables signal communication between field devices and between field devices and the control room. After field signals are transmitted to the monitoring computer, how to achieve information communication and transmission between various applications within the computer, that is, how to make field information appear on various application platforms of the computer? OPC perfectly solves this information transmission problem. OPC (OLE for Process Control) is an object linking and embedding technology in process control, developed based on Windows Object Linking and Embedding (OLE), Component Object Model (COM), and Distributed Component Object Model (DCOM) technologies. OPC is an open interface standard and technical specification. Its role is to provide a unified and standard interface specification for server/client connections. According to this unified standard, the various clients/servers can form a connection as shown in Figure 1, creating a simple, plug-and-play connection relationship. [align=center]Figure 1[/align] With OPC as a universal interface, field signals can be easily linked to upper-level monitoring and human-machine interface software. They can also be linked to certain general-purpose development platforms on PCs, such as VB, VC++, and Excel. This greatly facilitates the development of upper-level monitoring software. 4 System Example Introduction In the petroleum industry, due to the complexity of control, interference between various field devices, and high system reliability requirements, high-reliability central controllers such as PLCs and fieldbus technologies such as PROFIBUS are often used in practical applications. In the intelligent oil dispensing control system, the SIMATIC S7-200 CPU224 is used to control the oil pump, and the system is monitored by an industrial computer (or PC) via the PROFIBUS-DP fieldbus. 4.1 Intelligent Oil Dispensing Control System Composition This system is a single-master system composed of PROFIBUS-DP, featuring high-speed data transmission characteristics at the simple device level. The system composition is shown in Figure 2. [align=center] Figure 2[/align] (1) The entire control system is connected to two PROFIBUS-DP buses. Each bus contains one master station and 20 DP slave stations. The two master stations and the invoicing agency form a local area network. The master station and the slave station are in a master-slave relationship. (2) The two industrial control computer master stations and the invoicing machine form a local area network through the TCP/IP protocol. (3) The system uses the SIMATIC industrial control computer as the DP type 2 master station. The industrial control computer is connected to the PROFIBUS-DP bus through the fieldbus interface card CP5611, which can complete configuration, operation and other functions. The application program on the master station and the information transmission between the CP5611 are implemented using the OPC general interface service software. (4) Each slave station completes the monitoring and control of the two oil dispensing systems. It uses the SIMATIC S7-200 series CPU224 module and connects to the PROFIBUS-DP network as a DP slave through the EM 277 expansion module. It sends data to the host computer in master/slave mode. 4.2 Software Design of the Intelligent Oil Dispensing Control System The software component includes a Windows 2000 operating system, SIMATIC OPC interface service software, master station monitoring software, and slave station programming software. 4.2.1 Slave Station Oil Dispensing Control System PLC Communication Interface Software Design The PLC of the slave station oil dispensing control system uses Step7, the programming tool配套 (matching) with SIMATIC S7-200, to complete functions such as hardware configuration, parameter setting, PLC program writing, testing, debugging, and document processing. Typically, the user program consists of organization blocks (OB), function blocks (FB, FC), and data blocks (DB). OB is the interface between the system operation program and the application program, used to control program execution; FB and FC are user subroutines; DB is a user-defined data storage area, which in this system is the data interface point between the host computer monitoring software and the Step7 program. Configuring the corresponding DB block enables the data interface between the host computer monitoring software OPC and the Step7 program. The communication interface program is as follows. CALL “DP-SEND” CPLADDR:=W#16#170 SEND:=P#DB1.DBX0.0 BYTE240 DONE:=M0.0 ERROR:=M0.1 STSTUS:=MW1 CALL DP-RECV CPLADDR:=W#16#170 RECV:=P#DB2.DBX0.0 BYTE240 NDR:=M128.0 ERROR:=M128.1 STATUS:=MW46 DPSTATUS:=MB120 L DB2.DBW 0 L 0 == I JC m001 CALL FC 63 M001: NOP 0 CALL FC 64 4.2.2 Master Station Communication Interface Software Design The industrial control computer acts as the master station, exchanging data with the slave station through the communication card CP5611. Selecting the "Set PG/PA Interface" option in the operating system control panel allows for hardware configuration, automatically completing the bus configuration. However, for self-developed slave stations with PROFIBUS-DP interfaces, a custom *.GSD file needs to be added to the configuration library. This system adds the EM 277's GSD file to the OPC service interface configuration library. After completing the bus configuration, an ldb file is generated for system operation. 4.2.3 Industrial PC Human-Machine Interface Design The industrial PC's human-machine interface design, namely the oil dispensing control and management system, uses the Windows 2000 operating system as a platform. Through the standard communication interface OPC, the program is written using the Microsoft VC++ programming language to fulfill the system's control requirements, enabling monitoring and management of the oil depot's storage, transportation, and dispensing processes. After the invoice machine issues an invoice, it transmits the signal to the oil dispenser via the local area network. The oil dispenser then uses the PROFIBUS-DP network to notify the lower-level PLC, which controls the oil pump and detects the oil level gauge and temperature, automatically completing the oil dispensing process. Figure 3 shows the main program flowchart of the oil dispenser. Figure 4 is the main program flowchart of PLC S7-200. [align=center] Figure 3 Figure 4[/align] 5 Conclusion Engineering practice has proven that this control system adopts PROFIBUS-DP network technology to realize distributed control. The network has high speed, high reliability, good openness, and strong anti-interference ability, which brings convenience to installation, debugging and equipment maintenance, and improves production efficiency and management level. This network system has a high performance-price ratio and can be expanded to a larger system according to user requirements. References: [1] Fieldbus Technology and Application. Yang Xianhui. Tsinghua University Press [2] An Example of PROFIBUS-DP Field Technology Application. Jia Aiqin, Wang Xin, Fan Haizhen. Automation Expo [3] SIMATIC S7-200 Programmable Controller. Siemens (China) Co., Ltd. [4] Siemens S7-200 Reference Manual [Z]. Siemens (China) Co., Ltd.
Read next

CATDOLL Kelsie Soft Silicone Head

You can choose the skin tone, eye color, and wig, or upgrade to implanted hair. Soft silicone heads come with a functio...

Articles 2026-02-22
CATDOLL 115CM Alice TPE

CATDOLL 115CM Alice TPE

Articles
2026-02-22
CATDOLL 135CM Tami

CATDOLL 135CM Tami

Articles
2026-02-22