PLC register point location address determination method, device, equipment, medium and product

By acquiring and filtering the target data packet from the PLC device to the output device, determining the register point address in the PLC device, the problem of inaccurate positioning in the prior art is solved, and efficient and accurate data acquisition and feedback are achieved.

CN120178780APending Publication Date: 2025-06-20广东知业科技有限公司

Patent Information

Application Number
CN202510653908.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The prior art is difficult to accurately locate the register point address in PLC equipment, resulting in inaccurate collection of industrial data and difficulty in real-time feedback.

Method used

By obtaining the target data packets that meet the monitoring rules from the data packets sent by the PLC device to the output device, the target analysis content is filtered out from the parsing content of each target data packet, and the point address of the target parameter is determined based on the filtering conditions of the target parameters displayed on the output device.

Benefits of technology

It realizes the fast and accurate positioning of PLC register point addresses, avoids dependence on PLC source programs and touch screen programs, and improves data processing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120178780A_ABST
    Figure CN120178780A_ABST
Patent Text Reader

Abstract

The invention discloses a PLC register point location address determination method and device, equipment, a medium and a product, and the method comprises the steps: obtaining a target data packet according with a monitoring rule from data packets sent by PLC equipment to output equipment; based on the filtering condition of the target parameter, filtering out target analysis content from the analysis content of each target data packet; wherein the analysis content of at least part of the target data packet comprises a data value and a register point location address for storing the data value; any target parameter is a parameter displayed by the output device; the register point location address in the target analysis content is the point location address of the target parameter. Real valuable information can be extracted from numerous devices and sensors, accurate acquisition and real-time feedback of data are ensured, a reliable basis is provided for deeply analyzing a production process, capturing key performance indexes and implementing fine control, and core information is also provided for realizing intelligentization, optimization and transparency of the production process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automatic control technology, and in particular, to a method, device, equipment, medium and product for determining the point address of a PLC register. Background Art

[0002] With the booming development of the industrial Internet, data acquisition has become an indispensable part of intelligent manufacturing and industrial automation. It not only provides a solid data foundation for equipment monitoring, process optimization, intelligent decision-making and predictive maintenance, but also has a significant impact on improving production efficiency and reducing operating costs. For example, for PLC devices in the field of industrial automation, the points in its registers serve as the interface between the PLC device and external devices, receiving input signals from sensors or sending control signals to actuators. Among them, the input points are used to store the data values of various monitoring parameters (such as temperature, pressure, flow, etc.) on the production line, and output and display them to the connected output devices (such as touch screens (HMIs)). That is, the real-time values of the monitoring parameters displayed on the output device of the PLC device come from the data values stored in the addresses corresponding to the register points of the PLC device itself (which can be simply referred to as register point addresses or point addresses).

[0003] Therefore, locating the point address of the monitoring parameter in the register of the PLC device is the prerequisite for ensuring accurate industrial data acquisition and real-time feedback. How to effectively locate the point address is a current research hotspot. Summary of the Invention

[0004] The purpose of this application is to provide a method, device, equipment, medium and product for determining the point address of a PLC register, so as to effectively and accurately locate the point address of the PLC register.

[0005] To achieve the above purpose, this application provides the following solutions: In the first aspect, this application provides a method for determining the point address of a PLC register, and the method includes: Obtain a target data packet that conforms to the listening rule from the data packets sent from the PLC device to the output device; Filter out target parsing content from the parsing content of each target data packet based on the filtering condition of the target parameter; wherein, the parsing content of at least some target data packets includes a data value and the register point address storing the data value; any target parameter is a parameter displayed on the output device; the register point address in the target parsing content is the point address of the target parameter.

[0006] In an embodiment, before obtaining the target data packet that conforms to the listening rule, the method further includes: Send a connection request to the PLC device, where the connection request is generated using any communication protocol rule in the protocol rule set; If an acknowledgement message returned by the PLC device is received, determine that the communication protocol rule used for the connection request is the target protocol rule, and the target protocol rule conforms to the communication protocol used by the PLC device.

[0007] In one embodiment, the parsed content is obtained by parsing according to the target protocol rule.

[0008] In one embodiment, the monitoring rule includes a data packet type, and obtaining a target data packet that meets the monitoring rule includes: Obtain a data packet whose type identifier matches the data packet type in the monitoring rule.

[0009] In one embodiment, the filtering condition includes an address range; filtering out target parsed content from the parsed content of each target data packet includes: From the parsed content of each target data packet, screen out the parsed content whose register point address matches the address range as the quasi-target parsed content.

[0010] In one embodiment, the filtering condition further includes at least one of: the first variation law of the display data of the target parameter with time, the first update law of the display data of the target parameter, the first data type of the target parameter, and the first function relationship.

[0011] In one embodiment, when the filtering condition further includes the first variation law, filtering out target parsed content from the parsed content of each target data packet further includes: Determine the second variation law of the data value with time in the quasi-target parsed content; Match the second variation law with the first variation law; Among them, for the target parsed content filtered out from the quasi-target parsed content, its second variation law matches the first variation law.

[0012] In one embodiment, when the filtering condition further includes the first update law, filtering out target parsed content from the parsed content of each target data packet further includes: Determine the second update law of the data value in the quasi-target parsed content; Match the second update law with the first update law; Among them, for the target parsed content filtered out from the quasi-target parsed content, its second update law matches the first update law.

[0013] In one embodiment, when the filtering condition further includes the first data type, filtering out the target parsing content from the parsing contents of each target data packet further includes: Determine the data type of the data value in the quasi-target parsing content as the second data type; Match the second data type with the first data type; wherein, for the target parsing content filtered out from the quasi-target parsing content, its second data type matches the first data type.

[0014] In one embodiment, when the filtering condition further includes a first functional relationship, filtering out the target parsing content from the parsing contents of each target data packet further includes: Filter out the parsing content whose display data of the data value and the target parameter satisfies the first functional relationship from the quasi-target parsing content.

[0015] In one embodiment, the method further includes: Obtain the current display data of the target parameter on the output device; Determine the first change rule and / or the first update rule of the display data of the target parameter over time according to the current display data.

[0016] In one embodiment, obtaining the current display data of the target parameter on the output device includes: Obtain the image currently displayed in the display area on the output device; Perform character recognition on the obtained image to obtain the current display data.

[0017] In a second aspect, the present application provides a device for determining the bit address of a PLC register. The device includes: A monitoring module, configured to obtain target data packets that meet the monitoring rules from the data packets sent by the PLC device to the output device; A determination module, configured to filter out target parsing content from the parsing contents of each target data packet based on the filtering condition of the target parameter; wherein, the parsing contents of at least some target data packets include data values and the register bit addresses storing the data values; any target parameter is a parameter displayed on the output device; the register bit address in the target parsing content is the bit address of the target parameter. In a third aspect, the present application provides a processing device, the processing device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the method for determining the bit address of a PLC register as described in the first aspect.

[0018] Fourthly, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the PLC register point address determination method described in the first aspect is implemented.

[0019] Fifthly, the present application provides a computer program product, which includes instructions. When the instructions are run, the PLC register point address determination method described in the first aspect is executed.

[0020] According to the specific embodiments provided by the present application, the following technical effects are disclosed: The present application provides a method, device, equipment, medium and product for determining the point address of a PLC register. Based on the correspondence between the display value of the monitoring parameter displayed on the output device of the PLC device and the data value stored in the register point address of the PLC device, the point address of the PLC register is determined: First, a target data packet that meets the listening rules is obtained from the data packets sent from the PLC device to the output device. Then, based on the filtering conditions of the target parameters displayed on the output device, the target parsing content is filtered out from the parsing content of each target data packet. The register point address in the target parsing content is the point address of the target parameter, thereby determining the register point address of the target parameter in the PLC device and achieving accurate positioning of the register point address of the output parameter of the PLC in the PLC device. In addition, the present application can be implemented without using the PLC source program or the touch screen program, and does not rely on the detailed point information provided by the manufacturer. Even when the point information provided by the device manufacturer or the PLC source program cannot be obtained, and the touch screen program cannot be obtained, the point address positioning can still be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic structural diagram of a PLC register point address determination system according to some embodiments of the present application; Figure 2 It is a schematic flowchart of a PLC register point address determination method according to some embodiments of the present application; Figure 3 It is a schematic diagram of a scenario according to some embodiments of the present application; Figure 4 It is a schematic connection interface diagram of an analysis tool according to some embodiments of the present application; Figure 5 It is a schematic operation interface diagram of an analysis tool according to some embodiments of the present application; Figure 6 It is a schematic structural diagram of a PLC register point address determination device according to some embodiments of the present application; Figure 7Schematic diagram of a processing device provided by some embodiments of the present application. Detailed implementation manners

