A controller topology automatic discovery method

Automatic detection of controller topology through the bus protocol, solving the complexity of manual management after device connection, improving work efficiency and system stability, and realizing automatic detection and management of device types and topology structures.

CN116346699BActive Publication Date: 2024-11-15SHANDONG XINSONG IND SOFTWARE RES INST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111577250.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2024-11-15
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

Existing controllers need to be manually managed in the development environment after the equipment is connected, which is prone to device selection errors or sequence errors, resulting in unavailability of functions and high requirements for operators, affecting work efficiency.

Method used

The controller topology automatic discovery method is realized through the bus protocol. The master station device initiates topology discovery messages, records the slave equipment location, and manages it in the development environment through XML-format device description files, reducing operator requirements.

Benefits of technology

It realizes automatic detection of equipment types and automatic detection of topology structures, reduces human errors, improves work efficiency and control system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346699B_ABST
    Figure CN116346699B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of automation technology control, specifically a controller topology automatic discovery method, which involves bus communication technology, embedded operating system application, XML and device management technology. The following steps are included: the master station device and the slave station device exchange data through the bus protocol to form the underlying physical topology structure; the master station device is matched with the development environment to realize the management and use of the slave station device in the development environment. The present invention can quickly realize the topology and discovery of the slave station device by adding automatic scanning slave station topology technology to the controller, facilitate engineers to manage and maintain the slave station device, and avoid human misconfiguration that causes unavailable functions. It can greatly improve the development and application efficiency of engineers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of automation technology control, in particular to a controller topology automatic discovery method, which involves bus communication technology, embedded operating system application, XML and equipment management technology. Background Art

[0002] Current controllers are connected to external devices through a bus. After the external devices are physically connected, they need to be managed in the development environment. The device type and physical topology are presented and configured in the development environment. The current implementation scheme selects and adds device types in the development environment based on the physical device type and connection order. This mode places high demands on operators and is prone to device selection errors or order addition errors, resulting in unavailable functions. Summary of the invention

[0003] The present invention develops a controller bus topology automatic discovery technology, which can realize automatic detection of the type of external devices, automatic discovery of connection topology structures, and present topology data in a development environment, thereby reducing requirements for operators and realizing a one-key scanning function, which can greatly improve work efficiency while ensuring the stability of the control system.

[0004] The technical solution adopted by the present invention to achieve the above-mentioned purpose is:

[0005] A controller topology automatic discovery method comprises the following steps:

[0006] The master station device and the slave station device exchange data through the bus protocol to form the underlying physical topology structure;

[0007] The master station device is matched with the development environment to realize the management and use of the slave station device in the development environment.

[0008] The master station device and the slave station device perform data exchange via a bus protocol to construct an underlying physical topology structure, including the following steps:

[0009] The master device initiates a topology discovery message, which is transmitted to all slave devices in sequence through the physical network;

[0010] When the first slave device receives the topology discovery message sent by the master device, the slave device responds by updating its own status and setting the access address to 01, and at the same time updates the discovery flag of the topology discovery message. After receiving the topology discovery message with the discovery flag, other slave devices remain silent and no longer respond.

[0011] When the topology discovery message is returned to the master device after passing through all slave devices, the master device records the position of the slave device that responded to the topology discovery message according to the position of the discovery flag in the topology discovery message;

[0012] The master device sends a topology discovery message again. The first slave device has been discovered and configured with an access address, so it no longer responds to the topology discovery message. The second slave device responds by updating its own status and setting the access address to 02, and at the same time updating the discovery flag of the topology discovery message.

[0013] Traverse all slave devices until all slave devices have access addresses, and then end the topology scan;

[0014] The master device communicates with the slave devices in turn according to the access addresses assigned by the slave devices to obtain the slave device data, and stores all the slave device data in the database of the master device.

[0015] The slave device data includes: type, ID, name and configuration information of the slave device.

[0016] The master station device is matched with the development environment, including the following steps:

[0017] Write the device description file of the slave device and import the device description file into the development environment;

[0018] The master device imports the slave device data in its database into the development environment;

