Method, computing device and program product for configuration of multi-level EPA network
By obtaining information about multi-level EPA network equipment, determining the device connection relationship and network level, the problem of complex and inefficient device configuration in traditional methods is solved, and the unified configuration and efficient configuration of the device is realized.
Patent Information
- Application Number
- CN202411461655.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-18
AI Technical Summary
Traditional methods cannot uniformly discover and configure devices in multi-level EPA networks at multiple levels, resulting in complex and inefficient device configuration processes.
By obtaining device information from devices in multi-level EPA networks, the connection relationship and network level between devices are determined, and the configuration parameters of the device are uniformly determined based on this information.
It realizes unified configuration and configuration of devices in multi-level EPA networks, simplifies the configuration process and improves configuration efficiency.
Smart Images

Figure CN118972227B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention generally relate to the field of communications, and more particularly to a method, a computing device, and a program product for configuring a multi-level EPA network. Background Art
[0002] The Ethernet for Plant Automation (EPA) bus is a real-time Ethernet bus designed based on the network communication requirements of industrial control systems and implemented based on the Ethernet physical layer. The EPA bus is widely used in production, manufacturing and other control fields to provide communication support for the normal operation of various systems. In order to ensure that all devices in the EPA network do not have message collisions during operation, the configuration parameters of each device need to be configured before the system runs. In the traditional method, device information is obtained and configuration parameters are calculated for devices in a single layer to achieve the configuration of devices in the EPA network. However, for multi-level EPA networks, the traditional method requires multiple configurations according to the network level, that is, it is impossible to uniformly discover and configure the topology of devices in multiple layers of the network, resulting in a complex and inefficient process for device configuration in multi-level EPA networks.
[0003] In summary, the traditional method of configuring a multi-level EPA network has the following shortcomings: it is impossible to uniformly perform topology discovery and configuration on devices in multiple layers of the network, which results in a complex and inefficient process for configuring devices in the multi-level EPA network. Summary of the invention
[0004] In response to the above problems, the present invention provides a method, computing device and program product for configuring a multi-level EPA network, which can uniformly configure devices in multiple levels of the multi-level EPA network, thereby improving the efficiency of configuring devices in the multi-level EPA network.
[0005] According to a first aspect of the present invention, a method for configuring a multi-level EPA network is provided, the method comprising: acquiring device information from a first device among a plurality of devices included in the multi-level EPA network, wherein the device information comprises first device information related to the first device and second device information related to the second device, the second device information being received by the first device from a second device adjacent to the first device; determining a connection relationship between a plurality of devices included in the multi-level EPA network based on the second device information in the acquired device information; determining a network level of the plurality of devices in the multi-level EPA network based on the determined connection relationship; and determining a configuration parameter of at least one device among the plurality of devices in the multi-level EPA network based on the first device information in the acquired device information and the determined network level.
[0006] In some embodiments, the second device information includes the physical address of the second device, and obtaining the device information from a first device among multiple devices included in the multi-level EPA network includes: sending a first scanning instruction to the first device based on the physical address of the first device included in the first device information, so that the first device scans the device information in the memory; receiving the scanned device information from the first device; and sending a second scanning instruction to the second device based on the physical address of the second device in the received device information, so that the second device scans the device information in the memory.
[0007] In some embodiments, based on the second device information in the acquired device information, determining the connection relationship between multiple devices included in the multi-level EPA network includes: determining the corresponding second device based on the physical address of the second device in the device information received from the first device; determining a first connection relationship between the first device and the determined second device; based on the physical address of the third device in the device information received from the second device, determining the corresponding third device, the third device being adjacent to the second device; and determining a second connection relationship between the second device and the determined third device.
[0008] In some embodiments, the first device information includes the data length when the first device communicates, and based on the first device information in the acquired device information and the determined network level, determining the configuration parameters of at least one device among the multiple devices in the multi-level EPA network includes: determining the devices in the first level of the multi-level EPA network; acquiring the data length when the determined devices in the first level communicate in the device information; and determining the configuration parameters of the devices in the first level in the multi-level EPA network based on the acquired data length when the devices in the first level communicate.
[0009] In some embodiments, based on the first device information in the acquired device information and the determined network level, determining the configuration parameters of at least one device among multiple devices in the multi-level EPA network also includes: determining the devices in the second level of the multi-level EPA network, wherein the second level is adjacent to the first level; obtaining the data length when the determined devices in the second level communicate in the device information; and determining the configuration parameters of the devices in the second level in the multi-level EPA network based on the configuration parameters of the gateway device and the acquired data length when the devices in the second level communicate, wherein the gateway device is between the first level and the second level.
[0010] In some embodiments, based on the configuration parameters of the gateway device and the acquired data length when the devices in the second layer communicate, determining the configuration parameters of the devices in the second layer in the multi-level EPA network includes: determining the maximum data length among the acquired data length when the devices in the first layer communicate; and determining the configuration parameters of the gateway device based on the determined maximum data length.
[0011] In some embodiments, the configuration parameters include at least one of the macrocycle time, cycle time, non-cycle time, synchronization time, information query time and offset time during device communication, and the method also includes: based on the physical addresses of the multiple devices in the multi-level EPA network, sending configuration parameters to the multiple devices to configure the multiple devices; and when the multiple devices have completed the configuration, sending work instructions to the multiple devices so that the multiple devices start the multi-level EPA network according to the sent configuration parameters.
[0012] According to a second aspect of the present invention, a configuration method for a multi-level EPA network is provided, the method comprising: sending, by a first device among a plurality of devices included in the multi-level EPA network, first device information related to the first device to a second device adjacent to the first device, and receiving second device information related to the second device from the second device; sending device information to a computing device, the device information comprising first device information and second device information; and receiving, from the computing device, configuration parameters of at least one device among the plurality of devices in the multi-level EPA network, wherein the configuration parameters are determined by the computing device based on the first device information in the device information and the network level of the device, the network level of the device is determined by the computing device based on the connection relationship between the plurality of devices, and the connection relationship between the plurality of devices is determined by the computing device based on the second device information in the device information.
[0013] According to a third aspect of the present invention, a computing device is provided, comprising: at least one processor; and at least one memory, the at least one memory being coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions, when executed by the at least one processor, causing the computing device to perform the steps of the method according to the first aspect of the present invention.
[0014] According to a fourth aspect of the present invention, there is provided a computer program product, the computer program product comprising a computer program, which, when executed by a machine, performs the steps of the method according to the first aspect of the present invention.
[0015] According to a fifth aspect of the present invention, there is provided a computer readable storage medium having computer program code stored thereon, which when executed performs the steps of the method according to the first aspect of the present invention.
[0016] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be better understood and other objects, details, features and advantages of the present invention will become more apparent through the following description of specific embodiments of the present invention given with reference to the accompanying drawings.
[0018] Figure 1 A schematic diagram showing an environment for configuring a multi-level EPA network according to some embodiments of the present invention;
[0019] Figure 2 A flow chart showing a method for configuring a multi-level EPA network according to some embodiments of the present invention;
[0020] Figure 3 A schematic diagram of another environment for configuring a multi-level EPA network according to some embodiments of the present invention is shown;
[0021] Figure 4 A flow chart showing a method for determining connection relationships of EPA devices in a multi-level EPA network according to some embodiments of the present invention;
[0022] Figure 5 A flow chart illustrating a method for configuring configuration parameters of EPA devices in a multi-level EPA network according to some embodiments of the present invention;
[0023] Figure 6 A schematic diagram showing an interactive process for configuring a multi-level EPA network according to some embodiments of the present invention; and
[0024] Figure 7 A block diagram of an electronic device for implementing some embodiments of the present invention is shown.
[0025] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0026] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0027] In the following description, certain specific details are set forth for the purpose of illustrating various embodiments of the invention to provide a thorough understanding of the various embodiments of the invention. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0028] Unless the context requires otherwise, throughout the specification and claims, the word "comprise" and variations such as "include" and "have" should be construed in an open, inclusive sense, ie, should be interpreted as "including, but not limited to."
[0029] References throughout the specification to "one embodiment" or "some embodiments" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearance of "in one embodiment" or "some embodiments" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.
[0030] In addition, the terms "first", "second", etc. used in the specification and claims are only used to distinguish each object for the sake of clarity of description, and do not limit the size or other order of the objects described.
[0031] As mentioned above, the traditional method of configuring a multi-level EPA network has the following shortcomings: it is impossible to uniformly perform topology discovery and configuration on devices in multiple layers of the network, resulting in a complex and inefficient process for configuring devices in the multi-level EPA network.
[0032] In order to at least partially solve one or more of the above problems and other potential problems, the present invention provides a method for configuring a multi-level EPA network. In this method, device information is first read from an EPA device in the multi-level EPA network, wherein the device information includes information about the EPA device itself and information sent to the EPA device by an adjacent EPA device. Then, based on the information about the adjacent EPA devices in the device information, the connection relationship between the multiple EPA devices is determined, and then the network level of the multiple EPA devices is determined. Furthermore, based on the information of the EPA device and the network level where the EPA device is located, the configuration parameters of the EPA device are determined.
[0033] In the present invention, the EPA device stores its own device information and the device information of the adjacent EPA devices, thereby realizing the distributed storage of the device information in the multi-level EPA network. According to the device information stored in each EPA device, its adjacent EPA devices can be determined, thereby determining the connection relationship and network level of multiple EPA devices, thereby realizing the unified configuration and startup of EPA devices in the network of multiple levels, without the need to perform multiple configurations layer by layer, simplifying the configuration work of the multi-level EPA network, and improving the configuration efficiency of the multi-level EPA network.
[0034] Figure 1 FIG. 1 is a schematic diagram of an environment 100 for configuring a multi-level EPA network according to some embodiments of the present invention. Figure 1 , the environment 100 includes a computing device 102 and a multi-level EPA network 112. The computing device 102 is used to configure and control the EPA devices in the multi-level EPA network 112. In some embodiments, the multi-level EPA network 112 includes at least two levels of networks, such as a level 1 network 114 and a level 2 network 118. In the level 1 network 114, EPA devices 1141, EPA devices 1142, ..., EPA devices 114m are included, and in the level 2 network 118, EPA devices 1181, EPA devices 1182, ..., EPA devices 118n are included, where m and n are integers greater than or equal to 1. Networks at different levels are connected through EPA gateway devices for data transfer, such as an EPA gateway device 116 between the level 1 network 114 and the level 2 network 118. The topological structure of the network at each level includes, but is not limited to, ring, linear, and star structures.
[0035] In some embodiments, the computing device 102 may be implemented by using an MCU (Micro Controller Unit), a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-purpose Computing on Graphics Processing Units), an FPGA (Field Programmable Gate Array) or other programmable logic devices, an ASIC (Application Specific Integrated Circuit), discrete gates or transistor logic devices, discrete hardware components, etc. The computing device 102 may have one or more processing units, including dedicated processing units such as GPUs, FPGAs, and ASICs, and general processing units such as CPUs. The computing device 102 includes a device information acquisition unit 104, a connection relationship determination unit 106, a network level determination unit 108, and a configuration parameter determination unit 110.
[0036] Regarding the device information acquisition unit 104, it is used to acquire device information from a first device among a plurality of devices included in the multi-level EPA network, wherein the device information includes first device information related to the first device and second device information related to the second device, and the second device information is received by the first device from a second device adjacent to the first device. In some embodiments, taking EPA device 1141 (which may be referred to as the first device) and EPA device 1142 (which may be referred to as the second device) as an example, EPA device 1141 and EPA device 1142 are adjacent, EPA device 1141 and EPA device 1142 can read their own device information (the device information of EPA device 1141 and EPA device 1142 may be referred to as the first device information and the second device information, respectively), and EPA device 1142 may send the read device information to EPA device 1141. Thus, the computing device 102 may acquire the device information of EPA device 1141 itself and the device information of EPA device 1142 from EPA device 1141.
[0037] It should be understood that EPA device 1142 can also be used as the first device, and EPA device 1141 can also be used as the second device. That is, any one of the two adjacent EPA devices can be used as a receiver to receive device information of the adjacent EPA device, and can also be used as a sender to send device information to the adjacent EPA device. It should be noted that the EPA gateway device connected between different levels in the present invention, such as EPA gateway device 116, can also be used as one of the EPA devices, that is, the EPA gateway device can also be used as one of the two adjacent EPA devices.
[0038] Regarding the connection relationship determination unit 106, it is used to determine the connection relationship between multiple devices included in the multi-level EPA network based on the second device information in the acquired device information. In some embodiments, still taking EPA device 1141 and EPA device 1142 as an example, EPA device 1141 and EPA device 1142 are adjacent. Since the device information acquired by the computing device 102 from EPA device 1141 includes the device information of EPA device 1141 and the device information of EPA device 1142, the computing device 102 can determine that EPA device 1141 and EPA device 1142 are adjacent based on the device information of EPA device 1142, thereby obtaining the connection relationship between the two. Similarly, if EPA device 1142 and EPA device 114m are adjacent, the computing device 102 can also determine the connection relationship between the two from the device information acquired by EPA device 1142. In this way, the computing device 102 can determine the connection relationship between all EPA devices.
[0039] Regarding the network level determination unit 108, it is used to determine the network level of multiple devices in the multi-level EPA network based on the determined connection relationship. In some embodiments, after the computing device 102 determines the connection relationship between multiple EPA devices according to the acquired device information, it can further determine the network level of multiple EPA devices in the multi-level EPA network 112 according to the connection relationship. For example, when the computing device 102 determines that EPA device 1141, EPA device 1142, ..., EPA device 114m, and EPA gateway device 116 are linearly connected, and EPA gateway device 116, EPA device 1181, EPA device 1182, ..., EPA device 118n are ring-connected, and EPA device 1141 is directly connected to the computing device 102, it can be analyzed to determine that EPA device 1141, EPA device 1142, ..., EPA device 114m are in level 1 network 114, EPA device 1181, EPA device 1182, ..., EPA device 118n are in level 2 network 118, and level 1 network 114 and level 2 network 118 are connected via EPA gateway device 116.
[0040] Regarding the configuration parameter determination unit 110, it is used to determine the configuration parameters of at least one device among the multiple devices in the multi-level EPA network based on the first device information in the acquired device information and the determined network level. In some embodiments, after the computing device 102 determines the network levels of the multiple EPA devices, the configuration parameters of the EPA device, such as cycle time, offset time, etc., can be determined based on the device information of the EPA device (which can be called the first device information, such as the amount of data sent) and the network level where the EPA device is located.
[0041] In the present invention, the EPA device stores its own device information and the device information of the adjacent EPA devices, thereby realizing the distributed storage of the device information in the multi-level EPA network. According to the device information stored in each EPA device, its adjacent EPA devices can be determined, thereby determining the connection relationship and network level of multiple EPA devices, thereby realizing the unified configuration and startup of EPA devices in the network of multiple levels, without the need to perform multiple configurations layer by layer, simplifying the configuration work of the multi-level EPA network, and improving the configuration efficiency of the multi-level EPA network.
[0042] The following will be combined Figure 2 A method 200 for configuration of a multi-level EPA network according to an embodiment of the present invention is described. Figure 2 FIG. 2 is a flow chart showing a method 200 for configuring a multi-level EPA network according to some embodiments of the present invention. It should be understood that the method 200 may be implemented in, for example, Figure 1 It should be understood that the method 200 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present invention is not limited in this respect.
[0043] At step 202, device information is obtained from a first device among multiple devices included in the multi-level EPA network, wherein the device information includes first device information related to the first device and second device information related to the second device, and the second device information is received by the first device from a second device adjacent to the first device.
[0044] In some embodiments, multiple EPA devices can read their own device information and send their own device information to adjacent EPA devices. Therefore, an EPA device can act as a sender to send device information to adjacent EPA devices, and can also act as a receiver to receive device information from adjacent EPA devices. In this embodiment, the current EPA device that receives the device information of the adjacent EPA device is referred to as the first device, and the adjacent EPA device is referred to as the second device, and the corresponding device information is the first device information and the second device information, respectively. The computing device 102 can read the device information from the current EPA device, and the device information includes its own device information and the device information of the adjacent EPA device. It should be understood that each EPA device among the multiple EPA devices can serve as the current EPA device.
[0045] Regarding the second device information, it for example includes the physical address of the second device, and regarding the method of obtaining device information from a first device among multiple devices included in a multi-level EPA network, it for example includes: based on the physical address of the first device included in the first device information, sending a first scanning instruction to the first device so that the first device scans the device information in the memory; receiving the scanned device information from the first device; and based on the physical address of the second device in the received device information, sending a second scanning instruction to the second device so that the second device scans the device information in the memory.
[0046] In some embodiments, the device information of the adjacent EPA device may include the physical address of the adjacent EPA device in the multi-level EPA network. The computing device 102 may determine the physical address of the current EPA device based on the device information of the current EPA device obtained from the previous adjacent EPA device of the current EPA device, and send a scan instruction (which may be referred to as a first scan instruction) to the current EPA device based on the physical address to read the device information stored in the current EPA device. Then, the computing device 102 sends a scan instruction (which may be referred to as a second scan instruction) to the next adjacent EPA device based on the physical address of the next adjacent EPA device in the device information stored in the current EPA device to read the device information stored in the next adjacent EPA device.
[0047] By continuously looping the above process, the device information stored in all EPA devices can be read according to the neighboring relationship between multiple EPA devices. At the beginning of the above loop process, the computing device 102 can send a scan instruction to the directly connected EPA device, obtain the physical address of the EPA device adjacent to the directly connected EPA device from the directly connected EPA device, and then send a scan instruction to the adjacent EPA device based on the physical address, thereby entering the loop process to continuously obtain the physical address of the next adjacent EPA device. In this way, the adjacent EPA devices of each EPA device can be continuously read, so that the device information read by the computing device 102 from the multi-level EPA network includes the topological information between multiple EPA devices.
[0048] At step 204, based on the second device information in the acquired device information, the connection relationship between the multiple devices included in the multi-level EPA network is determined.
[0049] In some embodiments, the computing device 102 determines the connection relationship between the multiple EPA devices according to the device information of the corresponding multiple adjacent EPA devices read from the multiple current EPA devices. It should be understood that since the computing device 102 reads the device information of the adjacent EPA devices from the current EPA device according to the adjacent relationship between the EPA devices, the device information can represent the connection relationship between the current EPA device and the adjacent EPA devices. In this way, according to the connection relationship between every two EPA devices, the computing device 102 can infer the connection relationship between all EPA devices in the multi-level EPA network.
[0050] A method for determining the connection relationship between multiple devices included in a multi-level EPA network based on the second device information in the acquired device information, for example, includes: determining the corresponding second device based on the physical address of the second device in the device information received from the first device; determining the first connection relationship between the first device and the determined second device; determining the corresponding third device based on the physical address of the third device in the device information received from the second device, the third device being adjacent to the second device; and determining the second connection relationship between the second device and the determined third device.
[0051] In some embodiments, reference Figure 1, EPA device 1141 is adjacent to EPA device 1142, EPA device 1142 is adjacent to EPA device 114m, EPA device 1141 is used as the first device, EPA device 1142 is used as the second device, and EPA device 114m is used as the third device. The computing device 102 can determine the EPA device 1142 adjacent to EPA device 1141 according to the physical address of device 1142 read from EPA device 1141, and determine the connection relationship between EPA device 1141 and EPA device 1142. Then, the computing device 102 continues to determine the EPA device 114m adjacent to EPA device 1142 according to the physical address of device 114m read from EPA device 1142. In this way, the computing device 102 can obtain the connection relationship between every two adjacent EPA devices by continuously repeating the above process. In this way, the computing device 102 can determine the connection relationship between multiple EPA devices and improve its accuracy based on the device information of adjacent EPA devices distributedly stored in the EPA devices.
[0052] At step 206 , based on the determined connection relationships, the network levels of the plurality of devices in the multi-level EPA network are determined.
[0053] In some embodiments, after determining the connection relationship between multiple EPA devices according to the acquired device information, the computing device 102 can further determine the network level of multiple EPA devices in the multi-level EPA network according to the connection relationship. For example, when the computing device 102 determines that the EPA device 1141, EPA device 1142, ..., EPA device 114m, and EPA gateway device 116 are linearly connected, the EPA gateway device 116, EPA device 1181, EPA device 1182, ..., EPA device 118n are ring-type connected, and the EPA device 1141 is directly connected to the computing device 102, it can be analyzed to determine that the EPA device 1141, EPA device 1142, ..., EPA device 114m are in the level 1 network 114, the EPA device 1141, EPA device 1142, ..., EPA device 114m are in the level 2 network 118, and the level 1 network 114 and the level 2 network 118 are connected through the EPA gateway device 116.
[0054] At step 208 , based on the first device information in the acquired device information and the determined network level, configuration parameters of at least one device among the plurality of devices in the multi-level EPA network are determined.
[0055] In some embodiments, after determining the network levels of multiple EPA devices, the computing device 102 can determine the configuration parameters of the EPA device, such as cycle time, offset time, and other parameters, based on the device information of the EPA device (which may be referred to as first device information) and the network level of the EPA device.
[0056] Regarding the first device information, it for example includes the data length when the first device communicates, and regarding the method for determining the configuration parameters of at least one device among multiple devices in a multi-level EPA network based on the first device information in the acquired device information and the determined network level, it for example includes: determining the devices in the first level of the multi-level EPA network; obtaining the data length when the devices in the determined first level communicate in the device information; and determining the configuration parameters of the devices in the first level in the multi-level EPA network based on the acquired data length when the devices in the first level communicate.
[0057] In some embodiments, the device information of the EPA device may include the data length of the EPA device during communication, wherein the data length is used to indicate the maximum communication data volume that the EPA device can support during communication. Figure 1 , the computing device 102 can obtain the device information of the EPA devices in the level 1 (which can be called the first level) network 114, that is, the device information of the EPA device 1141, the device information of the EPA device 1142, ..., the device information of the EPA device 114m. Then, the data length of the EPA device during communication is obtained from the device information, and then the configuration parameters of the EPA device are determined according to the data length of the EPA device. In this way, the computing device 102 can determine the configuration parameters of the EPA device according to the data length of the EPA device during communication in the level 1 network 114.
[0058] Regarding a method for determining configuration parameters of at least one device among multiple devices in a multi-level EPA network based on first device information in the acquired device information and the determined network level, the method also includes, for example: determining devices in a second level of the multi-level EPA network, wherein the second level is adjacent to the first level; obtaining the data length when the determined devices in the second level communicate in the device information; and determining the configuration parameters of the devices in the second level in the multi-level EPA network based on the configuration parameters of the gateway device and the obtained data length when the devices in the second level communicate, wherein the gateway device is between the first level and the second level.
[0059] In some embodiments, reference Figure 1After completing the calculation of the configuration parameters of the EPA devices in the level 1 network 114, the computing device 102 can determine the configuration parameters of the EPA devices in the level 2 (which can be called the second layer) network 118 adjacent to the level 1 network 114. Specifically, the computing device 102 can obtain the device information of the EPA devices in the level 2 network 118, that is, the device information of the EPA device 1181 itself, the device information of the EPA device 1182 itself, ..., the device information of the EPA device 118n itself. Then, the data length of the EPA device communication is obtained from the device information, and then the configuration parameters of the EPA devices in the level 2 network 118 are determined according to the data length of the EPA devices in the level 2 network 118 and the configuration parameters of the EPA gateway device 116.
[0060] Then, the computing device 102 can repeat the above process to continue to calculate the configuration parameters of the EPA devices in the level 3 network, the level 4 network (not shown), etc. In this way, the computing device 102 can calculate the configuration parameters of the EPA devices in the high-level network based on the configuration parameters of the EPA devices in the low-level network and the configuration parameters of the EPA gateway device, thereby improving the accuracy of the configuration parameters of the EPA devices in the high-level network.
[0061] refer to Figure 1 In the process of calculating the configuration parameters of the EPA device in the level 2 network 118 according to the data length of the EPA device in the level 2 network 118 and the configuration parameters of the EPA gateway device 116, the computing device 102 can first calculate the initial configuration parameters of the EPA device according to the data length of the EPA device in the level 2 network 118 (the initial configuration parameters can be understood as the configuration parameters when the EPA device, such as the EPA network 1181, is in the level 1 network), and then calculate the final configuration parameters of the EPA device in the level 2 network 118 based on the initial configuration parameters and the configuration parameters of the EPA gateway device 116.
[0062] A method for determining configuration parameters of devices in a second layer in a multi-level EPA network based on the configuration parameters of a gateway device and the acquired data length when devices in the second layer communicate, for example, includes: determining a maximum data length among the acquired data lengths when devices in the first layer communicate; and determining the configuration parameters of the gateway device based on the determined maximum data length.
[0063] In some embodiments, reference Figure 1, the computing device 102 can determine the maximum data length according to the data lengths of the EPA devices 1141, EPA devices 1142, ..., EPA devices 114m in the level 1 network 114. Then, the computing device 102 can determine the configuration parameters of the EPA gateway device according to the maximum data length. In this way, the EPA network device can support the configuration requirements of the EPA devices in networks of different levels, thereby more accurately realizing cross-network transmission between networks of different levels.
[0064] Regarding configuration parameters, for example, they include at least one of the macrocycle time, cycle time, non-cycle time, synchronization time, information query time and offset time during device communication, and method 200 also includes: based on the physical addresses of the multiple devices in the multi-level EPA network, sending configuration parameters to the multiple devices to configure the multiple devices; and when the multiple devices have completed the configuration, sending work instructions to the multiple devices so that the multiple devices start the multi-level EPA network according to the sent configuration parameters.
[0065] It should be understood that the multi-level EPA network adopts a periodic communication mode, and each communication cycle is a macrocycle. The macrocycle consists of a periodic time and a non-periodic time. All EPA devices in the multi-level EPA network are synchronized under a time base, that is, the start time and end time of the macrocycle of all EPA devices are consistent. When communicating, the multi-level EPA network can use the time slice within the periodic time for data periodic communication according to the configuration parameters configured by each EPA device. In this way, the EPA devices in the different layers of the multi-level EPA network can be uniformly configured and started, thereby improving the efficiency of the multi-level EPA network configuration.
[0066] The configuration method of the multi-level EPA network is described in detail above with the computing device 102 as the execution subject. When the EPA device in the multi-level EPA network is used as the execution subject, its configuration method may include, for example: a first device among the multiple devices included in the multi-level EPA network sends first device information related to the first device to a second device adjacent to the first device, and receives second device information related to the second device from the second device; sends device information to the computing device, the device information includes first device information and second device information; and receives configuration parameters of at least one device among the multiple devices in the multi-level EPA network from the computing device, wherein the configuration parameters are determined by the computing device based on the first device information in the device information and the network level of the device, the network level of the device is determined by the computing device based on the connection relationship between the multiple devices, and the connection relationship between the multiple devices is determined by the computing device based on the second device information in the device information. The relevant specific process has been described in detail in the above content and will not be repeated here.
[0067] Figure 3 A schematic diagram of another environment 300 for configuring a multi-level EPA network according to some embodiments of the present invention is shown. The environment 300 includes a computer 302 and a multi-level EPA network, wherein the multi-level EPA network includes a level 1 linear network 304 and a level 2 ring network 308, and the level 1 linear network 304 and the level 2 ring network 308 are connected and communicated via an EPA gateway device 306. The level 1 linear network 304 includes EPA devices 3041 and EPA devices 3042, and the level 2 ring network 308 includes EPA devices 3081, EPA devices 3082, and EPA devices 3083. An EPA configuration control program is provided in the computer 302 for configuring the EPA devices in the multi-level EPA network. A device scanning engine is provided in the EPA device for scanning the device information of the EPA device, and for sending, parsing, and storing information notification messages containing the device information. The following will be described in detail using the environment 300 as an implementation scenario. Figure 4 , Figure 5 as well as Figure 6 The methods and processes involved.
[0068] The following will be combined Figure 4 A method 400 for determining connection relationships of EPA devices in a multi-level EPA network according to an embodiment of the present invention is described. Figure 4 FIG. 4 is a flowchart of a method 400 for determining the connection relationship of EPA devices in a multi-level EPA network according to some embodiments of the present invention. It should be understood that the method 400 may be implemented, for example, in Figure 3 It should be understood that the method 400 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present invention is not limited in this respect.
[0069] At step 402, the computer broadcasts and sends an instruction for starting device scanning. In some embodiments, the computer 302 installed with the EPA configuration control program is connected to the multi-level EPA network via a network cable, and sends an instruction for starting scanning to the EPA devices in the multi-level EPA network, so that the EPA devices start scanning their own device information.
[0070] At step 404, the EPA device forwards the instruction to the multi-level EPA network, and then forwards it to the EPA network at each level through the EPA gateway device at each level. Figure 3In the process of issuing instructions, the computer 302 first sends the instructions to the directly connected EPA device 3041, and then the EPA device 3041 sends the instructions to the adjacent EPA device 3042. In this way, the EPA device continuously sends instructions to the adjacent EPA devices in this way until all EPA devices receive the instructions. In the process of issuing instructions, the EPA gateway device 306 also serves as one of the EPA devices.
[0071] At step 406, the EPA device receives the instruction, generates an information notification message, and sends it to the adjacent EPA device through the multi-level EPA network. In some embodiments, after receiving the instruction, the EPA device scans its own device information, generates an information notification message based on the device information, and sends it to the adjacent EPA device through the network port. The information notification message may include device information such as the physical address of the EPA device, the device type, and the data transmission length.
[0072] At step 408, the adjacent EPA device receives the information notification message, parses the information notification message and stores it internally. In some embodiments, after receiving the information notification message, the adjacent EPA device no longer forwards it to the next EPA device, but only parses the information notification message and stores it internally. Thus, the device information stored internally in each EPA device includes its own device information and the device information of the adjacent EPA device.
[0073] At step 410, the computer reads the device scan result from the directly connected EPA device, and reads the next EPA device according to the scan result, until the scan results of all EPA devices are read. Figure 3 , the computer 302 first sends a scan instruction to the directly connected EPA device 3041 to read the stored device information from the EPA device 3041. Since the device information includes the physical address of the adjacent EPA device 3042, the computer 302 can send a scan instruction to the EPA device 3042 according to the physical address to read the stored device information from the EPA device 3042. By repeating the above process, the computer 302 can read the device information from the EPA device 3041, the EPA device 3042, the EPA gateway device 306, the EPA device 3081 and the EPA device 3082, and the EPA device 3083 in turn, and determine the connection relationship between every two adjacent EPA devices in the above devices.
[0074] At step 412, the computer draws the connection relationship between the EPA devices according to the scanning results, and displays it through the display and control terminal. In some embodiments, the computer 302 can determine the connection relationship between every two adjacent EPA devices according to the device information obtained from the EPA devices, and then draw the connection relationship between all EPA devices, thereby obtaining the topological structure of the multi-level EPA network. Then, the computer 302 can send the connection relationship to the display and control terminal, and display the multi-level EPA network through the display and control terminal.
[0075] The following will be combined Figure 5 A method 500 for configuring configuration parameters of EPA devices in a multi-level EPA network according to an embodiment of the present invention is described. Figure 5 1 is a flowchart of a method for configuring configuration parameters of EPA devices in a multi-level EPA network according to some embodiments of the present invention. It should be understood that the method 500 may be implemented in, for example, Figure 3 It should be understood that the method 500 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present invention is not limited in this respect.
[0076] At step 502, the network level is determined according to the scan result. In some embodiments, since the device information in the scan result reflects the connection relationship between adjacent EPA devices, the network level in the multi-level EPA network can be further determined according to the connection relationship between multiple EPA devices. Figure 3 According to the device information, computer 302 can determine that EPA device 3041, EPA device 3042 and EPA gateway device 306 are in a linear connection relationship, while EPA gateway device 306, EPA device 3081, EPA device 3082 and EPA device 3083 are in a ring connection relationship. Therefore, it can be determined that EPA device 3041 and EPA device 3042 are in the first-level linear network 304, and EPA device 3081, EPA device 3082 and EPA device 3083 are in the second-level ring network 308.
[0077] At step 504, according to the data length of the EPA device in the lower-level network, the configuration parameters of the EPA device are calculated and the maximum data length required for cross-network transmission is determined. Figure 3The computer 302 determines the configuration parameters of the EPA device 3041 and the EPA device 3042 according to the data length included in the device information read from the EPA device 3041 and the EPA device 3042 in the first-level linear network 304. The configuration parameters include cycle time, cycle time, non-cycle time, synchronization time, information query time, and offset time. Then, according to the maximum value of the data length in the EPA device 3041 and the EPA device 3042, the maximum data length required to transmit data across the first-level linear network 304 to the second-level ring network 308 is determined.
[0078] At step 506, the configuration parameters of the EPA gateway device are calculated according to the maximum data length required for cross-network transmission. In some embodiments, since the EPA network device is connected to the end of the level 1 linear network 304, the configuration parameters of the EPA gateway device can be calculated according to the maximum data length required for cross-network transmission, that is, the maximum value of the data length in the EPA device 3041 and the EPA device 3042.
[0079] At step 508, the configuration parameters of the EPA devices and EPA gateway devices in the higher level network are calculated in sequence until the configuration parameters in all levels of the network are calculated. Figure 3 The computer 302 calculates the configuration parameters of the EPA gateway device 306 and the data lengths of the EPA devices 3081, EPA device 3082 and EPA device 3083 in the 2-level ring network 308, in the multi-level EPA network.
[0080] At step 510, configuration parameters are sent to the corresponding EPA devices according to the physical addresses of the EPA devices until all EPA devices have completed configuration. Figure 3 After calculating the configuration parameters of all EPA devices, the computer 302 can send the configuration parameters to each EPA device through the multi-level EPA network according to the physical address of each EPA device, thereby completing the configuration.
[0081] At step 512, the instruction for starting the EPA device is broadcasted and forwarded to each EPA device through the multi-level EPA network, and each EPA device starts working according to the instruction. In some embodiments, after all EPA devices in the multi-level EPA network are configured, the computer 302 broadcasts the start instruction to each EPA device to uniformly control the start of the EPA devices in the multi-level EPA network.
[0082] The following will be combined Figure 6 An interactive process 600 for configuring a multi-level EPA network according to an embodiment of the present invention is described. Figure 6 FIG. 6 is a schematic diagram of an interactive process 600 for configuring a multi-level EPA network according to some embodiments of the present invention. It should be understood that the interactive process 600 may be, for example, Figure 3 It should be understood that the interactive process 600 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present invention is not limited in this respect.
[0083] In some embodiments, the computer 302 first generates a scan instruction 602 for the EPA device to scan its own device information. In step 6041, the computer 302 sends a scan instruction to the EPA device 3041. In step 6042, the EPA device 3041 forwards the scan instruction to the EPA device 3042. In step 6043, the EPA device 3042 forwards the scan instruction to the EPA gateway device 306. In step 6044, the EPA gateway device 306 forwards the scan instruction to the EPA device 3081, and in step 6046, the gateway device 306 forwards the scan instruction to the EPA device 3082. In step 6045, the EPA device 3081 forwards the scan instruction to the EPA device 3083, and in step 6047, the EPA device 3082 forwards the scan instruction to the EPA device 3083. In this way, the scan instruction is forwarded layer by layer through two adjacent EPA devices until all EPA devices receive the scan instruction of the computer 302.
[0084] After all EPA devices receive the scanning instruction, EPA device 3041, EPA device 3042, EPA gateway device 306, EPA device 3081, EPA device 3082 and EPA device 3083 scan their own device information and generate information notification message 6061, information notification message 6062, information notification message 6063, information notification message 6064, information notification message 6065 and information notification message 6066 respectively.
[0085] In step 6081, EPA device 3041 and EPA device 3042 send information notification messages to each other. In step 6082, EPA device 3042 and EPA gateway device 306 send information notification messages to each other. In step 6083, EPA gateway device 306 and EPA device 3081 send information notification messages to each other. In step 6084, EPA device 3082 and EPA device 3083 send information notification messages to each other. In step 6085, EPA gateway device 306 and EPA device 3082 send information notification messages to each other. In step 6086, EPA device 3081 and EPA device 3083 send information notification messages to each other. In this way, each EPA device can generate an information notification message to send to an adjacent EPA device, and receive an information notification message from an adjacent EPA device.
[0086] Then, in step 6101, the computer 302 reads the device information from the directly connected EPA device 3041. Since the device information includes the device information sent by the adjacent EPA device 3042, the computer 302 can determine the adjacent EPA device 3042 based on the read device information, and in step 6102, the computer 302 reads the device information from the EPA device 3042. Then, the above process is repeated to determine the next adjacent EPA gateway device 306, and in step 6103, the computer 302 reads the device information from the EPA gateway device 306. In step 6104, the computer 302 reads the device information from the EPA device 3081. In step 6105, the computer 302 reads the device information from the EPA device 3082. In step 6106, the computer 302 reads the device information from the EPA device 3083.
[0087] In the process of reading device information from the multi-level EPA network, the computer 302 can determine the connection relationship between two adjacent EPA devices, so as to obtain the connection relationship 612 between all EPA devices. After determining the connection relationship 612, the computer 602 can determine the network level 614 according to the topological structure of the multi-level EPA network, and generate the configuration message 616 of the EPA device according to the device information of the EPA device and the network level.
[0088] Further, in step 6181, the computer 302 sends a corresponding configuration message to the EPA device 3041. In step 6182, the computer 302 sends a corresponding configuration message to the EPA device 3042. In step 6183, the computer 302 sends a corresponding configuration message to the EPA gateway device 306. In step 6184, the computer 302 sends a corresponding configuration message to the EPA device 3081. In step 6185, the computer 302 sends a corresponding configuration message to the EPA device 3082. In step 6186, the computer 302 sends a corresponding configuration message to the EPA device 3083. In this way, the computer 302 can realize the unified configuration of all EPA devices in the multi-level EPA network.
[0089] Figure 7 The block diagram of an electronic device 700 suitable for implementing an embodiment of the present invention is schematically shown. The electronic device 700 can be used to implement the computing device 102 or the computer 302. The electronic device 700 can be used to implement the execution Figure 2 The apparatus of the method 200 is shown. Figure 7 As shown, the electronic device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 to a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0090] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, an output unit 707, and a storage unit 708. The central processing unit 701 performs the various methods and processes described above, such as executing the method 200. For example, in some embodiments, the various processes or operations described above can be implemented as computer software programs, which are stored in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the CPU 701, the various methods and processes described above can be executed, such as executing one or more operations of the method 200. Alternatively, in other embodiments, the CPU 701 can be configured to execute the various methods and processes described above, such as executing one or more actions of the method 200, by any other appropriate means (e.g., by means of firmware).
[0091] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0092] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present invention.
[0093] These computer-readable program instructions can be provided to a processor in a voice interaction device, a general-purpose computer, a special-purpose computer, or a processing unit of other programmable data processing devices, thereby producing a machine, so that when these instructions are executed by the processing unit of a computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other device to work in a specific manner.
[0094] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
[0095] The above are only optional embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for configuring a multi-level EPA network, characterized in that: include: Acquire device information from a first device among a plurality of devices included in the multi-level EPA network, wherein the device information includes first device information related to the first device and second device information related to the second device, and the second device information is received by the first device from a second device adjacent to the first device; Determine, based on the second device information in the acquired device information, a connection relationship between multiple devices included in the multi-level EPA network; Based on the determined connection relationships, determining network levels of the plurality of devices in the multi-level EPA network; as well as Determine configuration parameters of at least one device among the plurality of devices in the multi-level EPA network based on the first device information in the acquired device information and the determined network level; The first device information includes the data length of the first device during communication, and based on the first device information in the acquired device information and the determined network level, determining the configuration parameters of at least one device among the multiple devices in the multi-level EPA network includes: Identify the equipment in the first tier of the multi-tier EPA network; Acquire the data length of the communication of the determined device in the first level in the device information; Determine configuration parameters of the devices in the first level in the multi-level EPA network based on the acquired data lengths during communication between the devices in the first level; identifying a device in a second level of a multi-level EPA network, wherein the second level is adjacent to the first level; Acquire the data length of the communication of the determined device in the second layer from the device information; and Determining configuration parameters of the devices in the second level in the multi-level EPA network based on configuration parameters of the gateway device and the acquired data length when the devices in the second level communicate, wherein the gateway device is between the first level and the second level; Based on the configuration parameters of the gateway device and the acquired data length of the devices in the second level when communicating, determining the configuration parameters of the devices in the second level in the multi-level EPA network includes: Determining a maximum data length among the acquired data lengths when the devices in the first layer communicate; and Based on the determined maximum data length, determine the configuration parameters of the gateway device.
2. The method according to claim 1, characterized in that The second device information includes a physical address of the second device, and acquiring device information from a first device among a plurality of devices included in the multi-level EPA network includes: Based on the physical address of the first device included in the first device information, sending a first scanning instruction to the first device, so that the first device scans the device information in the memory; receiving the scanned device information from the first device; and Based on the physical address of the second device in the received device information, a second scanning instruction is sent to the second device, so that the second device scans the device information in the memory.
3. The method according to claim 2, characterized in that Determining the connection relationship between the multiple devices included in the multi-level EPA network based on the second device information in the acquired device information includes: Determine a corresponding second device based on a physical address of the second device in the device information received from the first device; Determining a first connection relationship between the first device and the determined second device; Determine a corresponding third device based on a physical address of the third device in the device information received from the second device, the third device being adjacent to the second device; and A second connection relationship between the second device and the determined third device is determined.
4. The method according to claim 1, characterized in that The configuration parameters include at least one of a macrocycle time, a cycle time, a non-cycle time, a synchronization time, an information query time, and an offset time during device communication, and the method further includes: Sending configuration parameters to the plurality of devices based on physical addresses of the plurality of devices in the multi-level EPA network to configure the plurality of devices; and When the configuration of multiple devices is completed, work instructions are sent to the multiple devices so that the multiple devices start the multi-level EPA network according to the sent configuration parameters.
5. A configuration method for a multi-level EPA network, characterized in that: include: A first device among a plurality of devices included in a multi-stage EPA network sends first device information related to the first device to a second device adjacent to the first device, and receives second device information related to the second device from the second device; Sending device information to the computing device, the device information including first device information and second device information; as well as receiving, from a computing device, configuration parameters of at least one device among the plurality of devices in the multi-level EPA network, wherein the configuration parameters are determined by the computing device based on first device information in the device information and a network level of the device, the network level of the device is determined by the computing device based on connection relationships between the plurality of devices, and the connection relationships between the plurality of devices are determined by the computing device based on second device information in the device information; The first device information includes the data length of the first device during communication, and the method for the computing device to determine the configuration parameters includes: Identify the equipment in the first tier of the multi-tier EPA network; Acquire the data length of the communication of the determined device in the first level in the device information; Determine configuration parameters of the devices in the first level in the multi-level EPA network based on the acquired data lengths during communication between the devices in the first level; identifying a device in a second level of a multi-level EPA network, wherein the second level is adjacent to the first level; Acquire the data length of the communication of the determined device in the second layer from the device information; and Determining configuration parameters of the devices in the second level in the multi-level EPA network based on configuration parameters of the gateway device and the acquired data length when the devices in the second level communicate, wherein the gateway device is between the first level and the second level; Based on the configuration parameters of the gateway device and the acquired data length of the devices in the second level when communicating, determining the configuration parameters of the devices in the second level in the multi-level EPA network includes: Determining a maximum data length among the acquired data lengths when the devices in the first layer communicate; and Based on the determined maximum data length, determine the configuration parameters of the gateway device.
6. A computing device, characterized in that: include: at least one processor; as well as At least one memory, the at least one memory being coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions, when executed by the at least one processor, causing the computing device to perform the steps of the method according to any one of claims 1 to 4.
7. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a machine, performs the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
EPA (ethemet for plant automation) on-chip system, EPA communication system and EPA communication method
CN106685735A
EPA gateway device and EPA cross-network communication method
CN113612801A