[0022] The present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners.

[0023] Technical term explanations: Programmable Logic Controller (PLC): A PLC is a digital operating electronic system used for industrial automation control. It uses programmable memory to store instructions for performing operations such as logical operations, sequential control, timing, counting, and arithmetic operations, and controls various types of machinery or production processes through digital or analog inputs / outputs.

[0024] Point: The point addresses of the PLC are stored in the memory of the PLC. The PLC operates the device through points. These points serve as the interface between the PLC and external devices, receiving input signals from sensors or sending control signals to actuators, thereby achieving precise control of various devices such as motors, valves, and relays in the industrial automation process. It can include input points and output points. Among them, the input points monitor various parameters on the production line, such as temperature, pressure, flow rate, etc., and convert these analog or digital signals into a format that can be processed by the PLC; while the output points adjust or activate relevant devices according to the logical decisions of the PLC program to ensure that the production process proceeds according to the predetermined sequence and parameters.

[0025] Message: A message is a way for the PLC to share data with external systems. It encapsulates data through a specific communication protocol to form a data packet containing a type identifier indicating the type of data packet, a destination address, a source address (i.e., the register point address), data content, and possible error detection / check information. These messages can be transmitted in the industrial network, enabling the PLC to effectively exchange and communicate data with other automation components, monitoring systems, or information management systems.

[0026] It can be understood that the PLC devices used in industry are equivalent to or close to the main unit of a compact computer. Their advantages in scalability and reliability have made them widely used in various current industrial control fields. The automation of industrial systems also means that on-site data collection of production equipment needs to be completed simultaneously. Data collection is an important guarantee for completing the industrial Internet platform or application planning, providing a basis for the digital transformation of manufacturing enterprises.

[0027] Taking the application on a production line as an example, in the established production line, it may include multiple PLC devices configured in the production workshop. Each PLC device is configured with an output device (such as a touch screen (HMI)) to enable engineers to achieve human-machine interaction through the output device. For example, they can input various control parameters and read various monitoring parameters from the touch screen, such as production parameters like production volume, as well as environmental parameters such as temperature and humidity in the production environment, and electrical parameters such as current and voltage.

[0028] It can be understood that after the actual production, the monitoring parameters in the production process can be grasped and monitored through the display interface of the output device of each PLC device.

[0029] Moreover, as described in the function of the register points of the above PLC device, the real-time value of the monitoring parameter displayed on the output device of the PLC comes from the data value stored at the address corresponding to the register point of the PLC device itself (which can be simply referred to as the register point address or point address).

[0030] Therefore, locating the point address of the monitoring parameter in the register of the PLC device is the prerequisite for ensuring accurate acquisition and real-time feedback of industrial data.

[0031] Currently, there are four mainstream methods for obtaining PLC points: First, the equipment manufacturer provides detailed point information, including point address and function description; Second, the equipment manufacturer provides the PLC source program, and engineers can obtain the point address and control function by analyzing the PLC source program; Third, as an intuitive human-machine interface (HMI), the touch screen also contains the points required for operating the equipment. By analyzing the touch screen program, important point information of the equipment can also be obtained.

[0032] The implementation of the first to third methods depends on the point information or programs (PLC source program, touch screen program) provided by the equipment manufacturer, and has its own limitations: Confidentiality restrictions: Due to commercial confidentiality or other reasons, the equipment manufacturer may not be able to provide point information or the PLC source program.

[0033] High professionalism: Even if the equipment manufacturer provides the PLC source program, engineers need to have in-depth knowledge of automation control and a full understanding of the programming language and environment of a specific PLC model.

[0034] Security restrictions: The HMI may set encryption methods such as a read password, making it impossible to correctly open and view the touch screen program and obtain the points.

[0035] In addition, due to the long service life of the equipment or the limitations of the usage scenarios, the PLC source program and the touch screen program provided by the manufacturer are lost, making it impossible to locate the point addresses of the PLC equipment.

[0036] Due to the above limitations, the first three mainstream methods cannot ensure the accurate positioning of the point addresses of the monitoring parameters displayed on the output device, so that it is impossible to extract truly valuable information from numerous devices and sensors subsequently, that is, it is impossible to accurately collect and real-time feedback the output data of the PLC equipment, and further impossible to deeply analyze the production process, capture key performance indicators, and implement fine control.

[0037] The fourth mainstream method is to scan and analyze the values of points in the PLC through a scanning tool, and then the PLC points can also be obtained through the data comparison function. However, this method requires traversing all the point data in the PLC, with low efficiency and long time consumption.

[0038] In this application, in order to accurately locate the point addresses of the PLC registers, a method for determining the point addresses of the PLC registers is provided. By capturing the packets (data packets) that conform to the listening rules sent by the PLC equipment to the output device, and then based on the display data of the target parameter on the output device, filtering and screening the parsed content in the captured data packets according to the filtering conditions of the target parameter, filtering out the target parsed content corresponding to the target parameter (the register point address in the target parsed content is the point address of the target parameter), so as to finally achieve the rapid and accurate positioning of the register point address.

[0039] As Figure 1 shown is an exemplary architecture diagram of the PLC register point address determination system provided by this application.

[0040] As Figure 1 shown, the system may include a processing device, a PLC device, and an output device (such as an HMI). An analysis tool runs on the processing device.

[0041] The above analysis tool can be applied to the above processing device in the form of software, or exist as a component of the above processing device in the form of hardware (for example, specifically, it can be the controller / processor of the processing device). When it exists in the form of software, the above analysis tool can specifically be an application program, or can also be a component of a certain application program or operating system.

[0042] Among them, the processing device and the HMI can be connected to the PLC device through a network port or a serial port to achieve data interaction. For example, the PLC device and the processing device can be connected through a one-to-two adapter cable or a switch, so that when the analysis tool runs, it can monitor the packets (data packets) of the PLC and HMI communication.

[0043] The above HMI can wirelessly connect to the PLC device, implement data transmission with the configured communication protocol, receive a message including the data value stored in the register in the PLC device, and display the display data corresponding to each monitoring parameter in the message in the corresponding area.

[0044] It should be noted that traditionally, messages are mainly used at the network layer and above, and are usually large, possibly containing complete user data and control information; data packets are mainly used at the network layer and below, and are usually small. They are the smallest units in network transmission and are transmitted hop by hop. The messages or data packets in this application are not limited to the traditional meaning, and can be used to represent any form of communication data sent by the PLC device to the HMI. In the following text of this application, data packets will be used for description, which can represent any form of communication data sent by the PLC device to the HMI using any communication protocol.

[0045] It can be understood that in this application, the processing device analyzes and processes the monitored data packets, and finally determines the point address of the PLC register, that is, determines the correspondence between the monitoring parameters (i.e., target parameters) displayed on the output device and the point address of the PLC register, so that truly valuable information can be extracted from numerous devices and sensors, realizing the precise collection and real-time feedback of industrial data, providing the core basis for the intelligence, optimization and transparency of the production process, and finally realizing the in-depth analysis of the production process, the capture of key performance indicators and the implementation of fine control.

[0046] For example, for monitoring parameters such as production volume, pressure, temperature, and distance as target parameters, by listening to the data packets sent by the PLC device to the output device, and then filtering the parsed content in the data packets according to the set filtering rules, finally screening out the target parsed content corresponding to the monitoring parameters such as production volume, pressure, temperature, and distance, so that the point address of the register corresponding to each monitoring parameter can be determined from the obtained target parsed content.

[0047] To better understand the method, device, equipment and medium for determining the point address of the PLC register provided in this application, it will be elaborated in detail below with the accompanying drawings.

[0048] Figure 2 The following shows a schematic flow chart of the method for determining the PLC register point provided in some embodiments of this application.

[0049] This method can be executed by Figure 1 the processing device shown, such as Figure 2 shown, and the specific steps of this determination method can include the following: S110, the processing device obtains the target data packet that meets the listening rule from the data packets sent by the PLC device to the output device.

[0050] S120, the processing device filters out target parsed content from the parsed content of each target data packet based on the filtering condition of the target parameter; wherein, the parsed content of at least some of the target data packets includes a data value and the register bit address storing the data value; any target parameter is a parameter displayed by the output device; the register bit address in the target parsed content is the bit address of the target parameter. Specifically, in some embodiments of the present application, in order to determine the bit address of the target parameter in the monitoring parameters displayed on the output device (such as a touch screen) of the PLC device in the register of the PLC device, the processing device can first capture data packets according to the configured listening rules - that is, obtain target data packets that meet the listening rules from the data packets sent from the PLC device to the output device.

