Slave station equipment configuration method and device and related product
By generating slave configuration files, establishing network connections, and restarting the master card, the configuration compatibility issue of Profibus slave devices in a 64-bit DCS environment was resolved, achieving automated configuration that simplifies deployment and improves configuration efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING GUODIAN ZHISHEN CONTROL TONGDY
- Filing Date
- 2025-12-01
- Publication Date
- 2026-04-21
AI Technical Summary
Existing Profibus slave device configuration tools have compatibility issues during the upgrade of distributed control systems from 32-bit to 64-bit. They are highly integrated but lack flexibility, are complex to deploy and costly, and cannot be deployed and run independently.
A method for configuring slave devices is provided, which generates a slave configuration file, establishes a network connection, uploads the configuration file, and restarts the master card, achieving automated configuration independently of the DCS system.
It resolves compatibility issues of the configuration tool in a 64-bit DCS environment, simplifies the deployment process, improves configuration efficiency and stability, and ensures that slave devices can be successfully integrated into the Profibus bus communication system.
Smart Images

Figure CN121907682A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial automation control technology, and more specifically, to a method, apparatus, and related products for configuring slave devices. Background Technology
[0002] In the field of industrial automation, PROFIBUS is a widely used fieldbus standard. The PROFIBUS master is the core control device in the PROFIBUS industrial bus. It is responsible for actively initiating bus communication, managing bus communication resources and timing, sending data requests or control commands to slave stations, and coordinating the communication order of multiple slave stations to avoid conflicts. PROFIBUS slaves are the controlled devices on the bus, such as sensors, actuators, and remote I / O modules. They do not actively initiate communication; they only wait for commands from the master station, responding and returning their own status data, or executing control actions issued by the master station. The master and slave stations exchange data through the corresponding PROFIBUS communication protocol, jointly supporting control, data acquisition, and other tasks in the industrial field.
[0003] Currently, configuring Profibus slave devices typically requires a Device Type Manager (DTM) and a specific framework container (such as the FDT framework). However, this configuration method has at least the following drawbacks: (1) High platform dependence: As distributed control systems are upgraded from 32-bit to 64-bit, these DTM tools developed based on the interface of 32-bit distributed control systems cannot run normally in the new generation of 64-bit distributed control system environment, and there are serious compatibility problems.
[0004] (2) High integration, lack of flexibility: Existing configuration tools usually have to be integrated into large-scale distributed control system engineering software and cannot be deployed and run independently. This makes the configuration process cumbersome and cannot be used in an environment without installing the entire DCS software.
[0005] (3) Complex deployment: It usually requires the installation of third-party frameworks or containers, resulting in high deployment and maintenance costs. Summary of the Invention
[0006] In view of the above situation, this application provides a slave device configuration method, apparatus and related products, which aim to solve the above problems or at least partially solve the above problems.
[0007] In a first aspect, embodiments of this application provide a slave device configuration method, the method being deployed on a host computer in a distributed control system, the distributed control system further including a controller and a Profibus master station card; the method includes: Based on the obtained general station description file and Profibus bus communication parameters of the slave device to be configured, the corresponding slave configuration file is generated. Based on the controller IP address and Profibus master card IP address input by the user, a network connection is established between the host computer, the controller, and the Profibus master card; Upload the slave configuration file to the Profibus master card; A restart command is sent to the Profibus master card to load and activate the slave configuration file, thereby enabling the configuration of the slave device to be configured.
[0008] Secondly, embodiments of this application also provide a slave device configuration apparatus, which is deployed on a host computer in a distributed control system. The distributed control system further includes a controller and a Profibus master station card; the apparatus includes: The generation module is used to generate the corresponding slave configuration file based on the obtained general station description file and Profibus bus communication parameters of the slave device to be configured; The connection module is used to establish a network connection between the host computer, the controller, and the Profibus master card based on the controller IP address and the Profibus master card IP address input by the user. The upload module is used to upload the slave station configuration file to the Profibus master station card; The restart module is used to send a restart command to the Profibus master card, so that it loads the slave configuration file and makes it effective, thereby enabling the configuration of the slave device to be configured.
[0009] Thirdly, embodiments of this application also provide an electronic device, including: a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the slave device configuration method described above.
[0010] Fourthly, embodiments of this application also provide a computer-readable storage medium that stores one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform the steps of the slave device configuration method described above.
[0011] Fifthly, an optional implementation of this application also provides a computer program product, the computer program product carrying program code, the program code including instructions that can be used to execute the steps of the slave device configuration method as described in the first aspect.
[0012] Using the above technical solutions, the slave device configuration method, apparatus, and related products provided in this application embodiment can first generate an adapted slave configuration file based on the general station description file of the slave device to be configured and the Profibus bus communication parameters, ensuring accurate matching between the configuration file and the slave device to be configured and the Profibus bus protocol, laying the foundation for subsequent configuration implementation; then, a network connection is established between the host computer, the controller, and the Profibus master card through the controller IP address and the Profibus master card IP address input by the user, opening up the communication link for data transmission and command interaction between devices, ensuring smooth operation of subsequent operations; subsequently, the generated slave configuration file is uploaded to the designated file system of the Profibus master card, completing the deployment of the configuration file to the hardware execution carrier; finally, a restart command is sent to cause the Profibus master card to load and enable the slave configuration file, ultimately realizing the standardized and automated configuration of the target slave device. As can be seen, the configuration scheme provided in this application embodiment is completely independent of the DCS system API. Its operation does not depend on the bitness (32 / 64-bit) of the DCS, fundamentally solving the technical problem that existing configuration tools cannot be applied in a 64-bit DCS environment. It does not require integration into any specific DCS software, nor does it require the installation of third-party frameworks or containers, achieving "out-of-the-box" functionality and greatly simplifying the deployment process. It seamlessly integrates the previously separate processes of generating and downloading configuration files (uploading to the master station card) into a unified platform, simplifying user operations, improving work efficiency, and reducing errors caused by switching between multiple tools. The configuration scheme provided in this application embodiment simplifies the configuration process for slave devices to access the bus, improves configuration efficiency and the stability of configuration results, and ensures that slave devices can be normally integrated into the Profibus bus communication system after configuration takes effect.
[0013] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating the slave device configuration method provided in an embodiment of this application is shown; Figure 2 This illustration shows the interface of the slave device configuration application provided in an embodiment of this application. Figure 1 ; Figure 3 This illustration shows the interface of the slave device configuration application provided in an embodiment of this application. Figure 2 ; Figure 4 This illustration shows the interface of the slave device configuration application provided in an embodiment of this application. Figure 3 ; Figure 5 This illustration shows the interface of the slave device configuration application provided in an embodiment of this application. Figure 4 ; Figure 6 A schematic diagram of the slave device configuration apparatus provided in an embodiment of this application is shown; Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the term "comprising" and its variations should be interpreted as open-ended terms meaning "including but not limited to."
[0018] As mentioned above, configuring Profibus slave devices currently typically requires a Device Type Manager (DTM) and specific framework containers (such as the FDT framework). This configuration method suffers from at least the following drawbacks: (1) High platform dependency: As distributed control systems upgrade from 32-bit to 64-bit, these DTM tools developed based on the interfaces of 32-bit distributed control systems cannot function properly in the new generation of 64-bit distributed control system environments, resulting in serious compatibility issues. (2) High integration and lack of flexibility: Existing configuration tools usually must be integrated into large-scale distributed control system engineering software and cannot be deployed and run independently. This leads to a cumbersome configuration process and makes it unusable without installing the entire DCS software. (3) Complex deployment: Third-party frameworks or containers are usually required, resulting in high deployment and maintenance costs. Based on this, the present invention proposes a slave device configuration method, apparatus, and related products. The following detailed description of this application is provided through specific embodiments.
[0019] To facilitate understanding of this embodiment, a detailed description of the slave device configuration method disclosed in this application embodiment will be provided first. The execution subject of the slave device configuration method provided in this application embodiment is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a personal digital assistant (PDA), a handheld device, etc. In some possible implementations, this slave device configuration method can be implemented by the processor calling computer-readable instructions stored in memory.
[0020] Figure 1 This document illustrates a flowchart of a slave device configuration method provided in an embodiment of this application. Figure 1 It can be seen that the embodiments of this application include at least steps S101-S104: S101: Generate the corresponding slave configuration file based on the obtained general station description file and Profibus bus communication parameters of the slave device to be configured; S102: Based on the controller IP address and Profibus master card IP address input by the user, establish a network connection between the host computer, the controller and the Profibus master card; S103: Upload the slave configuration file to the Profibus master card; S104: Send a restart command to the Profibus master card to load and activate the slave configuration file, thereby enabling the configuration of the slave device to be configured.
[0021] It should be noted that the configuration method proposed in this application is deployed in the host computer of a distributed control system, which also includes a controller and a Profibus master card. The controller establishes a network connection with the host computer that has deployed the configuration method proposed in this application; it also connects to the Profibus master card to control and manage the master card. The Profibus master card is a dedicated communication hardware module integrated into Profibus master devices (such as PLCs and DCS control stations). Its core function is to act as a communication bridge between the master station and the Profibus bus and slave devices, undertaking tasks such as protocol conversion, data interaction, and configuration management.
[0022] As can be seen, this embodiment first generates a suitable slave configuration file based on the general station description file of the slave device to be configured and the Profibus bus communication parameters, ensuring accurate matching between the configuration file and the slave device to be configured and the Profibus bus protocol, laying the foundation for subsequent configuration implementation; then, a network connection is established between the host computer, the controller, and the Profibus master card through the controller IP address and the Profibus master card IP address input by the user, opening up the communication link for data transmission and command interaction between devices, ensuring the smooth operation of subsequent operations; subsequently, the generated slave configuration file is uploaded to the designated file system of the Profibus master card, completing the deployment of the configuration file to the hardware execution carrier; finally, a restart command is sent to cause the Profibus master card to load and enable the slave configuration file, ultimately realizing the standardized and automated configuration of the target slave device. As can be seen, the configuration scheme provided in this application embodiment is completely independent of the DCS system API. Its operation does not depend on the bitness (32 / 64-bit) of the DCS, fundamentally solving the technical problem that existing configuration tools cannot be applied in a 64-bit DCS environment. It does not require integration into any specific DCS software, nor does it require the installation of third-party frameworks or containers, achieving "out-of-the-box" functionality and greatly simplifying the deployment process. It seamlessly integrates the previously separate processes of generating and downloading configuration files (uploading to the master station card) into a unified platform, simplifying user operations, improving work efficiency, and reducing errors caused by switching between multiple tools. The configuration scheme provided in this application embodiment simplifies the configuration process for slave devices to access the bus, improves configuration efficiency and the stability of configuration results, and ensures that slave devices can be normally integrated into the Profibus bus communication system after configuration takes effect.
[0023] The following provides a detailed explanation of S101-S104.
[0024] For the above S101 (generating the corresponding slave configuration file based on the obtained general station description file and Profibus bus communication parameters of the slave device to be configured): In this step, the General Station Description File (GSD) is a standard description file for slave devices that conforms to the PROFIBUS international standard. It records information such as the slave device's hardware capabilities, supported modules, and communication parameters. The GSD is provided by the manufacturer with the device or obtained from official channels.
[0025] Profibus bus communication parameters include, but are not limited to: baud rate, maximum / minimum synchronization delay, bus idle time, maximum number of retries after communication failure, timeout for master station to poll slave station, minimum response interval for slave station, and data control time.
[0026] Figure 3 This is the INI configuration file generation interface, mainly used to create, edit, and save the slave configuration file corresponding to the Profibus slave station. The interface includes operation buttons such as "Create Configuration," "Open Configuration," and "Save Configuration," as well as selection options for configuration parameters such as DOMAIN, DROP, and PBINDEX. The "BUS Parameters" and "GSD Configuration" buttons at the bottom can be used to supplement the settings of bus communication parameters and configuration information related to the general station description file. Overall, it is the interface for creating and editing slave configuration files. Click Figure 2 Click the "Generate Configuration" button at the top to jump to... Figure 3 The corresponding INI configuration file generation interface will then take you through the configuration file creation and editing process. Click... Figure 3 The "BUS Parameters" and "GSD Configuration" sections below can be navigated to respectively. Figure 5 and Figure 4 .
[0027] During implementation, PROFIBUS bus communication parameters can be preset or input by the user through a graphical user interface, such as... Figure 5As shown, the Profibus bus communication parameters consist of two parts: "FDL" and "BUS". FDL refers to the parameters related to the Profibus fieldbus data link layer, while "BUS" refers to the bus interaction control parameters. Specifically: Baud Rate: The baud rate, indicating the transmission rate of the bus communication (currently set to 45.45 Kb, i.e., 45.45 kilobits per second). MaxTSDR: Maximum slave response delay time, the longest allowed response wait time after a slave receives a request from the master. MinTSDR: Minimum slave response delay time, the shortest allowed response wait time after a slave receives a request from the master. TQuiet: Quiet time, the duration of the no-signal interval between bus communication sessions, used to avoid signal interference. MaxRetry: Maximum number of retries, the maximum number of times the device will attempt to re-communicate after a communication failure (currently set to 1). HSA: HostStationAddress, the address identifier of the master device in the Profibus bus. TSet: Set time, the pre-configured transmission / interaction duration in bus communication. TSlot: Time slot, a fixed communication time segment allocated to each device in bus communication. TTR: Token Turnaround Time, the interval between token transfers between devices in a PROFIBUS token ring network. GAP: Gap time, the interval between adjacent communication frames in the bus. Poll Time Out: Polling timeout, the maximum time the master station waits for a response from a slave station after initiating a poll (timeout indicates communication failure). Min Slave Interval: Minimum slave interval, the shortest allowed time interval when the master station polls two adjacent slave stations. Data Ctrl Time: Data control time, the control duration during data transmission (unit: 10ms, i.e., this parameter value multiplied by 10ms equals the actual duration).
[0028] In some embodiments, the step of generating a corresponding slave configuration file based on the acquired generic station description file and Profibus bus communication parameters of the slave device to be configured includes: The general station description file is parsed to obtain and display all modules supported by the slave device to be configured; In response to the user's selection, determine one or more modules required by the user; The slave configuration file is generated based on the module configuration data of the one or more user-required modules and the Profibus bus communication parameters.
[0029] In this embodiment, the method for obtaining the general station description file is as follows: Figure 4 As shown, during implementation, you can click... Figure 4Click the "Open GSD" button, and in the pop-up file browser, select the general site description file (usually with the .gsd extension) corresponding to the slave to be configured.
[0030] Regarding the two steps of "parseting the general station description file to obtain and display all modules supported by the slave device to be configured; and determining one or more modules required by the user in response to the user's selection operation," in specific implementation, the module-related fields defined according to the specification in the GSD file can be read, the segment identifiers and key-value pairs in the file can be identified, and the ID, name, I / O attributes, and other data of the modules supported by the slave device to be configured can be extracted to complete the parsing; all the supported modules obtained by parsing will be displayed in the left area of the interface in the form of a list containing ID, name, and I / O information (e.g., ...). Figure 4 The options shown include "NoDATA", "AI Output", and "TOT Counter output". After the user selects the desired module from the list on the left, they can click the "--->" button between the lists to add the selected module to the list on the right. In this embodiment, the execution entity will respond to this operation and determine the module in the list on the right as the module required by the user.
[0031] Here, the module configuration data includes, but is not limited to, at least one of the following: module name (identifier for configuration files), I / O type (distinguishing whether the master station is "reading data" or "writing instructions" to the module), module ID (a unique identifier for the master station to identify the module), module model (matching the hardware driver logic corresponding to the master station card), number of channels (the basis for the master station to allocate I / O address space to the module), measurement range / output range (the numerical reference for the master station to parse module data and execute instructions), data format (such as 16-bit integer / 32-bit floating point, the format standard for the master station to parse data), etc.
[0032] Regarding the step of "generating the slave configuration file based on the module configuration data of one or more user-required modules and the Profibus bus communication parameters," in specific implementation, the module configuration data can be mapped to the "module configuration" section of the configuration file and the Profibus bus communication parameters can be mapped to the "bus parameters" section according to a preset structured format (such as INI format). The entire generation process does not rely on any DCS-specific APIs, but only uses parameter mapping algorithms to ensure that all key data is accurately embedded in the specified location of the configuration file, ultimately generating a slave configuration file containing all the information required by the Profibus master card to identify and configure the slave device to be configured.
[0033] Regarding S102 (establishing a network connection between the host computer, the controller, and the Profibus master card based on the controller IP address and the Profibus master card IP address input by the user): In practice, the configuration method provided in this application can be implemented as an application. For example, Figure 2 This illustration shows the interface of the slave device configuration application provided in an embodiment of this application. Figure 1 .like Figure 2 As shown, the controller IP address can be manually entered through the "DPU Address" input box in the interface; the Profibus master station card IP address can be configured by selecting a preset commonly used address through the "Card Default IP" drop-down option.
[0034] Figure 2 The "Connect" and "Disconnect" buttons in the upper left corner are responsible for the network between the host computer and the controller DPU. When the "Connect" button is clicked, the software can log into the controller (DPU) system via the TELNET protocol to establish a remote connection between the host computer and the controller.
[0035] Figure 2 In the middle, the function of the "Download File" button is to upload the slave configuration file to the Profibus master card (step S103 below). When the "Download File" operation is triggered, the controller will first automatically log in to the master card's system via the TELNET protocol within its own system, and automatically perform a network connectivity test with the master card (such as a ping test) to verify the communication link status; after the login is completed, the file upload operation will continue.
[0036] Regarding S103 above (uploading the slave configuration file to the Profibus master card): In some embodiments, uploading the slave configuration file to the Profibus master card includes: By calling the FTP communication library, an FTP client instance is initialized, and an FTP connection request is initiated to the Profibus master card; Send the preset username and password to the FTP server of the Profibus master station card to complete the login; Execute the FTP command to switch to the configuration file directory specified by the Profibus master card; Upload the slave configuration file.
[0037] In practice, the embodiments of this application can be implemented by performing the following steps: 1. Pre-verification: Verify the existence and completeness of the locally generated slave configuration file (MD5 value verification); perform secondary verification of network connectivity with the Profibus master card (ping test); load the pre-stored Profibus master card FTP login credentials, IP address, and specified configuration directory path.
[0038] 2. Initialize the FTP client: Call the built-in FTP communication library (such as QT's QFtp or Python's ftplib) to initialize the FTP client instance and initiate an FTP connection request to the default port of the PB card.
[0039] 3. FTP Login Authentication: Pass the preset username and password to the Profibus master card FTP server to complete the login; if authentication fails, record the error message and terminate the process.
[0040] 4. Locate the specified directory: Execute the FTP command `CWD` to switch to the configuration file directory specified by the Profibus master card; if the directory does not exist, execute the `MKD` command to automatically create the directory.
[0041] 5. File Upload: Execute the `STOR` command to upload the slave configuration file.
[0042] 6. Integrity verification: Execute the `SIZE` command to read the size of the uploaded file on the Profibus master station card and compare it with the local file size; optional MD5 verification is performed (download the Profibus master station card file, calculate the MD5, and compare it with the local file MD5).
[0043] 7. Retry in case of failure: If the verification fails, the upload process will be automatically re-executed (by default, 2 retries); if the retry still fails, the specific reason for the failure will be recorded (such as insufficient permissions or corrupted file).
[0044] 8. Process Closure: Close the FTP connection, write the upload result (success / failure, reason for failure) to the log, and feed it back to the GUI layer for display.
[0045] In some embodiments, the method further includes: If the slave configuration file upload fails, the network connectivity between the host computer and the controller is checked to obtain a first detection result; and The network connectivity between the Profibus master station card and the controller is detected to obtain a second detection result; Display the first detection result and the second detection result.
[0046] In this embodiment, during implementation, the connectivity between the host computer and the controller is first verified by pinging the controller's IP address to check if the network link between the two is reachable. If the ping is successful, the corresponding communication service port of the controller (such as port 23 of TELNET) can be tested using tools such as telnet to check if a connection can be established normally, confirming that the service is not blocked by the firewall or the port is not occupied.
[0047] To check the connectivity between the controller and the master card, you can first ping the master card's IP address from the controller side to confirm network connectivity. Then, test whether the controller can access the master card's core service ports (such as FTP port 21 and TELNET port 23) normally. At the same time, check the master card's hardware status (such as whether the indicator lights are normal) and the online status of the master card in the controller's device diagnostic interface to rule out hardware failures or device offline situations. This will comprehensively confirm the connectivity issues of each link.
[0048] This embodiment automatically tests and displays the network connectivity results between the host computer and the controller, and between the Profibus master card and the controller when the slave configuration file upload fails. This allows for quick identification of the network link failure point corresponding to the upload failure, avoiding users blindly troubleshooting network problems and significantly reducing the time cost of troubleshooting. At the same time, the intuitive result display lowers the technical threshold for troubleshooting. Even operators unfamiliar with the system links can clearly see which communication link is causing the problem, reducing the tedious operation of manually testing each link one by one, improving the efficiency of fault handling in the configuration process, and helping users to more accurately carry out subsequent network repair operations. This accelerates the problem-solving process of slave configuration file upload and promotes the smooth progress of the configuration process for the slave devices to be configured.
[0049] Regarding the above S104 (sending a restart command to the Profibus master card to load and activate the slave configuration file, thereby configuring the slave device to be configured): During implementation, based on the previously established network connection between the host computer and the Profibus master card, the host computer sends a command message conforming to the master card's communication protocol format to the corresponding command receiving port of the Profibus master card through this network link. For example, "Reboot" is encapsulated as a core command field in this message. Then, it waits for the master card to return a response signal indicating successful command reception, confirming that the command has been correctly received. After receiving the "Reboot" command, the Profibus master card starts its own restart process. During the restart process, it automatically accesses the slave configuration file uploaded in its specified file system, reads the slave module configuration, Profibus bus communication parameters, and other information in the file, and completes the loading. After the master card restarts, it establishes Profibus bus communication with the slave device to be configured based on the loaded configuration information, thereby completing the configuration of the slave device. Subsequently, the host computer can send a status query command to confirm whether the configuration status of the master card and the slave device is normal.
[0050] In some embodiments, the method further includes: Based on the basic configuration information of the Profibus master station card, redundancy detection is performed to obtain the detection results; If the detection result indicates the existence of a Profibus backup master card, then the obtained Profibus backup master card IP address is used to establish a network connection between the host computer, the controller, and the Profibus backup master card. Upload the slave configuration file to the Profibus standby master card; Send a restart command to the Profibus standby master card to load the slave configuration file and make it effective.
[0051] In this embodiment, the basic configuration information of the Profibus master card includes, but is not limited to: the master card's own IP address, device identifier (such as model and hardware version), working mode (indicator of whether redundancy function is enabled), preset backup card association marker (such as the status field of whether a backup card exists), and the master card's core communication parameters (such as supported protocol types and communication port numbers).
[0052] In practice, redundancy detection is conducted based on this basic configuration information. Specifically, the system first checks whether there are fields in the master card's basic configuration indicating the existence of a backup master card or a redundancy enabled status. Then, using a configuration tool, it initiates connectivity checks (such as sending a ping command or status query command using the TELNET protocol) to the potential network address of the backup card associated with the basic configuration information. Simultaneously, it verifies whether the target address device can normally respond to the core services related to the Profibus master card (such as TELNET session establishment and FTP service availability). This determines whether a usable backup master card exists, thus obtaining the redundancy detection result.
[0053] There are two main ways to obtain the backup card IP address. One is to directly read the preset backup master card IP address field from the basic configuration information of the master card. The other is that if the basic configuration information is not directly stored, the backup card network segment or potential address associated with the basic configuration of the master card can be detected by tools during the redundancy detection process. When the device is detected to have backup master card characteristics (such as responding to a specific Profibus protocol and having a backup working mode identifier), its IP address can be obtained.
[0054] Using the obtained Profibus backup master station card IP address, a network connection is established between the host computer, the controller, and the Profibus backup master station card; the slave station configuration file is uploaded to the Profibus backup master station card; a restart command is sent to the Profibus backup master station card. The specific implementation methods of these steps are similar to the communication connection method, file upload method, and restart method of the Profibus master station card, and can be referred to the previous content, which will not be repeated here.
[0055] This embodiment establishes a network connection between the host computer, the controller, and the Profibus backup master card, ensuring that the backup card can access the entire configuration system. Then, the slave configuration file, identical to the master card, is uploaded to the backup card, and a restart command is sent to load and activate it. This ensures complete consistency between the backup and master card configurations, preventing communication interruptions or configuration failures during switching due to mismatched master and backup card configurations, fundamentally guaranteeing configuration consistency in the redundant system. Furthermore, the backup master card is ready after configuration loading. When the Profibus master card fails, the controller can quickly switch to the backup master card without additional configuration operations, achieving seamless system takeover. This effectively avoids interruptions in industrial control processes caused by master card failures, significantly improving the reliability and operational continuity of the Profibus device configuration system.
[0056] In some embodiments, the slave device configuration method is implemented based on the QT framework or C#. In this embodiment, the slave device configuration method is developed based on the QT framework or C#, which enables the method provided in this application embodiment to run natively on multiple operating systems such as Windows and Linux, enhancing its applicability and flexibility.
[0057] Those skilled in the art will understand that in the above-described method of the specific embodiments, the order in which the steps are written does not imply a strict execution order, and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0058] It should be noted that in practical applications, all the above-described possible implementation methods can be combined in any way to form possible embodiments of this application, and will not be described in detail here. The information (including but not limited to device information, user information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this application are all information and data authorized by the user or fully authorized by all parties. The software tools or components appearing in the embodiments of this application are merely illustrative examples and do not represent actual use.
[0059] Based on the same concept, this application also provides a slave device configuration device, which corresponds one-to-one with the slave device configuration method in the above embodiments. Figure 6 A schematic diagram of the slave device configuration apparatus provided in an embodiment of this application is shown. See also: Figure 6 As shown, the slave device configuration device 600 provided in this application embodiment includes: The generation module 601 is used to generate the corresponding slave configuration file based on the obtained general station description file and Profibus bus communication parameters of the slave device to be configured. The connection module 602 is used to establish a network connection between the host computer, the controller, and the Profibus master card based on the controller IP address and the Profibus master card IP address input by the user. Upload module 603 is used to upload the slave station configuration file to the Profibus master station card; The restart module 604 is used to send a restart command to the Profibus master card, so that it loads the slave configuration file and makes it effective, thereby realizing the configuration of the slave device to be configured.
[0060] It should be noted that the device is deployed on the host computer of the distributed control system, which also includes a controller and a Profibus master station card.
[0061] In some embodiments, in the above-described apparatus, the generation module 601 is specifically used for: The general station description file is parsed to obtain and display all modules supported by the slave device to be configured; In response to the user's selection, determine one or more modules required by the user; The slave configuration file is generated based on the module configuration data of the one or more user-required modules and the Profibus bus communication parameters.
[0062] In some embodiments, in the above-described apparatus, the upload module 603 is specifically used for: By calling the FTP communication library, an FTP client instance is initialized, and an FTP connection request is initiated to the Profibus master card; Send the preset username and password to the FTP server of the Profibus master station card to complete the login; Execute the FTP command to switch to the configuration file directory specified by the Profibus master card; Upload the slave configuration file.
[0063] In some embodiments, the device further includes a detection module for: If the slave configuration file upload fails, the network connectivity between the host computer and the controller is checked to obtain a first detection result; and The network connectivity between the Profibus master station card and the controller is detected to obtain a second detection result; Display the first detection result and the second detection result.
[0064] In some embodiments, the apparatus further includes a backup module for: Based on the basic configuration information of the Profibus master station card, redundancy detection is performed to obtain the detection results; If the detection result indicates the existence of a Profibus backup master card, then the obtained Profibus backup master card IP address is used to establish a network connection between the host computer, the controller, and the Profibus backup master card. Upload the slave configuration file to the Profibus standby master card; Send a restart command to the Profibus standby master card to load the slave configuration file and make it effective.
[0065] In some embodiments, the slave device configuration method in the above-described apparatus is implemented based on the QT framework or C#.
[0066] This invention provides a slave device configuration apparatus. First, it generates a suitable slave configuration file based on the general station description file of the slave device to be configured and the Profibus bus communication parameters. This ensures accurate matching between the configuration file and the slave device and the Profibus bus protocol, laying the foundation for subsequent configuration. Then, it establishes a network connection between the host computer, the controller, and the Profibus master card using the controller IP address and the Profibus master card IP address input by the user. This establishes a communication link for data transmission and command interaction between devices, ensuring smooth operation in subsequent steps. Next, it uploads the generated slave configuration file to the designated file system of the Profibus master card, completing the deployment of the configuration file to the hardware execution carrier. Finally, it sends a restart command to cause the Profibus master card to load and enable the slave configuration file, ultimately achieving standardized and automated configuration of the target slave device. As can be seen, the configuration scheme provided in this application embodiment is completely independent of the DCS system API. Its operation does not depend on the bitness (32 / 64-bit) of the DCS, fundamentally solving the technical problem that existing configuration tools cannot be applied in a 64-bit DCS environment. It does not require integration into any specific DCS software, nor does it require the installation of third-party frameworks or containers, achieving "out-of-the-box" functionality and greatly simplifying the deployment process. It seamlessly integrates the previously separate processes of generating and downloading configuration files (uploading to the master station card) into a unified platform, simplifying user operations, improving work efficiency, and reducing errors caused by switching between multiple tools. The configuration scheme provided in this application embodiment simplifies the configuration process for slave devices to access the bus, improves configuration efficiency and the stability of configuration results, and ensures that slave devices can be normally integrated into the Profibus bus communication system after configuration takes effect.
[0067] Specific limitations regarding the slave device configuration apparatus can be found in the limitations on the slave device configuration method described above, and will not be repeated here. Each module in the aforementioned slave device configuration apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0068] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Figure 7 As shown, at the hardware level, this electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or it may include non-volatile memory, such as at least one disk drive. Of course, this electronic device may also include other hardware required for other business operations.
[0069] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0070] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0071] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a slave device configuration device at the logical level. The processor executes the program stored in memory and specifically performs the aforementioned methods.
[0072] The processor may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0073] The electronic device can execute the slave device configuration method provided in several embodiments of this application, and implement the slave device configuration device in... Figure 6 The functions of the embodiments shown are not described in detail here.
[0074] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform the slave device configuration method provided in several embodiments of this application.
[0075] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0076] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0077] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0078] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0080] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0081] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0082] This application also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the slave device configuration method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0083] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0084] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0085] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for configuring slave station equipment, characterized in that, The method is deployed on a host computer in a distributed control system, which also includes a controller and a Profibus master station card. The method includes: Based on the obtained general station description file and Profibus bus communication parameters of the slave device to be configured, the corresponding slave configuration file is generated. Based on the controller IP address and Profibus master card IP address input by the user, a network connection is established between the host computer, the controller, and the Profibus master card; Upload the slave configuration file to the Profibus master card; A restart command is sent to the Profibus master card to load and activate the slave configuration file, thereby enabling the configuration of the slave device to be configured.
2. The method according to claim 1, characterized in that, Based on the acquired general station description file and Profibus bus communication parameters of the slave device to be configured, a corresponding slave configuration file is generated, including: The general station description file is parsed to obtain and display all modules supported by the slave device to be configured; In response to the user's selection, determine one or more modules required by the user; The slave configuration file is generated based on the module configuration data of the one or more user-required modules and the Profibus bus communication parameters.
3. The method according to claim 1, characterized in that, Uploading the slave configuration file to the Profibus master card includes: By calling the FTP communication library, an FTP client instance is initialized, and an FTP connection request is initiated to the Profibus master card; Send the preset username and password to the FTP server of the Profibus master station card to complete the login; Execute the FTP command to switch to the configuration file directory specified by the Profibus master card; Upload the slave configuration file.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: If the slave configuration file upload fails, the network connectivity between the host computer and the controller is checked to obtain a first detection result; and The network connectivity between the Profibus master station card and the controller is detected to obtain a second detection result; Display the first detection result and the second detection result.
5. The method according to any one of claims 1-3, characterized in that, The method further includes: Based on the basic configuration information of the Profibus master station card, redundancy detection is performed to obtain the detection results; If the detection result indicates the existence of a Profibus backup master card, then the obtained Profibus backup master card IP address is used to establish a network connection between the host computer, the controller, and the Profibus backup master card. Upload the slave configuration file to the Profibus standby master card; Send a restart command to the Profibus standby master card to load the slave configuration file and make it effective.
6. The method according to claim 1, characterized in that, The slave device configuration method is implemented based on the QT framework or C#.
7. A slave station equipment configuration device, characterized in that, The device is deployed on the host computer in the distributed control system, which also includes a controller and a Profibus master station card. The device includes: The generation module is used to generate the corresponding slave configuration file based on the obtained general station description file and Profibus bus communication parameters of the slave device to be configured; The connection module is used to establish a network connection between the host computer, the controller, and the Profibus master card based on the controller IP address and the Profibus master card IP address input by the user. The upload module is used to upload the slave station configuration file to the Profibus master station card; The restart module is used to send a restart command to the Profibus master card, so that it loads the slave configuration file and makes it effective, thereby enabling the configuration of the slave device to be configured.
8. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, characterized in that, when executed, the executable instructions cause the processor to perform the steps of the method as described in any one of claims 1-6.
9. A computer-readable storage medium storing one or more programs, characterized in that, When the one or more programs are executed by an electronic device including multiple applications, the electronic device causes the electronic device to perform the steps of the method as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product carries program code, the program code including instructions that can be used to perform the steps of the method as described in any one of claims 1-6.