Share this

Research on PROFIBUS Fieldbus Communication Protocol

2026-04-06 06:00:17 · · #1
Abstract: Based on the ISO/OSI Open Systems Interconnection model, this paper details the structure of the PROFIBUS communication protocol, including the data transfer technology of the physical layer, the message format of the data link layer, and various application specifications of the user interface. The bus configuration, master-slave working mechanism, and methods for developing related interfaces of the three PROFIBUS protocol specifications—PROFIBUS-DP, PROFIBUS-PA, and PROFIBUS-FMS—are studied, along with the software flow for the slave station. The analysis and research of the PROFIBUS fieldbus protocol has significant practical implications. Keywords: Fieldbus, PROFIBUS protocol, SPC3, SPC4 Research on the PROFIBUS protocol will be of great significance. Keywords: Fieldbus, PROFIBUS-DP protocol, SPC3, SPC4 . 1. Introduction PROFIBUS is an open fieldbus standard conforming to the European standard EN50170. PROFIBUS includes three compatible parts: PROFIBUS-DP, PROFIBUS-PA, and PROFIBUS-FMS. PROFIBUS-DP (Decentralized Periphery) is an optimized high-speed and inexpensive communication connection used for communication between device-level control systems and distributed I/O; PROFIBUS-PA (Process Automation) is suitable for process automation in industrial production; PROFIBUS-FMS (FieldMessage Specification) is used for object-oriented applications and general-purpose data communication between the unit level and the field level in industrial automation systems. Due to the good openness of the PROFIBUS fieldbus, it has strong interoperability and substitutability. Any fieldbus device that supports the PROFIBUS protocol can be easily integrated into a PROFIBUS network. These characteristics have led to its rapid popularization and application in chemical, metallurgical, machining, and other automatic control fields within just a few years. Studying its communication protocol is beneficial for us to better master PROFIBUS fieldbus technology and develop fieldbus products. 2 PROFIBUS Protocol Structure The PROFIBUS protocol is based on the ISO 7498 international standard, using the Open Systems Interconnection (ISO/OSI) model as a reference. Its protocol structure is shown in Figure 1. To improve data transmission efficiency, PROFIBUS-DP and PA only define layers 1 and 2 and the user interface; layers 3 to 7 are not described. PROFIBUS-FMS only defines layers 1, 2, and 7 and the user interface. Layers 3 to 6 are not described. This fluid structure ensures fast and efficient data transmission, and the Direct Data Link Mapping (DDLM) makes it easy for the user interface to access the second layer. 2.1 Physical Layer (Layer 1) PROFIBUS specifies the data transmission medium and data transmission format at the physical layer. PROFIBUS-DP and FMS use shielded twisted-pair cables to achieve symmetrical data transmission, conforming to the EIARS-485 standard. Each end of a cable within a bus segment has a terminator, with a selectable transmission rate from 9.6 kbit/s to 12 Mbit/s. The set baud rate applies to all devices on the bus segment. Bus terminators must be installed at both ends of an RS-485 bus segment. Each bus terminator contains a pull-up resistor and a pull-down resistor, connected to the positive power supply voltage VP and the data reference potential DGND, respectively. This ensures a defined idle potential even when the bus is idle. RS-485 data transmission is based on half-duplex, asynchronous, gapless synchronous transmission. Data transmission uses non-return-to-zero (NRZ) encoding, with each frame character being 11 bits. During data transmission, the positive potential on the RXD/TXD-P line (B conductor) corresponds to binary "1", and the positive potential on the RXD/TxD-N line (A conductor) corresponds to binary "0". A schematic diagram of the frame character format and NRZ encoding signal is shown in Figure 2. PROFIBUS-PA employs data transmission technology compliant with IEC 1158-2, ensuring the intrinsic safety of field devices and bus-based power supply, with a data transmission rate of 31.25 kbit/s. The transmission medium uses shielded or unshielded twisted-pair cable, and each end of a bus segment is terminated by a passive RC line terminator. Up to 32 stations can be connected to a single PA segment. The maximum bus segment length depends largely on the power supply, wire type, and current consumption of the connected stations. Data transmission uses a non-DC bit-synchronized Manchester encoded line protocol (H1). When transmitting data using Manchester, each frame character is 11 bits; a binary "0" is sent when the signal changes from 0 to 1, and a binary "1" is sent when the signal changes from 1 to 0. Data transmission is achieved by adjusting the basic current IB of the bus system by ±9mA. A schematic diagram of the frame character format and current adjustment encoding method is shown in Figure 3. 2.2 Data Link Layer (Layer 2) The PROFIBUS data link layer is responsible for error-free data transmission between adjacent nodes. PROFIBUS uses a data message transmission method in this layer, adding headers and trailers identifying different application functions to the beginning and end of the data frame to form different types of messages. On the PROFIBU bus segment, the master node is the active node, sending control commands via request messages; the slave node is the passive node, responding to the master's requests and sending response messages. Several important data message formats are defined as follows: CRC is used to constrain the transmitted message; CRC is calculated and a 16-bit checksum field is appended. The data link layer message format provides a high level of transmission security; all messages have a Hamming distance (HD=4). Based on the defined HD=4, secure and reliable data transmission is characterized by gapless character spacing; data messages that do not conform to the specified format must be retransmitted. Applying HD=4 can check for the following errors: character format errors (parity, frame errors, exceeding limits), protocol errors, incorrect start/end delimiters, incorrect frame check bytes, and incorrect message lengths. To ensure smooth data exchange with slave stations, the PROFIBUS master station should adhere to the following message sequence during startup: 1. Request diagnostics; 2. Change station address (optional service, for Class 2 masters); 3. Parameterize slave station; 4. Configure slave station; 5. Request diagnostics before data exchange to ensure system startup; 6. Data exchange; 7. Global control. If the highest bit MSB in the destination address (DA) and source address (SA) is 1, the message header will immediately follow with DSAP and SSAP; if this bit is 0, it corresponds to the default value SAP, used for data communication, and the message header will not contain DSAP and SSAP. The upper-layer user interface invokes PROFIBUS data transmission services through the Service Access Point (SAP) of the data link layer. PROFIBUS uses services including SRD (response required for sending and requesting data) and SDN (no response required for sending data). Each SAP has a well-defined function. PROFIBUS-DP has the following SAPs: Default SAP: Data Exchange (Write_Read.Data) SAP54: Master-to-Master SAP (M-M Communication) SAP55: Change Station Address (Set.SlaveAdd) SAP56: Read Input (Rd.Inp) SAP57: Read Output (Rd.Outp) SAP58: Control Commands to DP Slave Station (Global-Control) SAP59: Read Configuration (Get.Cfg) SAP60: Read Diagnostic Information (Slare.Diagnosts) SAP61: Transfer Parameters (Set-Prm) SAP62: Verify Configuration (Chk_Cfg) Among the various PROFIBUS protocol specifications, only the FMS protocol defines the application layer. The services provided by PROFIBUS-FMS at the application layer are a subset of the services provided by the ISO 9506 Manufacturing Information Specification (MMS). These services have been optimized for fieldbus applications and have been enhanced with communication object management and network management capabilities. The execution of FMS services is described by service sequences, which include internal service operations called service primitives. Service primitives describe the internal operations between the requester and responder. PROFIBUS-FMS provides a large number of application services to meet the diverse communication requirements of different devices, such as acknowledged and unacknowledged services. Acknowledged services are only used in connection-oriented communication relationships. The service requester uses a "request service primitive" to request a service. After this primitive is transmitted on the bus, it sends an instruction service primitive to the application process of each receiving station, and the backup receiving station responds using an acknowledgment service primitive. Unacknowledged services do not have an acknowledgment service primitive. The mapping from the application layer to the data link layer services is handled by the LLI (Lower Layer Interface), whose tasks include data flow control and connection monitoring. The LLI provides various types of communication relationships with different connection capabilities, as illustrated in Figure 5. The PROFIBUS user interface specifies the application functions available to PROFIBUS devices and the behavioral characteristics of various types of systems and devices. PROFIBUS-DP has two types of master stations: one type handles user data exchange with designated slave stations, and the other type is used for commissioning purposes. A single type II master station can simply control one slave station. Depending on the bus extension, whether it's an 12M baud rate, and the operating mode of the ASIC chip, the speed of data conversion and updating is often faster than the speed at which the user accesses this data, similar to the process image in a PLC; the user always obtains the latest data upon access. A message cycle between a PROFIBUS-DP master and a DP slave consists of a request frame (polling message) sent by the DP master and a response or reply frame returned by the DP slave. The DP slave station is accessed sequentially by the DP master station according to a polling table. User data is exchanged continuously between the DP master station and the DP slave station, regardless of the content of the user data. In the power-on state, the DP slave station can only receive set-slave-add messages to change the station address. After internal startup, the DP slave station expects a parameterization message (Set-Prm) and rejects other types of messages. After the slave station is correctly parameterized, the DP slave station enters a configuration waiting state, receives configuration messages (Get-Cfg), and compares them with the actual configuration of the slave station. Only after the configuration message is correctly received and matches the configuration result of the slave station can the DP slave station finally enter the data exchange state and exchange data with the DP master station through data communication messages (Data_Exchange). PROFIBUS-PA data transmission uses the basic PROFIBUS-DP function DPV0 and the extended function DPV1. DPV1 lays the foundation for PROFIBUS-PA. DPV0 is used to realize centralized data exchange between a master station and a series of slave stations under the condition of applying Data-Exchange service on the basis of circular connection (MSCY1). Compared with DPV0, DPV1 is extended in the following two aspects: (1) The connection of MSCY1 is supplemented with non-circular service (MSAC-C1 channel); (2) A new connection (MSAC-C2 connection) is generated for two types of master stations (monitoring stations). The non-circular data connection expands the existing MSCY-C1 connection, uses the new services DDLM-Read and DDLM-Write to realize the reading and writing of data of all slave stations, and maps it to the second-level SRD service (using SAP50 and SAP51), as shown in Figure 6: In addition, PROFIBUS-PA defines equipment profiles for all common measurement transmitters and some commonly used field devices, covering the following: measurement transmitters (pressure, level, temperature and flow), digital inputs/outputs, analog inputs/outputs, valves, positioners, etc., and also defines a function block model that conforms to international standards. The user interface of PROFIBUS-FMS is also known as the FMS profile. The profile provides interchangeability of devices to ensure that devices produced by different manufacturers have the same communication functions. Currently, PROFIBUS-FMS has defined the following profiles: (1) Communication between controllers This communication profile defines the FMS services used between programmable logic controllers (PLCs). According to the type of controller, it specifies the services, parameters and data types supported by each controller; (2) Building automation profile This profile provides a specific branch and service as a common foundation in building automation. This profile describes the use of FMS for monitoring, closed-loop and open-loop control, operation control, alarm handling and system file management in building automation systems. (3) Low-voltage switchgear This industry standard is an industry-oriented FMS application standard, which specifically describes the application behavior of low-voltage switchgear through FMS in the communication process. Since both PROFIBUS-FMS and PROFIBUS-DP use unified transmission technology and bus access protocol, FMS devices and DP devices can operate in a mixed manner on the same bus segment, and the two protocols can also be executed on one device at the same time, which makes it easier to build a PROFIBUS network. 3 Implementation of PROFIBUS communication interface The openness of the PROFIBUS protocol ensures that it can be implemented on any microprocessor, but the communication rate will be greatly limited when using the microprocessor's serial communication interface to implement bus data transmission at a ratio of 1:3. Using a protocol chip can not only accelerate the execution of the protocol, but also improve the stability of the bus module and reduce the user's self-development time. Therefore, it is a wise choice to develop a PROFIBUS interface using a protocol chip. 3.1 Implementation of the PROFIBUS-DP Interface Siemens provides the SPC3 protocol chip for use with optimized PROFIBUS-DP intelligent slave stations. The SPC3 chip user development kit provides a solid-state program in source code form, which enables the connection between the SPC3's internal registers and the application interface. The solid-state program runs based on the microprocessor in the field device, providing a simple and integrated interface for applications. While using the SPC3 does not necessarily require a solid-state program, its use saves users time in independent development because the SPC3's registers are fully formatted. The PROFIBUS-DP slave program is mainly used for executing the DP protocol and realizing data exchange between the DP master and slave stations through the I/O macro interface. It is also used for slave diagnostics and system anti-interference design. The DP slave program flow is shown in the following figure: Before SPC3 can operate normally, initialization is required to configure necessary registers. This includes setting interrupt enable for the protocol chip, writing the slave identification number and address, setting the SPC3 mode register, and configuring the diagnostic buffer, parameter buffer, configuration buffer, address buffer, and initial length. Based on these initial values, pointers to each buffer and auxiliary buffer are derived. The output buffer, input buffer, and pointers are determined according to the length of the transmitted data. Only after SPC3 initialization can the master and slave stations exchange data. The master station first sends a diagnostic request message to check the slave station's readiness. Upon receiving the required response, it checks if another master station is using the slave. If not, parameter settings and configuration checks are performed, and then a diagnostic message request is sent again. If parameterization or configuration errors occur, or if another master station is using the slave, the master station returns to the initial state and rechecks the slave station's readiness. If a static user diagnostic occurs or the slave is not ready, the master station will continuously send message requests until no such diagnostic information is received. Data exchange then proceeds when no error information is received. 3.2 Implementation of the PROFIBUS-PA Interface Siemens provides the SPC4 protocol chip and the SIM1Modem chip for the PROFIBUS-PA interface. The SPC4 chip integrates a complete PA/DP protocol, contains 1.5kbyte of on-chip message memory, uses a 44-pin PQFP package, and has a maximum data transfer rate of 31.25kbit/s. The SPC4 also provides a synchronous interface for connecting to SIM1. The SIM1 chip supports all transmit and receive functions, absorbs additional power current on the bus, and has high impedance characteristics, supplying power to the entire device and other components. Data transmission conforms to the Manchester encoding technology of IEC 1158-2. The SPC4 protocol chip connects to the current-isolated interface driver through the Request to Transmit (RTS), Transmit Data (TXD), and Receive Data (RXD) signals. The transmitter converts the parallel data structure into a serial data stream; the receiver converts the serial data stream into a parallel data structure. After completely reading a character, it generates an RB-FULL signal and checks for message errors. The circuit structure of the PROFIBUS-PA interface implemented using the SPC4 and SIM1 chips is as follows: The software flow of the PROFIBUS-PA interface is similar to that of the DP slave, and will not be described in detail here. 3.3 Implementation of PROFIBUS-FMS interface The implementation method of PROFIBUS-FMS interface is similar to that of DP slave, except that the protocol chip SPC4 is required. After the FMS interface is implemented, the relevant equipment can provide the following services, as shown in Figure 9. 4 Conclusion As a popular process control fieldbus, PROFIBUS is developing rapidly with its unparalleled advantages and its market share is expanding rapidly. Studying the PROFIBUS communication protocol and mastering the PROFIBUS communication technology is of great practical significance for developing PROFIBUS bus-related products and promoting the development of automation technology in China. References [1] PROFIBUS Technical Guideline, PROFIBUS-DP Extensions to EN50 l 70 (DPV 1) Version 2.0, April 1998. [2] PROFIBUS Protocol manual. Hilscher. [3] Yang Xianhui et al. Fieldbus technology and its application. Beijing: Tsinghua University Press, 1999. [4] PROFIBUS Fieldbus Standard (Chinese Version). PROFIBUS Professional Committee (CPO).
Read next

CATDOLL 60CM Sasha Silicone

Height: 60cm Silicone Weight: 2.7kg Shoulder Width: 14cm Bust/Waist/Hip: 27/24/31cm Oral Depth: N/A Vaginal Depth: 3-8c...

Articles 2026-02-22