[0051] The listening rule can be set according to the data packet type, that is, the listening rule can include the data packet type (which can be called the target type), so that the analysis tool can capture data packets whose data packet type conforms to the target type as target data packets.

[0052] Furthermore, after capturing the target data packets according to the listening rules, the parsed content in each target data packet can be obtained, and then the target parsed content can be filtered out from the obtained parsed content according to the set filtering condition of the target parameter.

[0053] The above-mentioned target data packets are a series of data packets that meet the listening rules. Exemplarily, the content (i.e., the parsed content) contained in each target data packet can specifically include a header field, an address field, a content field, etc. The content field can include the transmitted data value, and the address field can include the register bit address corresponding to the data value.

[0054] It has been mentioned above that the target parameter can be a parameter displayed by the output device connected to the PLC device. For example, the target parameter can be monitoring parameters such as production output, temperature, pressure, and distance displayed on the HMI.

[0055] And for the target parsed content obtained by filtering, the data value therein is the source of the data displayed by monitoring parameters such as production output, temperature, pressure, and distance. Then the register address storing the data value in the target parsed content is the bit address of monitoring parameters such as production output, temperature, pressure, and distance.

[0056] It can be understood that the above-mentioned target parameters are only for exemplary illustration, and the present application does not limit this.

[0057] Such as Figure 3In an application scenario shown below, the PLC device is a Mitsubishi series device, which is used in the control system of a horizontal winding machine. Correspondingly, the monitoring parameters displayed on its output device (such as HMI) can specifically include the current of winding 1, the current of winding 2, the running speed, the winding length, the number of damage points, and the speed setting, etc. The specific values are as shown in Figure 3 shown below.

[0058] Assume that the target parameter is the current of winding 1, and its displayed value is 12.1. The parsed content of the target data packet captured by the processing device based on the listening rule is as shown in Figure 3 the left frame below, including multiple register point addresses and corresponding data values. Then, in the subsequent processing, the processing device can filter and screen the parsed content according to the set filtering conditions to determine the final target parsed content (a.bbc and 12.1), that is, as shown in Figure 3 the right frame below. The register address in the final target parsed content is the point position of the current of winding 1, and the data value in the target parsed content corresponds to the specific current value of the current of winding 1.

[0059] It can be seen that in the embodiment of the present application, based on the correspondence between the display data of the monitoring parameters displayed on the output device of the PLC device and the data value stored in the register point address of the PLC device, the point address of the PLC register is determined: First, obtain the target data packet that meets the listening rule from the data packet sent from the PLC device to the output device, and then based on the filtering conditions of the target parameter displayed on the output device, filter out the target parsed content including the data value and the register point address storing the data value from the parsed content of each target data packet, so as to determine that the register point address in the target parsed content is the point address of the target parameter, that is, the point address of the target parameter in the PLC device is determined, realizing the accurate positioning of the register point address of the output parameter of the PLC in the PLC device.

[0060] In addition, the present application does not need to use the PLC source program or the touch screen program, and does not depend on the detailed point information provided by the manufacturer. Therefore, it avoids excessive dependence on the source program provided by the PLC device manufacturer. Even in the case where the point information or the PLC source program provided by the device manufacturer cannot be obtained, and the touch screen program cannot be obtained, the point address positioning can still be realized.

[0061] Moreover, compared with the mainstream method of traversing all register points in the PLC device through a scanning tool, the present application captures the data packets between the PLC device and the HIM. Most of the data packets sent by the PLC device to the HIM are used to update the display data on the HIM. The register addresses parsed from the data packets only account for a part of all the register points in the PLC (the register points whose data values are not used for display on the HIM are generally not carried in the data packets sent to the HIM). Therefore, the efficiency is relatively high and the time consumption is short compared with traversing all points.

[0062] In the actual production process, after determining the point address of the target parameter through the present application, it is possible to extract truly valuable information from numerous devices and sensors, ensuring the accurate acquisition and real-time feedback of data, providing a reliable basis for in-depth analysis of the production process, capturing key performance indicators, and implementing fine control, and also providing core information for realizing the intelligence, optimization, and transparency of the production process.

[0063] It can also be understood that in some embodiments of the present application, for the data packets transmitted between the PLC device and the output device, its generation rule is implemented based on the protocol rules of the adopted communication protocol. That is, for the generated data packets, the functions, attributes, lengths, and other characteristics of each field therein are determined by the protocol rules of the adopted communication protocol.

[0064] Similarly, for the reading and identification of the fields included in the monitored data packets, it can be implemented according to the protocol rules of the communication protocol between the PLC device and the output device.

[0065] Correspondingly, in some embodiments of the present application, before monitoring the data packets, a connection can be attempted with the PLC device through the configured protocol rule set to determine the communication protocol adopted by the PLC device.

[0066] That is, before obtaining the target data packets that meet the monitoring rules, the method can further include the following steps: S01, sending a connection request to the PLC device; the connection request is generated using any communication protocol rule in the protocol rule set.

[0067] S02, if an acknowledgment message returned by the PLC device is received, determining that the communication protocol rule adopted by the connection request is the target protocol rule; the target protocol rule conforms to the communication protocol adopted by the PLC device.

[0068] The protocol rule set includes at least one (or at least one group) of communication protocol rules. Each protocol rule is generated based on the protocol characteristics of an industrial protocol. Specifically, before listening to the data packets between the PLC device and the touch screen, the analysis tool on the processing device can first attempt to establish a connection with the PLC device in a traversal manner to determine the communication protocol adopted by the PLC device.

[0069] For example, before executing this method, the operator can start the analysis tool so that the analysis tool runs on the processing device, and then operation instructions, such as connection instructions, can be input on the operation interface of the analysis tool.

[0070] As Figure 4 shown, the analysis tool attempts to establish a connection with the PLC device by traversing the communication protocol rules in the protocol rule set.

[0071] After the analysis software of the processing device receives the operation instruction, it can respond to the operation instruction and establish a connection with the PLC device, that is, it can respond to the connection instruction, generate a connection request based on any communication protocol rule in the configured protocol rule set, and send the connection request to the PLC device.

[0072] After receiving the connection request, the PLC device can attempt to identify the connection request.

[0073] Then, in some embodiments, when the PLC device can identify the received connection request, it can respond to the connection request and send a confirmation message to the processing device, so that the processing device can receive the confirmation message replied by the PLC device within a certain time. At this time, on the processing device side, it can be determined that the communication protocol rule used to generate the connection request is consistent with the communication protocol adopted by the PLC device, and it can be used as the target protocol rule.

[0074] The following introduces the communication protocol rules.

[0075] The communication protocols used by PLC devices of each manufacturer may be different. Each communication protocol rule in the protocol rule set is a set of rules abstracted from a communication protocol according to the protocol characteristics of the communication protocol.

[0076] For example, for various communication protocols, such as industrial protocols such as S7, Modbus TCP, ASCII, EtherCAT, PROFINET, and OPC UA, according to their similar protocol characteristics, various industrial protocols can be abstractly classified into specific protocol rules as the basis for the processing device to attempt to establish a connection with the PLC device.

[0077] In some embodiments of the present application, each communication protocol rule in the configured protocol rule set can be generated by abstracting each industrial communication protocol, that is, it can be carried out in terms of each protocol feature to establish a protocol rule system for industrial protocols, so that a kind / group of established communication protocol rules can include protocol structure rules, operation semantic rules, data encoding rules, session management rules, and security control rules.

[0078] Among them, for the protocol structure rules, it can specifically include two aspects of content: the header structure and the data packet length structure.

[0079] For example, for the header structure, it can include a fixed header (such as the fixed 4-byte ROSCTR field in the S7 protocol), a variable header (such as the MBAP header length field in Modbus TCP), and no header (such as some ASCII protocols starting directly with STX).

[0080] Also, for example, for the data packet length structure, it can include a fixed length (such as each EtherCAT frame being fixed at 1486 bytes), a length field (such as the FrameID field in PROFINET), and a terminator identifier (such as the CRLF at the end of Modbus ASCII).

[0081] For the operation semantic rules, it can specifically include two aspects of content: the function code mapping relationship and the address space organization method.

[0082] For example, for the function code mapping relationship, it can include an explicit function code (such as the Modbus 03 function code representing reading holding registers) and an implicit operation type (such as the S7 protocol distinguishing reading and writing through the Job / ACK mechanism).

[0083] Also, for example, for the address space organization method, it can include a linear address (such as Modbus 40001 - 49999 corresponding to holding registers), a hierarchical address (such as the NodeID tree structure in OPC UA), and a symbolic address (such as Profinet addressing based on device identifiers).

[0084] For the data encoding rules, it can specifically include two characteristic aspects of content: numerical encoding and data type marking.

