Data transmission method and device, equipment, storage medium and program product

By using the Hermes communication standard and preset functional component collection in the PLC device, data transmission between PLC devices is directly realized, which solves the problems of waste of resources and low efficiency caused by external computer devices, and realizes efficient data transmission.

CN119254788APending Publication Date: 2025-01-03PHOENIX CONTACT NANJING R&D ENG CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411172769.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, data transmission between PLC devices in surface mount production lines requires external computer equipment, resulting in waste of equipment resources and low transmission efficiency.

Method used

Using the Hermes communication standard, data transmission between PLC devices is directly realized by calling upstream and downstream functional components in the preset functional components set in the PLC device without the need for external transfer hardware devices.

Benefits of technology

Save equipment resources, improve data transmission efficiency, and realize direct data transmission between upstream and downstream PLC devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254788A_ABST
    Figure CN119254788A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, equipment, a storage medium and a program product. The method is applied to data processing technology. The method comprises the following steps: receiving a target data acquisition instruction sent by downstream PLC equipment based on a first type of upstream functional component; the first type of upstream functional components are components which are called in a preset functional component set in advance and are associated with upstream PLC equipment, and are used for executing receiving related actions of the upstream PLC equipment; the set comprises multiple types of upstream functional components and multiple types of downstream functional components; the functional components are determined based on a preset communication protocol underlying library according to a preset standard; obtaining upstream target data according to the target data obtaining instruction, and calling a second type of upstream function component in a preset function component set; the second-class upstream functional component is used for executing related sending actions of the upstream PLC equipment; and sending the upstream target data to downstream PLC equipment based on the second type upstream functional component. Equipment resources are saved, and data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data transmission method, device, equipment, storage medium and program product. Background Art

[0002] With the continuous development of surface mount technology and data processing technology, it is necessary to use multiple PLC (Programmable Logic Controller) devices in the surface mount production line to realize the automated production of circuit boards. This requires communication connections between the PLC devices on the production line and data transmission based on the communication connection.

[0003] When data is transmitted between the PLC devices in the current surface mount production line, a computer device is generally installed externally for each PLC device in advance, and then based on commonly used industrial communication protocols, such as the OPC (OLE for Process Control) communication protocol, the upstream PLC device sends the data to the corresponding computer device, and the corresponding computer device converts the data into the format required by the surface mount industry standard protocol, and sends the converted data to the corresponding computer device of the downstream PLC device, thereby transmitting the data to the downstream PLC device and realizing data transmission between the PLC devices.

[0004] However, this data transmission method requires an external computer device for each PLC device, which wastes device resources, and data transmission through other media will result in low transmission efficiency. Summary of the invention

[0005] The present application provides a data transmission method, apparatus, device, storage medium and program product to solve the technical problems in the prior art of wasting device resources and low transmission efficiency caused by transmission through other media.

[0006] In a first aspect, the present application provides a data transmission method, the method comprising: receiving a target data acquisition instruction sent by a downstream PLC device based on a first type of upstream functional component; the first type of upstream functional component is a component associated with an upstream PLC device that is pre-called in a preset functional component set and is used to perform a reception-related action of the upstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard;

[0007] Acquire upstream target data according to the target data acquisition instruction, and call a second type of upstream functional component in a preset functional component set; the second type of upstream functional component is used to execute a sending-related action of an upstream PLC device;

[0008] The upstream target data is sent to a downstream PLC device based on the second type of upstream functional components.

[0009] In a second aspect, the present application provides a data transmission method, the method comprising: sending a target data acquisition instruction to an upstream PLC device based on a second type of downstream functional component; the target data acquisition instruction is used to instruct the upstream PLC device to acquire upstream target data; the second type of downstream functional component is a component of an associated downstream PLC device that is pre-called in a preset functional component set and is used to execute a sending-related action of the downstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard;

[0010] Calling a first type of downstream functional component in the preset functional component set; the first type of downstream functional component is used to perform reception-related actions of a downstream PLC device;

[0011] Receive upstream target data sent by an upstream PLC device based on the first type of downstream functional components.

[0012] In a third aspect, the present application provides a data transmission device, including: a receiving module, for receiving a target data acquisition instruction sent by a downstream PLC device based on a first type of upstream functional component; the first type of upstream functional component is a component of an associated upstream PLC device that is pre-called in a preset functional component set, and is used to perform reception-related actions of the upstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard;

[0013] An acquisition module, used for acquiring upstream target data according to the target data acquisition instruction;

[0014] A calling module, used to call a second type of upstream functional component in a preset functional component set; the second type of upstream functional component is used to execute a sending-related action of an upstream PLC device;

[0015] A sending module is used to send the upstream target data to a downstream PLC device based on the second type of upstream functional components.

[0016] In a fourth aspect, the present application provides a data transmission device, the device comprising: a sending module, used to send a target data acquisition instruction to an upstream PLC device based on a second type of downstream functional component; the target data acquisition instruction is used to instruct the upstream PLC device to acquire upstream target data; the second type of downstream functional component is a component of an associated downstream PLC device that is pre-called in a preset functional component set, and is used to execute a sending-related action of the downstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard;

[0017] A calling module, used to call a first type of downstream functional component in the preset functional component set; the first type of downstream functional component is used to perform reception-related actions of a downstream PLC device;

[0018] A receiving module is used to receive upstream target data sent by an upstream PLC device based on the first type of downstream functional components.

[0019] In a fifth aspect, the present application provides an upstream PLC device, comprising: a processor, a memory and a transceiver communicatively connected to the processor;

[0020] The memory stores computer-executable instructions; the transceiver is used to send and receive data;

[0021] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.

[0022] In a sixth aspect, the present application provides a downstream PLC device, comprising: a processor, a memory and a transceiver communicatively connected to the processor;

[0023] The memory stores computer-executable instructions; the transceiver is used to send and receive data;

[0024] The processor executes the computer-executable instructions stored in the memory to implement the method according to the second aspect.

[0025] In a seventh aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the methods described in the first and second aspects.

[0026] In an eighth aspect, the present application provides a computer program product, including a computer program, which implements the methods described in the first and second aspects when executed by a processor.

[0027] The data transmission method, device, equipment, storage medium and program product provided by the present application have the following beneficial effects:

[0028] 1. It has the function of realizing data transmission between upstream and downstream PLC devices based on the Hermes communication standard;

[0029] 2. Enable direct data transmission between upstream and downstream PLC devices without the need for external transfer hardware, saving equipment resources and improving transmission efficiency;

[0030] 3. Enable upstream and downstream PLC devices to execute various calling behaviors based on various functional components, further improving the efficiency of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0032] Figure 1a A schematic diagram of data transmission in the prior art;

[0033] Figure 1b A schematic diagram of the data transmission method provided by this application;

[0034] Figure 1c A schematic diagram of the communication connection between the upstream and downstream PLC devices provided in this application;

[0035] Figure 1d An application scenario diagram of a data transmission method provided by an embodiment of the present application;

[0036] Figure 2a A flowchart of a data transmission method provided in one embodiment of the present application;

[0037] Figure 2b A schematic diagram of implementing data transmission by calling each functional component in a preset functional component set provided by the present application;

[0038] Figure 3 A flowchart of a data transmission method provided by another embodiment of the present application;

[0039] Figure 4 A flowchart of a data transmission method provided in another embodiment of the present application;

[0040] Figure 5 A flowchart of a data transmission method provided in yet another embodiment of the present application;

[0041] Figure 6 A signaling interaction diagram of a data transmission method provided in an embodiment of the present application;

[0042] Figure 7 A schematic diagram of the structure of a data transmission device provided in one embodiment of the present application;

