A safe and high-speed industrial communication method for high-speed placement machine motion control

By designing a secure high-speed industrial communication method with a hierarchical architecture, using the rich peripherals of modern microprocessors to replace the traditional byte-byte reading method, the Modbus protocol's low communication efficiency and poor security in high-speed chip machines are solved, and efficient and secure multi-machine communication is achieved.

CN118626433BActive Publication Date: 2025-03-25DONGGUAN WILDFIRE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410498164.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2025-03-25
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

The traditional Modbus industrial communication protocol has problems of low communication efficiency and poor security in the motion control unit of high-speed patch machine, which is difficult to meet the needs of high-speed communication between multiple machines, limiting the working efficiency of patch machine.

Method used

A secure and high-speed industrial communication method is designed, adopting a hierarchical architecture, including protocol application layer, protocol analysis layer, device abstraction layer and hardware BSP layer. It uses peripherals such as FIFO, DMA and idle interrupts to use message packets as the smallest unit of communication data, replacing the traditional byte-byte reading method, achieving efficient communication, and supporting data encryption and error tracking functions.

Benefits of technology

It improves the communication efficiency of the high-speed mounter motion control unit, improves the mounting speed, and enhances the security and robustness of communication, solving the problems of low efficiency and poor security of the traditional Modbus protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626433B_ABST
    Figure CN118626433B_ABST
Patent Text Reader

Abstract

The invention discloses a safe and high-speed industrial communication method for high-speed chip placement machine motion control. The method comprises a protocol application layer, a protocol analysis layer, a device abstraction layer and a hardware BSP layer. The protocol application layer, the protocol analysis layer, the device abstraction layer and the hardware BSP layer are fully decoupled to enhance the robustness and maintainability of the software. Based on the full utilization of the rich peripherals such as FIFO, DMA and idle interrupt of modern microprocessors, a message packet is used as the minimum unit of communication data to replace the traditional byte-by-byte reading method. The method can complete the high-speed communication between multiple machines in the motion control unit in an efficient communication method, replace the traditional Modbus communication protocol to solve the problems of low communication efficiency and poor security brought by the traditional Modbus industrial communication protocol software, and thus improve the placement speed of the chip placement machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of motion control methods for high-speed chip placement machines, and in particular to a safe and high-speed industrial communication method for motion control of high-speed chip placement machines. Background Art

[0002] In motion control units used in high-speed placement machines, communication efficiency bottlenecks are often encountered, which limits the movement speed. When hardware design and structural design are already difficult to improve, in order to further improve the efficiency of the motion control unit, the key lies in improving the efficiency of the communication protocol software.

[0003] Traditional Modbus industrial communication protocol software has a long history. Most devices and software only support a baud rate of up to 115200bps for serial ports, which is no longer suitable for current high-communication rate hardware devices of 1Mbps or even 10Mbps. Moreover, traditional Modbus communication protocol software is mostly implemented by sending and receiving serial port byte streams, reading data byte by byte, and is limited by the requirement of 3.5 bytes between messages, resulting in a large time overhead. There is no driver support for rich peripherals such as FIFO, DMA, and idle interrupts, which has become the short board in the wooden barrel effect. It is difficult to meet the current demand for high-speed communication between multiple machines for industrial motion control units, which restricts the work efficiency of products such as placement machines. In addition, the traditional Modbus industrial communication protocol does not support authentication, read-write locks, and encryption operations, and has poor security. Therefore, the present invention designs a safe and high-speed industrial communication protocol software method for a high-speed placement machine motion control unit, which is intended to replace the traditional Modbus industrial communication protocol. Summary of the invention

[0004] In view of the deficiencies in the prior art, an object of the present invention is to provide a safe and high-speed industrial communication method for motion control of a high-speed placement machine.

[0005] In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a safe and high-speed industrial communication method for high-speed placement machine motion control, characterized in that: a protocol application layer, a protocol parsing layer, a device abstraction layer and a hardware BSP layer are provided, and the protocol application layer, the protocol parsing layer, the device abstraction layer and the hardware BSP layer are fully decoupled to enhance the robustness and maintainability of the software,

[0006] 1) The protocol application layer is equipped with a register table, which is used to store data items such as device parameters and operating frequency of the device, and is used as a small database;

