Communication Method and Control System for Host and Slave Computers

Through unified server management, communication problems between the upper and lower computers are realized, and the lower computers in different local area networks are reduced, reducing maintenance costs and configuration complexity.

CN118784757BActive Publication Date: 2025-06-20SHENZHEN GUMEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411090671.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2025-06-20
Estimated Expiration
2044-08-09

AI Technical Summary

Technical Problem

In the field of industrial control, communication between the upper and lower computers may not be carried out directly due to deployment areas or network settings. Existing methods such as establishing virtual private network (VPN) channels require tedious application procedures and high maintenance costs.

Method used

The server performs unified management, and the upper computer and the first lower computer communicate with the server through the first protocol, the second lower computer communicates with the first lower computer, and the first lower computer sends registration messages to the server and processes management messages, thereby realizing the management and control of the lower computer by the upper computer.

Benefits of technology

It reduces the maintenance cost of upper and lower computer communications, avoids the need to reconfigure the VPN channel due to changes in network settings, and simplifies the configuration and maintenance of management software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784757B_ABST
    Figure CN118784757B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a communication method and control system for upper and lower computers. The method is applied to the control system, which includes an upper computer, a server, and lower computers. The lower computers include a first lower computer and a second lower computer. The upper computer and the first lower computer are respectively communicatively connected to the server through a first protocol. The second lower computer is communicatively connected to the first lower computer. In the embodiment of the present application, the upper computer can uniformly manage the first lower computer in different local area networks through the server, and then manage and control the second lower computer connected to it through the first lower computer. Based on this, the management software of the upper computer does not need to be newly configured for changes in the number, regional location, or network settings of the upper and lower computers, making maintenance more convenient and the maintenance cost lower.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial control, and particularly to a communication method and control system for an upper computer and a lower computer. Background Art

[0002] In the field of industrial control, an upper computer refers to a computing device that directly issues control instructions, and a lower computer is a computing device that directly controls industrial equipment or obtains the state data of industrial equipment. Specifically, the upper computer sends control instructions to the lower computer, and the lower computer then interprets the control instructions into corresponding timing signals to control the corresponding industrial equipment; the lower computer can also obtain the state data of the industrial equipment according to the control instructions and convert it into a digital signal to feedback to the upper computer. In short, the lower computer is usually managed and controlled by the upper computer.

[0003] In actual application scenarios, due to reasons such as the deployment area or network settings, the upper computer and the lower computer may not be in the same local area network, and the two cannot communicate directly. Currently, enterprises usually implement the communication between the upper computer and the lower computer by establishing a virtual private network (VPN) tunnel.

[0004] However, establishing a VPN tunnel requires the support of a telecommunications service provider, and the application procedures are cumbersome; at the same time, when the number, regional location, or network settings of the upper computer and the lower computer change, the VPN tunnel needs to be newly configured, and the maintenance cost is relatively high. Summary of the Invention

[0005] Embodiments of the present application provide a communication method and control system for an upper computer and a lower computer, which can reduce the maintenance cost of communication between the upper computer and the lower computer.

[0006] A first aspect of an embodiment of the present application provides a communication method for an upper computer and a lower computer, which is applied to a control system. The control system includes an upper computer, a server, and a lower computer. The lower computer includes a first lower computer and a second lower computer; the upper computer and the first lower computer are respectively communicatively connected to the server through a first protocol; the second lower computer is communicatively connected to the first lower computer; the method includes:

[0007] The first slave computer sends a registration message to the server, and the registration message includes the identification information and Internet Protocol (IP) address of the first slave computer; the server verifies the identification information of the first slave computer based on preset identification information, and saves the corresponding IP address after the verification of the identification information of the first slave computer passes. The preset identification information includes the identification information of all the first slave computers in the control system; the master computer sends a management message to the server, and the management message includes the identification information of the first slave computer; the server sends the management message to the first slave computer indicated by the management message based on the IP address corresponding to the identification information of the first slave computer; when the management message is used to instruct the first slave computer to perform an operation, the first slave computer processes the management message; when the management message is used to instruct the second slave computer to perform an operation, the first slave computer sends the management message to the corresponding second slave computer based on the identification information of the second slave computer included in the management message.

[0008] In the embodiments of the present application, the master computer can uniformly manage the first slave computers in different local area networks through the server, and then manage and control the second slave computers connected thereto through the first slave computers. The management software of the master computer does not need to be newly configured according to the changes in the number, regional location or network settings of the master and slave computers, and is more convenient to maintain and has lower maintenance costs.

[0009] In a possible implementation, the management message includes a first management message and a second management message; before the master computer sends the management message to the server, the method further includes: the master computer runs management software and simulation software, the management software is used to manage and control the slave computers, and the simulation software is used to configure simulation interfaces, and each simulation interface corresponds to one slave computer; the management software generates a second management message in a second protocol format, and sends the second management message to the corresponding simulation interface based on the slave computer indicated by the second management message; the simulation software encapsulates the second management message according to the first protocol format of the first protocol, and adds the identification information of the first slave computer corresponding to the simulation interface to the message header of the first protocol format to obtain the first management message; the master computer sending a management message to the server includes: the simulation software sending the first management message to the server.

[0010] In the embodiments of the present application, the master computer can encapsulate the second management message in the second protocol format of the management software into a management message in the first protocol format supported by the server through the simulation software, so that the management software of different manufacturers can manage the corresponding slave computers through the server.

