Method, device and equipment for transmitting message between configuration application and main controller, and medium

By encapsulating and transmitting asynchronous communication data for the configuration application of the PLC system and configuring the Ethernet communication channel for the slave communication module, the problem of not being able to directly debug the master controller during the installation and maintenance of the slave communication module is solved, and efficient remote access and data interaction are achieved.

CN120455451AActive Publication Date: 2025-08-08NINGBO HOLLYSHI INFORMATION SECURITY RES INST CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510453077.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-08-08
Estimated Expiration
2045-04-11

AI Technical Summary

Technical Problem

In the prior art, the installation and maintenance of slave communication modules in the PLC system cannot be directly debugged by the configuration application, resulting in low on-site installation and maintenance efficiency.

Method used

By configuring the Ethernet communication channel for the configuration application and the target slave communication module, the target slave communication module receives IP request messages and encapsulates them into asynchronous communication data. The main communication module notifies the main controller of the existence of asynchronous communication data through periodic data messages, realizing remote access to the main controller.

Benefits of technology

It improves the on-site installation and maintenance efficiency of slave communication modules, reduces communication costs, and realizes remote access to the main controller for configuration applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455451A_ABST
    Figure CN120455451A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial internet, and provides a message transmission method and device between a configuration application and a main controller, equipment and a medium. According to the method, an Ethernet communication channel is configured for a configuration application and a target slave communication module, the target slave communication module receives an IP request message sent by the configuration application, interaction data in the IP request message is packaged into asynchronous communication data, and a main communication module is informed of the current existence of the asynchronous communication data through a periodically transmitted data message. The main communication module obtains the asynchronous communication data and notifies the main controller of the current existence of the asynchronous communication module by setting the inter-board bus flag bit, so that the main controller obtains the asynchronous communication data from the main communication module, thereby realizing the remote access of the configuration application to the main controller through the slave communication module at a far end, and improving the efficiency of field operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial Internet technology, and in particular to a method, device, equipment and medium for transmitting messages between a configuration application and a main controller. Background Art

[0002] The PLC (Programmable Logic Controller) industrial fieldbus consists of a configuration application, a master controller, a master communication module, and slave communication modules. The configuration application and the master controller communicate via standard Ethernet, the master controller and the master communication module communicate via an inter-board bus, and the master communication module and the slave communication module communicate via real-time Ethernet, ensuring real-time data transmission.

[0003] Real-time Ethernet transmission between the master and slave communication modules is typically configured as shielded standard Ethernet to ensure data security. This configuration prevents on-site debugging and monitoring when installing or maintaining the slave communication modules. It requires additional staff at the master control station to access the PLC system for coordination, resulting in complex communication, high costs, and low installation and maintenance efficiency. Summary of the Invention

[0004] In view of this, an embodiment of the present application provides a method, device, equipment and medium for message transmission between a configuration application and a main controller to solve the problem in the prior art that when installing and maintaining a slave communication module on site, the configuration application cannot be used to directly debug the main controller, resulting in low efficiency.

[0005] In a first aspect of an embodiment of the present application, a method for transmitting messages between a configuration application and a master controller is provided, wherein the configuration application communicates with the master controller via standard Ethernet, the master controller communicates with a master communication module via an inter-board bus, and the master communication module communicates with at least one slave communication module via real-time Ethernet. The method comprises:

[0006] The target slave communication module receives an Internet Protocol (IP) request message sent by the configuration application; an Ethernet communication channel is provided between the configuration application and the target slave communication module; the target slave communication module is any one of the at least one slave communication module; and the IP request message includes at least interaction data;

[0007] The target slave communication module adds an asynchronous communication request flag to the data message reported to the master communication module this time, and encapsulates the interactive data in the IP request message as the first asynchronous communication data; the target slave communication module periodically reports the data message to the master communication module, and this data message is the first data message uploaded to the master communication module by the target slave communication module after receiving the IP request message;

[0008] In response to determining that a data message including an asynchronous communication request flag is received, the main communication module reads the first asynchronous communication data and sets the asynchronous request flag in an inter-board bus between the main communication module and the main controller;

[0009] In response to determining that the inter-board bus includes the asynchronous request flag, the main controller obtains first asynchronous communication data from the main communication module.

[0010] In some embodiments of the present application, encapsulating the interactive data in the IP request message into first asynchronous communication data includes:

[0011] Determine the type of the configuration application and the host controller, and determine the data type based on the type of the configuration application and the host controller;

[0012] Determine the gateway device address;

[0013] The data type, the gateway device address and the interactive data in the IP request message are encapsulated to obtain the first asynchronous communication data.

[0014] In some embodiments of the present application, the step of the main communication module reading the first asynchronous communication data includes: the main communication module reading the first asynchronous communication data through an asynchronous read command;

[0015] The step of setting an asynchronous request flag in the inter-board bus between the main communication module and the main controller includes: the main communication module setting the asynchronous request flag in a designated memory location in the inter-board bus between the main communication module and the main controller.

[0016] In some embodiments of the present application, after the main controller obtains the first asynchronous communication data, the method further includes:

[0017] The main controller determines the response data based on the interaction data in the first asynchronous communication data;

[0018] Encapsulate the response data to obtain the second asynchronous communication data;

