1 Introduction
Fieldbus control systems (FCS) replace analog signals with digital signals to improve system reliability, accuracy, and anti-interference capabilities, and extend information transmission distance. It is both an open communication network and a fully distributed control system, a new type of network-integrated automation system. Using the fieldbus as a link, it connects related network nodes on the bus to form an automation system, realizing multiple functions such as basic control, compensation calculation, parameter modification, alarm, display, and comprehensive automation.
FCS uses a two-layer structure of "workstation-fieldbus intelligent instrument" to complete the three-layer structure of distributed control system (DCS) of "operator station-control station-field instrument", which reduces costs, improves reliability, and can realize a truly open interconnected system structure under a unified international standard. It is a promising computer control system that is under development.
The most representative fieldbus currently is PROFIBUS (Process Fieldbus). PROFIBUS is an open fieldbus standard introduced by SIEMENS. It became the German standard DIN 19245 in 1989, the European standard EN 50170 in 1996, and was accepted as part of the international standard IEC 61158 in December 1999. It is used in the lower layers of a three-tier network in factory automation systems, namely, workshop-level monitoring and field device data communication and control; it is used in systems where distributed, controlled field devices with communication interfaces require high levels of data integration, remote diagnostics, fault alarms, and digitization.
PROFIBUS follows the ISO/OSI model, and its communication model consists of three layers: the physical layer, the data link layer, and the application layer. PROFIBUS comprises three parts: PROFIBUS-FMS (Fieldbus Message Specification), PROFIBUS-DP (Decentralized Periphery), and PROFIBUS-PA (Process Automation). PROFIBUS-DP is widely used in hydropower station automation.
2. Characteristics and System Composition of PROFIBUS-DP
2.1 Characteristics of PROFIBUS-DP
PROFIBUS-DP uses a physical layer, a data link layer, and a user interface for high-speed data transmission at the field level. The master station periodically reads input information from the slave station and periodically sends output information to the slave station. The bus cycle time must be shorter than the master station program cycle time. In addition, PROFIBUS-DP provides the non-periodic communication required by intelligent field devices for configuration, diagnostics, alarm handling, and determination of parameters for complex devices during operation.
The basic functions and features of PROFIBUS-DP are as follows:
(1) Long-distance high-speed communication
It supports transmission rates from 9.6Kbps to 12Mbps; the maximum transmission distance is 100m at 12Mbps and 200m at 1.5Mbps, and can be extended using repeaters.
(2) Distributed structure
Token transfer between master stations is performed, with master-slave transmission between master and slave stations; each segment can have 32 stations, which can be expanded to 126 stations using connecting lines;
(3) Easy to install, open communication network;
(4) High reliability and self-diagnostic function.
PROFIBUS-DP master stations are divided into Class I and Class II master stations. Class I master stations handle bus communication control and management, performing periodic data access; these include PLCs, PCs, or controllers that can function as Class I master stations. Class II master stations handle non-periodic data access, such as data reading and writing, system configuration, and fault diagnosis; these include operator workstations (e.g., PCs with graphical monitoring software), programmers, and HMIs. PROFIBUS-DP slave stations primarily acquire and transmit input and output signals; these include PLCs or other controllers, distributed I/O, and intelligent field devices.
2.2 System Composition
For ease of description and understanding, a PROFIBUS-DP network with two masters and one slave is configured as shown in Figure 1. The specific configuration is as follows:
Figure 1 PROFIBUS-DP network
(1) Hardware: Two PCs with Siemens CP5611 cards, one configured as a Class I master station and the other configured as a Class II master station; the slave station is a Siemens S7-200 series PLC CPU224 with a Siemens EM277DP communication module; three network connectors; the connection cable is a twisted pair cable.
(2) Software: STEP7-MICROWIN3.2 for software programming and SIMATIC NET6.0 for implementing PROFIBUS-DP protocol network configuration.
3. Configuration of PROFIBUS-DP Master and Slave Stations
3.1 Configuration of a Type I Master Station
Configure the entire PROFIBUS-DP network using SIMATIC net 6.0 software on PC1 (a Class I master station). The specific steps are as follows:
(1) Use the Configuration Console in the SIMATIC program group to set the PROFIBUS mode to Configured Mode. The slot number is arbitrary, as shown in Figure 2:
Figure 2 Configuration Console
(2) Create a new project after making a series of simple settings using PC Station Wizard.
Set the parameters of CP5611: set the network type to PROFIBUS, the station address to 1 (other values are also allowed, but cannot be repeated; the setting of other station addresses is the same); add the PROFIBUS-DP bus (DP master system (1)), and set CP5611 to DP-Master (i.e., a type I master station). Import the GSD file of EM277, and you can find the EM277 module in the slave device column on the right side of the window. Drag the EM277 icon onto the DP bus, set the station address to 2, set the V memory offset to 4000 in this example, and then set the transmit and receive buffer size of EM277 as needed. Finally, download the configuration result to the module. The result is shown in Figure 3:
Figure 3. Configuration of a type of master station
At this point, the master-slave relationship between the first type of master and slave stations in this PROFIBUS-DP network structure has been established. The next step is to configure the second type of master station.
3.2 Configuration of Category II Master Stations
(1) Still on PC1, click the icon (Configure Network) in the interface shown in Figure 3, and the interface shown in Figure 4 will pop up. Add a SIMATIC PC Station (this PC Station is not yet connected to the DP network), and double-click it to bring up the window shown in Figure 5 (this window is similar to Figure 3). Manually add OPC Server and CP5611, the slots are arbitrary. Set the CP5611 site address to 3, belong to the previously added DP network, and set it as DP Master Class 2 (i.e., Class 2 master station), and download the configuration result to the module. Click again, and you can see that the PC Station is connected to the DP network.
Figure 4 Configure Network
Figure 5. Configuration of Class II master stations
(2) Now switch the operation to PC2. Run the Configuration Console and set it the same as PC1. Open the PC Station Wizard and create a new project. Set CP5611 as DP Master Class 2 and the station address as 3. It should also belong to the DP master system (1). Download the configuration results to the module.
3.3 Configuration of slave station
To use the EM277 as a DP slave, a DP port address must be set to match the address in the master station configuration (the previously set address was 2). The slave address is set using a rotary switch on the EM277 module. After changing the rotary switch, the user must restart the CPU power supply.
The EM277's output and input data buffers reside in the S7-200 CPU's variable memory (V memory), with the input buffer immediately following the output buffer. The buffer size is configured by the DP master station (previously set to 8 Bytes Out/8 Bytes In). After configuration, the EM277 can receive output data from the master station and return input data to the master station. The master-slave buffer relationship is shown in Figure 6.
Figure 6. Buffer zones of master and slave stations
If the EM277 PROFIBUS-DP slave module is the first intelligent module in the I/O chain, its status information is obtained from SMB200 to SMB249 in CPU224; if the EM277 is the second intelligent module, its status is obtained from SMB250 to SMB299. Only the DP master station can configure and run the EM277 DP module in DP mode; users cannot configure the buffer size or location of the EM277 DP module by rewriting the relevant SMB storage units.
Based on the description of the dedicated memory bytes in Table 1, it is not difficult to write the DP communication program for CPU224, as shown in Table 2.
4. Reading and writing PLC data via OPC
OPC (OLE for Process Control) is an emerging standard in the process control industry, bridging Windows-based applications and field process control applications. Data in the PLC can be read and written using the OPC Server program provided by Siemens.
(1) A type of master station PC1 reads and writes PLCs
On PC1, open OPC Scout in the SIMATIC program group and create a new group. Open the newly created group's "OPC-Navigator". Under the DP directory, Slave002 is the slave CPU224, and M00_I and M00_Q correspond to the slave's input and output buffers. Add the variables under the M00_I and M00_Q directories as needed (as shown in Figure 7). After confirmation, OPC will start running. If the "Quality" variable displays "good", it means that the OPC Server program has established a connection and running relationship with the PLC through the PROFIBUS-DP bus protocol. At this time, you can not only read data from the PLC, but also write data to the PLC.
(2) Data access of the second-class main station PC2
On PC2, open OPC Scout and create a new group name. Under the "OPC-Navigator" group, add the corresponding input and output buffers for the second-class master station and confirm. PC2 can then access the data on the network, and changes to the data will be synchronized with those on PC1.
It is important to note that when PC1's OPC Scout is turned off, PC2's OPC Scout also interrupts its data access to the DP network. This proves that CPU224 is only subordinate to the first-class master PC1, while the second-class master PC2 cannot control it (it can only access data).
Figure 7 OPC-Navigator
5. Application of PROFIBUS-DP in Hydropower Stations
Currently, PROFIBUS-DP bus technology is widely used in small-scale automation systems in hydropower stations, such as the monitoring system for hydropower station gates and the control system for unit auxiliary equipment. This is because the real-time performance of PROFIBUS-DP is affected by the system size; the larger the system, the worse the real-time performance. Therefore, PROFIBUS-DP bus technology is best suited for small-scale automation systems.
However, PROFIBUS-DP demonstrates excellent performance in signal transmission accuracy, reliability, and interference immunity. Its system cost is low, installation is simple, maintenance and debugging are convenient, and it is easily expandable. Furthermore, various sensors and intelligent devices have standard communication ports supporting DP networks, providing abundant hardware resources. The flexible master-slave structure of the DP network itself adapts to various control systems. Various configuration software can also establish data exchange with OPC Servers, reducing the development cycle of monitoring systems. Through dedicated communication protocol converters or industrial PCs, PROFIBUS-DP bus-based control systems can be connected to industrial Ethernet, becoming part of an integrated control system. Therefore, although industrial Ethernet technology is gaining widespread adoption, the high cost-effectiveness of DP networks is increasingly recognized by users.
6. Conclusion
In summary, PROFIBUS-DP bus technology, as one of the international standards, is highly open and cost-effective, and its application in the hydropower industry will become increasingly widespread.