[0011] In a possible implementation, the second management message includes the identification information of the second slave device; based on the identification information of the second slave device included in the management message, the first slave device sends the management message to the corresponding second slave device, including: the first slave device unpacks the first management message to obtain the second management message; the first slave device sends the second management message to the corresponding second slave device based on the identification information of the second slave device.

[0012] In the embodiments of the present application, by unpacking the first management message by the first slave device to obtain the second management message initially generated by the management software, the management software of the master device can manage and control the second slave devices produced by its manufacturer.

[0013] In a possible implementation, the first protocol includes the Message Queuing Telemetry Transport (MQTT) protocol.

[0014] In a possible implementation, the first slave device includes a Human Machine Interface (HMI) screen, and the second slave device includes a Programmable Logic Controller (PLC) device.

[0015] In a possible implementation, the first slave device includes a PLC device.

[0016] In the second aspect of the embodiments of the present application, a control system is provided. The slave device includes a first slave device and a second slave device; the master device and the first slave device are respectively communicatively connected to the server through a first protocol; the second slave device is communicatively connected to the first slave device; the first slave device is configured to send a registration message to the server, and the registration message includes the identification information and the Internet Protocol (IP) address of the first slave device; the server is configured to verify the identification information of the first slave device based on preset identification information, and save the corresponding IP address after the SN verification of the first slave device passes, and the preset identification information includes the identification information of all the first slave devices in the control system; the master device is configured to send a management message to the server, and the management message includes the identification information of the first slave device; the server is further configured to send the management message to the first slave device indicated by the management message based on the IP address corresponding to the identification information of the first slave device; when the management message is used to instruct the first slave device to perform an operation, the first slave device is further configured to process the management message; when the management message is used to instruct the second slave device to perform an operation, the first slave device is further configured to send the management message to the corresponding second slave device based on the identification information of the second slave device included in the management message.

[0017] In a possible implementation, the management message includes a first management message and a second management message; the host computer is further configured to run management software and simulation software, the management software is used to manage and control the slave computer, and the simulation software is used to configure simulation interfaces, where each simulation interface corresponds to a slave computer; the management software is further configured to generate a second management message in a second protocol format, and send the second management message to the corresponding simulation interface based on the slave computer indicated by the second management message; the simulation software is further configured to encapsulate the second management message according to the first protocol format of the first protocol, and add the identification information of the first slave computer corresponding to the simulation interface to the message header of the first protocol format to obtain the first management message; the simulation software is further configured to send the first management message to the server.

[0018] In a possible implementation, the second management message includes the identification information of the second slave computer; the first slave computer is specifically configured to de-encapsulate the first management message to obtain the second management message; the first slave computer is specifically configured to send the second management message to the corresponding second slave computer based on the identification information.

[0019] In a possible implementation, the first protocol includes the MQTT protocol.

[0020] In a possible implementation, the first slave computer includes an HMI screen, and the second slave computer includes a PLC device.

[0021] In a possible implementation, the first slave computer includes a PLC device.

[0022] It should be understood that the beneficial effects of the above aspects can be referred to each other. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0024] Figure 1 It is a system architecture diagram of a control system provided by an embodiment of the present application;

[0025] Figure 2 It is a schematic flowchart of a communication method between the host computer and the slave computer provided by an embodiment of the present application;

[0026] Figure 3 It is a schematic flowchart of another communication method between the host computer and the slave computer provided by an embodiment of the present application;

[0027] Figure 4 A schematic flowchart of another communication method between the upper and lower computers provided by the embodiment of the present application;

[0028] Figure 5 A schematic flowchart of another communication method between the upper and lower computers provided by the embodiment of the present application;

[0029] Figure 6 A schematic flowchart of another communication method between the upper and lower computers provided by the embodiment of the present application;

[0030] Figure 7 A schematic flowchart of another communication method between the upper and lower computers provided by the embodiment of the present application. Detailed implementation manners

[0031] The embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0032] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order other than that shown or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0033] The embodiment of the present application provides a communication method and a control system for the upper and lower computers, which can reduce the communication cost between the upper and lower computers.

[0034] To better understand the embodiments of the present application, the system architecture used in the embodiments of the present application will be described below.

[0035] Please refer to Figure 1 , Figure 1 A schematic diagram of the system framework of a control system provided by the embodiment of the present application. As Figure 1 shown, the system framework may include: an upper computer 10, a server 20, and a lower computer 30; the lower computer 30 includes a first lower computer 31 and a second lower computer 32.

[0036] Among them, the host computer 10 and the first slave computer 31 can be respectively communicatively connected to the server 20, and the second slave computer 32 is communicatively connected to the first slave computer 31. Specifically, the server 20 can be deployed on the public network, the host computer 10 and the first slave computer 31 can be deployed on different local area networks, and the first slave computer 31 and the second slave computer 32 can be deployed on the same local area network; at this time, the host computer 10 and the first slave computer 31 are respectively connected to the server 20 through the network, and the second slave computer 32 can be directly connected to the first slave computer 31 through the network port or serial port.

[0037] Among them, the host computer 10 is used to manage the first slave computer 31 and the second slave computer 32, specifically used to obtain the status data of the first slave computer 31 and the second slave computer 32, and monitor the first slave computer 31 and the second slave computer 32; it is also used to manage and control the first slave computer 31 and the second slave computer 32 according to the status data (such as device reset, power on and off, etc.).