[0043] Figure 8 A schematic diagram of the structure of a data transmission device provided in another embodiment of the present application;

[0044] Fig. 9 A schematic diagram of the structure of an upstream PLC device provided in an embodiment of the present application;

[0045] Fig.10 A schematic diagram of the structure of a downstream PLC device provided in one embodiment of the present application.

[0046] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0048] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0049] First, the terms involved in this application are explained:

[0050] Upstream PLC equipment: refers to the PLC equipment that serves as the service end during the production line process.

[0051] Downstream PLC equipment: refers to the PLC equipment that acts as the client during the production line process.

[0052] Among them, PLC equipment refers to automated production equipment controlled by PLC, such as printing machines, placement machines, welding machines, etc.

[0053] It should be noted that the description of "upstream" or "downstream" of a PLC device is determined according to the specific needs of the PLC device to send or receive data. In actual applications, when a PLC device acts as a server, it is an upstream PLC device, and when a PLC device acts as a client, it is a downstream PLC device.

[0054] That is to say, each PLC device can be either an upstream PLC device or a downstream PLC device, and this application does not limit this.

[0055] Hermes communication protocol underlying library: refers to the underlying library developed based on the IPC-HERMES-9852 standard communication protocol. The IPC-HERMES-9852 standard communication protocol is an open protocol based on TCP / IP and XML designed for surface mount technology (SMT) assembly lines, which can achieve efficient transmission, circulation and tracking of complex data between machines.

[0056] IEC-61131 standard: refers to the international standard for industrial control system programming, which provides a unified method to write and organize control system programs.

[0057] IPC-SMEMA-9851 standard communication protocol: refers to the communication protocol widely used between surface mount devices, which can realize the transmission of simple digital signals between machines, such as switch status information.

[0058] OPC communication protocol: OLE for Process Control communication protocol, OLE for process control. It refers to the communication protocol based on Microsoft's OLE (Object Linking and Embedding) technology, which can realize data transmission between different devices and software.

[0059] In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail.

[0060] At present, when data is transmitted between various PLC devices, generally a computer device is installed in advance for each PLC device, and data transmission between various PLC devices is realized based on each computing device. Specifically, Figure 1aAs shown, when data needs to be transmitted between PLC devices, the upstream PLC device first sends data to the corresponding computer device based on a common industrial communication protocol, such as the OPC communication protocol, and then the corresponding computer device converts the data into the format required by the surface mount industry standard protocol, and forwards the converted data to the corresponding computer device of the downstream PLC device, so that the corresponding computer device of the downstream PLC device sends the data to the downstream PLC device. When transmitting complex data, each PLC device needs to have an external computer device, which wastes equipment resources, and transmission through other media will result in low transmission efficiency.

[0061] However, with the development of surface mount technology and the intelligent development of the electronics industry, the current surface mount production line has put forward higher requirements for the efficient transmission of data. IPC-Hermes-9852, as a new generation of communication standards, has begun to be widely used in the current surface mount production line. It can not only transmit complex types of data, but also realize continuous tracking of circuit boards in the surface mount production line and optimize the data interaction and management functions between PLC devices.

[0062] Based on this, when facing the technical problems in the prior art, in order to save equipment resources and improve transmission efficiency, instead of installing an external computer device for each PLC device and using the common industrial communication protocol for each computer device to forward data between the PLC devices, a Hermes communication protocol underlying library including upstream programs and downstream programs is developed in advance on the PLCnext platform using conventional programming languages ​​according to the IPC-Hermes-9852 communication standard, and the data of the corresponding input and output ports of the upstream and downstream programs are mapped and processed, and then based on the processing results, the data of the corresponding input and output ports of the upstream and downstream programs are encapsulated in functional blocks according to the IEC-61131 standard, to obtain a functional block library including multiple types of upstream functional blocks and multiple types of downstream functional blocks. Then, if Figure 1bAs shown, when each PLC device needs to transmit data, the upstream PLC device and the downstream PLC device respectively call the corresponding upstream function block and the corresponding downstream function block in the function block library. When the upstream PLC device completes the corresponding processing of the product, the upstream function block for sending data is used to send a data preparation instruction to the downstream PLC device. At the same time, the downstream PLC device uses the downstream function block for receiving data to receive the above data preparation instruction, and uses the downstream function block for sending data to send a data acquisition instruction to the upstream PLC device. Correspondingly, the upstream PLC device uses the upstream function block for receiving data to receive the above data acquisition instruction, and uses the upstream function block for sending data to send the upstream data to the downstream PLC device. In this way, the import and export operation requirements between each PLC device are completed, and the data transmission between each PLC device is realized, so that there is no need to transmit through an external computer device, saving equipment resources and improving transmission efficiency.

[0063] Figure 1c The application scenario diagram of the data transmission method provided by an embodiment of the present application is shown in FIG1. ​​The system corresponding to the data transmission method in the embodiment of the present application includes: an upstream PLC device 1 and a downstream PLC device 2. The upstream PLC device 1 and the downstream PLC device 2 are connected via a transmission control protocol TCP server, such as Figure 1d As shown. First, the R&D personnel load the preset function component set into each PLC device in advance. Then, for the target data generated by each PLC device that is continuously superimposed during the operation of the production line, the downstream PLC device 2 calls the second type of downstream function component in the loaded preset function component set, that is, the component used to execute the sending-related actions of the downstream PLC device, and sends the target data acquisition instruction to the upstream PLC device 1 based on the component. The upstream PLC device 1 calls the first type of upstream function component in the loaded preset function component set, that is, the component used to execute the receiving-related actions of the upstream PLC device, and receives the above-mentioned target data acquisition instruction based on the component. Then, the upstream PLC device 1 obtains the upstream target data according to the instruction, and calls the second type of upstream function component in the loaded preset function component set, that is, the component used to execute the sending-related actions of the upstream PLC device, and sends the upstream target data to the downstream PLC device 2 based on the component. The downstream PLC device 2 calls the first type of downstream functional component in the loaded preset functional component set, that is, it is used to perform the reception-related actions of the downstream PLC device, and receives the above-mentioned upstream target data based on the component. Among them, the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components. The multiple types of upstream functional components and multiple types of downstream functional components are determined based on the preset communication protocol underlying library according to the preset standard.

[0064] The data transmission method provided in this application is intended to solve the above technical problems in the prior art.

[0065] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0066] Figure 2a A flowchart of a data transmission method provided in an embodiment of the present application is shown in FIG. Figure 2a As shown, the execution subject of this solution is a data transmission device, which is specifically located in the upstream PLC device. Then this embodiment specifically includes the following steps:

[0067] S201, receiving a target data acquisition instruction sent by a downstream PLC device based on a first type of upstream functional component. The first type of upstream functional component is a component of an associated upstream PLC device that is pre-called in a preset functional component set and is used to perform reception-related actions of the upstream PLC device. The preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components. The multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard.

[0068] The target data acquisition instruction is an instruction for requesting to acquire the target data.

[0069] Among them, the first type of upstream functional component is a component that receives the data to be transmitted based on the upstream PLC device, and can be used to execute the reception-related actions of the upstream PLC device. Specifically, it is pre-called by the upstream PLC device in the preset functional component set. The reception-related action can specifically be: receiving product data acquisition instructions, etc.

[0070] It is understandable that for different upstream reception-related actions, there are corresponding first-class upstream functional components to perform. And the above examples for reception-related actions are only examples and should not constitute any limitation to this application.

[0071] The preset functional component set is a set of multiple upstream functional components and multiple downstream functional components determined in advance according to preset standards based on the preset communication protocol underlying library. The preset communication protocol underlying library is a underlying library developed by R&D personnel in accordance with the preset communication protocol in advance, using conventional programming languages ​​according to the data transmission requirements between upstream and downstream PLC devices. The preset standard is a standard for converting upstream and downstream related programs in the preset communication protocol underlying library into functional components adapted to PLC.

