Plc data acquisition control system and method

By setting up a model library and a real-time library, combined with a PLC data acquisition module, data acquisition and control of PLCs with different communication protocols are realized, solving the problem of insufficient compatibility in existing technologies and making it suitable for the PLC data acquisition needs of various industrial production lines.

CN117055461BActive Publication Date: 2026-05-19SANHE ROBOT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SANHE ROBOT TECH CO LTD
Filing Date
2023-09-26
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies lack PLC data acquisition and control systems that are compatible with multiple communication protocols, making it difficult to uniformly acquire and control data from PLCs that follow different communication protocols.

Method used

A PLC data acquisition and control system is provided, including a model library, a real-time library, and a PLC data acquisition module. By storing multiple basic data models, caching data, and parsing protocol formats based on the target basic data model, the system can acquire and control data from PLCs with different communication protocols.

Benefits of technology

It achieves compatibility with multiple communication protocols, enabling convenient data acquisition and control, and is suitable for various application scenarios such as industrial production lines for casting, forging, stamping, heat treatment, welding, machining, and mechanical assembly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117055461B_ABST
    Figure CN117055461B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial automation, in particular to a PLC data acquisition control system and method, which comprises a PLC data acquisition module, the PLC data acquisition module comprises a data model downloading unit, which is used for downloading all basic data models in a preset model library to a preset real-time library under the condition of receiving a PLC data acquisition instruction; a data model acquisition unit, which is used for acquiring corresponding target basic data models from the real-time library based on preset data acquisition requirement information; an original message acquisition unit, which is used for acquiring original messages of at least one target point of a target PLC based on all target basic data models; and an original message analysis unit, which is used for performing protocol format analysis on the original messages based on a target communication protocol data model in the target basic data model, obtaining message data and buffering the message data to the real-time library. The PLCs using different communication protocols can be controlled and data acquisition can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation technology, and in particular to a PLC data acquisition and control system and method. Background Technology

[0002] With the widespread adoption of automated production technology, most current engineering machinery manufacturing processes, such as casting, forging, stamping, heat treatment, welding, machining, and mechanical assembly, have achieved automated production. Each production line typically has one or more PLCs (Programmable Logic Controllers) to enable online control of the equipment on the production line. Therefore, in order to achieve production line monitoring, it is necessary to communicate with the PLCs to complete data acquisition from them.

[0003] However, due to the wide variety of PLCs, different types of PLCs often follow different communication protocols. Currently, there is a lack of PLC data acquisition and control systems that are compatible with multiple communication protocols, making it inconvenient to uniformly acquire and control data from PLCs that follow different communication protocols. Summary of the Invention

[0004] This invention provides a PLC data acquisition and control system and method to solve the problem that the existing technology lacks a PLC data acquisition and control system that is compatible with multiple communication protocols, making it inconvenient to uniformly acquire and control data from PLCs that follow different communication protocols.

[0005] This invention provides a PLC data acquisition and control system, comprising:

[0006] The model library is used to store multiple basic data models required for collecting PLC data. The basic data models are PLC information data models, communication protocol data models, data acquisition point data models, or data models of devices connected to the PLC.

[0007] A real-time library is used for data caching.

[0008] The PLC data acquisition module includes:

[0009] The data model download unit is used to download all the basic data models to the real-time library upon receiving a PLC data acquisition instruction.

[0010] The data model acquisition unit is used to acquire a target basic data model corresponding to the data acquisition requirement information from the real-time database based on the preset data acquisition requirement information.

[0011] The raw message acquisition unit is used to acquire raw messages of at least one target point of the corresponding target PLC based on all the target basic data models.

[0012] The original message parsing unit is used to parse the original message according to the target communication protocol data model in the target basic data model to obtain message data; and to cache the message data in the real-time library.

[0013] Optionally, the PLC information data model includes: the PLC's serial number, IP address, port number, connected devices, and data acquisition frequency;

[0014] The communication protocol data model includes: protocol type, communication method, and message parsing program set;

