Communication channel generation method and apparatus, electronic device, medium, and program product
By determining PLC type, programming language, and communication protocol, and generating encoders and decoders, a communication channel is established between PLCs and computing nodes, addressing integration challenges and enhancing PLC capabilities.
Patent Information
- Application Number
- PCT/CN2024/070882
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-05
- Publication Date
- 2025-07-10
AI Technical Summary
The integration of advanced technologies like artificial intelligence and cloud computing into programmable logic controllers (PLCs) is hindered by computing power limitations, preventing seamless communication and integration.
A method and apparatus for generating a communication channel between PLCs and other computing nodes by determining the PLC type, programming language, and communication protocol, and generating encoders and decoders to establish a communication channel based on these parameters, facilitating quick and convenient integration.
Enables efficient and rapid communication between PLCs and computing nodes, extending PLC functionality and reducing development costs by automating the integration process.
Smart Images

Figure CN2024070882_10072025_PF_FP_ABST
Abstract
Description
COMMUNICATION CHANNEL GENERATION METHOD AND APPARATUS, ELECTRONIC DEVICE, MEDIUM, AND PROGRAM PRODUCTTECHNICAL FIELD
[0001] Embodiments of this application mainly relate to the field of industrial automation, and in particular, to a communication channel generation method and apparatus, an electronic device, a medium, and a program product.BACKGROUND
[0002] With in-depth research and application of Industry 4.0, some technologies that require high computing power, such as artificial intelligence technologies, Internet of Things technologies, and cloud computing technologies, are more and more widely used in industrial automation systems. A programmable logic controller (PLC) is a digital computing operation electronic system specially designed for application in industrial environments, and is one of core units of an industrial automation system. However, due to limitations of computing power of the PLC, these new technologies cannot be directly integrated into the PLC.SUMMARY
[0003] Embodiments of this application provide a communication channel generation method and apparatus, an electronic device, a medium, and a program product. According to the embodiments of this application, a communication channel between a PLC and other computing nodes can be conveniently and quickly generated.
[0004] According to a first aspect, a communication channel generation method is provided, including: determining a PLC type, a programming language required by a computing node, and a name of a communication protocol between the PLC and the computing node; generating an encoder of the PLC and a decoder of the computing node through the PLC type and the programming language required by the computing node; and / or generating a decoder of the PLC and an encoder of the computing node; and establishing a communication channel corresponding to the communication protocol between the encoder of the PLC and the decoder of the computing node according to the name of the communication protocol; and / or establishing a communication channel corresponding to the communication protocol between the decoder of the PLC and the encoder of the computing node.
[0005] According to a second aspect, a communication channel application method is provided, including: determining a general configuration between a PLC and a computing node; and performing communication between the PLC and the computing node through the communication channel generated according to the first aspect according to the general configuration between the PLC and the computing node and a load configuration of an application service.
[0006] According to a third aspect, a communication channel generation apparatus is provided, including: a determining module, configured to determine a PLC type, a programming language required by a computing node, and a name of a communication protocol between the PLC and the computing node; a generating module, configured to generate an encoder of the PLC and a decoder of the computing node through the PLC type and the programming language required by the computing node; and / or generate a decoder of the PLC and an encoder of the computing node; and an establishing module, configured to establish a communication channel corresponding to the communication protocol between the encoder of the PLC and the decoder of the computing node according to the name of the communication protocol; and / or establish a communication channel corresponding to the communication protocol between the decoder of the PLC and the encoder of the computing node.
[0007] According to a fourth aspect, an electronic device is provided, including: at least one memory, configured to store computer-readable code; and at least one processor, configured to call the computer-readable code, to perform the steps of the method provided in the first aspect or the second aspect.
[0008] According to a fifth aspect, a computer-readable medium is provided. The computer-readable medium stores a computer-readable instruction, and the computer-readable instruction, when executed by a processor, enables the processor to perform the steps of the method provided in the first aspect or the second aspect.
[0009] According to a sixth aspect, a computer program product is provided. The computer program product is tangibly stored in a computer-readable medium, and includes a computer-executable instruction, and the computer-executable instruction, when executed, enables at least one processor to perform the steps of the method provided in the first aspect or the second aspect.BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The following accompanying drawings are only intended to give schematic illustrations and explanations of embodiments of this application, but are not intended to limit the scope of the embodiments of this application.
[0011] FIG. 1 is a schematic diagram of a communication channel generation method according to an embodiment of this application;
[0012] FIG. 2 is a schematic diagram of a communication channel application method according to an embodiment of this application;
[0013] FIG. 3 is a schematic diagram of a communication channel generation apparatus according to an embodiment of this application; and
[0014] FIG. 4 is a schematic diagram of an electronic device according to an embodiment of this application.
[0015] Descriptions of reference numerals 100: communication channel 101 to 103: method steps 200: communication channel generation method application method 201 and 202: method steps 31: determining module 32: generating module 33: establishing module 400: electronic device 401: processor 402: communication interface 403: memory 404: communication bus 405: programDETAILED DESCRIPTION
[0016] A subject described in this specification is discussed now with reference to exemplary implementations. It should be understood that, discussion of these implementations is merely intended to make a person skilled in the art better understand and implement the subject described in this specification, and is not intended to limit the protection scope of the claims, the applicability, or examples. Changes may be made to functions and arrangements of discussed elements without departing from the protection scope of the content of embodiments of this application. Various processes or components may be omitted, replaced, or added in each example according to requirements. For example, the described method may be performed according to a sequence different from the sequence described herein, and steps may be added, omitted, or combined. In addition, features described in some examples may also be combined in other examples.
[0017] As used in this specification, the term "include" and variants thereof represent open terms, and mean "include but is not limited to" . The term "based on" represents "at least partially based on" . The terms "one embodiment" and "an embodiment" represent "at least one embodiment" . The term "another embodiment" represents "at least one another embodiment" . The terms "first" , "second" , and the like may represent different objects or the same object. Other definitions may be included explicitly or implicitly below. Unless otherwise clearly specified, the definition of one term is consistent in the entire specification.
[0018] The following describes the embodiments of this application in detail with reference to accompanying drawings.
[0019] FIG. 1 is a schematic diagram of a communication channel generation method according to an embodiment of this application. As shown in FIG. 1, the communication channel generation method 100 includes:
[0020] Step 101: Determine a PLC type, a programming language required by a computing node, and a name of a communication protocol between the PLC and the computing node.
[0021] Optionally, the computing node is, for example, an edge device, an inference device, or a computer workstation.
[0022] Optionally, the name of the communication protocol between the PLC and the computing node is determined according to a configuration relationship between the PLC and the computing node. The configuration relationship includes: a type of a data line between the PLC and the computing node. If a Profibus chip or module is connected, a corresponding protocol is determined as a Profibus protocol.
[0023] Optionally, the PLC type may be queried through an interface of the PLC.
[0024] Step 102: Generate an encoder of the PLC and a decoder of the computing node according to the PLC type and the programming language required by the computing node; and / or generate a decoder of the PLC and an encoder of the computing node.
[0025] In an embodiment, after step 101, a name of communication data and a data type are determined. A programming language supported by the PLC type is then determined. According to the name of the communication data and the data type, the encoder of the PLC is generated through the programming language supported by the PLC type, and the decoder of the computing node is generated according to the programming language required by the computing node; and / or the decoder of the PLC is generated through the programming language supported by the PLC type, and the encoder of the computing node is generated according to the programming language required by the computing node.
[0026] Optionally, in automation system engineering software, a functional block corresponding to the encoder / decoder of the PLC is generated. In a development environment of an application program, source code, a library file, and / or an executable corresponding to the decoder / encoder of the computing node are generated. Communication between the PLC and the computing node is then established in a wired or wireless manner. In this manner, development costs can be greatly reduced, and it is convenient for a user to call relevant data in an application program on the PLC side or on the computing node side.
[0027] Step 103: Establish a communication channel corresponding to the communication protocol between the encoder of the PLC and the decoder of the computing node according to the name of the communication protocol; and / or establish a communication channel corresponding to the communication protocol between the decoder of the PLC and the encoder of the computing node.
[0028] Optionally, a corresponding communication protocol is determined from a preset communication protocol stack according to the name of the communication protocol.
[0029] According to this embodiment of this application, the encoder / decoder corresponding to the PLC / computing node is established based on the PLC type and the programming language corresponding to the computing node. The corresponding communication channel between the PLC and the computing node is then established according to the determined name of the communication protocol. A method of automatically establishing the communication channel between the PLC and the computing node is provided, to speed up a development cycle of a communication module. Functions of the PLC can be extended by adding other computing nodes.
[0030] FIG. 2 is a schematic diagram of a communication channel application method according to an embodiment of this application. As shown in FIG. 2, the communication channel application method 200 includes:
[0031] Step 201: Determine a general configuration between a PLC and a computing node.
[0032] Step 202: Perform communication between the PLC and the computing node through the communication channel generated in the embodiment of the foregoing communication channel generation method according to the general configuration between the PLC and the computing node and a load configuration of an application service.
[0033] The general configuration includes: a communication address and a communication subject. The load configuration of the application service includes: a name of required communication data and a data type.
[0034] Optionally, a user may input the general configuration and the load configuration of the application service on a preset graphical user interface. Optionally, a caller on the PLC end is an automation application, and a caller on the computing node end is an application program of the user.
[0035] According to this embodiment of this application, communication of relevant types of data can be conveniently and quickly implemented between the PLC and the computing node. This embodiment of this application can be practically used when an IT engineer intends to establish communication between an object detection-based artificial intelligent model inference server and the PLC, so that the inference server can send inference results to the PLC through a TCP protocol. When the PLC can use the inference results to control a motor and a conveyor belt, the IT engineer only needs to input a relevant configuration on the graphical user interface according to an application scenario, and then a corresponding effect can be implemented.
[0036] FIG. 3 is a schematic diagram of a communication channel generation apparatus according to an embodiment of this application. As shown in FIG. 3, the communication channel generation apparatus 30 includes:
[0037] a determining module 31, configured to determine a PLC type, a programming language required by a computing node, and a name of a communication protocol between a PLC and a computing node;
[0038] a generating module 32, configured to generate an encoder of the PLC and a decoder of the computing node according to the PLC type and the programming language required by the computing node; and / or generate a decoder of the PLC and an encoder of the computing node; and
[0039] an establishing module 33, configured to establish a communication channel corresponding to the communication protocol between the encoder of the PLC and the decoder of the computing node according to the name of the communication protocol; and / or establish a communication channel corresponding to the communication protocol between the decoder of the PLC and the encoder of the computing node.
[0040] According to this embodiment of this application, communication of relevant types of data can be conveniently and quickly implemented between the PLC and the computing node.
[0041] FIG. 4 is a schematic diagram of an electronic device according to an embodiment of this application. A specific implementation of the electronic device is not limited in a specific embodiment of this application. As shown in FIG. 4, the electronic device 400 may include: a processor 401, a communication interface 402, a memory 403, and a communication bus 404.
[0042] The processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.
[0043] The communication interface 402 is configured to communicate with other electronic devices or servers.
[0044] The processor 401 is configured to execute a program 405, and may specifically perform related steps in any method embodiment of the plurality of method embodiments.
[0045] Specifically, the program 405 may include program code, and the program code includes a computer operating instruction.
[0046] The processor 401 may be a CPU, or may be an application specific integrated circuit (ASIC) , or may be configured as one or more integrated circuits implementing the embodiments of this application. One or more processors included in a smart device may be processors of a same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0047] The memory 403 is configured to store the program 405. The memory 403 may include a high speed RAM memory, or may further include a non-volatile memory, for example, at least one disk memory.
[0048] The program 405 may be specifically configured to enable the processor 401 to execute any method in the plurality of method embodiments of the foregoing embodiments.
[0049] For specific implementations of steps in the program 405, refer to corresponding descriptions in corresponding steps and units in the embodiments of the communication channel generation method, and details are not described herein. A person skilled in the art may clearly understand that, for simple and clear description, for specific work processes of the described device and module, refer to corresponding process descriptions in the foregoing method embodiments, and details are not described herein again.
[0050] This application further provides a computer-readable storage medium, storing an instruction for causing a machine to perform any method in the plurality of method embodiments herein. Specifically, a system or an apparatus that is equipped with a storage medium may be provided. The storage medium stores software program code that implements functions of any embodiment of the foregoing embodiments, and a computer (or a CPU or an MPU) of the system or the apparatus is enabled to read and execute the program code stored in the storage medium.
[0051] In this case, the program code read from the storage medium can implement the functions in any one of the foregoing embodiments, and therefore, the program code and the storage medium for storing the program code constitute a part of this application.
[0052] Embodiments of the storage medium for providing the program code may include a floppy disk, a hard disk, a magneto-optical disk, an optical memory (such as a CD-ROM, a CD-R, a CD-RW, a DVD-ROM, a DVD-RAM, a DVD-RW, and a DVD+RW) , a magnetic tape, a non-volatile storage card, and a ROM. Optionally, the program code may be downloaded from a server computer through a communication network.
[0053] An embodiment of this application further provides a computer program product, including a computer program instruction, and the computer program instruction instructs a computing device to perform any corresponding operation in the plurality of method embodiments.
[0054] It should be noted that according to requirements of implementation, components / steps described in the embodiments of this application may be divided into more components / steps, or two or more components / steps or some operations of the components / steps may be combined into a new component / step, to implement an objective of the embodiments of this application.
[0055] The foregoing method according to the embodiments of this application may be implemented in hardware and firmware, or may be implemented as software or computer code that may be stored in a record medium (such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disc) , or may be implemented as computer code that is downloaded through a network and originally stored in a remote record medium or a non-transient machine-readable medium and is to be stored in a local record medium, so that the method described herein may be processed by software stored in a record medium that uses a general-purpose computer, a special-purpose processor, or a programmable or dedicate hardware (such as the ASIC or an FPGA) . It may be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code (such as a RAM, a ROM, or a flash memory) . When the software or the computer code is accessed and executed by the computer, the processor, or hardware, the method described herein is implemented. In addition, when the general-purpose computer accesses code used for implementing the method described herein, execution of the code converts the general-purpose computer into a special-purpose computer used for performing the method described herein.
[0056] It should be noted that, not all steps and modules in the procedures and system structural diagrams are necessary, some steps or modules may be omitted according to actual requirements. An execution sequence of the steps is not fixed and may be adjusted according to requirements. A system structure described in the embodiments may be a physical structure or a logical structure. That is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or may be implemented by some components in a plurality of independent devices together.
[0057] In the embodiments, hardware modules may be implemented mechanically or electrically. For example, a hardware module may include a permanent dedicated circuit or logic (for example, a dedicated processor, the FPGA or ASIC) to complete a corresponding operation. The hardware module may further include programmable logic or a circuit (for example a general-purpose processor or another programmable processor) , which may be temporarily set by software to complete a corresponding operation. A specific implementation (a mechanical manner, a dedicated permanent circuit, or a temporarily set circuit) may be determined based on costs and time considerations.
[0058] The present disclosure is shown and described in detail above by using the accompanying drawings and preferred embodiments. However, the present disclosure is not limited to these disclosed embodiments, a person skilled in the art may learn, based on the foregoing various embodiments, that more embodiments of the present disclosure can be obtained by combining the code review means in the foregoing various embodiments, and these embodiments are also within the protection scope of the present disclosure.
[0059] The nouns and pronouns used in this patent application with respect to a person are not limited to a specific gender.
Claims
1.A communication channel generation method, comprising:determining (101) a PLC type, a programming language required by a computing node, and a name of a communication protocol between the PLC and the computing node;generating (102) an encoder of the PLC and a decoder of the computing node through the PLC type and the programming language required by the computing node; and / or generating (102) a decoder of the PLC and an encoder of the computing node; andestablishing (103) a communication channel corresponding to the communication protocol between the encoder of the PLC and the decoder of the computing node according to the name of the communication protocol; and / or establishing (103) a communication channel corresponding to the communication protocol between the decoder of the PLC and the encoder of the computing node.2.The method according to claim 1, whereinafter the determining (101) a PLC type, a programming language required by a computing node, and a name of a communication protocol between the PLC and the computing node, the method further comprises:determining a name of communication data and a data type; andthe generating (102) an encoder of the PLC and a decoder of the computing node through the PLC type and the programming language required by the computing node; and / or generating (102) a decoder of the PLC and an encoder of the computing node comprises:determining a programming language supported by the PLC type; andaccording to the name of the communication data and the data type,generating the encoder of the PLC through the programming language supported by the PLC type, and generating the decoder of the computing node according to the programming language required by the computing node; and / orgenerating the decoder of the PLC through the programming language supported by the PLC type, and generating the encoder of the computing node according to the programming language required by the computing node.3.The method according to claim 1, wherein a corresponding communication protocol is determined from a preset communication protocol stack according to the name of the communication protocol.4.The method according to claim 1, wherein the determining (101) a name of a communication protocol between the PLC and the computing node comprises:determining, according to a configuration relationship between communication modules of the PLC and the computing node, the name of the communication protocol between the communication modules of the PLC and the computing node.5.A communication channel application method, comprising:determining (201) a general configuration between a PLC and a computing node; andperforming communication (202) between the PLC and the computing node through the communication channel generated according to claim 1 according to the general configuration between the PLC and the computing node and a load configuration of an application service.6.The method according to claim 5, whereinthe general configuration comprises:a communication address and a communication subject; andthe load configuration of the application service comprises:a name of required communication data and a data type.7.A communication channel generation apparatus, comprising:a determining module (31) , configured to determine a PLC type, a programming language required by a computing node, and a name of a communication protocol between the PLC and the computing node;a generating module (32) , configured to generate an encoder of the PLC and a decoder of the computing node through the PLC type and the programming language required by the computing node; and / or generate a decoder of the PLC and an encoder of the computing node; andan establishing module (33) , configured to establish a communication channel corresponding to the communication protocol between the encoder of the PLC and the decoder of the computing node according to the name of the communication protocol; and / or establish a communication channel corresponding to the communication protocol between the decoder of the PLC and the encoder of the computing node.8.An electronic device (400) , comprising: a processor (401) , a communication interface (402) , a memory (403) , and a communication bus (404) , wherein the processor (401) , the memory (403) , and the communication interface (402) communicate with each other through the communication bus (404) ; andthe memory (403) is configured to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the communication channel generation method according to any one of claims 1 to 4.9.A computer storage medium, storing a computer program, the program, when executed by a processor, implementing the communication channel generation method according to any one of claims 1 to 4.10.A computer program product, wherein the computer program product is tangibly stored in a computer-readable medium, and comprises a computer-executable instruction, and the computer-executable instruction, when executed, enables at least one processor to perform the communication channel generation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Batch reading method, batch writing method, corresponding devices for PLC (programmable logic controller) and system
CN110262370A
Data interaction method, device and system for AI reasoning equipment and automation controller
CN117136348A
PLC synchronous operation system
KR1020080062837A
Aspect-oriented programming based programmable logic controller (PLC) simulation
US20220291652A1