[0019] The second asynchronous communication data also includes the data type and gateway device address in the first asynchronous communication data.

[0020] In some embodiments of the present application, after the main controller determines the second asynchronous communication data, the method further includes:

[0021] The main controller sends the second asynchronous communication data to the main communication module;

[0022] The master communication module calls the asynchronous write command of the real-time Ethernet to send the second asynchronous communication data to the target slave communication module;

[0023] The target slave communication module sends the second asynchronous communication data to the configuration application.

[0024] In some embodiments of the present application, the master communication module sends the second asynchronous communication data to the target slave communication module, including:

[0025] The main communication module parses the second asynchronous communication data;

[0026] In response to determining that the second asynchronous communication data is master controller and configuration application interaction data based on the data type of the second asynchronous communication data, the second asynchronous communication data is sent to the target slave communication module.

[0027] In some embodiments of the present application, the target sends the second asynchronous communication data from the communication module to the configuration application, including:

[0028] parsing the second asynchronous communication data from the communication module;

[0029] In response to determining that the second asynchronous communication data is interaction data between the main controller and the configuration application based on the data type in the second asynchronous communication data, obtaining the address of the configuration application from the communication module self-IP request message;

[0030] The target slave communication module sends the second asynchronous communication data to the address of the configuration application.

[0031] According to a second aspect of an embodiment of the present application, a device for transmitting messages between a configuration application and a main controller is provided. The configuration application and the main controller communicate via standard Ethernet. The main controller communicates with a master communication module via an inter-board bus. The master communication module communicates with at least one slave communication module via real-time Ethernet. The device includes: a configuration application, a main controller, a master communication module, and at least one slave communication module.

[0032] The at least one slave communication module includes a target slave communication module, the target slave communication module is any one of the at least one slave communication module, and an Ethernet communication channel is provided between the configuration application and the target slave communication module; the target slave communication module is configured to receive an Internet Protocol (IP) request message sent by the configuration application, the IP request message including at least interaction data;

[0033] The target slave communication module is further configured to add an asynchronous communication request flag to the data message reported to the master communication module this time, and encapsulate the interactive data in the IP request message as the first asynchronous communication data; the target slave communication module periodically reports the data message to the master communication module, and this data message is the data message uploaded to the master communication module for the first time after the target slave communication module receives the IP request message;

[0034] In response to determining that a data message including an asynchronous communication request flag is received, the main communication module is configured to read the first asynchronous communication data and set the asynchronous request flag in the inter-board bus between the main controller and the main communication module;

[0035] In response to determining that the inter-board bus includes the asynchronous request flag, the main controller is configured to obtain first asynchronous communication data from the main communication module.

[0036] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0037] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above method are implemented.

[0038] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application configure an Ethernet communication channel for the configuration application and the target slave communication module, the target slave communication module receives the IP request message sent by the configuration application, encapsulates the interactive data in the IP request message into asynchronous communication data, and notifies the main communication module of the current existence of asynchronous communication data through a periodically transmitted data message. The main communication module obtains the asynchronous communication data and notifies the main controller of the current existence of the asynchronous communication module by setting the inter-board bus flag, so that the main controller obtains the asynchronous communication data through the autonomous communication module, thereby realizing remote access of the configuration application to the main controller through the slave communication module at the remote end, thereby improving the efficiency of on-site operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.

[0040] Figure 1 It is a network topology diagram of a traditional PLC system based on real-time Ethernet bus.

[0041] Figure 2 This is a flow chart of a method for message transmission between a configuration application and a main controller provided in an embodiment of the present application.

[0042] Figure 3 It is a flow chart of a method for encapsulating interactive data in an IP request message into first asynchronous communication data provided in an embodiment of the present application.

[0043] Figure 4 This is a flow chart of another method for message transmission between a configuration application and a main controller provided in an embodiment of the present application.

[0044] Figure 5It is a flowchart of a method provided by an embodiment of the present application for a master communication module to send second asynchronous communication data to a target slave communication module.

[0045] Figure 6 This is a flowchart of a method for sending second asynchronous communication data from a communication module to a configuration application provided by an embodiment of the present application.

[0046] Figure 7 This is a network topology diagram of the PLC system provided in an embodiment of the present application.

[0047] Figure 8 This is a diagram of the message interaction between the configuration application and the main controller provided in an embodiment of the present application.

[0048] Figure 9 This is a schematic diagram of a message transmission device between a configuration application and a main controller provided in an embodiment of the present application.

[0049] Figure 10 Schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may 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 avoid obscuring the description of the present application with unnecessary detail.

[0051] A method and apparatus for message transmission between a configuration application and a main controller according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0052] As mentioned above, the PLC industrial fieldbus consists of a configuration application, a master controller, a master communication module, and a slave communication module. The configuration application and the master controller communicate via standard Ethernet, the master controller and the master communication module communicate via an inter-board bus, and the master communication module and the slave communication module communicate via real-time Ethernet to ensure real-time data transmission.

[0053] Figure 1 This is a traditional PLC system network topology diagram based on real-time Ethernet bus. Figure 1 As shown, the PLC system may include a configuration application deployed on a terminal device, a main controller, a main communication module, and a slave communication module.