[0019] The development environment matches the device description file with the slave device data according to the ID and type of the slave device, thereby realizing the management and use of the slave device in the development environment.

[0020] The device description file is in XML format.

[0021] The device description file includes: the ID, name, type, and supported interfaces of the slave device.

[0022] A controller topology automatic discovery system, comprising:

[0023] The master station device is used to exchange data with the slave station device via the bus protocol to form the underlying physical topology structure;

[0024] The slave device is used to exchange data with the master device via the bus protocol to form the underlying physical topology structure;

[0025] The development environment device manager is used to match the master station device with the development environment, and to implement the management and use of the slave station devices in the development environment.

[0026] The present invention has the following beneficial effects and advantages:

[0027] Since the present invention adds automatic scanning slave topology technology to the controller, the topology and discovery of slave devices can be quickly realized, which facilitates engineers to manage and maintain slave devices and avoids human misconfiguration that causes unavailable functions. This can greatly improve the development and application efficiency of engineers. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A method and process diagram for automatically scanning the slave station topology through the underlying protocol stack for the controller;

[0029] Figure 2 Mapping diagrams of devices in the controller development environment to physical devices. DETAILED DESCRIPTION

[0030] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0031] like Figure 1 As shown, the present invention is divided into two parts, one part is the underlying bus protocol, which is responsible for the data exchange between the master station device and the slave station device, confirming the site information of the slave station device in turn, and collecting the site information of all slave stations into the master station. The other part is the matching presentation of the master station device and the development environment, which mainly matches the device information collected by the master station with the type of the device description file by installing the device description XML file in the development environment, so that the development environment can correctly present the network topology and the slave station site information.

[0032] like Figure 2As shown in the figure, the underlying bus protocol is based on standard Ethernet technology. Data circulation and management are achieved by implementing a customized second-layer protocol. The master device initiates a topology discovery protocol data frame, which is transmitted to all slave devices in sequence through the physical network. When a slave receives a master data frame, the slave will respond to update its own status and set the access address to 01 and update the discovery flag of the master data frame. Other slaves will remain silent after receiving the data frame again and will not respond. When the message passes through all slaves and returns to the master, the master device records the location of the slave according to the location of the discovery mark in the message. Then the master sends a topology discovery message again. The first slave has been discovered and configured with an address, so it no longer responds to the master's topology discovery message. The second slave refers to the first slave mode and configures its address to 02. Subsequent slaves do not respond. In this way, the master sends topology discovery messages multiple times. When all slaves have addresses, they will no longer respond to the master's topology scan message. When the master receives a topology message in which no new slave devices are discovered, the topology scan environment ends. Then, data communication is carried out with the slave devices in turn according to the addresses assigned by the slaves to further obtain the type, name and configuration information of the slave devices, and all slave data are stored in the database of the master station.

[0033] To match the master device with the development environment, you first need to write the device description file of the slave device, which can be written in XML format. The XML file contains the ID, name, type, supported interface status, etc. of the slave device. Import the XML file into the device manager of the development environment. The master device will export the slave information stored in the database to the development environment, and match it according to the ID and type of the slave device. The development environment will present the slave devices in sequence according to the storage order and type of the slave devices in the master device database, and the slave devices can be managed and used in the development environment.

[0034] In this embodiment, the controller device includes the master station function, and the slave station devices include drivers, couplers, card readers, barcode guns, digital input modules, digital output modules, analog input modules, analog output modules and other types. The master station uses an automatic topology scanning mechanism to identify and discover different devices connected to the physical link and describe the topological connection structure in the development environment.

[0035] The development environment matches the devices according to the discovered slave device types, matches the actual physical devices with the virtual devices in the development environment one by one, and manages them by category. Then, the corresponding configuration and management pages are provided according to the slave device type. The driver will provide configuration of the motor operation mode, motor operation position value, motor operation speed value, motor operation status acquisition, and the coupler and input and output modules can be used together to realize IO output control and external IO status acquisition. The card reader can obtain the type and information data of the external card, and the barcode gun can obtain the scanned barcode data.

