CN111381555A - Multi-axis motion control method and multi-axis motion equipment - Google Patents

Multi-axis motion control method and multi-axis motion equipment Download PDF

Info

Publication number
CN111381555A
CN111381555A CN201811620736.3A CN201811620736A CN111381555A CN 111381555 A CN111381555 A CN 111381555A CN 201811620736 A CN201811620736 A CN 201811620736A CN 111381555 A CN111381555 A CN 111381555A
Authority
CN
China
Prior art keywords
motion
axis
processor
control
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811620736.3A
Other languages
Chinese (zh)
Other versions
CN111381555B (en
Inventor
刘庆福
刘伟
单丽
刘江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongjing Microelectronics Technology Co.,Ltd.
Original Assignee
Hefei Macrosilicon Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Macrosilicon Technology Co ltd filed Critical Hefei Macrosilicon Technology Co ltd
Priority to CN201811620736.3A priority Critical patent/CN111381555B/en
Publication of CN111381555A publication Critical patent/CN111381555A/en
Application granted granted Critical
Publication of CN111381555B publication Critical patent/CN111381555B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/404Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by control arrangements for compensation, e.g. for backlash, overshoot, tool offset, tool wear, temperature, machine construction errors, load, inertia
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/32Operator till task planning
    • G05B2219/32105Calculate machining axis, best feasible orientation for machining

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

The embodiment of the application provides a multi-axis motion control method and equipment, which are used for obtaining a control instruction of target motion axis motion of the multi-axis motion equipment; controlling the first processor to carry out instruction look-ahead on the control instruction; and controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead. Therefore, the control instruction is subjected to instruction foresight through the first processor in the equipment, and then the second processor controls the target motion axis to execute the motion state instruction obtained by the instruction foresight, so that the control instruction can be subjected to step-by-step processing and control in a modularized mode, multi-axis linkage control is quickly and efficiently realized, a low-cost, high-efficiency and high-precision solution is provided for multi-axis motion automation, modular control can be realized, the expansion is easy, and the realization of high-efficiency communication and the real-time performance are facilitated.

Description

Multi-axis motion control method and multi-axis motion equipment
Technical Field
The application relates to the technical field of numerical control, in particular to a multi-axis motion control method and multi-axis motion equipment.
Background
With the continuous development of scientific technology, in the existing manufacturing industry, numerical control technology becomes indispensable technology in modern industrial production and industrial technology, such as in the industrial production of precision part processing equipment of electronics, aviation, automobiles and the like, and in the industrial control of robot motion and the like.
In the conventional numerical control system, the interpolation calculation of the G command is performed by calculating the pulse quantity and speed of each axis through software analysis by a processor, and then generating a pulse signal to each axis controller through a timer by the processor directly. However, since the pulse calculation and output in the numerical control system are completed by using an interrupt service program, the interrupt time is longer and longer as the number of axes of the moving axes in the equipment is increased, so that the increase of the number of axes and the improvement of the pulse output frequency are limited, and the high-speed parallel processing cannot be realized.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for controlling multi-axis motion, which can quickly and efficiently implement multi-axis linkage control, and provide a solution with low cost, high efficiency, and high precision for multi-axis motion automation.
In one aspect, an embodiment of the present application provides an on-vehicle multi-axis motion control method, which is applied to a multi-axis motion device including a first processor and at least one second processor, and includes:
acquiring a control instruction of target motion axis motion of the multi-axis motion equipment;
controlling the first processor to carry out instruction look-ahead on the control instruction;
and controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead.
Further, the controlling the first processor to perform an instruction look-ahead on the control instruction includes:
controlling the first processor to analyze the control instruction;
splitting the control instruction based on the result of analyzing the control instruction;
and determining a plurality of motion state instructions for controlling the motion of the target motion axis based on the split result of the control instruction.
Further, the motion state command includes at least one of a motion direction, a motion distance, an entrance velocity, an acceleration, a target velocity, a removal acceleration distance, a deceleration distance, and a motion pattern.
Further, after the controlling the first processor to make an instruction look-ahead of the control instruction, the method comprises:
storing a plurality of motion state instructions obtained after instruction look-ahead into a target cache region, wherein the motion state instructions stored into the target cache region preferentially read;
controlling the second processor to read the plurality of motion state instructions.
Further, the controlling, by the second processor, the motion of the target motion axis based on the plurality of motion state commands obtained by command look-ahead includes:
identifying, by the second processor, the plurality of motion state instructions;
generating a pulse control command corresponding to each motion state command based on the plurality of motion state commands;
sending, by the second processor, a plurality of pulsed control command controls to the target axis of motion;
and controlling the target motion axis to move according to the plurality of pulse control instructions.
Further, after the controlling, by the second processor, the movement of the target movement axis based on the stored plurality of movement state instructions, the method includes:
detecting a motion deviation of the target motion axis;
determining whether the motion deviation is within a preset deviation threshold;
and if the motion deviation is within the preset deviation threshold value, compensating the motion of the target motion axis based on the motion deviation.
Further, after the determining whether the motion deviation is within a preset deviation threshold, the method includes:
if the motion deviation exceeds the preset deviation threshold value, controlling the second processor to interrupt the acquisition of the motion state instructions;
detecting motion information of the target motion axis and sending the motion information to the first processor;
and controlling the first processor to carry out command look-ahead of control commands again on the target motion axis based on the motion information.
In another aspect, an embodiment of the present application further provides a multi-axis motion control apparatus, which includes a first processor and at least one second processor, and includes:
the acquisition module is used for acquiring a control instruction of the movement of a target movement axis of the multi-axis movement equipment;
the first control module is used for controlling the first processor to carry out instruction foresight on the control instruction;
and the second control module is used for controlling the movement of the target movement axis through the second processor based on a plurality of movement state instructions obtained by instruction foresight.
Further, the first control module is specifically configured to:
controlling the first processor to analyze the control instruction;
splitting the control instruction based on the result of analyzing the control instruction;
and determining a plurality of motion state instructions for controlling the motion of the target motion axis based on the split result of the control instruction.
Further, the motion state command includes at least one of a motion direction, a motion distance, an entrance velocity, an acceleration, a target velocity, a removal acceleration distance, a deceleration distance, and a motion pattern.
Further, the multi-axis motion control apparatus includes:
the storage module is used for storing a plurality of motion state instructions obtained after instruction look-ahead into a target cache region, wherein the motion state instructions stored into the target cache region preferentially read;
and the reading module is used for controlling the second processor to read the plurality of motion state instructions.
Further, the second control module is specifically configured to:
identifying, by the second processor, the plurality of motion state instructions;
generating a pulse control command corresponding to each motion state command based on the plurality of motion state commands;
sending, by the second processor, a plurality of pulsed control command controls to the target axis of motion;
and controlling the target motion axis to move according to the plurality of pulse control instructions.
Further, the multi-axis motion control apparatus includes:
the first detection module is used for detecting the motion deviation of the target motion axis;
a determining module for determining whether the motion deviation is within a preset deviation threshold;
and the compensation module is used for compensating the motion of the target motion axis based on the motion deviation if the motion deviation is within the preset deviation threshold value.
Further, the multi-axis motion control apparatus further includes:
the third control module is used for controlling the second processor to interrupt the acquisition of the plurality of motion state instructions if the motion deviation exceeds the preset deviation threshold;
the second detection module is used for detecting the motion information of the target motion axis and sending the motion information to the first processor;
and the fourth control module is used for controlling the first processor to carry out command look-ahead of a control command on the target motion axis based on the motion information.
On the other hand, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine readable instructions when executed by the processor performing the steps of the multi-axis motion control method as described above.
On the other hand, the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the multi-axis motion control method as described above.
According to the multi-axis motion control method and device, the control instruction of the motion of the target motion axis of the multi-axis motion device is obtained; controlling the first processor to carry out instruction look-ahead on the control instruction; and controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead. Therefore, the control instruction is subjected to instruction foresight through the first processor in the equipment, and then the second processor controls the target motion axis to execute the motion state instruction obtained by the instruction foresight, so that the control instruction can be subjected to step-by-step processing and control in a modularized mode, multi-axis linkage control is quickly and efficiently realized, a low-cost, high-efficiency and high-precision solution is provided for multi-axis motion automation, modular control can be realized, the expansion is easy, and the realization of high-efficiency communication and the real-time performance are facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a multi-axis motion control method according to an embodiment of the present application;
FIG. 2 is a flow chart of a multi-axis motion control method according to another embodiment of the present application;
FIG. 3 is a graph of the speed between two data blocks;
FIG. 4 is a diagram illustrating an accelerated split state in G code splitting;
FIG. 5 is a diagram illustrating a uniform speed splitting status in G code splitting;
FIG. 6 is a diagram of a deceleration split state in G code splitting;
FIG. 7 is a diagram of a preferential slowdown split state in G code splitting;
FIG. 8 is a block diagram of a multi-axis motion control device according to an embodiment of the present disclosure;
fig. 9 is a second block diagram of a multi-axis motion control apparatus according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a multi-axis motion control method according to an embodiment of the present disclosure. The method is applied to a multi-axis motion device comprising at least a first processor and a second processor. As shown in fig. 1, the method comprises:
step 101, obtaining a control instruction of the movement of a target movement axis of the multi-axis movement equipment.
In this step, when the multi-axis motion device needs to move through the motion axis on the multi-axis motion device to process parts, such as processing machine tools and the like, or the multi-axis motion device needs to move through the motion axis on the multi-axis motion device to realize, such as a robot and the like, the control instruction of the target motion axis motion of the multi-axis motion device can be obtained first.
Wherein the target motion axis is any one of a plurality of motion axes on the multi-axis motion device.
The control instruction may refer to a G instruction or a G code in a numerical control program, and the G instruction or the G code may be used to implement procedures such as fast positioning, inverse circle interpolation, forward circle interpolation, middle point arc interpolation, radius programming, skip machining, and the like.
The control instruction may be acquired by receiving, by the multi-axis motion device, an operation instruction input by a user in real time, determining a control instruction corresponding to the operation instruction, and then sending the determined control instruction to the first processor for execution, or may be acquired by storing, in advance, a program instruction for controlling an operation of the multi-axis motion device in the multi-axis motion device, and acquiring, by the first processor, the corresponding control instruction from the program instruction stored in advance when the multi-axis motion device is executed.
And 102, controlling the first processor to carry out instruction look-ahead on the control instruction.
In this step, after the multi-axis motion device acquires the control instruction, the control instruction may be identified and planned, etc. to determine how to control the target motion axis to move, specifically, the first processor may be controlled to identify the control instruction by using an identification and look-ahead algorithm, and then perform instruction look-ahead on the control instruction, thereby implementing analysis on the control instruction.
The first processor may be a microprocessor such as an ARM processor.
The instruction look-ahead of the control instruction may refer to analysis of G codes and speed look-ahead, where the speed look-ahead has a main function of calculating each G code and splitting each G code into different data blocks, each data block is an independent unit and stores motion data of a current line of G codes, such as a motion direction (dir), a motion distance (L), an entry speed (Vi), an acceleration (a), a target speed (Vm), an acceleration-removal distance (accele _ except), a deceleration distance (decele _ only), and a motion Mode (Mode) of a 1 st data block of the line of G codes.
Therefore, the ARM processor only realizes partial functions, pulse and input/output control related to hardware are realized by the FPGA, after the processor finishes the prospective control of the G code, the FPGA automatically carries out acceleration and deceleration planning according to the analysis of the current state, and then outputs corresponding pulse to each axis driver according to the planned speed curve and the interpolation algorithm, so that the motion control of the motion axis in the multi-axis motion equipment is realized. In addition, the scheme uses the functional block processing and can realize the expansion of the FPGA through the FIFO interface, thereby avoiding the problem that the data processing cannot be processed or the processing is slow because the number of the motion axes of the multi-axis motion equipment is too large.
According to the multi-axis motion control method provided by the embodiment of the application, a control instruction of the motion of a target motion axis of multi-axis motion equipment is obtained; controlling the first processor to carry out instruction look-ahead on the control instruction; and controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead. Therefore, the control instruction is subjected to instruction foresight through the first processor in the equipment, and then the second processor controls the target motion axis to execute the motion state instruction obtained by the instruction foresight, so that the control instruction can be subjected to step-by-step processing and control in a modularized mode, multi-axis linkage control is quickly and efficiently realized, a low-cost, high-efficiency and high-precision solution is provided for multi-axis motion automation, modular control can be realized, the expansion is easy, and the realization of high-efficiency communication and the real-time performance are facilitated.
Referring to fig. 2, fig. 2 is a flowchart of a multi-axis motion control method according to another embodiment of the present application. The method is applied to a multi-axis motion device comprising at least a first processor and a second processor. As shown in fig. 2, the method includes:
step 201, obtaining a control instruction of the movement of a target movement axis of the multi-axis movement equipment.
Step 202, controlling the first processor to perform instruction look-ahead on the control instruction.
And 203, controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead.
And step 204, detecting the motion deviation of the target motion axis.
In this step, when the second processor controls the target motion axis to move according to the motion state instructions, the motion condition of the target motion axis may be detected in real time to detect whether the target motion axis moves according to the motion information corresponding to the motion state instructions or whether a large motion deviation occurs.
Wherein the detecting of the motion deviation may be detecting a motion state of the target motion axis by the second processor, thereby determining the motion deviation.
Step 205, determining whether the motion deviation is within a preset deviation threshold value.
In this step, after detecting that the motion deviation occurs to the target motion axis, the motion deviation of the threo search axis may be compared with a preset deviation threshold to see whether the motion deviation of the target motion axis is too large, so as to determine whether the target motion axis needs to be corrected.
The preset deviation threshold may be set according to the motion accuracy of the multi-axis motion device or the processing progress of the component.
And step 206, if the motion deviation is within the preset deviation threshold, compensating the motion of the target motion axis based on the motion deviation.
In this step, if it is determined that the motion deviation is within the preset deviation threshold, it is considered that the motion deviation of the target motion axis is not large, and is within an acceptable range, and it may be that the target motion axis returns to the motion state corresponding to the plurality of motion state commands through motion compensation, at this time, the motion of the target motion axis may be compensated according to the detected motion deviation and in combination with the motion state that the target motion axis corresponding to the plurality of motion state commands should originally be in, so as to correct the motion deviation.
The descriptions of step 201 to step 203 may refer to the descriptions of step 101 to step 103, and the same technical effects may be achieved, which are not described again.
Optionally, after step 206, the method includes:
if the motion deviation exceeds the preset deviation threshold value, controlling the second processor to interrupt the acquisition of the motion state instructions; detecting motion information of the target motion axis and sending the motion information to the first processor; and controlling the first processor to carry out command look-ahead of control commands again on the target motion axis based on the motion information.
In this step, if it is determined that the motion deviation exceeds the preset deviation threshold, it is determined that the motion deviation generated by the target motion axis is large and the multi-axis motion device cannot continue to move, the multi-axis motion device may control the second processor to terminate the acquisition of the plurality of motion state instructions, so as to control the target motion axis to stop moving, may detect an actual motion situation of the target motion axis, to determine actual motion information of the target motion axis, and then send the motion information to the first processor, and may control the first processor to look ahead the target motion axis with an instruction of a control instruction again by combining the motion information and the newly acquired control instruction of the target motion axis.
Specifically, in one embodiment, the number of pulse signals of the target motion axis may be detected in real time, and when the difference between the pulse sent by the target motion axis and the encoder fed back is within a permissible range, the FPGA may automatically compensate several pulses again to perform motion compensation on the target motion axis; when the difference value between the two is too large, the FPGA generates interruption and informs the ARM processor that the motor moves away at present; if the data are equal, the FPGA directly exits, and the pulse FIFO continues to be read until the data processing is finished.
Optionally, step 202 includes:
controlling the first processor to analyze the control instruction; splitting the control instruction based on the result of analyzing the control instruction; and determining a plurality of motion state instructions for controlling the motion of the target motion axis based on the split result of the control instruction.
In this step, after the multi-axis motion device obtains the control instruction, the first processor may be controlled to analyze the control instruction to identify the control instruction, so as to determine which indication is provided for the motion information of the target motion axis in the control instruction, and then, according to a result of analyzing the control instruction, the control instruction may be split according to different motion states or motion modes, so as to obtain different motion state instructions corresponding to different split results, and further determine a plurality of motion state instructions for controlling the motion of the target motion axis.
The splitting processing of the control instruction may be performed by the first processor itself, or may be performed by a speed curve state machine module in the multi-axis motion device controlled by the first processor. For example, if the G code is split, the speed curve state machine module may plan the current line of G code into different curve forms of 7, that is, only uniform speed, deceleration after uniform speed, only acceleration, uniform speed after acceleration, deceleration after acceleration, uniform speed again after acceleration, and only deceleration motion.
In an embodiment, the process of splitting the G code may be a fixed unit time (time _ loop) motion, and the speed of the target motion axis at the next time and the motion distance of the target motion axis at this time are obtained according to the acceleration, the distance and the current speed, and the motion state of the target motion axis at the next time is obtained according to the relationship between the remaining distance and the distance that is only decelerated, and if the motion distance is less than the minimum step set by the apparatus, the motion may be circulated by adding one unit time. As shown in fig. 3, fig. 3 is a diagram of the velocity between two data blocks, taking a velocity look-ahead calculation as an example, the velocity look-ahead calculation proactively calculates the data block entry velocity of the optimal velocity plan without calculating the data block internal velocity. When the speeds in two data blocks are connected, the exit speed of the previous data block is the entrance speed of the next data block, so the exit speed does not need to be calculated.
For example, in this embodiment, when splitting the G code, the G code may be split into four split states, namely an acceleration split state, a deceleration split state, a uniform speed split state, and a preferential deceleration split state according to a "motion pattern of the 1 st data block of the G code".
Referring to fig. 4, fig. 4 is a schematic diagram of an acceleration split state in G code splitting, and for the acceleration split state (acceleration a, distance L, only deceleration distance decele _ only, distance except acceleration acele _ except, current speed present _ speed, and remaining distance mm _ rest), there are three conditions during motion of the acceleration state, that is, only acceleration, uniform speed after acceleration, and deceleration after acceleration. The method can be specifically used for splitting through the following steps:
first, according to the fixed time interval time _ loop of the acceleration motion, the remaining distance mm _ rest ═ L- (present _ speed +0.5 a ═ time _ loop) is calculated.
And then judging the size of the remaining distance mm _ rest and the distance accele _ except for acceleration, if mm _ rest > accele _ except, accelerating the motion at the interval of time _ loop all the time, otherwise, judging the size of the remaining distance and the deceleration distance decele _ only.
And if the residual distance mm _ rest is equal to the deceleration distance decele _ only, entering a deceleration state, otherwise, entering a constant speed state.
If the state of the split state machine of the multi-axis motion equipment enters a deceleration state, the state of the split state machine of the multi-axis motion equipment can be controlled to be a deceleration state; and if the multi-axis motion equipment enters the constant speed state, controlling the state of the splitting state machine of the multi-axis motion equipment to be in the constant speed state.
Referring to fig. 5, fig. 5 is a schematic diagram of a uniform speed splitting state in G code splitting, and for the uniform speed splitting state (target speed Vm, deceleration distance decele _ only, distance L, and remaining distance mm _ rest), the splitting may be specifically performed through the following steps:
firstly, moving according to a fixed time interval time _ loop of uniform motion, and calculating a residual distance mm _ rest ═ L-time _ loop Vm.
And then judging the sizes of the residual distance mm _ rest and the deceleration distance decele _ only, if the mm _ rest is less than the decele _ only, starting to enter a deceleration state, and otherwise, constantly moving at a constant speed at the interval of time _ loop.
If the state of the split state machine of the multi-axis motion device enters the deceleration state, the state of the split state machine of the multi-axis motion device can be controlled to be the deceleration state.
Referring to fig. 6, fig. 6 is a schematic diagram of a deceleration splitting state in G code splitting, and for the deceleration splitting state (current speed _ speed, acceleration a, and remaining distance mm _ rest), the splitting may be specifically performed through the following steps:
first, the device moves at a fixed time interval time _ loop according to the deceleration motion, and calculates the remaining distance mm _ rest, mm _ rest _ time _ loop (present _ speed-0.5 a _ time _ loop).
Then the current speed present _ speed can be compared with a time loop, if present _ speed > a time loop, the speed is reduced at the interval of time loop, otherwise, the speed is reduced forcibly when the speed is moved to the end of the data block.
Referring to fig. 7, fig. 7 is a schematic diagram of a preferential deceleration splitting state in G code splitting, and for the preferential deceleration splitting state (the maximum speed is max _ speed, i.e., the target speed, the deceleration distance decel _ only, the current speed present _ speed, and the acceleration a), there are two cases: the deceleration state and the uniform speed state are prioritized. The method can be specifically used for splitting through the following steps:
the preferential deceleration motion can be a motion in a fixed time interval time _ loop, the difference value of present _ speed-max _ speed is compared with the size of a time _ loop, if the difference value is larger than the a time _ loop, the preferential deceleration motion is always performed in the interval of the time _ loop, otherwise, the preferential deceleration motion is performed to the last time _ loop, and the uniform speed state is achieved.
And if the multi-axis motion equipment enters the constant speed state, controlling the state of the splitting state machine of the multi-axis motion equipment to be in the constant speed state.
In one embodiment, specifically, (1) performing a velocity look-ahead calculation by an ARM, calculating a motion direction (dir), a motion distance (L), an entry velocity (Vi), an acceleration (a), a target velocity (Vm), an acceleration-removal distance (accele _ except), a deceleration distance (decele _ only), and a motion Mode (Mode) of a 1 st data block of the line G code in the multi-axis motion device, and storing corresponding data into a data block structure; (2) judging whether the block data is empty or not, and if the block data is empty, ending the movement; otherwise, the movement is continued, and one block data is read from the block data structure; (3) controlling a splitting state machine to split the block data, judging whether the splitting of the block data is finished or not, and if not, storing the motion time _ loop and the motion distance mm _ distance of the split data in a pulse FIFO (first in first out); otherwise, continuously taking out one block data from the block data, and circulating (3) until the block data is empty, and ending the movement; (4)
the FPGA takes pulse FIFO data and adopts DDA algorithm to transmit pulses. And circulating the processes of the steps 1 to 4 to realize the closed-loop control of the G code.
Optionally, after step 202, the method includes:
storing a plurality of motion state instructions obtained after instruction look-ahead into a target cache region, wherein the motion state instructions stored into the target cache region preferentially read; controlling the second processor to read the plurality of motion state instructions.
In this step, the first processor performs instruction lookahead on the control instruction, determines a plurality of motion state instructions, may control to store the plurality of motion state instructions obtained after the instruction lookahead into a target cache region, and may control the second processor to read the plurality of motion state instructions from the target cache region.
And preferentially reading the motion state instruction preferentially stored in the target cache region. Preferably, the storage mode used by the target cache region is FIFO storage, the FIFO storage is a first-in first-out buffer region and is built by a DPRAM in an FPGA, the function of the memory is similar to that of a chip IDT7203, and the memory is an asynchronous communication mechanism. I.e., the speed of writing to the FIFO, may not coincide with the speed of reading. Therefore, the invention ensures the continuity of the writing G code of the processor and the continuous stable output of the pulse.
Optionally, step 203 includes:
identifying, by the second processor, the plurality of motion state instructions; generating a pulse control command corresponding to each motion state command based on the plurality of motion state commands; sending, by the second processor, a plurality of pulsed control command controls to the target axis of motion; and controlling the target motion axis to move according to the plurality of pulse control instructions.
In this step, after the first processor performs instruction lookahead on the control instruction to obtain a plurality of motion state instructions, the second processor may be controlled to read the plurality of motion state instructions, identify the plurality of motion state instructions to identify motion information and the like that the target motion axis needs to be controlled to move, generate a pulse control instruction corresponding to each motion state instruction, and control and send the plurality of pulse control instructions to the target motion axis through the second processor, so as to control the target motion axis to move according to the plurality of pulse control instructions.
According to the multi-axis motion control method provided by the embodiment of the application, a control instruction of the motion of a target motion axis of multi-axis motion equipment is obtained; controlling the first processor to carry out instruction look-ahead on the control instruction; controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead; detecting a motion deviation of the target motion axis; determining whether the motion deviation is within a preset deviation threshold; and if the motion deviation is within the preset deviation threshold value, compensating the motion of the target motion axis based on the motion deviation.
Therefore, the control instruction is subjected to instruction foresight through the first processor in the equipment, and then the second processor controls the target motion axis to execute the motion state instruction obtained by the instruction foresight, so that the control instruction can be subjected to step-by-step processing and control in a modularized mode, multi-axis linkage control is realized quickly and efficiently, a low-cost, high-efficiency and high-precision solution is provided for multi-axis motion automation, modular control can be realized, the expansion is easy, high-efficiency communication and real-time performance are convenient to realize, resources are saved, the time for the processor to split the arc into line segments is reduced, more efficient interpolation is carried out, the real-time motion condition of the target motion axis can be detected through the second processor, motion abnormality is found in time, and interrupt processing is realized.
Referring to fig. 8 and 9, fig. 8 is a first structural diagram of a multi-axis motion control apparatus according to an embodiment of the present application, and fig. 9 is a second structural diagram of the multi-axis motion control apparatus according to the embodiment of the present application. The multi-axis motion control device 800 may implement the steps performed by the multi-axis motion control method described above. The multi-axis motion control device 800 includes a first processor and at least one second processor. As shown in fig. 8, the multi-axis motion control apparatus 800 includes:
and an obtaining module 810, configured to obtain a control instruction of a target movement axis movement of the multi-axis movement device.
The first control module 820 is configured to control the first processor to perform instruction look-ahead on the control instruction.
And a second control module 830, configured to control, by the second processor, the motion of the target motion axis based on a plurality of motion state instructions obtained by instruction look-ahead.
Optionally, the first control module 820 is specifically configured to:
controlling the first processor to analyze the control instruction;
splitting the control instruction based on the result of analyzing the control instruction;
and determining a plurality of motion state instructions for controlling the motion of the target motion axis based on the split result of the control instruction.
Optionally, the motion state instruction includes at least one of a motion direction, a motion distance, an entrance velocity, an acceleration, a target velocity, a removal acceleration distance, a deceleration distance, and a motion pattern.
Alternatively, as shown in fig. 9, the multi-axis motion control apparatus 800 includes:
the storage module 840 is configured to store a plurality of motion state instructions obtained after instruction look-ahead into a target cache region, where the motion state instructions preferentially stored in the target cache region are preferentially read.
A reading module 850, configured to control the second processor to read the plurality of motion state instructions.
Optionally, the second control module 830 is specifically configured to:
identifying, by the second processor, the plurality of motion state instructions;
generating a pulse control command corresponding to each motion state command based on the plurality of motion state commands;
sending, by the second processor, a plurality of pulsed control command controls to the target axis of motion;
and controlling the target motion axis to move according to the plurality of pulse control instructions.
Alternatively, as shown in fig. 9, the multi-axis motion control apparatus 800 includes:
a first detection module 860 for detecting a motion deviation of the target motion axis.
A determining module 870 for determining whether the motion deviation is within a preset deviation threshold.
A compensation module 880, configured to compensate for the motion of the target motion axis based on the motion deviation if the motion deviation is within the preset deviation threshold.
Optionally, as shown in fig. 9, the multi-axis motion control apparatus 800 further includes:
a third control module 801, configured to control the second processor to interrupt acquiring the motion state instructions if the motion deviation exceeds the preset deviation threshold;
a second detection module 802, configured to detect motion information of the target motion axis, and send the motion information to the first processor;
a fourth control module 803, configured to control, based on the motion information, the first processor to perform instruction look-ahead of a control instruction on the target motion axis.
According to the multi-axis motion control equipment provided by the embodiment of the application, a control instruction of the motion of a target motion axis of the multi-axis motion equipment is obtained; controlling the first processor to carry out instruction look-ahead on the control instruction; and controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead.
Therefore, the control instruction is subjected to instruction foresight through the first processor in the equipment, and then the second processor controls the target motion axis to execute the motion state instruction obtained by the instruction foresight, so that the control instruction can be subjected to step-by-step processing and control in a modularized mode, multi-axis linkage control is quickly and efficiently realized, a low-cost, high-efficiency and high-precision solution is provided for multi-axis motion automation, modular control can be realized, the expansion is easy, and the realization of high-efficiency communication and the real-time performance are facilitated.
An embodiment of the present application further provides an electronic device, which includes: the processor and the memory communicate with each other through the bus when the electronic device runs, and the machine-readable instructions are executed by the processor to perform the steps of the multi-axis motion control method in the method embodiments shown in fig. 2 and fig. 3, which can achieve the same technical effects.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the multi-axis motion control method in the method embodiments shown in fig. 2 and fig. 3 may be executed, and the same technical effect may be achieved.
The modules may be connected or in communication with each other via a wired or wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may comprise a connection over a LAN, WAN, bluetooth, ZigBee, NFC, or the like, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. A multi-axis motion control method applied to a multi-axis motion device including a first processor and at least one second processor, the method comprising:
acquiring a control instruction of target motion axis motion of the multi-axis motion equipment;
controlling the first processor to carry out instruction look-ahead on the control instruction;
and controlling the target motion axis to move through the second processor based on a plurality of motion state instructions obtained by instruction look-ahead.
2. The method of claim 1, wherein the controlling the first processor to perform an instruction look-ahead on the control instruction comprises:
controlling the first processor to analyze the control instruction;
splitting the control instruction based on the result of analyzing the control instruction;
and determining a plurality of motion state instructions for controlling the motion of the target motion axis based on the split result of the control instruction.
3. The method of claim 1, wherein the motion state command comprises at least one of a direction of motion, a distance of motion, an entry velocity, an acceleration, a target velocity, a removal acceleration distance, a deceleration distance, and a motion pattern.
4. The method of claim 1, wherein after controlling the first processor to perform an instruction look-ahead on the control instruction, the method comprises:
storing a plurality of motion state instructions obtained after instruction look-ahead into a target cache region, wherein the motion state instructions stored into the target cache region preferentially read;
controlling the second processor to read the plurality of motion state instructions.
5. The method of claim 1, wherein the controlling, by the second processor, the target motional axis motion based on a plurality of motion state instructions by instruction look-ahead comprises:
identifying, by the second processor, the plurality of motion state instructions;
generating a pulse control command corresponding to each motion state command based on the plurality of motion state commands;
sending, by the second processor, a plurality of pulsed control command controls to the target axis of motion;
and controlling the target motion axis to move according to the plurality of pulse control instructions.
6. The method of claim 1, wherein after the controlling, by the second processor, the target motional axis motion based on the stored plurality of motion state instructions, the method comprises:
detecting a motion deviation of the target motion axis;
determining whether the motion deviation is within a preset deviation threshold;
and if the motion deviation is within the preset deviation threshold value, compensating the motion of the target motion axis based on the motion deviation.
7. The method of claim 6, wherein after said determining whether the motion deviation is within a preset deviation threshold, the method comprises:
if the motion deviation exceeds the preset deviation threshold value, controlling the second processor to interrupt the acquisition of the motion state instructions;
detecting motion information of the target motion axis and sending the motion information to the first processor;
and controlling the first processor to carry out command look-ahead of control commands again on the target motion axis based on the motion information.
8. A multi-axis motion control apparatus comprising a first processor and at least one second processor, the multi-axis motion control apparatus comprising:
the acquisition module is used for acquiring a control instruction of the movement of a target movement axis of the multi-axis movement equipment;
the first control module is used for controlling the first processor to carry out instruction foresight on the control instruction;
and the second control module is used for controlling the movement of the target movement axis through the second processor based on a plurality of movement state instructions obtained by instruction foresight.
9. The multi-axis motion control apparatus of claim 8, wherein the first control module is specifically configured to:
controlling the first processor to analyze the control instruction;
splitting the control instruction based on the result of analyzing the control instruction;
and determining a plurality of motion state instructions for controlling the motion of the target motion axis based on the split result of the control instruction.
10. The multi-axis motion control apparatus of claim 8, wherein the motion state instructions comprise at least one of a direction of motion, a distance of motion, an entry velocity, an acceleration, a target velocity, a removal acceleration distance, a deceleration distance, and a motion pattern.
11. The multi-axis motion control apparatus of claim 8, wherein the multi-axis motion control apparatus comprises:
the storage module is used for storing a plurality of motion state instructions obtained after instruction look-ahead into a target cache region, wherein the motion state instructions stored into the target cache region preferentially read;
and the reading module is used for controlling the second processor to read the plurality of motion state instructions.
12. The multi-axis motion control apparatus of claim 8, wherein the second control module is specifically configured to:
identifying, by the second processor, the plurality of motion state instructions;
generating a pulse control command corresponding to each motion state command based on the plurality of motion state commands;
sending, by the second processor, a plurality of pulsed control command controls to the target axis of motion;
and controlling the target motion axis to move according to the plurality of pulse control instructions.
13. The multi-axis motion control apparatus of claim 8, wherein the multi-axis motion control apparatus comprises:
the first detection module is used for detecting the motion deviation of the target motion axis;
a determining module for determining whether the motion deviation is within a preset deviation threshold;
and the compensation module is used for compensating the motion of the target motion axis based on the motion deviation if the motion deviation is within the preset deviation threshold value.
14. The multi-axis motion control apparatus of claim 13, further comprising:
the third control module is used for controlling the second processor to interrupt the acquisition of the plurality of motion state instructions if the motion deviation exceeds the preset deviation threshold;
the second detection module is used for detecting the motion information of the target motion axis and sending the motion information to the first processor;
and the fourth control module is used for controlling the first processor to carry out command look-ahead of a control command on the target motion axis based on the motion information.
15. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the multi-axis motion control method of any of claims 1 to 7.
16. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, performs the steps of the multi-axis motion control method according to any one of claims 1 to 7.
CN201811620736.3A 2018-12-28 2018-12-28 Multi-axis motion control method and multi-axis motion equipment Active CN111381555B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811620736.3A CN111381555B (en) 2018-12-28 2018-12-28 Multi-axis motion control method and multi-axis motion equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811620736.3A CN111381555B (en) 2018-12-28 2018-12-28 Multi-axis motion control method and multi-axis motion equipment

Publications (2)

Publication Number Publication Date
CN111381555A true CN111381555A (en) 2020-07-07
CN111381555B CN111381555B (en) 2021-08-03

Family

ID=71219191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811620736.3A Active CN111381555B (en) 2018-12-28 2018-12-28 Multi-axis motion control method and multi-axis motion equipment

Country Status (1)

Country Link
CN (1) CN111381555B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897291A (en) * 2020-07-08 2020-11-06 浙江大华技术股份有限公司 Multi-axis linkage control method and device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744353A (en) * 2012-10-24 2014-04-23 常州铭赛机器人科技有限公司 Motion control system and motion control method
CN105045210A (en) * 2015-07-13 2015-11-11 苏州谷夫道自动化科技有限公司 Smooth interpolation method for CNC (Computer Numerical Control) equipment self-adaptive control chord error
CN105892412A (en) * 2014-12-15 2016-08-24 广西大学 Multi-axis motion control hardware configuration based on custom bus
CN106970561A (en) * 2017-04-11 2017-07-21 周清睿 Kinetic control system
CN107132814A (en) * 2017-02-24 2017-09-05 上海交通大学 Digital control system in open type based on machine vision condition monitoring and error compensation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744353A (en) * 2012-10-24 2014-04-23 常州铭赛机器人科技有限公司 Motion control system and motion control method
CN105892412A (en) * 2014-12-15 2016-08-24 广西大学 Multi-axis motion control hardware configuration based on custom bus
CN105045210A (en) * 2015-07-13 2015-11-11 苏州谷夫道自动化科技有限公司 Smooth interpolation method for CNC (Computer Numerical Control) equipment self-adaptive control chord error
CN107132814A (en) * 2017-02-24 2017-09-05 上海交通大学 Digital control system in open type based on machine vision condition monitoring and error compensation
CN106970561A (en) * 2017-04-11 2017-07-21 周清睿 Kinetic control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897291A (en) * 2020-07-08 2020-11-06 浙江大华技术股份有限公司 Multi-axis linkage control method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN111381555B (en) 2021-08-03

Similar Documents

Publication Publication Date Title
JP4221016B2 (en) Numerical control device for interference check
CN107850887B (en) S-shaped curve planning method and device and numerical control machine tool
US9400496B2 (en) Numerical controller with inter-path waiting function
US7689300B2 (en) Numerical control unit
US20200086486A1 (en) Method and apparatus for collision-free motion planning of a manipulator
CN102375431B (en) Tool path display apparatus with deceleration factor identification means for machine tool
JP5339999B2 (en) Numerical control device having interference check function
CN107710084B (en) Machining path planning method, machining path planning device and numerical control machine tool
JP2010092161A (en) Collision preventing device incorporated in numerical control apparatus
US20080125874A1 (en) Numerical control system
JP6346206B2 (en) Numerical control device having block time display means
CN111381555B (en) Multi-axis motion control method and multi-axis motion equipment
CN105094048A (en) Numerical controller of laser beam machine
CN109874403B (en) Numerical control device
CN110355753B (en) Robot control device, robot control method, and storage medium
CN105320075A (en) Numerical controller having function of controlling speed by superimposed control
JP5573664B2 (en) Numerical control apparatus, movement control method, movement control program, and storage medium
CN110644128A (en) Glove machine head control method, device and equipment and storage medium
US20190217469A1 (en) Robot controller
CN113858213B (en) Robot dynamic track planning method for target synchronization
KR101378668B1 (en) Computerized numerical control machine tool apparatus and controller thereof
CN111185801A (en) Numerical controller
CN112558551A (en) Numerical controller
JP4982170B2 (en) Machining control device and machining control program
CN111699078A (en) Operation of the robot

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 230088 north, 9th floor, B1 building, animation base, 800 Wangjiang West Road, high tech Zone, Hefei City, Anhui Province

Patentee after: Hongjing Microelectronics Technology Co.,Ltd.

Address before: 230088 north, 9th floor, B1 building, animation base, 800 Wangjiang West Road, high tech Zone, Hefei City, Anhui Province

Patentee before: HEFEI MACROSILICON TECHNOLOGY CO.,LTD.

CP01 Change in the name or title of a patent holder
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200707

Assignee: Anhui Xingtai Financial Leasing Co.,Ltd.

Assignor: Hongjing Microelectronics Technology Co.,Ltd.

Contract record no.: X2022980005647

Denomination of invention: A multi axis motion control method and multi axis motion equipment

Granted publication date: 20210803

License type: Exclusive License

Record date: 20220517

EE01 Entry into force of recordation of patent licensing contract
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A multi axis motion control method and multi axis motion equipment

Effective date of registration: 20220519

Granted publication date: 20210803

Pledgee: Anhui Xingtai Financial Leasing Co.,Ltd.

Pledgor: Hongjing Microelectronics Technology Co.,Ltd.

Registration number: Y2022980005868

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230727

Granted publication date: 20210803

Pledgee: Anhui Xingtai Financial Leasing Co.,Ltd.

Pledgor: Hongjing Microelectronics Technology Co.,Ltd.

Registration number: Y2022980005868

PC01 Cancellation of the registration of the contract for pledge of patent right
EC01 Cancellation of recordation of patent licensing contract

Assignee: Anhui Xingtai Financial Leasing Co.,Ltd.

Assignor: Hongjing Microelectronics Technology Co.,Ltd.

Contract record no.: X2022980005647

Date of cancellation: 20230810

EC01 Cancellation of recordation of patent licensing contract