[0054] The configuration application can be implemented by a configuration application program in the terminal device, which communicates with the main controller via a standard Ethernet interface. For example, the configuration application can communicate with Ethernet interface 2 in the main controller via Ethernet interface 3. The main controller may also include Ethernet interface 1. Ethernet interface 1 and Ethernet interface 2 are connected to the software control program module in the main controller to transmit received data to the software control program module for processing, or receive data processed by the software control program module.

[0055] The master controller and the master communication module can communicate via an inter-board bus. For example, the master controller can communicate via inter-board bus interface 3 and inter-board bus interface 4. The master communication module may also include a real-time Ethernet interface that connects to the real-time Ethernet interface of the slave communication module to establish a real-time Ethernet communication channel between the master and slave communication modules.

[0056] For example, the real-time Ethernet interface 1 of the master communication module can be connected to the real-time Ethernet interface 5 of a slave communication module, and the real-time Ethernet interface 2 of the master communication module can be connected to the real-time Ethernet interface 6 of a slave communication module. At the same time, the real-time Ethernet interfaces 1 and 2 of the master communication module can also be connected to each other, as can the real-time Ethernet interfaces 3 and 4 of the slave communication module, as well as the real-time Ethernet interfaces 5 and 6 of the slave communication module, and the real-time Ethernet interfaces 4 and 5 of the slave communication module.

[0057] The inter-board bus interface 4, real-time Ethernet interface 1, and real-time Ethernet interface 2 in the master communication module can all be connected to the software control program module in the master communication module to transmit received data to the software control program module for processing, or to receive data processed by the software control program module. Each real-time Ethernet interface in the slave communication module can also be connected to the software control program module of the slave communication module to transmit received data to the software control program module for processing, or to receive data processed by the software control program module.

[0058] exist Figure 1 In the PLC system shown, configuration applications must access the PLC system through the Ethernet interface on the master controller to perform operations such as data exchange, control, and monitoring. Furthermore, because one of the primary purposes of a PLC system is to ensure real-time data transmission, standard Ethernet collision detection is typically disabled at the real-time Ethernet bus layer. This means that direct transmission of IP packets is not supported at the real-time Ethernet bus layer. Furthermore, general-purpose switches are typically not present in the PLC system network, allowing the use of dedicated hubs with low forwarding latency.

[0059] The master and slave communication modules can use different functional modules based on different PLC system network settings. In one example, the master communication module can be a communication card module, and the slave communication module can be an IO (Input Output) gateway module. The communication card module and the IO gateway module are typically configured as a master-multiple slave system, where one communication card module is connected to multiple IO gateway modules, using a real-time Ethernet bus for data exchange. The real-time Ethernet bus can be, for example, a Powerlink bus or an EtherCAT bus.

[0060] That is, when the real-time Ethernet bus is a Powerlink bus, the communication card module can be a Powerlink master and the IO gateway module can be a Powerlink slave. When the real-time Ethernet bus is an EtherCAT bus, the communication card module can be an EtherCAT master and the IO gateway module can be an EtherCAT slave.

[0061] The main communication module can be configured together with the main controller on the main control backplane, and the two communicate via an inter-board bus, such as PCIE (Peripheral Component Interconnect Express). The IO gateway module can be configured on an extended IO backplane, which can also include multiple IO modules. The IO gateway module and IO modules communicate via an inter-board bus, such as DP (Decentralized Peripherals) bus.

[0062] This setup means that when workers are installing or maintaining the slave communication module on-site, they cannot directly connect the configuration application to the master controller for debugging and monitoring due to the long distance between the configuration application and the master controller. They need to have additional staff at the master controller to access the PLC system for coordination. This includes the master controller staff obtaining the interaction data configured in the configuration application from the on-site staff through other communication methods, manually inputting this interaction data into the master controller, and notifying the on-site staff of the response data generated by the master controller. This implementation method has high communication costs, making the installation and maintenance of the slave communication module inefficient.

[0063] In view of this, an embodiment of the present application provides a method for message transmission between a configuration application and a main controller, by configuring an Ethernet communication channel for the configuration application and the target slave communication module, the target slave communication module receives the IP request message sent by the configuration application, encapsulates the interactive data in the IP request message into asynchronous communication data, and notifies the main communication module of the current existence of asynchronous communication data through a periodically transmitted data message. The main communication module obtains the asynchronous communication data and notifies the main controller of the current existence of the asynchronous communication module by setting an inter-board bus flag, so that the main controller obtains the asynchronous communication data from the main communication module, thereby realizing remote access of the configuration application to the main controller through the slave communication module at the remote end, thereby improving the efficiency of on-site operations.

[0064] Figure 2 FIG. 1 is a flow chart of a method for transmitting messages between a configuration application and a main controller provided in an embodiment of the present application. Figure 2 As shown, the method includes the following steps:

[0065] In step S201, the target receives an Internet Protocol (IP) request message sent by a configuration application from a communication module.

[0066] An Ethernet communication channel is provided between the configuration application and the target slave communication module. The target slave communication module is any one of the at least one slave communication module. The IP request message includes at least interaction data.

[0067] In step S202, the target slave communication module adds an asynchronous communication request flag to the data message reported to the master communication module this time, and encapsulates the interactive data in the IP request message as first asynchronous communication data.

[0068] The target slave communication module periodically reports data messages to the master communication module. This data message is the first data message uploaded by the target slave communication module to the master communication module after receiving the IP request message.