[0007] 2) The protocol parsing layer is equipped with a debug library, command table, log library, and assertion library. Zero-copy buffering is used in the data receiving stage, and the device reads the buffer data packet for parsing in the parsing stage.

[0008] A binary command table is designed. The command parsing process is binary parsing. Four bits in a single byte represent the command type, and four bits represent the specific command, which is divided into 15 reserved commands and 240 optional commands. Register read and write, read-write lock, user lock, remote task call and other functions are specified by the binary command.

[0009] 3) The device abstraction layer is set with master-slave roles, port numbers, and baud rates. The master-slave roles are set in the device abstraction layer. The corresponding master-slave roles are set for the corresponding host device and slave device respectively. The master-slave roles determine the correspondence with the upper-layer analysis. The driver of the hardware BSP layer is connected by modifying the port number and baud rate. A device object has a buffer with a configurable length. The buffer is used to connect the FIFO, DMA, and idle interrupt drivers of the protocol analysis layer and the hardware BSP layer to achieve zero-copy buffering.

[0010] 4) The hardware BSP layer includes an interface layer that adapts to a variety of devices, including the basic serial port driver, FIFO, DMA and idle interrupt driver, which is used to adapt to various hardware devices. In the hardware BSP layer of the protocol software, a communication method with multi-byte message packets as the smallest unit is implemented to utilize FIFO and DMA to eliminate the time consumption caused by reading byte by byte.

[0011] The protocol application layer sets read-write locks for some data entries to prevent problems caused by erroneous modifications, and only allows administrator users to set read-write locks. At the same time, a user lock is set for the administrator user, and authentication is required to allow the read-write lock to be closed and sensitive data entries to be modified.

[0012] The protocol application layer is provided with a remote task calling program for realizing the host device controlling the slave device and supporting the remote execution of the specified task.

[0013] In the hardware BSP layer, the communication method with message packets as the smallest unit replaces the traditional method of reading byte by byte, and uses idle interrupts to shorten the waiting time of 3.5 bytes in the Modbus protocol and change it to 2 bytes to trigger idle interrupts. The communication rate is fully improved in the hardware BSP layer, and the time consumption of each communication process and the computing overhead of the processor are reduced.

[0014] To initialize the slave device, first configure the serial port parameters of the slave device, initialize FIFO, DMA and idle interrupts, complete the initialization of the hardware BSP layer, then register as a slave device object and register the buffer bound to the corresponding slave device. When the idle interrupt is triggered, the slave device reads the data in the FIFO and DMA buffers, then first checks the data length and CRC, decrypts the data, and then queries the received command through the binary command table. After the specified command is queried, it is diverted to access registers, remote task calls, remote upgrades and authentication. When it is necessary to execute a register read and write task, first check the read and write permissions, and then be allowed to read and write the register, and finally send a response signal to the host device.

[0015] Initialize the slave device through the initialization program slave_init, first call the bsp_config_all of the hardware BSP layer to complete the board-level driver configuration for the hardware, and then call dev_register of the device abstraction layer to register as a slave device object and apply for a buffer, completing the initialization of the device abstraction layer;

[0016] Whenever there are two bytes of idle time after a message is transmitted, the idle interrupt is triggered, indicating that a message packet sent by the host is completed. At this time, the slave executes the interrupt program. At this time, the message packets sent by the host are stored in the DMA buffer. The slave device uses slave_parse to process the data in the DMA buffer for the message packet sent by the host device, and then uses the high bit of the binary command to divert to the specified command class, uses the low bit to determine the corresponding command, and then executes the corresponding operation, and finally uses slave_ack to send a response to the host.

[0017] The host device is initialized through the initialization program master_thread_init. First, bsp_config_all of the hardware BSP layer and dev_register of the device abstraction layer are called to complete the previous configuration work. For multiple serial ports from COM1 to COMx, multiple slave device service threads are started and added to the task queue. Multiple serial port service programs will be polled and executed, and then the thread_monitor_start program is called to start the monitoring thread. When running in a real-time operating system environment, it runs in the DMA receive interrupt of the serial port. When running in a non-real-time operating system, data reception is completed by using the system callback function in a non-blocking read manner.

[0018] The program that triggers the slave device service function and executes the command issuance is used to implement the application sending commands to the slave device by modifying the current state variable.

