PLC device with IPC standard communication function
By integrating IPC standard communication functions in PLC devices, using CFX and Hermes applications and real-time task library, efficient data transmission between PLC devices is achieved, solving the problems of low communication efficiency and high hardware cost between PLC devices. It is suitable for SMT Data flow and management of production lines.
Patent Information
- Application Number
- CN202411173012.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-27
AI Technical Summary
The current communication methods between PLC devices are limited, resulting in low data transmission efficiency and high hardware cost, making it difficult to meet the data line flow and centralized management needs of SMT production lines.
Design a PLC device with IPC standard communication function. By installing CFX and Hermes applications and real-time task library in the PLC device, using gRPC protocol and Hermes communication standard, it realizes direct data interaction between devices and reduces dependence on industrial control machines. .
It realizes efficient data transmission between PLC devices, reduces hardware costs, simplifies connections, improves communication efficiency, supports horizontal and vertical data flow between PLC devices, and is suitable for data flow and management of SMT production lines.
Smart Images

Figure CN119211318A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of programmable logic controllers, and in particular to a PLC device with IPC standard communication function. Background Art
[0002] Currently, most of the surface mount technology (SMT) equipment is controlled by PLC, so the communication method between devices is limited by the communication method supported by PLC. Although data interaction can be achieved by using the common industrial Modbus, Object Linking and Embedding (OLE) for Process Control (OPC) and other communication methods or by using industrial computers and other devices, the data transmission efficiency is low or requires high hardware costs.
[0003] Therefore, how to provide a PLC device with the Institute of Printed Circuits (IPC) standard communication protocol to reduce hardware costs and improve data flow efficiency is a problem that needs to be solved urgently. Summary of the invention
[0004] The embodiment of the present application provides a PLC device with IPC standard communication function to reduce hardware cost and improve data transmission efficiency.
[0005] In a first aspect, an embodiment of the present application provides a PLC device with a CFX communication function, including: a CFX application installed in an underlying operating system of the PLC device, a real-time task based on a preset programming standard, and a first function block library corresponding to the CFX application;
[0006] Each first function block in the first function block library is obtained by encapsulating the input and output port data of the CFX application program in a preset programming language corresponding to the preset programming standard;
[0007] The real-time task is used to perform data interaction with the CFX application based on a preset communication protocol by calling a first function block corresponding to the first periodic task when the PLC device executes the first periodic task;
[0008] The CFX application is used to communicate with the upper system based on the CFX communication standard according to the interactive data between the real-time task and the real-time task.
[0009] In one possible design, the underlying operating system is a PLCnext Linux operating system.
[0010] In a possible design, the CFX application is deployed as a container in the Linux operating system.
[0011] In a possible design, the real-time task is a periodic task in the IEC61131-3 runtime system.
[0012] In one possible design, the preset communication protocol is the remote procedure call gRPC protocol.
[0013] In a possible design, the upper-level system is a data integration system; the data integration system is used to obtain data of the machine controlled by the PLC device and production process data.
[0014] In a possible design, the PLC device further includes: a Hermes real-time task library installed in the underlying operating system and a second function block library corresponding to the Hermes real-time task library; the Hermes real-time task library is used to be placed in the program management; the Hermes real-time task library includes an upstream Hermes program and a downstream Hermes program;
[0015] Each second function block in the second function block library is obtained by encapsulating the input and output port data of each data interface module in the Hermes real-time task library based on the preset programming language;
[0016] The real-time task is used to perform data interaction with the Hermes real-time task library based on a preset channel by calling a second function block corresponding to the second periodic task when the PLC device executes the second periodic task;
[0017] The Hermes real-time task library is used to perform data communication between upstream devices and / or downstream devices of the device controlled by the PLC device based on the interactive data between the real-time task and the Hermes communication standard.
[0018] In a possible design, the Hermes real-time task library is deployed in an extension component of PLCnext.
[0019] In a possible design, the preset channel is the global data space GDS of PLCnext.
[0020] In a second aspect, an embodiment of the present application provides a PLC device with a Hermes communication function, characterized in that it includes: a Hermes real-time task library installed in the underlying operating system and a second function block library corresponding to the Hermes real-time task library; the Hermes real-time task library is used to be placed in the program management; the Hermes real-time task library includes an upstream Hermes program and a downstream Hermes program;
[0021] Each second function block in the second function block library is obtained by encapsulating the input and output port data of each data interface module in the Hermes real-time task library based on the preset programming language;
[0022] The real-time task is used to perform data interaction with the Hermes real-time task library based on a preset channel by calling a second function block corresponding to the second periodic task when the PLC device executes the second periodic task;
[0023] The Hermes real-time task library is used to perform data communication between upstream devices and / or downstream devices of the device controlled by the PLC device based on the interactive data between the real-time task and the Hermes communication standard.
[0024] The present application provides a PLC device with Hermes and / or CFX communication functions, which has the following beneficial effects:
[0025] 1. PLC devices communicate with peripheral devices based on CFX applications based on CFX standards, without the need for industrial computers or other PC devices, and with simple connections, low hardware costs and high data transmission efficiency;
[0026] 2. PLC devices with Hermes and CFX standard communications can achieve physical connection of communication with only one RJ45 network cable, making the communication architecture easy to expand flexibly and with high communication efficiency;
[0027] 3. PLC devices with Hermes standard communication can communicate horizontally with upstream and downstream devices based on the Hermes program and the Hermes standard, without the need for PC devices such as industrial computers. The connection is simple, the hardware cost is low, and the data transmission efficiency is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0029] Figure 1 Schematic diagram of the PLC device communication solution architecture provided for related technologies;
[0030] Figure 2a A schematic diagram of the PLC device communication solution architecture provided in an embodiment of the present application;
[0031] Figure 2b A PLC device communication topology diagram provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the architecture of a PLC device with CFX communication function provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of the encapsulation method of the CFX communication protocol provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of the architecture of a PLC device with Hermes communication function provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of the encapsulation method of the Hermes communication protocol provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of the architecture of a PLC device with Hermes and CFX communication functions provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] It should be noted that the programmable logic controller (PLC) device with standard communication function provided in this application can be used in the field of surface mount technology (SMT), and can also be used in any field except the SMT field. The application field of the PLC device with IPC standard communication function provided in this application is not limited.
[0039] With the rapid development of informatization, higher and higher requirements are put forward for the miniaturization, modularization, intelligence, compounding, high reliability and high performance of electronic products, which also puts forward higher requirements for the advanced manufacturing technology of electronic equipment. The application of SMT is in line with the development direction of electronic equipment manufacturing and provides an effective solution to the above requirements. It has become the mainstream assembly process technology used in the manufacture of micro-electronic products and has attracted more and more attention.
[0040] Considering that SMT production lines usually consist of two parts, standard and non-standard, among which standard single machines generally include printing machines, placement machines, welding machines, plug-in machines, laser engraving machines, panel splitters, etc., and non-standard parts generally include loading machines, unloading machines, docking stations, screening machines, translation machines, track transmissions, etc.; when integrating the entire line, it is required that the data of the PCB board can flow in the entire production line, that is, the data flow and data tracking functions must be realized between the standard machines and non-standard machines in the entire line.
[0041] Currently, most SMT equipment is controlled by PLC, so the communication method between equipment is limited by the communication method supported by PLC. Although the common industrial Modbus and OPC communication methods can be used to achieve data interaction between equipment, the data flow efficiency and the flexible scalability of communication data are very limited, and it is difficult to meet the full data flow of product workflow and centralized data management. At the same time, it also faces many challenges such as inconsistent communication protocols of mixed suppliers and high hardware costs.
[0042] In the related technology, in the SMT production line, data can be transferred by means of industrial computers to achieve Hermes and / or CFX standard communication. Figure 1 As shown, the device 11 is connected to the PLC device 21, the PLC device 21 is connected to the industrial computer 31, the device 12 is connected to the PLC device 22, the PLC device 22 is connected to the industrial computer 32, and the industrial computer 31 and the industrial computer 32 are connected to the server 41. Taking the device 11 as a feeder and the device 21 as a printing press as an example, when the data of the device 11 (such as the barcode of the circuit board) needs to be transmitted horizontally to the device 12, the device 11 usually first transmits the data to the industrial computer 31 through the PLC device 21, and then transmits the data from the industrial computer 31 to the industrial computer 32, and then transmits the data from the industrial computer 32 to the device 22. When the data of the device 11 (such as the device temperature) needs to be uploaded to the server 41 vertically, the device 11 usually first transmits the data to the industrial computer 31 through the PLC device 21, and then transmits the data from the industrial computer 31 to the server 41.
[0043] It can be seen that the above-mentioned method of transferring data with the help of industrial computers has high communication costs, inflexible communication expansion and low communication efficiency.
[0044] In order to solve the above technical solution, the inventor of the present application has found that the PLC device can be improved so that the PLC device can support the Hermes standard and / or CFX standard communication function, thereby realizing the communication of the PLC device directly in accordance with the Hermes standard and the CFX standard without the need for PC devices such as industrial computers, and the connection is simple, the hardware cost is low, and the data transmission efficiency is high. Based on this, the embodiment of the present application provides a PLC device with IPC standard communication function.
[0045] Figure 2a The following is a schematic diagram of an application scenario of a PLC device with Hermes standard and CFX standard communication functions provided in an embodiment of the present application. Figure 2a As shown, taking the first PLC device, the second PLC device and the third PLC device all having Hermes and CFX communication functions as an example, the first device is connected to the first PLC device, the second device is connected to the second PLC device, the third device is connected to the third PLC device, and the first PLC device, the second PLC device and the third PLC device are all connected to the server. The connection between the devices can be made by a network cable.
[0046] In the specific implementation process, Figure 2b As shown, assuming that product data needs to flow from front to back on the first device, the second device, and the third device on the production line, the first PLC device is the upstream device of the second PLC device, and the second PLC device is the upstream device of the third PLC device. Correspondingly, the second PLC device is the downstream device of the first PLC device, and the third PLC device is the downstream device of the second PLC device. The upstream device can serve as the server of the downstream device, and the downstream device can serve as the client of the upstream device. The server and the client can communicate based on the Hermes standard, and the relevant data can flow from front to back according to the Hermes standard. The first PLC device, the second PLC device, and the third PLC device can communicate with the server based on the CFX standard and upload the relevant data to the server.
[0047] It should be noted that Figure 1 The scenario diagram shown is only an example. The PLC device and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0048] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0049] Figure 3 This is a schematic diagram of the architecture of a PLC device with CFX communication function provided in an embodiment of the present application. Figure 3 As shown, the PLC device includes: a CFX application (CFX APP) installed in the underlying operating system of the PLC device, a real-time task based on a preset programming standard, and a first function block library (IEC61131-3CFX) corresponding to the CFX application; each first function block in the first function block library is obtained by encapsulating the input and output port data of the CFX application based on a preset programming language corresponding to the preset programming standard; the real-time task is used to perform data interaction with the CFX application based on a preset communication protocol by calling the first function block corresponding to the first periodic task when the PLC device executes the first periodic task; the CFX application is used to communicate with the upper system based on the CFX communication standard according to the interaction data with the real-time task.
[0050] In this embodiment, the function blocks in the first function block library can be divided according to the functions involved in the CFX communication standard. For example, in order to facilitate the search, they can be first divided into multiple sub-libraries such as CfxConnectLib, CfxInformationSystemLib, CfxMaintenanceLib, CfxMaterialsLib, CfxProducfionLib, CfxResourcePerformanceLib, CfxSensorLib, and CfXStructuresLib, and each sub-library includes function blocks under corresponding functions.
[0051] The underlying operating system may be a PLCnext Linux operating system. Compared with Windows, Linux is stable and more efficient, has fewer vulnerabilities and can be quickly patched, has multi-tasking and multi-user, and has more secure user and file permission policies, and can take into account both the freedom of development and the real-time operation of programs. In addition, the biggest feature of the Linux system is that the underlying layer is entirely composed of files, which can be accessed through secure methods such as Secure Shell (SSH) or SSH File Transfer Protocol (SFTP), and file parameter configurations can be directly modified, which is conducive to achieving safe, free, and fast configuration settings.
[0052] In some embodiments, the CFX application may be deployed in an extension component of PLCnext.
[0053] In some embodiments, the CFX application may be deployed as a container in the Linux operating system.
[0054] In some embodiments, when the PLC device is used in an SMT production line, the real-time task is a periodic task in the IEC61131-3 runtime system.
[0055] In some embodiments, the preset communication protocol is a Google Remote Procedure Call (gRPC) protocol.
[0056] like Figure 3 As shown, in the specific implementation process, .NetCore APP is developed, that is, Figure 3 The CFX APP (CFX application) in the CFX APP is used to implement the CFX standard communication function, that is, the CFX standard communication between the peripheral equipment (such as the upper server). In addition, the input and output interface data of the CFX APP are encapsulated as follows using the IEC61131-3 language: Figure 3 The function library PhCFX in the PLCnext is used by PLC program developers to call the real-time task cyclic task in PLCnext to implement the CFX communication function of the PLC, that is, when the system executes the cyclic task in the PLCnext runtime, the communication with the CFX APP is realized. Figure 4 As shown, gRPC CFX APP is Figure 3 The CFXAPP application deployed in the Linux system is shown in FIG. CfxCommFB is a connection function block called when establishing a connection in the PhCFX function library. The IEC61131-3 program is a real-time task cyclic task program that calls the connection function block. When the IEC61131-3 program is executed, CfxCommFB is called to transmit the input and / or output data of the IEC61131-3 program to the GPPC protocol based on the gRPC protocol. Figure 3 The CFXAPP deployed in the Linux system shown here performs data interaction.
[0057] In some embodiments, the CFX application may perform non-real-time tasks, that is, triggered when there is data to be communicated, and may wait when there is no data to be communicated.
[0058] The PLC device provided in the embodiment of the present application can communicate with peripheral devices based on the CFX standard based on the CFX application by developing a CFX application and a corresponding function block library, and can realize data interaction between the CFX application and the PLC by calling the function block library in the periodic tasks of the PLCnext platform, so that communication can be carried out directly in accordance with the CFX standard without the aid of PC devices such as industrial computers, and the connection is simple, the hardware cost is low, and the data transmission efficiency is high.
[0059] Figure 5 This is a schematic diagram of the architecture of a PLC device with Hermes communication function provided in an embodiment of the present application. Figure 5 As shown, the PLC device includes: a Hermes real-time task library installed in the underlying operating system and a second function block library (IEC61131-3PhHermes) corresponding to the Hermes real-time task library; the Hermes real-time task library is used to be placed in the program management (corresponding to the program library management Program Library Manager); the Hermes real-time task library includes an upstream Hermes program (HermesUpStream) and a downstream Hermes program (HermesDownStream); each second function block in the second function block library is obtained by encapsulating the input and output port data of each data interface module in the Hermes real-time task library based on the preset programming language; the real-time task is used to call the second function block corresponding to the second periodic task when the PLC device executes the second periodic task, and perform data interaction with the Hermes real-time task library based on a preset channel; the Hermes real-time task library is used to perform data communication between the upstream device and / or downstream device of the device controlled by the PLC device based on the Hermes communication standard according to the interaction data with the real-time task.
[0060] It should be noted that Figure 5 The C++ Function Extension Hermes in the Program Library Manager is the form in which the programs HermesUpStream and HermesDownStream in the Program Library Manager are called in the background.
[0061] The underlying operating system may be a Linux operating system. Compared with Windows, Linux is stable and more efficient, has fewer vulnerabilities and can be quickly patched, has multi-tasking and multi-user, and has more secure user and file permission policies, and can take into account both the freedom of development and the real-time operation of programs. In addition, the biggest feature of the Linux system is that the underlying layer is entirely composed of files, which can be accessed through secure methods such as SSH or SFTP, and the file parameter configuration can be directly modified, which is conducive to achieving safe, free, and fast configuration settings.
[0062] In some embodiments, the upstream Hermes program and the downstream Hermes program in the Hermes real-time task library can be synchronized with the IEC scan cycle and run in the background with a fixed scan cycle to complete the real-time task.
[0063] In some embodiments, the Hermes real-time task library is deployed in an extension component of PLCnext.
[0064] In some embodiments, the preset channel is the global data space GDS of PLCnext.
[0065] In some embodiments, when the PLC device is used in an SMT production line, the real-time task may be a periodic task in the IEC61131-3 runtime system.
[0066] like Figure 5 As shown in the figure, in the specific implementation process, PLC R&D personnel took advantage of the openness of the PLCnext platform and its support for high-level language programming to develop a C++ extension program Function Extension, namely the Hermes program. The Hermes program implements the Hermes standard communication function of the PLCnext background. The Hermes program is encapsulated to build the second function block library corresponding to the Hermes program, namely Figure 5 Specifically, in accordance with the IEC61131-3 standard, the input and output data of the Hermes program are encapsulated as IEC61131-3 function blocks, and all the Hermes communication function blocks are packaged and released as the IEC61131-3PhHermes communication function block library. When the PLC program developer develops the PLCnext cyclictask program based on the production line, the IEC61131-3PhHermes communication function block library is imported and the function blocks therein are called to implement the Hermes communication function of the PLC. Figure 6As shown, the ST programming language can be used to encapsulate the input and / or output interface data of the upstream Hermes program (HermesUpstream class) and the downstream Hermes program (HermesDownstream class) in the Hermes program.
[0067] Specifically, first develop the Hermes communication protocol library. Follow the IPC-Hermes-9852 standard and use the C++ programming language to develop the Hermes communication protocol library to implement data encapsulation, sending, receiving and parsing based on the IPC-Hermes-9852 standard. The Hermes communication protocol library contains the HermesUpstream program corresponding to the upstream of the production line and the HermesDownstream program corresponding to the downstream of the production line. Among them, the upstream HermesUpstream program contains the upstream message data interface module specified by the IPC-Hermes-9852 protocol, which are ServiceDescription, BoardAvailable, RevokeBoardAvailable, TransportFinished, Reset, Notification, CheckAlive, BoardForecast, and SendBoardInfo. The downstream HermesDownstream program contains the upstream message data interface modules specified by the IPC-Hermes-9852 protocol, namely ServiceDescription, MachineReady, RevokeMachineReady, StartTransport, StopTransport, Reset, Notification, CheckAlive, and QueryBoardInfo. Secondly, the Hermes communication protocol library is encapsulated as a PLCnext real-time task. Based on the characteristics of developing PLC real-time tasks in C++ on the PLCnext platform, the Hermes communication protocol library is imported into PLCnext Engineer in the form of a PLCnext real-time task library, and the HermesUpstream program and HermesDownstream program are instantiated in PLCnext Engineer, and the input and output ports of the HermesUpstream program and HermesDownstream program are mapped in the real-time task of the PLC. Finally, the PhHermes communication function block library is developed. The input and output data of the HermesUpstream program and the HermesDownstream program are developed in accordance with IEC-61131 standardization to form a PhHermes communication function block library in the form of IEC61131 function blocks. The PhHermes function block library includes interfaces for triggering and receiving data returned by the HermesUpstream program and the HermesDownstream program. Users can call function blocks at the application layer according to business logic to implement corresponding data interaction.The interactive data may include Board Id, FailedBoard, Product Type Id, Flipped Board, etc.
[0068] For example, during the communication process, Figure 2a As shown, it is assumed that in the process of receiving information sent by the first device through the PLC device by the second PLC device of the second device, the upstream Hermes program in the Hermes real-time task library in the second PLC device parses the received information in accordance with the IPC-Hermes-9852 standard, and transmits the parsed data through a preset channel, such as the global data space of the first PLCnext, i.e., GDS, and realizes data interaction with the Cyclic task in the runtime system in the PLCnext by calling the PhHermes communication function block library.
[0069] The PLC device provided in the embodiment of the present application can communicate with peripheral devices (upstream devices and / or downstream devices) based on the Hermes program and the Hermes standard by developing a Hermes program and a corresponding function block library, and can realize data interaction between the Hermes program and the PLC by calling the function block library in the periodic task of the PLCnext platform. It can communicate directly according to the Hermes standard without the aid of PC devices such as industrial computers, and has simple connection, low hardware cost and high data transmission efficiency.
[0070] Figure 7 This is a schematic diagram of the architecture of a PLC device with Hermes and CFX communication functions provided in an embodiment of the present application. Figure 7As shown, the PLC device includes: a CFX application (CFXAPP) installed in the underlying operating system of the PLC device, a real-time task based on a preset programming standard, and a first function block library (IEC61131-3CFX) corresponding to the CFX application; each first function block in the first function block library is obtained by encapsulating the input and output port data of the CFX application based on a preset programming language corresponding to the preset programming standard; the real-time task is used to perform data interaction with the CFX application based on a preset communication protocol by calling the first function block corresponding to the first periodic task when the PLC device executes the first periodic task; the CFX application is used to communicate with the upper system based on the CFX communication standard according to the interaction data with the real-time task. The PLC device also includes: a Hermes real-time task library installed in the underlying operating system and a second function block library (IEC61131-3PhHermes) corresponding to the Hermes real-time task library; the Hermes real-time task library is used to be placed in the program management (corresponding to the program library manager); the Hermes real-time task library includes an upstream Hermes program (HermesUpStream) and a downstream Hermes program (HermesDownStream); each second function block in the second function block library is obtained by encapsulating the input and output port data of each data interface module in the Hermes real-time task library based on the preset programming language; the real-time task is used to call the second function block corresponding to the second periodic task when the PLC device executes the second periodic task, and perform data interaction with the Hermes real-time task library based on a preset channel; the Hermes real-time task library is used to perform data communication between upstream devices and / or downstream devices of the device controlled by the PLC device based on the Hermes communication standard according to the interaction data with the real-time task.
[0071] like Figure 7 As shown in the figure, in the specific implementation process, for M2M horizontal communication, PLC R&D personnel used the openness of the PLCnext platform and its support for high-level language programming to develop a C++ extension program Function Extension, namely the Hermes program. The Hermes program implements the Hermes standard communication function of the PLCnext background. The Hermes program is encapsulated to build the second function block library corresponding to the Hermes program, namely Figure 7Specifically, in accordance with the IEC61131-3 standard, the input and output data of the Hermes program are encapsulated as IEC61131-3 function blocks, and all the Hermes communication function blocks are packaged and released as the IEC61131-3PhHermes communication function block library. When the PLC program developer develops the PLCnext cyclictask program based on the production line, the IEC61131-3PhHermes communication function block library is imported and the function blocks therein are called to implement the Hermes communication function of the PLC.
[0072] Specifically, first develop the Hermes communication protocol library. Follow the IPC-Hermes-9852 standard and use the C++ programming language to develop the Hermes communication protocol library to implement data encapsulation, sending, receiving and parsing based on the IPC-Hermes-9852 standard. The Hermes communication protocol library contains the HermesUpstream program corresponding to the upstream of the production line and the HermesDownstream program corresponding to the downstream of the production line. Among them, the upstream HermesUpstream program contains the upstream message data interface module specified by the IPC-Hermes-9852 protocol, which are ServiceDescription, BoardAvailable, RevokeBoardAvailable, TransportFinished, Reset, Notification, CheckAlive, BoardForecast, and SendBoardInfo. The downstream HermesDownstream program contains the upstream message data interface modules specified by the IPC-Hermes-9852 protocol, namely ServiceDescription, MachineReady, RevokeMachineReady, StartTransport, StopTransport, Reset, Notification, CheckAlive, and QueryBoardInfo. Secondly, the Hermes communication protocol library is encapsulated as a PLCnext real-time task. Based on the characteristics of developing PLC real-time tasks in C++ on the PLCnext platform, the Hermes communication protocol library is imported into PLCnext Engineer in the form of a PLCnext real-time task library, and the HermesUpstream program and HermesDownstream program are instantiated in PLCnext Engineer, and the input and output ports of the HermesUpstream program and HermesDownstream program are mapped in the real-time task of the PLC. Finally, the PhHermes communication function block library is developed. The input and output data of the HermesUpstream program and the HermesDownstream program are developed in accordance with IEC-61131 standardization to form a PhHermes communication function block library in the form of IEC61131 function blocks. The PhHermes function block library includes interfaces for triggering and receiving data returned by the HermesUpstream program and the HermesDownstream program. Users can call function blocks at the application layer according to business logic to implement corresponding data interaction.The interactive data may include Board Id, FailedBoard, Product Type Id, Flipped Board, etc.
[0073] For example, during the communication process, Figure 2a As shown, it is assumed that in the process of receiving information sent by the first device through the PLC device by the second PLC device of the second device, the upstream Hermes program in the Hermes real-time task library in the second PLC device parses the received information in accordance with the IPC-Hermes-9852 standard, and transmits the parsed data through a preset channel, such as the global data space of the first PLCnext, i.e., GDS, and realizes data interaction with the Cyclic task in the runtime system in the PLCnext by calling the PhHermes communication function block library.
[0074] Since traditional PLCs do not support IPC-Hermes-9852 communication, M2M data transfer in traditional SMT production lines usually requires the use of a PC transfer station. The PLC device provided in this embodiment implements the PLCnext controller's support for IPC-Hermes-9852 communication, and adds the function of directly transferring data between PLCs according to the IPC-Hermes-9852 protocol, filling the gap in the current industry that PLCs do not support IPC-Hermes-9852 communication, and has low communication costs.
[0075] In addition, by utilizing the IPC-Hermes-9852 standard’s customized communication protocols and standardized communication components, there is no need for expensive hardware for communication connections. PLCnext-based M2M communication can be achieved through a single network cable. Compared with existing M2M technologies, the data content is comprehensive and the connection is lightweight, which enhances the flexibility and scalability of production line layout.
[0076] In addition, the process- and user-oriented innovation of communication between machines based on PLCnext control enables PLCnext to have the function of seamless flow of product workflow data between machines (M2M), improving the exchange efficiency of production line workflow data, and effectively solving the problems of unsmooth flow of production line workflow data and difficulty in unified data management in SMT assembly environments, especially in the case of mixed suppliers.
[0077] In addition, for vertical communication, .NetCore APP is developed, i.e. Figure 7The CFX APP (CFX application) in the CFX APP is used to implement the CFX standard communication function, that is, the CFX standard communication between the peripheral devices (such as the upper server). In addition, the input and output interface data of the CFX APP are encapsulated as follows using the IEC61131-3 language: Figure 7 The function library PhCFX in the PLCnext is used by PLC program developers to call the real-time task cyclic task in PLCnext to implement the CFX communication function of the PLC, that is, when the system executes the cyclic task in the PLCnext runtime, it can realize the communication with the CFX APP. By developing CFX applications and corresponding function block libraries, it is possible to communicate with peripheral devices based on the CFX standard based on the CFX application, and by calling the function block library in the cyclic task of the PLCnext platform, it is possible to realize the data interaction between the CFX application and the PLC, so that it can communicate directly according to the CFX standard without the help of PC devices such as industrial computers, and the connection is simple, the hardware cost is low, and the data transmission efficiency is high.
[0078] Compared with the existing technical solutions in the industry, the PLC device with Hermes and CFX communication functions provided in the embodiment of the present application can directly transmit data through PLC based on Hermes and CFX standard communications of PLCnext, and the data transmission eliminates the need for a PC transfer station, which reduces the communication cost. In addition, the PLC device with Hermes and CFX standard communications can achieve physical connection for communication using only one RJ45 network cable, which makes the communication architecture easy to expand flexibly and has high communication efficiency.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A PLC device with CFX communication function, characterized in that: include: A CFX application installed in the underlying operating system of the PLC device, a real-time task based on a preset programming standard, and a first function block library corresponding to the CFX application; Each first function block in the first function block library is obtained by encapsulating the input and output port data of the CFX application program in a preset programming language corresponding to the preset programming standard; The real-time task is used to perform data interaction with the CFX application based on a preset communication protocol by calling a first function block corresponding to the first periodic task when the PLC device executes the first periodic task; The CFX application is used to communicate with the upper system based on the CFX communication standard according to the interactive data between the real-time task and the real-time task.
2. The device according to claim 1, characterized in that The underlying operating system is the PLCnext Linux operating system.
3. The device according to claim 3, characterized in that The CFX application is deployed as a container in the Linux operating system.
4. The device according to claim 1, characterized in that The real-time task is a periodic task in the IEC61131-3 runtime system.
5. The device according to claim 1, characterized in that The preset communication protocol is the remote procedure call gRPC protocol.
6. The device according to claim 1, characterized in that The upper-level system is a data integration system; the data integration system is used to obtain the data of the machine controlled by the PLC device and the production process data.
7. The device according to any one of claims 1 to 5, characterized in that: The PLC device further comprises: a Hermes real-time task library installed in the underlying operating system and a second function block library corresponding to the Hermes real-time task library; the Hermes real-time task library is used to be placed in the program management; the Hermes real-time task library comprises an upstream Hermes program and a downstream Hermes program; Each second function block in the second function block library is obtained by encapsulating the input and output port data of each data interface module in the Hermes real-time task library based on the preset programming language; The real-time task is used to perform data interaction with the Hermes real-time task library based on a preset channel by calling a second function block corresponding to the second periodic task when the PLC device executes the second periodic task; The Hermes real-time task library is used to perform data communication between upstream devices and / or downstream devices of the device controlled by the PLC device based on the interactive data between the real-time task and the Hermes communication standard.
8. The device according to claim 6, characterized in that The Hermes real-time task library is deployed in the extension component of PLCnext.
9. The device according to claim 6, characterized in that The preset channel is the global data space GDS of PLCnext.
10. A PLC device with Hermes communication function, characterized in that: include: A Hermes real-time task library installed in the underlying operating system and a second function block library corresponding to the Hermes real-time task library; the Hermes real-time task library is used to be placed in the program management; the Hermes real-time task library includes an upstream Hermes program and a downstream Hermes program; Each second function block in the second function block library is obtained by encapsulating the input and output port data of each data interface module in the Hermes real-time task library based on the preset programming language; The real-time task is used to perform data interaction with the Hermes real-time task library based on a preset channel by calling a second function block corresponding to the second periodic task when the PLC device executes the second periodic task; The Hermes real-time task library is used to perform data communication between upstream devices and / or downstream devices of the device controlled by the PLC device based on the interactive data between the real-time task and the Hermes communication standard.