[0069] In step S203 , in response to determining that a data message including an asynchronous communication request flag is received, the main communication module reads the first asynchronous communication data and sets the asynchronous request flag in the inter-board bus between the main communication module and the main controller.

[0070] In step S204 , in response to determining that the inter-board bus includes the asynchronous request flag, the main controller obtains first asynchronous communication data from the main communication module.

[0071] In some embodiments of the present application, the method may be performed by a PLC system, which may include a configuration application, a master controller, a master communication module, and at least one slave communication module. The configuration application and the master controller communicate via standard Ethernet, the master controller and the master communication module communicate via an inter-board bus, and the master communication module communicates with each slave communication module via real-time Ethernet.

[0072] When a slave communication module requires on-site installation or maintenance, an Ethernet channel can be established between the configuration application and at least one slave communication module at the installation or maintenance site. This Ethernet channel, for example, can be a standard Ethernet channel. In one example, an Ethernet interface of a terminal device hosting the configuration application can be connected to an Ethernet interface in a target slave communication module using a network cable to establish an Ethernet communication channel between the configuration application and the target slave communication module. The target slave communication module can be any one of the at least one slave communication module.

[0073] The configuration application can generate interactive data that needs to interact with the main controller, and encapsulate the interactive data in an IP (Internet Protocol) request message, and send it to the target slave communication module. The source address of the IP request message can be the address of the Ethernet interface connected to the target slave communication module in the configuration application, and the destination address can be the address of the Ethernet interface connected to the configuration application in the target slave communication module. The port number of the IP request message can be specified according to actual needs, and the interactive data can be filled in its message payload. Among them, the interactive data may include download data service data, viewing service data, operation service data, etc. that the configuration application interacts with the main controller.

[0074] After receiving the IP request message, the target slave communication module may add an asynchronous communication request flag to the data message currently being transmitted to the master communication module. This data message may be the first data message transmitted to the master communication module by the target slave communication module after receiving the IP request message. In other words, the target slave communication module periodically transmits data messages to the master communication module, and the first data message transmitted by the target slave communication module to the master communication module after receiving the IP request message is this data message.

[0075] A specific bit in a data message can be set as an asynchronous communication request flag. For example, the first byte in a data message can be set as the asynchronous communication request flag. After receiving the IP request message, the target slave communication module can set the first byte in the data message to enable the asynchronous communication request flag.

[0076] At the same time, after receiving the IP request message, the target slave communication module may also encapsulate the interactive data in the IP request message into the first asynchronous communication data.

[0077] The master communication module periodically receives data packets from each slave communication module. Upon receiving a data packet from a target slave communication module and determining that the value of an asynchronous communication request flag in the data packet is valid, the master communication module may obtain the first asynchronous communication data from the target slave communication module. Simultaneously, the master communication module may also set an asynchronous request flag in an inter-board bus between the master communication module and the main controller.

[0078] The master controller periodically checks the inter-board bus to determine whether the asynchronous request flag is set to valid. If so, the master controller retrieves the first asynchronous communication data from the autonomous communication module. This enables the configuration application to transmit interactive data to the master controller on-site via a slave controller, eliminating the need for remote manual transmission of interactive data by staff, significantly improving interaction efficiency.

[0079] According to the technical solution provided in the embodiment of the present application, an Ethernet communication channel is configured for the configuration application and the target slave communication module, the target slave communication module receives the IP request message sent by the configuration application, encapsulates the interactive data in the IP request message into asynchronous communication data, and notifies the main communication module of the current existence of asynchronous communication data through a periodically transmitted data message. The main communication module obtains the asynchronous communication data and notifies the main controller of the current existence of the asynchronous communication module by setting the inter-board bus flag, so that the main controller obtains the asynchronous communication data from the main communication module, thereby realizing remote access of the configuration application to the main controller through the slave communication module at the remote end, thereby improving the efficiency of on-site operations.

[0080] Figure 3 FIG. 1 is a flow chart of a method for encapsulating interactive data in an IP request message into first asynchronous communication data provided by an embodiment of the present application. Figure 3 As shown, the method includes the following steps:

[0081] In step S301 , the types of the configuration application and the host controller are determined, and the data type is determined based on the types of the configuration application and the host controller.

[0082] In step S302, the gateway device address is determined.

[0083] In step S303, the data type, the gateway device address and the interactive data in the IP request message are encapsulated to obtain first asynchronous communication data.

[0084] In some embodiments of the present application, encapsulating the interactive data in the IP request message as the first asynchronous communication data can be by determining the type of the configuration application and the main controller, and determining the data type based on the type of the configuration application and the main controller; determining the gateway device address; and encapsulating the data type, the gateway device address, and the interactive data in the IP request message to obtain the first asynchronous communication data.

[0085] In other words, the types of the configuration application and the main controller can be obtained and used to populate the data type field in the first asynchronous communication data to distinguish the data types of different asynchronous communications. At the same time, the device address field in the first asynchronous communication data can be populated with the gateway device address, such as the gateway's dial-up address, and the payload field in the first asynchronous communication data can be populated with the interaction data.

