Method, device and gateway for obtaining industrial equipment point table data
By analyzing the communication data packets of industrial equipment and automatically extracting point table data, the problem of low efficiency in industrial equipment point table data acquisition is solved, real-time collection of equipment information and project implementation is realized.
Patent Information
- Application Number
- CN202111222356.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-20
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-10-20
AI Technical Summary
In the prior art, the collection of industrial equipment point-table data is not efficient, especially the old equipment manufacturers are unable to provide point-table data, resulting in the inability to implement and deliver industrial Internet projects.
By determining the communication protocol it supports based on the type of industrial equipment, monitoring the data transmission channel between the device and the controller, analyzing the communication data packets, extracting point table data, including point table address and point table value, to automatically obtain the device point table point table .
Without the need for point tables from the equipment manufacturer, real-time collection of equipment information is realized, the problem of equipment information collection is solved, and the efficiency and feasibility of industrial equipment data acquisition is improved.
Smart Images

Figure CN113905107B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial Internet technology, and in particular to a method, device, gateway and storage medium for acquiring point table data of industrial equipment. Background Art
[0002] Realizing intelligent manufacturing and helping enterprises reduce costs and increase efficiency have become the primary goals of enterprise digital transformation. As the basic data of the industrial Internet, the collection of industrial equipment information has become an indispensable link.
[0003] In the existing equipment information collection solution, the equipment manufacturer needs to provide the equipment point list and then configure the gateway. However, due to the strong industry characteristics of the industry itself, many industrial equipment are mainly customized. In the process of implementing the equipment information collection project, it was found that the existing equipment point list data collection was inconvenient and inefficient. In addition, many manufacturers of old equipment could not be contacted or the equipment data was lost, and the equipment point list could not be provided, resulting in the inability to collect equipment information and the inability to deliver the industrial Internet project.
[0004] Therefore, how to efficiently obtain the point table data of industrial equipment is an urgent problem to be solved. Summary of the invention
[0005] Based on this, it is necessary to provide an industrial equipment point table data acquisition method, device, gateway and storage medium that can automatically acquire equipment point table data in response to the above technical problems.
[0006] A method for acquiring industrial equipment point table data, the method comprising:
[0007] Determining the communication protocol supported by the industrial device according to the device type of the industrial device;
[0008] Monitoring a data transmission channel between the industrial device and a corresponding device controller, and acquiring a communication data packet transmitted by the industrial device on the data transmission channel; wherein the communication data packet has a message type specified by a communication protocol supported by the industrial device, and data packets under different message types have different message formats;
[0009] Parsing the communication data packet based on the communication protocol to determine the message type of the communication data packet;
[0010] Corresponding point table data are extracted according to the message type of the communication data packet and the message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0011] In one embodiment, determining the communication protocol supported by the industrial device according to the device type to which the industrial device belongs includes:
[0012] Acquire a data packet transmitted by the industrial device; the data packet includes at least one type of device information of the industrial device, including the name, model, and serial number;
[0013] According to the correspondence table between industrial equipment and communication protocols, a communication protocol corresponding to at least one device information of the industrial equipment is searched and obtained, so as to obtain the communication protocol supported by the industrial equipment.
[0014] In one embodiment, parsing the communication data packet based on the communication protocol includes:
[0015] A target parsing program compatible with the communication protocol is selected from multiple protocol parsing programs, and the communication data packet is parsed using the target parsing program; wherein the protocol parsing program is downloaded by the industrial gateway through the industrial Internet and stored in the local storage space.
[0016] In one of the embodiments, extracting corresponding point table data according to the message type of the communication data packet and the message format corresponding to the message type includes:
[0017] If it is determined that the message type of the communication data packet is a query message, converting the content of the data packet based on a pre-stored coding table, and extracting at least one point table address in the query message according to a message format corresponding to the query message;
[0018] If it is determined that the message type of the communication data packet is a response message, the content of the data packet is converted based on the coding table, and at least one point table value in the response message is extracted according to the message format corresponding to the response message; wherein the point table value is stored in the memory space pointed to by the corresponding point table address.
[0019] In one of the embodiments, if it is determined that the message type of the communication data packet is a query message, the method further includes:
[0020] The memory space on the device controller pointed to by the point table address in the query message is accessed, and the point table value corresponding to the point table address is read from the memory space.
[0021] In one of the embodiments, the device controller is connected to the control device via a one-to-two serial port line, and one of the serial port lines is connected to the serial port of the industrial gateway.
[0022] In one of the embodiments, the device controller is connected to the control device via Ethernet; a mirror switch is provided between the device controller and the control device, and the network port of the industrial gateway is connected to the network port of the mirror switch.
[0023] A device for acquiring industrial equipment point table data, the device comprising:
[0024] A determination module, used to determine the communication protocol supported by the industrial device according to the device type to which the industrial device belongs;
[0025] An acquisition module, used to monitor the data transmission channel between the industrial device and the corresponding device controller, and acquire the communication data packet transmitted by the industrial device on the data transmission channel; wherein the communication data packet has a message type specified by the communication protocol supported by the industrial device, and data packets under different message types have different message formats;
[0026] A parsing module, used to parse the communication data packet based on the communication protocol to determine the message type of the communication data packet;
[0027] The extraction module is used to extract corresponding point table data according to the message type of the communication data packet and the message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0028] A gateway comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0029] Determining the communication protocol supported by the industrial device according to the device type of the industrial device;
[0030] Monitoring a data transmission channel between the industrial device and a corresponding device controller, and acquiring a communication data packet transmitted by the industrial device on the data transmission channel; wherein the communication data packet has a message type specified by a communication protocol supported by the industrial device, and data packets under different message types have different message formats;
[0031] Parsing the communication data packet based on the communication protocol to determine the message type of the communication data packet;
[0032] Corresponding point table data are extracted according to the message type of the communication data packet and the message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0033] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0034] Determining the communication protocol supported by the industrial device according to the device type of the industrial device;
[0035] Monitoring a data transmission channel between the industrial device and a corresponding device controller, and acquiring a communication data packet transmitted by the industrial device on the data transmission channel; wherein the communication data packet has a message type specified by a communication protocol supported by the industrial device, and data packets under different message types have different message formats;
[0036] Parsing the communication data packet based on the communication protocol to determine the message type of the communication data packet;
[0037] Corresponding point table data are extracted according to the message type of the communication data packet and the message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0038] The above-mentioned method, device, gateway and storage medium for obtaining point table data of industrial equipment obtain the communication protocol supported by the industrial equipment and monitor the data transmission between the equipment controller and the control device of the industrial equipment, parse the captured communication data packet based on the communication protocol, and extract the corresponding point table data according to the message type and message format of the communication data packet, thereby realizing automatic and efficient acquisition of the equipment point table, and solving the problem of equipment information collection when the equipment manufacturer is unable to provide the point table for various reasons. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A diagram of an application environment of a method for acquiring industrial equipment point table data in an embodiment;
[0040] Figure 2 A schematic diagram of a connection method between a device controller and an industrial gateway in one embodiment;
[0041] Figure 3 A schematic diagram of a connection method between a device controller and an industrial gateway in another embodiment;
[0042] Figure 4 It is a flowchart of a method for obtaining industrial equipment point table data in one embodiment;
[0043] Figure 5 A flowchart of the steps of an industrial gateway determining a communication protocol supported by an industrial device in one embodiment;
[0044] Figure 6 A flowchart of the steps of extracting corresponding point table data by an industrial gateway in one embodiment;
[0045] Figure 7 A schematic diagram of a process for obtaining point table data for industrial equipment in a specific embodiment;
[0046] Figure 8A schematic diagram of a process of performing message parsing on an industrial device in a specific embodiment;
[0047] Fig. 9 It is a structural block diagram of a device for acquiring industrial equipment point table data in one embodiment;
[0048] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] The existing data collection method requires equipment manufacturers to provide equipment point lists, and obtain necessary configuration information from the point list information to subsequently collect industrial equipment information. However, this type of equipment point list data collection is inconvenient and inefficient. In addition, when equipment manufacturers are unable to provide point lists for various reasons, industrial equipment information collection becomes an unsolvable problem.
[0051] Another existing data collection method is to add sensors to industrial equipment by modifying them, and obtain data on the equipment (such as temperature, pressure, equipment status, etc.) through sensor induction and electrical signal access. However, this solution requires adding sensors and equipment modification, which has the disadvantages of obtaining fewer equipment parameters, a long implementation cycle, and high project implementation costs.
[0052] In view of this, the present application provides a method, device, gateway and storage medium for obtaining point table data of industrial equipment. By parsing data packets according to a pre-configured communication protocol and extracting point table data according to message type and message format, it is possible to automatically parse and obtain point table data of industrial equipment, thereby enabling real-time collection of parameters in the equipment production process without the need for equipment manufacturers to provide point tables.
[0053] It should be noted that the term "point table" is an industry term for automated control systems, used to characterize the usage of various variables in automated control systems. In automated control, variable points are referred to as points, and the number of variables used in automated control systems is called the number of points. Point tables are an important basis and protocol standard for equipment providers, software providers, and system integrators. The construction of the entire automated control system is based on the description and regulations of the variables in the point table. Usually, each variable will have a corresponding unique variable name, device name, device address, register, register address, and other related content.
[0054] The method for obtaining industrial equipment point table data provided in this application can be applied to Figure 1In the application environment shown. The device controller 101 of the industrial equipment is connected to the industrial equipment 102 through a network, and the industrial gateway 103 is connected to the device controller 101 through a network. The network connection method includes but is not limited to one or more of Ethernet connection, 6G / 5G / 4G connection, etc. The device controller 101 includes but is not limited to one or more of a programmable logic controller (PLC), an embedded controller, and an industrial integrated machine.
[0055] Among them, the industrial gateway is an industrial-grade intelligent gateway designed to meet industrial standards and the needs of industrial users. It is a core component of the industrial Internet of Things and industrial control systems. In industrial application scenarios, the device controller is usually physically connected to the control device. Usually, the device controller can be directly connected to the industrial gateway through a serial port. In some embodiments, such as Figure 2 As shown, when the serial port resources of the device controller are limited, the device controller can be connected to the control device through a one-to-two serial port line, and one of the serial port lines is connected to the serial port of the industrial gateway. Figure 3 As shown, the device controller is connected to the control device via Ethernet; a mirror switch is provided between the device controller and the control device, and the network port of the industrial gateway is connected to the network port of the mirror switch.
[0056] In one embodiment, Figure 4 As shown, a method for obtaining industrial equipment point table data is provided, and the method is applied to Figure 1 The industrial gateway in is used as an example for explanation. The above method includes the following steps:
[0057] Step S402: Determine the communication protocol supported by the industrial device according to the device type to which the industrial device belongs.
[0058] Among them, the communication protocol refers to an agreement between the two parties in communication on data transmission control, and a unified specification is formulated for message format, synchronization mode, transmission speed, error detection and correction mode, and control character definition. Industrial equipment of different device types supports different communication protocols, such as the currently commonly used MODBUS (an application layer message transmission protocol) communication protocol, HART (Highway Addressable Remote Transducer, addressable remote sensor data highway) communication protocol, etc., or the communication protocols specified by various equipment manufacturers, such as MELSEC (a dedicated data link system) communication protocol, etc. Therefore, it is necessary to determine the communication protocol supported by the industrial equipment according to its device type.
[0059] Specifically, the industrial gateway first determines the device type to which the industrial equipment belongs, and then determines the communication protocol supported by the device type. Among them, the device type includes but is not limited to one or more of the device manufacturer, name, and model of the industrial equipment. The device type to which the industrial equipment belongs can be pre-stored in the memory of the industrial gateway, for example, entered by the operator during configuration. Exemplarily, when configuring the industrial gateway, the operator enters the device type to which the corresponding industrial equipment belongs, such as a PLC (Programmable Logic Controller) controller of a certain series of brand X. Accordingly, the industrial gateway determines that the communication protocol supported by the industrial equipment is a common communication protocol for a certain series of products of brand X through the pre-stored device type. For another example, the industrial gateway uploads the device type to which the industrial equipment belongs to the cloud, and the cloud queries based on the device type and finds the corresponding communication protocol.
[0060] In some embodiments, Figure 5 As shown, the steps for the industrial gateway to determine the communication protocol supported by the industrial device according to the device type of the industrial device include:
[0061] Step S502, obtaining a data packet transmitted by an industrial device; the data packet includes at least one type of device information of the industrial device, including the name, model, and serial number.
[0062] Step S504: According to the correspondence table between industrial devices and communication protocols, a communication protocol corresponding to at least one device information of the industrial device is searched to obtain the communication protocol supported by the industrial device.
[0063] Specifically, the industrial gateway monitors the data transmission channel between the industrial device and the device controller corresponding to the industrial device, and captures the data packets transmitted by the industrial device on the data transmission channel. The industrial gateway can identify the device type of the industrial device by parsing the name, model, serial number, or a combination of multiple information contained in the data packet. In some embodiments, the industrial gateway can also identify one or more of the type, device manufacturer, model, and serial number of the industrial device based on other data carried in the data packet.
[0064] After determining one or more of the name, model, type, serial number, and device manufacturer of the industrial device, the industrial gateway searches the corresponding table of industrial devices and communication protocols to obtain the communication protocol corresponding to one or more of the device information such as the name, model, type, serial number, and device manufacturer of the industrial device, thereby obtaining the communication protocol supported by the industrial device. The corresponding table includes the association between the industrial device and at least one communication protocol it supports.
[0065] The corresponding relationship table between industrial equipment and communication protocols can be pre-stored in the memory by the industrial gateway and obtained by query when needed. For example, the industrial gateway obtains the corresponding relationship table through cloud download and stores it. Alternatively, after obtaining the device information of the industrial equipment, the industrial gateway uploads the device information to the cloud, and the cloud searches for the corresponding relationship table stored in the database, etc., to obtain the corresponding communication protocol.
[0066] Exemplarily, the industrial device obtains the name of the industrial device as X by capturing the data packet transmitted by the industrial device, and the industrial gateway searches for all the communication protocols associated with X in the pre-stored correspondence table. If the industrial gateway finds that there is only one communication protocol associated with X, the communication protocol is determined as the communication protocol supported by the industrial device. If the industrial gateway finds that there are multiple communication protocols associated with X, then according to other information, if the corresponding communication protocol cannot be found according to the name of the industrial device, it is further confirmed according to other device information. For example, the industrial gateway finds that the communication protocols associated with X are A, B, and C, and the industrial gateway can further screen according to the model Y of the industrial device to determine the communication protocol B supported by the industrial device. If there are still multiple communication protocols finally screened, the industrial gateway randomly selects one of the communication protocols and determines it as the communication protocol supported by the industrial device, so as to facilitate the subsequent data packet parsing operation. For another example, after the industrial gateway obtains the name of the industrial device as X, it uploads the device information to the cloud, and the cloud searches and determines the corresponding communication protocol, and returns the search result to the industrial gateway for the industrial gateway to perform subsequent steps.
[0067] In the above embodiment, compared with the traditional method that requires manual configuration of the point table, the method provided in the present application automatically parses the communication message through software capabilities after selecting the communication protocol, thereby obtaining the point table and parameter values of the device, without the need for the device manufacturer to provide the point table.
[0068] Step S404, monitoring the data transmission channel between the industrial device and the corresponding device controller, and obtaining the communication data packet transmitted by the industrial device on the data transmission channel; wherein the communication data packet has a message type specified by the communication protocol supported by the industrial device, and data packets under different message types have different message formats.
[0069] Among them, the communication data packet is different from the data packet in the aforementioned embodiment; the communication data packet is a data packet transmitted under the communication protocol supported by the industrial equipment, which is a message type specified by the communication protocol. Message types include query messages and response messages. At the same time, under the provisions of the communication protocol, different message types have different message formats. The message format includes but is not limited to one or more of data structure, data type (such as a single letter, character, or string, etc.), and data byte length (such as 1 / 2 / 4 bytes, or 5 / 7 bits, etc., irregular data byte length, etc.). For example, under the provisions of the MELSEC communication protocol, the data structure of the query message is: "control code + station number + PC number + instruction + message wait + point table address + check code"; the structure of the response message is: "control code + station number + PC number + point table value + check code".
[0070] Specifically, the industrial gateway monitors the data transmission channel between the industrial device and the corresponding device controller, and obtains the communication data packets transmitted by the industrial device on the data transmission channel by continuously scanning and reading the communication data packets transmitted in the data transmission channel. Exemplarily, the industrial gateway establishes socket communication between the device controller and the industrial gateway through its RS-485 and RS-232 serial ports, thereby realizing the data transmission channels of the serial port and the network port being monitored at the same time.
[0071] Step S406: parse the communication data packet based on the communication protocol to determine the message type of the communication data packet.
[0072] Specifically, the industrial gateway parses the acquired communication data packet according to the communication protocol supported by the previously determined industrial equipment, and determines the message type to which the communication data packet belongs. Exemplarily, the industrial gateway parses the communication data packet, detects the value of the flag bit corresponding to the message type in the communication data packet, and determines the message type corresponding to the communication data packet according to the different values. For example, if the industrial gateway detects that the value of the flag bit is 0, it is determined to be a query message; if the value of the flag bit is 1, it is determined to be a response message. Of course, it is not limited to this. Different communication protocols have their corresponding flag bits for distinguishing query messages from response messages, etc.; or, depending on the structure of the communication data packet, it can be directly determined as a query message or a response message, etc.
[0073] In some embodiments, the step of parsing the communication data packet based on the communication protocol includes: selecting a target parsing program that is compatible with the communication protocol from multiple protocol parsing programs, and using the target parsing program to parse the communication data packet; wherein the protocol parsing program is downloaded by the industrial gateway through the industrial Internet and stored in the local storage space.
[0074] Among them, since the industrial gateway can be connected to multiple device controllers, different device controllers may be connected to different industrial devices, so the industrial gateway may have stored the protocol parsing program used in the past. Or, for the same industrial device, the communication protocol it supports has been updated, and the industrial gateway may also store various versions of the protocol parsing program in the past.
[0075] Specifically, the industrial gateway selects a protocol parser (referred to as a target parser for distinction) that is compatible with the currently determined communication protocol from a plurality of protocol parsers, and uses the target parser to parse the communication data packets.
[0076] Among them, the protocol parser can be downloaded by the industrial gateway through the industrial Internet (i.e., the cloud) and stored in the local storage space. In some embodiments, the industrial gateway can regularly detect whether there are new communication protocols that can be supported by industrial equipment in the cloud. If the industrial gateway detects that no new communication protocols have been added to the cloud, the industrial gateway maintains the protocol parser corresponding to the existing communication protocol. If the industrial gateway adds a new communication protocol to the cloud, the industrial gateway automatically downloads and installs the protocol parser corresponding to the new communication protocol to enhance compatibility.
[0077] In the above embodiment, the communication message is automatically parsed by software capabilities to obtain the point table and parameter values of the device, without the need for the device manufacturer to provide the point table.
[0078] Step S408, extracting corresponding point table data according to the message type of the communication data packet and the message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0079] Specifically, after determining the message type of the communication data packet, the industrial gateway extracts the point table data in the communication data packet according to the message format specified by the message type. Among them, the point table data includes but is not limited to one or more of the point table address and the point table value. Still taking the MELSEC communication protocol as an example, for example, the data structure of the query message specified by it is: "control code + station number + PC number + instruction + message waiting + point table address + check code", then the industrial gateway can extract the data corresponding to the "point table address" position according to the data structure, thereby obtaining the point table address. For another example, the industrial gateway can extract the data corresponding to the "point table value" position according to the structure of the response message, thereby obtaining the point table value, and so on. It should be understood that different communication protocols have different message formats, and therefore the corresponding parsing methods are also different; the above examples are only used as examples and do not limit the scope of protection of the embodiments of the present application.
[0080] Therefore, the industrial gateway automatically parses the point list of the equipment through software, so that the parameters of the equipment production process can be collected in real time without the need for the equipment manufacturer to provide the point list.
[0081] The above-mentioned method for acquiring point table data of industrial equipment obtains the communication protocol supported by the industrial equipment and monitors the data transmission between the device controller and the control device of the industrial equipment. It parses the captured communication data packet based on the communication protocol, and extracts the corresponding point table data according to the message type and message format of the communication data packet, thereby realizing automatic acquisition of the device point table and solving the problem of device information collection when the equipment manufacturer is unable to provide the point table due to various reasons.
[0082] In some embodiments, Figure 6 As shown, the steps of extracting corresponding point table data according to the message type of the communication data packet and the message format corresponding to the message type include:
[0083] Step S602: if it is determined that the message type of the communication data packet is a query message, the content of the data packet is converted based on a pre-stored coding table, and at least one point table address in the query message is extracted according to a message format corresponding to the query message.
[0084] Step S604, if it is determined that the message type of the communication data packet is a response message, the content of the data packet is converted based on the coding table, and at least one point table value in the response message is extracted according to the message format corresponding to the response message; wherein the point table value is stored in the memory space pointed to by the corresponding point table address.
[0085] There is a mapping relationship between the point table address and the point table value; the point table address is used to represent the address of the memory space for storing data, and the point table value is stored in the memory space pointed to by the corresponding point table address.
[0086] Specifically, if the industrial gateway determines that the message type of the communication data packet is a query message, the content of the data packet is converted based on a pre-stored coding table, and at least one point table address in the query message is extracted according to a message format corresponding to the query message. The coding table is, for example, an ASCII (American Standard Code for Information Interchange) coding table. Exemplarily, when the industrial gateway determines that the message type is a query message according to the conditions, assuming that the collected query message is "05H 30H35H 46H 46H 42H 52H 41H 58H 30H 30H 34H 30H 42H 52H 34H 37H", still taking the MELSEC communication protocol as an example, according to the conversion rules of the MELSEC communication protocol, the string message obtained by looking up the ASCII table is "ENQ 05 FFBR A X0040 05 47", and the message is intercepted by querying the message structure, and the addresses of the point table can be obtained as the five point table addresses X0040~X0044.
[0087] If the industrial gateway determines that the message type of the communication data packet is a response message, the content of the data packet is converted based on the coding table, and at least one point table value in the response message is extracted according to the message format corresponding to the response message; wherein the point table value is stored in the memory space pointed to by the corresponding point table address. Exemplarily, when the industrial gateway determines that the message type is a response message according to the conditions, assuming that the collected response message is "05H 30H 35H 46H 46H 30H 31H 31H30H 31H 03H 30H 35H", according to the conversion rules of the MELSEC communication protocol, the string message obtained by ASCII table lookup is "STX 05 FF 01101 ETX 05", and the message is intercepted according to the response message structure, and the five point table values corresponding to the five point table addresses of X0040 to X0044 can be obtained as 0, 1, 1, 0, 1.
[0088] In the above embodiment, the captured communication data packet is parsed based on the communication protocol, and the corresponding point table data is extracted according to the message type and message format of the communication data packet, thereby realizing automatic acquisition of the device point table, solving the problem of device information collection when the device manufacturer is unable to provide the point table for various reasons.
[0089] In a specific embodiment, Figure 7As shown, now take the use of a PLC controller as an example. The industrial gateway first selects a protocol, such as Modbus communication protocol, MELSEC communication protocol, HART communication protocol, etc. Taking the MELSEC communication protocol as an example, the query message structure of the MELSEC communication protocol is: "control code + station number + PC number + instruction + message waiting + point table address + number of points + check code", and the response message structure is: "control code + station number + PC number + point table value + check code". Among them, the check code is, for example, a sum check method.
[0090] After determining the communication protocol supported by the industrial equipment, the industrial gateway continuously scans and obtains the communication data packets on the data transmission channel to receive signals. After obtaining the message, the industrial gateway uses the determined communication protocol to parse the message to obtain the point table and point table value (also called point table value). Assuming that the query message collected by the industrial gateway is "05H30H 35H 46H 46H 42H 52H 41H 58H 30H 30H 34H 30H 42H 52H 34H 37H", according to the conversion rules of the MELSEC communication protocol, the string message obtained by the ASCII table lookup is "ENQ 05 FF BR A X0040 05 47". By querying the message structure and intercepting the message, it can be obtained that the address of the point table is five point table addresses from X0040 to X0044. Assuming that the response message collected by the industrial gateway is "05H 30H 35H 46H 46H 30H 31H 31H 30H 31H 03H 30H35H", according to the conversion rules of the MELSEC communication protocol, the string message obtained by ASCII table lookup is "STX 05 FF 01101ETX 05", and the message is intercepted according to the response message structure, and the values of the five point tables with point table addresses of X0040 to X0044 are 0, 1, 1, 0, and 1 respectively. This realizes the automatic collection of the corresponding industrial equipment point table data.
[0091] The specific message parsing process is as follows: Figure 8 As shown, the industrial gateway receives the message and determines the message type: if it is determined to be a query message, the industrial gateway intercepts the message and performs ASCII table lookup conversion to obtain the point table address; if it is determined to be a response message, the industrial gateway intercepts the message and performs ASCII table lookup conversion to obtain the point table value. Among them, by matching the point table address with the point table value, the point table value stored in the memory space pointed to by a certain point table address can be obtained.
[0092] In some embodiments, after the industrial gateway collects the device data, certain data processing is performed on the edge side, and the edge-processed device data is transmitted to the industrial Internet (i.e., the cloud) through a communication protocol (such as the MQTT communication protocol, HTTP / HTTPS communication protocol, etc.). Based on the powerful computing power of cloud computing on the industrial Internet platform, the device data can be analyzed and learned, thereby realizing parameter tuning of the production process, predictive maintenance of equipment, and digital twin applications, thereby achieving the goal of improving quality, reducing costs, and increasing efficiency in the enterprise's production process.
[0093] It should be understood that although Figure 4-Figure 8 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 4-Figure 8 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0094] In one embodiment, Fig. 9 As shown, a device 900 for acquiring industrial equipment point table data is provided, comprising: a determination module 901, an acquisition module 902, a parsing module 903, and an extraction module 904, wherein:
[0095] The determination module 901 is used to determine the communication protocol supported by the industrial device according to the device type to which the industrial device belongs.
[0096] The acquisition module 902 is used to monitor the data transmission channel between the industrial equipment and the corresponding equipment controller, and obtain the communication data packet transmitted by the industrial equipment on the data transmission channel; wherein the communication data packet has a message type specified by the communication protocol supported by the industrial equipment, and data packets under different message types have different message formats.
[0097] The parsing module 903 is used to parse the communication data packet based on the communication protocol to determine the message type of the communication data packet.
[0098] The extraction module 904 is used to extract corresponding point table data according to the message type of the communication data packet and the message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0099] In one of the embodiments, the determination module is also used to obtain a data packet transmitted by the industrial equipment; the data packet includes at least one device information of the industrial equipment, including the name, model, and serial number; based on the correspondence table between the industrial equipment and the communication protocol, the communication protocol corresponding to at least one device information of the industrial equipment is searched to obtain the communication protocol supported by the industrial equipment.
[0100] In one of the embodiments, the parsing module is also used to select a target parsing program that is compatible with the communication protocol from multiple protocol parsing programs, and use the target parsing program to parse the communication data packets; wherein the protocol parsing program is downloaded by the industrial gateway through the industrial Internet and stored in the local storage space.
[0101] In one of the embodiments, the extraction module is also used to, if it is determined that the message type of the communication data packet is a query message, convert the content of the data packet based on a pre-stored coding table, and extract at least one point table address in the query message according to the message format corresponding to the query message; if it is determined that the message type of the communication data packet is a response message, convert the content of the data packet based on the coding table, and extract at least one point table value in the response message according to the message format corresponding to the response message; wherein the point table value is stored in the memory space pointed to by the corresponding point table address.
[0102] In one of the embodiments, the apparatus further comprises an access module, the access module being used to access a memory space on the device controller pointed to by the point table address in the query message, and read a point table value corresponding to the point table address from the memory space.
[0103] In one of the embodiments, the device controller is connected to the control device via a one-to-two serial port line, and one of the serial port lines is connected to the serial port of the industrial gateway.
[0104] In one of the embodiments, the device controller is connected to the control device via Ethernet; a mirror switch is provided between the device controller and the control device, and the network port of the industrial gateway is connected to the network port of the mirror switch.
[0105] The specific definition of the device for obtaining industrial equipment point table data can be found in the definition of the method for obtaining industrial equipment point table data above, which will not be repeated here. Each module in the above-mentioned device for obtaining industrial equipment point table data can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0106] In one embodiment, a gateway is provided, which may be the industrial gateway in the aforementioned embodiment (for example, a computer device integrated with an industrial gateway, which may generally be referred to as a soft gateway). The internal structure diagram of the computer device may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for obtaining point table data of industrial equipment is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0107] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0108] In one embodiment, a gateway is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: determining a communication protocol supported by the industrial equipment according to a device type to which the industrial equipment belongs; monitoring a data transmission channel between the industrial equipment and a corresponding device controller, and acquiring a communication data packet transmitted by the industrial equipment on the data transmission channel; wherein the communication data packet has a message type specified by a communication protocol supported by the industrial equipment, and data packets under different message types have different message formats; parsing the communication data packet based on the communication protocol to determine the message type of the communication data packet; extracting corresponding point table data according to the message type of the communication data packet and a message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0109] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a data packet transmitted by the industrial equipment; the data packet includes at least one type of device information of the industrial equipment, including the name, model, and serial number; according to the correspondence table between the industrial equipment and the communication protocol, searching for a communication protocol corresponding to at least one type of device information of the industrial equipment, and obtaining the communication protocol supported by the industrial equipment.
[0110] In one embodiment, when the processor executes the computer program, the following steps are also implemented: a target parser that is compatible with the communication protocol is selected from multiple protocol parsers, and the communication data packet is parsed using the target parser; wherein the protocol parser is downloaded by the industrial gateway through the industrial Internet and stored in the local storage space.
[0111] In one embodiment, when the processor executes the computer program, the following steps are also implemented: if it is determined that the message type of the communication data packet is a query message, the content of the data packet is converted based on a pre-stored coding table, and at least one point table address in the query message is extracted according to the message format corresponding to the query message; if it is determined that the message type of the communication data packet is a response message, the content of the data packet is converted based on the coding table, and at least one point table value in the response message is extracted according to the message format corresponding to the response message; wherein the point table value is stored in the memory space pointed to by the corresponding point table address.
[0112] In one embodiment, when executing the computer program, the processor further implements the following steps: accessing the memory space on the device controller pointed to by the point table address in the query message, and reading the point table value corresponding to the point table address from the memory space.
[0113] The above-mentioned gateway obtains the communication protocol supported by the industrial equipment and monitors the data transmission between the device controller and the control device of the industrial equipment. It parses the captured communication data packet based on the communication protocol, and extracts the corresponding point table data according to the message type and message format of the communication data packet, thereby realizing automatic acquisition of the device point table and solving the problem of device information collection when the equipment manufacturer is unable to provide the point table for various reasons.
[0114] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: determining a communication protocol supported by the industrial equipment according to the equipment type to which the industrial equipment belongs; monitoring a data transmission channel between the industrial equipment and a corresponding equipment controller, and obtaining a communication data packet transmitted by the industrial equipment on the data transmission channel; wherein the communication data packet has a message type specified by the communication protocol supported by the industrial equipment, and data packets under different message types have different message formats; parsing the communication data packet based on the communication protocol to determine the message type of the communication data packet; extracting corresponding point table data according to the message type of the communication data packet and the message format corresponding to the message type; the point table data includes a point table address and a point table value.
[0115] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a data packet transmitted by the industrial equipment; the data packet includes at least one type of device information of the industrial equipment, including the name, model, and serial number; based on the correspondence table between industrial equipment and communication protocols, searching for a communication protocol corresponding to at least one type of device information of the industrial equipment, and obtaining the communication protocol supported by the industrial equipment.
[0116] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: a target parser that is compatible with the communication protocol is selected from multiple protocol parsers, and the communication data packets are parsed using the target parser; wherein the protocol parser is downloaded by the industrial gateway through the industrial Internet and stored in the local storage space.
[0117] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if it is determined that the message type of the communication data packet is a query message, the content of the data packet is converted based on a pre-stored coding table, and at least one point table address in the query message is extracted according to the message format corresponding to the query message; if it is determined that the message type of the communication data packet is a response message, the content of the data packet is converted based on the coding table, and at least one point table value in the response message is extracted according to the message format corresponding to the response message; wherein the point table value is stored in the memory space pointed to by the corresponding point table address.
[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: accessing the memory space on the device controller pointed to by the point table address in the query message, and reading the point table value corresponding to the point table address from the memory space.
[0119] The above-mentioned computer-readable storage medium obtains the communication protocol supported by the industrial equipment and monitors the data transmission between the device controller and the control device of the industrial equipment. It parses the captured communication data packet based on the communication protocol, and extracts the corresponding point table data according to the message type and message format of the communication data packet, thereby realizing automatic acquisition of the device point table and solving the problem of device information collection when the equipment manufacturer is unable to provide the point table due to various reasons.
[0120] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0121] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0122] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for obtaining industrial equipment point table data, characterized in that: The method comprises: Determining the communication protocol supported by the industrial device according to the device type of the industrial device; Monitoring a data transmission channel between the industrial device and a corresponding device controller, and acquiring a communication data packet transmitted by the industrial device on the data transmission channel; wherein the communication data packet has a message type specified by a communication protocol supported by the industrial device, and data packets under different message types have different message formats; Parsing the communication data packet based on the communication protocol to determine the message type of the communication data packet; If it is determined that the message type of the communication data packet is a query message, converting the content of the data packet based on a pre-stored coding table, and extracting at least one point table address in the query message according to a message format corresponding to the query message; If it is determined that the message type of the communication data packet is a response message, the content of the data packet is converted based on the coding table, and at least one point table value in the response message is extracted according to the message format corresponding to the response message; wherein the point table value is stored in the memory space pointed to by the corresponding point table address; the point table data includes a point table address and a point table value.
2. The method according to claim 1, characterized in that The step of determining the communication protocol supported by the industrial device according to the device type to which the industrial device belongs includes: Acquire a data packet transmitted by the industrial device; the data packet includes at least one type of device information of the industrial device, including the name, model, and serial number; According to the correspondence table between industrial equipment and communication protocols, a communication protocol corresponding to at least one device information of the industrial equipment is searched and obtained, so as to obtain the communication protocol supported by the industrial equipment.
3. The method according to claim 1, characterized in that The parsing of the communication data packet based on the communication protocol includes: A target parsing program compatible with the communication protocol is selected from multiple protocol parsing programs, and the communication data packet is parsed using the target parsing program; wherein the protocol parsing program is downloaded by the industrial gateway through the industrial Internet and stored in the local storage space.
4. The method according to claim 1, characterized in that: If it is determined that the message type of the communication data packet is a query message, the method further includes: The memory space on the device controller pointed to by the point table address in the query message is accessed, and the point table value corresponding to the point table address is read from the memory space.
5. The method according to any one of claims 1 to 4, characterized in that Applied to the industrial gateway, the device controller is connected to the control device via a one-to-two serial port line, and one of the serial port lines is connected to the serial port of the industrial gateway.
6. The method according to any one of claims 1 to 4, characterized in that Applied to industrial gateways, the device controller is connected to the control device via Ethernet; a mirror switch is provided between the device controller and the control device, and the network port of the industrial gateway is connected to the network port of the mirror switch.
7. A device for acquiring point table data of industrial equipment, characterized in that: The device comprises: A determination module, used to determine the communication protocol supported by the industrial device according to the device type to which the industrial device belongs; An acquisition module, used to monitor the data transmission channel between the industrial device and the corresponding device controller, and acquire the communication data packet transmitted by the industrial device on the data transmission channel; wherein the communication data packet has a message type specified by the communication protocol supported by the industrial device, and data packets under different message types have different message formats; A parsing module, used to parse the communication data packet based on the communication protocol to determine the message type of the communication data packet; An extraction module is used to, if it is determined that the message type of the communication data packet is a query message, convert the content of the data packet based on a pre-stored coding table, and extract at least one point table address in the query message according to a message format corresponding to the query message; if it is determined that the message type of the communication data packet is a response message, convert the content of the data packet based on the coding table, and extract at least one point table value in the response message according to a message format corresponding to the response message; wherein the point table value is stored in a memory space pointed to by a corresponding point table address; and the point table data includes a point table address and a point table value.
8. The device according to claim 7, characterized in that The determination module is used to obtain a data packet transmitted by the industrial equipment; the data packet includes at least one type of equipment information of the industrial equipment, including the name, model, and serial number; based on the correspondence table between industrial equipment and communication protocols, a communication protocol corresponding to at least one type of equipment information of the industrial equipment is searched and obtained, thereby obtaining the communication protocol supported by the industrial equipment.
9. A gateway, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