[0019] During the communication process of the slave device service function, the error tracking function is first turned on. If a problem occurs during the communication process, the slave device outputs it to the log and triggers an assertion to facilitate locating the cause of the error when the communication is abnormal. Then the master_packet program is used to pack the data, and then the master_send_rec program is called to send the command. Finally, the operating system is suspended and waits for the data read by the listening thread. The corresponding processing function is executed when the response of the receiving slave device times out or is normal.

[0020] The advantages of the present invention compared with the prior art are:

[0021] 1. The present invention is based on the full utilization of the rich peripherals of modern microprocessors such as FIFO, DMA, idle interrupts, etc., uses message packets as the smallest unit of communication data, replaces the traditional byte-by-byte reading method, and completes high-speed communication between multiple machines in the motion control unit in an efficient communication method, replacing the traditional Modbus communication protocol to solve the problems of low communication efficiency and poor security brought by the traditional Modbus industrial communication protocol software, thereby improving the mounting speed of the placement machine.

[0022] 2. The present invention is based on a customized software architecture design and adopts a layered design to implement data encryption and error tracking functions during the communication process, thereby improving the security and robustness of communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a hierarchical diagram of the protocol system of the present invention.

[0024] Figure 2 This is the working process diagram of the slave device.

[0025] Figure 3 It is the communication timing of the slave device.

[0026] Figure 4 It is the working process diagram of the host device.

[0027] Figure 5 It is the communication timing of the host device. DETAILED DESCRIPTION

[0028] The motion control unit of a high-speed placement machine plays a decisive role in the production efficiency of the placement machine. In order to solve the bottleneck problem brought about by traditional industrial communication protocol software, the present invention designs a communication method to replace the traditional Modbus industrial communication protocol to improve the communication efficiency of the motion control unit, thereby improving the movement speed and placement speed of the high-speed placement machine, and at the same time improving the communication security of the high-speed placement machine.

[0029] The invention discloses a safe and high-speed industrial communication method for high-speed chip placement machine motion control, a safe and high-speed industrial communication protocol software for high-speed chip placement machine motion control, an efficient and safe communication method and a communication protocol software that efficiently completes communication between multiple machines. The communication protocol software runs in programs of multiple desktop operating systems, real-time operating systems or embedded bare metal environments. When the communication protocol software runs in a real-time operating system or an embedded bare metal environment, it drives FIFO, DMA, and idle interrupt peripherals unique to modern microprocessors, and when it runs in a desktop operating system, it adapts to the application interface of the desktop operating system, thereby realizing high-speed and safe communication between multiple machines and multiple systems.

[0030] A safe and high-speed industrial communication method for high-speed placement machine motion control, Figure 1-5 As shown, a protocol application layer, a protocol parsing layer, a device abstraction layer and a hardware BSP layer are provided. The protocol application layer, the protocol parsing layer, the device abstraction layer and the hardware BSP layer are fully decoupled to enhance the robustness and maintainability of the software. Figure 1 As shown,

[0031] 1) The protocol application layer is provided with a register table for storing data items such as device parameters and operating frequency of the device, which is used as a small database. At the same time, for security reasons, read-write locks can be set for some data items to prevent problems caused by erroneous modifications, and only administrator users are allowed to set read-write locks. At the same time, a user lock is provided for the administrator user, and authentication is required to allow the read-write lock to be closed to modify sensitive data items; the protocol supports remote task calling. Embedded products often use PCBA directly for debugging and development in the development stage, but it is often difficult to directly contact PCBA for on-board debugging in the product stage. The protocol application layer of the present invention is provided with a remote task calling program to support remote execution of specified tasks, so as to realize remote control of slave devices by the host device, avoid the problem of disassembly and assembly during product debugging, and support online upgrade of slave devices.

[0032] 2) The protocol parsing layer is provided with a debugging library, a command table, a log library, and an assertion library. In order to save space, traditional communication protocols often do not have error tracking functions and limited log functions, and are not suitable for today's hardware devices with rapidly changing performance. The present invention implements the error tracking function through the above functions, and the error tracking is refined to the context location and log records of the error command and the error program. This function is implemented at the protocol layer to ensure the robustness of communication and facilitate product debugging. In the data receiving stage, zero copy buffering is used to maximize the use of current hardware devices with increasingly powerful performance. In the parsing stage, the device reads the buffer data packet for parsing. At the same time, the present invention designs a binary command table, and the command parsing process is binary parsing. Four bits in a single byte represent the command type, and four bits represent the specific command, which is divided into 15 reserved commands and 240 optional commands. Register reading and writing, read-write lock, user lock, remote task call and other functions are all specified by the binary command.