[0086] In some embodiments of the present application, the step of the master communication module reading the first asynchronous communication data may be that the master communication module reads the first asynchronous communication data using an asynchronous read command. Alternatively, the step of the master communication module setting an asynchronous request flag in an inter-board bus between the master communication module and the main controller may be that the master communication module sets the asynchronous request flag in a designated memory location in the inter-board bus between the master communication module and the main controller.

[0087] That is, the master communication module reads the first asynchronous communication data from the target slave communication module via an asynchronous read command. For example, if the master communication module and the slave communication module communicate via a POWERLINK bus, the asynchronous read command may be an asynchronous SDO read process of the POWERLINK.

[0088] At the same time, a specific memory location in the inter-board bus between the main communication module and the main controller can be designated as an asynchronous request flag. After obtaining the first asynchronous communication data, the main communication module can modify the value of the asynchronous request flag in the designated memory location and set it to a valid value.

[0089] Figure 4 This is a flow chart of another method for transmitting messages between a configuration application and a main controller provided by an embodiment of the present application. Figure 4 Steps S401 to S404 in the embodiment shown are similar to Figure 2 Steps S101 to S104 in the embodiment shown are basically the same and will not be described in detail here. Figure 4 As shown, the method further includes the following steps:

[0090] In step S405 , the main controller determines response data based on the interaction data in the first asynchronous communication data.

[0091] In step S406 , the main controller encapsulates the response data to obtain second asynchronous communication data.

[0092] The second asynchronous communication data also includes the data type and gateway device address in the first asynchronous communication data.

[0093] In some embodiments of the present application, after receiving the first asynchronous communication data, the main controller may determine response data based on the interaction data therein. For example, if the interaction data is downloading data service data, the interaction data may be used to perform an operation corresponding to the downloading data service and generate response data. For another example, if the interaction data is viewing service data, the interaction data may be used to perform an operation corresponding to the viewing service and generate response data. For another example, if the interaction data is operating service data, the interaction data may be used to perform an operation corresponding to the operating service and generate response data.

[0094] The master control server may encapsulate the response data to obtain the second asynchronous communication data, wherein encapsulating the response data may be to obtain the data type and gateway device address from the first asynchronous communication data, and encapsulate the data type, gateway device address and response data to obtain the second asynchronous communication data.

[0095] on the other hand, Figure 4 The illustrated embodiment further includes the following steps:

[0096] In step S407 , the main controller sends the second asynchronous communication data to the main communication module.

[0097] In step S408 , the master communication module invokes an asynchronous write command of the real-time Ethernet to send the second asynchronous communication data to the target slave communication module.

[0098] In step S409 , the target slave communication module sends second asynchronous communication data to the configuration application.

[0099] In some embodiments of the present application, after determining the second asynchronous communication data, the master controller may send the second asynchronous communication data to the master communication module via the inter-board bus. After receiving the second asynchronous communication data, the master communication module may invoke an asynchronous write command of real-time Ethernet, such as the asynchronous SDO write process of POWERLINK, to send the second asynchronous communication data to the target slave communication module. The target slave communication module sends the received second asynchronous communication data to the configuration application via the Ethernet communication channel, thereby completing a complete data exchange between the configuration application and the master controller.

[0100] Figure 5 FIG. 1 is a flow chart of a method for a master communication module to send second asynchronous communication data to a target slave communication module according to an embodiment of the present application. Figure 5 As shown, the method includes the following steps:

[0101] In step S501 , the main communication module parses the second asynchronous communication data.

[0102] In step S502 , in response to determining that the second asynchronous communication data is master controller and configuration application interaction data based on the data type of the second asynchronous communication data, the second asynchronous communication data is sent to a target slave communication module.

[0103] In certain embodiments of the present application, the master communication module sends the second asynchronous communication data to the target slave communication module by parsing the second asynchronous communication data; in response to determining that the second asynchronous communication data is interaction data between the master controller and the configuration application based on the data type in the second asynchronous communication data, the master communication module sends the second asynchronous communication data to the target slave communication module.

[0104] That is, after receiving the second asynchronous communication data sent by the master controller, the master communication module can parse the second asynchronous communication data and send the second asynchronous communication data to the target slave communication module if it is determined that the data types in the second asynchronous communication data include the master controller type and the configuration application type.

[0105] Figure 6 1 is a flow chart of a method for sending second asynchronous communication data from a communication module to a configuration application according to an embodiment of the present application. Figure 6 As shown, the method includes the following steps:

[0106] In step S601, the target slave communication module parses the second asynchronous communication data.

[0107] In step S602 , in response to determining that the second asynchronous communication data is interaction data between the master controller and the configuration application based on the data type in the second asynchronous communication data, the target slave communication module obtains the address of the configuration application from the IP request message.

[0108] In step S603 , the target slave communication module sends second asynchronous communication data to the address of the configuration application.

[0109] In certain embodiments of the present application, the target slave communication module sends the second asynchronous communication data to the configuration application. The target slave communication module parses the second asynchronous communication data; in response to determining that the second asynchronous communication data is interaction data between the main controller and the configuration application based on the data type in the second asynchronous communication data, the target slave communication module obtains the address of the configuration application from the IP request message; and the target slave communication module sends the second asynchronous communication data to the address of the configuration application.