[0085] For example, for numerical encoding, it can include big-endian (such as the Real type in S7-1200), little-endian (such as the floating-point number in Mitsubishi FX series), and custom encoding (such as the BCD special format in Omron PLC).

[0086] Also, for example, for data type marking, it can include an explicit type identifier (such as the TypeCode field in OPC UA) and implicit type inference (requiring combination with an address mapping table).

[0087] For session management rules, the specific content can include two aspects: the connection establishment method and the transaction ID mechanism.

[0088] For example, for the connection establishment method, it can specifically include three-way handshake (such as TCP protocol), instant messaging (such as UDP broadcast), and token polling (such as PROFIBUS DP).

[0089] Another example is that for the transaction ID mechanism, it can specifically include sequential counting (such as the TransactionID of Modbus TCP), timestamp (such as the SessionHandle of EtherNet / IP), and statelessness (such as ASCII serial port protocol), etc.

[0090] For security control rules, the specific content can include two aspects: the encryption method and authentication.

[0091] For example, for the encryption method, it can specifically include plaintext transmission (such as traditional Modbus), transport layer encryption (such as PROFINET over TLS), and application layer encryption (such as the proprietary encryption of S7-1500), etc.

[0092] Another example is that for the authentication mechanism, it can include no authentication (most industrial control protocols), password authentication (such as some HMI connections), and certificate authentication (such as OPC UA X.509).

[0093] For example, when the processing device selects the communication protocol rule of the S7 industrial protocol to generate a connection request message, that is, the generated data connection request, the header part of the message can use a fixed header, the operation semantics part selects an implicit operation type, the data encoding feature part uses big-endian order, and the application layer encryption is used in terms of security control features.

[0094] Furthermore, the processing device will send the connection request message generated in the above manner to the PLC device to attempt to establish a session connection in the way of three-way handshake. If the session connection is successfully established, it can be determined that the communication protocol adopted by the PLC device is S7.

[0095] When establishing a session connection in the above-mentioned multiple handshake manner, each handshake message sent by the PLC device to the processing device is the confirmation message replied.

[0096] In addition, in some embodiments of the present application, when the processing device does not receive a confirmation message within a certain period of time, it indicates that the PLC device cannot recognize the currently generated connection request, that is, the connection request does not conform to the communication protocol rules corresponding to the PLC device. At this time, the processing device can select the next communication protocol rule from the protocol rule set according to the traversal rule to generate a connection request and send it to the PLC device to verify whether the next communication protocol rule conforms to the communication protocol adopted by the PLC device.

[0097] It can be understood that through the industrial protocol rule set configured in the processing device, when identifying the communication protocol of the PLC device, corresponding connection messages can be generated by traversing the protocol rules in the protocol rule set, attempting to establish a connection with the PLC device, and finally determining the specific communication protocol type, thereby serving as the parsing basis for the captured data packets and realizing the efficient and accurate parsing of the parsed content in the data packets, and finally obtaining the data value transmitted by the PLC device to the output device.

[0098] Correspondingly, in some embodiments of the present application, after determining the target protocol rule adopted by the PLC device through the above embodiments, for the identification of each field in the data packet sent by the PLC device to the output device, it can be carried out according to the determined target protocol rule.

[0099] That is, for the data packet sent from the PLC device to the output device, the processing device identifies each field in all data packets through the target protocol rule to obtain the target data packet that conforms to the listening rule. And the target data packet obtained is parsed by using the target protocol rule to obtain the corresponding parsed content, so that in the subsequent steps, the target parsed content can be filtered out from the parsed content through the filtering condition.

[0100] The following introduces listening: In some embodiments of the present application, when the processing device captures data packets according to the configured listening rules, the configured listening rules may specifically include data packet types, etc.

[0101] It can be understood that the data packet may include a header, an address field, a control command, etc. The header may contain a type identifier indicating the data packet, which may specifically include data type, read and write (i.e., control command), and other types.

[0102] Then, the target data packet (i.e., the data type data packet) can be captured based on the type identifier of the data packet as the listening basis, and invalid data packets, such as control data packets, warning data packets, and log data packets, can be ignored.

[0103] That is, in S110, the method may specifically include: Obtain a data packet whose type identifier matches the data packet type in the monitoring rule.

[0104] Specifically, when the processing device monitors data packets, it can first use the target protocol rules determined in the above steps to identify the type identifier of the packet header in the data packet. When the identification result indicates that the type identifier represents that the data packet is a data-type data packet, it means that it conforms to the monitoring rule and needs to be captured.

[0105] In practice, in some embodiments of the present application, for the above monitoring rule, it can be configured through the operation interface of the analysis tool.

[0106] That is, before capturing data packets through the monitoring rule, the method further includes: S001, receive the type identifier of the configured data packet in the operation interface.

[0107] S002, generate a monitoring rule based on the received type identifier.

[0108] Specifically, after setting up the system as Figure 1 shown, the sub-tool can be started on the processing device, and then the monitoring rule can be configured on the operation interface of the analysis software tool.

[0109] It can be understood that in the embodiments of the present application, when determining the point address of the PLC register, the monitoring rule can be input in the operation interface of the analysis tool, that is, the type identifier of the data packet can be input in the corresponding input area, so that after the processing device receives the data packet sent by the PLC device to the output device, it can, based on the determined target protocol rule, identify the type identifier in the received data packet header, and then capture the target data packet whose type identifier conforms to the monitoring rule, enabling the processing device to accurately and efficiently capture the target data packet that conforms to the monitoring rule based on the monitoring rule, and ignore other data packets that do not conform to the monitoring rule, thereby improving the data processing speed and saving the data processing volume for subsequent data packet parsing and filtering and screening of the data values in the parsed content of the data packet and the data displayed on the output device.

[0110] It can also be understood that in the above embodiments, after the processing device determines the target protocol rule adopted by the PLC device by attempting to establish a connection with the PLC based on the protocol rule set, and then, based on the configured monitoring rule, uses the target protocol rule to identify the type identifier in the received data packet header to capture the target data packet that conforms to the monitoring rule and complete the acquisition of the target data packet. Further, after obtaining the target data packet, the target parsing content including the data value corresponding to the target parameter can be screened out from the parsed content of each target data packet based on the filtering condition of the configured target parameter, and finally the point address of the target parameter can be obtained.

[0111] The following introduces how to screen the target parsed content based on filtering conditions.

[0112] It can be understood that for PLC devices of different manufacturers, the division of the storage area of their registers is not exactly the same, and the valid ranges of different data areas are also different.

[0113] For example, for Siemens PLC products, their data areas can be divided into DB areas (such as DB1, DB2, DB3... DB500), M areas, I areas, Q areas, etc.; for Mitsubishi PLC products, their data areas can be divided into D areas, M areas, X areas, Y areas, etc.

[0114] In practice, although the names of the data area divisions of PLC products are different, after the division is completed, the functions of each data area are fixed.

[0115] For example, in the data division area of Siemens, the I area is generally used as the storage area for input data, and the Q area is generally used as the storage area for output data.

[0116] Then in some embodiments, the above filtering conditions may include an address range to filter and screen the parsed content in the target data packet.

[0117] Correspondingly, in some embodiments of the present application, filtering out the target parsed content from the parsed content of each target data packet specifically includes: From the parsed content of each target data packet, screen out the parsed content whose register point address matches the address range as the quasi-target parsed content.

[0118] When configuring the filtering conditions, the address range to be scanned can be configured according to experience or the scanning progress.

[0119] For example, according to experience, the target storage area of the data register can be scanned so that the address range corresponding to the target storage area can filter the parsed content.

[0120] For example, for Siemens PLC products, according to the data area division experience, the data values of target parameters such as temperature or humidity are used as input data and are usually stored in the Y area. Then when filtering the parsed content, only the parsed content whose register point address is within the address range corresponding to the Y area can be screened out (at this time, the filtering condition includes the address range of the Y area).

[0121] Another example is that when scanning all storage areas of the register, according to the current scanning progress, configure the address range corresponding to the register partition that needs to be scanned and identified at present as one of the filtering conditions.

[0122] In combination with the above introduction, this embodiment can achieve: after the processing device obtains the target data packet, it can first identify each field in each target data packet based on the target protocol rules determined in the above embodiment to obtain the parsed content corresponding to each target data packet.

[0123] That is, the parsing module in the analysis tool can parse the register address and the data value stored in the data packet according to the determined different communication protocols (network port modbusTCP, serial port (modbus RTU and modbus ASCII)).

[0124] For example, the address field in the data packet is identified to obtain the register point address, and the data value field is identified to obtain specific data value information, so that the obtained parsed content can include the data value and the register point address storing the data value.