[0038] Exemplarily, the host computer 10 can monitor the status of each hardware device in the first slave computer 31 and the second slave computer 32 (such as humidity, temperature, voltage, current, etc.). For another example, through the host computer 10, the first slave computer 31 and the second slave computer 32 can be controlled to perform system configuration, firmware upgrade, fault diagnosis, etc.

[0039] Specifically, the host computer 10 can be a computing device or a control device in the office area, or an intelligent terminal beside the management personnel. Exemplarily, the host computer 10 can be a personal computer (PC), a laptop computer, a tablet computer, an industrial control computer, a workstation or a touch screen, etc. The embodiments of the present application do not limit the specific form of the host computer 10.

[0040] Among them, the server 20 can be one of a cloud server, a blade server, a high-density server, a rack server, a cabinet server, a general server, a graphics processing unit (GPU) server, a data processing unit (DPU) server or an artificial intelligence (AI) server. The embodiments of the present application do not limit the specific form of the server 20.

[0041] Among them, a cloud platform can be deployed and run in the server 20, and this cloud platform is used to provide cloud services for the host computer 10 and the first slave computer 31. Exemplarily, this cloud platform can be the Gumei cloud platform.

[0042] Among them, the server 20 can communicate with the host computer 10 and the first slave computer 31 respectively through the first protocol. Exemplarily, the first protocol can be the Message Queuing Telemetry Transport (MQTT) protocol.

[0043] Specifically, the server 20 can enable the host computer 10 and the first slave computer 31 in different local area networks to access each other through data transmission, download, control and other instructions defined on the basis of the MQTT protocol.

[0044] Among them, the first slave computer 31 and the second slave computer 32 can be used to manage and control the device components and drive devices of the industrial equipment connected to themselves in the industrial field. Specifically, the first slave computer 31 and the second slave computer 32 can be human machine interface (HMI) screens, single-chip microcomputers or programmable logic controller (PLC) devices.

[0045] Exemplarily, the first slave computer 31 can be an HMI screen, and the second slave computer 32 can be a PLC device.

[0046] Exemplarily, the first slave computer 31 can be a PLC device.

[0047] Specifically, the quantities of the host computer 10, the server 20, the first slave computer 31 and the second slave computer 32 can be set according to actual requirements, and the embodiments of the present application do not specifically limit the quantities of the above devices.

[0048] Exemplarily, each second slave computer 32 is communicatively connected to one first slave computer 31, and each first slave computer 31 can be communicatively connected to one or more second slave computers 32 at the same time; the host computer 10 can manage and control the second slave computers 32 connected to the first slave computer 31 through the first slave computer 31.

[0049] It can be understood that the specific implementation manners of the communication between the host computer 10 and the first slave computer 31 and the second slave computer 32 can refer to the communication method embodiment part in the following text, and will not be elaborated here.

[0050] Optionally, when the total quantity of the second slave computers 32 is multiple, these second slave computers 32 are produced by different manufacturers.

[0051] It should be noted that in specific implementation, the system architecture can be any architecture including Figure 1 a similar structure in. The embodiments of the present application do not limit the specific composition of the system architecture. In addition, Figure 1 the architecture composition shown in does not constitute a limitation on the system architecture, exceptFigure 1 In addition to the devices shown, the system architecture may include more or fewer devices than those illustrated.

[0052] The system framework of the embodiments of the present application has been described above. The methods provided by the embodiments of the present application will be described below.

[0053] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a communication method between the upper and lower computers provided by the embodiments of the present application. This method is applied to the above control system. As Figure 2 shown, this method may include but is not limited to the following steps:

[0054] Step 201: The first lower computer sends a registration message to the server.

[0055] As Figure 2 shown, the first lower computer and the second lower computer are in a communication state.

[0056] Among them, the registration message is used to register and log in to the server so that the server can determine the first lower computer that receives the management message when forwarding the management message sent by the upper computer.

[0057] Among them, the registration message includes the identification information of the first lower computer and the Internet Protocol (IP) address.

[0058] Exemplarily, when the first lower computer is an HMI screen, the identification information may be the serial number (SN). Specifically, the SN may be an identification code of 15 characters. The first 5 characters represent the model of the lower computer, the middle 6 characters represent the production date, and the last 4 characters represent the serial number.

[0059] When the first lower computer is a PLC device, the identification information may be the unique identification code of the PLC device.

[0060] When forwarding the management message, the server may forward the management message to the first lower computer with the corresponding IP address based on the identification information in the management message.

[0061] It can be understood that the second lower computer is communicatively connected to the first lower computer and is not directly communicatively connected to the server. Therefore, the management message always includes the identification information of the first lower computer so that the server can send the management message to the correct first lower computer, and the first lower computer determines whether to forward the management message to the second lower computer connected to it.

[0062] Step 202: The server verifies the identification information of the first lower computer based on the preset identification information, and saves the corresponding IP address after the verification of the identification information of the first lower computer passes.

[0063] Among them, the preset identification information is the identification information of all the first slave computers in this control system that is pre-input to the server. Before the server executes step 202, the server can receive the preset identification information input by the administrator and store it. Specifically, the administrator can input the preset identification information into the server through an input device, a storage device, or a browser; or update the preset identification information to the server by downloading a file or synchronizing data through the network.

[0064] For example, the product system of the manufacturer can synchronize the identification information of the slave computer to the server when the slave computer leaves the factory or is started for the first time; another example is that the employees in the production department of the manufacturer can directly input the identification information of the slave computer devices leaving the factory into the server through the browser.