[0072] Optionally, the preset communication protocol underlying library may be a Hermes communication protocol underlying library, and then the preset communication protocol is the IPC-HERMES-9852 standard communication protocol.

[0073] Optionally, the preset standard may be the IEC-61131 standard.

[0074] Optionally, the conventional programming language may be the C++ programming language.

[0075] The following is a detailed description of the process of determining multiple types of upstream functional components and multiple types of downstream functional components according to preset standards based on the preset communication protocol underlying library to form a preset functional component set:

[0076] First, the R&D personnel use the C++ programming language in the corresponding operation interface of the terminal equipped with the PLCnext platform, follow the IPC-HERMES-9852 standard communication protocol, and develop according to the data transmission requirements between upstream and downstream PLC devices to obtain a preset communication protocol underlying library containing upstream programs and downstream programs. Among them, the upstream program contains multiple upstream-related message data interfaces specified by the IPC-Hermes-9852 standard communication protocol, and the downstream program contains multiple downstream-related message data interfaces specified by the IPC-Hermes-9852 standard communication protocol. The message data interface is the interface used for data communication between different systems.

[0077] Then, the upstream program and downstream program in the preset communication protocol underlying library are imported into the PLCnext platform, and the upstream program and downstream program are instantiated using the C++ programming language, that is, the message data interface involved in the upstream program and downstream program is developed as a real-time task. According to the definition of each message data interface related to the upstream and downstream, the corresponding PLC variables are defined, and the association is established between the corresponding real-time task and the corresponding PLC variable to complete the data mapping. Among them, the PLC variables are used to store the input and output data related to the upstream program and the downstream program.

[0078] Finally, the IEC61131-3 standard is used to standardize the above-mentioned data mapping results and obtain the functional components corresponding to the upstream program and the downstream program, so as to determine the functional components corresponding to the upstream program as multiple categories of upstream functional components, and determine the functional components corresponding to the downstream program as multiple categories of downstream functional components, and determine the set formed by the above multiple categories of upstream functional components and multiple categories of downstream functional components as a preset functional component set.

[0079] It can be understood that since the preset functional component set obtained through the above steps includes multiple types of upstream functional components and multiple types of downstream functional components, and for each upstream functional component and each downstream functional component, it includes a message data interface to be returned when triggered and a message data interface to be returned when received, and each message data interface is developed based on the IPC-HERMES-9852 standard communication protocol. Therefore, each PLC device can subsequently realize data transmission by calling each functional component in the preset functional component set.

[0080] In order to more clearly describe the above process of implementing data transmission by calling each functional component in the preset functional component set, Figure 2b The process is further explained. Figure 2b As shown, for the calling tasks that are performed cyclically based on a preset set of functional components in the surface mount production line, the corresponding returned message data interface can be obtained from the program management library when triggered based on the association between each real-time task and the corresponding PLC variable in the global variable space GDS provided by the PLCnext platform, so as to realize data transmission based on the message data interface.

[0081] Based on this, R&D personnel can load the determined set of preset functional components into each PLC device in advance, and the upstream PLC device can call the first type of upstream functional components corresponding to the upstream program based on the loaded set of preset functional components, so as to be ready to receive the target data acquisition instructions sent by the downstream PLC device. Then, when the downstream PLC device triggers the operation of sending the target data acquisition instructions to the upstream PLC device, the upstream PLC device receives the target data acquisition instructions sent by the downstream PLC device based on the interaction results between the global variable space of the PLCnext platform and the current calling task.

[0082] The current calling task is the task of calling the functional component currently in progress.

[0083] It can be understood that, for the above-mentioned process of receiving the target data acquisition instruction sent by the downstream PLC device based on the first-type upstream functional component, the current calling task is the task of calling the first-type upstream functional component currently being performed.

[0084] S202: Acquire upstream target data according to the target data acquisition instruction, and call the second type of upstream functional component in the preset functional component set. The second type of upstream functional component is used to execute the sending-related actions of the upstream PLC device.

[0085] The upstream target data is the data generated by the upstream PLC device.

[0086] For example, if the upstream PLC device is a printing press, and the printing press performs corresponding processing on the product, the upstream target data can be data related to the product status and data related to the production line status detected when the printing press processes the product, such as product name, product weight, product length, product width, equipment specifications, etc.

[0087] Among them, the second type of upstream functional components are components that send the data to be transmitted based on the upstream PLC device, and can be used to execute sending-related actions of the upstream PLC device. The sending-related actions can specifically be: sending product data, sending equipment data, etc.

[0088] It is understandable that for different upstream sending-related actions, there are corresponding second-type upstream functional components to perform. And the above examples for sending-related actions are only examples and should not constitute any limitation to this application.

[0089] In this embodiment, after receiving the target data acquisition instruction sent by the downstream PLC device, the upstream PLC device obtains the prepared upstream target data based on the result of the received instruction, and calls the second type of upstream functional component in the loaded preset functional component set.

[0090] S203. Send the upstream target data to the downstream PLC device based on the second type of upstream functional components.

[0091] In this embodiment, after calling the second type of upstream functional component, the upstream target data is sent to the downstream PLC device based on the interaction result between the global variable space of the PLCnext platform and the current calling task.

[0092] Similarly, for the above-mentioned process of sending the upstream target data to the downstream PLC device based on the second-type upstream functional component, the current calling task is the task of calling the second-type upstream functional component currently in progress.

[0093] The data transmission method provided in this embodiment is based on a first-type upstream functional component receiving a target data acquisition instruction sent by a downstream PLC device; the first-type upstream functional component is a component of an associated upstream PLC device that is pre-called in a preset functional component set, and is used to execute reception-related actions of the upstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to preset standards; the upstream target data is acquired according to the target data acquisition instruction, and the second-type upstream functional component is called in the preset functional component set; the second-type upstream functional component is used to execute sending-related actions of the upstream PLC device; and the upstream target data is sent to the downstream PLC device based on the second-type upstream functional component. Since a preset functional component set including multiple types of upstream functional components and multiple types of downstream functional components is determined in advance according to preset standards based on the preset communication protocol underlying library, the upstream PLC device can receive the target data acquisition instruction sent by the downstream PLC device by calling the first type of upstream functional component in the preset functional component set in advance, that is, the component used to perform the receiving-related actions of the upstream PLC device, and can obtain the upstream target data according to the target data acquisition instruction, and by further calling the second type of upstream functional component in the preset functional component set, that is, the component used to perform the sending-related actions of the upstream PLC device, the upstream target data can be sent to the downstream PLC device based on the second type of upstream functional component. In this way, data transmission between upstream and downstream PLC devices is realized without the need for external computer equipment, saving equipment resources and improving transmission efficiency.

[0094] Figure 3 A flowchart of a data transmission method provided in another embodiment of the present application is shown in FIG. Figure 3 As shown, based on the above embodiment, this embodiment further refines the sending of upstream target data to downstream PLC devices based on the second type of upstream functional components. In this embodiment, when sending upstream target data to downstream PLC devices based on the second type of upstream functional components, the following steps are specifically included:

[0095] S301: Call a third type of upstream functional component in a preset functional component set. The third type of upstream functional component is used to execute encapsulation-related actions of an upstream PLC device.

[0096] Among them, the third type of upstream functional component is a component that converts the data format required for transmission based on the upstream PLC device, and can be used to perform packaging-related actions of the upstream PLC device. The packaging-related actions can specifically be: packaging product data, packaging equipment data, etc.