[0125] In practice, the data value at the point address is stored in the PLC in binary form, and the numerical analysis module converts the binary data packet into a visual decimal value according to the analysis rules specified in the communication protocol.

[0126] For example, Figure 5 As shown, for the target data packet captured according to the monitoring rules, multiple parsing contents can be parsed according to the determined communication protocol rules, and each parsing content can exemplarily include a data value and its corresponding data type and register point address.

[0127] The register point address may represent the storage address of a register point, which is generally a specific address within a specific partition.

[0128] Further, after obtaining the parsed content of each target data packet, the processing device may filter the parsed content using the address range in the set filtering condition, and select the parsed content whose register point address matches the address range as the quasi-target parsed content.

[0129] It can be understood that in the embodiment of the present application, before monitoring the data packets sent by the PLC device to the output device, an attempt is made to establish a connection with the PLC device based on the protocol rules in the configured protocol rule set, and then the industrial protocol of the PLC device can be determined on the basis of the successful establishment of the connection, so as to provide a basis for the subsequent monitoring of the data packets, so that in the operation of parsing the data packets, the aforementioned confirmed industrial protocol can be used to accurately parse the data packets, and the data values ​​in the data packets and the address information corresponding to the data values ​​can be obtained, etc., and then the parsed content can be effectively screened by configuring the address range as a filtering condition, which can effectively reduce the data processing amount of the processing equipment and improve the data processing efficiency.

[0130] It can also be understood that in some embodiments, among the quasi-target analysis contents obtained through the above screening, non-target analysis contents are usually included, that is, further screening and filtering are still required to finally obtain the target analysis contents corresponding to the target parameters.

[0131] The target parameters may include some or all of the monitoring parameters displayed by the HMI during the automated production process, such as output, speed, temperature, humidity, and electrical parameters by way of example. These monitoring parameters have actual physical meanings and attribute characteristics in the business scenario.

[0132] By way of example, the physical meanings and attribute characteristics of the above monitoring parameters can show that they have corresponding data types and data attribute characteristics (which may include positive and negative values, change rules, update rules, functional relationships, etc. by way of example).

[0133] For example, for the output parameter (such as the winding length), its data type can be of the Word type, and its data value is generally a positive integer.

[0134] For another example, the magnitudes of some monitoring parameters generally follow a certain change rule. For example, for the monitoring parameter of output (such as the winding length), it usually shows a linear growth trend as time goes by. Also, for the remaining amount of some consumables, it usually shows a linear decreasing trend as time goes by.

[0135] For yet another example, the data values of some monitoring parameters are usually within a stable range. For example, for monitoring signals such as current and running speed, during the actual production process, their magnitudes fluctuate little and are basically within a stable range.

[0136] For yet another example, the update frequency of some monitoring parameters is relatively single and fixed. For example, within a set period of time, it usually updates a fixed number of times. For example, for the monitoring parameter of output, it usually has a 24-hour update cycle; also, for temperature or humidity parameters, it usually has a 1-hour update cycle.

[0137] For yet another example, the data types of some monitoring parameters are relatively special compared to other data value types. For example, in the actual production scenario, the situation where the monitoring parameter is negative is less. Then, for monitoring parameters that may be negative, such as temperature or growth rate, etc., when filtering the data values, effective filtering and screening can be carried out according to this feature.

[0138] Therefore, the filtering conditions can also include the data type and / or data attribute characteristics of the target parameters to finally determine the target analysis contents.

[0139] The same is true for other business scenarios. The data types and data attribute characteristics in the screening conditions can also be determined according to the business scenario, which will not be elaborated here.

[0140] Then, in some embodiments of the present application, based on the characteristics of the above data values, the configured filtering conditions may further include at least one of the following: the first variation law of the display data of the target parameter with time (which may be abbreviated as condition 1), the first update law of the display data of the target parameter (which may be abbreviated as condition 2), the first data type of the target parameter (which may be abbreviated as condition 3), and the first functional relationship (which may be abbreviated as condition 4). The following is a separate description: In some embodiments of the present application, when the filtering condition (except for the address range) further includes the first variation law, filtering out the target parsing content from the parsing content of each target data packet may further include the following steps: S01, determine the second variation law of the data value in the quasi-target parsing content with time.

[0141] S02, match the second variation law with the first variation law.

[0142] It can be understood that for the target parsing content filtered out from the quasi-target parsing content, its second variation law matches the first variation law (that is, the target parsing content meets condition 1).

[0143] As previously mentioned, there is a mapping relationship between the display data on the output device and the PLC register bit address. Then, the display data of the monitored parameter displayed on the output device of the PLC (such as a touch screen) (which may be abbreviated as the display value, and the display data of the target parameter will be abbreviated as the display value hereinafter) and the original data value stored in the register bit address with the mapping relationship have a synchronous variation relationship in time (reference can be made to Figure 3 the data value stored in the register address a.bbc and the display value of the winding 1 current displayed on the HMI change synchronously).

[0144] Since there is a synchronous variation relationship, if the target parameter is mapped to a certain register bit address A, the variation law of the display data of the target parameter on the output device and the data value stored in the register bit address A with time should be the same. For example, both remain unchanged within a certain period of time, or both change linearly with time, etc.

[0145] Therefore, in this embodiment, when screening the quasi-target parsing content to determine the target parsing content, the target data is screened out from the parsed data set by using whether the two conform to the synchronous variation relationship.

[0146] In this embodiment, if the filtering condition includes the variation law of the display data of the target parameter over time (i.e., the first variation law), step S01 can be executed to obtain the variation law of the data values at each register point address in the quasi-target parsing content, that is, the second variation law. Then, the first variation law in the filtering condition can be matched with the second variation laws of each quasi-target parsing content to remove the quasi-target parsing content that does not match the first variation law, thereby eliminating the invalid parsing content.

[0147] Specifically, the quasi-target parsing content within a preset duration can be cached, and based on the cached quasi-target parsing content, the variation law of the data values corresponding to the same register point can be analyzed as the second variation law.

[0148] The first variation law is also obtained by analyzing the variation law of the display values of the target parameter within the same preset duration.

[0149] It can be understood that after filtering by the filtering condition, the target parsing content filtered from the quasi-target parsing content has a second variation law that matches the first variation law.

[0150] In some embodiments of the present application, when the filtering rule further includes the update law of the data value of the target parameter, that is, when including the first update law, filtering out the target parsing content from the parsing content of each target data packet further includes: S03, determining the second update law of the data value in the quasi-target parsing content.

[0151] S04, matching the second update law with the first update law.

[0152] The first update law can exemplarily include one or more of the number of updates within a first preset time period, the update moment of the target parameter, the update period, and the update frequency.

[0153] In some scenarios, when the update state of the display data of the target parameter is stable, such as a target parameter with an update frequency lower than the frequency threshold or the number of updates within a time period lower than the number threshold, the target parsing content can be screened based on this update frequency or the number of updates.

[0154] The values of the frequency threshold, the number threshold, and the duration of the first preset time period can all be flexibly designed according to the actual situation: For example, if the target parameter includes the equipment wear parameter, the equipment wear parameter usually has an update period of one week or one month. If the display data is updated once within an update period, the first update law can include at least one of the update period (one week or one month), the number of updates (once), and the update frequency (1 time / update period).

[0155] For another example, the target parameter includes the production output. For the production output, according to the production configuration, usually, the production output data can be updated once within a fixed period, such as being updated at zero o'clock every day. Then the first update rule may include the update time - zero o'clock every day.

[0156] Since there is a synchronization relationship between the display value on the output device of the PLC and the original data value stored at the register bit address with a mapping relationship, in this embodiment, for the preliminarily screened quasi-target parsing content, the update rule of the data value therein within the first preset time period can be analyzed as the second update rule.

[0157] Specifically, the quasi-target parsing content within the first preset time period can be cached, and based on the cached quasi-target parsing content, the update rule of the data value corresponding to the same register bit can be analyzed as the second update rule.

[0158] Furthermore, the second update rule is matched with the first update rule to eliminate the content in the quasi-target parsing content that does not match the type of the first update rule, so as to effectively filter the quasi-target parsing content. Finally, the target parsing content filtered from the quasi-target parsing content has its second update rule matched with the first update rule (that is, it meets condition 2).

[0159] It should be noted that when the filtering rule includes multiple conditions, for example, the filtering rule includes condition 1 and condition 2 at the same time, the target parsing content finally filtered from the quasi-target parsing content must meet both 1 and condition 2. Similarly, if the filtering rule includes condition 1 and condition 3 at the same time, the filtered target parsing content must meet both 1 and condition 3. And if the filtering rule includes condition 1 - condition 3 at the same time, the filtered target parsing content must meet both 1 - condition 3, and so on, which will not be elaborated hereinafter.