[0015] The data acquisition point model includes: point information of at least one point in the register corresponding to the PLC, and the point information includes: point data type, point data size and point read / write attribute information;

[0016] The data model of the devices connected to the PLC includes: device information for each device connected to the PLC, including: device code, device name, and device type.

[0017] Optionally, the data model acquisition unit is specifically used to acquire, based on the data acquisition requirement information, the target PLC information data model, the target communication protocol data model, the target acquisition point data model, and the target PLC connected device data model from the real-time database; the data acquisition requirement information is indication information used to obtain the target basic data model from all the basic data models.

[0018] Optionally, it also includes: a message bus;

[0019] The original message acquisition unit is specifically used to determine at least one target PLC and target PLC information based on the data model of all target PLC information, wherein the target PLC corresponds to the target PLC information; determine the devices connected to the target PLC based on the data model of the devices connected to the target PLC; obtain target point information of at least one target point of the target PLC based on the target acquisition point data model; generate a data acquisition request message based on the target PLC information, the devices connected to the target PLC, the target point information, and the target communication protocol data model; and periodically send the data acquisition request message to the message bus to obtain the original message returned by the target PLC.

[0020] Optionally, the message bus is used to receive the data acquisition request message, convert the data acquisition request message into a target format request message based on the target communication protocol format corresponding to the data acquisition request message, and put the target format request message into a message sending queue; and send the target format request message to the target PLC based on the message sending queue.

[0021] Optionally, it further includes: a business data writing module, used to receive equipment control instructions and send the equipment control instructions to the PLC data acquisition module to complete the writing of the equipment control instructions;

[0022] The PLC data acquisition module is also used to convert the device control instructions into a protocol format to obtain a target format control instruction; send the target format control instruction to the corresponding target PLC and write the target format control instruction into the register of the target PLC; the target format control instruction is used to control the operating status of the device connected to the target PLC.

[0023] Optionally, it further includes: a heartbeat data writing module, used to receive a heartbeat data instruction and send the heartbeat data instruction to the PLC data acquisition module to complete the writing of the heartbeat data;

[0024] The PLC data acquisition module is also used to convert the heartbeat data command into a protocol format to obtain a target format heartbeat command; send the target format heartbeat command to the corresponding target PLC, and write the target format heartbeat command into the register of the target PLC; the target format heartbeat command is used to determine that the PLC data acquisition control system and the target PLC are in a normal connection state.

[0025] Optionally, it further includes: a data reading module, used to receive a data reading instruction, and based on the data reading instruction, obtain the message data corresponding to the data reading instruction from the real-time library.

[0026] Optionally, it also includes: a location monitoring module and a location reporting module;

[0027] The point monitoring module is used to periodically obtain the message data of the point to be monitored from the real-time database based on the preset point to be monitored; obtain the message data change information of the point to be monitored based on the message data of the point to be monitored; and publish the message data change information on the preset message bus.

[0028] The point reporting module is used to periodically obtain and report the message data change information from the message bus.

[0029] The present invention also provides a PLC data acquisition and control method, comprising:

[0030] Upon receiving a PLC data acquisition command, all basic data models in the preset model library are downloaded to the preset real-time library; the basic data models are PLC information data models, communication protocol data models, acquisition point data models, or data models of devices connected to the PLC.

[0031] Based on the preset data collection requirements, the target basic data model corresponding to the data collection requirements is obtained from the real-time database;

[0032] Based on all the target basic data models, collect the original messages of at least one target point of the corresponding target PLC;

[0033] Based on the target communication protocol data model in the target basic data model, the original message is parsed according to the protocol format to obtain message data; the message data is then cached in the real-time library.