[0097] It is understandable that for different upstream packaging-related actions, there are corresponding third-type upstream functional components to perform. And the above examples for packaging-related actions are only examples and should not constitute any limitation to this application.

[0098] It is understandable that the upstream target data generated by the upstream PLC device may contain data in the format of fields, numbers, etc. Therefore, when the upstream target data is sent to the downstream PLC device based on the second type of upstream functional components, the data format of the upstream target data needs to be converted.

[0099] Based on this, in response to sending the upstream target data to the downstream PLC device based on the second-type upstream functional component, the third-type upstream functional component is called in the loaded preset functional component set.

[0100] S302: Use the third type of upstream functional component to encapsulate the upstream target data into a data packet that satisfies a preset communication protocol to obtain upstream target encapsulated data.

[0101] The upstream target encapsulated data is the upstream target data after the data format is converted.

[0102] The preset communication protocol is a communication protocol followed by the preset communication protocol underlying library.

[0103] Optionally, the preset communication protocol underlying library is a Hermes communication protocol underlying library, and the preset communication protocol is an IPC-HERMES-9852 standard communication protocol.

[0104] In this embodiment, based on calling the third type of upstream functional components and obtaining the upstream target data, the data format of the upstream target data is converted into the data format specified in the preset communication protocol, such as the xml format, based on the interaction results between the global variable space of the PLCnext platform and the current calling task, and a data packet that meets the preset communication protocol is obtained, and the data packet is determined as the upstream target encapsulated data.

[0105] It can be understood that, for the above-mentioned process of using the third-type upstream functional component to encapsulate the upstream target data into a data packet that satisfies the preset communication protocol, the current calling task is the task of calling the third-type upstream functional component currently being performed.

[0106] Among them, when the data format of the upstream target data is converted into the XML format based on the interaction result between the global variable space of the PLCnext platform and the current calling task, it can be specifically: based on the interaction between the global variable space of the PLCnext platform and the current calling task, the acquired upstream target data is loaded into an XML file, and the data is taken out from the XML file, and the data is formatted into XML format information.

[0107] It is understandable that during the conversion process, some force majeure factors, such as equipment abnormalities, may cause conversion abnormalities. Therefore, in order to ensure that the user can be informed of the abnormality in time, the above conversion process can be stored as a log file, so that the user can know the result of the conversion abnormality through the log file to ensure the normal operation of the production line.

[0108] S303. Send the upstream target encapsulated data to the downstream PLC device based on the second type of upstream functional component, so as to send the upstream target data to the downstream PLC device.

[0109] In this embodiment, after obtaining the upstream target encapsulation data, by calling the second type of upstream functional component, the upstream target encapsulation data can be sent to the downstream PLC device based on the interaction result between the global variable space of the PLCnext platform and the current calling task, thereby sending the upstream target data to the downstream PLC device.

[0110] The data transmission method provided in this embodiment, when sending the upstream target data to the downstream PLC device based on the second upstream functional component, calls the third upstream functional component in the preset functional component set; the third upstream functional component is used to perform the encapsulation-related actions of the upstream PLC device; the third upstream functional component is used to encapsulate the upstream target data into a data packet that meets the preset communication protocol to obtain the upstream target encapsulated data; the upstream target encapsulated data is sent to the downstream PLC device based on the second upstream functional component to send the upstream target data to the downstream PLC device. Since it is necessary to convert the format of the data to be transmitted according to the preset communication protocol, by calling the third upstream functional component used to perform the encapsulation-related actions of the upstream PLC device in the preset functional component set, the third upstream functional component can be used to encapsulate the upstream target data into a data packet that meets the preset communication protocol, thereby obtaining the upstream target encapsulated data, and by sending the upstream target encapsulated data to the downstream PLC device based on the second upstream functional component, the upstream target data can be smoothly sent to the downstream PLC device, thereby improving the success rate of data transmission.

[0111] As an optional embodiment, based on the embodiment corresponding to FIG. 2 , this embodiment further includes the following steps before the first-type upstream functional component receives the target data acquisition instruction sent by the downstream PLC device:

[0112] Step a1: Receive the production line PLC equipment operation instructions triggered by the production line personnel.

[0113] Among them, the production line personnel are the personnel responsible for managing each PLC device, and the production line PLC equipment operation instructions are instructions for instructing each PLC device on the production line to operate.

[0114] It can be understood that the upstream PLC device can send the upstream target data to the downstream PLC device on the premise that the upstream PLC device has prepared the upstream target data and the downstream PLC device knows that the upstream PLC device has prepared the upstream target data.

[0115] Based on this, the production line personnel can trigger the production line PLC equipment operation instructions through the corresponding operation interface of the terminal connected to each PLC device, or manually press the button of each PLC device to trigger the production line PLC equipment operation instructions. Then the upstream PLC device responds to the production line PLC equipment operation instruction being triggered and receives the production line PLC equipment operation instruction triggered by the production line personnel.

[0116] Step a2: Perform corresponding processing on the target product according to the operation instructions of the production line PLC equipment, and generate upstream target data based on the processing results.

[0117] Among them, the target product is a product that needs to be surface mounted.

[0118] In this embodiment, in response to receiving the operation instruction of the production line PLC device, the upstream PLC device performs corresponding processing on the production line personnel to place the target product in the production line according to the received result, and generates upstream target data according to the processing result.

[0119] For example, if the upstream PLC device is a printing press and the target product is a mobile phone motherboard, the printing press prints the mobile phone motherboard and obtains the product data detected during printing, current device status data, etc. based on the printing results to prepare the upstream target data.

[0120] Step a3: Call the second type of upstream functional component in the preset functional component set, and send a target data preparation instruction to the downstream PLC device based on the second type of upstream functional component.

[0121] The target data preparation instruction is an instruction to inform the downstream PLC device that the upstream target data is currently ready.

[0122] It is understandable that after the upstream PLC device has performed relevant processing on the target product, it is necessary to transmit the target product to the downstream PLC device for further processing of the target product.

[0123] Based on this, the second type of upstream functional component is called in the loaded preset functional component set, and based on the interaction result between the global variable space of the PLCnext platform and the current calling task, the target data preparation instruction is sent to the downstream PLC device to inform the downstream PLC device that the upstream target data is currently ready.

[0124] The data transmission method provided in this embodiment receives the production line PLC device operation instruction triggered by the production line personnel before receiving the target data acquisition instruction sent by the downstream PLC device based on the first type of upstream functional component; performs corresponding processing on the target product according to the production line PLC device operation instruction, and generates upstream target data according to the processing result; calls the second type of upstream functional component in the preset functional component set, and sends the target data preparation instruction to the downstream PLC device based on the second type of upstream functional component. Since the upstream PLC device needs to have prepared the upstream target data, and the downstream PLC device can know the prepared result, by receiving the production line PLC device operation instruction triggered by the production line personnel, the target product can be processed accordingly according to the instruction, and the upstream target data can be generated according to the processing result. And by calling the second type of upstream functional component in the preset functional component set, the target data preparation instruction can be sent to the downstream PLC device based on the second type of upstream functional component, so that the upstream target data can be successfully obtained in the subsequent execution process, and the downstream PLC device can be ensured to trigger the operation of obtaining the upstream target data, further improving the success rate of data transmission.

[0125] As an optional embodiment, based on the above embodiment, this embodiment further includes the following steps before receiving the production line PLC equipment operation instruction triggered by the production line personnel:

[0126] Step b1: receiving a preset functional component set loading request sent by a user terminal.

[0127] Among them, the user terminal is a terminal configured with the PLCnext platform corresponding to the R&D personnel.

[0128] The preset function component set loading request is a request for requesting an upstream PLC device to load the preset function component set.