[0065] Among them, the server can verify the identification information of the first slave computer based on the preset identification information to determine whether the object applying for registration is the first slave computer in this control system.

[0066] Specifically, the server can compare the identification information of the first slave computer with the preset identification information. When the identification information of the first slave computer is consistent with one of the preset identification information, it is determined that the verification is passed; then, the server can save the IP address in the corresponding registration message. That is to say, when the server determines that the object applying for registration is the first slave computer in this control system, it saves the IP address of the object.

[0067] Optionally, the registration message may further include the device type, model of the first slave computer, and the version number of the application program in the device. The server can record this information and forward the management message based on this information.

[0068] It can be understood that the server can also perform verification based on the identification information and other rules, and the embodiments of the present application do not make specific limitations on this.

[0069] After the identification information of the first slave computer passes the verification, the server can return a registration success message to the first slave computer, so that the first slave computer can respond to the management message forwarded by the server and send a corresponding response message to the server; it can also update the information of the first slave computer itself or the second slave computer connected to the first slave computer to the server in real time.

[0070] Step 203, the master computer sends a management message to the server.

[0071] Among them, the management message is used to manage and control the slave computers in this control system, and is specifically used to instruct the first slave computer or the second slave computer to perform corresponding operations. Exemplarily, the management message includes a download notification message for instructing the slave computer to update the application program, and also includes a status subscription message for subscribing to the status data of the slave computer.

[0072] Among them, the management message is a message in the first protocol format of the first protocol.

[0073] Exemplarily, the first protocol may be the MQTT protocol.

[0074] Among them, the management message includes the identification information of the first lower-level machine. When the management message is used to instruct the first lower-level machine to perform an operation, the management message includes the identification information corresponding to the first lower-level machine; when the management message is used to instruct the second lower-level machine to perform an operation, the management message includes not only the identification information corresponding to the second lower-level machine, but also the identification information of the first lower-level machine connected to the second lower-level machine.

[0075] It can be understood that the upper-level machine stores the identification information of the first lower-level machine and the second lower-level machine, as well as their corresponding connection relationships; when it is necessary to send a management message to the second lower-level machine, the upper-level machine can obtain the identification information of the first lower-level machine connected to the second lower-level machine, and add the identification information to the management message, so as to forward the management message to the second lower-level machine through the server and the first lower-level machine.

[0076] Step 204: The server sends the management message to the first lower-level machine indicated by the management message based on the IP address corresponding to the identification information of the first lower-level machine.

[0077] Among them, after receiving the management message, the server can obtain the identification information of the first lower-level machine in the management message; then find the corresponding IP address from the stored IP addresses based on the identification information, and then forward the management message to the corresponding first lower-level machine based on the IP address.

[0078] In some other possible implementations, the management message further includes the device type, model, or application program version number of the lower-level machine; the server can determine the identification information of one or more corresponding first lower-level machines based on this information; then determine the corresponding IP address according to this identification information, and finally forward the management message.

[0079] Step 205: When the management message instructs the first lower-level machine to perform an operation, the first lower-level machine processes the management message.

[0080] Among them, after receiving the management message, the first lower-level machine can determine whether the recipient of the management message is itself or the second lower-level machine connected to itself based on the management message; if it is itself, then the first lower-level machine can directly process the management message and perform the operation according to the instruction of the management message; if it is the second lower-level machine connected to itself, then the first lower-level machine can execute step 206.

[0081] Specifically, when the management message instructs the first subordinate device to perform an operation, the management message contains the identification information of the first subordinate device and does not contain the identification information of the second subordinate device; the first subordinate device can obtain the identification information of the first subordinate device and determine whether it is its own identification information, so as to determine whether to process the management message.

[0082] Exemplarily, the first subordinate device can be an HMI screen or a PLC device.

[0083] Step 206: When the management message instructs the second subordinate device to perform an operation, the first subordinate device sends the management message to the corresponding second subordinate device.

[0084] Among them, when the management message instructs the second subordinate device to perform an operation, the management message contains the identification information of the first subordinate device and the identification information of the second subordinate device. The first subordinate device can determine whether the recipient of the management message is connected to itself based on the identification information of the second subordinate device; if so, the first subordinate device can delete the identification information of the first subordinate device in the management message, convert the management message into a protocol format supported by the second subordinate device, and then forward the management message to the second subordinate device; if not, the first subordinate device can discard the management message.

[0085] Exemplarily, the first subordinate device can be an HMI screen, and the second subordinate device can be a PLC device.

[0086] Exemplarily, the management message is a PLC message encapsulated in the first protocol format, and the identification information of the first subordinate device is in the message header of the first protocol format; the HMI screen (the first subordinate device) can decompose the management message to obtain the PLC message and the identification information of the second subordinate device therein; then determine the corresponding PLC device (the second subordinate device) based on the identification information of the second subordinate device and forward the management message.

[0087] In the embodiments of the present application, the host computer can uniformly manage the first subordinate devices in different local area networks through the server, and then manage and control the second subordinate devices connected to the first subordinate devices. The management software of the host computer does not need to be newly configured for changes in the number, regional location, or network settings of the host and subordinate devices, which is more convenient to maintain and has a lower maintenance cost.

[0088] Different manufacturers often use different management software to manage the subordinate devices they produce, and these management software do not all support communication in the first protocol; when the management software that does not support communication in the first protocol runs on the host computer, it is difficult to manage the corresponding subordinate devices through the server.