[0160] In some other embodiments of the present application, the filtering condition may further include the data type of the display value, that is, the first data type. The quasi-target parsing content is effectively screened according to the data type of the display value. Then filtering out the target parsing content from the parsing content of each target data packet may further include: S05, determining the data type of the data value in the quasi-target parsing content as the second data type.

[0161] S06, matching the second data type with the first data type.

[0162] Among them, for the target parsing content filtered from the quasi-target parsing content, its second data type matches the first data type.

[0163] The data types of the data values in the register addresses of the PLC device can specifically include WORD, DWORD, and INT, etc.

[0164] Among them, WORD usually represents a 16-bit (2-byte) data type. It can be used to store unsigned integers, with a value range from 0 to 65535 (2 16 - 1). When represented in signed form, the value range is from -32768 to 32767 (using two's complement representation). In the programming corresponding to the PLC device (such as assembly language), simple numerical values or status information can be represented by directly operating on WORD-type data.

[0165] DWORD is a 32-bit (4-byte) data type. For unsigned DWORD, its value range is from 0 to 4294967295 (2 32 - 1). The value range of signed DWORD (using two's complement) is from -2147483648 to 2147483647. In the PLC device, DWORD is often used to represent some system-related numerical values, such as process identifiers (PID), part of the memory address, etc.

[0166] For the DINT data type, it can represent signed integers (Integer). Its size depends on the processor architecture and the settings of the assembler used. It can generally be used to represent various numerical values, such as loop counters, array indices, intermediate results in mathematical calculations, etc.

[0167] Such as Figure 3 In the scenario shown, the data type of the monitoring parameter of the number of injury points is DINT or DWORD. The data types of the monitoring parameters such as winding length, running speed, given speed, and winding current can be REAL.

[0168] In this embodiment, for the display values with special data types, the special data type can be used as a filtering condition to quickly filter the target parsing content. For example, for the data type of negative numbers, usually, it only appears under the monitoring of temperature parameters. Then when the target parameter may be negative, such as temperature, the invalid parsing content in the target parsing content can be eliminated by aligning the data type.

[0169] That is, first, the data type of the data value in the quasi-target parsing content can be determined as the second data type. Then, the second data type can be matched with the first data type to eliminate the quasi-target parsing content where the second data type does not match the first data type. Finally, the target parsing content filtered from the quasi-target parsing content has a second data type that matches the first data type.

[0170] It can be understood that in an actual production scenario, the data values of monitoring parameters are usually stored in the PLC in binary form. Then, when the output device connected to the PLC device receives the data packet transmitted by the PLC device, the output device can convert the binary data packet into a decimal value according to the parsing rules specified in the communication protocol.

[0171] Moreover, during visual display, for the convenience of operators to read, the output device can also transform the decimal data according to a preset functional relationship.

[0172] For example, for some data values that are very large or very small, the final display result can be converted through the set functional relationship. For instance, assuming that the binary data stored in the register bit address is converted into the decimal fraction 0.15, which corresponds to the parameter of humidity, then 0.15 may be further converted into 15% or 15 for display on the HIM.

[0173] Then, in some embodiments of the present application, the above filtering condition may further include a first functional relationship. Correspondingly, filtering out the target parsing content from the parsing content of each target data packet may further include the following steps: Filter out the parsing content whose data value and display value satisfy the first functional relationship from the quasi-target parsing content.

[0174] In one example, the operation of "filtering out the parsing content whose data value and display value satisfy the first functional relationship from the quasi-target parsing content" can be achieved through the following operations: S07, determine the second functional relationship between the display value and the data value in the quasi-target parsing content.

[0175] S08, match the second functional relationship with the first functional relationship.

[0176] Among them, for the target parsing content filtered out from the quasi-target parsing content, its second functional relationship matches the first functional relationship.

[0177] Specifically, in the embodiments of the present application, during the process of screening and filtering the quasi-target parsing content, the second functional relationship between the display data of the target parameter and the data value in the quasi-target parsing content can also be determined.

[0178] Furthermore, after determining the second functional relationship, the second functional relationship can be matched with the preset first functional relationship to eliminate the quasi-target parsing content whose second functional relationship does not match the first functional relationship, so as to further screen the quasi-target parsing content, and finally make the second functional relationship of the target parsing content filtered out from the quasi-target parsing content match the first functional relationship.

[0179] Exemplarily, the first functional relationship between the display value y and the data value x in the corresponding mapped register address is expressed as: y = x * 10^N, where the value of N is not limited. Then, the quotient between the display value and the data values in each quasi-target parsing content can be calculated. If the quotient is equal to the Nth power of 10, such as the 0th power of 10, the 1st power of 10, the -1st power of 10, the -2nd power of 10, the 2nd power of 10, etc., then the two match.

[0180] In another example, the data value in the quasi-target parsing content can also be used as the independent variable x and substituted into the first functional relationship to calculate the corresponding dependent variable y'. Then, compare whether the dependent variable y' is equal to the display value. If they are equal, the data value and the display value satisfy the above first functional relationship.

[0181] For example, assume that the first functional relationship is: y = x * 100, and the display value is 15. The data values in the three quasi-target parsing contents are 0.15, 15, and 0.015 respectively. Then, 0.15, 15, and 0.015 can be used as the independent variables and substituted into y = x * 100 respectively. The calculated y' values are: 15, 1500, and 1.5 respectively. Then, it can be determined that the dependent variable 15 is equal to the display value. That is, the data value 0.15 and the display value 15 satisfy the first functional relationship, and the other two quasi-target parsing contents can be excluded.

[0182] Of course, the above first functional relationship can be in any expression form, which will not be elaborated here.

[0183] In summary, it can be understood that when determining the target parsing content using the filtering conditions, it can be achieved by combining the data type, the law of change of the target parameter data over time, the update law, and the functional relationship between the data value of the target parameter in the data packet and the display data on the output device. For example, the target parsing content can be screened only according to the data type and the change law, or only according to the functional relationship, or the above filtering conditions such as the data type, the law of change of the target parameter data over time, the update law, and the functional relationship between the data value of the target parameter in the data packet and the display data on the output device can be combined synchronously to accurately and quickly determine the target parsing content.

[0184] That is, in practice, when matching the data value of the data packet with the display data of the target parameter, one of the matching rules can be used alone, or multiple filtering conditions can be combined to improve the data processing efficiency.

[0185] For example, the parsed content can be initially filtered using an address range to eliminate the parsed content whose register addresses in the parsed content are not within the address range, obtaining quasi-target parsed content. Then, using the first variation rule, the quasi-target parsed content can be further filtered to eliminate the parsed content whose variation rule of the data value in the quasi-target parsed content does not conform to the first variation rule.

[0186] At this time, if the target parsed content still cannot be determined, the first update rule can also be used to further filter the quasi-target parsed content after being eliminated by the first variation rule, that is, eliminating the content that does not conform to the first update rule. By flexibly combining and adjusting the above filtering conditions in this way, the target parsed content corresponding to the target parameter can finally be filtered out from the parsed content, that is, the register point address corresponding to the target parameter can be obtained.

[0187] In some embodiments of the present application, for the above filtering conditions, they can be configured through the operation interface of the analysis tool.

[0188] That is, before filtering out the target parsed content from the parsed content of each target data packet based on the filtering conditions of the target parameter, the method further includes: S003, receiving the configured filtering information in the operation interface.

[0189] S004, generating filtering conditions based on the received filtering information.

[0190] Specifically, after setting up the system as shown in Figure 1 , the analysis tool can be started on the processing device, and then the filtering conditions can be configured on the operation interface of the analysis software.

[0191] For example, data type information such as integers can be input in the corresponding input area to generate filtering conditions including the data type. Or, address information can be input in the corresponding input area to generate filtering conditions including the address range.

[0192] It can be understood that in the embodiments of the present application, when determining the PLC register point address, filtering conditions can be input in the operation interface of the analysis tool of the processing device, that is, data type or address information can be input in the corresponding input area, so that after the processing device receives the data type or address information, specific filtering conditions can be generated based on the received information, enabling the processing device to accurately and efficiently filter out the target parsed content corresponding to the target parameter from the parsed content of the target data packet during subsequent filtering operations.

[0193] In some embodiments of the present application, to determine the first variation law and the first update law in the filtering conditions, the display data on the output device can be obtained, and then the display data can be analyzed to obtain the corresponding first variation law and the second update law.

[0194] That is, in some embodiments, the method may further include: S005, obtaining the display data of the target parameter on the output device.

[0195] S006, determining the first variation law and / or the first update law of the display data of the target parameter over time according to the obtained display data.

[0196] Exemplarily, the display data of the target parameter within the first preset time period can be cached, and based on the cached data, the first variation law of the display data corresponding to the same target parameter can be analyzed.

[0197] In addition, based on the cached display data, the update frequency, the number of updates, the update time, etc. of the display data of the same target parameter within the preset duration can be counted.

[0198] In some embodiments, obtaining the display data on the output device can be specifically implemented through an image capture program.

[0199] That is, in some embodiments, an image capture program can be installed on the display device to be able to capture images in real time, and then output them to the processing device, so that the processing device can recognize the information in the images, for example, perform ORC (Optical Character Recognition) recognition, to automatically obtain the display data of the target parameter, and generate filtering conditions according to the obtained display data.

[0200] Specifically, it may include: S0001, obtaining the image currently displayed in the display area on the output device.

[0201] S0002, performing character recognition on the obtained image to obtain the current display data.

[0202] Specifically, the HIM can be screenshot or photographed. Perform text recognition on the region of interest in the image obtained by screenshot or photograph, and compare the text recognition result with the parsed data to achieve automatic comparison. Exemplarily, the region of interest can be represented by coordinates.

[0203] Further, after obtaining the display data on the output device through the above method, the corresponding filtering conditions can be generated by analyzing the characteristics of the display data, such as the variation relationship with time, or the update frequency, etc.

[0204] It can be understood that in the embodiments of the present application, for the display data on the output device, a screenshot applet installed in the output device can be used to capture the image currently displayed in the display area of the output device, and then through character recognition, the display data can be quickly and accurately obtained, improving the data processing speed and accuracy.

[0205] In some embodiments of the present application, in order to improve the accuracy of the determined address information, after determining the target parsing content, the determined target parsing content can be further verified according to the display result on the output device.

[0206] That is, in some embodiments, the method further includes: S150, within a second preset time period, track the display data of the target parameter and the data value in the register point address of the target parameter.

[0207] Those skilled in the art can flexibly design the length of the second preset time period according to the update frequency of the target parameter, such as one hour, one minute, etc., which will not be elaborated here.

[0208] S160, determine whether the change in the display data of the target parameter is synchronized with the change in the data value in the determined register point address.

[0209] S170, if it is determined that the changes are not synchronized, return to execute the step of listening for the data sent by the PLC device to the output device and subsequent steps again.

[0210] Specifically, after obtaining the address information of the target parameter, in some embodiments of the present application, the verification of the register point information of the parameter can also be implemented through steps S150 - S170 to ensure accuracy.

[0211] That is, after obtaining the register point address corresponding to the monitoring parameter displayed on the HIM, and then according to the set tracking period, track the target parameter and the register point address in the register point address for a period of time to determine whether the two conform to the synchronous change relationship, that is, determine whether the change in the display data of the target parameter is synchronized with the change in the data value in the register point address in the corresponding relationship.

[0212] It can be understood that if it is determined that the changes are not synchronized, it means that there is an error in the determination process of the point address of the original target parameter, and then the step of listening for the data packet sent by the PLC device to the output device and subsequent steps can be returned to execute again, that is, re - execute the above - mentioned steps to re - determine the address information of the target parameter.

[0213] It can be understood that the method for determining the PLC register point information provided by the embodiments of the present application determines the point address of the PLC register based on the correspondence between the real-time value of the monitoring parameter displayed on the output device of the PLC device and the data value stored at the register point address of the PLC device: First, in response to the connection instruction, a communication connection with the PLC device is established based on each protocol rule in the industrial protocol rule set, the industrial protocol adopted by the PLC device is determined, and then the data packet sent by the PLC device to its corresponding output device is obtained through the configured listening rule, and the obtained data set is parsed using the determined industrial protocol. Furthermore, using the filtering rule, the target data corresponding to the display result of the target parameter on the output device is determined from the parsed data set, thereby determining the register point address of the target parameter in the PLC device and achieving accurate positioning of the storage point of the output parameter of the PLC.

[0214] It can be seen that the present application does not require the use of the PLC source program or the touch screen program, nor does it rely on the detailed point information provided by the manufacturer, and it can be implemented without analyzing the touch screen program. Therefore, it avoids excessive reliance on the source program provided by the PLC device manufacturer. Even when the point information or the PLC source program provided by the device manufacturer cannot be obtained, and the touch screen program cannot be obtained either, positioning can still be achieved. At the same time, since there is no need to determine the data point through the PLC source program provided by the device manufacturer, the professional requirements for engineers are also reduced, thereby reducing the difficulty of determining the point information. Moreover, in the present application, the data acquisition method of capturing the target data packet based on the listening rule enables the need to traverse all the point data in the PLC device, thus improving the data processing efficiency and reducing the time cost.

[0215] In the actual production process, after determining the point information of the target parameter through the embodiments of the present application, the truly valuable information can be extracted from numerous devices and sensors based on the point information, so that the PLC data can be directly applied to various control scenarios and monitoring scenarios, providing a basis for improving production efficiency and reducing production costs.

[0216] On the other hand, some embodiments of the present application, as Figure 6 shown, also provide a device for determining the PLC register point information (hereinafter referred to as the determining device for short), and the device includes: A first acquisition module 210, configured to acquire a target data packet that conforms to the listening rule from the data packets sent by the PLC device to the output device; A filtering module 220 is configured to filter out target parsed content from the parsed content of each target data packet based on a filtering condition of a target parameter; wherein, the parsed content of at least some of the target data packets includes a data value and a register position address storing the data value; any one of the target parameters is a parameter displayed by the output device; and the register position address in the target parsed content is the position address of the target parameter.

[0217] In an embodiment, the above-mentioned determination device further includes: A connection module 230 is configured to send a connection request to the PLC device; the connection request is generated using any one of the communication protocol rules in the protocol rule set; A determination module 240 is configured to, if an acknowledgement message returned by the PLC device is received, determine that the communication protocol rule used by the connection request is a target protocol rule; the target protocol rule conforms to the communication protocol used by the PLC device.

[0218] In an embodiment, the parsed content is parsed according to the target protocol rule. Refer to the foregoing description for details and no further elaboration will be provided here.

[0219] In an embodiment, if the above-mentioned monitoring rule includes a data packet type, the first acquisition module is specifically configured to: Acquire a data packet whose type identifier conforms to the data packet type in the monitoring rule. Refer to the foregoing description for details and no further elaboration will be provided here.

[0220] In an embodiment, the filtering condition includes an address range; correspondingly, the filtering module is specifically configured to: Screen out the parsed content whose register position address conforms to the address range from the parsed content of each target data packet as quasi-target parsed content. Refer to the foregoing description for details and no further elaboration will be provided here.

[0221] In an embodiment, the filtering condition further includes at least one of: a first change rule of the display data of the target parameter over time, a first update rule of the display data of the target parameter, a first data type of the target parameter, and a first function relationship.

[0222] When the filtering condition further includes the first change rule, the filtering module is further configured to: Determine a second change rule of the data value in the quasi-target parsed content over time; Match the second change rule with the first change rule; Among them, for the target parsed content filtered out from the quasi-target parsed content, its second change rule matches the first change rule. Refer to the foregoing description for details and no further elaboration will be provided here.

[0223] When the filtering condition also includes the first updating rule, the filtering module is further used for: Determining a second updating rule for data values ​​in the quasi-target parsed content; Matching the second update rule with the first update rule; The second update rule of the target parsed content filtered out from the quasi-target parsed content matches the first update rule. Please refer to the above records, which will not be elaborated here.

[0224] When the filtering condition also includes the first data type, the filtering module is further configured to: Determine a data type of the data value in the quasi-target parsed content as a second data type; matching the second data type with the first data type; The second data type of the target parsed content filtered out from the quasi-target parsed content matches the first data type. Please refer to the above records, which will not be elaborated here.

[0225] When the filtering condition further includes the first functional relationship, the filtering module is further used for: The analytic contents whose data values ​​and the display data of the target parameters satisfy the first functional relationship are filtered out from the quasi-target analytic contents.

[0226] Please refer to the above records and will not elaborate on them here.

[0227] In one embodiment, the determining device further includes: The second acquisition module 250 is used to acquire the current display data of the target parameter on the output device; The generating module 260 is used to determine a first variation rule and / or a first update rule of the display data of the target parameter over time according to the current display data.

[0228] In one example, in terms of acquiring the current display data of the target parameter on the output device, the second acquisition module is specifically used to: Get the image currently displayed in the display area on the output device; Perform character recognition on the acquired image to obtain the current display data. Please refer to the above records and will not be described in detail here.

[0229] In an exemplary embodiment, a processing device is also provided, which includes at least a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0230] The processing device is a data collection device, which can be a server or a terminal. Its internal structure is as follows: Figure 7As shown in the figure. The processing device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the processing device is used to provide computing and control capabilities. The memory of the processing device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the processing device is used to store the data and programs involved in the foregoing embodiments. The input / output interface of the processing device is used to exchange information between the processor and external devices. The communication interface of the processing device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements the PLC register bit information determination method in the foregoing embodiments.

[0231] Those skilled in the art can understand that Figure 7 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the processing device to which the solution of the present application is applied. The specific processing device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0232] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, it implements the steps in the foregoing method embodiments.