[0129] It can be understood that a prerequisite for the implementation of this solution is that a set of preset functional components is stored in the upstream PLC device.

[0130] In this embodiment, R&D personnel can develop a preset functional component set through a corresponding user terminal, and load the developed preset functional component set into an upstream PLC device on the PLCnext platform, and trigger a preset functional component set loading request based on the loading result to send the request to the upstream PLC device.

[0131] Based on this, the upstream PLC device receives a preset functional component set loading request sent by the user terminal.

[0132] Step b2: storing the preset function component set locally according to the preset function component set loading request.

[0133] In this embodiment, after obtaining a preset functional component set loading request, the preset functional component set required to be loaded is further obtained and stored locally, such as in a database or other storage medium, which is not limited in this application.

[0134] The data transmission method provided in this embodiment receives a preset function component set loading request sent by a user terminal before receiving the production line PLC device operation instruction triggered by the production line personnel. The preset function component set is stored locally according to the preset function component set loading request. Since one of the prerequisites for the execution of this scheme is that the upstream PLC device stores the preset function component set, by receiving the preset function component set loading request sent by the user terminal, the preset function component set can be stored locally according to the request, so that the upstream PLC device can smoothly execute various calling behaviors in the preset function component set, further improving the efficiency of data transmission.

[0135] As an optional embodiment, in this embodiment, based on any of the above embodiments, the preset communication protocol underlying library is the Hermes communication protocol underlying library; and the preset standard is the IEC-61131 standard.

[0136] It is understandable that since the Hermes communication protocol underlying library is developed based on the IPC-HERMES-9852 standard communication protocol, and the IPC-HERMES-9852 standard communication protocol has the ability to transmit complex data, and the IEC-61131 standard is an international standard for PLC, therefore, the multiple categories of upstream functional components and multiple categories of downstream functional components determined according to the IEC-61131 standard based on the Hermes communication protocol underlying library can smoothly realize the transmission of various types of data between various PLC devices, further improving the success rate of data transmission.

[0137] Figure 4 A flowchart of a data transmission method provided in another embodiment of the present application is shown in FIG. Figure 4 As shown, the execution subject of this solution is a data transmission device, which is specifically located in the downstream PLC device. Then this embodiment specifically includes the following steps:

[0138] S401, sending a target data acquisition instruction to an upstream PLC device based on the second type of downstream functional component. The target data acquisition instruction is used to instruct the upstream PLC device to acquire upstream target data. The second type of downstream functional component is a component of an associated downstream PLC device that is pre-called in a preset functional component set and is used to perform a sending-related action of the downstream PLC device. The preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components. The multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard.

[0139] In this embodiment, the target data acquisition instruction is used to instruct the upstream PLC device to acquire upstream target data.

[0140] Among them, the second type of downstream functional components are components that send the data to be transmitted based on the downstream PLC device, and can be used to execute sending-related actions of the downstream PLC device. The sending-related actions can specifically be: sending product data acquisition instructions, etc.

[0141] It is understandable that for different downstream sending-related actions, there are corresponding second-type downstream functional components to perform. And the following examples for sending-related actions are only examples and should not constitute any limitation to this application.

[0142] Based on this, the downstream PLC device can pre-call the second type of downstream functional components corresponding to the downstream program in the loaded preset functional component set, and send target data acquisition instructions to the upstream PLC device based on the interaction results between the global variable space of the PLCnext platform and the current calling task.

[0143] It can be understood that, for the above-mentioned process of sending the target data acquisition instruction to the upstream PLC device based on the second-category downstream functional component, the current calling task is the task of calling the second-category downstream functional component currently being performed.

[0144] S402: Call a first type of downstream functional component in a preset functional component set. The first type of downstream functional component is used to execute reception-related actions of downstream PLC devices.

[0145] Among them, the first type of downstream functional components are components that receive the data to be transmitted based on the downstream PLC device, and can be used to perform reception-related actions of the downstream PLC device. The reception-related actions may specifically include: receiving product data, receiving device data, etc.

[0146] It is understandable that for different downstream reception-related actions, there are corresponding first-type downstream functional components to perform. And the following examples for reception-related actions are only examples and should not constitute any limitation to this application.

[0147] In this embodiment, after sending the target data acquisition instruction to the upstream PLC device, the downstream PLC device calls the first type of downstream functional component in the loaded preset functional component set to prepare for receiving the upstream target data sent by the upstream PLC device.

[0148] S403. Receive upstream target data sent by an upstream PLC device based on the first type of downstream functional components.

[0149] In this embodiment, after obtaining the first type of downstream functional component called, after the upstream PLC device triggers the operation of sending upstream target data to the downstream PLC device, the upstream target data sent by the upstream PLC device can be received based on the interaction result between the global variable space of the PLCnext platform and the current calling task.

[0150] Similarly, for the above-mentioned process of receiving the upstream target data sent by the upstream PLC device based on the first-type downstream functional component, the current calling task is the task of calling the first-type downstream functional component currently in progress.

[0151] The data transmission method provided in this embodiment sends a target data acquisition instruction to an upstream PLC device based on a second-category downstream functional component; the target data acquisition instruction is used to instruct the upstream PLC device to acquire upstream target data; the second-category downstream functional component is a component of an associated downstream PLC device that is pre-called in a preset functional component set and is used to execute sending-related actions of the downstream PLC device; the preset functional component set includes multiple categories of upstream functional components and multiple categories of downstream functional components; the multiple categories of upstream functional components and multiple categories of downstream functional components are determined based on a preset communication protocol underlying library according to preset standards; the first category of downstream functional components is called in the preset functional component set; the first category of downstream functional components is used to execute receiving-related actions of the downstream PLC device; and the upstream target data sent by the upstream PLC device is received based on the first category of downstream functional components. Since a preset functional component set including multiple upstream functional components and multiple downstream functional components is determined in advance according to preset standards based on the preset communication protocol underlying library, the downstream PLC device can send a target data acquisition instruction to the upstream PLC device by calling the second type of downstream functional component in the preset functional component set in advance, that is, a component used to execute the sending-related action of the downstream PLC device, and by further calling the first type of downstream functional component in the preset functional component set, that is, a component used to execute the receiving-related action of the downstream PLC device, the upstream target data sent by the upstream PLC device can be received based on the first type of downstream functional component. In this way, the data sent by the upstream PLC device is smoothly received, and the data transmission between the upstream and downstream PLC devices is realized, without the need for external computer equipment, saving equipment resources and improving transmission efficiency.

[0152] Figure 5 A flowchart of a data transmission method provided in yet another embodiment of the present application is shown in FIG. Figure 5 As shown, based on the above embodiment, this embodiment further refines the upstream target data sent by the upstream PLC device based on the first type of downstream functional component. In this embodiment, when the upstream target data sent by the upstream PLC device is received based on the first type of downstream functional component, the following steps are specifically included:

[0153] S501. Receive upstream target encapsulation data sent by an upstream PLC device based on a first-type downstream functional component.

[0154] It can be understood that when the upstream PLC device sends the upstream target data to the downstream PLC device based on the second type of upstream functional component, the upstream target data is encapsulated. Therefore, when the downstream PLC device receives the upstream target data sent by the upstream PLC device based on the first type of downstream functional component, it needs to parse the encapsulated upstream target data, that is, the upstream target encapsulation data.

[0155] Based on this, the downstream PLC device can pre-call the first type of downstream functional component corresponding to the downstream program in the loaded preset functional component set to prepare for receiving the upstream target encapsulation data sent by the upstream PLC device. Then, when the upstream PLC device triggers the operation of sending the upstream target encapsulation data to the downstream PLC device, the downstream PLC device receives the upstream target encapsulation data sent by the upstream PLC device based on the interaction results between the global variable space of the PLCnext platform and the current calling task.