[0089] To solve the above technical problems, the embodiments of the present application also provide another communication method for the host and subordinate devices, which can be specifically referred toFigure 3 , Figure 3 is a schematic flowchart of another communication method between the upper and lower computers provided by an embodiment of the present application. This method is applied to the above control system, such as Figure 3 shown, this method may include but is not limited to the following steps:

[0090] Step 301, the first lower computer sends a registration message to the server.

[0091] Step 302, the server verifies the identification information of the first lower computer based on preset identification information, and saves the corresponding IP address after the identification information of the first lower computer passes the verification.

[0092] Steps 301 to 302 in this embodiment are similar to the implementation manners of steps 201 to 202 in the embodiment Figure 2 shown, and will not be elaborated here.

[0093] Step 303, the simulation software running on the upper computer configures the simulation interface.

[0094] Among them, before starting to manage the lower computer, the upper computer can run the simulation software and the management software; the management software is used to manage and control the lower computer, and the simulation software is used to configure the simulation interface, and each simulation interface corresponds to a lower computer.

[0095] Specifically, the simulation software can obtain the identification information of the lower computers in the control system saved in the upper computer, as well as the corresponding connection relationship between the first lower computer and the second lower computer; then, the simulation software can configure the simulation interfaces corresponding to each lower computer one by one, and record the identification information of the first lower computer corresponding to each simulation interface.

[0096] It can be understood that when the simulation interface corresponds to the first lower computer A, the identification information of the first lower computer corresponding to this simulation interface is the identification information of the first lower computer 1; when the simulation interface corresponds to the second lower computer B, the identification information of the first lower computer corresponding to this simulation interface is the identification information of the first lower computer C connected to the second lower computer B.

[0097] Among them, the simulation interface includes a simulation network port and a simulation serial port.

[0098] Step 304, the management software running on the upper computer generates a second management message.

[0099] Among them, this management software supports second protocol communication and does not support first protocol communication, so the generated second management message is in the second protocol format.

[0100] Exemplarily, this management software may include VCOOL software, Samsoal software, Gumei VTool software, and Mitsubishi GxWorks2 software.

[0101] Step 305, the management software sends a second management message to the simulation software.

[0102] Among them, after the management software generates a second management message for managing a certain lower-level computer, the management software can determine the simulation interface corresponding to the lower-level computer and send the second management message to the simulation interface.

[0103] Exemplarily, the management software can select the com1 / com2 option (i.e., the simulation network port) corresponding to the lower-level computer in the simulation software and send the second management message to the simulation network port; or select the Eth1 / Eth2 option (i.e., the simulation serial port) corresponding to the lower-level computer and send the second management message to the simulation serial port.

[0104] From the perspective of the management software, the lower-level computer is connected to the upper-level computer through the simulation interface. Therefore, when the management software sends the second management message to the simulation interface, it is equivalent to sending the second management message to the lower-level computer.

[0105] Step 306, the simulation software encapsulates the second management message according to the first protocol format of the first protocol, and adds the identification information of the first lower-level computer corresponding to the simulation interface to the message header of the first protocol format to obtain a first management message.

[0106] Among them, the simulation software can encapsulate the second management message according to the first protocol format to obtain a first management message in the first protocol format, so that the server can parse the first management message and perform corresponding forwarding.

[0107] Among them, the identification information of the first lower-level computer corresponding to the simulation interface is added to the message header of the first protocol format of the first management message, so that the server can forward the first management message to the corresponding first lower-level computer based on the identification information.

[0108] In the case where the management software may not support the MQTT protocol (the first protocol), that is, it cannot directly communicate with the server, the management software can first send the second management message to the simulation software. After the simulation software converts the second management message into a first management message in the MQTT protocol format, it then sends the first management message in the MQTT protocol format to the server.

[0109] Step 307, the simulation software of the upper-level computer sends the first management message to the server.

[0110] Step 308, the server sends the first management message to the first lower-level computer indicated by the first management message based on the IP address corresponding to the identification information of the first lower-level computer.

[0111] Steps 307 to 308 of this embodiment are the same as Figure 2In the illustrated embodiment, the implementation manners of steps 203 to 204 are similar, and thus will not be elaborated herein.

[0112] Step 309: The first slave computer decapsulates the first management message to obtain the second management message therein.

[0113] Among them, the first slave computer supports first protocol communication. After receiving the first management message, the first slave computer can directly parse the first management message in the first protocol format to obtain the data content of the second management message therein.

[0114] When it is determined that the second management message instructs the first slave computer to perform an operation, the first slave computer executes step 310; when it is determined that the second management message instructs the second slave computer to perform an operation, the first slave computer executes step 311.

[0115] Step 310: When the second management message instructs the first slave computer to perform an operation, the first slave computer processes the first management message.

[0116] Step 311: When the second management message instructs the second slave computer to perform an operation, the first slave computer sends a management message to the corresponding second slave computer.

[0117] Steps 310 to 311 in this embodiment are Figure 2 similar to the implementation manners of steps 205 to 206 in the illustrated embodiment, and thus will not be elaborated herein.

[0118] In the embodiment of the present application, the host computer can encapsulate the second management message in the second protocol format of the management software into a management message in the first protocol format supported by the server through simulation software, so that the management software of different manufacturers can manage the corresponding slave computers through the server.

[0119] Next, the communication method between the host computer and the slave computer executed by the control system will be further described through four embodiments. For the sake of brief description, the registration process of the first slave computer will be omitted in the following embodiments.

