Development of WorldFIP bus control system configuration software
2026-04-06 05:11:11··#1
Abstract: To facilitate more convenient and efficient configuration of network configuration and control strategies for bus control systems by WorldFIP users, this paper develops a graphical configuration software. After analyzing the bus protocol and system characteristics, this paper adopts a three-tier client/server architecture based on COM component technology for the overall design of the configuration software. The middleware FipServer of the configuration software is designed and implemented using COM technology, and several key interface functions in FipServer are presented in this paper. This paper designs a user-friendly graphical interface for configuring function block application processes and provides the UML static class diagrams of the main classes. Experiments show that the software runs well and exhibits good performance in terms of openness, connectivity, and stability. Keywords: WorldFIP; Component Software; Three-Layer Architecture; Component Technology; Introduction WorldFIP is the seventh type of fieldbus in the IEC 61158 international standard, suitable for industrial control fields. Using the WorldFIP fieldbus, both real-time and random data can be transmitted, making it a deterministic , predictable fieldbus that can seamlessly connect to the Internet. This software is designed with COM, providing several key interface functions. A graphical configuration interface for function block application processes is explored , with its main classes described using UML static class diagrams. Experiments demonstrate that this software performs well in terms of openness, connectivity, and stability. The unique physical layer redundancy design makes WorldFIP fieldbus a powerful guarantee for the high reliability of the control system. At present, WorldFIP bus has been widely used in nuclear power, railway, petroleum, chemical and other industries at home and abroad, but the application and development of WorldFIP products are mainly concentrated at the monitoring level, and the research on WorldFIP application at the field level is still blank. It can be seen that developing a complete WorldFIP fieldbus control system has a very practical and positive significance [1]. The configuration software is the upper-level software part of the WorldFIP bus control system. It is the interface between the user and the system, and undertakes tasks such as equipment management, equipment configuration, network configuration, and control loop configuration. It occupies an important position in the whole system. 1 Design of three-layer configuration software based on COM components In the overall architecture design of the configuration software, this paper uses component technology and follows the client/server design principle and development method to build the WorldFIP configuration software framework. The configuration software is divided into three-layer C/S structure: the configuration software client program of the presentation layer, the bus driver FipServer of the business layer (middleware) and the field devices of the data layer. The client program first communicates with the middleware FipServer, and then communicates with the field devices through it. The overall structure of the configuration software is shown in Figure 1. The configuration software client program, as the client of the configuration software, is the tool for users to interact with field devices. The client software is designed with corresponding configuration modules according to the characteristics of the WorldFIP network. Through the client program, users can read and write information from field devices and configure the control system. The client program includes the following functional modules: project management module, function block parameter configuration module, function block application process configuration module, and scheduling information configuration module. The middleware FipServer is responsible for the data and information interaction between the configuration software and field devices. This layer is designed using out-of-process COM component technology to provide transparent bus access services and device physical location positioning for client requests. The field devices are equivalent to the data layer in a three-layer structure. The configuration software reads and writes data to each device through the middleware based on the device's address information. [align=center] Figure 1 Overall structure diagram of configuration software[/align] 2 Design and development of FipServer The main function of the FipServer program is to manage the communication between the host application and the WorldFIP network. It encapsulates the WorldFIP communication protocol service so that the configuration software does not need to know the details of the communication. This paper uses ATL technology to develop the FipServer out-of-process COM component. The FipServer program has its own graphical interface, as shown in Figure 2. The graphical interface can display the number of active WorldFIP devices on the network and the FipServer service status, allowing users to observe the running status of the FipServer program[2]. [align=center] Figure 2 FipServer running interface[/align] The COM interface class of FipServer is CFipServer, which encapsulates the WorldFIP application layer and user layer protocols and is implemented using ATL technology. When the host application calls the CFipServer function, the CFipServer function will call the interface function of the corresponding protocol. The main functions of several main interface functions are introduced below. (1) The SetPhTag(...) function sets the unique device identifier of the network segment and sets the unique function block identifier of the network segment. (2) EstablishBA(...) establishes and starts a new BA (bus arbitration) table for the master station. The master station will have a BA table in the initial state, which mainly contains non-periodic messages and variable communication windows, used for basic device configuration information download and upload, device existence, device identification and other services. When the configuration client generates or modifies the control strategy and scheduling time, the corresponding BA table also needs to be updated. At this time, the configuration software will call this function to refresh the master station's BA table. (3) GetDeviceList(...) interface obtains the list of online active devices. After the FipServer process starts, it will periodically read the report information of online devices from the master station device and record the information of online devices. The specific information includes physical address and identification number (8 bytes). When the configuration client calls this interface function, it can obtain the list of active devices on the bus. (4) ReadObject(...) interface is one of the most important interfaces provided by FipServer. Its main function is to read various information of field devices. When the host application needs to obtain data in the device object dictionary, it can call this interface function. The function can read the corresponding information in the field device object dictionary based on the passed device information and object dictionary index. The function mainly encapsulates the Read service in the device access agent protocol. The function calls different read services based on the different indices and sub-indices of the passed-in object dictionary. (5) The WriteObject (...) interface is also one of the most important interfaces provided by FipServer. Its main function is to write various information to the field device. When the configuration software needs to update the data in the device object dictionary, it can call this interface function. The function can write information to the corresponding position in the field device object dictionary based on the passed-in device identifier and object dictionary index. This function mainly encapsulates the Write service of the device access agent and calls different write services based on the different indices and sub-indices of the passed-in object dictionary. 3 Design and implementation of configuration software client software The configuration software client is the configuration graphics system for interaction between the configuration software and the engineers. It is the scheduling and control center of the bus engineering system and plays an extremely important role in the configuration software system. This paper first employs object-oriented modeling techniques, using the UML modeling language to implement system modeling. Then, using object-oriented programming methods, based on Windows MFC technology, with C++ as the programming language and Visual C++ 6.0 as the tool, the entire configuration graphics system is implemented based on the established graphical system model. The overall structure of the configuration software adopts a single-document, multi-view structure. That is, all data structures are managed by the document class CFipXConDoc. All modules obtain the required data from this document, process it, and then save it back to the document. In the Windows operating system, the overall graphical interface of the configuration software is shown in Figure 3. [align=center] Figure 3 Main window of the configuration software[/align] The left view in the figure is the project management module, used for overall management of the configuration project of the entire control system. Adding, deleting, modifying, and querying network segments, master stations, basic devices, and function blocks are all performed here. The right workspace multi-view shows the views of various configuration modules. The views shown in the figure are the function block parameter configuration module and the function block application process configuration module, respectively. 3.1 Data Structure Design Based on the distributed and hierarchical characteristics of the fieldbus architecture, the software adopts a device-based data structure design, with device information stored in document classes. Device information is stored in the base device class (CFipBasDevice), the derived gateway device class (CFipBridge), and the derived slave device class (CFipSlaDevice). The base device class is derived from CObject and overrides the Serialize(CArchive& ar) function. These device classes mainly record basic device information, such as the device's DeviceID, physical address, device identifier, list of function blocks, number of function blocks, and operation methods for the device class. Devices are organized as a device list, specifically using a CFipDevArray instantiated from the MFC pointer array template class CtypedPtrArray. Each device contains multiple function blocks, and the function block class stores various information about the function blocks. This paper designs a base class CFunBlkBase for function block classes, from which other specific function block classes are derived, such as CAIBlk, CPIDBlk, and CAOBlk. The base class is derived from the CObject class and overrides the Serialize(CArchive& ar) function. Similarly, the device class also defines a dynamic array CFunBlkArray to store its function blocks. 3.2 Design and Implementation of Graphical Configuration for Function Block Application Process The editing of function block application processes adopts a graphical method for configuration. The interface for editing function block application processes is shown in Figure 2. Rectangular block diagrams represent function blocks, pins represent the inputs and outputs of function blocks, and the lines between pins represent the relationships between function block parameters. When editing a function block application process, the mouse is used to select the function blocks required to compose the function block application process and create a function block diagram. Lines are drawn between pins to establish the connection relationships between function blocks. This configuration interface system mainly consists of a primitive class library and a graphical operation tool class library. In the primitive class library, class CDrawObj is an abstract base class that defines the common attributes and operation interfaces of all primitive classes and is the parent class of other primitive classes. CDrawFunBlock is a functional block diagram class, from which specific functional block drawing classes such as CAIDrawBlk are derived. CDrawLinkPLine is a connecting line class, and CTextObj is a text class. Graphic operation tool classes are auxiliary classes that translate user operations on the interface into operations on primitives on the engineering screen. Their main functions are to control the operation of primitives, such as the generation, editing, undoing, moving, and selection of primitives. Depending on the type of primitive object being operated, the view class selects the corresponding tool class to edit the primitive object. In the tool class library, class CDrawTool is the base class of other tool classes. Class CSelectTool defines the selection operation of primitives, class CDrawPLineTool defines the connection operation of connecting line classes, and class CFunBlkTool defines the creation and movement of functional block classes. Figure 4 describes the static classes of this interface system and their relationships [3]. [align=center] Figure 4 UML static class diagram of function block application process graphical configuration[/align] When the user configures the function block connection, each time the connection between function blocks is completed, a corresponding link object (CLinkObj) is created and assigned a value according to the association between the function blocks pointed to by the input and output of the connection object. The content of the link object mainly includes service type, device address, periodic variable number, local index, remote index and other contents. In order to make the connection between function blocks correspond to the link object, the program defines a connection class (CLink), which mainly records the link object of the input and output parameters. In the function block application process editing view, each time the connection between function blocks is edited, a connection between function blocks is generated, and two link objects are generated. When downloading the link object, the program traverses the CDrawLinkPLine object and downloads the link object to the specified device by calling the write service of the COM interface program FipServer[4]. 4. Conclusion This paper constructs a simple, practical bus control system to test the configuration software. The system consists of a temperature transmitter, a bus-to-current transmitter (FI), a gateway (master station), a heating furnace, and a PC. The strategy configuration includes a temperature-variable operation AI function block, a FI PID function block, and an AO function block, forming a closed-loop circuit to control the temperature inside the heating furnace to a given value. The entire test was conducted sequentially according to five test cases. The results show that the configuration software successfully reads the field device information through the master station and obtains view data and function block information. The configuration software successfully downloads the configuration information to the field devices and configures them. The field devices operate normally and achieve basic control functions. The innovation of this paper lies in the fact that, after fully analyzing the characteristics of the WorldFIP protocol and bus system, a convenient and practical function block-oriented WorldFIP fieldbus control system configuration software was designed and developed. This software was implemented in a Chinese Windows 2000 environment using VC++ 6.0 as the platform. This software adopts a three-tier C/S model software structure, which has good openness and scalability. The software has a user-friendly interface, which can provide users with intuitive and convenient configuration of this FCS system. References [1] Shi Xueling. WorldFIP fieldbus technology [J]. Industrial Control Computer, 2001, 14(2): 29-30 [2] Zhang Jianqing, Zhang Qi. Design of configuration software I/O device driver based on COM [J]. Microcomputer Information, 2007, 2-1: 293-295 [3] Wang Yamin, Chen Qing, Liu Changsheng, Wang Shuiping. Design and development of configuration software [M]. Xi'an University of Electronic Science and Technology Press, 2003 [4] Zhang Jianhua, Zhan Ming, Yu Haibin. FF fieldbus instrument and configuration technology [J]. Microcomputer Information, 2006, 6-1: 175-176