[0036] The present invention realizes a method for automatically scanning slave stations by a controller. In actual use, the master station can scan the connected physical slave stations with one key, without the need for manual management, thus reducing the probability of errors, managing and configuring the equipment in the development environment, and improving the maintenance and management efficiency of the controller.

Claims

1. A controller topology automatic discovery method, characterized in that: The following steps are involved: The master station device and the slave station device exchange data through the bus protocol to form the underlying physical topology structure; The master station equipment is matched with the development environment to realize the management and use of the slave station equipment in the development environment; The master station device and the slave station device perform data exchange via a bus protocol to construct an underlying physical topology structure, including the following steps: The master device initiates a topology discovery message, which is transmitted to all slave devices in sequence through the physical network; When the first slave device receives the topology discovery message sent by the master device, the slave device responds by updating its own status and setting the access address to 01, and at the same time updates the discovery flag of the topology discovery message. After receiving the topology discovery message with the discovery flag, other slave devices remain silent and no longer respond. When the topology discovery message is returned to the master device after passing through all slave devices, the master device records the position of the slave device that responded to the topology discovery message according to the position of the discovery flag in the topology discovery message; The master device sends a topology discovery message again. The first slave device has been discovered and configured with an access address, so it no longer responds to the topology discovery message. The second slave device responds by updating its own status and setting the access address to 02, and at the same time updating the discovery flag of the topology discovery message. Traverse all slave devices until all slave devices have access addresses, and then end the topology scan; The master device communicates with the slave devices in turn according to the access addresses assigned by the slave devices to obtain the slave device data, and stores all the slave device data in the database of the master device.

2. A controller topology automatic discovery method according to claim 1, characterized in that: The slave device data includes: type, ID, name and configuration information of the slave device.

3. The method for automatically discovering controller topology according to claim 1, characterized in that: The master station device is matched with the development environment, including the following steps: Write the device description file of the slave device and import the device description file into the development environment; The master device imports the slave device data in its database into the development environment; The development environment matches the device description file with the slave device data according to the ID and type of the slave device, thereby realizing the management and use of the slave device in the development environment.

4. A controller topology automatic discovery method according to claim 3, characterized in that: The device description file is in XML format.

5. The method for automatically discovering controller topology according to claim 3, characterized in that: The device description file includes: the ID, name, type, and supported interfaces of the slave device.

6. A controller topology automatic discovery system, characterized in that: include: The master station device is used to exchange data with the slave station device via the bus protocol to form the underlying physical topology structure; The slave device is used to exchange data with the master device via the bus protocol to form the underlying physical topology structure; Development environment device manager, used to match the master station device with the development environment, and to manage and use the slave station devices in the development environment; The master station device and the slave station device perform data exchange via a bus protocol to construct an underlying physical topology structure, including the following steps: The master device initiates a topology discovery message, which is transmitted to all slave devices in sequence through the physical network; When the first slave device receives the topology discovery message sent by the master device, the slave device responds by updating its own status and setting the access address to 01, and at the same time updates the discovery flag of the topology discovery message. After receiving the topology discovery message with the discovery flag, other slave devices remain silent and no longer respond. When the topology discovery message is returned to the master device after passing through all slave devices, the master device records the position of the slave device that responded to the topology discovery message according to the position of the discovery flag in the topology discovery message; The master device sends a topology discovery message again. The first slave device has been discovered and configured with an access address, so it no longer responds to the topology discovery message. The second slave device responds by updating its own status and setting the access address to 02, and at the same time updating the discovery flag of the topology discovery message. Traverse all slave devices until all slave devices have access addresses, and then end the topology scan; The master device communicates with the slave devices in turn according to the access addresses assigned by the slave devices to obtain the slave device data, and stores all the slave device data in the database of the master device.

Citation Information

Patent Citations

  • Data processing methods in an ad hoc radio communication network, associated mobile radio communication stations and computer programs

    EP3675562A1

  • System and method for on-line identification of active virtual mobile base-stations, based on active network measurements

    WO2015166501A1

  • Method and apparatus for discovering network neighbouring device

    WO2016201844A1