[0156] S502: Call the fourth type of downstream functional component in the preset functional component set. The fourth type of downstream functional component is used to execute the analysis-related actions of the downstream PLC device.

[0157] Among them, the fourth type of downstream functional component is a component that parses the data format required for transmission based on the downstream PLC device, and can be used to execute parsing-related actions of the downstream PLC device. The parsing-related actions can specifically be: parsing product data, parsing device data, etc.

[0158] It is understandable that for different downstream analysis-related actions, there are corresponding fourth-category downstream functional components to perform. And the following examples for analysis-related actions are only examples and should not constitute any limitation to this application.

[0159] Based on this, after obtaining the upstream target encapsulation data, the fourth type of downstream functional component is called in the loaded preset functional component set.

[0160] S503: Use the fourth type of downstream functional component to parse the upstream target encapsulation data to obtain the upstream target data.

[0161] In this embodiment, based on the obtained upstream target encapsulation data and the called fourth type downstream functional component, the interaction result between the global variable space based on the PLCnext platform and the current calling task will be parsed into upstream target data according to the data format specified in the preset communication protocol, such as the upstream target encapsulation data formed in the xml format.

[0162] It can be understood that, for the process of parsing the upstream target encapsulated data using the fourth-category downstream functional component, the current calling task is the task of calling the fourth-category downstream functional component currently being performed.

[0163] The data transmission method provided in this embodiment, when receiving the upstream target data sent by the upstream PLC device based on the first type of downstream functional component, receives the upstream target encapsulated data sent by the upstream PLC device based on the first type of downstream functional component; calls the fourth type of downstream functional component in the preset functional component set; the fourth type of downstream functional component is used to perform the parsing-related actions of the downstream PLC device; and uses the fourth type of downstream functional component to parse the upstream target encapsulated data to obtain the upstream target data. Since it is necessary to parse the encapsulated upstream target data, by receiving the upstream target encapsulated data sent by the upstream PLC device based on the first type of downstream functional component, and by calling the fourth type of downstream functional component used to perform the parsing-related actions of the downstream PLC device in the preset functional component set, the fourth type of downstream functional component can be used to parse the upstream target encapsulated data, thereby smoothly obtaining the upstream target data and improving the success rate of data transmission.

[0164] As an optional embodiment, in this embodiment Figure 4 On the basis of the corresponding embodiment, before sending the target data acquisition instruction to the upstream PLC device based on the second type of downstream functional component, it also includes:

[0165] A first type of downstream functional component is called in a preset functional component set, and a target data preparation instruction sent by an upstream PLC device is received based on the first type of downstream functional component.

[0166] In this embodiment, the downstream PLC device sends the target data acquisition instruction to the upstream PLC device on the premise that the downstream PLC device has learned that the upstream PLC device has prepared the upstream target data.

[0167] Based on this, when the upstream PLC device triggers the operation of sending target data preparation instructions to the downstream PLC device, the downstream PLC device calls the first type of downstream functional component in the loaded preset functional component set, and receives the target data preparation instructions sent by the upstream PLC device based on the interaction results between the global variable space of the PLCnext platform and the current calling task.

[0168] It is understandable that after receiving the target data preparation instruction, the downstream PLC device obtains the result that the upstream PLC device has prepared the upstream target data, and can send the target data acquisition instruction to the upstream PLC device according to this result.

[0169] The data transmission method provided in this embodiment calls the first type of downstream functional component in the preset functional component set before sending the target data acquisition instruction to the upstream PLC device based on the second type of downstream functional component, and receives the target data preparation instruction sent by the upstream PLC device based on the first type of downstream functional component. Since the downstream PLC device needs to send the target data acquisition instruction to the upstream PLC device based on the second downstream functional component after knowing that the upstream PLC device has prepared the upstream target data, by calling the first type of downstream functional component in the preset functional component set, the target data preparation instruction sent by the upstream PLC device can be received based on the first type of downstream functional component, thereby ensuring that the upstream target data can be obtained from the upstream PLC device, further improving the success rate of data transmission.

[0170] As an optional embodiment, based on the above embodiment, this embodiment further includes the following steps before calling the first type of downstream functional component in the preset functional component set:

[0171] Step c1: receiving a preset functional component set loading request sent by a user terminal.

[0172] It is understandable that another prerequisite for the execution of this solution is that the preset functional component set is stored in the downstream PLC device. Therefore, before receiving the preset functional component set loading request sent by the user terminal, the downstream PLC device needs to receive the preset functional component set loading request sent by the user terminal. The specific execution method is similar to step b1 and will not be repeated here.

[0173] Step c2: storing the preset function component set locally according to the preset function component set loading request.

[0174] In this embodiment, based on the preset function component set loading request, a preset function component set to be loaded is further obtained, and the set is stored locally, such as in a database, or other storage media.

[0175] The data transmission method provided in this embodiment receives a preset function component set loading request sent by a user terminal before calling the first type of downstream function component in the preset function component set. The preset function component set is stored locally according to the preset function component set loading request. Since another prerequisite for the execution of this scheme is that the downstream PLC device stores the preset function component set, by receiving the preset function component set loading request sent by the user terminal, the preset function component set can be stored locally according to the request, so that the downstream PLC device can smoothly execute various calling behaviors in the preset function component set, further improving the efficiency of data transmission.

[0176] It can be understood that for the embodiment executed on the downstream PLC device side, the preset communication protocol underlying library adopted is also the Hermes communication protocol underlying library, the preset standard is also the IEC-61131 standard, and the effect brought is similar to the fourth embodiment, which will not be repeated here.

[0177] It can be understood that the process of calling the relevant functional components involved in this solution can be called in the following two ways: calling the relevant functional components in real time based on the continuously running PLCnext platform, or sending a call request to the relevant functional component and calling the relevant functional component after receiving the response. This application does not limit the specific calling method adopted.

[0178] Figure 6 A signaling interaction diagram of a data transmission method provided in an embodiment of the present application, such as Figure 6 As shown, the interaction between the upstream and downstream PLC devices during the execution of this solution includes the following steps:

[0179] S601: An upstream PLC device receives a preset functional component set loading request sent by a user terminal.

[0180] S602: The upstream PLC device stores the preset functional component set locally according to the preset functional component set loading request.

[0181] S603, the upstream PLC device receives the production line PLC device operation instruction triggered by the production line personnel.

[0182] S604, the upstream PLC device processes the target product accordingly according to the operation instructions of the production line PLC device.

[0183] S605. The upstream PLC device generates upstream target data according to the processing results.

[0184] S606: The upstream PLC device calls the second type of upstream functional component in the preset functional component set.

[0185] Among them, the second type of upstream functional components are used to execute sending-related actions of upstream PLC devices.

[0186] The preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components. The multiple types of upstream functional components and multiple types of downstream functional components are determined based on the preset communication protocol bottom layer library according to the preset standard.

[0187] The preset communication protocol underlying library is the Hermes communication protocol underlying library, and the preset standard is the IEC-61131 standard.

[0188] S607. The upstream PLC device sends a target data preparation instruction to the downstream PLC device based on the second type of upstream functional components.

[0189] S608: The downstream PLC device receives a preset functional component set loading request sent by the user terminal.

[0190] S609: The downstream PLC device stores the preset function component set locally according to the preset function component set loading request.

[0191] S610. The downstream PLC device calls a first type of downstream functional component in a preset functional component set.

[0192] Among them, the first type of downstream functional components is used to perform reception-related actions of downstream PLC devices.

[0193] S611. The downstream PLC device receives the target data preparation instruction sent by the upstream PLC device based on the first type of downstream functional components.

