A system on chip and method for motion control error compensation

By designing a system on-chip for motion control error compensation on a machine tool, the problem of reverse gap compensation in the prior art increases mechanical complexity and poor reliability, high-precision error compensation and smooth speed control are achieved, and processing quality is improved.

CN119414776BActive Publication Date: 2025-05-13NINGBO ZHONGKONG MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510006853.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-05-13
Estimated Expiration
2045-01-03

AI Technical Summary

Technical Problem

The prior art increases the complexity of the mechanical structure when eliminating the reverse clearance of the gear transmission, and has poor reliability, and error compensation ignores the smoothness of the compensation value change and the speed, resulting in shock vibrations in the equipment during commutation movement, affecting the processing quality.

Method used

A motion control error compensation system is designed, including a microprocessor, a logic control coprocessor and a motion control coprocessor. By monitoring interpolation and uniaxial motion, an appropriate error compensation mode is selected for compensation, and pulse output is performed in combination with normal motion pulses.

Benefits of technology

High-precision error compensation in machine tools and other processing projects is realized. By unifying the compensation value and normal motion trajectory parameters, the compensation value is uniform and the speed is smooth, eliminating equipment vibration and impact, and improving system performance and processing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414776B_ABST
    Figure CN119414776B_ABST
Patent Text Reader

Abstract

The present invention provides a system on chip and method for motion control error compensation, which relates to the field of industrial control technology, including: a microprocessor, a logic control coprocessor and a motion control coprocessor; the microprocessor is used to call the corresponding motion control instruction according to the motion control task, and send the motion control instruction to the motion control coprocessor; the logic control coprocessor is used to schedule the motion control instruction of the motion control coprocessor in executing the logic control instruction; the motion control coprocessor is used to parse the motion control instruction in the motion control task to obtain the corresponding normal motion pulse. The system on chip and method provided by the present invention can automatically identify the compensation point, automatically perform compensation calculation, output uniform and high-frequency pulses, make the compensation smoother and avoid the problem of processing impact, improve system performance, and provide a more stable and reliable solution for applications in the engineering field that require high-precision motion and high-quality processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial control technology, and in particular to a system on chip and method for motion control error compensation. Background Art

[0002] In each link of the CNC machine tool feed transmission chain, such as gear transmission, ball screw nut pair, etc., there is reverse clearance. Reverse clearance is one of the factors affecting machining accuracy. When the CNC machine tool table changes direction in its movement direction, the existence of reverse clearance will cause the servo motor to idle without the table actually moving, which is called loss of motion. Pitch error refers to the difference between the actual pitch of the thread and the theoretical pitch, and the accumulated pitch error will cause a systematic constant positioning error. There are two main reasons for the pitch error: one is that there will always be manufacturing errors in the screw; the other is that the machine tool will cause wear after long-term use, resulting in errors. The above errors will cause a significant decrease in the stability of the system and a significant decrease in machining accuracy, especially in curve machining, which will affect the dimensional tolerance and the consistency of the curve. At this time, compensation for reverse clearance and pitch error must be performed to improve machining accuracy.

[0003] The traditional method of eliminating the reverse clearance of gear transmission is to use rigid or flexible mechanical clearance elimination methods. Mechanical clearance elimination methods increase the complexity of the mechanical structure and have poor reliability. In addition, the reverse clearance compensation method of precision machine tools in the prior art is controlled and adjusted by a compensation device, and the compensation is mostly focused on how to obtain a more accurate error compensation value at the current interpolation position, while ignoring the impact of the compensation value change and speed smoothness on the processing quality. For some equipment with poor pitch accuracy or when performing commutation movement, excessive compensation value changes cause impact vibration during the movement of the equipment, thereby affecting the processing quality. Summary of the invention

[0004] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide a system-on-chip and method for motion control error compensation, which is used to solve the problem that the traditional elimination of reverse clearance of gear transmission in the prior art will increase the complexity of the mechanical structure and the reliability of mechanical clearance elimination is poor; the current error compensation ignores the influence of the change in compensation value and the smoothness of speed on the processing quality, and for some devices with poor pitch accuracy or when performing commutation motion, excessive change in compensation value causes impact vibration during the movement of the equipment, thereby affecting the processing quality.