[0120] 1. Embodiment of remotely controlling the upgrade of the application program of the HMI screen.

[0121] Please refer to Figure 4 , Figure 4 , which is a schematic flowchart of another communication method between the host computer and the slave computer provided by the embodiment of the present application. As Figure 4 shown, this method is applied to the above control system, and the first slave computer is the HMI screen; this method includes the following steps:

[0122] Step 401: The host computer uploads the HMI configuration screen program to the server.

[0123] Among them, after the HMI configuration screen program of the HMI screen is updated iteratively, the host computer can download the latest HMI configuration screen program from the network and upload the HMI configuration screen program to the server.

[0124] Optionally, the host computer can also first obtain the version of the HMI configuration screen program in the HMI screen, and then download the upgrade software package required to upgrade from this version to the latest version; and then upload the upgrade software package to the server.

[0125] Step 402: The server saves the HMI configuration screen program.

[0126] Among them, after receiving the HMI configuration screen program, the server can temporarily save the HMI configuration screen program in the server, such as deleting it after 24 hours of storage, or deleting it after determining that the corresponding HMI screen has completed the download of the HMI configuration screen program.

[0127] Step 403: The host computer sends a first download notification message to the server.

[0128] Among them, the first download notification message is used to instruct the HMI screen to download the HMI configuration screen program from the server. Specifically, the first download notification message includes the SN of the corresponding HMI screen, and directly instructs the download service of the corresponding HMI screen to perform a download operation.

[0129] Step 404: The server forwards the first download notification message to the HMI screen.

[0130] After receiving the download notification message, the server can find the IP address of the HMI screen saved in the server based on the SN of the HMI screen in the first download notification message, and forward the first download notification message to the HMI screen based on the IP address.

[0131] Step 405: The HMI screen sends a first download request to the server.

[0132] After receiving the first download notification message, the HMI screen can determine whether the SN of the HMI screen in the first download message is its own SN; if so, the sys / Down / $SN service of the HMI screen can send a first download request to the server based on the first download notification message to request to download the corresponding HMI configuration screen program in the server; if not, the HMI screen can discard the first download notification message.

[0133] Step 406: The server sends the HMI configuration screen program to the HMI screen.

[0134] Among them, the server can respond to the first download request and send the corresponding HMI configuration screen program to the HMI screen. After sending the HMI configuration screen program, or after receiving the update completion message sent by the HMI screen, the server can record relevant logs.

[0135] It can be understood that after receiving the HMI configuration screen program, the HMI screen installs the HMI configuration screen program to complete the upgrade of the HMI configuration screen program.

[0136] In the embodiment of the present application, the upper computer uploads the HMI configuration screen program pre-stored or downloaded from the public network to the server, and instructs the HMI screen to download the HMI configuration screen program from the server through the first download notification message, which can realize the remote upgrade of the engineering software of the HMI screen through the server.

[0137] II. Embodiment of remotely controlling the upgrade of the application program of the PLC device.

[0138] Please refer to Figure 5 , Figure 5 which is a schematic flow chart of another communication method between the upper and lower computers provided by the embodiment of the present application. As Figure 5 shown, this method is applied to the above control system, where the first lower computer is the HMI screen and the second lower computer is the PLC device; this method includes the following steps:

[0139] Step 501: The upper computer uploads the PLC program to the server.

[0140] Step 502: The server saves the PLC program.

[0141] Steps 501 to 502 in this embodiment are similar to the implementation manners of steps 401 to 402 in the Figure 4 shown embodiment. The PLC program in this embodiment is equivalent to the Figure 4 HMI configuration screen program in the embodiment, and will not be elaborated here.

[0142] Step 503: The upper computer sends a second download notification message to the server.

[0143] Among them, the second download notification message includes the SN of the HMI screen and the identification information of the PLC device.

[0144] Among them, the second download notification message is used to instruct the HMI screen that manages the PLC device to download the PLC program from the server and forward it to the PLC device. Specifically, the second download notification message is used to notify the HMI screen to download the PLC program in the sys / Down / $SN field.

[0145] Step 504: The server forwards the second download notification message to the HMI screen.

[0146] Among them, the server can forward the second download notification message to the corresponding HMI screen based on the SN of the HMI screen in the second download notification message.

[0147] Step 505: The HMI screen sends a second download request to the server.

[0148] Step 506: The server sends the PLC program to the HMI screen.

[0149] Steps 505 and 506 in this embodiment are similar to the implementation manners of steps 404 and 405 in the Figure 4 illustrated embodiment, and will not be elaborated here.

[0150] Step 507: The HMI screen sends the PLC program to the PLC device.

[0151] Among them, the HMI screen can forward different messages based on different interfaces connected to the PLC device itself. After receiving the PLC program, the HMI screen can determine the corresponding PLC device based on the identification information of the PLC device in the second download notification message, and send the PLC program to the PLC device through the rs232 interface connected to the PLC device.

[0152] It should be noted that this embodiment is an example of two-level transparent transmission. In actual applications, more levels of transparent transmission can also be implemented. The implementation manners simply derived and changed based on the technical idea of this embodiment are also within the protection scope of the embodiments of this application.

[0153] In the embodiments of this application, the upper computer uploads the PLC program pre-stored or downloaded from the public network to the server, and instructs the HMI screen to download the HMI configuration screen program from the server through the second download notification message and forward it to the corresponding PLC device, which can realize remote upgrading of the application program of the PLC device through the server.

