PLC slave station online debugging method based on protocol conversion and related equipment thereof
Through the online debugging method of PLC slave stations based on protocol conversion, the problem of inefficient debugging of traditional PLC slave stations is solved, online debugging is realized, debugging efficiency and system availability are improved, and system flexibility and scalability are enhanced.
Patent Information
- Application Number
- CN202510800910.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-08-26
AI Technical Summary
Traditional PLC slave debugging methods are inefficient and difficult to reflect the system's operating status in real time, especially when debugging during the system is running.
Through the PLC slave online debugging method based on protocol conversion, data transmission and format conversion are used to use the private protocol between the PLC master and slave station to realize online debugging, including generating debug messages, analyzing debugging response messages, and data storage and processing through sending and receiving buffer queues.
It realizes online debugging during the operation of the PLC system without shutdown or on-site operation, greatly improving debugging efficiency and system availability. Operators can monitor the debugging process in real time, quickly locate and solve problems, and improve the automation and intelligence level of the production process.
Smart Images

Figure CN120547253A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PLC automation communication, and in particular to a PLC slave station online debugging method based on protocol conversion and related equipment. Background Art
[0002] In traditional industrial automation systems, programmable logic controllers (PLCs) serve as core control units and are widely used in various automated equipment and production lines. With the continuous development and sophistication of industrial automation technology, the debugging and maintenance of PLC systems have become increasingly important and complex. Large industrial systems, in particular, often include multiple PLC slaves connected to a master station, forming a complex network structure. Each PLC slave often utilizes its own proprietary communication protocol. Traditional PLC slave debugging methods typically rely on on-site operation or offline debugging software. These methods are not only inefficient but also lack real-time visibility into system operating status and human-computer interaction capabilities. This is particularly challenging when debugging a system while it is running. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to address the deficiencies in the above-mentioned prior art and provide a PLC slave online debugging method and related equipment based on protocol conversion, so as to solve the technical problem of low efficiency of the PLC debugging method.
[0004] The purpose of the present invention is achieved by the following technical solutions: In a first aspect, the present invention provides a PLC slave online debugging method based on protocol conversion, comprising: Obtain the PLC master station information connected to the target PLC slave station, and send a debugging message including the target PLC slave station information to the PLC master station according to the set private protocol; Receive the debugging response message uploaded by the PLC master station according to the set private protocol, and obtain the debugging result of the target PLC slave station; After the debugging message is sent to the PLC master station, the debugging information is obtained by parsing the message according to the private protocol format, and the debugging information is format-converted and stored in the sending buffer queue in the PLC master station; The debugging response message is uploaded from the target PLC slave station to the PLC master station and then stored in the receiving buffer queue in the PLC master station.
[0005] As a further improvement of the present invention, obtaining the PLC master station information connected to the target PLC slave station specifically includes: Enter the IP address of the PLC master station, establish a link with the PLC master station through the IP address, and perform data transmission based on the agreed private protocol.
[0006] As a further improvement of the present invention, sending a debugging message including target PLC slave station information to the PLC master station according to a set private protocol specifically includes: After successfully connecting to the PLC master station, obtain the specific location and debugging information content of the physical line corresponding to the target PLC slave station connected to the PLC master station, generate the debugging message of the target PLC slave station according to the debugging information content and the set private protocol format, and send the debugging message to the PLC master station according to the set private protocol.
[0007] As a further improvement of the present invention, after receiving the debug message, the PLC master station parses the debug message according to the private protocol format, converts the parsed debug message into a format, and stores it in a sending buffer queue, specifically including: The PLC master station receives and parses the debugging message based on a private protocol process; after the parsing is completed, the debugging content is stored in the sending buffer queue of the corresponding PLC slave station according to the specific location of the target PLC slave station.
[0008] As a further improvement of the present invention, the debugging content in the sending buffer queue is used to be sent to the target PLC slave station in the periodic interactive task, specifically including: In each cycle interaction task between the PLC master station and the target PLC slave station, when there is a margin of communication between the PLC master station and the target PLC slave station, the content in the send buffer queue is detected; If the sending buffer queue is not empty, the debugging content in the sending buffer queue is converted into a PLC slave debugging command query message that complies with the EtherCat protocol, and the PLC slave debugging command query message is sent to the target PLC slave.
[0009] As a further improvement of the present invention, when the target PLC slave station debugging command query message is successfully sent to the target PLC slave station, the PLC master station receives the response message returned by the target PLC slave station, parses the response message based on the EtherCat protocol, and stores the debugging content in the response message in the receiving buffer queue corresponding to the target PLC slave station.
[0010] As a further improvement of the present invention, the debugging response message uploaded by the PLC master station is received according to the set private protocol, and the PLC master station assembles the debugging information of the target PLC slave station in the receiving buffer queue according to the private protocol format as the debugging response message, which specifically includes: The PLC master station periodically checks whether the debugging content in the receiving buffer queue corresponding to the target PLC slave station is empty; When the debugging content in the receiving buffer queue is not empty, read the debugging content in the receiving buffer queue, and assemble the debugging content into a debugging response message according to the set private protocol format and send it to the host computer. After the sending is successful, exit the debugging task; If the debugging content in the receiving buffer queue is empty within the set time, the debugging task is exited, and a debugging failure response message is returned according to the set private protocol format.
[0011] As a further improvement of the present invention, after receiving the debugging response message returned by the PLC master station, the debugging response message is parsed according to the set private protocol format, and the debugging result of the target PLC slave station is obtained and displayed.
[0012] In a second aspect, the present invention provides a PLC slave online debugging system based on protocol conversion, which is used to implement the above-mentioned PLC slave online debugging method based on protocol conversion, comprising: a control device, a PLC master station, and a target PLC slave station; the control device and the PLC master station communicate using a set private protocol; the PLC master station and the target PLC slave station are connected using a physical link; The control device is connected to the PLC master station, sends a debugging message to the PLC master station according to a set private protocol; and receives a debugging response message uploaded by the PLC master station according to the set private protocol to obtain a debugging result of the target PLC slave station; After receiving the debug message, the PLC master station parses it according to the private protocol format, converts the format of the parsed debug message, and stores it in the sending buffer queue; within the periodic interactive task, the debug content is sent from the sending buffer queue to the target PLC slave station, and the debug response message returned by the target PLC slave station is received, and the debug response message is stored in the receiving buffer queue.
[0013] As a further improvement of the present invention, the PLC master station and the target PLC slave station communicate with each other using the EtherCat protocol.
[0014] The beneficial effects of the present invention are as follows: the present invention provides a PLC slave online debugging method based on protocol conversion, which realizes online debugging of the slave while the PLC system is running, without the need for shutdown or on-site operation, greatly improving the debugging efficiency and system availability, and the operator can send debugging messages to the PLC slave through the host computer, monitor the debugging process in real time, and quickly locate and solve problems. After the PLC master station receives the debugging message from the host computer, it parses and processes it according to the agreed private protocol format, and then sends the debugging content to the PLC slave in a form that complies with the EtherCat general industrial protocol, realizing cross-protocol debugging and enhancing the flexibility and scalability of the system. The operator only needs to fill in the relevant information of the PLC master station and the slave station, select the debugging content, and then generate and send the debugging message. The entire debugging process is unaware of the connection method and communication method between the PLC master station and the PLC slave station, is intuitive and easy to use, reduces the difficulty of operation, and improves work efficiency.
[0015] Furthermore, by connecting with the PLC master station, real-time monitoring and control of the PLC slave station can be achieved, improving the automation and intelligence level of the production process. It can also quickly diagnose and restore PLC equipment failures, reduce downtime, and improve system reliability and stability.
[0016] Furthermore, by automatically generating and sending debugging messages, problems can be quickly located and resolved, improving debugging efficiency. Through the strict specifications of private protocols, the accuracy and integrity of data transmission can be ensured, avoiding data loss or errors.
[0017] Furthermore, through parsing and format conversion, the PLC master can quickly process received debug messages, ensuring timely and accurate data delivery to the target PLC slave. A send buffer queue can temporarily store debug content to be sent, preventing data loss or overwriting and improving system stability and reliability. Storage and management based on the specific location of PLC slaves can be easily expanded to multiple slaves to accommodate different application scenarios and device counts. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 This is a flow chart of a PLC slave online debugging method based on protocol conversion in an embodiment of the present invention; Figure 2It is a structural diagram of a PLC slave online debugging system based on protocol conversion in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose and technical solution of the present invention clearer and easier to understand, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0021] The technical solutions of the present invention will be described clearly and completely below with reference to the accompanying drawings and specific embodiments. The described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments.
[0022] Example 1 like Figure 1 As shown, this embodiment takes the host computer as an example to provide a PLC slave online debugging method based on protocol conversion, and the specific implementation steps are as follows.
[0023] The host computer obtains the PLC master station information connected to the target PLC slave station, and sends a debugging message including the target PLC slave station information to the PLC master station according to the set private protocol; among them, the PLC slave station information includes the specific location of the PLC slave station on the physical line and the debugging content. According to the debugging content and the private protocol format, the debugging message of the target PLC slave station is generated and sent to the PLC master station.
[0024] According to the set private protocol, the debugging response message uploaded by the PLC master station is received to obtain the debugging result of the target PLC slave station. The debugging response message is uploaded by the target PLC slave station and stored in the receiving buffer queue of the PLC master station.
[0025] In this embodiment, obtaining the PLC master station information connected to the target PLC slave station specifically includes: By entering the IP address of the PLC master station, a link is established with the PLC master station via the IP address, and data is transmitted based on a pre-defined private protocol. For example, the operator enters the device name and IP address of the PLC master station on the host computer, along with relevant information about the target PLC slave station, including the device name, IP address, and corresponding debugging information. Based on the device name and IP address of the PLC master station, the host computer obtains the network configuration information and sends it to the PLC master station.
[0026] The PLC master station then performs corresponding network configuration according to the network configuration information and returns a message indicating successful network configuration. The network configuration information includes at least the set private protocol. In this embodiment, the private protocol includes the format of the data packet, the command set, and the response mechanism.
[0027] After successfully connecting to the PLC master station, obtain the specific location of the physical line corresponding to the target PLC slave station connected to the PLC master station, select the debugging content, generate the debugging message of the target PLC slave station according to the debugging content, and send the debugging message including the target PLC slave station information to the PLC master station according to the set private protocol.
[0028] The debugging content in this embodiment is a debugging command generated according to debugging requirements, and the debugging requirements at least include reading register data, writing control instructions, and diagnosing device status.
[0029] When the debug message is sent to the PLC master station, it is parsed according to the private protocol format, and the parsed debug message is converted into a format and stored in the send buffer queue of the PLC master station; The PLC master station receives and parses the debugging message based on the process of the private protocol; after the parsing is completed, the debugging content is stored in the sending buffer queue of the corresponding PLC slave station according to the specific location of the target PLC slave station.
[0030] In the periodic interaction task between the PLC master station and the PLC slave station connected to it, a debugging message in another agreed format is sent to the PLC slave station, and the debugging response message is waited for and received. The parsed debugging content is stored in the receiving exchange queue.
[0031] Specifically, the debugging content in the sending buffer queue is used to be sent to the target PLC slave station in the periodic interaction task, specifically including: there is a periodic data interaction task between the PLC master station and the target PLC slave station, in each periodic task interaction, when there is a surplus in the communication volume between the PLC master station and the target PLC slave station, it is detected whether the content in the sending buffer queue is empty; If the sending buffer queue is not empty, the debugging content in the sending buffer queue is converted into a PLC slave debugging command query message that complies with the EtherCat protocol, and the PLC slave debugging command query message is sent to the target PLC slave, and waits for receiving the debugging response message.
[0032] After successfully receiving the debug response message returned by the target PLC slave, the PLC master station parses the message based on the EtherCat protocol and stores the debug content in the debug response message in the receiving buffer queue corresponding to the target PLC slave.
[0033] Specifically, the PLC master assembles the debugging information of the PLC slave in the receive buffer queue into a message according to the private protocol format and sends it to the host computer, which specifically includes: The PLC master station periodically detects whether the debugging content in the receiving buffer queue corresponding to the target PLC slave station is empty. If it is not empty, it reads the debugging content in the receiving buffer queue and assembles the debugging content into a debugging response message according to the set private protocol format and sends it to the host computer. After the upload is successful, the debugging task is exited; If the debugging content in the receiving buffer queue is empty within the set time, the debugging task is exited and a debugging failure response message is returned according to the set private protocol format. After the host computer receives the debugging response message uploaded by the PLC master station, it parses the debugging response message according to the set private protocol format, obtains the debugging results of the target PLC slave station, and displays them.
[0034] Example 2 This embodiment takes the PLC master station as an example and provides a PLC slave station online debugging method based on protocol conversion. The specific implementation method is as follows.
[0035] The PLC master station and the host computer are connected and a private protocol format is agreed upon.
[0036] The PLC master receives debug messages from the host computer containing PLC slave information. It parses the messages according to a proprietary protocol format, converts the parsed messages, and stores them in the send buffer. The PLC slave information includes the specific location of the PLC slave on the physical line and the debug details.
[0037] Specifically, after receiving the debug message, the PLC master station parses the debug message according to the private protocol format, converts the parsed debug message into a format, and stores it in the sending buffer queue, which specifically includes: The PLC master station receives and parses the debugging message based on a private protocol process; after the parsing is completed, the debugging content is stored in the sending buffer queue of the corresponding PLC slave station according to the specific location of the target PLC slave station.
[0038] In the periodic interactive tasks between the PLC master station and the PLC slave station connected to it, a debug message in another agreed format is sent to the PLC slave station, and the debug response message is received. The parsed debug content is stored in the receiving exchange queue. By inserting the debug message in the periodic communication margin, the priority of the real-time control data is ensured to be unaffected, the debugging operation is prevented from interfering with the timing determinism of the master control task, and the stability of the core functions of the industrial control system is guaranteed. Specifically, it includes: There is a periodic data exchange task between the PLC master station and the target PLC slave station. In each periodic task interaction, when there is a margin of communication between the PLC master station and the target PLC slave station, the content in the send buffer queue is detected; If the sending buffer queue is not empty, the debugging content in the sending buffer queue is converted into a PLC slave debugging command query message that complies with the EtherCat protocol, and the message is sent to the target PLC slave station, and waits for receiving a debugging response message.
[0039] After the PLC master successfully receives the debug response message from the target PLC slave, it parses the message based on the EtherCat protocol and stores the debug content in the debug response message in the corresponding receive buffer queue of the target PLC slave. This embodiment implements asynchronous processing of debug data through send / receive buffer queues. The master can process debug results in batches, reducing the number of real-time task interruptions and preventing data loss. Through the coordinated design of time slicing (i.e., master cycle priority) and space slicing (queue buffering), communication and computing resources are efficiently reused while ensuring the real-time performance of the industrial control system, significantly improving the system's observability, maintainability, and resource utilization.
[0040] In addition, the PLC master station assembles the debugging information of the PLC slave station in the receiving buffer queue into a message according to the private protocol format and sends it to the host computer, specifically including: The PLC master station periodically detects whether the debugging content in the receiving buffer queue corresponding to the target PLC slave station is empty. If it is not empty, it reads the debugging content in the receiving buffer queue and assembles the debugging content into a debugging response message according to the set private protocol format and sends it to the host computer. After the upload is successful, the debugging task is exited; If the debugging content in the receiving buffer queue is empty within the set time, the debugging task is exited, and a debugging failure response message is returned according to the set private protocol format.
[0041] Example 3 like Figure 2 As shown, this embodiment provides a PLC slave online debugging system based on protocol conversion, including a control device, a PLC master station, and a target PLC slave station. The control device in this embodiment is a host computer, which can be an intelligent terminal, computer, or industrial tablet computer with debugging software.
[0042] The control device and the PLC master station communicate using a set private protocol; the PLC master station and the target PLC slave station are connected using a physical communication link, and the communication protocol between the PLC master station and the target PLC slave station is the EtherCat protocol.
[0043] Among them, the control device mainly obtains the PLC master station information connected to the target PLC slave station, sends debugging messages to the PLC master station according to the set private protocol; receives the debugging response message uploaded by the PLC master station according to the set private protocol, and obtains the debugging result of the target PLC slave station.
[0044] The control device is used to obtain the PLC master station information connected to the target PLC slave station, send debugging messages to the PLC master station according to the set private protocol; receive the debugging response message uploaded by the PLC master station according to the set private protocol, and obtain the debugging result of the target PLC slave station.
[0045] Obtain the IP address of the PLC master station, establish a link with the PLC master station through the IP address, and transmit data based on the agreed private protocol.
[0046] After successfully connecting to the PLC master station, fill in the specific location of the target PLC slave station connected to the PLC master station, select the debugging content, generate the debugging message of the target PLC slave station according to the debugging content, and send the debugging message to the PLC master station according to the set private protocol.
[0047] After the PLC master station receives the debug message, it first parses it according to the private protocol, then converts the data into an EtherCat protocol compatible format and temporarily stores it in the sending buffer queue of the corresponding target PLC slave station. In the gap between real-time data interactions, if it is detected that the sending buffer queue is empty, the PLC master station will encapsulate the debug content into a query message in the EtherCat protocol format and send it to the target PLC slave station. Specifically, there is a periodic data interaction task between the PLC master station and the target PLC slave station. In each periodic task interaction, when there is a surplus of communication volume between the PLC master station and the target PLC slave station, the content in the sending buffer queue is detected; if the sending buffer queue is not empty, the debugging content in the sending buffer queue is converted into a PLC slave station debug command query message that complies with the EtherCat protocol, and the message is sent to the target PLC slave station, and waits for receiving the debugging response message.
[0048] The PLC master station continuously monitors the target PLC slave station, waiting to receive the debug response message. After the PLC master station successfully receives the response message returned by the target PLC slave station, it parses the response message based on the EtherCat protocol and stores the debug content in the response message in the receive buffer queue corresponding to the target PLC slave station.
[0049] The PLC master station periodically detects whether the debugging content in the receiving buffer queue corresponding to the target PLC slave station is empty. If it is not empty, it reads the debugging content in the receiving buffer queue and assembles the debugging content into a debugging response message according to the set private protocol format and sends it to the host computer. After the upload is successful, the debugging task is exited; If the debugging content in the receiving buffer queue is empty within the set time, the debugging task is exited, and a debugging failure response message is returned to the control device according to the set private protocol format.
[0050] In the task of periodically receiving real-time data between the PLC master station and the connected target PLC slave station, the PLC master station receives the response message returned by the target PLC slave station, parses the response message returned by the target PLC slave station based on the EtherCat protocol, and converts the response message into a debugging response message corresponding to the private protocol; and stores the debugging response message in the receiving buffer queue corresponding to the target PLC slave station.
[0051] After receiving the debug message from the PLC master, the target PLC slave parses the message according to the EtherCAT protocol and performs debugging operations based on the parsed debug content to obtain the debug result. The debug result is converted according to the EtherCAT protocol to generate a debug response message. Within the periodic interactive task, the debug response message is sent to the PLC master via the EtherCAT protocol.
[0052] The corresponding debugging process in this system is as follows: connect to the PLC master station from the host computer, and send the debugging message containing the PLC slave station information to the PLC master station according to the set private protocol; After receiving the debug message, the PLC master station parses it according to the private protocol format and stores the debug information in the parsed debug message into the sending buffer queue in the PLC master station; In the periodic interaction task between the PLC master station and the connected PLC slave station, a debug message in another agreed format is sent to the PLC slave station, and the debug response message is received, and the parsed debug content is stored in the receiving exchange queue; The PLC master station assembles the debugging information of the PLC slave station in the receiving buffer queue into a message according to the private protocol format and sends it to the host computer.
[0053] Through a complete debugging chain from host computer to PLC master station to PLC slave station to host computer, a closed loop of remote parameter configuration, status monitoring, and result feedback is achieved, significantly improving the observability and controllability of industrial automation systems and reducing the need for on-site maintenance. The host computer and PLC master station communicate using a proprietary protocol with customizable fields (such as slave station ID and debugging command type) to adapt to devices from different manufacturers. The master and slave stations use a separate, agreed-upon format (such as the EtherCAT protocol), achieving protocol decoupling and reducing the cost of multi-device compatibility.
Claims
1. A PLC slave online debugging method based on protocol conversion, characterized in that: include: Obtain the PLC master station information connected to the target PLC slave station, and send a debugging message including the target PLC slave station information to the PLC master station according to the set private protocol; Receive the debugging response message uploaded by the PLC master station according to the set private protocol, and obtain the debugging result of the target PLC slave station; After the debugging message is sent to the PLC master station, the debugging information is obtained by parsing the message according to the private protocol format, and the debugging information is format-converted and stored in the sending buffer queue in the PLC master station; The debugging response message is uploaded from the target PLC slave station to the PLC master station and then stored in the receiving buffer queue in the PLC master station.
2. The PLC slave online debugging method based on protocol conversion according to claim 1 is characterized in that: Get the PLC master station information connected to the target PLC slave station, including: Fill in the IP address of the PLC master station, establish a link with the PLC master station through the IP address, and perform data transmission based on the agreed private protocol.
3. The PLC slave online debugging method based on protocol conversion according to claim 1 is characterized in that: Send a debug message containing the target PLC slave information to the PLC master station according to the set private protocol, specifically including: After successfully connecting to the PLC master station, obtain the specific location and debugging information content of the physical line corresponding to the target PLC slave station connected to the PLC master station, generate the debugging message of the target PLC slave station according to the debugging information content and the set private protocol format, and send the debugging message to the PLC master station according to the set private protocol.
4. The PLC slave online debugging method based on protocol conversion according to claim 3 is characterized in that: After receiving the debug message, the PLC master station parses the debug message according to the private protocol format, converts the parsed debug message into a format, and stores it in a sending buffer queue, specifically including: The PLC master station receives and parses the debugging message based on a private protocol process; after the parsing is completed, the debugging content is stored in the sending buffer queue of the corresponding PLC slave station according to the specific location of the target PLC slave station.
5. The PLC slave online debugging method based on protocol conversion according to claim 4 is characterized in that: The debugging content in the sending buffer queue is used to be sent to the target PLC slave station in the periodic interactive task, specifically including: In each cycle interaction task between the PLC master station and the target PLC slave station, when there is a margin of communication between the PLC master station and the target PLC slave station, the content in the send buffer queue is detected; If the sending buffer queue is not empty, the debugging content in the sending buffer queue is converted into a PLC slave debugging command query message that complies with the EtherCat protocol, and the PLC slave debugging command query message is sent to the target PLC slave.
6. The PLC slave online debugging method based on protocol conversion according to claim 5 is characterized in that: When the target PLC slave station debug command query message is successfully sent to the target PLC slave station, the PLC master station receives the response message returned by the target PLC slave station, parses the response message based on the EtherCat protocol, and stores the debugging content in the response message in the receiving buffer queue corresponding to the target PLC slave station.
7. The PLC slave online debugging method based on protocol conversion according to claim 5 is characterized in that: The debugging response message uploaded by the PLC master station is received according to the set private protocol. The PLC master station assembles the debugging information of the target PLC slave station in the receiving buffer queue according to the private protocol format as the debugging response message, which specifically includes: The PLC master station periodically checks whether the debugging content in the receiving buffer queue corresponding to the target PLC slave station is empty; When the debugging content in the receiving buffer queue is not empty, read the debugging content in the receiving buffer queue, and assemble the debugging content into a debugging response message according to the set private protocol format and send it to the host computer. After the sending is successful, exit the debugging task; If the debugging content in the receiving buffer queue is empty within the set time, the debugging task is exited, and a debugging failure response message is returned according to the set private protocol format.
8. The PLC slave online debugging method based on protocol conversion according to claim 1 is characterized in that: After receiving the debugging response message returned by the PLC master station, the debugging response message is parsed according to the set private protocol format, and the debugging result of the target PLC slave station is obtained and displayed.
9. A PLC slave station online debugging system based on protocol conversion, used to implement the PLC slave station online debugging method based on protocol conversion according to any one of claims 1 to 8, characterized in that: It includes a control device, a PLC master station and a target PLC slave station; the control device and the PLC master station communicate with each other using a set private protocol; the PLC master station and the target PLC slave station are connected with a physical link; The control device is connected to the PLC master station, sends a debugging message to the PLC master station according to a set private protocol; and receives a debugging response message uploaded by the PLC master station according to the set private protocol to obtain a debugging result of the target PLC slave station; After receiving the debug message, the PLC master station parses it according to the private protocol format, converts the format of the parsed debug message, and stores it in the sending buffer queue; within the periodic interactive task, the debug content is sent from the sending buffer queue to the target PLC slave station, and the debug response message returned by the target PLC slave station is received, and the debug response message is stored in the receiving buffer queue.
10. The PLC slave online debugging system based on protocol conversion according to claim 9 is characterized in that: The PLC master station and the target PLC slave station communicate with each other using the EtherCat protocol.