[0034] The beneficial effects of this invention are as follows: The PLC data acquisition control system and method provided by this invention, through the establishment of a model library for storing multiple basic data models required for acquiring PLC data, including PLC information data models, communication protocol data models, acquisition point data models, or data models of devices connected to the PLC; a real-time library for data caching; and a PLC data acquisition module, which includes: a data model download unit for downloading all basic data models to the real-time library upon receiving a PLC data acquisition command; a data model acquisition unit for acquiring the target basic data model corresponding to the preset data acquisition requirements from the real-time library; a raw message acquisition unit for acquiring raw messages from at least one target point of the corresponding target PLC based on all target basic data models; and a raw message parsing unit for parsing the raw messages according to the protocol format based on the target communication protocol data model in the target basic data model to obtain message data; and caching the message data to the real-time library. This allows for good compatibility with multiple communication protocols, enabling data acquisition and control of PLCs using different communication protocols, and is relatively convenient to implement. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0036] Figure 1 This is one of the structural schematic diagrams of the PLC data acquisition and control system provided by the present invention;

[0037] Figure 2 This is the second schematic diagram of the structure of the PLC data acquisition and control system provided by the present invention;

[0038] Figure 3 This is a flowchart illustrating the PLC data acquisition and control method provided by the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0040] The following examples illustrate this approach. Figures 1-3 This invention describes the PLC data acquisition and control system and method provided by the present invention.

[0041] Please refer to Figure 1 The PLC data acquisition and control system provided in this embodiment includes:

[0042] Model library 110 stores multiple basic data models required for PLC data acquisition. These basic data models include PLC information data models, communication protocol data models, acquisition point data models, or data models of devices connected to the PLC. It should be noted that by pre-setting multiple basic data models in model library 110, it can better adapt to application scenarios involving data acquisition and control of PLCs using different types of communication protocols. This facilitates the downloading of all basic data models from model library 110 to real-time library 120 for retrieval and retrieval during subsequent data acquisition and control processes. In this embodiment, model library 110 is a static database, which helps improve data access speed.

[0043] Real-time library 120 is used for data caching. Specifically, real-time library 120 is used to cache the message data of the target PLC acquired by PLC data acquisition module 130, and also to read the message data. This embodiment, by setting up this cache database, real-time library 120, can effectively improve the data reading speed, support millisecond-level data return, and achieve high-performance data reading.

[0044] PLC data acquisition module 130, the PLC data acquisition module 130 includes:

[0045] The data model download unit is used to download all the basic data models to the real-time library 120 upon receiving a PLC data acquisition command. In this embodiment, by downloading all the basic data models to the real-time library 120 upon receiving a PLC data acquisition command, it facilitates the subsequent retrieval of related basic data models from the real-time library 120, thus accelerating data acquisition. In actual operation, upon receiving a PLC data acquisition command, a basic process is initiated to download all the basic data models to the real-time library 120.

[0046] The data model acquisition unit is used to acquire a target basic data model corresponding to the data acquisition requirement information from the real-time library 120 based on preset data acquisition requirement information. Specifically, the data acquisition requirement information is indication information used to obtain the target basic data model from all basic data models, such as the target PLC number, the target PLC's IP (Internet Protocol) address, and the name of the message parsing program set corresponding to the protocol used by the target PLC, etc., to point to the corresponding basic data model, thereby obtaining the corresponding target basic data model. In actual operation, after the above basic process is successfully started, a parent process is started. This parent process is used to acquire the target basic data model corresponding to the data acquisition requirement information from the real-time library 120 based on the data acquisition requirement information.

[0047] The raw message acquisition unit is used to acquire raw messages from at least one target point of the corresponding target PLC (such as at least one of the first PLC, the second PLC, ..., the Nth PLC) based on the entire target basic data model. Specifically, by acquiring the target basic data model, it is equivalent to determining the target PLC's number, IP address, port number, connected device, data acquisition frequency, protocol type, communication method, corresponding message parsing program set, and corresponding point information. Based on the entire target basic data model, communication and data acquisition with the target PLC can be realized.