[0154] III. Embodiment of subscribing to the status data of the PLC device connected to the HMI screen.

[0155] Please refer to Figure 6 , Figure 6 which is a schematic flowchart of another communication method between the upper and lower computers provided by the embodiments of this application. As Figure 6 shown, this method is applied to the above control system, where the first lower computer is the HMI screen and the second lower computer is the PLC device; this method includes the following steps:

[0156] Step 601: The simulation software running on the upper computer configures the simulation interface.

[0157] Step 602: The management software running on the upper computer generates a second status subscription message.

[0158] Among them, the second status subscription message is used to subscribe to the status data of the PLC device, and the status data includes the relevant data of the hardware status of the PLC device, such as humidity, temperature, voltage, current, device running time, etc.

[0159] Step 603: The management software sends the second status subscription message to the simulation software.

[0160] Step 604: The simulation software encapsulates the second status subscription message according to the first protocol format of the first protocol, and adds the identification information of the HMI screen corresponding to the simulation interface to the message header of the first protocol format to obtain the first status subscription message.

[0161] Step 605: The simulation software sends the first status subscription message to the server.

[0162] Step 606: The server sends the first status subscription message to the corresponding HMI screen.

[0163] Steps 601 to 606 in this embodiment are similar to the implementation manners of steps 303 and 308 in the Figure 3 illustrated embodiment, and will not be elaborated here.

[0164] Step 607: The HMI screen forwards the first status subscription message to the corresponding PLC device.

[0165] After receiving the first status subscription message, the HMI screen can de-encapsulate it to obtain the second status subscription message; then, based on the identification information of the PLC device in the second status subscription message, forward the second status subscription message to the corresponding PLC device.

[0166] Step 608: The PLC device sends status data to the HMI screen.

[0167] After receiving the second status subscription message, the PLC device can obtain its corresponding status data based on the indication in the status subscription message; then send the status data to the HMI screen in the form of a second response message.

[0168] Among them, the second response message is the response message corresponding to the second status subscription message.

[0169] Step 609: The HMI screen sends the first response message to the server.

[0170] Among them, the HMI screen can encapsulate the status data according to the first protocol format to obtain the first response message; then send the first response message to the server.

[0171] Exemplarily, the first response message is the response message corresponding to the first status subscription message.

[0172] Step 610: The server forwards the first response message to the host computer.

[0173] After receiving the first response message, the server can forward the first response message to the host computer.

[0174] Step 611: The simulation software running on the host computer sends a second response message to the management software based on the first response message.

[0175] Among them, after receiving the first response message, the host computer can unpack the first response message through the simulation software to obtain a second response message in the second protocol format; then the simulation software sends the second response message to the management software, and the management software can obtain the status data of the corresponding PLC device from the received response message to view, configure, and monitor the PLC device in real time.

[0176] Exemplarily, the management software GXWork of Mitsubishi does not support communicating with PLC devices through the MQTT protocol format; in the embodiment of the present application, the Mitsubishi management software can encapsulate its management message into a message in the MQTT protocol format through the simulation software and send it to the server; after the server forwards the message to the HMI screen that also supports MQTT protocol communication, the HMI screen unpacks it and obtains the message packet that can be processed by the Mitsubishi PLC device, and then forwards the message packet to the Mitsubishi PLC device for processing. The reverse communication process is the same.

[0177] Therefore, in the embodiment of the present application, the communication between the host computers and slave computers of different manufacturers in the same control system can be realized through the simulation software and HMI screen that support the first protocol communication; and through the multi-level transparent transmission method, the host computers of different manufacturers can manage, monitor, and control the corresponding PLC devices in a multi-level and real-time manner.

[0178] IV. Embodiment of subscribing to the status data of PLC devices directly connected to the server.

[0179] Please refer to Figure 7 , Figure 7 which is a schematic flowchart of another communication method between the host computer and slave computer provided by the embodiment of the present application. As Figure 7 shown, this method is applied to a control system, where the first slave computer is a PLC device; this method includes the following steps:

[0180] Step 701: The simulation software running on the host computer configures the simulation interface.

[0181] Step 702: The management software running on the host computer generates a fourth status subscription message.

[0182] Among them, the fourth status subscription message is used to subscribe to the status data of the PLC device, and the fourth status subscription message is a message that the PLC device can directly parse.

[0183] Among them, the fourth status subscription message includes the identification information of the PLC device.

[0184] Step 703: The management software sends the fourth status subscription message to the simulation software.

[0185] Step 704: The simulation software encapsulates the second status subscription message according to the first protocol format of the first protocol to obtain the third status subscription message.

[0186] Step 705: The simulation software sends the third status subscription message to the server.

[0187] Step 706: The server sends the third status subscription message to the corresponding PLC device.

[0188] Steps 701 to 706 in this embodiment are similar to Figure 3 the implementation manners of steps 303 and 308 in the embodiment shown, and will not be elaborated here.

[0189] Step 707: The PLC device sends a third response message to the server.

[0190] Among them, the PLC device in this embodiment is used as the first lower-level machine and can communicate with the server through the first protocol, that is, it can directly parse and process the third status subscription message in the first protocol format.

[0191] Therefore, the PLC device can directly obtain its own status data based on the third status subscription message, generate a fourth response message containing these status data; then encapsulate the fourth response message into a third response message in the first protocol format; finally, send the third response message to the server.

[0192] Step 708: The server forwards the third response message to the upper-level machine.

