HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Application of PROFIBUS protocol to MODBUS bridge in power system [820]

2009-04-04View Original

Thread Content

The application of PROFIBUS protocol to MODBUS bridge in power systems is from the 10th issue of "PLC&FA" magazine "Fieldbus and Network Technology" in 2005. author : School of Information Science and Engineering, Wuhan University of Science and Technology Gan Zhaohui and Liao Xuechao Keywords: Fieldbus PB-M bridge power system 1 Introduction PROFIBUS is an international, open fieldbus standard that does not depend on equipment manufacturers. It is widely used in manufacturing automation, process industry automation and automation in other fields such as building, transportation, electric power and so on. PROFIBUS consists of three compatible parts, namely PROFIBUS-DP (Decentralized Periphery), PROFIBUS-PA (Process Automation), and PROFIBUS-FMS (Fieldbus Message Specification). Among them, PROFIBUS-DP is a high-speed and low-cost bus used for device-level control systems and distributed I/O communication. The transmission medium is twisted pair shielded wire, and the baud rate is from 9600bps to 12Mbps. Using PROFIBUS-DP can replace 24VDC or 4-20mA signal transmission. Modbus is currently one of the most popular protocols in the world in the industrial field. This protocol supports traditional devices with RS-232, RS-422, RS-485 and Ethernet interfaces. Many industrial equipment, including PLC, DCS, smart instruments, etc., are using the Modbus protocol as the communication standard between them. With it, control equipment produced by different manufacturers can be connected into an industrial network for centralized monitoring. When the author designs a power automatic control system, he needs to read the parameters of the relay protection device produced by Xuji Company into the S7-400 PLC of Siemens Company, and integrate it into the SCADA (Supervisory Control And Data Acquisition) monitoring system to participate in the actual chain control. The relay protection device provides an RS-485 communication interface, and its communication protocol is Modbus RTU (Remote Terminal Unit) protocol. In order to realize the conversion from Modbus RTU protocol to PROFIBUS protocol, this design uses Siemens PLC S7-400 as the PROFIBUS master station, uses the Profibus-Modbus bridge (hereinafter referred to as PB-M bridge) produced by Beijing Dingshi Company to communicate with the Modbus slave station, and then connects to the enterprise SCADA system through the industrial Ethernet module and fieldbus module in the PLC, so that the two are perfectly combined. Table 1 Data of remote signaling information point communication 2 Relay protection system The installed capacity of the power station of this power system is 6MW. The main wiring is one machine, one transformer and two circuit lines, and the transformer is a double-turn transformer with a voltage transformation ratio of 10/6.3kV. The 10kV outlet line of the power station goes back to the user station twice. The main monitoring objects of this relay protection system include: a generator set, a main transformer, two 10kV outlet lines, and a 400V factory transformer; the protection objects include the generator, transformer, and 10kV outlet lines of the power station. The relay protection system provides an intelligent communication server whose function is to convert the communication protocol of Xuji equipment into the MODBUS protocol and reserve an RS-485 communication interface for communication with the CP340. The amount of communication data includes remote signaling information points (function code 02, starting query address 0): YX1 ~ YX36, see Table 1. Telemetry information points (function code 03, starting query address 0) YC1 ~ YC18, see Table 2. Table 2 Telemetry information point communication data 3 Communication system 3.1 Communication system composition In this automatic control system, Siemens S7-400 PLC is used as the PROFIBUS master station, and ET 200M and PB-M bridge are used as PROFIBUS slave stations. On the other hand, in the Modbus bus, the PB-M bridge is used as the Modbus master station, and the relay protection device and DC screen equipment are used as the Modbus slave stations. The two parties communicate at a communication rate of 9600bps. The specific network structure is shown in Figure 1: Figure 1 Schematic diagram of network structure 3.2 Introduction to Modbus communication protocol Modbus is currently one of the most popular protocols in the world in the industrial field. This protocol supports traditional devices with RS-232, RS-422, RS-485 and Ethernet interfaces. When communicating on the network, the Modbus protocol determines that each controller must have their device address, be able to identify incoming messages, and decide what actions to take. If a response is required, the controller will generate a reply and send it to the interrogating party using the Modbus protocol. Modbus protocol has two protocols, ASCII and RTU, and does not specify the physical layer. This protocol defines the message structure that controllers can understand and use regardless of the network over which they communicate. The ASCII and RTU protocols of Modbus specify the structure of messages, data, commands and response methods. Data communication adopts the Maser/Slave method. The Master sends a data request message. After the Slave receives the correct message, it can send data to the Master to respond to the request; the Master can also directly send messages to modify the data on the Slave to achieve bidirectional reading and writing. (1) Function code of Modbus communication protocol The Slave side of Modbus performs corresponding actions based on the function code sent from the Master side. Table 3 shows the commonly used function codes in the Modbus RTU protocol. Using them, you can read and write digital and analog quantities on the Slave side. Table 3 Modbus RTU protocol common function codes (2) Modbus RTU communication protocol frame structure Table 4 lists the bits of each byte of the RTU protocol. The typical data frame format of Modbus RTU protocol is shown in Table 5. Table 5 RTU protocol data frame format Table 6 gives an example of reading an integer data in RTU mode: host request. Table 6 Host request example Table 7 gives an example of reading integer data with the protocol slave response. Table 7 Slave machine response example 4 PB-M bridge configuration PB-M bridge is an intelligent PROFIBUS to Modbus-232/485 protocol conversion bus bridge. A mapping data area from PROFIBUS to Modbus is established in the interface RAM, and the protocol conversion and data exchange from PROFIBUS to Modbus are implemented by software. All MODBUS protocol equipment with RS-232/485 interface can use the PB-M bridge to interconnect with the field bus PROFIBUS. On the one hand, the PB-M bridge acts as a PROFIBUS slave station when communicating with PROFIBUS; on the other hand, when communicating with Modbus, it can act as a Modbus master station or a Modbus slave station. Through the bridge's integrated software GSD file, the hardware and software of the bridge can be configured in the Siemens STEP 7 programming software to complete the corresponding communication functions. The following is the detailed hardware and software configuration method: 4.1 Hardware design of PB-M bridge The PROFIBUS slave address and MODBUS master and slave selection of the PB-M bridge can be set through the hardware DIP switch of the bridge. The DIP switch has 8 bits, the highest bit is to set the MODBUS master and slave station (if the bit is set to 0, it will be used as the MODBUS master station; if the bit is set to 1, it will be used as the MODBUS slave station); the other lower 7 bits set the PROFIBUS slave station address. This design uses it as a PROFIBUS slave station (address is 19, binary: 00010011) and MODBUS master station, so the DIP switch is set to: 00010011. The PB-M network bridge comes with a PROFIBUS DP interface, which can be connected to the PROFIBUS fieldbus using a standard PROFIBUS DP connector and a standard PROFIBUS cable. The PB-M bridge also provides an RS-232/485 interface through which other MODBUS slave stations can communicate with the PB-M bridge. It should be noted that a terminal resistor must be added to the RS-485 bus terminal. The PB-M bridge has a built-in terminal resistor. You only need to use an external short wire to connect it to the RS-485 network. Figure 2 is a schematic diagram of the connection of the RS-485 network connection and the terminal resistor: Figure 2 The schematic diagram of the RS-485 network connection and the connection of the terminal resistor 4.2 Software configuration of the PB-M bridge After the hardware connection is configured, you can start to configure the software of the PB-M bridge. Its software configuration includes: device parameter configuration and MODBUS message queue configuration: (1) The device parameter configuration of the PB-M bridge is in the HW Config of STEP 7. You can install the GSD file (DS) of the PB-M bridge._MMV3.GSD is the GSD file of the MODBUS master station; DS_MSV3.GSD is the GSD file of the MODBUS slave station). Add the configuration file of the PB-M bridge to the device configuration library of STEP 7. After that, you can configure the hardware of the PB-B bridge according to the schematic method in Figure 3. Figure 3 Schematic diagram of the configuration of the PB-B bridge. After the PB-M bridge is added to the S7 hardware configuration system, its relevant parameters can be configured. This design uses the PB-M bridge as the MODBUS master station. According to the requirements of the MODBUS slave station, the basic parameter configuration of the master station is as follows: l PROFIBUS slave station address = 19; l Baud rate = 9600; Verification method: no verification; l Data update mode: after each MD answer; l Waiting time for response: 50ms. (2) MODBUS message queue configuration of the PB-M bridge. According to the requirements of the communication system, the PB-M bridge can configure different message queues to complete actual communication requirements. The PB-M bridge has a total of 20 slots from 0# to 19# (logically, not physical devices); slots 0# and 1# are occupied, leaving 18 slots for users to use. Each slot can be used to insert a MODBUS communication module; so a total of 18 MODBUS modules can be inserted. Each MODBUS module of the PB-M bridge corresponds to a MODBUS message of a function, which can be inserted into a certain slot by double-clicking. The following takes inserting "read 24 bits (0xxxx)" into slot #2 as an example to illustrate how the MODBUS module completes the MODBUS message of a certain function. The MODBUS module corresponds to the 01h function of MODBUS, that is: reading the 0xxxx status of 24 output coils. Step 1: Select slot 2, then double-click "read24 bits(0xxxx)"; insert "24DI read 24 bits(0xxxx) 1...3" into slot 2; Step 2: Further set MODBUS parameters: double-click "24DI read 24 bits(0xxxx) 1...3" in slot 2; select "Parameter Assignment" to set parameters such as "Slave Address" and "Start Address". After the parameters are set, the data mapping relationship from MODBUS to PROFIBUS as shown in Figure 4 is established. Figure 4 Data Mapping Relationship Among them, I1..I3 are the PROFIBUS input addresses I1~I3 assigned by the PROFIBUS master station to this MODBUS module, corresponding to the 24 bits (0xxxx) read in this MODBUS message. In this way, when the PLC is programming, it can directly read I1~I3 to get the status of the 24 output coils 0xxxx of MODBUS. The communication data that this PB-M bridge needs to complete includes: 36 remote signaling information points (function code 02) and 18 telemetry information points (function code 03). According to this requirement, the message queue to be configured is shown in Figure 5 (station number is 19, starting address is 0): Figure 5 Schematic diagram of message queue configuration. The MODBUS command corresponding to the message queue of slot #2 is: send function code 02 command - read the status of input coils 10001~10032, and store it in I11~I14; The MODBUS command corresponding to the message queue of slot 3 is: send function code 03 command - read the values of holding registers 40001~40018 and store them in I528~I563; After completing the above configuration, the PLC can communicate with the MODBUS slave device. 5 Conclusion Since the operation of this communication system, the communication between PLC and Modbus RTU has been normal, and there has never been any software or hardware failure or other interference phenomena, effectively ensuring the normal operation of the automatic control system. It can be seen that it is an effective method for PLC to communicate with Modbus RTU through PB-M bridge. The PLC and the host computer WINCC can read the temperature measurement values, set values, etc. in the instrument, and can remotely set the data in the relay protection device and DC panel equipment, which greatly facilitates on-site control and operation. From this point of view, using the PB-M bridge to solve the communication between Siemens PLC and third-party intelligent control instruments is a method worth promoting. It will definitely achieve more successful applications in power automatic control systems.

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.