[0110] That is, after the target slave communication module receives the second asynchronous communication data sent by the master communication module, it can parse the second asynchronous communication data. If it is determined that the data types in the second asynchronous communication data include the master controller type and the configuration application type, the address of the configuration application can be obtained from the message header parameters of the locally stored IP request message. For example, it can be determined that the source address of the IP request message is the address of the configuration application. Finally, the target slave communication module can send the second asynchronous communication data to the address of the configuration application.

[0111] Among them, the target slave communication module can temporarily store the IP request message locally after receiving it, and clear the IP request message after forwarding the second asynchronous communication data to the configuration application. Alternatively, the target slave communication module can also save multiple IP request messages locally and set an identifier for each IP request message. The second asynchronous communication data can carry an identifier that is identical to or corresponding to the IP request message corresponding to it. The target slave communication module can determine the corresponding IP request message based on the identifier of the second asynchronous communication data, and then determine the configuration application address.

[0112] Figure 7 This is the PLC system network topology diagram provided by the embodiment of this application. Figure 7 As shown in FIG, the PLC system may also include a configuration application deployed on a terminal device, a master controller, a master communication module, and a slave communication module. Among them, the network architecture between the master controller and the master communication module, the network architecture between the master communication module and each slave communication module and Figure 1 The same as in the embodiment shown, no further details will be given here.

[0113] An Ethernet communication channel can be established between the configuration application and the target slave communication module. For example, by connecting the Ethernet interface 3 in the configuration application to the Ethernet interface 5 in the slave communication module, an IP request message in the configuration application can be sent to the slave communication module. The slave communication module transmits the interactive data in the IP request message to the master communication module via the communication channel between its real-time Ethernet interface 6 and the real-time Ethernet interface 1 of the master communication module. The master communication module transmits this interactive data to the master controller via the communication channel between its inter-board communication interface 4 and the inter-board bus interface 3 in the master controller, thereby achieving remote communication between the configuration application and the master controller.

[0114] On the other hand, the master controller can also send response data to the configuration application in sequence through the master communication module and the slave communication module.

[0115] In other words, the configuration application can connect to the master controller through the Ethernet interface of any slave communication module to exchange IP messages. IP messages are encapsulated and transparently transmitted between the master and slave communication modules via real-time Ethernet, and between the master controller and the master communication module via the inter-board bus. The master controller processes the transparently transmitted IP request messages and responds. This enables data exchange between the configuration application and the master controller.

[0116] Figure 8 This is a diagram of the message interaction between the configuration application and the main controller provided in the embodiment of the present application. Figure 8 As shown, the Ethernet interface of the configuration application can be connected to the Ethernet interface of the slave communication module via a network cable. The interactive data that the configuration application needs to send to the master controller is encapsulated as an IP request message and sent by the configuration application to the slave communication module via the Ethernet. The IP request message may include a message header, which may include a source IP address, a destination IP address, and a port number. The source IP address may be the Ethernet interface of the configuration application, for example Figure 7 The Ethernet interface 3 in the embodiment shown. The destination IP address can be the Ethernet interface of the slave communication module, e.g. Figure 7 In the embodiment shown, the Ethernet interface port number may be a designated port number, and its payload may be filled with the interaction data.

[0117] The slave communication module can receive and parse the payload in the IP request message. If it determines, based on the port number, that the IP request message is sent by the configuration application, it sets an asynchronous communication request flag in the input data message reported periodically by the real-time Ethernet (e.g., at the first byte position). The slave communication module can also encapsulate the data type, gateway device address, and the payload of the IP request message (i.e., interaction data) to obtain the first asynchronous communication data, which is then read by the master communication module.

[0118] The master communication module periodically exchanges input and output data with each slave communication module. When the asynchronous communication request flag in the periodically reported input data message from the slave communication module is detected to be valid, the master module reads the first asynchronous communication data through an asynchronous read command and simultaneously sets the asynchronous request flag for the upper-level inter-board bus.

[0119] The main controller periodically checks whether an asynchronous request flag is present at a specified location on the inter-board bus. When the asynchronous request flag is present, the main controller reads first asynchronous communication data via the inter-board bus. The main controller parses the first asynchronous communication data and, if it determines that the data type is interactive data sent by the configuration application, performs corresponding processing and, after processing, encapsulates the data type, gateway device address, and response data into second asynchronous communication data, where the response data is the payload of the second asynchronous communication data.

[0120] The master controller may send the second asynchronous communication data to the master communication module. Upon detecting the presence of the asynchronous data sent by the master controller, the master communication module determines the configuration application type and the master controller type in the data type. If the data type meets the requirements, the master communication module sends the second asynchronous communication data to the slave communication module via an asynchronous write command of the real-time Ethernet.

[0121] After receiving the second asynchronous communication data sent from the communication module, the configuration application type and the main controller type in the data type are judged. If they meet the requirements, the second asynchronous communication data is sent to the configuration application through the Ethernet communication channel between the communication module and the configuration application in combination with the message header parameters of the locally stored IP request message frame.

[0122] The configuration application receives and processes the second asynchronous communication data, completing a data interaction between the configuration application and the main controller.

[0123] By adopting the technical solutions provided by the embodiments of this application, it is possible to install and maintain slave communication modules such as IO gateways on-site without having to travel back and forth between the configuration application and the master controller. Instead, the configuration application can directly access the master controller remotely from the IO gateway site, improving the efficiency of debugging and monitoring. Furthermore, the technical solutions provided by the embodiments of this application utilize the asynchronous data communication mechanism of real-time Ethernet to transparently transmit IP messages, enabling IP message transmission between the master and slave stations of real-time Ethernet without affecting the periodic data exchange of real-time Ethernet.