[0233] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, it implements the steps in the foregoing method embodiments.

[0234] It can be understood that the present application provides a method, device, equipment, medium, and product for determining the address of a PLC register bit. Based on the correspondence between the real-time value of the monitoring parameter displayed on the output device of the PLC device and the data value stored in the register bit address of the PLC device, the address of the register bit of the PLC is determined: First, in response to a connection instruction, based on each protocol rule in the industrial protocol rule set, a communication connection with the PLC device is established, the industrial protocol adopted by the PLC device is determined, and then the data packet sent by the PLC device to its corresponding output device is obtained through the configured listening rule, and the obtained data set is parsed using the determined industrial protocol. Then, using the filtering rule, the target data corresponding to the display result of the target parameter on the output device is determined from the parsed data set, so as to determine the register bit address of the target parameter in the PLC device, and accurately locate the storage location of the output parameter of the PLC.

[0235] It can be seen that this application does not require the use of PLC source programs or touch screen programs, nor does it rely on the detailed point information provided by the manufacturer, and it can be implemented without analyzing the touch screen program. Therefore, it avoids over-reliance on the source programs provided by PLC device manufacturers. Even when the point information or PLC source program provided by the device manufacturer cannot be obtained, and the touch screen program cannot be obtained, positioning can still be achieved. At the same time, since it is not necessary to determine the data points through the PLC source program provided by the device manufacturer, the professional requirements for engineers are also reduced, thereby reducing the difficulty of determining the point information. Moreover, in this application, the data acquisition method of capturing target data packets based on the monitoring rules enables the need not to traverse all the point data in the PLC device, thus improving the data processing efficiency and reducing the time cost.