[0193] Step 709: The simulation software running on the upper-level machine sends a fourth response message to the management software based on the third response message.

[0194] Steps 708 to 709 in this embodiment are similar to Figure 6 the implementation manners of steps 610 and 611 in the embodiment shown, and will not be elaborated here.

[0195] In the embodiments of the present application, the host computer can send management messages to the server through simulation software that supports the MQTT protocol, enabling management software that does not support the MQTT protocol to manage PLC devices communicating using the MQTT protocol through this server. That is, the host computer can manage PLC devices from different manufacturers.

[0196] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.

[0197] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0198] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0199] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0200] In addition, in each embodiment of the embodiments of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0201] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

Claims

1. A communication method between a host and a server, characterized in that: The method is applied to a control system, the control system includes a host computer, a server and a slave computer, the slave computer includes a first slave computer and a second slave computer; the host computer and the first slave computer are respectively connected to the server through a first protocol; The second slave computer is communicatively connected with the first slave computer; the method comprises: The first slave computer sends a registration message to the server, wherein the registration message includes identification information and an Internet Protocol (IP) address of the first slave computer; The server verifies the identification information of the first slave computer based on preset identification information, and saves the corresponding IP address after the identification information of the first slave computer passes the verification, wherein the preset identification information includes the identification information of all the first slave computers in the control system; The upper computer sends a management message to the server, wherein the management message includes identification information of the first lower computer; The server sends the management message to the first lower computer indicated by the management message based on the IP address corresponding to the identification information of the first lower computer; In the case where the management message is used to instruct the first lower computer to perform an operation, the first lower computer processes the management message; In the case where the management message is used to instruct the second lower computer to perform an operation, the first lower computer sends the management message to the corresponding second lower computer based on the identification information of the second lower computer contained in the management message; The management message includes a first management message and a second management message. Before the host computer sends the management message to the server, the method further includes: The upper computer runs management software and simulation software, wherein the management software is used to manage and control the lower computer, and the simulation software is used to configure simulation interfaces, each simulation interface corresponding to one lower computer; The management software generates a second management message in a second protocol format, and based on the lower computer indicated by the second management message, sends the second management message to the corresponding simulation interface; The simulation software encapsulates the second management message according to the first protocol format of the first protocol, and adds the identification information of the first slave computer corresponding to the simulation interface to the message header of the first protocol format to obtain the first management message; The host computer sends a management message to the server, including: The simulation software sends the first management message to the server.

2. The method according to claim 1, characterized in that The second management message includes identification information of the second lower computer; the first lower computer sends the management message to the corresponding second lower computer based on the identification information of the second lower computer included in the management message, including: The first lower computer decapsulates the first management message to obtain the second management message; The first slave computer sends the second management message to the corresponding second slave computer based on the identification information of the second slave computer.

3. The method according to any one of claims 1 to 2, characterized in that: The first protocol includes the Message Queue Telemetry Transport (MQTT) protocol.

4. The method according to any one of claims 1 to 2, characterized in that The first slave computer includes a human-machine interface HMI screen, and the second slave computer includes a programmable logic controller PLC device.

5. The method according to any one of claims 1 to 2, characterized in that: The first lower computer includes a PLC device.

6. A control system, comprising a host computer, a server and a slave computer, wherein the slave computer comprises a first slave computer and a second slave computer; the host computer and the first slave computer are respectively connected to the server through a first protocol; the second slave computer is connected to the first slave computer through communication; The first slave computer is used to send a registration message to the server, wherein the registration message includes identification information and an Internet Protocol IP address of the first slave computer; The server is used to verify the identification information of the first slave computer based on preset identification information, and save the corresponding IP address after the identification information of the first slave computer is verified, and the preset identification information includes the identification information of all the first slave computers in the control system; The upper computer is used to send a management message to the server, wherein the management message includes identification information of the first lower computer; The server is further configured to send the management message to the first lower computer indicated by the management message based on the IP address corresponding to the identification information of the first lower computer; In the case where the management message is used to instruct the first lower computer to perform an operation, the first lower computer is further used to process the management message; In the case where the management message is used to instruct the second lower computer to perform an operation, the first lower computer is further used to send the management message to the corresponding second lower computer based on the identification information of the second lower computer contained in the management message, and the management message includes a first management message and a second management message; The upper computer is also used to run management software and simulation software, the management software is used to manage and control the lower computer, and the simulation software is used to configure simulation interfaces, each simulation interface corresponds to one lower computer; The management software is further used to generate a second management message in a second protocol format, and send the second management message to the corresponding simulation interface based on the lower computer indicated by the second management message; The simulation software is further used to encapsulate the second management message according to the first protocol format of the first protocol, and add the identification information of the first slave computer corresponding to the simulation interface to the message header of the first protocol format to obtain the first management message; The simulation software is also used to send the first management message to the server.

7. The system according to claim 6, characterized in that The second management message includes identification information of the second slave computer; The first lower computer is specifically used to decapsulate the first management message to obtain the second management message; The first lower computer is specifically configured to send the second management message to the corresponding second lower computer based on the identification information of the second lower computer.

8. The system according to any one of claims 6-7, characterized in that: The first protocol includes the Message Queue Telemetry Transport (MQTT) protocol.

Citation Information

Patent Citations

  • Mobile storage device management system based on hierarchical management and control

    CN115048062A

  • Internet of things data acquisition system in IPv6 environment and acquisition method thereof

    CN116488996A

  • Communication method and system applied to upper and lower computers and related device

    CN118138656A