[0048] The raw message parsing unit is used to parse the raw message according to the target communication protocol data model in the target basic data model to obtain message data; and cache the message data in the real-time library 120. Specifically, based on the message parsing program dataset in the target communication protocol data model, the raw message is parsed according to the protocol format to obtain parsed message data, and the parsed message data is cached in the real-time library 120. The operations in the above-mentioned raw message acquisition unit and raw message parsing unit are equivalent to the driver program running for data acquisition of a target PLC, or equivalent to a child process. When the parent process is launched, the corresponding child process is launched, thereby realizing the data acquisition of the target PLC. The PLC data acquisition control system in this embodiment can meet the unified acquisition of data from PLCs using different types of communication protocols, achieve multi-protocol compatibility, and is suitable for different application scenarios, such as casting, forging, stamping, heat treatment, welding, cutting, and mechanical assembly industrial production lines that require unified control of multiple devices using PLCs and data acquisition from PLCs.

[0049] Specifically, the PLC information data model includes: the PLC's serial number, IP address, port number, connected devices, and data acquisition frequency.

[0050] The communication protocol data model includes: protocol type, communication method, and message parsing program set.

[0051] The data acquisition point model includes: point information of at least one point in the register corresponding to the PLC, wherein the point information includes: point data type, point data size, and point read / write attribute information. It should be noted that a point refers to data at a specific location in the PLC data, such as voltage data at a specific location in the PLC data.

[0052] The data model of the devices connected to the PLC includes: device information for each device connected to the PLC, including: device code, device name, and device type.

[0053] It should be noted that the PLC information data model, communication protocol data model, data acquisition point data model, and PLC-connected device data model mentioned above are all static data models, unlike dynamic models such as neural network models. Pre-setting these basic data models facilitates subsequent communication and data acquisition with the target PLC based on these models. Furthermore, these basic data models can be flexibly configured according to actual needs, offering a high degree of flexibility.

[0054] In some embodiments, the data model acquisition unit is specifically used to acquire, based on the data acquisition requirement information, a target PLC information data model, a target communication protocol data model, a target acquisition point data model, and a target PLC connected device data model from the real-time library 120. The data acquisition requirement information is indication information used to obtain the target basic data model from all the basic data models. It should be noted that acquiring the target PLC information data model, target communication protocol data model, target acquisition point data model, and target PLC connected device data model corresponding to the data acquisition requirement information from the real-time library 120 facilitates subsequent target PLC data acquisition.

[0055] Please refer to Figure 2 In some embodiments, the PLC data acquisition and control system further includes a message bus 180.

[0056] Further, the original message acquisition unit is specifically used to determine at least one target PLC and target PLC information based on all the target PLC information data models, wherein the target PLC corresponds to the target PLC information; determine the devices connected to the target PLC based on the device data model connected to the target PLC; obtain target point information for at least one target point of the target PLC based on the target acquisition point data model; generate a data acquisition request message based on the target PLC information, the devices connected to the target PLC, the target point information, and the target communication protocol data model; and periodically send the data acquisition request message to the message bus 180 to obtain the original message returned by the target PLC. Specifically, the period used to send the data acquisition request to the message bus 180 can be the data acquisition frequency in the target PLC information data model.

[0057] In some embodiments, the message bus 180 is used to receive the data acquisition request message, convert the data acquisition request message into a target format request message based on the target communication protocol format corresponding to the data acquisition request message, and place the target format request message into a message sending queue; and send the target format request message to the target PLC based on the message sending queue. In this embodiment, sending the target format request message to the target PLC using a message sending queue is highly reasonable.

[0058] In some embodiments, the PLC data acquisition and control system further includes: a business data writing module 140, used to receive device control instructions and send the device control instructions to the PLC data acquisition module 130 to complete the writing of the device control instructions.

[0059] The PLC data acquisition module 130 is further configured to convert the device control instructions into a protocol format to obtain a target format control instruction; send the target format control instruction to the corresponding target PLC; and write the target format control instruction into the register of the target PLC. The target format control instruction is used to control the operating status of the device connected to the target PLC. Specifically, by writing the target format control instruction into the register of the target PLC, control of the device connected to the target PLC can be achieved, such as controlling the start or stop of the device, thereby realizing control of the device connected to the target PLC.

[0060] In some embodiments, the PLC data acquisition and control system further includes: a heartbeat data writing module 150, used to receive a heartbeat data instruction and send the heartbeat data instruction to the PLC data acquisition module 130 to complete the writing of the heartbeat data;