[0194] S612. The downstream PLC device calls the second type of downstream functional component in the preset functional component set.

[0195] S613. The downstream PLC device sends a target data acquisition instruction to the upstream PLC device based on the second type of downstream functional components.

[0196] The target data acquisition instruction is used to instruct the upstream PLC device to acquire the upstream target data.

[0197] S614. The upstream PLC device calls the first type of upstream functional component in the preset functional component set.

[0198] S615. The upstream PLC device receives the target data acquisition instruction sent by the downstream PLC device based on the first type of upstream functional components.

[0199] S616. The upstream PLC device obtains upstream target data according to the target data acquisition instruction.

[0200] S617. The upstream PLC device calls the second type of upstream functional component in the preset functional component set.

[0201] S618. The upstream PLC device sends the upstream target data to the downstream PLC device based on the second type of upstream functional components.

[0202] Specifically, the third type of upstream functional component is called in the preset functional component set. The third type of upstream functional component is used to encapsulate the upstream target data into a data packet that satisfies the preset communication protocol to obtain the upstream target encapsulated data. The upstream target encapsulated data is sent to the downstream PLC device based on the second type of upstream functional component to send the upstream target data to the downstream PLC device. Among them, the third type of upstream functional component is used to perform encapsulation-related actions of the upstream PLC device.

[0203] S619. The downstream PLC device calls the first type of downstream functional component in the preset functional component set.

[0204] S620. The downstream PLC device receives the upstream target data sent by the upstream PLC device based on the first type of downstream functional components.

[0205] Specifically, the upstream target encapsulated data sent by the upstream PLC device is received based on the first downstream functional component. The fourth downstream functional component is called in the preset functional component set. The fourth downstream functional component is used to parse the upstream target encapsulated data to obtain the upstream target data. The fourth downstream functional component is used to perform parsing-related actions of the downstream PLC device.

[0206] Figure 7 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the data transmission device 70 includes: a receiving module 71, an acquiring module 72, a calling module 73, and a sending module 74.

[0207] Among them, the receiving module 71 is used to receive the target data acquisition instruction sent by the downstream PLC device based on the first type of upstream functional component; the first type of upstream functional component is a component of the associated upstream PLC device that is pre-called in the preset functional component set, and is used to execute the receiving-related actions of the upstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined according to preset standards based on the preset communication protocol underlying library; the acquisition module 72 is used to acquire the upstream target data according to the target data acquisition instruction; the calling module 73 is used to call the second type of upstream functional component in the preset functional component set; the second type of upstream functional component is used to execute the sending-related actions of the upstream PLC device; the sending module 74 is used to send the upstream target data to the downstream PLC device based on the second type of upstream functional component.

[0208] The data transmission device provided in this embodiment can execute the method embodiment shown in Figure 2. The specific implementation principles and technical effects are similar and will not be repeated here.

[0209] Optionally, the sending module 74, when sending the upstream target data to the downstream PLC device based on the second type of upstream functional component, is specifically used to:

[0210] The third type of upstream functional component is called in the preset functional component set; the third type of upstream functional component is used to perform encapsulation-related actions of the upstream PLC device; the third type of upstream functional component is used to encapsulate the upstream target data into a data packet that meets the preset communication protocol to obtain the upstream target encapsulated data; based on the second type of upstream functional component, the upstream target encapsulated data is sent to the downstream PLC device to send the upstream target data to the downstream PLC device.

[0211] Optionally, the data transmission device provided in this embodiment further includes: a processing module and a generating module.

[0212] Among them, the receiving module 71 is also used to receive the production line PLC equipment operation instructions triggered by the production line personnel before receiving the target data acquisition instructions sent by the downstream PLC device based on the first type of upstream functional components; the processing module is used to perform corresponding processing on the target product according to the production line PLC equipment operation instructions, and the generating module is used to generate upstream target data according to the processing results; the calling module 73 is also used to call the second type of upstream functional components in the preset functional component set, and the sending module 74 is also used to send target data preparation instructions to the downstream PLC device based on the second type of upstream functional components.

[0213] Optionally, the data transmission device provided in this embodiment further includes: a loading module.

[0214] The receiving module 71 is also used to receive a preset function component set loading request sent by a user terminal before receiving the production line PLC equipment operation instruction triggered by the production line personnel. The loading module is used to store the preset function component set locally according to the preset function component set loading request.

[0215] Optionally, the preset communication protocol underlying library is a Hermes communication protocol underlying library; and the preset standard is the IEC-61131 standard.

[0216] The data transmission device provided in this embodiment can execute any method embodiment executed by the upstream PLC device side. The specific implementation principles and technical effects are similar and will not be repeated here.

[0217] It can be understood that the receiving module 71 includes a parsing unit, and the parsing unit is used to automatically parse the relevant data while the receiving module 71 receives the relevant data.

[0218] Figure 8 A structural diagram of a data transmission device provided in another embodiment of the present application is shown in FIG. Figure 8As shown, the data transmission device 80 includes: a sending module 81, a calling module 82, and a receiving module 83.

[0219] Among them, the sending module 81 is used to send a target data acquisition instruction to the upstream PLC device based on the second type of downstream functional component; the target data acquisition instruction is used to instruct the upstream PLC device to acquire the upstream target data; the second type of downstream functional component is a component of the associated downstream PLC device that is pre-called in the preset functional component set, and is used to execute the sending-related actions of the downstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined according to preset standards based on the preset communication protocol underlying library; the calling module 82 is used to call the first type of downstream functional component in the preset functional component set; the first type of downstream functional component is used to execute the receiving-related actions of the downstream PLC device; the receiving module 83 is used to receive the upstream target data sent by the upstream PLC device based on the first type of downstream functional component.

[0220] The data transmission device provided in this embodiment can execute Figure 4 The specific implementation principles and technical effects of the method embodiments shown are similar and will not be repeated here.

[0221] Optionally, the receiving module 83, when receiving the upstream target data sent by the upstream PLC device based on the first type of downstream functional component, is specifically configured to:

[0222] Based on the first type of downstream functional components, the upstream target encapsulation data sent by the upstream PLC device is received; the fourth type of downstream functional components are called in the preset functional component set; the fourth type of downstream functional components are used to execute the parsing-related actions of the downstream PLC device; the fourth type of downstream functional components are used to parse the upstream target encapsulation data to obtain the upstream target data.

[0223] Optionally, the calling module 82 is also used to call the first type of downstream functional component in the preset functional component set before the sending module 81 sends the target data acquisition instruction to the upstream PLC device based on the second type of downstream functional component, and the receiving module 83 is also used to receive the target data preparation instruction sent by the upstream PLC device based on the first type of downstream functional component.

[0224] Optionally, the data transmission device provided in this embodiment further includes: a loading module.

[0225] The receiving module 83 is further used to receive a preset function component set loading request sent by a user terminal before calling the first type of downstream function component in the preset function component set. The loading module is used to store the preset function component set locally according to the preset function component set loading request.

[0226] Optionally, the preset communication protocol underlying library is a Hermes communication protocol underlying library; and the preset standard is the IEC-61131 standard.

[0227] The data transmission device provided in this embodiment can execute any method embodiment executed by the downstream PLC device side. The specific implementation principles and technical effects are similar and will not be repeated here.

[0228] It can be understood that the receiving module 83 includes a parsing unit, and the parsing unit is used to automatically parse the relevant data while the receiving module 83 receives the relevant data.

[0229] Fig. 9 A schematic diagram of the structure of an upstream PLC device provided in an embodiment of the present application, such as Fig. 9 As shown, the upstream PLC device 90 provided in this embodiment includes: a processor 91, a memory 92 and a transceiver 93 which are communicatively connected to the processor.