[0033] 3) The device abstraction layer is provided with master-slave roles, port numbers, and baud rates. The present invention needs to specify the master-slave roles first, and set the master-slave roles in the device abstraction layer. The corresponding master-slave roles are set for the corresponding host device and the slave device respectively. The master-slave roles determine the correspondence with the upper-layer analysis; it supports modifying the port number and baud rate to connect to the driver of the hardware BSP layer. A device object has a buffer with a configurable length, which is used to connect the FIFO, DMA, and idle interrupt drivers of the protocol analysis layer and the hardware BSP layer to achieve zero-copy buffering.

[0034] 4) The hardware BSP layer includes an interface layer adapted to a variety of devices, including basic serial port drivers, FIFO, DMA and idle interrupt drivers, which are adapted to various hardware devices. In the hardware BSP layer of the protocol software, a communication method with multi-byte message packets as the smallest unit is implemented, in which FIFO and DMA are used to eliminate the time consumption caused by reading byte by byte, replacing the traditional byte-by-byte reading method. In addition, the idle interrupt is used to shorten the 3.5-byte waiting time in the Modbus protocol and change it to 2 bytes to trigger the idle interrupt, which fully improves the communication rate at the hardware BSP layer and reduces the time consumption of each communication process and the processor's computing overhead.

[0035] The workflow of the slave device is implemented in the following way:

[0036] Figure 2As shown, the slave starts to work, configures serial port parameters, initializes FIFO, DMA and idle interrupts, completes the initialization of the hardware BSP layer, and then registers as a slave device object and registers the buffer bound to the device object. When the idle interrupt is triggered, the device reads the data in the FIFO and DMA buffers, and then verifies the data length and CRC, decrypts the data, and then queries the received command through the binary command table. After the specified command is queried, it is diverted to tasks such as accessing registers, remote task calling, remote upgrading, and authentication. When it is necessary to execute the task of reading and writing registers, the read and write permissions are checked first, and then the registers can be read and written, and finally a response signal is sent to the host.

[0037] The pseudo code for the communication program of the slave device is as follows:

[0038]

[0039] The slave device starts working and is initialized. First, the serial port parameters are configured, FIFO, DMA and idle interrupts are initialized, and the hardware BSP layer is initialized. Then, it is registered as a slave device object and the buffer is registered and bound to the corresponding slave device. When the idle interrupt is triggered, the slave device reads the data in the FIFO and DMA buffers, and then verifies the data length and CRC, decrypts the data, and then queries the received command through the binary command table. After the specified command is queried, it is diverted to access registers, remote task calls, remote upgrades and authentication. When it is necessary to execute the read and write register task, the read and write permissions are checked first, and then the registers can be read and written, and finally a response signal is sent to the host device.

[0040] The pseudo code for the communication program on the slave side is as follows:

[0041]

[0042] In the slave device initialization program slave_init, first call the hardware BSP layer's bsp_config_all to complete the hardware board-level driver configuration, then call the device abstraction layer's dev_register to register as a slave device object and apply for a buffer to complete the initialization of the device abstraction layer; whenever there are two bytes of idle space after a message is transmitted, the idle interrupt is triggered, indicating that a message packet sent by the host has been sent. At this time, the slave executes the interrupt program. At this time, the message packets sent by the host are stored in the DMA buffer. The slave device uses slave_parse to process the data in the DMA buffer for the message packet sent by the host device, and then uses the high bit of the binary command to divert to the specified command class, uses the low bit to determine the corresponding command, and then executes the corresponding operation, and finally uses slave_ack to send a response to the host. Figure 3 shown.

[0043] The workflow of the host device is as follows:

[0044] In embedded systems for motion control, the host role is usually running Windows, Linux, real-time operating systems or other operating systems, and the processor is usually an x86, ARM processor or a high-performance microcontroller that supports real-time operating systems, so the host device generally does not have performance shortcomings. At the same time, there is also a communication demand for multiple slave devices, so the communication protocol of the present invention is a multi-threaded working mode on the host side. The specific workflow Figure 4 shown.