[0061] The PLC data acquisition module 130 is further configured to convert the heartbeat data command into a protocol format to obtain a target format heartbeat command; send the target format heartbeat command to the corresponding target PLC; and write the target format heartbeat command into the register of the target PLC. The target format heartbeat command is used to determine that the PLC data acquisition control system and the target PLC are in a normal connection state. Specifically, if a response is received from the target PLC within a preset time after writing the target format heartbeat command into the register of the target PLC, it is determined that the current PLC data acquisition control system and the target PLC are in a normal connection state.

[0062] In some embodiments, the PLC data acquisition and control system further includes a data reading module 160, configured to receive a data reading instruction and, based on the data reading instruction, obtain the message data corresponding to the data reading instruction from the real-time database 120. It should be noted that this embodiment, by reading data from the cached database of the real-time database 120, can effectively accelerate the data reading speed, reduce the number of times the PLC is accessed, and avoid excessive access and reading of the PLC.

[0063] In some embodiments, the PLC data acquisition and control system further includes: a point monitoring module 170 and a point reporting module 190.

[0064] The point monitoring module 170 is used to periodically obtain the message data of the points to be monitored from the real-time database 120 based on preset points to be monitored; obtain message data change information of the points to be monitored based on the message data; and publish the message data change information to a preset message bus 180. Specifically, the period used to obtain the message data of the points to be monitored in this embodiment can be set according to actual needs. The message data change information is the difference between the message data of the points to be monitored in adjacent periods.

[0065] The point reporting module 190 is used to periodically obtain and report the message data change information from the message bus 180. This enables real-time monitoring of the message data changes at the points to be monitored.

[0066] It is understandable that whether it is to acquire data from the target PLC, control the devices connected to the target PLC, or monitor the heartbeat of the target PLC, the PLC data acquisition and control system in the above embodiments is required. That is, on the basis of compatibility with multiple communication protocols, the communication protocol corresponding to the target PLC is determined, so as to realize communication, data acquisition, instruction issuance, data writing and heartbeat monitoring with the target PLC.

[0067] In some embodiments, the system further includes a process guardian unit, configured to restart the current process in the event of an unexpected stop or interruption of the PLC acquisition process. An unexpected stop or interruption refers to the PLC acquisition process stopping or being interrupted without receiving a process stop command. By setting the process guardian unit, the stability of the PLC data acquisition process can be ensured.

[0068] It should be noted that data acquisition and control for different PLCs can be performed individually or simultaneously, enabling dynamic scaling of the acquisition process.

[0069] In addition, when a new PLC communication protocol is generated or needs to be connected, the new communication protocol can be connected simply by configuring the corresponding basic data model in the model library 110 and the corresponding data acquisition requirement information in the PLC data acquisition module 130, which is relatively convenient to implement.

[0070] The PLC data acquisition and control method provided by the present invention is described below. The PLC data acquisition and control method described below can be referred to in correspondence with the PLC data acquisition and control system described above.

[0071] Please refer to Figure 3 The PLC data acquisition and control method provided in this embodiment includes:

[0072] S310: Upon receiving a PLC data acquisition command, download all basic data models from the preset model library 110 to the preset real-time library 120. The basic data models are PLC information data models, communication protocol data models, acquisition point data models, or data models of devices connected to the PLC.

[0073] S320: Based on the preset data acquisition requirements information, obtain the target basic data model corresponding to the data acquisition requirements information from the real-time library 120.

[0074] S330: Based on all the target basic data models, collect the original messages of at least one target point of the corresponding target PLC.

[0075] S340: Based on the target communication protocol data model in the target basic data model, the original message is parsed according to the protocol format to obtain message data; the message data is cached in the real-time library 120. This method can achieve good compatibility with multiple communication protocols, realize simultaneous data acquisition and control of PLCs using different communication protocols, and is convenient to implement with high flexibility.

[0076] In some embodiments, the step of obtaining a target basic data model corresponding to the data collection requirements from the real-time database 120 based on preset data collection requirements includes:

