Share this

Profibus-DP Field Communication Master Station Design

2026-04-06 04:48:59 · · #1
Abstract: This paper discusses in detail the Profibus-DP protocol structure, communication mechanism, and technical characteristics, and combines Profibus-DP technology with embedded technology to develop a Profibus-DP master station with high openness, real-time performance, and reliability. Keywords: Fieldbus, Profibus-DP, Master station, VxWorks Fieldbus is one of the hot topics in the field of automation today, and its emergence marks the beginning of a new era in the field of industrial control technology. Among the many fieldbus products, Profibus (Process Fieldbus), as Europe's leading open fieldbus, has been accepted worldwide and has become an international open fieldbus standard. Together with Foundation Fieldbus (FF), it forms the two major fieldbus systems, widely used in manufacturing, process, and building automation. Embedded systems are application-centric, with customizable hardware and software, suitable for applications with strict requirements on functionality, reliability, cost, size, and power consumption. Their applications span various fields such as industrial control, military, networking, home appliances, and finance. Combining Profibus-DP technology with embedded hardware and software will greatly improve system quality and enhance its openness, real-time performance, and reliability. 1. Profibus-DP Protocol Structure and Technical Characteristics Profibus can be divided into three compatible versions based on application characteristics: Profibus-FMS (Fieldbus Message Specification), Profibus-DP (Decentralized Periphery), and Profibus-PA (Process Automation). Profibus-FMS is used for general workshop-level communication tasks, suitable for monitoring networks with medium transmission speeds and complex communication systems. Profibus-DP is used for high-speed data communication at the device level. The central controller communicates with distributed field devices via high-speed serial lines. It is a high-speed, low-cost communication system suitable for high-speed data transmission in distributed control systems. This type of system consists of DP Class 1 master stations (DPM1, central programmable controller), DP Class 2 master stations (DPM2, programmable, configurable, and diagnostic devices), and DP slave stations (devices that acquire/transmit input/output information). Profibus-PA is an extension of Profibus-DP to the field. It has intrinsically safe characteristics and is suitable for applications with high intrinsic safety requirements and bus-powered sites. The PROFIBUS protocol structure is a simplification of the OSI reference model, as shown in Figure 1. This structure ensures fast and efficient data transmission as well as low system cost. PROFIBUS-DP uses a physical layer, a data link layer, and a user layer. The physical layer specifies the line medium, the type of physical connection, and the electrical characteristics. PROFIBUS-DP typically uses RS485 transmission technology with shielded twisted-pair copper cable as the transmission medium, achieving speeds of 9.6 kbps to 12 Mbps. Fiber optic transmission technology can be used in situations with high electromagnetic interference or long transmission distances. The Fieldbus Data Link Layer (FDL) specifies media access control, frame format, service content, and the bus management services FMA1/2 for the physical and data link layers. The Media Access Control (MAC) layer describes the hybrid access methods used by PROFIBUS: token passing between masters and master-slave communication, where the master obtains access control by acquiring a token. PROFIBUS specifies that a frame character consists of 11 bits: a start bit of 0, 8 data bits, an even parity bit, and a stop bit of 1. The FDL layer provides four services: SDA, SRD, SDN, and CsRD. DP bus transmission relies on the SDN and SRD FDL services. The FMA1/2 functions mainly include forced reset of the FDL and PHY, setting parameter values, reading status, reading events, and configuration. The user layer includes the Direct Data Link Map (DDLM) and the user interface/user. The user interface details the device behavior of various Profibus-DP devices, and the DDLM maps all functions transmitted in the user interface to the fieldbus data link layer FDL and FMA1/2 services. 2. Profibus-DP Communication Mechanism The main purpose of Profibus-DP is to perform fast, cyclical data exchange between a powerful master station and several simple slave stations. Therefore, the system primarily performs master-slave communication tasks. In addition, Profibus's hybrid bus access mode also allows master-master communication between Class 1 and Class 2 master stations. In the Profibus-DP system, the communication types between DDLM and DP slave stations mainly include: reading slave diagnostic information, parameter setting and configuration, and cyclical user data exchange. The Profibus-DP master-slave communication process can be roughly divided into the following stages: the master station's first diagnosis of the slave station, parameterizing the slave station, configuring the slave station, the master station's second diagnosis of the slave station, and the cyclic data exchange between the master station and the slave station. For multi-master communication systems, the communication between DPM1 and DPM2 includes: reading diagnostic information about the DP slave station, uploading and downloading parameters, activating bus parameters (without confirmation), activating and deactivating parameter sets, and selecting the operating mode of DPM1. The communication between DPM2 and the slave station is non-cyclic, including reading the slave station's communication interface configuration, input/output data, and setting the slave station address. 3 Profibus-DP Fieldbus Master Station Overall Design Profibus is an open standard. In principle, this protocol can be implemented on any processor by installing an asynchronous serial communication interface (UART) inside or outside the processor. Based on the above characteristics, there are two main solutions for developing a Profibus-DP master station: ① Implemented by running a complete protocol stack on a microprocessor. This approach involves implementing the PROFIBUS protocol entirely in software. Developing the entire protocol stack software is very difficult, and most developers typically purchase it from specialized vendors. ② Implementation using a protocol ASIC chip and its extended firmware. This is the most common implementation. A dedicated ASIC chip implements the media access control function of the PROFIBUS protocol data link layer; other functions of the data link layer are implemented by a microprocessor running its extended firmware. Currently, there are three main types of ASIC chips available for this approach: Siemens' ASPC2, M2C's IX1, and IAM's PBM. When implementing a master station using this approach, there are two options: one is to purchase a complete development platform from the aforementioned three companies, including the ASIC chip, firmware, and corresponding hardware and development software; the other is to purchase only the ASIC chip and necessary hardware and software development tools, while writing and implementing the firmware yourself. This method is more difficult and has a longer development cycle. A typical example of using the latter approach to implement a master station is HMS. Their Anybus-M master station module uses Siemens' ASPC2 chip, but the extended firmware is written by HMS itself, forming a complete module that is then provided to other developers. To shorten the development cycle, this master station design adopts the Anybus-M master station interface module from HMS, thereby reducing the workload of hardware and software when building the DP master station. This design builds a Profibus-DP single master station system. The Anybus-M module can be set as DPM1 and DPM2 during initialization. Therefore, in addition to implementing the master-slave function between DPM1 and the DP slave station (including reading the diagnostic information of the DP slave station, setting the slave station parameters, checking the communication interface configuration, cyclic data exchange, and global control commands), the developed master station also needs to implement the master-slave function between DPM2 and the DP slave station (including reading the communication interface configuration of the slave station, input/output data, setting the slave station address, etc.). 3.1 Hardware Design The hardware circuit diagram of the Profibus-DP master station is shown in Figure 2. The system hardware mainly consists of a CPU module SCM7020B based on the PC/104 bus, an Anybus-M module, a CPLD logic decoding circuit, and a reset circuit. The Anybus-M master interface module interfaces with an external processor via a DPRAM. The PC/104 accesses this DPRAM to exchange data between the master and slave stations, as well as to control access to the master module. Interrupts or the BUSY signal line resolve conflicts when the PC/104 and Anybus-M master interface module simultaneously access the DPRAM. A CPLD is used for address decoding, generating the chip select signal CS and read/write control signals. A reset circuit is used to reset the PC/104 and the Anybus-M module. 3.1.1 Anybus-M Master Interface Module The Anybus-M master interface module has implemented the necessary network protocols. It has an onboard microprocessor that independently handles communication protocols, supporting both DP and DPVR1. It features 4KB of DPRAM, ensuring high-speed transmission of up to 1536 bytes of cyclic input/output data. Furthermore, this module can be integrated into industrial automation equipment to communicate with industrial field devices. Typical applications include human-machine interfaces, PLCs, CNC machines, robots, and intelligent visualization devices. Figure 3 shows a simplified internal structure diagram of the Anybus-M master module, divided into two parts: the application programming interface and the fieldbus interface. ① Application Programming Interface. The module's interface with the microprocessor is a 4KB DPRAM. The DPRAM is divided into the following areas according to its application: Input/Output Data Area, where the application writes data to the slave station into the Input area and reads received slave station data from the Output area; Mailbox Input/Output Area, where the application instructs the module to perform a specific operation (such as initialization, reading slave station diagnostics, setting slave station addresses, etc.) by sending mailbox commands, and simultaneously reads the module's response from the mailbox output area; Fieldbus Specific Arc, a, which stores information on the master and slave network, such as slave station configuration lists, data transmission lists, slave station diagnostic lists, master station status tables, etc.; Cortrol Register Area, which stores module version information, initialization parameters, fieldbus type, event notification reasons, etc.; Handshake Registers, used for area allocation and reclamation, event notification, sending/receiving mailbox commands, etc. ② Fieldbus Interface. This module has completed the fieldbus low-level protocol without application intervention; it provides an RS485 interface through which the module can be connected to a Profibus-DP network. 3.1.2 SGM7020B CPU Module Based on PC/104 Bus PC/104, as an industrial control bus specifically defined for embedded control, is an optimized, small-stack embedded control system. It is small in size and compact in structure, and can be embedded into products with high requirements for size and power consumption, and is increasingly widely used in the industrial control field. The SCMT020B is an embedded microprocessor using the PC/104 bus. It integrates a 10/100Base-T Ethernet interface and a high-performance graphics processor; it uses an x86-compatible 64-bit sixth-generation processor with a maximum operating speed of 300 MHz. Its memory addresses D2000~DFFF (8KB) ​​and C8000~CFFF (32KB) are free and can be allocated to external extended RAM; interrupts IRQ5, IRQ9, and IRQ10 are available, and other external interrupt sources can be connected. 3.2 Software Design Software design is the key and challenging aspect of the entire master station design. To improve the real-time performance and reliability of the entire system, the widely used 32-bit real-time operating system VxWorks is run on a PC/104. The software design mainly involves writing VxWorks device drivers, setting and downloading network configurations, and controlling access to the Anybus-M master station module. 3.2.1 Writing VxWorks Device Drivers The application communicates with the hardware through the driver. The hardware operation of the drive system is handled by the BSP. The driver in the BSP manages devices in a specific target environment, controlling and initializing them. The BSP provides an interface between VxWorks and the hardware environment, responsible for completing hardware initialization upon power-on, providing support for VxWorks to access hardware drivers, and integrating hardware-related and hardware-independent software in VxWorks. 3.2.2 Setting and Downloading Network Configuration Network configuration can be achieved through the Anybus Net-Tool configuration software provided by Anybus, or through mailbox messages. Anybus NetTool configuration software is based on the Windows environment and uses drag-and-drop operations to configure and optimize PROFIBUS networks. In addition, this tool also has online diagnostic functions such as monitoring and modifying I/O data. This independent configuration tool can be integrated into third-party software as a Windows OCX component. The configuration results can be downloaded via the ConfigurationInterface (RS232 serial interface) of the Anybus-M master module. Sending mailbox commands requires developers to be familiar with the specific details of the PROFIBUS-DP communication protocol, configure the entire network configuration, set the master bus parameter set, master user parameter set, slave parameter set, configuration dataset, input/output address allocation, input/output data format, and slave user data unit set, etc., and load the database into the module through the mailbox command in the application. 3.2.3 Access Control of Anybus-M Master Module The Anybus-M master module provides the application with a 4 KB/2KB DPRAM, which the application uses to implement access control of the master module. The application is divided into the following parts. ① Initialization Module: Includes hardware initialization and software initialization. Hardware initialization includes DPRAM checks and hardware checks via mailbox commands. Software initialization is used to set basic operating parameters, such as DPRAM input/output length, operating mode, and DPRAM mode (4KB/2KB). ② Interrupt Handler Module: Upon receiving an interrupt signal, it reads the contents of the handshake register and determines the cause of the interrupt (e.g., event notification, mailbox notification, module initialization, start interrupt, area allocation response, etc.). Based on the interrupt cause, it jumps to the appropriate interrupt handler. ③ Main Program Module: The main program cyclically calls the mailbox handling and data exchange programs. The mailbox handling program is responsible for sending mailbox commands and reading response information; the data exchange program is responsible for the master station reading/writing slave station data and necessary access to control register areas. 4 Conclusion Currently, PROFIBUS-DP research is extensive and its applications are very widespread abroad. However, domestic applications are mostly limited to system integration of foreign products, especially research and development of PROFIBUS-DP master station products. Therefore, developing a master station with independent intellectual property rights is of great significance. Based on the research of the Profibus-DP fieldbus standard, bus protocol, and embedded technology, this paper proposes an implementation scheme for a Profibus-DP master station with high real-time performance and high reliability. The widespread application of the internationally standardized Profibus fieldbus can easily solve the interconnection problem of products from different manufacturers in computer monitoring systems, and plays a significant role in promoting the development of computer monitoring systems towards a "distributed monitoring system based on heterogeneous system interconnection, with monitoring equipment as the primary object."
Read next

CATDOLL 109CM Dora Full Silicone Doll

Height: 109 Silicone Weight: 18.5kg Shoulder Width: 26cm Bust/Waist/Hip: 52/50/57cm Oral Depth: N/A Vaginal Depth: 3-13...

Articles 2026-02-22