[0124] All of the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.

[0125] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0126] Figure 9 Schematic diagram of a message transmission device between a configuration application and a main controller provided in an embodiment of the present application. Figure 9 As shown, the apparatus includes a configuration application 901 , a master controller 902 , a master communication module 903 and at least one slave communication module 904 .

[0127] Among them, at least one slave communication module 904 includes a target slave communication module, the target slave communication module is any one of the at least one slave communication module, and an Ethernet communication channel is included between the configuration application 901 and the target slave communication module 904; the target slave communication module is configured to receive an Internet Protocol IP request message sent by the configuration application 901, and the IP request message at least includes interaction data.

[0128] The target slave communication module is also configured to add an asynchronous communication request flag in the data message reported to the main communication module this time, and encapsulate the interactive data in the IP request message as the first asynchronous communication data; the target slave communication module periodically reports data messages to the main communication module, and this data message is the data message that the target slave communication module uploads to the main communication module 903 for the first time after receiving the IP request message.

[0129] In response to determining that a data message including an asynchronous communication request flag is received, the main communication module 903 is configured to read the first asynchronous communication data and set the asynchronous request flag in the inter-board bus between the main controller and the main communication module.

[0130] In response to determining that the inter-board bus includes the asynchronous request flag, the main controller 902 is configured to obtain the first asynchronous communication data from the main communication module.

[0131] According to the technical solution provided in the embodiment of the present application, an Ethernet communication channel is configured for the configuration application and the target slave communication module, the target slave communication module receives the IP request message sent by the configuration application, encapsulates the interactive data in the IP request message into asynchronous communication data, and notifies the main communication module of the current existence of asynchronous communication data through a periodically transmitted data message. The main communication module obtains the asynchronous communication data and notifies the main controller of the current existence of the asynchronous communication module by setting the inter-board bus flag, so that the main controller obtains the asynchronous communication data from the main communication module, thereby realizing remote access of the configuration application to the main controller through the slave communication module at the remote end, thereby improving the efficiency of on-site operations.

[0132] In some embodiments, the interactive data in the IP request message is encapsulated as the first asynchronous communication data, including: determining the type of the configuration application and the main controller, and determining the data type based on the type of the configuration application and the main controller; determining the gateway device address; encapsulating the data type, the gateway device address and the interactive data in the IP request message to obtain the first asynchronous communication data.

[0133] In some embodiments, the step of the main communication module reading the first asynchronous communication data includes: the main communication module reading the first asynchronous communication data through an asynchronous read command; the step of the main communication module setting an asynchronous request flag in the inter-board bus between the main communication module and the main controller includes: the main communication module setting an asynchronous request flag in a designated memory location in the inter-board bus between the main communication module and the main controller.

[0134] In some embodiments, after the main controller obtains the first asynchronous communication data, it also includes: the main controller determines the response data based on the interaction data in the first asynchronous communication data; the main controller encapsulates the response data to obtain the second asynchronous communication data; wherein the second asynchronous communication data also includes the data type and gateway device address in the first asynchronous communication data.

[0135] In some embodiments, after the main controller determines the second asynchronous communication data, it also includes: the main controller sends the second asynchronous communication data to the main communication module; the main communication module calls the asynchronous write command of the real-time Ethernet to send the second asynchronous communication data to the target slave communication module; the target slave communication module sends the second asynchronous communication data to the configuration application.

[0136] In some embodiments, the master communication module sends the second asynchronous communication data to the target slave communication module, including: the master communication module parses the second asynchronous communication data; in response to determining that the second asynchronous communication data is interaction data between the master controller and the configuration application based on the data type in the second asynchronous communication data, the second asynchronous communication data is sent to the target slave communication module.

[0137] In some embodiments, the target slave communication module sends the second asynchronous communication data to the configuration application, including: the target slave communication module parses the second asynchronous communication data; in response to determining that the second asynchronous communication data is interaction data between the main controller and the configuration application based on the data type in the second asynchronous communication data, the target slave communication module obtains the address of the configuration application from the IP request message; the target slave communication module sends the second asynchronous communication data to the address of the configuration application.

[0138] 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 this application.

[0139] Figure 10 Schematic diagram of an electronic device provided in an embodiment of the present application. Figure 10 As shown, the electronic device 10 of this embodiment includes: a processor 1001, a memory 1002, and a computer program 1003 stored in the memory 1002 and executable by the processor 1001. When the processor 1001 executes the computer program 1003, the steps of the above-described method embodiments are implemented. Alternatively, when the processor 1001 executes the computer program 1003, the functions of the modules / units in the above-described device embodiments are implemented.

[0140] The electronic device 10 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 10 may include but is not limited to a processor 1001 and a memory 1002. Those skilled in the art will appreciate that Figure 10 The electronic device 10 is merely an example and does not limit the electronic device 10 . The electronic device 10 may include more or fewer components than shown in the figure, or different components.

[0141] The processor 1001 may 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.