[0077] Based on the data acquisition requirement information, the target PLC information data model, the target communication protocol data model, the target acquisition point data model, and the target PLC connected device data model corresponding to the data acquisition requirement information are obtained from the real-time library 120; the data acquisition requirement information is the indication information used to obtain the target basic data model from all the basic data models.

[0078] In some embodiments, the step of collecting the original message of at least one target point of the corresponding target PLC based on all the target basic data models includes:

[0079] Based on the data model of all the target PLC information, at least one target PLC and target PLC information are determined, and the target PLC corresponds to the target PLC information.

[0080] Based on the data model of the device connected to the target PLC, the device connected to the target PLC is determined;

[0081] Based on the target acquisition point data model, target point information of at least one target point of the target PLC is obtained;

[0082] Based on the target PLC information, the devices connected to the target PLC, the target location information, and the target communication protocol data model, a data acquisition request message is generated.

[0083] The data acquisition request message is periodically sent to the message bus 180 to obtain the original message returned by the target PLC.

[0084] In some embodiments, the message bus 180 receives the data acquisition request message, performs protocol format conversion on the data acquisition request message based on the target communication protocol format corresponding to the data acquisition request message, and obtains a target format request message; puts the target format request message into a message sending queue; and sends the target format request message to the target PLC based on the message sending queue.

[0085] In some embodiments, it also includes:

[0086] Receive device control commands;

[0087] The device control commands are converted to a protocol format to obtain target format control commands;

[0088] The target format control instruction is sent to the corresponding target PLC and written into the register of the target PLC; the target format control instruction is used to control the operating status of the equipment connected to the target PLC.

[0089] In some embodiments, it also includes:

[0090] Receive heartbeat data command;

[0091] The heartbeat data command is converted to a protocol format to obtain the target format heartbeat command;

[0092] The target format heartbeat command is sent to the corresponding target PLC, and the target format heartbeat command is written into the register of the target PLC; the target format heartbeat command is used to determine that the PLC data acquisition and control system and the target PLC are in a normal connection state.

[0093] In some embodiments, it also includes:

[0094] Receive data read command;

[0095] Based on the data read instruction, the message data corresponding to the data read instruction is obtained from the real-time library 120.

[0096] In some embodiments, it also includes:

[0097] Based on the preset monitoring points, the message data of the monitoring points are periodically obtained from the real-time database 120.

[0098] Based on the message data of the monitoring point, the message data change information of the monitoring point is obtained;

[0099] The message data change information is published on the preset message bus 180;

[0100] The message data change information is periodically obtained from the message bus 180 and reported.

[0101] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A PLC data acquisition and control system, characterized in that, include: The model library is used to store multiple basic data models required for collecting PLC data. The basic data models are PLC information data models, communication protocol data models, data acquisition point data models, or data models of devices connected to the PLC. A real-time library is used for data caching. The PLC data acquisition module includes: The data model download unit is used to download all the basic data models to the real-time library upon receiving a PLC data acquisition instruction. The data model acquisition unit is used to acquire a target basic data model corresponding to the data acquisition requirement information from the real-time database based on the preset data acquisition requirement information. The raw message acquisition unit is used to acquire raw messages of at least one target point of the corresponding target PLC based on all the target basic data models. The raw message parsing unit is used to parse the raw message according to the target communication protocol data model in the target basic data model to obtain message data; and to cache the message data in the real-time library. The data model acquisition unit is specifically used to acquire, based on the data acquisition requirement information, the target PLC information data model, the target communication protocol data model, the target acquisition point data model, and the target PLC connected device data model from the real-time database; the data acquisition requirement information is indication information used to obtain the target basic data model from all the basic data models. It also includes: a message bus; the original message acquisition unit is specifically used to determine at least one target PLC and target PLC information based on the data model of all target PLC information, wherein the target PLC corresponds to the target PLC information; determine the devices connected to the target PLC based on the data model of the devices connected to the target PLC; obtain target point information of at least one target point of the target PLC based on the target acquisition point data model; generate a data acquisition request message based on the target PLC information, the devices connected to the target PLC, the target point information, and the target communication protocol data model; and periodically send the data acquisition request message to the message bus to obtain the original message returned by the target PLC.