[0045] After the main thread of the host device's software program is started, the required serial port parameters are initialized and the serial port is opened, a host device object is created, and then multiple slave service threads and listening threads are started. The listening thread completes the listening of multiple serial ports and moves the received data to the specified buffer; each slave service thread is responsible for communicating with a slave device object. When it is necessary to send instructions to the slave device, the data packet is packaged and encrypted in the slave device thread and then sent to the slave device. Then, the listening thread uses an asynchronous method to wait for the response from the slave end. If the waiting timeout occurs, the error handling function will be entered. After the response is received normally, the response data will be decrypted first, and then the response will be processed according to the response content.

[0046] The pseudo code for the host-side communication program is as follows:

[0047]

[0048]

[0049] In the initialization program master_thread_init of the host device, the host device is initialized by the initialization program master_thread_init. Similar to the running program of the slave device, the bsp_config_all of the hardware BSP layer and the dev_register of the device abstraction layer are called to complete the previous configuration work. For multiple serial ports from COM1 to COMx, multiple slave device service threads are started and added to the task queue. Multiple serial port service programs will be polled and executed, and then the thread_monitor_start program is called to start the monitoring thread. When running in a real-time operating system environment, it runs in the DMA receive interrupt of the serial port. When running in a non-real-time operating system, it completes data reception in a non-blocking read manner by using the system callback function. When running in a real-time operating system environment, it runs in the DMA receive interrupt of the serial port. When running in a non-real-time operating system such as Windows and Linux, it uses the system callback function to complete data reception in a non-blocking read manner.

[0050] When the application needs to send a command to the slave device, the current state variable is modified to trigger the slave device service function and execute the program for sending the command. During the communication process of the slave device service function, the error tracking function is first turned on. If there is a problem during the communication process, the slave device outputs to the log and triggers an assertion to facilitate locating the cause of the error when the communication is abnormal. Then the master_packet program is used to package the data, and then the master_send_rec program is called to send the command. Finally, the operating system is suspended and waits for the data read by the listening thread. The corresponding processing function is executed when the response of the receiving slave device times out or is normal. The communication timing of the host device is as follows: Figure 5 shown.

[0051] The present invention supports high-speed serial communication, supports modern powerful microcontroller platforms, is adapted to the drivers of FIFO, DMA and idle interrupts, operates safely and efficiently, has encrypted communication processes, and has error tracking on the host device side, which facilitates online debugging and positioning of the source of faults in the host device or slave device.

[0052] The above contents are only preferred embodiments of the present invention. For ordinary technicians in this field, according to the concept of the present invention, there will be changes in the specific implementation methods and application scopes. The content of this specification should not be understood as limiting the present invention.

Claims

1. A safe and high-speed industrial communication method for high-speed placement machine motion control, characterized in that: The protocol application layer, protocol parsing layer, device abstraction layer and hardware BSP layer are set up. The protocol application layer, protocol parsing layer, device abstraction layer and hardware BSP layer are fully decoupled to enhance the robustness and maintainability of the software. 1) The protocol application layer is equipped with a register table to store the device parameters and operating frequency data entries of the device, which is used as a small database; 2) The protocol parsing layer is equipped with a debug library, command table, log library, and assertion library. Zero-copy buffering is used in the data receiving stage, and the device reads the buffer data packet for parsing in the parsing stage. A binary command table is designed. The command parsing process is binary parsing. Four bits in a single byte represent the command type, and four bits represent the specific command, which is divided into 15 reserved commands and 240 optional commands. Register read and write, read-write lock, user lock, and remote task call functions are all specified by the binary command. 3) The device abstraction layer is set with master-slave roles, port numbers, and baud rates. The master-slave roles are set in the device abstraction layer. The corresponding master-slave roles are set for the corresponding host device and slave device respectively. The master-slave roles determine the correspondence with the upper-layer analysis. The driver of the hardware BSP layer is connected by modifying the port number and baud rate. A device object has a buffer with a configurable length. The buffer is used to connect the FIFO, DMA, and idle interrupt drivers of the protocol analysis layer and the hardware BSP layer to achieve zero-copy buffering. 4) The hardware BSP layer includes an interface layer that adapts to a variety of devices, including the basic driver of the serial port, FIFO, DMA and idle interrupt drivers, which are used to adapt to various hardware devices. In the hardware BSP layer of the protocol software, a communication method with multi-byte message packets as the smallest unit is implemented to eliminate the time consumption caused by reading bytes one by one by using FIFO and DMA; Initialize the slave device, first configure the serial port parameters of the slave device, initialize FIFO, DMA and idle interrupt, complete the initialization of the hardware BSP layer, then register as a slave device object and register the buffer bound to the corresponding slave device, when the idle interrupt is triggered, the slave device reads the data in the FIFO and DMA buffers, then first checks the data length and CRC, decrypts the data, and then queries the received command through the binary command table. After the specified command is queried, it is diverted to access registers, remote task calls, remote upgrades and authentication. When it is necessary to execute a register read and write task, first check the read and write permissions, and then be allowed to read and write the register, and finally send a response signal to the host device; The host device is initialized through the initialization program master_thread_init. First, bsp_config_all of the hardware BSP layer and dev_register of the device abstraction layer are called to complete the previous configuration work. For multiple serial ports from COM1 to COMx, multiple slave device service threads are started and added to the task queue. Multiple serial port service programs will be polled and executed, and then the thread_monitor_start program is called to start the monitoring thread. When running in a real-time operating system environment, it runs in the DMA receive interrupt of the serial port. When running in a non-real-time operating system, data reception is completed by using the system callback function in a non-blocking read manner.

