Gateway module configuration method and device
By configuring the object dictionary in the configuration software and transmitting it to the gateway module through the network protocol, the problem of complex and low-efficiency gateway module configuration in the existing technology is solved, and automated configuration and efficient gateway module configuration are achieved.
Patent Information
- Application Number
- CN202410839536.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-27
AI Technical Summary
Existing gateway module configuration requires users to be familiar with two sets of configuration software, which is complex and error-prone, resulting in low configuration efficiency.
By configuring the object dictionary in the configuration software and sending it to the control module through the first network protocol, and then the control module sending it to the gateway module through the second network protocol, automatic configuration is achieved and manual operations are reduced.
It achieves one-time configuration and automatic peer-to-peer, greatly improving the configuration efficiency of the gateway module, and adapts to various lower-side communication protocols to improve universality.
Smart Images

Figure CN118713962A
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a gateway module configuration method and device. Background Art
[0002] In the field of industrial control and industrial bus communication technology, there are a large number of gateway-type devices. Most gateway devices, including EtherCAT slave-type gateway devices, use independent configuration solutions and require users to perform manual point-to-point operations in the configuration software of the gateway's upper-level master station. This implementation method requires users to be familiar with two sets of configuration software, which is highly complex and prone to errors in manual point-to-point operations. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a gateway module configuration method and device to solve the problem in the prior art that the gateway module needs to be configured separately and the acquired periodic data needs to be parsed point by point, resulting in low configuration and parsing efficiency.
[0004] According to a first aspect of an embodiment of the present application, a gateway module configuration method is provided, the method being executed by a control module and comprising:
[0005] The self-configuration software receives an object dictionary, the object dictionary including sequentially stored configuration information of a plurality of third-party devices that need to be configured by a gateway module connected to the control module;
[0006] Determine target configuration data, where the target configuration data includes configuration data of a third-party device that needs to be configured;
[0007] The target configuration data is sent to a gateway module connected to the control module using the first network protocol, so that the gateway module completes the network configuration of the second network protocol based on the object dictionary and the target configuration data.
[0008] In one embodiment, the method further comprises:
[0009] The control module determines the periodic output data;
[0010] The object dictionary is updated using the configuration parameters of the periodic output data, so that the gateway module obtains the periodic output data from the updated object dictionary and sends the periodic output data to the third-party device.
[0011] In one embodiment, the method further comprises:
[0012] The updated object dictionary is received from the gateway module, and the updated object dictionary is obtained by querying and updating the configuration parameters of the periodic input data obtained from the third-party device by the gateway module;
[0013] Get the periodic input data from the updated object dictionary.
[0014] According to a second aspect of an embodiment of the present application, a gateway module configuration method is provided, the method being executed by the gateway module, comprising:
[0015] Obtaining an object dictionary from the control module, the object dictionary including sequentially stored configuration information of a plurality of third-party devices that need to be configured by a gateway module connected to the control module;
[0016] Using the first network protocol to obtain target configuration data from the control module, the target configuration data includes configuration data of a third-party device that needs to be configured;
[0017] Obtain configuration data of the target third-party device from the configuration data;
[0018] The second network protocol is started, and the gateway module is configured using the configuration data of the target third-party device.
[0019] In one implementation, the target configuration data includes configuration data of a plurality of third-party devices;
[0020] Obtain the configuration data of the target third-party device from the configuration data, including:
[0021] Determine whether the third-party device corresponding to the target configuration data is the last third-party device that needs to be configured;
[0022] If so, determining that the current configuration data is the configuration data of the target third-party device;
[0023] If not, the object dictionary is used to parse the current configuration data to obtain the configuration data of the target third-party device.
[0024] In one embodiment, the method further comprises:
[0025] The gateway module receives periodic input data from third-party devices;
[0026] Get the configuration parameters of periodic input data;
[0027] The updated object dictionary is queried based on the configuration parameters of the periodic input data, so that the control module outputs the periodic input data based on the updated object dictionary.
[0028] In one embodiment, the method further comprises:
[0029] The self-control module obtains the updated object dictionary, which is updated by querying the configuration parameters of the periodic output data;
[0030] Get the cyclic output data from the updated object dictionary and send it to the third-party device.
[0031] In one implementation, the third-party device includes N third-party devices, where N is a positive integer;
[0032] The object dictionary includes N gateway configuration information arranged in a configuration order, N periodic input data formats arranged in a configuration order, and N periodic output data formats arranged in a configuration order;
[0033] The gateway configuration information is determined by the second network protocol and is used to configure the network between the gateway module and the third-party device;
[0034] The periodic input data format and the periodic output data format are the same as the formats specified by the first network protocol.
[0035] According to a third aspect of an embodiment of the present application, a gateway module configuration device is provided, including:
[0036] The receiving module is configured to receive an object dictionary from the control module self-configuration software, wherein the object dictionary includes sequentially stored configuration information of a plurality of third-party devices that need to be configured by the gateway module connected to the control module;
[0037] A determination module is configured to determine target configuration data, where the target configuration data includes configuration data of a third-party device that needs to be configured;
[0038] The communication module is configured to use the first network protocol to send the target configuration data to all gateway modules connected to the control module, so that the gateway modules that need to be configured complete the network configuration of the second network protocol based on the object dictionary and the target configuration data.
[0039] According to a fourth aspect of the embodiments of the present application, a gateway module configuration device is provided, including:
[0040] An acquisition module is configured to acquire an object dictionary from the control module by the gateway module, wherein the object dictionary includes configuration information of a plurality of third-party devices stored sequentially and requiring configuration of the gateway module connected to the control module;
[0041] The acquisition module is further configured to acquire target configuration data from the control module using the first network protocol, the target configuration data including configuration data of a third-party device that needs to be configured;
[0042] The acquisition module is further configured to acquire configuration data of the target third-party device from the configuration data;
[0043] The configuration module is configured to start the second network protocol and configure the gateway module using the configuration data of the target third-party device.
[0044] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application configure the object dictionary in the configuration software, and send the object dictionary to the control module through the first network protocol, and then the control module sends it to the gateway module through the second network protocol, so that when the control module obtains the target configuration data and configures one or more third-party devices that need to be configured with the gateway module connected to the control module, the configuration parameters of the target third-party device can be found in the object dictionary based on the target configuration data, and then the gateway module and the target third-party device can be configured using the configuration parameters. This solution can realize one-time configuration and automatic point-to-point, greatly improving the configuration efficiency of the gateway module; at the same time, this solution can adapt to various lower-level communication protocols of the gateway device, and has high universality. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 It is a scenario diagram of an application scenario of an embodiment of the present application.
[0047] Figure 2 It is a flow chart of a gateway module configuration method provided in an embodiment of the present application.
[0048] Figure 3 It is a flow chart of another gateway module configuration method provided in an embodiment of the present application.
[0049] Figure 4 It is a flowchart of another gateway module configuration method provided in an embodiment of the present application.
[0050] Figure 5 It is a flowchart of another gateway module configuration method provided in an embodiment of the present application.
[0051] Figure 6 It is a flowchart of a method for obtaining configuration data of a gateway module from configuration data provided in an embodiment of the present application.
[0052] Figure 7 It is a flowchart of yet another gateway module configuration method provided in an embodiment of the present application.
[0053] Figure 8 It is a flowchart of another gateway module configuration method provided in an embodiment of the present application.
[0054] FIG9(A) is a schematic diagram of the information format of gateway configuration information of a single third-party device when the second network protocol is the DeviceNet protocol, provided in an embodiment of the present application.
[0055] FIG9(B) is a schematic diagram of the periodic data format of a single third-party device when the second network protocol is the DeviceNet protocol provided in an embodiment of the present application.
[0056] Fig.10 It is a schematic diagram of the object dictionary provided in the embodiment of the present application.
[0057] Fig.11 It is a flowchart of a method for configuring and periodically communicating with a slave station provided in an embodiment of the present application.
[0058] Fig.12 It is a schematic diagram of a gateway module configuration device provided in an embodiment of the present application.
[0059] Fig.13 It is a schematic diagram of another gateway module configuration device provided in an embodiment of the present application.
[0060] Fig.14 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0062] A gateway module configuration method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0063] Figure 1 It is a scene diagram of the application scene of the embodiment of the present application. The application scene may include configuration software, a control module, a gateway module and a third-party device. Wherein, the control module and the gateway module communicate via the EtherCAT protocol, so the control module may further include an EtherCAT master station, and the gateway module may further include an EtherCAT slave station. Each slave station may be connected to multiple third-party devices, and different communication protocols may be used to communicate with the third-party devices, such as DeviceNet, CANOpen and Proibus DP.
[0064] As mentioned above, in the field of industrial control and industrial bus communication technology, there are a large number of gateway-type devices. Most gateway devices, including EtherCAT slave-type gateway devices, adopt independent configuration solutions and require users to perform manual point-to-point operations in the configuration software of the gateway's upper master station. This implementation method requires users to be familiar with two sets of configuration software, which is highly complex and prone to errors in manual point-to-point operations.
[0065] In view of this, the embodiment of the present application provides a gateway module configuration method, by configuring an object dictionary in the configuration software, and sending the object dictionary to the control module through the first network protocol, and then the control module sends it to the gateway module through the second network protocol, so that when the control module obtains the target configuration data and configures one or more third-party devices that need to be configured with the gateway module connected to the control module, the configuration parameters of the target third-party device can be found in the object dictionary based on the target configuration data, and then the configuration parameters are used to configure the gateway module and the target third-party device. This solution can realize one-time configuration and automatic point-to-point, greatly improving the configuration efficiency of the gateway module; at the same time, this solution can adapt to various lower-level communication protocols of the gateway device, and has high universality.
[0066] Figure 2 It is a flow chart of a gateway module configuration method provided in an embodiment of the present application. Figure 2 The gateway module configuration method can be Figure 1 The control module is executed. Figure 2 As shown, the gateway module configuration method includes the following steps:
[0067] In step S201, an object dictionary is received from configuration software.
[0068] The object dictionary includes sequentially stored configuration information of a plurality of third-party devices that need to be configured by the gateway module connected to the control module.
[0069] In step S202, target configuration data is determined.
[0070] The target configuration data includes configuration data of a third-party device that needs to be configured.
[0071] In step S203, the target configuration data is sent to a gateway module connected to the control module using the first network protocol, so that the gateway module completes the network configuration of the second network protocol based on the object dictionary and the target configuration data.
[0072] In an embodiment of the present application, the method may be executed by a control module, which includes a controller and a first network protocol master station. In one example, if the first network protocol is an EtherCAT network protocol, the control module may include a controller and an EtherCAT master station.
[0073] In an embodiment of the present application, the control module may first receive an object dictionary from the configuration software, and the object dictionary is configured in the configuration software, including sequentially stored configuration information of multiple third-party devices that need to be configured by the gateway module connected to the control module. Among them, the gateway module may include multiple slave stations, each of which is connected to a third-party device. In one example, if the first network protocol is the EtherCAT network protocol, the network module may include multiple EtherCAT slave stations, and the multiple EtherCAT slave stations communicate with an EtherCAT master station in the control module based on the EtherCAT network protocol. At this time, the object dictionary includes the configuration information of all EtherCAT slave stations connected to the EtherCAT master station.
[0074] In an embodiment of the present application, the control module can determine the target configuration data, which includes the configuration data of the third-party device that needs to be configured. That is to say, the target configuration data includes the configuration information of the EtherCAT slave station that needs to be configured, each EtherCAT slave station is connected to a third-party device through a second network protocol, and different EtherCAT slave stations and third-party devices can be connected through different second network protocols. In one example, if the gateway module includes N EtherCAT slave stations, each of the N EtherCAT slave stations is connected to a third-party device respectively, N is a positive integer, and the target configuration data can be the network configuration data of one or more EtherCAT slave stations and their corresponding third-party devices.
[0075] In the embodiment of the present application, the control module can use the first network protocol to send the target configuration data to the gateway module connected to the control module, so that after receiving the target configuration data, the gateway module queries the object dictionary based on the configuration parameters in the target configuration data, and then obtains the configuration data of the third-party device that needs to be configured, and then uses the configuration data to configure the network between the third-party device and the corresponding EtherCAT slave station, thereby realizing the configuration of the gateway module. Configuring the gateway module refers to configuring the second network protocol between the slave station in the gateway module and the third-party device.
[0076] In one example, the second network protocol may be DeviceNet, CANOpen or Proibus DP network protocol.
[0077] By adopting the technical solution of the embodiment of the present application, by configuring the object dictionary in the configuration software, and sending the object dictionary to the control module through the first network protocol, and then sending it to the gateway module through the second network protocol, the control module obtains the target configuration data, and when configuring one or more third-party devices that need to be configured with the gateway module connected to the control module, the configuration parameters of the target third-party device can be found in the object dictionary based on the target configuration data, and then the gateway module and the target third-party device can be configured using the configuration parameters. This solution can achieve one-time configuration and automatic point-to-point, greatly improving the configuration efficiency of the gateway module; at the same time, this solution can adapt to various lower-level communication protocols of the gateway device, and has high universality.
[0078] Figure 3 : is a flow chart of another gateway module configuration method provided in an embodiment of the present application. Figure 3 Steps S301 to S303 in the embodiment shown are Figure 2 Steps S201 to S203 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 3 As shown, the method comprises the following steps:
[0079] In step S304 , the control module determines periodic output data.
[0080] In step S305, the object dictionary is updated using the configuration parameters of the periodic output data, so that the gateway module obtains the periodic output data from the updated object dictionary and sends the periodic output data to the third-party device.
[0081] In an embodiment of the present application, the control module can determine the periodic output data, and use the configuration parameters of the periodic output data to update the object dictionary, so that the gateway module obtains the periodic output data from the updated object dictionary, and sends the periodic output data to the third-party device. It should be noted that the object dictionary can be stored in the master station in the control module, the object dictionary is updated in the master station, the controller transmits the periodic output data to the master station, completes the update of the object dictionary in the master station, and then sends it to the slave station in the gateway module via the master station through the first network protocol.
[0082] Figure 4 : is a flow chart of another gateway module configuration method provided in an embodiment of the present application. Figure 4 Steps S401 to S403 in the embodiment shown are Figure 2 Steps S201 to S203 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 4 As shown, the method comprises the following steps:
[0083] In step S404 , the updated object dictionary is received from the gateway module.
[0084] The updated object dictionary is obtained by querying and updating the configuration parameters of the periodic input data obtained from the third-party device by the gateway module.
[0085] In step S405, periodic input data is acquired from the updated object dictionary.
[0086] In an embodiment of the present application, the control module can also receive an updated object dictionary from the gateway module, wherein the updated object dictionary is obtained by querying and updating the configuration parameters of the periodic input data obtained from the third-party device by the gateway module. Next, the control module can obtain the periodic input data from the updated object dictionary. It should be noted that the object dictionary can also be stored in the slave station in the gateway module, and the object dictionary is updated in the slave station. The gateway module obtains the periodic input data from the third-party device, updates the object dictionary in the slave station based on the periodic input data, and transmits the updated object dictionary to the master station in the control module, so that the controller in the control module can obtain the periodic input data from the master station.
[0087] Figure 5 It is a flowchart of another gateway module configuration method provided in an embodiment of the present application. Figure 5 The gateway module configuration method can be Figure 1 The gateway module is executed. Figure 5 As shown, the gateway module configuration method includes the following steps:
[0088] In step S501, an object dictionary is obtained from a control module.
[0089] The object dictionary includes sequentially stored configuration information of a plurality of third-party devices that need to be configured by the gateway module connected to the control module.
[0090] In step S502, target configuration data is obtained from the control module using a first network protocol.
[0091] The target configuration data includes configuration data of a third-party device that needs to be configured.
[0092] In step S503, the configuration data of the target third-party device is obtained from the configuration data.
[0093] In step S504, the second network protocol is started, and the gateway module is configured using the configuration data of the target third-party device.
[0094] In an embodiment of the present application, the method can be executed by a gateway module, which also includes a slave station.
[0095] In an embodiment of the present application, the gateway module can obtain an object dictionary from the control module, wherein the object dictionary includes sequentially stored configuration information of multiple third-party devices that need to be configured by the gateway module connected to the control module. Subsequently, the gateway module can use the first network protocol to obtain target configuration data from the control module, wherein the target configuration data includes configuration data of the third-party devices that need to be configured.
[0096] In the embodiment of the present application, the gateway module can obtain the configuration data of the target third-party device from the configuration data. Finally, the second network protocol is started, and the configuration data of the target third-party device is used to implement the configuration of the gateway module.
[0097] In an embodiment of the present application, the target configuration data may include configuration data of multiple third-party devices. In other words, the gateway module may include multiple slave stations, each of which is connected to a third-party device. The master station may send configuration data of multiple slave stations at the same time, and the gateway module parses the configuration data of the multiple slave stations based on the object dictionary, and configures the second network between each slave station and its corresponding third-party device according to the parsed configuration data.
[0098] Figure 6 1 is a flow chart of a method for obtaining configuration data of a target third-party device from configuration data provided by an embodiment of the present application. Figure 6 As shown, the method comprises the following steps:
[0099] In step S601, it is determined whether the third-party device corresponding to the target configuration data is the last third-party device that needs to be configured.
[0100] In step S602, if yes, it is determined that the current configuration data is the configuration data of the target third-party device.
[0101] In step S603, if not, the object dictionary is used to parse the current configuration data to obtain the configuration data of the target third-party device.
[0102] In the embodiment of the present application, when the configuration data of the target third-party device is obtained from the self-configuration data, the gateway module can first determine whether the target third-party device is the last third-party device to be configured. In other words, the configuration data received by the gateway module includes the configuration data of multiple slave stations sent by the master station, and the gateway module parses and configures the configuration data of the multiple slave stations one by one. When parsing, first determine whether there are new slave stations in the configuration data, that is, whether the slave station currently required to be configured is the last slave station. Since the slave station corresponds to the third-party device one by one, it is also possible to determine whether the third-party device currently required to be configured is the last third-party device. If so, that is, there is no new slave station, then the current configuration data should only include the configuration data of the target third-party device and its corresponding slave station, and at this time, it can be determined that the current configuration data is the configuration data of the target third-party device. If not, that is, there is a new slave station, then the current configuration data should also include the configuration data of other third-party devices (or slave stations) other than the configuration data of the target third-party device (or slave station), and at this time, the gateway module can use the object dictionary to parse the configuration data of the target third-party device from the current configuration data.
[0103] It should be noted that the above-mentioned current configuration data refers to the configuration data used by the gateway module when configuring the target third-party device. Specifically, the configuration data received by the gateway module from the control module may include the configuration data of multiple third-party devices. The gateway module performs network configuration on each third-party device in sequence according to the configuration data, and after completing the network configuration of each third-party device, the configuration data of the third-party device is deleted from the configuration data to obtain the current configuration data. Therefore, when configuring to the last third-party device, the current configuration data should only contain the configuration data of the last third-party device; and when there are multiple third-party devices that need to be configured, there are configuration data of multiple third-party devices in the current configuration data, so it is necessary to determine the configuration data of the target third-party device based on the object dictionary.
[0104] Figure 7 : is a flow chart of yet another gateway module configuration method provided in an embodiment of the present application. Figure 7 Steps S701 to S704 in the embodiment shown are similar to Figure 5 Steps S501 to S504 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 7 As shown, the method comprises the following steps:
[0105] In step S705 , the gateway module receives periodic input data from a third-party device.
[0106] In step S706, configuration parameters of periodic input data are obtained.
[0107] In step S707 , the updated object dictionary is queried based on the configuration parameters of the periodic input data, so that the control module outputs the periodic input data based on the updated object dictionary.
[0108] In an embodiment of the present application, the gateway module can receive periodic input data from a third-party device and obtain configuration parameters of the periodic input data. Subsequently, the gateway module can query the updated object dictionary based on the configuration parameters of the periodic input data, so that the control module can obtain the periodic input data based on the updated object dictionary. As previously mentioned, the update of the object dictionary can be performed by the master station in the controller, and the controller obtains the periodic input data from the master station and outputs it to the configuration software. In this way, the periodic input data is transmitted from the third-party device to the control module via the gateway module, and the master station in the control module can automatically parse the periodic input data based on the object dictionary, without the need for manual point-to-point, which greatly improves the efficiency of data parsing.
[0109] Figure 8 : is a flow chart of another gateway module configuration method provided in an embodiment of the present application. Figure 8 Steps S801 to S804 in the embodiment shown are Figure 5 Steps S501 to S504 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 8 As shown, the method comprises the following steps:
[0110] In step S805, the updated object dictionary is obtained from the control module.
[0111] The updated object dictionary is obtained by querying and updating the configuration parameters of the periodic output data.
[0112] In step S806, the periodic output data is obtained from the updated object dictionary and sent to the third-party device.
[0113] In an embodiment of the present application, the slave station in the gateway module can also obtain an updated object dictionary from the master station in the self-control module, wherein the updated object dictionary is updated according to the configuration parameter query of the periodic output data. Subsequently, the gateway module obtains the periodic output data from the updated object dictionary and sends it to the third-party device. In this way, the periodic output data is transmitted from the control module to the third-party device via the gateway module, and the slave station in the gateway module can automatically parse the periodic output data based on the object dictionary, and transmit the parsed periodic output data to the third-party device, without the need for manual point-to-point, which greatly improves the data parsing efficiency.
[0114] In the embodiment of the present application, as before, the third-party device may include N third-party devices. In this case, the object dictionary may include N gateway configuration information arranged in a configuration order, N periodic input data formats arranged in a configuration order, and N periodic output data formats arranged in a configuration order. The configuration order is set by the user according to actual needs when configuring the object dictionary in the configuration software, and is not limited here.
[0115] Further, the gateway configuration information is determined by the second network protocol and is used to configure the network between the gateway module and the third-party device. When the second network protocol is the Devicenet protocol, the gateway configuration information may include: data length, device address, device information, communication mode selection, communication parameters, and communication data length setting of the device connected to the gateway module. Furthermore, the periodic input data format and the periodic output data format are the same as the format specified by the first network protocol.
[0116] Figure 9(A) is a schematic diagram of the information format of the gateway configuration information of a single third-party device when the second network protocol is the DeviceNet protocol provided in an embodiment of the present application. Figure 9(B) is a schematic diagram of the periodic data format of a single third-party device when the second network protocol is the DeviceNet protocol provided in an embodiment of the present application. As shown in Figure 9(A), the gateway configuration information includes the data length, device address device information, communication mode selection, communication parameters, and communication data length setting of the third-party device. Among them, the data length refers to the configuration data length of a single third-party device, the device address refers to the device address of a single third-party device, the device information refers to the device information description of a single third-party device, the communication mode selection refers to the communication mode setting of a single third-party device, the communication parameters refer to the communication-related parameter settings of a single third-party device, and the communication data length setting refers to the setting of the periodic communication data length of a single third-party device.
[0117] As shown in Figure 9(B), the periodic data format includes periodic input data and periodic output data, and its data format is the same as the format specified by the first network protocol. In one example, if the first network protocol is the EtherCAT protocol, the data format of the periodic input data and the periodic output data is determined by the EtherCAT standard specification.
[0118] Fig.10 Schematic diagram of the object dictionary provided in the embodiment of the present application. Fig.10 As shown in the figure, the object dictionary includes the configuration data and cycle data of the third-party devices of multiple slave stations stored in a preset configuration order. Fig.10 In the illustrated embodiment, the configuration data and periodic data of the slave stations 1 to n are arranged in sequence, and can also be arranged as required in actual use, which is not limited here.
[0119] When there are multiple third-party devices in the gateway module, the combination of configuration and cycle data is as follows: the configuration data of each slave station is stored in the object dictionary in sequence based on the slave station configuration sequence. In the example, the configuration data object dictionary starts from 0x8000; the input data of each slave station is stored in the object dictionary in sequence based on the slave station configuration sequence. In the example, the input object dictionary starts from 0x1A00; the output data of each slave station is stored in the object dictionary in sequence based on the slave station configuration sequence. In the example, the output object dictionary starts from 0x1600.
[0120] Fig.11 1 is a flow chart of a method for configuring and periodically communicating with a slave station provided in an embodiment of the present application. Fig.11 As shown, the method includes: the slave station receives the configuration data sent by the EtherCAT master station. Determine whether there is a new slave station at present. If so, parse the location information of the configuration data and periodic data of the corresponding slave station on the EtherCAT protocol, and store the parsing result in the slave station configuration parameter cache of the DeviceNet protocol. If not, or after the parsing is completed, start the DeviceNet protocol stack, read the configuration data cache of a single slave station, and configure all slave stations in turn. The specific configuration process is determined by the lower-level protocol of the gateway module (such as the DeviceNet protocol in this example), which will not be repeated here. Finally, after successfully communicating with a single slave station, data is refreshed in the EtherCAT link according to the parsed configuration parameters, specifically including: a) querying the corresponding object dictionary from the configuration parameters for the output data of the slave station, taking out the output data sent by the EtherCAT master station from the object dictionary, and sending the data to the slave station through DeviceNet; and b) querying the corresponding object dictionary from the configuration parameters for the input data of the slave station received from the DeviceNet link, and updating it to the object dictionary for the EtherCAT master station to obtain.
[0121] By adopting the technical solution of the embodiment of the present application, it is possible to complete the configuration of the lower-level protocol of the gateway module at one time on the EtherCAT master station side, and to achieve unified processing for different types of gateway modules. The technical solution of the embodiment of the present application solves the problem of ease of use and error-proneness caused by the need for secondary configuration of most EtherCAT slave-type gateways on the market and the need for manual point-to-point matching between the EtherCAT protocol and the lower-level protocol of the gateway. At the same time, it can be applied to various types of EtherCAT slave-type gateway devices, reducing the development difficulty and improving the development efficiency for the development of such gateway devices.
[0122] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0123] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0124] Fig.12 Schematic diagram of a gateway module configuration device provided in an embodiment of the present application. Fig.12 As shown, the gateway module configuration device includes:
[0125] The receiving module 1201 is configured to receive an object dictionary from the control module self-configuration software, where the object dictionary includes sequentially stored configuration information of a plurality of third-party devices that need to be configured by the gateway module connected to the control module.
[0126] The determination module 1202 is configured to determine target configuration data, where the target configuration data includes configuration data of a third-party device that needs to be configured.
[0127] The communication module 1203 is configured to send the target configuration data to all gateway modules connected to the control module using the first network protocol, so that the gateway modules that need to be configured complete the network configuration of the second network protocol based on the object dictionary and the target configuration data.
[0128] According to the technical solution provided by the embodiment of the present application, by configuring the object dictionary in the configuration software, and sending the object dictionary to the control module through the first network protocol, and then the control module sends it to the gateway module through the second network protocol, so that the control module obtains the target configuration data, when configuring one or more third-party devices that need to be configured with the gateway module connected to the control module, the configuration parameters of the target third-party device can be found in the object dictionary based on the target configuration data, and then the gateway module and the target third-party device can be configured using the configuration parameters. This solution can achieve one-time configuration and automatic point-to-point, greatly improving the configuration efficiency of the gateway module; at the same time, this solution can adapt to various lower-level communication protocols of the gateway device, and has high universality.
[0129] In an embodiment of the present application, it also includes: a control module determines periodic output data; uses the configuration parameters of the periodic output data to update the object dictionary, so that the gateway module obtains the periodic output data from the updated object dictionary and sends the periodic output data to a third-party device.
[0130] In an embodiment of the present application, it also includes: receiving an updated object dictionary from the gateway module, the updated object dictionary is obtained by the gateway module based on a configuration parameter query and update of the periodic input data obtained from a third-party device; and obtaining the periodic input data from the updated object dictionary.
[0131] Fig.13Schematic diagram of another gateway module configuration device provided in an embodiment of the present application. Fig.13 As shown, the gateway module configuration device includes:
[0132] The acquisition module 1301 is configured to acquire an object dictionary from the control module by the gateway module, wherein the object dictionary includes sequentially stored configuration information of a plurality of third-party devices that need to be configured by the gateway module connected to the control module.
[0133] The acquisition module 1301 is further configured to acquire target configuration data from the control module using the first network protocol, where the target configuration data includes configuration data of a third-party device that needs to be configured.
[0134] The acquisition module 1301 is further configured to acquire configuration data of the target third-party device from the configuration data.
[0135] The configuration module 1302 is configured to start the second network protocol and configure the gateway module using the configuration data of the target third-party device.
[0136] In an embodiment of the present application, the target configuration data includes configuration data of multiple third-party devices; obtaining the configuration data of the target third-party device from the configuration data includes: determining whether the third-party device corresponding to the target configuration data is the last third-party device that needs to be configured; if so, determining that the current configuration data is the configuration data of the target third-party device; if not, using the object dictionary to parse the current configuration data to obtain the configuration data of the target third-party device.
[0137] In an embodiment of the present application, it also includes: the gateway module receives periodic input data from a third-party device; obtains configuration parameters of the periodic input data; and queries an updated object dictionary based on the configuration parameters of the periodic input data, so that the control module outputs the periodic input data based on the updated object dictionary.
[0138] In the embodiment of the present application, it also includes: obtaining an updated object dictionary from the control module, the updated object dictionary is updated according to the configuration parameter query of the periodic output data; obtaining the periodic output data from the updated object dictionary, and sending it to the third-party device.
[0139] In an embodiment of the present application, the third-party device includes N third-party devices, where N is a positive integer; the object dictionary includes N gateway configuration information arranged in a configuration order, N periodic input data formats arranged in a configuration order, and N periodic output data formats arranged in a configuration order; wherein the gateway configuration information is determined by a second network protocol and is used to configure a network between the gateway module and the third-party device; the periodic input data format and the periodic output data format are the same as the format specified by the first network protocol.
[0140] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0141] Fig.14 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig.14 As shown, the electronic device 14 of this embodiment includes: a processor 1401, a memory 1402, and a computer program 1403 stored in the memory 1402 and executable on the processor 1401. When the processor 1401 executes the computer program 1403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1401 executes the computer program 1403, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0142] The electronic device 14 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 14 may include, but is not limited to, a processor 1401 and a memory 1402. Those skilled in the art will appreciate that Fig.14 The electronic device 14 is merely an example and does not limit the electronic device 14 , and may include more or less components than those shown in the figure, or different components.
[0143] Processor 1401 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0144] The memory 1402 may be an internal storage unit of the electronic device 14, for example, a hard disk or memory of the electronic device 14. The memory 1402 may also be an external storage device of the electronic device 14, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 14. The memory 1402 may also include both an internal storage unit of the electronic device 14 and an external storage device. The memory 1402 is used to store computer programs and other programs and data required by the electronic device.
[0145] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0146] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0147] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A gateway module configuration method, It is characterized in that The method is executed by a control module and includes: Receiving an object dictionary from the configuration software, the object dictionary including sequentially stored configuration information of a plurality of third-party devices that need to be configured by a gateway module connected to the control module; Determining target configuration data, wherein the target configuration data includes configuration data of a third-party device that needs to be configured; The target configuration data is sent to a gateway module connected to the control module using a first network protocol, so that the gateway module completes a network configuration of a second network protocol based on the object dictionary and the target configuration data.
2. The method according to claim 1, It is characterized in that The method further comprises: The control module determines periodic output data; The object dictionary is updated using the configuration parameters of the periodic output data, so that the gateway module obtains the periodic output data from the updated object dictionary and sends the periodic output data to the third-party device.
3. The method according to claim 1, It is characterized in that The method further comprises: receiving an updated object dictionary from the gateway module, wherein the updated object dictionary is obtained by querying and updating the configuration parameters of the periodic input data obtained from the third-party device by the gateway module; The periodic input data is obtained from the updated object dictionary.
4. A gateway module configuration method, It is characterized in that The method is performed by a gateway module and includes: Acquire an object dictionary from the control module, the object dictionary including sequentially stored configuration information of a plurality of third-party devices that need to be configured by a gateway module connected to the control module; Acquire target configuration data from the control module using a first network protocol, wherein the target configuration data includes configuration data of a third-party device that needs to be configured; Obtaining configuration data of a target third-party device from the configuration data; The second network protocol is started, and the gateway module is configured using the configuration data of the target third-party device.
5. The method according to claim 4, It is characterized in that The target configuration data includes configuration data of a plurality of third-party devices; Obtaining configuration data of a target third-party device from the configuration data includes: Determining whether the third-party device corresponding to the target configuration data is the last third-party device that needs to be configured; If yes, determining that the current configuration data is the configuration data of the target third-party device; If not, the object dictionary is used to parse the current configuration data to obtain the configuration data of the target third-party device.
6. The method according to claim 4, It is characterized in that The method further comprises: The gateway module receives periodic input data from a third-party device; Obtaining configuration parameters of the periodic input data; An updated object dictionary is queried based on the configuration parameters of the periodic input data, so that the control module outputs the periodic input data based on the updated object dictionary.
7. The method according to claim 4, It is characterized in that The method further comprises: Acquire an updated object dictionary from the control module, wherein the updated object dictionary is obtained by querying and updating configuration parameters of periodic output data; The periodic output data is obtained from the updated object dictionary and sent to a third-party device.
8. The method according to any one of claims 1 to 6, It is characterized in that The third-party device includes N third-party devices, where N is a positive integer; The object dictionary includes N gateway configuration information arranged in a configuration order, N periodic input data formats arranged in a configuration order, and N periodic output data formats arranged in a configuration order; Wherein, the gateway configuration information is determined by a second network protocol and is used to configure a network between the gateway module and a third-party device; The periodic input data format and the periodic output data format are the same as the formats specified by the first network protocol.
9. A gateway module configuration device, It is characterized in that include: A receiving module is configured to receive an object dictionary from the control module self-configuration software, wherein the object dictionary includes sequentially stored configuration information of a plurality of third-party devices that need to be configured by a gateway module connected to the control module; A determination module is configured to determine target configuration data, wherein the target configuration data includes configuration data of a third-party device that needs to be configured; The communication module is configured to use the first network protocol to send the target configuration data to all gateway modules connected to the control module, so that the gateway modules that need to be configured complete the network configuration of the second network protocol based on the object dictionary and the target configuration data.
10. A gateway module configuration device, It is characterized in that include: An acquisition module is configured to acquire an object dictionary from the control module by the gateway module, wherein the object dictionary includes configuration information of a plurality of third-party devices stored in sequence and requiring configuration of the gateway module connected to the control module; The acquisition module is further configured to acquire target configuration data from the control module using a first network protocol, wherein the target configuration data includes configuration data of a third-party device that needs to be configured; The acquisition module is further configured to acquire configuration data of a target third-party device from the configuration data; The configuration module is configured to start the second network protocol and configure the gateway module using the configuration data of the target third-party device.
Citation Information
Cited By
Data interaction method and related device
CN121680208A
Data interaction method and related apparatus
CN121680208B