[0236] In the actual production process, after determining the point information of the target parameter through the embodiment of this application, it is possible to extract truly valuable information from numerous devices and sensors based on the point information, so that the PLC data can be directly applied to various control scenarios and monitoring scenarios, providing a basis for improving production efficiency and reducing production costs.

[0237] That is, in the embodiment of this application, with the rise of Industry 4.0 and intelligent manufacturing, as well as the rapid development of domestic automation technology, data analysis not only helps improve the efficiency of point location search, but also promotes the standardization and security of data exchange between devices. In addition, in the technical background of obtaining PLC points, data analysis involves the deep integration of information technology, computer technology, and communication technology in industrial automation, as well as the requirements for intelligent manufacturing and digital transformation in the Industry 4.0 era. With the development of the industrial automation industry, as the core component of the automation control system, the parsing and application of the communication protocol of PLC become particularly important. That is, based on the PLC register point information determined in the embodiment of this application, after parsing and applying the communication protocol of PLC, the original data in the PLC register can be obtained efficiently and quickly. Furthermore, the determined PLC register point information can be used to make full use of and mine the original data to meet various automated production requirements.

[0238] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments, or the functions of each module in the above determination device, can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0239] The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0240] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.

[0241] In this text, specific examples are used to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. To sum up, the content of this specification should not be construed as a limitation to this application.

Claims

1. A method for determining a PLC register point address, characterized in that: The method comprises: Obtain target data packets that meet monitoring rules from the data packets sent by the PLC device to the output device; Based on the filtering conditions of the target parameters, the target parsed content is filtered out from the parsed content of each target data packet; wherein the parsed content of at least part of the target data packets includes a data value and a register point address storing the data value; any target parameter is a parameter displayed by the output device; and the register point address in the target parsed content is the point address of the target parameter.

2. The method for determining the PLC register point address according to claim 1, characterized in that: Before acquiring the target data packet that meets the monitoring rule, the method further includes: Sending a connection request to the PLC device; the connection request is generated using any communication protocol rule in a protocol rule set; If a confirmation message returned by the PLC device is received, it is determined that the communication protocol rule adopted by the connection request is a target protocol rule; and the target protocol rule is consistent with the communication protocol adopted by the PLC device.

3. The method for determining the PLC register point address according to claim 2, characterized in that: The parsed content is obtained by parsing according to the target protocol rule.

4. The method for determining a PLC register point address according to any one of claims 1 to 3, characterized in that: The monitoring rule includes a data packet type, and acquiring a target data packet that complies with the monitoring rule includes: acquiring a data packet whose type identifier complies with the data packet type in the monitoring rule.

5. The method for determining the PLC register point address according to claim 1, characterized in that: The filtering condition includes an address range; filtering out target parsed content from the parsed content of each target data packet includes: From the parsed contents of each target data packet, the parsed contents whose register point addresses match the address range are screened out as quasi-target parsed contents.

6. The method for determining the PLC register point address according to claim 5, characterized in that: The filtering condition further includes: at least one of: a first change rule of the display data of the target parameter over time, a first update rule of the display data of the target parameter, a first data type of the target parameter, and a first functional relationship.

7. The method for determining the PLC register point address according to claim 6, characterized in that: When the filtering condition further includes the first change rule, filtering out target parsed content from the parsed content of each target data packet further includes: Determine a second variation rule of data values ​​in the quasi-target analysis content over time; matching the second changing rule with the first changing rule; Among them, the second change rule of the target analysis content filtered out from the quasi-target analysis content matches the first change rule.

8. The method for determining the PLC register point address according to claim 6, characterized in that: When the filtering condition further includes the first update rule, filtering out target parsed content from the parsed content of each target data packet further includes: Determining a second updating rule of data values ​​in the quasi-target parsed content; Matching the second updating rule with the first updating rule; Among them, the second update rule of the target parsed content filtered out from the quasi-target parsed content matches the first update rule.

9. The method for determining the PLC register point address according to claim 6, characterized in that: When the filtering condition further includes the first data type, filtering out target parsed content from the parsed content of each target data packet further includes: Determine a data type of the data value in the quasi-target parsed content as a second data type; matching the second data type with the first data type; The second data type of the target parsed content filtered out from the quasi-target parsed content matches the first data type.

10. The method for determining the PLC register point address according to claim 6, characterized in that: When the filtering condition further includes the first functional relationship, filtering out target parsed content from the parsed content of each target data packet further includes: The analytic contents whose data values ​​and the display data of the target parameters satisfy the first functional relationship are filtered out from the quasi-target analytic contents.

11. The method for determining a PLC register point address according to any one of claims 1-3 and 5-10, characterized in that: The method further comprises: Acquire current display data of the target parameter on the output device; A first variation rule and / or a first update rule of the display data of the target parameter over time is determined according to the current display data.

12. The method for determining the PLC register point address according to claim 11, characterized in that: The obtaining of the current display data of the target parameter on the output device comprises: Acquire the image currently displayed in the display area on the output device; Character recognition is performed on the acquired image to obtain the current display data.

13. A device for determining a PLC register point address, characterized in that: The device comprises: A monitoring module is used to obtain a target data packet that meets the monitoring rules from the data packet sent by the PLC device to the output device; A determination module is used to filter out target parsed content from the parsed content of each target data packet based on the filtering conditions of the target parameter; wherein the parsed content of at least part of the target data packets includes a data value and a register point address storing the data value; any target parameter is a parameter displayed by the output device; and the register point address in the target parsed content is the point address of the target parameter.

14. A processing device, characterized in that: The processing device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for determining a PLC register point address according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for determining a PLC register point address according to any one of claims 1 to 12 is implemented.

16. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed, the method for determining the PLC register point address according to any one of claims 1 to 12 is executed.

Citation Information

Patent Citations

  • Register address collection method and device, terminal and readable storage medium

    CN113050992A

  • PLC register point location information determination method, device, equipment, medium and product

    CN119396879A

  • Method, device and equipment for displaying register address in programmable logic controller

    CN119476257A

Cited By

  • Register address positioning method for equipment display data, equipment and medium

    CN120523694A

  • Data communication method, device and equipment based on line concentration equipment

    CN120639847A

  • Data analysis rule generation method and system for industrial equipment, equipment and medium

    CN120812157A

  • Data analysis rule generation method, system, device and medium for industrial equipment

    CN120812157B