[0230] The memory 92 stores computer-executable instructions; the transceiver 93 is used to send and receive data; the processor 91 executes the computer-executable instructions stored in the memory to implement the data transmission method provided by any embodiment of the above-mentioned data management system corresponding to the server. The relevant description can be understood by referring to the relevant descriptions and effects corresponding to the steps in the accompanying drawings, and no further details are given here.

[0231] The program may include program code, and the program code includes computer-executable instructions. The memory 92 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0232] In this embodiment, the memory 92 and the processor 91 are connected via a bus. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0233] Fig.10 A schematic diagram of the structure of a downstream PLC device provided in an embodiment of the present application, such as Fig.10As shown, the downstream PLC device 1000 provided in this embodiment includes: a processor 1001, a memory 1002 and a transceiver 1003 which are communicatively connected to the processor.

[0234] The memory 1002 stores computer-executable instructions; the transceiver 1003 is used to send and receive data; the processor 1001 executes the computer-executable instructions stored in the memory to implement the data transmission method provided by any embodiment of the mobile terminal. The relevant description can be understood by referring to the relevant descriptions and effects corresponding to the steps in the accompanying drawings, and no further details are given here.

[0235] The program may include program code, and the program code includes computer-executable instructions. The memory 1002 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0236] In this embodiment, the memory 1002 and the processor 1001 are connected via a bus. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0237] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the data transmission method provided in any of the above embodiments. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.

[0238] An embodiment of the present application also provides a computer program product, including a computer program, which implements the data transmission method provided in any one of the above embodiments when the computer program is executed by a processor.

[0239] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0240] It should be further noted that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flow chart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0241] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0242] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0243] If the integrated unit / module is implemented in the form of hardware, the hardware can be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the artificial intelligence processor can be any appropriate hardware processor, such as CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory RRAM (Resistive Random Access Memory), dynamic random access memory DRAM (Dynamic Random Access Memory), static random access memory SRAM (Static Random-Access Memory), enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), high-bandwidth memory HBM (High-Bandwidth Memory), hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0244] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0245] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0246] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0247] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data transmission method, characterized in that: The method comprises: The target data acquisition instruction sent by the downstream PLC device is received based on the first type of upstream functional component; the first type of upstream functional component is a component of the associated upstream PLC device that is pre-called in the preset functional component set and is used to perform the reception-related action of the upstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on the preset communication protocol underlying library according to the preset standard; Acquire upstream target data according to the target data acquisition instruction, and call a second type of upstream functional component in a preset functional component set; the second type of upstream functional component is used to execute a sending-related action of an upstream PLC device; The upstream target data is sent to a downstream PLC device based on the second type of upstream functional components.

2. The method according to claim 1, characterized in that The sending of the upstream target data to the downstream PLC device based on the second-type upstream functional component includes: Calling a third type of upstream functional component in a preset functional component set; the third type of upstream functional component is used to perform encapsulation-related actions of an upstream PLC device; Using the third type of upstream functional component to encapsulate the upstream target data into a data packet that satisfies a preset communication protocol to obtain upstream target encapsulated data; The upstream target encapsulated data is sent to the downstream PLC device based on the second-type upstream functional component, so as to send the upstream target data to the downstream PLC device.

3. The method according to claim 1, characterized in that Before the first-type upstream functional component receives the target data acquisition instruction sent by the downstream PLC device, the method further includes: Receive production line PLC equipment operation instructions triggered by production line personnel; Process the target product accordingly according to the PLC equipment operation instructions of the production line, and generate upstream target data according to the processing results; A second type of upstream functional component is called in a preset functional component set, and a target data preparation instruction is sent to a downstream PLC device based on the second type of upstream functional component.

4. The method according to claim 3, characterized in that Before receiving the production line PLC equipment operation instruction triggered by the production line personnel, the method further includes: Receiving a preset functional component set loading request sent by a user terminal; The preset function component set is stored locally according to the preset function component set loading request.

5. The method according to any one of claims 1 to 4, characterized in that: The preset communication protocol underlying library is a Hermes communication protocol underlying library; The preset standard is the IEC-61131 standard.

6. A data transmission method, characterized in that: The method comprises: Sending a target data acquisition instruction to an upstream PLC device based on a second type of downstream functional component; the target data acquisition instruction is used to instruct the upstream PLC device to acquire upstream target data; the second type of downstream functional component is a component of an associated downstream PLC device that is pre-called in a preset functional component set and is used to execute a sending-related action of the downstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard; Calling a first type of downstream functional component in the preset functional component set; the first type of downstream functional component is used to perform reception-related actions of a downstream PLC device; Receive upstream target data sent by an upstream PLC device based on the first type of downstream functional components.

7. The method according to claim 6, characterized in that The receiving, based on the first type of downstream functional components, upstream target data sent by an upstream PLC device comprises: Receiving upstream target encapsulation data sent by an upstream PLC device based on the first type of downstream functional components; Calling a fourth type of downstream functional component in the preset functional component set; the fourth type of downstream functional component is used to perform analysis-related actions of downstream PLC devices; The fourth type of downstream functional component is used to parse the upstream target encapsulated data to obtain the upstream target data.

8. The method according to claim 6, characterized in that Before sending the target data acquisition instruction to the upstream PLC device based on the second type downstream functional component, the method further includes: A first type of downstream functional component is called in a preset functional component set, and a target data preparation instruction sent by the upstream PLC device is received based on the first type of downstream functional component.

9. The method according to claim 8, characterized in that Before calling the first type of downstream functional component in the preset functional component set, the method further includes: Receiving a preset functional component set loading request sent by a user terminal; The preset function component set is stored locally according to the preset function component set loading request.

10. The method according to any one of claims 6 to 9, characterized in that: The preset communication protocol underlying library is a Hermes communication protocol underlying library; The preset standard is the IEC-61131 standard.

11. A data transmission device, characterized in that: The device comprises: A receiving module, configured to receive a target data acquisition instruction sent by a downstream PLC device based on a first type of upstream functional component; the first type of upstream functional component is a component associated with an upstream PLC device that is pre-called in a preset functional component set and is configured to execute a reception-related action of the upstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard; An acquisition module, used for acquiring upstream target data according to the target data acquisition instruction; A calling module, used to call a second type of upstream functional component in a preset functional component set; the second type of upstream functional component is used to execute a sending-related action of an upstream PLC device; A sending module is used to send the upstream target data to a downstream PLC device based on the second type of upstream functional components.

12. A data transmission device, characterized in that: The device comprises: A sending module, used for sending a target data acquisition instruction to an upstream PLC device based on a second type of downstream functional component; the target data acquisition instruction is used to instruct the upstream PLC device to acquire upstream target data; the second type of downstream functional component is a component associated with a downstream PLC device that is pre-called in a preset functional component set, and is used to execute a sending-related action of the downstream PLC device; the preset functional component set includes multiple types of upstream functional components and multiple types of downstream functional components; the multiple types of upstream functional components and multiple types of downstream functional components are determined based on a preset communication protocol underlying library according to a preset standard; A calling module, used to call a first type of downstream functional component in the preset functional component set; the first type of downstream functional component is used to perform reception-related actions of a downstream PLC device; A receiving module is used to receive upstream target data sent by an upstream PLC device based on the first type of downstream functional components.

13. An upstream PLC device, comprising: A processor, a memory and a transceiver communicatively connected to the processor; The memory stores computer-executable instructions; the transceiver is used to send and receive data; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.

14. A downstream PLC device comprising: A processor, a memory and a transceiver communicatively connected to the processor; The memory stores computer-executable instructions; the transceiver is used to send and receive data; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 6 to 10.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 10 when executed by a processor.

16. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 10 when being executed by a processor.