2. The PLC data acquisition and control system according to claim 1, characterized in that, The PLC information data model includes: PLC number, IP address, port number, connected devices, and data acquisition frequency; The communication protocol data model includes: protocol type, communication method, and message parsing program set; The data acquisition point model includes: point information of at least one point in the register corresponding to the PLC, and the point information includes: point data type, point data size and point read / write attribute information; The data model of the devices connected to the PLC includes: device information for each device connected to the PLC, including: device code, device name, and device type.

3. The PLC data acquisition and control system according to claim 2, characterized in that, The message bus is used to receive the data acquisition request message, and based on the target communication protocol format corresponding to the data acquisition request message, to convert the data acquisition request message into a protocol format to obtain a target format request message; The target format request message is placed into the message sending queue; based on the message sending queue, the target format request message is sent to the target PLC.

4. The PLC data acquisition and control system according to claim 1, characterized in that, Also includes: The business data writing module is used to receive equipment control commands and send the equipment control commands to the PLC data acquisition module to complete the writing of the equipment control commands; The PLC data acquisition module is also used to convert the device control instructions into a protocol format to obtain a target format control instruction; send the target format control instruction to the corresponding target PLC and write the target format control instruction into the register of the target PLC; the target format control instruction is used to control the operating status of the device connected to the target PLC.

5. The PLC data acquisition and control system according to claim 1, characterized in that, Also includes: The heartbeat data writing module is used to receive heartbeat data instructions and send the heartbeat data instructions to the PLC data acquisition module to complete the writing of the heartbeat data. The PLC data acquisition module is also used to convert the heartbeat data command into a protocol format to obtain a target format heartbeat command; send the target format heartbeat command to the corresponding target PLC, and write the target format heartbeat command into the register of the target PLC; the target format heartbeat command is used to determine that the PLC data acquisition control system and the target PLC are in a normal connection state.

6. The PLC data acquisition and control system according to claim 1, characterized in that, Also includes: The data reading module is used to receive a data reading instruction and, based on the data reading instruction, obtain the message data corresponding to the data reading instruction from the real-time library.

7. The PLC data acquisition and control system according to claim 1, characterized in that, Also includes: Location monitoring module and location reporting module; The point monitoring module is used to periodically obtain the message data of the point to be monitored from the real-time database based on the preset point to be monitored. Based on the message data of the monitoring point, the message data change information of the monitoring point is obtained; The message data change information is published on a preset message bus; The point reporting module is used to periodically obtain and report the message data change information from the message bus.

8. A PLC data acquisition and control method, characterized in that, include: Upon receiving a PLC data acquisition command, all basic data models in the preset model library are downloaded to the preset real-time library. The basic data model is a PLC information data model, a communication protocol data model, a data acquisition point data model, or a data model of the device connected to the PLC. Based on the preset data collection requirements, the target basic data model corresponding to the data collection requirements is obtained from the real-time database; Based on all the target basic data models, collect the original messages of at least one target point of the corresponding target PLC; Based on the target communication protocol data model in the target basic data model, the original message is parsed to obtain message data. The message data is cached in the real-time library; Based on the data acquisition requirement information, the target PLC information data model, the target communication protocol data model, the target acquisition point data model, and the target PLC connected device data model corresponding to the data acquisition requirement information are obtained from the real-time database; the data acquisition requirement information is indication information used to obtain the target basic data model from all the basic data models. Based on the data model of all the target PLC information, at least one target PLC and target PLC information are determined, with the target PLC corresponding to the target PLC information; based on the data model of the device connected to the target PLC, the device connected to the target PLC is determined; based on the target acquisition point data model, target point information of at least one target point of the target PLC is obtained; based on the target PLC information, the device connected to the target PLC, the target point information, and the target communication protocol data model, a data acquisition request message is generated; the data acquisition request message is periodically sent to the message bus to obtain the original message returned by the target PLC.