2. A safe and high-speed industrial communication method for high-speed placement machine motion control according to claim 1, characterized in that: The protocol application layer sets read-write locks for some data entries to prevent problems caused by erroneous modifications, and only allows administrator users to set read-write locks. At the same time, a user lock is set for the administrator user, and authentication is required to allow the read-write lock to be closed and sensitive data entries to be modified.

3. A safe and high-speed industrial communication method for high-speed placement machine motion control according to claim 1, characterized in that: The protocol application layer is provided with a remote task calling program for realizing the host device controlling the slave device and supporting the remote execution of the specified task.

4. A safe and high-speed industrial communication method for high-speed placement machine motion control according to claim 1, characterized in that: In the hardware BSP layer, the communication method with message packets as the smallest unit replaces the traditional method of reading byte by byte, and uses idle interrupts to shorten the waiting time of 3.5 bytes in the Modbus protocol and change it to 2 bytes to trigger idle interrupts. The communication rate is fully improved in the hardware BSP layer, and the time consumption of each communication process and the computing overhead of the processor are reduced.

5. A safe and high-speed industrial communication method for high-speed placement machine motion control according to any one of claims 1 to 4, characterized in that: Initialize the slave device through the initialization program slave_init, first call the bsp_config_all of the hardware BSP layer to complete the board-level driver configuration for the hardware, and then call dev_register of the device abstraction layer to register as a slave device object and apply for a buffer, completing the initialization of the device abstraction layer; Whenever there are two bytes of idle time after a message is transmitted, the idle interrupt is triggered, indicating that a message packet sent by the host is completed. At this time, the slave executes the interrupt program. At this time, the message packets sent by the host are stored in the DMA buffer. The slave device uses slave_parse to process the data in the DMA buffer for the message packet sent by the host device, and then uses the high bit of the binary command to divert to the specified command class, uses the low bit to determine the corresponding command, and then executes the corresponding operation, and finally uses slave_ack to send a response to the host.

6. A safe and high-speed industrial communication method for high-speed placement machine motion control according to claim 5, characterized in that: The program that triggers the slave device service function and executes the command issuance is used to implement the application sending commands to the slave device by modifying the current state variable.

7. A safe and high-speed industrial communication method for high-speed placement machine motion control according to claim 6, characterized in that: During the communication process of the slave device service function, the error tracking function is first turned on. If a problem occurs during the communication process, the slave device outputs it to the log and triggers an assertion to facilitate locating the cause of the error when the communication is abnormal. Then the master_packet program is used to pack the data, and then the master_send_rec program is called to send the command. Finally, the operating system is suspended and waits for the data read by the listening thread. The corresponding processing function is executed when the response of the receiving slave device times out or is normal.

Citation Information

Patent Citations

  • RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system

    CN105491017A

  • An embedded MODBUS protocol stack suitable for communication among multiple devices

    CN109714336A