CN-122001906-A - Data communication and distribution method and system for laser flight cleaning
Abstract
The application discloses a data communication and distribution method and system for laser flight cleaning, and belongs to the technical field of industrial automation control. The method comprises the steps of directly reading initial data of the battery pole offset in an industrial controller through an S7 industrial protocol, performing intelligent routing according to a preset mapping and load balancing strategy after analysis and verification of the data, determining a target galvanometer identification, and distributing the data to the corresponding galvanometer controller through an asynchronous TCP server according to a custom protocol frame. The method and the system of the application avoid intermediate protocol conversion by constructing the integrated S7 protocol data acquisition and special TCP distribution architecture, and remarkably improve the data transmission efficiency and the system instantaneity. Based on the data processing mechanism of intelligent routing and load balancing, the dynamic optimized distribution of the cleaning task among a plurality of vibrating mirrors is realized, the throughput of the system is improved, and the capability of coping with production fluctuation is enhanced.
Inventors
- LIN JUGUANG
- ZHANG HAISHENG
- LI HONGBO
Assignees
- 安徽巨一科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251031
Claims (10)
- 1. A data communication and distribution method for laser fly cleaning, comprising the steps of: S1, establishing direct communication connection with an industrial controller through an S7 industrial protocol, and reading offset original data of a battery pole from a designated data block of the industrial controller; S2, analyzing and verifying the offset original data, and extracting structured offset data comprising a pole mark, an X-axis offset, a Y-axis offset and a quality state mark; s3, distributing the structured offset data to a target galvanometer identifier according to a preset mapping relation between the polar column identifier and the galvanometer identifier and by combining a load balancing strategy; and S4, packaging the structured offset data and the target galvanometer identifier into a custom protocol data frame through a TCP server, and distributing the custom protocol data frame to a galvanometer controller corresponding to the target galvanometer identifier.
- 2. The method for data communication and distribution for laser flying cleaning according to claim 1, wherein in step S1, establishing a direct communication connection specifically comprises: configuring an IP address, a rack number and a slot number of the industrial controller; After the underlying TCP connection is successfully established, an S7 protocol handshake and communication resource allocation flow is executed, and an independent heartbeat monitoring thread is started to maintain connection activity.
- 3. The method for data communication and distribution for laser fly cleaning according to claim 1, wherein step S2 specifically comprises: S21, acquiring the offset original data, receiving the offset original data as a byte stream, storing the byte stream into a temporary buffer area, and performing data length verification and format preliminary screening on the byte stream to complete data integrity verification; s22, processing the checked byte stream, and performing field mapping according to a predefined data structure specification to obtain mapped data; s23, sequentially extracting a pole identification field, an X-axis offset value, a Y-axis offset value and a data quality zone bit from the mapped data to obtain the structured offset data.
- 4. A data communication and distribution method for laser flying cleaning according to claim 3, wherein step S22 specifically comprises: Calculating a field offset based on the defined position and size of each data field; Converting the byte data into corresponding programming language data types, and adjusting byte sequence according to byte sequence differences of the system.
- 5. The method for data communication and distribution for laser fly cleaning according to claim 1, wherein step S3 specifically comprises: S31, acquiring a pole mark contained in the structured offset data; S32, inquiring a preset mapping relation according to the pole identification to obtain a candidate galvanometer identification set containing 1 or more candidate galvanometer controllers; s33, processing a candidate galvanometer identification set, and dynamically selecting one from the candidate galvanometer identification set as a final target galvanometer identification according to a load balancing strategy; And S34, associating the final target galvanometer identification with the corresponding structured offset data to obtain a data routing result ready for distribution.
- 6. The data communication and distribution method for laser fly cleaning according to claim 5, wherein the load balancing strategy is specifically: Acquiring real-time operation state parameters of each candidate galvanometer controller, wherein the operation state parameters at least comprise the length of a data queue to be processed and average processing delay; processing the running state parameters, and calculating the real-time load scores of the candidate galvanometer controllers according to a predefined load scoring algorithm; and comparing the real-time load scores of all the candidate galvanometer controllers, and determining the candidate galvanometer identification with the lowest load score as the final target galvanometer identification.
- 7. The method for communicating and distributing data for laser fly cleaning according to claim 5, wherein the mapping relationship between the preset pole identifier and the galvanometer identifier is specifically defined by a configurable mapping table, and the mapping relationship defined by the mapping table includes at least one of the following: Based on the static area mapping relation of the physical position of the battery pole; dynamic equilibrium mapping relation based on real-time load state of each vibrating mirror controller; and (3) a process parameter mapping relation associated with the specification and the model of the battery.
- 8. The method for data communication and distribution for laser flight cleaning according to claim 1, wherein the TCP server in step S4 manages the connection of all the galvanometer controllers using an asynchronous event driven model, performs identity authentication and timeout management based on heartbeat messages on the connection, and sets transmission priorities for different types of the structured offset data before data distribution in step S4, and schedules the transmission order of the custom protocol data frames using a priority queue mechanism.
- 9. The method according to claim 1, wherein in step S4, the encapsulation format of the custom protocol data frame includes a frame header, a data length field, a command word field, a timestamp field, a galvanometer identification field, a data payload field, and a check field, wherein the check field uses a CRC16 cyclic redundancy check code.
- 10. A data communication and distribution system for laser fly cleaning, comprising: The data acquisition module is used for establishing direct communication connection with the industrial controller through an S7 industrial protocol, and reading the offset original data of the battery pole from the designated data block of the industrial controller; The first processing module is used for analyzing and verifying the offset original data and extracting structured offset data comprising a pole mark, an X-axis offset, a Y-axis offset and a quality state mark; The second processing module is used for distributing the structured offset data to the target galvanometer mark according to the preset mapping relation between the polar column mark and the galvanometer mark and by combining a load balancing strategy; And the data distribution module is used for packaging the structured offset data and the target galvanometer identifier into a custom protocol data frame through a TCP server and distributing the custom protocol data frame to a galvanometer controller corresponding to the target galvanometer identifier.
Description
Data communication and distribution method and system for laser flight cleaning Technical Field The invention relates to the technical field of industrial automation control, in particular to a data communication and distribution method and system for laser flight cleaning. Background In the manufacturing process of the new energy battery, the laser flying cleaning technology of the battery pole column requires high precision and high efficiency. In the prior art, the galvanometer control system needs to acquire the position offset data of each battery pole in real time so as to adjust the laser scanning path. At present, the common solutions have the following drawbacks: The communication protocols are not uniform, namely different communication protocols are adopted between the PLC and the upper computer as well as between the upper computer and the galvanometer controller, and the system integration is complex; the data processing efficiency is low, namely the offset data needs to be subjected to protocol conversion for a plurality of times, so that the system delay is increased; The real-time performance is insufficient, the traditional scheme cannot meet the high requirement of flight cleaning on the real-time performance of data (usually requiring <10ms response time); The system expansion is difficult, when the battery specification is changed or the number of vibrating mirrors is increased, the existing architecture is difficult to adapt quickly; In the prior art, although there are separate S7 communication or TCP communication schemes, there is a lack of a complete solution to organically combine both and to clean specific scene optimization for battery post flight. Therefore, a solution capable of centrally, efficiently and reliably collecting PLC data and intelligently distributing it to a plurality of clients is highly desired to solve the above-mentioned problems. Disclosure of Invention In order to solve the technical problems in the background technology, the invention provides a data communication and distribution method and system for laser flight cleaning. The invention provides a data communication and distribution method for laser flight cleaning, which comprises the following steps: S1, establishing direct communication connection with an industrial controller through an S7 industrial protocol, and reading offset original data of a battery pole from a designated data block of the industrial controller; S2, analyzing and verifying the offset original data, and extracting structured offset data comprising a pole mark, an X-axis offset, a Y-axis offset and a quality state mark; s3, distributing the structured offset data to a target galvanometer identifier according to a preset mapping relation between the polar column identifier and the galvanometer identifier and by combining a load balancing strategy; and S4, packaging the structured offset data and the target galvanometer identifier into a custom protocol data frame through a TCP server, and distributing the custom protocol data frame to a galvanometer controller corresponding to the target galvanometer identifier. Preferably, in step S1, establishing the direct communication connection specifically includes: configuring an IP address, a rack number and a slot number of the industrial controller; After the underlying TCP connection is successfully established, an S7 protocol handshake and communication resource allocation flow is executed, and an independent heartbeat monitoring thread is started to maintain connection activity. Preferably, step S2 specifically includes: S21, acquiring the offset original data, receiving the offset original data as a byte stream, storing the byte stream into a temporary buffer area, and performing data length verification and format preliminary screening on the byte stream to complete data integrity verification; s22, processing the checked byte stream, and performing field mapping according to a predefined data structure specification to obtain mapped data; s23, sequentially extracting a pole identification field, an X-axis offset value, a Y-axis offset value and a data quality zone bit from the mapped data to obtain the structured offset data. Preferably, step S22 specifically includes: Calculating a field offset based on the defined position and size of each data field; Converting the byte data into corresponding programming language data types, and adjusting byte sequence according to byte sequence differences of the system. Preferably, step S3 specifically includes: S31, acquiring a pole mark contained in the structured offset data; S32, inquiring a preset mapping relation according to the pole identification to obtain a candidate galvanometer identification set containing 1 or more candidate galvanometer controllers; s33, processing a candidate galvanometer identification set, and dynamically selecting one from the candidate galvanometer identification set as a final target galvanometer identifi