[0142] Memory 1002 can be an internal storage unit of electronic device 10, such as a hard disk or memory of electronic device 10. Memory 1002 can also be an external storage device of electronic device 10, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on electronic device 10. Memory 1002 can also include both an internal storage unit of electronic device 10 and an external storage device. Memory 1002 is used to store computer programs and other programs and data required by the electronic device.

[0143] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by 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 units can be implemented in the form of hardware or in the form of software functional units.

[0144] 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. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0145] 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 various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for transmitting messages between a configuration application and a main controller, characterized in that: The configuration application communicates with the master controller via standard Ethernet, the master controller communicates with a master communication module via an inter-board bus, and the master communication module communicates with at least one slave communication module via real-time Ethernet; The method comprises: The target slave communication module receives an Internet Protocol (IP) request message sent by the configuration application; an Ethernet communication channel is provided between the configuration application and the target slave communication module, the target slave communication module is any one of the at least one slave communication module, and the IP request message includes at least interaction data; The target slave communication module adds an asynchronous communication request flag to the data message reported to the master communication module this time, and encapsulates the interactive data in the IP request message as the first asynchronous communication data; the target slave communication module periodically reports the data message to the master communication module, and this data message is the data message uploaded to the master communication module for the first time after the target slave communication module receives the IP request message; In response to determining that a data message including an asynchronous communication request flag is received, the main communication module reads the first asynchronous communication data and sets the asynchronous request flag in an inter-board bus between the main communication module and the main controller; In response to determining that the inter-board bus includes an asynchronous request flag, the main controller obtains the first asynchronous communication data from the main communication module.

2. The method according to claim 1, characterized in that Encapsulating the interactive data in the IP request message into first asynchronous communication data includes: Determining the types of the configuration application and the main controller, and determining the data type based on the types of the configuration application and the main controller; Determine the gateway device address; The data type, the gateway device address, and the interactive data in the IP request message are encapsulated to obtain the first asynchronous communication data.

3. The method according to claim 1, characterized in that The step of the main communication module reading the first asynchronous communication data includes: the main communication module reading the first asynchronous communication data through an asynchronous read command; The step of setting the asynchronous request flag in the inter-board bus between the main communication module and the main controller includes: the main communication module setting the asynchronous request flag in a designated memory location in the inter-board bus between the main communication module and the main controller.

4. The method according to claim 1, wherein After the main controller acquires the first asynchronous communication data, the method further includes: The main controller determines response data based on the interaction data in the first asynchronous communication data; The main controller encapsulates the response data to obtain second asynchronous communication data; The second asynchronous communication data also includes the data type and gateway device address in the first asynchronous communication data.

5. The method according to claim 4, characterized in that After the main controller determines the second asynchronous communication data, the method further includes: The main controller sends the second asynchronous communication data to the main communication module; The master communication module calls an asynchronous write command of the real-time Ethernet to send the second asynchronous communication data to the target slave communication module; The target sends the second asynchronous communication data from the communication module to the configuration application.

6. The method according to claim 5, characterized in that The master communication module sends the second asynchronous communication data to the target slave communication module, including: The main communication module parses the second asynchronous communication data; In response to determining that the second asynchronous communication data is master controller and configuration application interaction data based on a data type in the second asynchronous communication data, the second asynchronous communication data is sent to the target slave communication module.

7. The method according to claim 5, characterized in that The target slave communication module sends the second asynchronous communication data to the configuration application, including: The target slave communication module parses the second asynchronous communication data; In response to determining that the second asynchronous communication data is interaction data between the master controller and the configuration application based on a data type in the second asynchronous communication data, the target slave communication module obtains an address of the configuration application from the IP request message; The target slave communication module sends the second asynchronous communication data to the address of the configuration application.

8. A message transmission device between a configuration application and a main controller, characterized in that: The configuration application communicates with the master controller via standard Ethernet, the master controller communicates with a master communication module via an inter-board bus, and the master communication module communicates with at least one slave communication module via real-time Ethernet; The apparatus includes a configuration application, a master controller, a master communication module, and at least one slave communication module; The at least one slave communication module includes a target slave communication module, the target slave communication module is any one of the at least one slave communication module, and an Ethernet communication channel is included between the configuration application and the target slave communication module; The target slave communication module is configured to receive an Internet Protocol (IP) request message sent by the configuration application, wherein the IP request message includes at least interaction data; The target slave communication module is further configured to add an asynchronous communication request flag to the data message reported to the master communication module this time, and encapsulate the interactive data in the IP request message as first asynchronous communication data; the target slave communication module periodically reports data messages to the master communication module, and this data message is the data message uploaded to the master communication module for the first time after the target slave communication module receives the IP request message; In response to determining that a data message including an asynchronous communication request flag is received, the main communication module is configured to read the first asynchronous communication data and set the asynchronous request flag in an inter-board bus between the main controller and the main communication module; In response to determining that the inter-board bus includes an asynchronous request flag, the master controller is configured to obtain the first asynchronous communication data from the master communication module.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Control data communication method and device, storage medium and electronic equipment

    CN117879980A

  • Industrial control data transmission method and industrial control bus communication architecture

    CN119596814A

  • Method for asynchronous data communication in a real-time capable ethernet data network

    US20170099351A1

  • Method and apparatus for implementing communication between nodes, and electronic device

    WO2019227891A1