[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a system-on-chip for motion control error compensation, including: a microprocessor, a logic control coprocessor and a motion control coprocessor; the microprocessor is used to call the corresponding motion control instructions according to the motion control task, and send the motion control instructions to the motion control coprocessor; the logic control coprocessor is used to schedule the motion control instructions of the motion control coprocessor in the execution of the logic control instructions; the motion control coprocessor is used to parse the motion control instructions in the motion control task to obtain the corresponding normal motion pulses; error compensation monitoring is performed on various types of interpolation and single-axis motion, and the corresponding error compensation mode is selected according to the monitoring results to perform error compensation, to obtain output compensation pulses, and combined with normal motion pulses, pulse output to the driver is performed.

[0006] In one embodiment of the present invention, the microprocessor is further configured to retrieve a corresponding G code instruction as a first target motion control instruction through a memory according to the first target motion control task, and send the first target motion control instruction to the motion control coprocessor.

[0007] In one embodiment of the present invention, the microprocessor is further configured to use a motion control function block program based on the PLCopen standard as a second target motion control instruction according to the second target motion control task, and send the second target motion control instruction to the motion control coprocessor.

[0008] In one embodiment of the present invention, the motion control coprocessor includes: an instruction parsing module, which is used to parse the motion control instructions and convert the parsed motion control instructions into motor control signals as normal motion pulses; wherein the motor control signals include pulse signals and direction signals; a monitoring module, which is respectively deployed in the interpolation module and the single-axis module, and is used to monitor the interpolation module and the single-axis module respectively, so as to obtain a first monitoring result corresponding to the interpolation module and a second monitoring result corresponding to the single-axis module; and a selection module, which is used to select the corresponding error compensation mode through a register according to the first monitoring result and the second monitoring result to perform error compensation, obtain an output compensation pulse, and combine it with the normal motion pulse to perform pulse output to the driver.

[0009] In one embodiment of the present invention, the error compensation mode includes: bypassing the error compensation function, performing all types of error compensation, and performing partial types of error compensation.

[0010] In one embodiment of the present invention, the selection module includes: an operation module, which is used to select the motion control algorithms corresponding to the interpolation module and the single-axis module respectively according to the first monitoring result and the second monitoring result to perform error compensation to obtain an output compensation pulse; wherein the motion control algorithm includes an interpolation algorithm, an acceleration and deceleration algorithm, and an error compensation algorithm; a combination module, which is used to perform unified planning operations on normal motion pulses and output compensation pulses to obtain output pulses; and a pulse output module, which is used to output the output pulses to the driver.

[0011] In one embodiment of the present invention, the operation module includes: a first compensation module, which is used to add a compensating pulse to the movement after the reverse movement when the movement corresponding to the normal movement pulse is detected to be reversed, so as to obtain the compensated total pulse as the first target output compensation pulse; and a second compensation module, which is used to perform linear compensation according to the pitch compensation table to obtain the second target output compensation pulse.

[0012] In one embodiment of the present invention, the first compensation module includes: a linear interpolation module, which is used to determine whether the direction in which the first target axis participating in the linear interpolation needs to move is consistent with the previous movement direction of the first target axis when it is detected that the interpolation mode is linear interpolation, if not, the first target axis is compensated once, if consistent, no compensation is performed; an arc interpolation module, which is used to determine whether the direction in which the second target axis participating in the circular interpolation needs to move is consistent with the previous movement direction of the second target axis when it is detected that the interpolation mode is circular interpolation, if not, the second target axis is compensated once, if consistent, no compensation is performed; before the start of a single circular interpolation, the circular interpolation path is monitored, and When the circular interpolation path exceeds 1 / 4 circle, the second target axis is compensated once; the spiral interpolation module is used to determine whether the movement direction of the third target axis involved in the interpolation is consistent with the movement direction of the third target axis last time before the interpolation starts when the interpolation mode is detected as spiral interpolation, which is a combination of linear interpolation and circular interpolation. If not, the third target axis is compensated once, and if consistent, no compensation is performed; and the single-axis motion module is used to monitor the movement direction of each axis at the beginning of the motion when forward or reverse single-axis motion is detected. When the current motion direction is opposite to the previous motion direction of the axis, compensation is performed once, and when the current motion direction is the same as the previous motion direction of the axis, no compensation is performed.

[0013] In one embodiment of the present invention, the second compensation module includes: a compensation control module, which is used to enable the pitch compensation function for a specific axis; wherein the specific axis includes a plurality of pitch compensation points, each pitch compensation point is configured with a pitch compensation parameter register and a pitch compensation interval register; a pulse recording module, which is used to record the pulse information emitted by each pitch compensation point of the specific axis in real time after the pitch compensation function is enabled; and a pitch compensation module, which is used to perform a pitch compensation according to the pulse information when the specific axis reaches a specified position of movement within a specified interval.

[0014] To achieve the above-mentioned purpose and other related purposes, the present invention also provides a control method for the on-chip system for the aforementioned motion control error compensation, including the following steps: using a microprocessor to call the corresponding motion control instructions according to the motion control task, and sending the motion control instructions to the motion control coprocessor; using a logic control coprocessor to schedule the motion control instructions of the motion control coprocessor in the execution of the logic control instructions; using the motion control coprocessor to parse the motion control instructions in the motion control task to obtain the corresponding normal motion pulses; performing error compensation monitoring on various types of interpolation and single-axis motion, and selecting the corresponding error compensation mode to perform error compensation according to the monitoring results, to obtain output compensation pulses, and combined with normal motion pulses, to perform pulse output to the driver.

[0015] As described above, the system-on-chip and method for motion control error compensation of the present invention have the following beneficial effects: it can realize error compensation in machining projects such as machine tools, not only can accurate error value compensation be performed, but also the compensation value and normal operation trajectory parameters can be uniformly planned through the motion control coprocessor to achieve uniform compensation value and smooth speed, and can realize high-precision and high-speed pulse output, eliminate equipment vibration and impact during compensation, and improve system performance and machining quality. At the same time, the present invention can also associate control error compensation through a logic control program, which can adapt to a variety of applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Shown is the overall architecture diagram of the system on chip of the present invention.

[0017] Figure 2 Shown is a specific execution architecture diagram of a system on chip provided by an embodiment of the present invention.

[0018] Figure 3 Shown is an architecture diagram of a motion control coprocessor provided by an embodiment of the present invention.

[0019] Figure 4 Shown is a flow chart of a control method of a system on chip according to the present invention.

[0020] Component number description

[0021] Microprocessor 10; logic control coprocessor 20; motion control coprocessor 30; memory 40. DETAILED DESCRIPTION

[0022] The following is an explanation of the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the features in the following embodiments and the embodiments can be combined with each other without conflict. It should also be understood that the terms used in the embodiments of the present invention are intended to describe specific embodiments, rather than to limit the scope of protection of the present invention. The test methods for which specific conditions are not specified in the following examples are usually carried out under conventional conditions or according to the conditions recommended by the manufacturers.

[0023] PLC: Programmable Logic Controller, a controller commonly used in industrial environments, including input, output, storage, master control and other parts, which can realize logic control, motion control and other functions through configuration programming.

[0024] Motion controller: An industrial controller mainly used for controlling mechanical axes. It can realize precise position, speed, acceleration and other control of mechanical motion through function interface or configuration programming, and also supports point input and output.

[0025] IP core: Intellectual property core, in the design of integrated circuits, refers to a reusable module in the form of logic units and chip designs provided by one party.

[0026] PLCopen is an open programming standard for programming and interaction in industrial automation control systems. The motion control library based on the PLCopen standard is a general software tool for implementing motion control in machine or process control. The motion control library provides a complete motion control solution through the PLC programming environment or other programming environments. The motion control library based on the PLCopen standard can provide a wealth of control methods, such as position, speed and acceleration control. The library can easily implement motion control such as motor control, key tracking, linear or circular interpolation. This makes the library an indispensable component in the control of modern industrial automation systems. The library also supports a variety of interfaces and communication protocols, such as ETC, canopen, modbus, etc., making communication between PLC and other devices simple and convenient. At the same time, it also provides a wealth of motion control algorithms and parameter settings to adapt to different applications and requirements. The motion control library based on the PLCopen standard can not only improve the efficiency and accuracy of automation system control, but also significantly reduce programming and development time. At the same time, it can also better support machine reconstruction and modular design, making the system more flexible and scalable.

[0027] CW / CCW dual pulse: Two pulse signals, one controls clockwise (CW) and the other controls counterclockwise (CCW), for anti-interference and long-distance transmission. This mode provides the possibility of bidirectional rotation, but has strict requirements on signal synchronization. AB phase pulses are counted and encoded by two independent identical pulse signals through their phase difference. Early encoders often used this format to process A and B signals through voltage comparators. Today, although modern encoders may use subdivision processing, the traditional format of A / B signals is still retained for its compatibility. When choosing a pulse control method, it is important to consider the type of drive support and the degree of interference in the application environment. Direction pulses are suitable for simple control systems, while CW / CCW pulses have advantages in anti-interference performance and flexibility. AB phase pulses provide counting and encoding accuracy, but may require additional signal processing.

[0028] See also Figure 1The present invention provides a system-on-chip for motion control error compensation, which can realize error compensation in machining projects such as machine tools, not only can accurate error value compensation be performed, but also the compensation value and normal operation trajectory parameters can be uniformly planned through a motion controller to achieve uniform compensation value and smooth speed, and can achieve high-precision and high-speed pulse output, eliminate equipment vibration and impact during compensation, and improve system performance and machining quality. The system-on-chip may include a microprocessor 10, a logic control coprocessor 20, a motion control coprocessor 30, a memory 40, and a communication IP core. Among them, the microprocessor 10, the logic control coprocessor 20, the motion control coprocessor 30, the communication IP core, and the memory 40 are interconnected on the chip through a parallel bus AMBA bus. The microprocessor 10 may be an embedded microprocessor, and the communication IP core includes communication peripheral IPs such as a network port, a serial port, and a CAN port to realize the connection and communication between the embedded microprocessor and external devices.

[0029] See also Figure 1 The present invention provides a system-on-chip for motion control error compensation, including: a microprocessor 10, a logic control coprocessor 20 and a motion control coprocessor 30; the microprocessor 10 is used to call the corresponding motion control instruction according to the motion control task, and send the motion control instruction to the motion control coprocessor 30; the logic control coprocessor 20 is used to schedule the motion control instruction of the motion control coprocessor 30 in executing the logic control instruction; the motion control coprocessor 30 is used to parse the motion control instruction in the motion control task to obtain the corresponding normal motion pulse; error compensation monitoring is performed on various interpolation and single-axis motion, and the corresponding error compensation mode is selected according to the monitoring result to perform error compensation, and an output compensation pulse is obtained, and combined with the normal motion pulse, a pulse output is performed to the driver.

[0030] In one embodiment of the present invention, the microprocessor 10 may be an embedded microprocessor. The microprocessor 10 may be used to implement the scheduling of motion control tasks and the management of communication functions, and send motion control instructions to the motion control coprocessor 30 according to the motion control tasks. The motion control coprocessor 30 may be used to parse the motion control instructions issued by the microprocessor 10 to realize the triggering of the motion control program by the motion control instructions to obtain the corresponding normal motion pulses. Moreover, by performing error compensation monitoring on various interpolation and single-axis motions, and selecting the corresponding error compensation mode according to the monitoring results to realize pulse calculation and output, the compensation point may be automatically identified, the compensation calculation may be automatically performed, and the normal motion pulse may be combined to output uniform and high-frequency pulses to the driver, so that the compensation may be smoother to avoid the problem of machining impact, and the system performance may be improved, and a more stable and reliable solution may be provided for applications requiring high-precision motion and high-quality machining in the engineering field. Moreover, in the process of error compensation and pulse output by the motion control coprocessor 30, the motion control instructions of the motion control coprocessor 30 may be processed by the logic control coprocessor 20 according to the logic control instructions and the motion control instructions of the motion control coprocessor 30 may be scheduled according to the logic operations, so as to adapt to diverse applications.

[0031] In one embodiment of the present invention, the microprocessor 10 may be an embedded microprocessor. The embedded microprocessor may be used to perform scheduling management of motion control tasks, communication, and configuration and management of various IPs of the system on chip. Specifically, since the work of the embedded microprocessor is relatively complex, it involves the management and scheduling of the control functions of the entire system on chip, including the scheduling of control tasks and execution process monitoring, security assurance, and resource management of the system on chip, etc., which may be implemented in the form of a CPU hardware kernel + embedded curing program.

[0032] See also Figure 2 , Figure 2 In one embodiment given, the microprocessor 10 may be an embedded microprocessor, which can be used to schedule and manage motion control tasks and establish communications with the logic control coprocessor 20 and the motion control coprocessor 30 respectively. The logic control instructions are executed by inputting signals to the logic control coprocessor 20, and the motion control instructions of the motion control coprocessor 30 are scheduled in the execution of the logic control instructions. The motion control instructions in the motion control task are parsed by the motion control coprocessor 30 to obtain the corresponding normal motion pulses; error compensation monitoring is performed on various interpolation and single-axis motions, and the corresponding error compensation mode is selected according to the monitoring results to perform error compensation, and the output compensation pulses are obtained, and combined with the normal motion pulses, pulse output to the driver is performed.

[0033] In one embodiment of the present invention, the microprocessor 10 is further configured to retrieve the corresponding G code instruction as the first target motion control instruction through the memory 40 according to the first target motion control task, and send the first target motion control instruction to the motion control coprocessor 30 .

[0034] When executing the first target motion control task, the microprocessor 10 may retrieve the corresponding G code instruction from the memory 4 storing the G code instruction as the first target motion control instruction, and then send the first motion control instruction to the motion control coprocessor 30. The motion control coprocessor 30 may parse and execute the G code instruction issued by the configuration software, that is, parse and execute the first target motion control instruction.

[0035] In one embodiment of the present invention, the microprocessor 10 is further configured to use the motion control function block program based on the PLCopen standard as the second target motion control instruction according to the second target motion control task, and send the second target motion control instruction to the motion control coprocessor 30 .

[0036] When executing the second target motion control task, the microprocessor 10 may directly use the motion control function block program based on the PLCopen standard as the second target motion control instruction, and then send the second target motion control instruction to the motion control coprocessor 30. The motion control coprocessor 30 may parse and execute the motion control function block program based on the PLCopen standard, that is, parse and execute the second target motion control instruction.

[0037] See also Figure 3 ,exist Figure 3 In one embodiment given, the microprocessor 10 may be an embedded microprocessor. When the embedded microprocessor performs the scheduling management of the motion control task, the motion control function block program based on the PLCopen standard may be sent to the function block motion analysis module for analysis through the register module according to the second target motion control task corresponding to the motion control task, and executed through the interpolation module or the single-axis module. Of course, the corresponding G code instruction may also be retrieved through the memory (RAM) (memory 40) as the first target motion control instruction, and the first target motion control instruction may be sent to the G code motion analysis module for analysis, and executed through the interpolation module or the single-axis module. During the execution of the interpolation module or the single-axis module, the interpolation module and the single-axis module are respectively monitored by the monitoring module to obtain the first monitoring result corresponding to the interpolation module and the second monitoring result corresponding to the single-axis module. Then, according to the first monitoring result and the second monitoring result, the selection module uses the register to select the corresponding error compensation mode for error compensation, obtains the output compensation pulse, and combines the normal motion pulse to output the pulse to the driver.

[0038] In one embodiment of the present invention, the motion control coprocessor 30 includes: an instruction parsing module, which is used to parse the motion control instructions and convert the parsed motion control instructions into motor control signals as normal motion pulses; wherein the motor control signals include pulse signals and direction signals; a monitoring module, which is respectively deployed in the interpolation module and the single-axis module, and is used to monitor the interpolation module and the single-axis module respectively, so as to obtain a first monitoring result corresponding to the interpolation module and a second monitoring result corresponding to the single-axis module; and a selection module, which is used to select the corresponding error compensation mode through a register according to the first monitoring result and the second monitoring result to perform error compensation, obtain an output compensation pulse, and combine it with the normal motion pulse to perform pulse output to the driver.

[0039] In the process of error compensation and controlling the pulse output of the driver by the motion control coprocessor 30, the motion control instruction sent by the microprocessor 10 can be parsed by the instruction parsing module, and after parsing, the motion control instruction is converted into a motor control signal, and the motor control signal is used as a normal motion pulse normally output to the driver. The motor control signal includes a pulse signal and a direction signal, for example, the motion control instruction can be converted into a pulse+positive motor control signal, a pulse+negative motor control signal, or a double-pulse motor control signal by register configuration selection. By deploying the monitoring module in the interpolation module and the single-axis module, it can be realized that when the interpolation module is doing the interpolation motion algorithm, or when the single-axis module is doing the single-axis motion planning, the interpolation module and the single-axis module are monitored respectively to obtain the first monitoring result corresponding to the interpolation module and the second monitoring result corresponding to the single-axis module. According to the first monitoring result and the second monitoring result, the selection module selects the corresponding error compensation mode through the register to perform error compensation, obtains the output compensation pulse, and combines the normal motion pulse to output the pulse of the driver. The error value corresponding to the output compensation pulse and the normal motion value corresponding to the normal motion pulse are uniformly planned and calculated, which can ensure the uniformity of the output pulse and the smoothness of the speed.

[0040] In one embodiment of the present invention, the motion control coprocessor 30 analyzes and processes the motion control instructions, outputs pulse + direction signal, CW / CCW and AB phase (double pulse: two pulse signals, one controls clockwise (CW), the other controls counterclockwise (CCW)), and connects the signal to the driver to drive the motor. Because it is a motion control algorithm implemented in hardware, under the condition of a main frequency of 50MHz, its output pulse frequency can reach 8MHz.

[0041] Preferably, one motion control coprocessor 30 can realize acceleration / deceleration control and interpolation control of 4 axes. Specifically, the motion control coprocessor 30 supports 4-axis 3-link interpolation or 4 single-axis motion of 4 motion axes.

[0042] In one embodiment of the present invention, the error compensation mode includes: bypassing the error compensation function, performing all types of error compensation, and performing some types of error compensation. Specifically, during error compensation, the error compensation function bypass, performing all types of error compensation, and performing some types of error compensation can be selected through the register corresponding to the error compensation according to the first monitoring result corresponding to the interpolation module and the second monitoring result corresponding to the single-axis module; wherein the error compensation function bypass means not performing error compensation.

[0043] In one embodiment of the present invention, the selection module includes: an operation module, which is used to select the motion control algorithms corresponding to the interpolation module and the single-axis module respectively according to the first monitoring result and the second monitoring result to perform error compensation to obtain an output compensation pulse; wherein the motion control algorithm includes an interpolation algorithm, an acceleration and deceleration algorithm, and an error compensation algorithm; a combination module, which is used to perform unified planning operations on normal motion pulses and output compensation pulses to obtain output pulses; and a pulse output module, which is used to output the output pulses to the driver.

[0044] In this embodiment, when the selection module performs error compensation and pulse output, the operation module can realize the selection of motion control algorithms corresponding to the interpolation module and the single-axis module respectively for error compensation according to the first monitoring result and the second monitoring result to obtain the output compensation pulse. That is to say, the motion control algorithm corresponding to the interpolation module can be selected for error compensation according to the first monitoring result through the operation module to obtain the output compensation pulse; the motion control algorithm corresponding to the single-axis module can also be selected for error compensation according to the second monitoring result through the operation module to obtain the output compensation pulse. Among them, the motion control coprocessor 30 comes with various motion control algorithms, including interpolation algorithms, acceleration and deceleration algorithms, error compensation algorithms, etc. Then, through the combination module, the normal motion pulse corresponding to the motion control instruction and the output compensation pulse corresponding to the error compensation are uniformly planned and operated to obtain the output pulse. Finally, the obtained output pulse is output to the driver through the pulse output module to drive the motor to operate.

[0045] In one embodiment of the present invention, the operation module includes: a first compensation module, which is used to add a compensating pulse to the movement after the reverse movement when the movement corresponding to the normal movement pulse is detected to be reversed, so as to obtain the compensated total pulse as the first target output compensation pulse; and a second compensation module, which is used to perform linear compensation according to the pitch compensation table to obtain the second target output compensation pulse.

[0046] When the operation module calculates the output compensation pulse, the error compensation may include reverse gap compensation and pitch compensation. And reverse gap compensation can be achieved through the first compensation module; that is, when the movement corresponding to the normal movement pulse is detected to be reversed, it is necessary to add the compensated pulse to the movement after the reverse to obtain the total pulse after compensation as the first target output compensation pulse. Pitch compensation can be achieved through the second compensation module; that is, linear compensation is performed according to the pitch compensation table to obtain the second target output compensation pulse.

[0047] It is worth noting that the reverse gap compensation method is to add compensation pulses to the reverse movement when the movement is reversed, and then perform motion trajectory planning and speed calculation based on the total pulses after compensation. This avoids uneven speed and mechanical shock caused by uneven pulses. The pitch compensation method performs linear compensation based on the pitch compensation table.

[0048] In one embodiment of the present invention, the first compensation module includes: a linear interpolation module, which is used to determine whether the direction in which the first target axis participating in the linear interpolation needs to move is consistent with the direction of movement of the first target axis last time when it is detected that the interpolation mode is linear interpolation, if not, the first target axis is compensated once, if they are consistent, no compensation is performed; an arc interpolation module, which is used to determine whether the direction in which the second target axis participating in the circular interpolation needs to move is consistent with the direction of movement of the second target axis last time when it is detected that the interpolation mode is circular interpolation, if not, the second target axis is compensated once, if they are consistent, no compensation is performed; before the start of a single circular interpolation, the circular interpolation path is monitored, and When the circular interpolation path exceeds 1 / 4 circle, the second target axis is compensated once; the spiral interpolation module is used to determine whether the movement direction of the third target axis involved in the interpolation is consistent with the movement direction of the third target axis last time before the interpolation starts when the interpolation mode is detected as spiral interpolation, which is a combination of linear interpolation and circular interpolation. If not, the third target axis is compensated once, and if consistent, no compensation is performed; and the single-axis motion module is used to monitor the movement direction of each axis at the beginning of the motion when forward or reverse single-axis motion is detected. When the current motion direction is opposite to the previous motion direction of the axis, compensation is performed once, and when the current motion direction is the same as the previous motion direction of the axis, no compensation is performed.

[0049] When the first compensation module performs reverse clearance compensation, when linear interpolation can be realized through the linear interpolation module, it is determined whether the direction in which the axis participating in the linear interpolation needs to move is consistent with the direction of the axis's previous movement. If not, the axis is compensated once. If consistent, no processing is required. When circular interpolation can be realized through the circular interpolation module, before a single circular interpolation starts, it is necessary to determine whether the axis participating in the circular interpolation needs reverse clearance compensation, just like linear interpolation. The operation steps are the same as linear interpolation. In addition, if the circular interpolation path exceeds 1 / 4 circle, quadrant switching will occur. When the quadrant switches, an axis must start to move in the opposite direction. At this time, the axis needs to perform reverse clearance compensation. When spiral interpolation can be realized through the spiral interpolation module, spiral interpolation is a combination of linear interpolation and circular interpolation. Before the interpolation starts, the movement direction of the axis participating in the interpolation is first determined. The specific operation is the same as linear interpolation and circular interpolation. When a single-axis motion module is used to realize single-axis motion, the single-axis motion direction needs to be determined at the beginning of the motion. If the current motion direction is opposite to the previous motion direction of the axis, compensation is performed. If the directions are the same, no compensation is performed. Compensation is also performed when the single-axis motion is in the reverse direction.

[0050] In one embodiment of the present invention, the second compensation module includes: a compensation control module, which is used to enable the pitch compensation function for a specific axis; wherein the specific axis includes a plurality of pitch compensation points, each pitch compensation point is configured with a pitch compensation parameter register and a pitch compensation interval register; a pulse recording module, which is used to record the pulse information emitted by each pitch compensation point of the specific axis in real time after the pitch compensation function is enabled; and a pitch compensation module, which is used to perform a pitch compensation according to the pulse information when the specific axis reaches a specified position of movement within a specified interval.

[0051] When the second compensation module is used for pitch compensation, the compensation control module can only enable the pitch compensation function of a specific axis as needed. After the pitch compensation function is enabled, the pulse recording module records the pulse information sent by the axis in real time, and a pitch compensation is performed when the axis moves to a specified position within a specified interval.

[0052] For example, if the compensation mode used is to add 1 pulse, the total pulse currently sent will increase by 1, and if the compensation mode used is to subtract 1 pulse, the pulse currently output will decrease by 1. Before interpolation operation or single-axis operation, the number of pulses to be increased or decreased will be planned uniformly with the normal motion trajectory according to the information of the pitch compensation table, and the compensation pulses and normal motion pulses will be uniformly output according to the pulse output speed calculated by the system.

[0053] In addition, the compensation control module also provides N pitch compensation points on a specific axis for pitch compensation. Each point consists of a pitch compensation parameter register and a pitch compensation interval register. The parameter register contains the axis information, compensation mode and compensation position of the point, where the compensation mode is divided into plus 1 pulse and minus 1 pulse mode. The interval register contains the corresponding interval length information. In each interval, a linear compensation method is used. If the compensation position in the interval 0~100 is 10, compensation will be performed once each time the absolute position of the movement is 10. In this embodiment, the N points in the pitch compensation table can be assigned to each axis in any number.

[0054] Table 1: Pitch compensation function enable register

[0055] Bit Logo describe Initial Value 31-4 reserve reserve 0 3 u_screw_compensation_en U-axis pitch compensation function enabled 0 2 z_screw_compensation_en Z-axis pitch compensation function enabled 0 1 y_screw_compensation_en Y-axis pitch compensation function enabled 0 0 x_screw_compensation_en X-axis pitch compensation function enabled 0

[0056] Table 2: Pitch compensation parameter register

[0057] Bit Logo describe Initial Value 31-27 reserve reserve reserve 26:25 screw_axis Axis selection 00: x-axis 01: y-axis 10: z-axis 11: u-axis 0 24 screw_mode Compensation mode selection 0: add 1 pulse 1: subtract 1 pulse 23-0 screw_position Pitch compensation position 0

[0058] Table 3: Pitch compensation interval register

[0059] Bit Logo describe Initial Value 31-24 reserve reserve reserve 23-0 screw_segment Pitch compensation interval value (if the first interval value of a certain axis is configured, it represents the interval from 0 to this value; if the second interval value of the axis is configured, it represents the interval from the previous value to the current configuration value) 0

[0060] Table 4: Backlash compensation enable

[0061] Bit Logo describe Initial Value 31-4 reserve reserve 0 3 u_backlash_comp_en U axis reverse clearance compensation enable 0 2 z_backlash_comp_en Z axis backlash compensation enable 0 1 y_backlash_comp_en Y-axis backlash compensation enable 0 0 x_backlash_comp_en X-axis backlash compensation enable 0

[0062] Table 5: X-axis backlash compensation pulse number

[0063] Bit Logo describe Initial Value 31-24 reserve reserve 0 23-0 x_backlash_num X-axis reverse gap compensation pulse number 0

[0064] Table 6: Y-axis backlash compensation pulse number

[0065] Bit Logo describe Initial Value 31-24 reserve reserve 0 23-0 y_backlash_num Y-axis reverse gap compensation pulse number 0

[0066] Table 7: Z-axis backlash compensation pulse number

[0067] Bit Logo describe Initial Value 31-24 reserve reserve 0 23-0 z_backlash_num Z-axis reverse gap compensation pulse number 0

[0068] Table 8: U-axis reverse gap compensation pulse number

[0069] Bit Logo describe Initial Value 31-24 reserve reserve 0 23-0 u_backlash_num U-axis reverse clearance compensation pulse number 0

[0070] Tables 1 to 8 are pitch compensation tables of configuration registers corresponding to pitch compensation and backlash compensation during error compensation. According to the pitch compensation table, the compensation value can be integrated into the motion planning of interpolation motion or single-axis motion, pulses can be output indiscriminately, and the pitch compensation table can be flexibly allocated to each axis.

[0071] In one embodiment of the present invention, the logic control coprocessor 20 processes the logic program, and is used to automatically read and process the execution logic control program instructions, which can be machine instructions compiled from programs written in the IEC61131-3 standard language. The logic control coprocessor 20 comes with various logic control algorithms, including function blocks and function functions defined in the IEC61131-3 standard. The logic control coprocessor 20 can also schedule motion control programs in the logic control program. In the process of executing the logic program, the operation results of the logic control coprocessor 20 can be stored in the output mapping area, which can be used to associate the scheduling of the motion control program, and the error compensation selection, so that the error compensation control can be flexibly realized.

[0072] like Figure 4 As shown, the present invention also provides a control method of the system on chip applied to the above-mentioned motion control error compensation, comprising the following steps:

[0073] Step S10: the microprocessor 10 retrieves the corresponding motion control instruction according to the motion control task, and sends the motion control instruction to the motion control coprocessor 30;

[0074] Step S20: scheduling the motion control instructions of the motion control coprocessor 30 in executing the logic control instructions by the logic control coprocessor 20;

[0075] Step S30: parse the motion control instructions in the motion control task through the motion control coprocessor 30 to obtain the corresponding normal motion pulse; perform error compensation monitoring on various interpolation and single-axis motion, and select the corresponding error compensation mode for error compensation according to the monitoring results to obtain the output compensation pulse, and combine it with the normal motion pulse to output the pulse to the driver.

[0076] In summary, the present invention provides a system-on-chip for motion control error compensation, which can realize error compensation in machining projects such as machine tools, and can not only perform accurate error value compensation, but also can unify the compensation value and the normal operation trajectory parameters through the motion control coprocessor 30 to achieve uniform compensation value and smooth speed, and can achieve high-precision and high-speed pulse output, eliminate equipment vibration and impact during the compensation process, and improve system performance and machining quality. At the same time, the present invention can also associate control error compensation through a logic control program, and can adapt to a variety of applications. Therefore, the present invention effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.

[0077] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A system on chip for motion control error compensation, characterized in that: include: Microprocessors, logic control coprocessors, and motion control coprocessors; The microprocessor is used to call the corresponding motion control instruction according to the motion control task, and send the motion control instruction to the motion control coprocessor; The logic control coprocessor is used to schedule the motion control instructions of the motion control coprocessor in executing the logic control instructions; The motion control coprocessor is used to analyze the motion control instructions in the motion control task to obtain the corresponding normal motion pulse; perform error compensation monitoring on various interpolation and single-axis motion, and select the corresponding error compensation mode to perform error compensation according to the monitoring result, obtain the output compensation pulse, and combine it with the normal motion pulse to output the pulse to the driver; The motion control coprocessor comprises: An instruction parsing module, used for parsing the motion control instruction and converting the parsed motion control instruction into a motor control signal as the normal motion pulse; wherein the motor control signal includes a pulse signal and a direction signal; A monitoring module, wherein the monitoring modules are respectively deployed in the interpolation module and the single-axis module, and are used to monitor the interpolation module and the single-axis module respectively, so as to obtain a first monitoring result corresponding to the interpolation module and a second monitoring result corresponding to the single-axis module; and A selection module, configured to select a corresponding error compensation mode through a register to perform error compensation according to the first monitoring result and the second monitoring result, obtain an output compensation pulse, and output a pulse to the driver in combination with the normal motion pulse; The selection module comprises: A calculation module, used for selecting motion control algorithms corresponding to the interpolation module and the single-axis module respectively to perform error compensation according to the first monitoring result and the second monitoring result, so as to obtain the output compensation pulse; wherein the motion control algorithm includes an interpolation algorithm, an acceleration / deceleration algorithm and an error compensation algorithm; A combining module, used for performing a unified planning operation on the normal motion pulse and the output compensation pulse to obtain an output pulse; and A pulse output module is used to output the output pulse to the driver.

2. The system-on-chip for motion control error compensation according to claim 1, characterized in that: The microprocessor is also used to retrieve the corresponding G code instruction as the first target motion control instruction through the memory according to the first target motion control task, and send the first target motion control instruction to the motion control coprocessor.

3. The system-on-chip for motion control error compensation according to claim 1, characterized in that: The microprocessor is also used for taking the motion control function block program based on the PLCopen standard as the second target motion control instruction according to the second target motion control task, and sending the second target motion control instruction to the motion control coprocessor.

4. The system-on-chip for motion control error compensation according to claim 1, characterized in that: The error compensation modes include: bypassing the error compensation function, performing all types of error compensation, and performing partial types of error compensation.

5. The system-on-chip for motion control error compensation according to claim 1, characterized in that: The operation module comprises: A first compensation module is used for adding a compensated pulse to the reversed motion when detecting that the motion corresponding to the normal motion pulse is reversed, so as to obtain a compensated total pulse as a first target output compensation pulse; and The second compensation module is used to perform linear compensation according to the pitch compensation table to obtain a second target output compensation pulse.

6. The system-on-chip for motion control error compensation according to claim 5, characterized in that: The first compensation module comprises: A linear interpolation module is used to determine whether the direction in which the first target axis participating in the linear interpolation needs to move is consistent with the previous movement direction of the first target axis when the interpolation mode is detected to be linear interpolation, and if not, to compensate the first target axis once, and if consistent, not to compensate; The circular interpolation module is used for, when it is detected that the interpolation mode is circular interpolation, before a single circular interpolation starts, determining whether the direction in which the second target axis participating in the circular interpolation needs to move is consistent with the direction of movement of the second target axis last time, if not, performing compensation on the second target axis, if consistent, not performing compensation; before a single circular interpolation starts, monitoring the circular interpolation path, and when the circular interpolation path exceeds 1 / 4 circle, performing compensation on the second target axis; A spiral interpolation module is used for, when it is detected that the interpolation mode is spiral interpolation, which is a combination of linear interpolation and circular interpolation, to determine whether the movement direction of the third target axis involved in the interpolation is consistent with the movement direction of the third target axis last time before the interpolation starts, if not, to compensate the third target axis once, if consistent, no compensation; and The single-axis motion module is used to monitor the movement direction of each axis at the beginning of the movement when forward or reverse single-axis movement is detected. When the current movement direction is opposite to the previous movement direction of the axis, compensation is performed. When the current movement direction is the same as the previous movement direction of the axis, no compensation is performed.

7. The system-on-chip for motion control error compensation according to claim 5, characterized in that: The second compensation module comprises: A compensation control module, used to enable a pitch compensation function for a specific axis; wherein the specific axis includes a plurality of pitch compensation points, each of which is configured with a pitch compensation parameter register and a pitch compensation interval register; A pulse recording module, used to record in real time the pulse information emitted by each pitch compensation point of the specific axis after the pitch compensation function is turned on; and The pitch compensation module is used to perform a pitch compensation according to the pulse information when the specific axis reaches a specified position of movement within a specified interval.

8. A control method for a system on chip for motion control error compensation according to any one of claims 1 to 7, characterized in that: The steps include: The microprocessor retrieves corresponding motion control instructions according to the motion control task, and sends the motion control instructions to the motion control coprocessor; Scheduling the motion control instructions of the motion control coprocessor in executing the logic control instructions by the logic control coprocessor; The motion control instructions in the motion control task are parsed by the motion control coprocessor to obtain the corresponding normal motion pulses; error compensation monitoring is performed on various types of interpolation and single-axis motion, and the corresponding error compensation mode is selected according to the monitoring results to perform error compensation, and output compensation pulses are obtained, and combined with the normal motion pulses, pulse output to the driver is performed.

Citation Information

Patent Citations

  • Continuous compensating method of displacement precision of digital controlled shaft of digital controlled machine tool

    CN101564819A

  • Error compensation method and device for machine tool, processor and electronic device

    CN111665786A