PLC configuration-free method and system based on automatic discovery and topology identification, terminal equipment and storage medium
By using automatic discovery and topology recognition technology, the system automatically identifies devices, establishes communication connections, obtains hardware topology data, and automatically generates hardware configurations using industrial control equipment broadcast packets. This solves the problem of cumbersome PLC programming and device connection processes, and enables plug-and-play and efficient system deployment.
Patent Information
- Application Number
- CN202610157833.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-05-26
AI Technical Summary
The existing PLC programming and device connection process is cumbersome, relies on manual configuration which is prone to errors, requires high levels of engineer knowledge, and lacks a plug-and-play mechanism, resulting in low engineering efficiency and system instability.
By using automatic discovery and topology recognition technology, the system automatically identifies devices using industrial control equipment broadcast packets, establishes communication connections, obtains hardware topology data, automatically generates hardware configurations, and achieves program synchronization, simplifying engineer operations.
It enables plug-and-play functionality between the PLC, host computer, and expansion devices, reducing configuration time from hours to minutes or seconds, eliminating human error, improving debugging and maintenance efficiency, and enhancing system flexibility.
Smart Images

Figure CN122093253A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of industrial automation control technology, and in particular relates to a PLC configuration-free method, system, terminal equipment and storage medium based on automatic discovery and topology recognition. Background Technology
[0002] In the field of industrial automation control, programming, configuration, and device connection scenarios for Programmable Logic Controllers (PLCs) require engineers to complete operations such as selecting device models, configuring hardware, and uploading / downloading programs during the development, modification, or downloading of PLC application projects.
[0003] Related technologies rely on engineers to manually perform these steps, including accurately selecting the target PLC model from numerous models, manually adding and configuring the central processing unit (CPU), expansion modules, and other devices according to the actual hardware connection, and setting relevant parameters. Furthermore, program uploading requires actively connecting and performing specialized operations. Its disadvantages are that the process is cumbersome and time-consuming, requires engineers to have a high level of hardware knowledge, is prone to configuration errors that cause the system to malfunction, and lacks a "plug and play" intelligent mechanism, resulting in low engineering efficiency, high debugging threshold, and difficulty in rapid equipment replacement and flexible system reconstruction. Summary of the Invention
[0004] This application provides a PLC configuration-free method, system, terminal device, and storage medium based on automatic discovery and topology identification. It can realize automatic identification, automatic pairing, automatic configuration, and automatic program synchronization between PLC and host computer, and between PLC and expansion devices, greatly simplifying the operation of engineers and realizing true "plug and play".
[0005] In a first aspect, embodiments of this application provide a PLC configuration-free method based on automatic discovery and topology identification, including:
[0006] When a broadcast packet from an industrial control device is detected on the network, the broadcast packet from the industrial control device is retrieved. Establish a communication connection with the industrial control equipment based on the broadcast packet from the industrial control equipment; Obtain topology data sent by industrial control equipment; wherein, the topology data is hardware topology data generated by the industrial control equipment based on the hardware connection information between the industrial control equipment and its subordinate equipment and the identification data of the industrial control equipment.
[0007] Create the corresponding hardware configuration based on the topology data.
[0008] In this embodiment, the system automatically identifies devices by listening to broadcast packets from industrial control equipment in the network, establishes communication with the devices based on the identity information in the broadcast packets, and then obtains topology data automatically generated by the devices, containing the hardware connection relationships between themselves and their subordinate modules. Finally, based on this data, the system automatically generates a hardware configuration that perfectly matches the field hardware. It constructs an automatic discovery mechanism based on industrial control equipment network broadcasts, standardized communication handshake rules, a structured topology data system autonomously collected by the PLC, and an automated configuration and program linkage engine based on topology data on the host computer. This establishes a fully automated process from device network identification and communication pairing to configuration generation and program synchronization, eliminating the various steps of traditional manual configuration. Therefore, it enables plug-and-play functionality between the PLC, host computer, and expansion devices, and significantly simplifies engineer operations.
[0009] In one possible implementation of the first aspect, establishing a communication connection with the industrial control equipment based on the industrial control equipment broadcast packet includes: Parse the broadcast packets of industrial control equipment to obtain the identification data corresponding to the industrial control equipment; The identity data is matched with the first preset database to obtain the matching result; If the matching result indicates a successful match, a communication connection is established with the industrial control equipment.
[0010] In this embodiment, the identification of industrial control equipment is extracted by parsing broadcast packets and verified against a first preset database. Communication connections are established only for successfully matched legitimate devices. This achieves automated communication pairing with industrial control equipment without the need for manual configuration of communication parameters. Furthermore, the database verification completes the verification of device legitimacy and compatibility, avoiding the risk of connecting to incompatible devices. This improves the automation, accuracy, and security of communication establishment, laying a reliable communication foundation for subsequent topology data acquisition and automatic configuration.
[0011] In one possible implementation of the first aspect, after acquiring the topology data sent by the industrial control equipment, a corresponding hardware configuration is created based on the topology data, including: The topology data is preprocessed to obtain preprocessed topology data; the preprocessing includes data validation, removal of invalid data, and completion of missing data. Convert the preprocessed topology data into structured data; Create the corresponding hardware configuration based on the structured data.
[0012] In this embodiment, by performing preprocessing on the topology data, such as verification, invalid removal, and missing data filling, and converting it into structured data, and then creating hardware configurations based on the structured data, the integrity, accuracy, and standardization of the topology data are ensured, and the generation of hardware configurations is supported by reliable and standardized data. This achieves automated and precise creation of hardware configurations, avoids errors and inefficiencies in manual data entry and configuration drawing, and significantly improves the efficiency and quality of configuration creation.
[0013] In one possible implementation of the first aspect, the corresponding hardware configuration is created based on the structured data, including: The structured data is parsed to obtain the identification data and hardware connection information of the industrial control equipment. The identity data is matched with the second preset database to obtain the preset attributes corresponding to the industrial control equipment; the preset attributes include the type of industrial control equipment, inherent parameters, communication adaptation rules and address allocation rules; Create the corresponding hardware configuration based on preset attributes and hardware connection information.
[0014] In this embodiment, by parsing structured data to extract the identification and hardware connection information of industrial control equipment, and combining it with the device-specific preset attributes matched by the second preset database, hardware configuration is created. This allows the configuration creation to conform to the inherent parameters, communication and address rules of the equipment and the actual hardware connection relationship, achieving precise and personalized automatic generation of hardware configuration. This completely eliminates the tedious operation of manual configuration, greatly improves the efficiency and adaptability of configuration creation, and ensures a high degree of matching between the configuration and the field equipment.
[0015] In one possible implementation of the first aspect, the corresponding hardware configuration is created based on preset attributes and hardware connection information, including: The industrial control equipment and slave devices are sorted according to the hardware connection information to obtain the configuration arrangement order; Assign communication addresses and communication parameters to industrial control equipment and / or slave devices according to preset attributes; A hardware topology attribute diagram is generated based on the configuration arrangement order, communication address, and communication parameters to complete the creation of the hardware configuration.
[0016] In this embodiment, the device configuration order is determined based on the hardware connection information, and communication addresses and parameters are automatically assigned to the devices in combination with preset attributes. The hardware topology attribute diagram is then generated to complete the configuration creation. This ensures that the hardware configuration not only conforms to the actual device connection logic on site, but also strictly matches the inherent communication and address rules of the devices. This achieves fully automated and accurate creation of the hardware configuration from device ordering and parameter configuration to visualization generation, completely eliminating the tedious operation of manual configuration and greatly improving the efficiency of configuration creation. At the same time, it ensures a high degree of compatibility and operational stability between the configuration and the on-site industrial control equipment and slave devices.
[0017] In one possible implementation of the first aspect, the method further includes: After completing the hardware configuration, a program upload request command is sent to the industrial control equipment so that the industrial control equipment can upload its executable control program according to the preset protocol after receiving the program upload request command.
[0018] In this embodiment, after the hardware configuration is created, a program upload request is automatically sent to the industrial control equipment and an executable control program is obtained according to a preset protocol. This achieves automated connection between configuration creation and program synchronization, eliminating the need for manual program upload. It completely opens up the fully automated link from hardware configuration to program matching, greatly improving the overall efficiency of industrial control system deployment and debugging, while ensuring accurate adaptation between the program and the created hardware configuration.
[0019] Secondly, embodiments of this application provide a configuration-free PLC system based on automatic discovery and topology identification, comprising: Control equipment, industrial control equipment, and at least one slave device; wherein the slave device is connected to the industrial control equipment; The control device is used to implement the PLC configuration-free method based on automatic discovery and topology identification in the first aspect mentioned above; Industrial control equipment is used to generate topology data based on the hardware connection information of the industrial control equipment and the identification data of the industrial control equipment.
[0020] Industrial control equipment is also used to send topology data to control equipment so that the control equipment can create its corresponding hardware configuration based on the topology data.
[0021] Thirdly, embodiments of this application provide a configuration-free PLC based on automatic discovery and topology identification, including: The communication data acquisition module is used to acquire the industrial control equipment broadcast packet when the network contains the broadcast packet of industrial control equipment. The communication connection module is used to establish a communication connection with the industrial control equipment based on the broadcast packets of the industrial control equipment. The topology data acquisition module is used to acquire topology data sent by the industrial control equipment; wherein, the topology data is hardware topology data generated by the industrial control equipment based on the acquired hardware connection information between the equipment and its subordinate devices and the identification data of the industrial control equipment.
[0022] The hardware component creation module is used to create the corresponding hardware configuration based on the topology data.
[0023] Fourthly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a PLC configuration-free method based on automatic discovery and topology identification as described in any of the first aspects above.
[0024] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the PLC configuration-free method based on automatic discovery and topology identification as described in any of the first aspects above.
[0025] In a sixth aspect, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the PLC configuration-free method based on automatic discovery and topology identification as described in any of the first aspects above.
[0026] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a schematic diagram of the overall architecture of the PLC configuration-free system based on automatic discovery and topology identification provided in the embodiments of this application; Figure 2 This is a schematic diagram of the PLC configuration-free process based on automatic discovery and topology identification provided in the embodiments of this application; Figure 3 This is a schematic diagram of the process for establishing a communication connection provided in an embodiment of this application; Figure 4 This is a schematic diagram of the hardware configuration creation process provided in the embodiments of this application. Figure 1 ; Figure 5This is a schematic diagram of the hardware configuration creation process provided in the embodiments of this application. Figure 2 ; Figure 6 This is a schematic diagram of the hardware configuration creation process provided in the embodiments of this application. Figure 3 ; Figure 7 This is the overall flowchart of the PLC configuration-free system based on automatic discovery and topology identification provided in the embodiments of this application; Figure 8 This is a schematic diagram of the overall architecture of a PLC without configuration based on automatic discovery and topology identification provided in the embodiments of this application; Figure 9 This is a structural block diagram of the PLC configuration-free device based on automatic discovery and topology identification provided in the embodiments of this application; Figure 10 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation
[0029] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0030] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0031] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0032] As used in this application specification and the appended claims, the term "if" may, depending on the context, mean "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may, depending on the context, mean "once determined," "in response to determination," "once [the described condition or event]," or "in response to detection."
[0033] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0034] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0035] In the field of industrial automation control, PLC programming, configuration, and device connection scenarios require engineers to complete operations such as selecting device models, configuring hardware, and uploading / downloading programs during the development, modification, or download of PLC application projects.
[0036] Related technologies rely on engineers to manually perform these steps, including accurately selecting the target PLC model from numerous models, manually adding CPUs, expansion modules, and other devices according to the actual hardware connection and setting relevant parameters, and the program upload requires active connection and execution of special operations; its disadvantages are that the process is cumbersome and time-consuming, requires high hardware knowledge from engineers, is prone to configuration errors that cause the system to malfunction, and lacks a "plug and play" intelligent mechanism, resulting in low engineering efficiency, high debugging threshold, and is not conducive to rapid equipment replacement and flexible system reconstruction.
[0037] To address the aforementioned technical issues, this application provides a PLC configuration-free method based on automatic discovery and topology identification. This method involves four main steps: PLC power-on broadcast heartbeat packet, automatic connection matching with the host computer, PLC scanning and uploading hardware topology data, automatic configuration generation by the host computer, and automatic program synchronization. Combining intelligent PLC, configuration-free host computer software, and standardized slave devices, this method achieves "network-ready" functionality, reducing configuration time from hours to minutes or even seconds. It eliminates human error, improves debugging and maintenance efficiency, and enhances system flexibility.
[0038] See Figure 1 This is a schematic diagram of the overall architecture of the PLC configuration-free system based on automatic discovery and topology identification provided in the embodiments of this application, as shown below. Figure 1As shown, the core consists of three types of slave devices: a host computer, a PLC master station, expansion modules 1 and 2, and a remote module 3. The host computer establishes a communication connection with the PLC master station via Ethernet / USB. The PLC master station is connected to local expansion modules 1 and 2 via a backplane bus and to remote module 3 via a fieldbus, forming a complete hardware connection system of "host computer - PLC master station - slave devices", clearly showing the connection relationship and data transmission channel of each component.
[0039] according to Figure 1 The PLC configuration-free system based on automatic discovery and topology recognition shown automatically achieves configuration-free PLC operation. This method is applied to the host computer in the PLC configuration-free system based on automatic discovery and topology recognition. See [link to documentation]. Figure 2 This is a schematic diagram of a PLC configuration-free process based on automatic discovery and topology identification provided in an embodiment of this application. It is intended as an example and not a limitation. The method may include the following steps: S101: When a broadcast packet for industrial control equipment is detected in the network, the broadcast packet for industrial control equipment is obtained.
[0040] In this embodiment, after an industrial control device (such as a PLC device) is powered on and connected to the network, it actively and periodically broadcasts communication heartbeat packets (industrial control device broadcast packets) containing its unique identifier (such as serial number, MAC address), device model, firmware version, and other information to the network. The host computer continuously monitors network data and captures the data packets containing its own key information actively broadcast by the industrial control device, laying the foundation for subsequent device identification, automatic matching, and establishment of communication connections.
[0041] For example, the host computer needs to first run a software module with network monitoring capabilities (such as a network monitoring module that does not require configuration of the host computer software unit). This module will open a specified network port (adapting to protocols such as UDP commonly used by industrial control equipment) and continuously scan the network data stream within the local area network. At the same time, it will preset the feature recognition rules for broadcast packets of industrial control equipment (such as the protocol type of the data packet, specific field identifiers, data format, etc.). When a network data packet that matches the features is scanned, the system will automatically filter and capture the data packet to avoid accidentally capturing other irrelevant network data. The captured broadcast packet will then be transmitted to the subsequent parsing module to provide raw data for operations such as extracting device information and matching with the database. The entire process requires no manual intervention, realizing the automated capture of broadcast packets of industrial control equipment.
[0042] S102, establish a communication connection with the industrial control equipment based on the broadcast packet of the industrial control equipment.
[0043] In this embodiment, the broadcast packets of industrial control equipment captured by the host computer are used as data to automatically complete the bidirectional communication link with the target industrial control equipment (such as PLC). Engineers do not need to manually select the equipment model or configure the communication parameters. This is the key link in the solution to achieve "configuration-free connection" of the equipment, and opens up the data transmission channel for subsequent processes such as hardware topology data upload and automatic configuration generation.
[0044] In one embodiment, see Figure 3 This is a schematic diagram of the process for establishing a communication connection provided in an embodiment of this application, such as... Figure 3 As shown, step S102 includes: S201, parse the broadcast packet of the industrial control equipment to obtain the identification data corresponding to the industrial control equipment.
[0045] In the example of this application, extracting key data (i.e., identification data) that can uniquely identify the device from the captured broadcast packet of the industrial control equipment is the core intermediate step connecting "capturing broadcast packet" and "establishing communication connection". This provides a unique identification basis for subsequent accurate matching of devices and establishment of dedicated communication links, avoiding device confusion or misconnection.
[0046] For example, after receiving the captured broadcast packet from the industrial control equipment, the broadcast packet parsing module of the host computer first unpacks the data packet according to the preset standardized data format (such as the fixed format adapted to PLC broadcast packets in the solution), stripping away irrelevant redundant information such as the protocol header and checksum of the data packet; then, according to the field definition rules of the broadcast packet, it locates and extracts the predefined identity fields, which are unique information exclusive to the industrial control equipment (such as the PLC's MAC address, equipment serial number, factory unique equipment code, etc.); after extraction, the identity data is validated, and invalid, missing, or incorrectly formatted data is removed. Finally, the validated and clean identity data is structured and stored, and transmitted to the device matching module of the host computer, providing accurate device identification basis for subsequent comparison with the database and establishment of targeted communication connections. The entire process is executed automatically by the software without manual intervention.
[0047] S202, Match the identity data with the first preset database to obtain the matching result.
[0048] In this embodiment of the application, the parsed industrial control equipment identification data is used to query the "first preset database" (such as the device project library built into the host computer or the cloud device database) to determine whether the device has been registered in the database and whether it is compatible with the current system. Finally, the result of "matching successfully" or "matching failed" is obtained, which provides a decision basis for whether to establish a communication connection and call the corresponding driver / configuration parameters.
[0049] For example, the host computer's automatic device matching module receives verified identification data (such as the PLC's MAC address, serial number, etc.), uses it as the core search keyword, and searches the first preset database according to the database's preset query rules (such as exact matching and fuzzy matching priority). This database stores the identification, corresponding driver, communication protocol type, adaptation parameters, and other related information of various compatible industrial control devices. During the search process, the system automatically compares the identification data with the device records stored in the database to verify the device's legitimacy, compatibility, and supported communication methods. Finally, a clear matching result is generated.
[0050] S203. If the matching result indicates a successful match, a communication connection is established with the industrial control equipment.
[0051] In this embodiment, if the match is successful, the corresponding driver, communication configuration template and other related data of the device are retrieved synchronously to prepare for establishing a communication connection; if the match fails, prompts such as "device incompatible" or "not registered" are fed back, and the subsequent connection process is terminated. The entire process is executed automatically without the need for manual intervention.
[0052] In the above method, the identification of industrial control equipment is extracted by parsing the broadcast packet and verified against the first preset database. Communication connection is established only for successfully matched legitimate devices. This achieves automated communication pairing with industrial control equipment without the need for manual configuration of communication parameters. Furthermore, the database verification completes the verification of device legitimacy and compatibility, avoiding the risk of connecting to incompatible devices. This improves the automation, accuracy, and security of communication establishment and lays a reliable communication foundation for subsequent topology data acquisition and automatic configuration.
[0053] S103, acquire topology data sent by the industrial control equipment; wherein, the topology data is hardware topology data generated by the industrial control equipment based on the acquired hardware connection information between the industrial control equipment and the slave equipment and the identification data of the industrial control equipment.
[0054] In this application, after the host computer establishes a communication connection with the industrial control equipment (PLC), the host computer receives and obtains the hardware topology relationship data actively uploaded by the industrial control equipment (PLC). This data is structured data generated by the PLC after integrating its own identity and the actual hardware connection information of the subordinate modules. It is the core data basis for the host computer to automatically create hardware configuration and realize "manual configuration-free" operation, and provides accurate on-site hardware connection reference for operations such as device sequence arrangement and I / O address allocation.
[0055] For example, after the industrial control equipment (PLC) establishes a communication connection with the host computer, the PLC, acting as the master station, actively scans all its subordinate devices (such as local expansion modules and remote I / O modules) through industrial communication links such as backplane bus and fieldbus. It obtains the physical connection information between each subordinate module and itself in real time (including the subordinate module model, installation slot, communication interface, I / O configuration, and hierarchical mounting relationship). Then, it integrates this hardware connection information with its own unique identification data (such as device serial number, MAC address, model, etc.) and encapsulates it in a structured manner according to a preset standardized data format (such as JSON / XML) to generate complete hardware topology data. The PLC actively uploads this topology data to the host computer through the established bidirectional communication link. The host computer then captures and stores the topology data in real time through a dedicated data receiving module, completing the data acquisition process and preparing data for subsequent topology parsing and automatic configuration operations. The entire process requires no manual intervention and ensures that the data is highly consistent with the actual connection status of the hardware on site.
[0056] S104 creates the corresponding hardware configuration based on the topology data.
[0057] In this embodiment, the host computer automatically completes the creation of hardware configuration that perfectly matches the physical connection on site, based on the hardware topology data obtained from the industrial control equipment (PLC). This completely replaces the traditional manual operation of adding equipment and configuring parameters, and is the core link in the solution to achieve "configuration-free" PLC, providing a precise hardware configuration foundation for subsequent program synchronization and equipment control.
[0058] In the above method, the system automatically identifies devices by listening to broadcast packets from industrial control devices in the network, establishes communication with the devices based on the identity information in the broadcast packets, and then obtains topology data automatically generated by the devices, containing the hardware connection relationships between themselves and their subordinate modules. Finally, based on this data, the system automatically generates a hardware configuration that perfectly matches the field hardware. This method constructs an automatic discovery mechanism based on industrial control device network broadcasts, standardized communication handshake rules, a structured topology data system autonomously collected by the PLC, and an automated configuration and program linkage engine based on topology data on the host computer. It establishes a fully automated process from device network identification and communication pairing to configuration generation and program synchronization, eliminating the various steps of traditional manual configuration. Therefore, it enables plug-and-play functionality between the PLC, host computer, and expansion devices, and significantly simplifies engineer operations.
[0059] In one embodiment, see Figure 4 This is a schematic diagram of the hardware configuration creation process provided in the embodiments of this application. Figure 1 ,like Figure 4 As shown, step S104 includes: S301, perform data preprocessing on the topology data to obtain preprocessed topology data; wherein, the preprocessing includes data verification, removal of invalid data and completion of missing data.
[0060] In this embodiment, the original topology data uploaded by the industrial control equipment (PLC) is standardized and normalized in the preprocessing. By verifying the validity of the data, removing invalid information, and supplementing missing key content, dirty data and incomplete data are filtered out to obtain preprocessed topology data that is uniform in format, complete in information, and accurate and usable. This clears the data obstacles for the subsequent accurate creation of hardware configuration by the host computer and avoids configuration errors, address allocation conflicts and other problems caused by problems with the original data.
[0061] For example, after receiving the original hardware topology relationship data uploaded by the PLC, the topology data preprocessing module of the host machine automatically performs the whole-process processing according to the preset process: First, data verification is carried out. According to the industry standard format and the data specifications preset in the solution, the format legality, field integrity and logical consistency of the original data are verified (such as whether the equipment model code conforms to the rules, whether there is a logical contradiction in the connection relationship between master and slave devices, whether the parameters such as the number of I / O points are within a reasonable range), and abnormal data that fails the verification is marked. Next, invalid data is removed, filtering out all non-configurable content such as abnormal data marked for verification, redundant communication protocol header information, and repeatedly reported device data, retaining only valid core data. Finally, missing data is completed. For key fields missing after verification (such as missing firmware versions or physical slot numbers for some subordinate modules), the system automatically retrieves the standard default parameters of the device from the first preset database to complete the missing data, or deduces the missing information based on the correlation logic in the topology data. Finally, the processed topology data is encapsulated and stored in a unified structured format (such as JSON / XML) that can be recognized by the host computer configuration rule engine, resulting in preprocessed topology data that is complete, formatted correctly, and can be directly used for hardware configuration creation. The entire process is automated and requires no manual intervention.
[0062] S302 converts the preprocessed topology data into structured data.
[0063] In this embodiment, the preprocessed topology data, after verification, invalidation removal, and missing data filling, is converted into standardized structured data that can be directly recognized, called, and parsed by the host computer system. This solves the problems of inconsistent original topology data formats and poor machine readability, and provides basic data with standardized format, clear hierarchy, and direct interface to configuration rule engine for subsequent automatic hardware configuration creation. It is a key format conversion link connecting data preprocessing and automatic hardware configuration.
[0064] For example, after receiving the preprocessed topology data, the topology data format conversion module of the host computer first determines the unified format of the structured data (such as JSON or XML formats commonly used in industrial scenarios, or the structured data format specific to the host computer programming software) according to the industrial control equipment hardware configuration data specifications preset in the solution, and defines fixed data fields and hierarchical relationships (such as the root node being PLC master station information, child nodes being slave module information, and each node containing key fields such as equipment model, physical slot, I / O configuration, communication parameters, and identification). Then, according to this specification, it processes various types of information (PLC master station identification, slave module identification, etc.) in the preprocessed topology data. The hardware connection relationship between modules and the main station, the core attribute parameters of each module, etc. are mapped, hierarchically divided, and formatted. The scattered valid data is sorted into a hierarchical structured data structure according to the logic of "main station-subordinate module-module attribute". At the same time, each key field is given a standardized identifier to ensure that the configuration rule engine can accurately locate and retrieve the required information. After the conversion is completed, the structured data is finally formatted and verified. After confirming that there are no missing fields or disordered hierarchies, it is stored in the designated data area of the host computer for direct call when automatically creating hardware configurations later. The whole process is executed automatically by software without manual intervention in format definition and data sorting.
[0065] S303 creates the corresponding hardware configuration based on structured data.
[0066] In this embodiment, the host computer uses structured topology data that is formatted, hierarchical, and directly recognizable as the core basis to automatically complete the hardware configuration creation that matches the physical hardware on site in a 1:1 ratio. This completely replaces the tedious operation of manually adding equipment and configuring parameters in the traditional way. It is the core execution link for the solution to achieve "configuration-free" PLC, and provides a precise and usable hardware configuration foundation for subsequent program synchronization and equipment control.
[0067] In the above method, by performing preprocessing on the topology data, such as verification, invalid removal, and missing data filling, and converting it into structured data, and then creating hardware configurations based on the structured data, the integrity, accuracy, and standardization of the topology data are guaranteed. At the same time, the generation of hardware configurations is supported by reliable and standardized data, realizing the automated and precise creation of hardware configurations. This avoids the errors and inefficiencies of manual data entry and configuration drawing, and greatly improves the efficiency and quality of configuration creation.
[0068] In one embodiment, see Figure 5 This is a schematic diagram of the hardware configuration creation process provided in the embodiments of this application. Figure 2 ,like Figure 5 As shown, step S303 includes: S401 parses the structured data to obtain the identification data and hardware connection information of the industrial control equipment.
[0069] In this embodiment, two types of core information are precisely extracted from the standardized structured topology data that can be directly identified by the host computer: the unique identification data of the industrial control equipment (PLC) itself, and the actual hardware connection information between the PLC and its subordinate modules. This provides clear and independent core data support for subsequent configuration based on "equipment identity matching parameters and connection information", and is a key analytical step in connecting structured data and automatic hardware configuration.
[0070] For example, after receiving structured topology data with a standardized format and clear hierarchy, the host computer's structured data parsing module first locates the predefined "industrial control equipment identification field area" and "hardware connection information field area" in the data according to the preset structured data field definition rules (consistent with the field and hierarchy conventions during the previous data conversion), thereby achieving precise partitioning of the two types of core information; Subsequently, the unique identification data of the PLC (such as MAC address, device serial number, factory unique code, device model, etc.) is extracted from the identification field area. This data will be used to retrieve the corresponding standard adaptation parameters from the device database later. At the same time, complete field hardware connection details are extracted from the hardware connection information field area, including the hierarchical mounting relationship between the PLC and slave modules, the physical installation location of each slave module (such as slot number), the communication link type between modules, and the core attributes of each module (such as the number of I / O points, module type), etc. This information will be used to build the hardware configuration structure according to the actual scenario later. During the parsing process, a simple integrity check is performed on the two types of information to ensure that no key fields are missing. Finally, the extracted identification data and hardware connection information are structured and stored separately in designated data areas, forming two independent and usable types of data, which can be directly called in the subsequent hardware configuration creation stage. The entire process is executed automatically by software without manual intervention, ensuring the accuracy and completeness of the extracted information.
[0071] S402, Match the identification data with the second preset database to obtain the preset attributes corresponding to the industrial control equipment; wherein, the preset attributes include the type of industrial control equipment, inherent parameters, communication adaptation rules and address allocation rules.
[0072] In this embodiment, the unique identification data of the industrial control equipment is parsed and accurately searched and matched in the second preset database to retrieve the factory-fixed and standardized preset attributes of the equipment (including type, inherent parameters, communication and address allocation rules). This provides a standard parameter basis that is strongly compatible with the equipment for subsequent automatic hardware configuration, avoiding configuration errors caused by mismatch between configuration parameters and actual equipment attributes. This is a key parameter matching link for achieving accurate and automated hardware configuration.
[0073] For example, after receiving the parsed industrial control equipment identification data (such as MAC address, equipment serial number, factory unique code, etc.), the host computer's device attribute matching module uses it as precise search keywords and performs targeted searches on the database according to the query rules of the second preset database (prioritizing full and precise matching to ensure the uniqueness of equipment identification). This database pre-stores standardized information of all types of compatible industrial control equipment, with core associations between each equipment's identification and corresponding complete preset attributes, and the attribute classification is clear and the parameters are fixed and unified.
[0074] After a successful match, the system will automatically retrieve the complete set of preset attributes corresponding to the industrial control equipment, including equipment type (such as PLC master station, remote IO module, functional module, etc.), inherent parameters (such as total number of I / O points, signal type, voltage level, hardware interface specifications, etc.), communication adaptation rules (supported industrial communication protocols, default baud rate, data bit / stop bit configuration, verification method, etc.), and address allocation rules (default I / O address start value, address step size, address segment allocation specifications, etc.). If the match fails, the system will provide a device incompatibility prompt and terminate the subsequent configuration process. After a successful match, the retrieved preset attributes will be structured and stored in the designated data area, linked with the previously parsed hardware connection information, and directly used in the subsequent hardware configuration creation stage. The entire process is executed automatically by the software without manual intervention in parameter querying and retrieval, ensuring that the parameters used in the configuration are completely compatible and standardized with the actual attributes of the equipment.
[0075] S403 creates its corresponding hardware configuration based on preset attributes and hardware connection information.
[0076] In this embodiment, the preset attributes (standardized parameter rules) of the industrial control equipment matched by the host computer are used as the "configuration basis," and the parsed hardware connection information (actual on-site connection situation) is used as the "structural blueprint." The two work together to automatically create a hardware configuration that is compatible with the equipment attributes and consistent with the on-site physical connection. This ensures both the accuracy of the configuration parameters (complies with the equipment specifications) and the authenticity of the configuration structure (restores the on-site hardware layout). This is the core execution link for achieving "precision + automation" in hardware configuration.
[0077] In the above method, the identification and hardware connection information of industrial control equipment are extracted by parsing structured data. The hardware configuration is created by combining the device-specific preset attributes matched by the second preset database. The configuration creation is made to fit the inherent parameters, communication and address rules of the equipment and the actual hardware connection relationship. This achieves accurate and personalized automatic generation of hardware configuration, completely eliminates the tedious operation of manual configuration, greatly improves the efficiency and adaptability of configuration creation, and ensures a high degree of matching between the configuration and the field equipment.
[0078] In one embodiment, see Figure 6This is a schematic diagram of the hardware configuration creation process provided in the embodiments of this application. Figure 3 ,like Figure 6 As shown, step S403 includes: S501 sorts the industrial control equipment and slave devices according to the hardware connection information to obtain the configuration arrangement order.
[0079] In this embodiment, based on the field hardware connection information parsed by the host computer, the hierarchical relationship and sequence of the PLC master station and all slave devices (such as expansion modules and remote modules) are automatically arranged according to the logic rules of industrial control. Finally, the display and association order of each device in the hardware configuration is determined, ensuring that the configuration structure and the field physical installation and connection logic are completely consistent, providing a clear structural foundation for subsequent address allocation and communication configuration.
[0080] For example, after receiving hardware connection data containing information such as master-slave device hierarchy, physical installation location, and communication link type, the host computer's device sorting module calls the preset sorting rules. First, it sets the PLC master station as the sorting benchmark (root node), and then classifies the devices according to the connection level—local expansion devices directly connected to the master station slot via the backplane bus are classified as first-level slave devices, and remote modules mounted via the fieldbus are classified as second-level slave devices. Subsequently, the first-level slave devices are sorted sequentially according to their physical slot numbers (such as slot 0, slot 1), and the second-level slave devices are sorted according to their communication cascading order or physical deployment distance. Finally, a standardized configuration arrangement order of "PLC master station → local expansion devices (slot order) → remote slave devices (cascading / deployment order)" is formed. The entire process is executed automatically to ensure that the configuration sorting is completely matched with the actual connection and installation order on site.
[0081] S502 assigns communication addresses and communication parameters to industrial control equipment and / or slave devices according to preset attributes.
[0082] In this embodiment, based on the standardized preset attributes of the industrial control equipment and slave equipment matched by the host computer, exclusive and suitable communication addresses (such as I / O addresses and IP addresses) and communication parameters (such as protocol type and baud rate) are automatically assigned to the two types of equipment, replacing the traditional manual configuration operation. This ensures that there are no conflicts in the communication addresses and that the communication parameters are highly matched with the hardware attributes of the equipment, thus laying a solid communication foundation for stable data interaction between devices and normal operation of hardware configuration.
[0083] For example, the communication configuration module of the host computer first retrieves the preset attributes (including communication adaptation rules, address allocation rules, and inherent parameters) of the industrial control equipment (PLC master station) and each slave device obtained in the previous matching. At the same time, combined with the determined configuration arrangement order, it automatically executes the configuration according to the logic of "master station first, slave station second, local station first, remote station second": first, it assigns a basic communication address to the PLC master station (such as the default IP address and the starting value of the master station's dedicated I / O address segment), and configures the core communication parameters (such as the supported industrial communication protocols, default baud rate, data bits / stop bits / checksum method) according to its preset communication adaptation rules.
[0084] Then, communication addresses are assigned to each slave device. Local expansion devices are assigned continuous, conflict-free I / O addresses according to the slot order of the configuration and the preset address allocation rules (dedicated address ranges are defined according to the number of I / O points of each module). Remote devices are assigned unique network IP addresses and dedicated remote communication address ranges are defined. Finally, all slave devices are matched with communication parameters consistent with the master station (such as unified protocol and baud rate). At the same time, adaptation parameters are fine-tuned according to the preset attributes of the slave devices (such as the communication rate of some high-speed modules). The uniqueness of addresses and the compatibility of parameters are automatically verified throughout the process to avoid problems such as address conflicts and protocol incompatibility. Finally, the standardized allocation of communication addresses and parameters for all devices is completed.
[0085] S503 generates a hardware topology attribute diagram based on the configuration arrangement order, communication address, and communication parameters to complete the creation of the hardware configuration.
[0086] In this embodiment, the previously determined configuration arrangement order, allocated communication addresses and communication parameters are integrated to automatically generate a visual hardware topology attribute diagram, and finally complete the hardware configuration creation. This not only restores the physical connection and hierarchical relationship of the field devices, but also clearly marks the core communication configuration of each device, making the configuration structure intuitive and the parameters verifiable. This provides a visual and directly usable hardware configuration environment for subsequent program synchronization and device debugging.
[0087] For example, the configuration generation module of the host computer calls the core data (configuration arrangement order, communication addresses of each device, and communication parameters) that have been determined in the early stage, and automatically executes according to the preset visualization drawing rules: First, based on the configuration arrangement order as the framework, a hierarchical structure is built in the software interface with "PLC master station as root node, local expansion devices arranged in slot order, and remote devices mounted in cascading order" to restore the actual connection logic of the devices; then, key information is marked for each device node, including core attributes such as device model, communication address (I / O address, IP address), and communication parameters (protocol type, baud rate, and parity method); then, the communication links between devices (such as backplane bus and fieldbus) are automatically drawn, and the link type and transmission rules are marked; finally, a hardware topology attribute diagram with a clear structure and complete attributes is generated (usually presented in the form of a tree diagram or schematic diagram), and the configuration arrangement order, communication address, parameters and other data are bound to the host computer programming project to form a complete and usable hardware configuration. Engineers can intuitively view the device layout and configuration information through the topology attribute diagram without manually drawing or entering any data, and the hardware configuration creation is completed automatically throughout the entire process.
[0088] In the above method, the device configuration order is determined based on the hardware connection information, and the communication address and parameters are automatically assigned to the device in combination with preset attributes. The hardware topology attribute diagram is then generated to complete the configuration creation. This ensures that the hardware configuration not only conforms to the actual device connection logic on site, but also strictly matches the inherent communication and address rules of the device. It realizes the fully automated and accurate creation of hardware configuration from device ordering and parameter configuration to visualization generation, completely eliminating the tedious operation of manual configuration, greatly improving the configuration creation efficiency, and ensuring the high compatibility and operational stability of the configuration with the on-site industrial control equipment and slave devices.
[0089] In one embodiment, the method further includes: After the hardware configuration is completed, a program upload request command is sent to the industrial control equipment so that the industrial control equipment can upload its executable control program according to the preset protocol after receiving the program upload request command.
[0090] In this embodiment, after the hardware configuration is created, the host computer actively initiates a program upload request to the industrial control equipment (PLC), triggering the industrial control equipment to upload its internal executable control program to the host computer according to the agreed preset protocol. This achieves automatic synchronization between the field program and the host computer, providing a complete copy of the field program for subsequent viewing, debugging, and modification. It is the key final step in the "configuration-free" whole process of the solution.
[0091] For example, after confirming that the hardware topology attribute diagram has been generated, the hardware configuration has been created, and the configuration information matches the field devices correctly, the host computer automatically triggers the program upload function module. It generates a program upload request command in a preset format, containing the target industrial control device's identity identifier, upload command code, and data transmission specifications. This command is then sent to the corresponding industrial control device via an established and configured stable communication link (Ethernet / Fieldbus). The industrial control device listens to its own communication port in real time. Upon receiving the request command, it first verifies the command's legality and directionality (matching its own identity identifier). If the verification is successful, it standardizes and encapsulates the executable control program stored internally according to the preset industrial communication protocol agreed upon by both parties (such as PROFINET, Modbus, etc.). The program file is then uploaded to the host computer in an orderly manner according to the specified data transmission rate and packet rules. No manual intervention is required throughout the process, ensuring the program upload's directionality, integrity, and transmission stability. After receiving the program, the host computer binds it to the created hardware configuration, forming a complete editable and debuggable project environment.
[0092] In the above method, after the hardware configuration is created, a program upload request is automatically sent to the industrial control equipment and an executable control program is obtained according to a preset protocol. This achieves automated connection between configuration creation and program synchronization, eliminating the need for manual program upload. It completely opens up the fully automated link from hardware configuration to program matching, greatly improving the overall efficiency of industrial control system deployment and debugging, while ensuring accurate adaptation between the program and the created hardware configuration.
[0093] This application provides a PLC configuration-free system based on automatic discovery and topology identification, including a control device, an industrial control device, and at least one slave device; wherein the slave device is connected to the industrial control device; The control device is used in the PLC configuration-free method based on automatic discovery and topology identification described in the above steps; the industrial control device is used to generate topology data based on the hardware connection information of the slave devices and the identification data of the industrial control device. The industrial control device is also used to send the topology data to the control device, so that the control device can create its corresponding hardware configuration based on the topology data.
[0094] In this embodiment of the application, the three core components of the PLC configuration-free system (control device, industrial control device, and slave device) and the core responsibilities of each unit are defined. Specifically, the physical connection relationship between the slave device and the industrial control device is clarified. The control device is the "executor of the configuration-free method" (responsible for the entire process of device discovery, data processing, configuration creation, and program upload). The industrial control device is the "generator and uploader of topology data" (integrating its own identity information and slave device connection information to generate topology data for the control device to create configurations). The three work together to achieve the core goal of "manual configuration-free" PLC configuration.
[0095] See Figure 7 This is a general flowchart of the PLC configuration-free system based on automatic discovery and topology identification provided in the embodiments of this application, as follows: Figure 7 As shown, it includes: 1. System startup The entire PLC configuration-free process is triggered when the control device (host computer) starts the configuration-free software and enters the automated working mode.
[0096] 2. Device discovery and communication establishment PLC broadcast monitoring: The control equipment continuously monitors network data within the local area network, waiting to capture broadcast packets actively sent by the PLC.
[0097] Obtain PLC broadcast packet: When a PLC broadcast packet matching the specified characteristics is detected, the system automatically captures the packet.
[0098] Parsing broadcast packets to obtain identity identifiers: The captured broadcast packets are unpacked to extract the PLC's unique identifier (such as MAC address, device serial number, etc.).
[0099] Identity identifier matched against the first preset database: The extracted identity identifier is compared with the first preset database (compatible device library) to determine whether the PLC is a device supported by the system.
[0100] Matching failed → Process terminated: If the device is incompatible, the process will terminate directly and display the message "Device incompatible".
[0101] Match successful → Proceed to the next step: If the device is compatible, proceed to the next communication establishment steps.
[0102] Establish a communication connection with the PLC: Based on the matching results, the control device and the target PLC automatically establish a stable two-way communication link without the need for manual configuration of communication parameters.
[0103] Communication validity verification: Check whether the established communication link is stable and whether the data transmission is normal.
[0104] Verification failed → Process terminated: If communication fails, the process terminates and displays the message "Communication error".
[0105] Verification successful → Proceed to the next stage: If communication is normal, proceed to the subsequent topology data processing stage.
[0106] 3. Topology Data Acquisition and Processing PLC generates topology data: The PLC acts as the master station, scanning all subordinate modules (such as expansion modules, remote I / O, etc.), integrating its own identity and hardware connection information (such as module model and installation slot), and generating topology data.
[0107] PLC uploads topology data: The PLC actively sends the generated topology data to the control equipment through the established communication link.
[0108] Control device receives topology data: The control device receives and stores the raw topology data uploaded by the PLC.
[0109] Topology data preprocessing: The original data is validated, invalid data (such as redundant information and erroneous fields) is removed, and missing information is filled in (such as calling the database to fill in missing device parameters).
[0110] Convert to structured data: The preprocessed topology data is converted into a standardized format (such as JSON / XML) that can be directly recognized by the control equipment, and the data hierarchy and field definitions are clearly defined.
[0111] Parsing structured data: Two types of core information were extracted from the structured data: PLC identification data and field hardware connection information (master and slave device hierarchy, physical location, etc.).
[0112] 4. Configuration creation and parameter configuration Identity identifier matching with the second preset database: The parsed identity identifier is matched with the second preset database (device attribute library) to obtain the preset attributes of the device (including device type, inherent parameters, communication adaptation rules, address allocation rules, etc.).
[0113] Sort devices according to hardware connection information: Based on the hardware connection information, the PLC and slave devices are arranged according to the rule of "master station priority, local expansion devices sorted by slot, and remote devices sorted by cascading order" to determine the device order in the configuration.
[0114] Assign communication address and communication parameters: Based on preset attributes, automatically assign conflict-free communication addresses (such as I / O addresses and IP addresses) to all devices and configure appropriate communication parameters (such as protocol type, baud rate, and checksum method).
[0115] Generate hardware topology property graph: Integrate configuration arrangement order, communication address and parameters to generate a visualized hardware topology attribute diagram (tree / schematic form), which intuitively presents the device layout and configuration information.
[0116] Complete hardware configuration creation: The topology attribute diagram is bound to the programming project of the control device to form a complete and usable hardware configuration.
[0117] 5. Program synchronization and termination Send program upload request: The control device sends a command to the PLC, requesting the upload of its internal executable control program.
[0118] PLC upload executable control program: After verifying the validity of the PLC request, it uploads the internally stored executable control program to the host computer according to the preset protocol.
[0119] Receive and bind the program: The control device receives the program file and binds it to the created hardware configuration to form a complete debuggable project environment.
[0120] Process complete: The entire PLC configuration-free process is completed, and engineers can directly debug or modify the project on the control device.
[0121] See Figure 8 This is a schematic diagram of the overall architecture of a PLC without configuration based on automatic discovery and topology identification provided in the embodiments of this application, as shown below. Figure 8 As shown, it includes: 1. Communication Connection Phase The host computer sends a broadcast packet to the network. The host computer receives the broadcast packet and automatically establishes a communication connection with the PLC.
[0122] 2. Automatic discovery phase After the PLC establishes a communication connection with the host computer, the PLC master station enters the topology discovery mode.
[0123] After receiving the broadcast, the PLC master station starts the topology discovery engine and prepares to scan all the subordinate slave devices.
[0124] The PLC master station polls the slave devices. The PLC master station sends a device query request to each slave device (from 1 to n) in sequence, which includes location information such as address / slot.
[0125] Each slave device responds with a device information packet containing key information such as its own model, version, and I / O configuration upon receiving a query.
[0126] 3. Integration and Packaging Stage The PLC master station integrates information by collecting response information from all slave devices and adding it to its own device information to form a complete topology dataset.
[0127] The generated structured topology data is packaged into structured topology data packets according to a preset communication protocol (such as JSON / XML format).
[0128] 4. Upload Stage The PLC master station actively uploads the topology data package and sends the complete topology data package to the host computer.
[0129] The host computer parses and verifies the data. After receiving the data packet, the host computer parses and verifies its validity to ensure that the data is complete and error-free.
[0130] After the host computer returns a received confirmation (ACK) and the verification is successful, the host computer sends a confirmation message to the PLC master station to indicate that the data has been successfully received.
[0131] 5. Follow-up processing After the data reception is completed in the I / O configuration phase, the host computer triggers the automatic configuration generation module.
[0132] The hardware configuration generation system automatically generates hardware configurations that perfectly match the on-site hardware based on topology data, eliminating the need for manual configuration.
[0133] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0134] Corresponding to the PLC configuration-free method based on automatic discovery and topology identification in the above embodiment, Figure 9 This is a structural block diagram of a PLC configuration-free device based on automatic discovery and topology identification provided in the embodiments of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0135] Reference Figure 9 The device includes: The communication data acquisition module 91 is used to acquire the industrial control equipment broadcast packet when the network contains the broadcast packet of industrial control equipment. Communication connection module 92 is used to establish a communication connection with the industrial control equipment based on the broadcast packet of the industrial control equipment; The topology data acquisition module 93 is used to acquire topology data sent by the industrial control equipment; wherein, the topology data is hardware topology data generated by the industrial control equipment based on the hardware connection information between the industrial control equipment and the slave equipment and the identification data of the industrial control equipment.
[0136] Hardware component creation module 94 is used to create the corresponding hardware configuration based on topology data.
[0137] Optionally, the communication connection module 92 is also used for: Parse the broadcast packets of industrial control equipment to obtain the identification data corresponding to the industrial control equipment; The identity data is matched with the first preset database to obtain the matching result; If the matching result indicates a successful match, a communication connection is established with the industrial control equipment.
[0138] Optionally, the hardware component creation module 94 is also used for: The topology data is preprocessed to obtain preprocessed topology data; the preprocessing includes data validation, removal of invalid data, and completion of missing data. Convert the preprocessed topology data into structured data; Create the corresponding hardware configuration based on the structured data.
[0139] Optionally, the hardware component creation module 94 is also used for: The structured data is parsed to obtain the identification data and hardware connection information of the industrial control equipment. The identity data is matched with the second preset database to obtain the preset attributes corresponding to the industrial control equipment; the preset attributes include the type of industrial control equipment, inherent parameters, communication adaptation rules and address allocation rules; Create the corresponding hardware configuration based on preset attributes and hardware connection information.
[0140] Optionally, the hardware component creation module 94 is also used for: The industrial control equipment and slave devices are sorted according to the hardware connection information to obtain the configuration arrangement order; Assign communication addresses and communication parameters to industrial control equipment and / or slave devices according to preset attributes; A hardware topology attribute diagram is generated based on the configuration arrangement order, communication address, and communication parameters to complete the creation of the hardware configuration.
[0141] The PLC configuration-free system based on automatic discovery and topology recognition 9 also includes a program upload request module 95, used for: After completing the hardware configuration, a program upload request command is sent to the industrial control equipment so that the industrial control equipment can upload its executable control program according to the preset protocol after receiving the program upload request command.
[0142] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0143] in addition, Figure 9 The PLC configuration-free device based on automatic discovery and topology identification shown can be a software unit, hardware unit, or a combination of software and hardware built into existing terminal equipment. It can also be integrated into the terminal equipment as an independent component or exist as a standalone terminal equipment.
[0144] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0145] Figure 10 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. For example... Figure 10 As shown, the terminal device 10 of this embodiment includes: at least one processor 100 ( Figure 10 (Only one is shown in the image) a processor, a memory 101, and a computer program 102 stored in the memory 101 and capable of running on at least one processor 100. When the processor 100 executes the computer program 102, it implements the steps in any of the above embodiments of the PLC configuration-free method based on automatic discovery and topology identification.
[0146] The terminal device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. This terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 10 This is merely an example of terminal device 10 and does not constitute a limitation on terminal device 10. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0147] The processor 100 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0148] In some embodiments, memory 101 may be an internal storage unit of terminal device 10, such as a hard disk or memory of terminal device 10. In other embodiments, memory 101 may be an external storage device of terminal device 10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on terminal device 10. Furthermore, memory 101 may include both internal and external storage units of terminal device 10. Memory 101 is used to store operating system, applications, bootloader, data, and other programs, such as program code of computer programs. Memory 101 may also be used to temporarily store data that has been output or will be output.
[0149] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.
[0150] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0151] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0152] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0153] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0154] In the embodiments provided in this application, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0155] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0156] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A PLC configuration-free method based on automatic discovery and topology identification, characterized in that, The method includes: When a broadcast packet from an industrial control device is detected on the network, the broadcast packet from the industrial control device is obtained. Establish a communication connection with the industrial control equipment based on the broadcast packet of the industrial control equipment; The topology data sent by the industrial control device is obtained; wherein the topology data is hardware topology data generated by the industrial control device based on the obtained hardware connection information between the industrial control device and the slave device and the identification data of the industrial control device. Create the corresponding hardware configuration based on the topology data.
2. The PLC configuration-free method based on automatic discovery and topology identification as described in claim 1, characterized in that, The step of establishing a communication connection with the industrial control equipment based on the broadcast packet of the industrial control equipment includes: The broadcast packets of the industrial control equipment are parsed to obtain the identification data corresponding to the industrial control equipment; The identity data is matched with a first preset database to obtain a matching result; If the matching result indicates a successful match, a communication connection is established with the industrial control equipment.
3. The PLC configuration-free method based on automatic discovery and topology identification as described in claim 2, characterized in that, After acquiring the topology data sent by the industrial control equipment, the step of creating the corresponding hardware configuration based on the topology data includes: The topology data is preprocessed to obtain preprocessed topology data; wherein, the preprocessing includes data verification, removal of invalid data, and completion of missing data; Convert the preprocessed topology data into structured data; Create the corresponding hardware configuration based on the structured data.
4. The PLC configuration-free method based on automatic discovery and topology identification as described in claim 3, characterized in that, The step of creating the corresponding hardware configuration based on the structured data includes: The structured data is parsed to obtain the identification data and hardware connection information corresponding to the industrial control equipment; The identity data is matched with a second preset database to obtain preset attributes corresponding to the industrial control equipment; wherein, the preset attributes include the type, inherent parameters, communication adaptation rules and address allocation rules of the industrial control equipment; Create the corresponding hardware configuration based on the preset attributes and the hardware connection information.
5. The PLC configuration-free method based on automatic discovery and topology identification as described in claim 4, characterized in that, The step of creating the corresponding hardware configuration based on the preset attributes and the hardware connection information includes: The industrial control equipment and the slave equipment are sorted according to the hardware connection information to obtain the configuration arrangement order; Based on the preset attributes, assign communication addresses and communication parameters to the industrial control equipment and / or the slave equipment; A hardware topology attribute diagram is generated based on the configuration arrangement order, the communication address, and the communication parameters to complete the creation of the hardware configuration.
6. The PLC configuration-free method based on automatic discovery and topology identification as described in claim 1, characterized in that, The method further includes: After the hardware configuration is created, a program upload request instruction is sent to the industrial control device, so that after receiving the program upload request instruction, the industrial control device uploads its executable control program according to a preset protocol.
7. A configuration-free PLC system based on automatic discovery and topology identification, characterized in that, It includes a control device, an industrial control device, and at least one slave device; wherein the slave device is connected to the industrial control device; The control device is used to implement the PLC configuration-free method based on automatic discovery and topology identification as described in any one of claims 1 to 6; The industrial control equipment is used to generate topology data based on the hardware connection information with the subordinate devices obtained by the industrial control equipment and the identification data of the industrial control equipment; The industrial control equipment is also used to send the topology data to the control equipment, so that the control equipment can create its corresponding hardware configuration based on the topology data.
8. A PLC configuration-free device based on automatic discovery and topology identification, characterized in that, include: The communication data acquisition module is used to acquire the industrial control equipment broadcast packet when the network is detected to contain such a broadcast packet. A communication connection module is used to establish a communication connection with the industrial control equipment based on the broadcast packet of the industrial control equipment; The topology data acquisition module is used to acquire topology data sent by the industrial control equipment; wherein, the topology data is hardware topology data generated by the industrial control equipment based on the acquired hardware connection information with the slave devices and the identification data of the industrial control equipment; The hardware component creation module is used to create the corresponding hardware configuration based on the topology data.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.