CN117555293B - Control method and system of motion controller, electronic equipment and storage medium - Google Patents
Control method and system of motion controller, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117555293B CN117555293B CN202410038362.3A CN202410038362A CN117555293B CN 117555293 B CN117555293 B CN 117555293B CN 202410038362 A CN202410038362 A CN 202410038362A CN 117555293 B CN117555293 B CN 117555293B
- Authority
- CN
- China
- Prior art keywords
- machine tool
- motion
- processing
- speed
- determining
- 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.)
- Active
Links
- 230000033001 locomotion Effects 0.000 title claims abstract description 172
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000003860 storage Methods 0.000 title claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 189
- 238000003754 machining Methods 0.000 claims abstract description 15
- 239000012636 effector Substances 0.000 claims description 79
- 239000011159 matrix material Substances 0.000 claims description 55
- 230000009466 transformation Effects 0.000 claims description 50
- 230000008859 change Effects 0.000 claims description 30
- 238000006073 displacement reaction Methods 0.000 claims description 30
- 230000001133 acceleration Effects 0.000 claims description 18
- 239000013598 vector Substances 0.000 claims description 14
- 238000013519 translation Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 8
- 230000002457 bidirectional effect Effects 0.000 claims description 7
- 238000013507 mapping Methods 0.000 claims description 6
- 238000012508 change request Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims 2
- 238000004364 calculation method Methods 0.000 description 16
- 230000036461 convulsion Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000035772 mutation Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical 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/416—Numerical 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 of velocity, acceleration or deceleration
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/30—Nc systems
- G05B2219/34—Director, elements to supervisory
- G05B2219/34169—Coarse interpolator, path calculator delivers position, speed, acceleration blocks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
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 application relates to the technical field of motion controllers, and discloses a control method, a control system, electronic equipment and a storage medium of a motion controller, wherein the control method comprises the following steps: acquiring shaft position instruction information and configured interpolation parameter information of a numerical control machine tool; performing kinematic inverse solution according to the shaft position instruction information to obtain motor position instruction information; obtaining a machining track of the numerical control machine according to the motor position instruction information; the processing track is composed of a plurality of processing points; determining the processing speeds corresponding to the plurality of processing points; on the premise that the processing speeds corresponding to the processing points are kept unchanged, carrying out S-shaped speed planning according to the interpolation parameter information to obtain a motion curve; sequentially determining position instructions corresponding to the subdivision positions according to the motion curve; and after receiving the driver request, sending a position instruction corresponding to the driver request to the driver. The application can more accurately and rapidly complete the motion instruction of the user.
Description
Technical Field
The present application relates to the field of motion controllers, and in particular, to a method and system for controlling a motion controller, an electronic device, and a storage medium.
Background
A motion controller is a device for controlling the movement of a mechanical system or device and generally includes a controller and actuators for achieving precise control of the position, velocity, and acceleration parameters of the mechanical system. The motion controller is widely applied to the fields of automation equipment, robots, numerical control machine tools, printing equipment, packaging equipment and the like. Motion controllers play an important role in the fields of industrial automation and mechanical control, and through accurate control of motion of a mechanical system, production efficiency and product quality are improved. However, the existing motion controllers, especially those suitable for numerically controlled machine tools, cannot accurately and rapidly complete motion instructions due to limitations of control algorithms, and therefore, needs to be improved.
Disclosure of Invention
In order to more accurately and rapidly complete a motion instruction of a user, the application provides a control method, a control system, electronic equipment and a storage medium of a motion controller.
In a first aspect, the control method of the motion controller of the numerical control machine tool provided by the application adopts the following technical scheme:
A control method of a numerical control machine tool motion controller comprises the following steps:
Acquiring shaft position instruction information and configured interpolation parameter information of a numerical control machine tool;
performing kinematic inverse solution according to the shaft position command information to obtain corresponding motor position command information;
Obtaining a machining track of the numerical control machine according to the motor position instruction information; the processing track is composed of a plurality of processing points;
determining the processing speeds corresponding to the plurality of processing points;
on the premise that the processing speeds corresponding to the processing points are kept unchanged, carrying out S-shaped speed planning according to the interpolation parameter information to obtain a motion curve;
sequentially determining position instructions corresponding to the subdivision positions according to the motion curves, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions;
And after receiving the driver request, sending a position instruction corresponding to the driver request to the driver.
By adopting the technical scheme, the corresponding motor position instruction information is obtained by performing kinematic inverse solution according to the shaft position instruction information, the processing track of the numerical control machine tool is obtained according to the motor position instruction information, and then the S-shaped speed planning is further performed according to the interpolation parameter information on the premise that the processing speeds corresponding to the processing points are kept unchanged, so that a motion curve is obtained, and further the position instruction corresponding to the subdivision position is determined. Sequentially determining position instructions corresponding to the subdivision positions according to the motion curves, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions; after receiving the driver request, sending a position instruction corresponding to the request to the driver, so that the calculation efficiency can be improved; in addition, the application carries out the inverse kinematics solution according to the shaft position instruction information to obtain the corresponding motor position instruction information, and then obtains the processing track of the numerical control machine according to the motor position instruction information; and the motor position command can be flexibly adjusted according to different processing demands, different processing paths and tracks can be realized by changing the motor position command, and the motor position command is suitable for processing workpieces with different shapes and sizes.
Preferably, the performing a kinematic inverse solution according to the shaft position command information to obtain corresponding motor position command information includes:
determining a kinematic model of the numerical control machine tool;
Obtaining the position and the posture of an end effector of the machine tool according to the kinematic model of the numerical control machine tool and the shaft position instruction information;
Performing kinematic inverse solution according to the position and the posture of an end effector of the machine tool to obtain angle information of each joint of the machine tool;
and converting the angle information of each joint of the machine tool into corresponding motor position instruction information.
Through adopting the technical scheme, through the kinematic model, the position and the gesture of the end effector of the machine tool can be accurately calculated, the machine tool is ensured to move to the expected position and the angle, so that high-precision machining is realized, then the kinematic inverse solution is carried out according to the position and the gesture of the end effector of the machine tool, the angle information of each joint of the machine tool is obtained, the angle information of each joint of the machine tool is converted into corresponding motor position instruction information, and therefore more accurate motor position instruction information can be finally obtained, and a motion controller can be controlled conveniently and accurately to finish the subsequent motion instruction of a user.
More preferably, the kinematic model of the numerically controlled machine tool is determined specifically by:
Acquiring structural information of a numerical control machine tool, wherein the structural information comprises the number and the type of joints, the number, the type and the position relation of shafts of the machine tool, and the posture of an end effector;
Determining a coordinate system of each joint or axis and defining a relative position and orientation between the respective coordinate systems;
Establishing a geometric relationship between joint angle or axis displacement and pose of the end effector for each joint or axis;
the rotational angle and translational displacement of the end effector are determined in relation to the movement of the respective joint or shaft, depending on the end effector type of the machine tool.
By adopting the technical scheme, a more accurate machine tool kinematic model can be obtained, and then the position and the gesture of the machine tool end effector can be accurately calculated based on the model, so that the machine tool is ensured to move to the expected position and angle, and high-precision machining and control are realized.
Further preferably, establishing a geometric relationship between the joint angle and the pose of the end effector for each joint comprises:
According to the joint angle, calculating a transformation matrix of a connecting rod in front of the th joint of the machine tool relative to a base coordinate system;
calculating a transformation matrix of the connecting rod behind th joint of the machine tool relative to the end effector;
Calculating a transformation matrix of the machine tool end effector relative to the base coordinate system according to the transformation matrix ;
pose information of the machine tool end effector relative to a base coordinate system is extracted, including position and direction.
By adopting the technical scheme, firstly, the transformation matrix of the connecting rod in front of the th joint of the machine tool relative to the basic coordinate system is calculated, then, the transformation matrix of the connecting rod behind the th joint of the machine tool relative to the end effector is calculated, and then, the transformation matrix of the end effector of the machine tool relative to the basic coordinate system is calculated according to the two calculation results, so that the geometric relationship between the more accurate joint angle and the posture of the end effector can be obtained, and further, the more accurate motor position instruction information can be obtained later.
Preferably, establishing a geometric relationship between the machine tool axis displacement and the pose of the machine tool end effector comprises:
Mapping an origin O of a basic coordinate system of the machine tool to an origin P of a coordinate system of an end effector of the machine tool by adopting a 4*4 homogeneous transformation matrix T; the position and attitude of the machine tool end effector relative to the base coordinate system is described by the translational and rotational portions of the homogeneous transformation matrix T;
wherein the fourth column vector [ ,,,1]T ] of the homogeneous transformation matrix T represents the translation portion, (,,) represents the amount of translation of the end effector relative to the base coordinate system; the 3x3 submatrix R of the homogeneous transformation matrix T represents a rotation part;
If the axial displacement of the machine tool is known, calculating the new position and posture of the end effector of the machine tool through the homogeneous transformation matrix T: a new transformation matrix T 'is constructed, wherein the translation part of the new transformation matrix T' is [ ,,,1]T ] and the rotation part is the rotation part R in the original transformation matrix T.
By adopting the technical scheme, the origin O of the basic coordinate system of the machine tool is mapped to the origin P of the coordinate system of the end effector of the machine tool by adopting the homogeneous transformation matrix T, and the position and the gesture of the end effector of the machine tool relative to the basic coordinate system are described by the translation and rotation parts in the homogeneous transformation matrix T, so that the accurate new position and gesture of the end effector can be obtained according to the axial displacement change of the machine tool, further more accurate motor position instruction information is obtained, and the motion instruction of a user can be accurately and rapidly controlled.
Preferably, the obtaining the processing track of the numerically-controlled machine tool according to the motor position instruction information includes:
Determining a numerical control machine coordinate system, including a workpiece coordinate system and a machine coordinate system;
Calculating the position of a processing point: according to the motor position instruction information, the position of each motor is calculated, and then the position of each joint of the machine tool is calculated;
converting the positions of the joints into processing point positions under a workpiece coordinate system;
and generating a processing track according to the processing point position.
By adopting the technical scheme, the position of each motor is calculated according to the motor position instruction information, the position of each joint of the machine tool is calculated, the position of each joint is converted into the position of the processing point under the workpiece coordinate system, and the processing track is generated according to the position of the processing point.
Preferably, the determining the processing speeds corresponding to the plurality of processing points includes:
Determining the length and the direction vector of line segments of two adjacent processing points, and determining the line segment included angle of the two adjacent line segments according to the direction vector;
Determining the speed of the middle processing point of the two adjacent line segments according to the line segment included angle of the two adjacent line segments, the initial speed corresponding to the initial processing point of the two adjacent line segments, the line segment length of the following line segment and the motion constraint information; and taking the speed of the middle processing point of the two adjacent line segments as the initial speed corresponding to the initial processing point of the next two adjacent line segments, and carrying out bidirectional scanning according to the speed determination mode to obtain the processing speed corresponding to each processing point.
Through adopting above-mentioned technical scheme, adopt two-way scanning mode, carry out two-way scanning according to the length of earlier line segment and contained angle and motion constraint information, under the effectual prerequisite of speed of guaranteeing all processing points, improved the efficiency of scanning, and then can be faster confirm the processing speed that a plurality of processing points correspond has improved motion controller's control efficiency.
Preferably, on the premise that processing speeds corresponding to the plurality of processing points remain unchanged, performing S-type speed planning according to the interpolation parameter information to obtain a motion curve, including:
For each track, performing S-shaped speed iterative planning from the initial two points to the middle to obtain an initial sub-motion curve corresponding to each track, wherein the initial speed, the final speed, the track segment length and the motion constraint information are used for each track;
Judging whether the initial sub-motion curve accords with a minimum instruction period or not;
If not, the initial sub-motion curve is adjusted to obtain a sub-motion curve, wherein the sub-motion curve accords with the minimum instruction period;
if yes, determining the initial sub-motion curve as a sub-motion curve;
and obtaining a motion curve according to each sub-motion curve.
By adopting the technical scheme, the error compensation is carried out on the initial sub-motion curve which does not accord with the minimum instruction period, so that the compensated motion curve accords with the requirement, the position instruction can be reasonably issued during actual processing, and the smoothness of the processing motion is ensured.
Preferably, after determining the position instructions corresponding to the key points in sequence according to the motion curve, the method further includes:
judging whether the motion buffer area is free or not in real time;
If the motion buffer area is free, writing a residual position instruction into the buffer area according to the current interpolation progress until the motion buffer area is filled;
Correspondingly, after receiving the driver request, the method sends the position instruction corresponding to the request to the driver, including:
and after receiving a driver request, reading a position instruction corresponding to the request from the motion buffer area and sending the position instruction to the driver.
By adopting the technical scheme, the motion buffer area is introduced, so that the calculation of the S-shaped speed planning can be asynchronous with the bus cycle to a certain extent, the links with large calculation amount such as the S-shaped speed planning can be isolated from the real-time bus, the real-time requirement of interpolation calculation is reduced, and the robustness of the system is enhanced.
Preferably, the method further comprises:
After receiving a request of real-time speed change, clearing other position instructions after a preset number of position instructions to be executed in the motion buffer area;
taking the processing speed in the last position instruction in the motion buffer area as an initial speed;
Determining the feeding amount required by speed change according to the initial speed, the final speed and the acceleration, wherein the final speed is the speed corresponding to the real-time speed change request;
Determining a variable-speed interpolation end point according to the feeding amount and the position corresponding to the last position instruction;
Determining a position corresponding to the last position instruction, a position of the variable speed interpolation end point and a variable speed motion curve corresponding to a processing point passing through the middle;
and determining a speed change position instruction corresponding to the position of the speed change key point in sequence according to the speed change motion curve, and writing the speed change position instruction into a motion buffer area.
By adopting the technical scheme, the speed change response can be carried out under the condition that real-time speed change is required, and the applicability is stronger.
In a second aspect, the control system of the motion controller of the numerical control machine tool provided by the application adopts the following technical scheme:
A control system for a numerically controlled machine tool motion controller, comprising:
The information acquisition module is used for acquiring shaft position instruction information and configured interpolation parameter information of the numerical control machine tool;
the motor position instruction information acquisition module is used for performing kinematic inverse solution according to the shaft position instruction information to acquire corresponding motor position instruction information;
The processing track acquisition module is used for acquiring the processing track of the numerical control machine tool according to the motor position instruction information; the processing track is composed of a plurality of processing points;
the processing speed determining module is used for determining the processing speeds corresponding to the plurality of processing points;
the motion curve acquisition module is used for carrying out S-shaped speed planning according to the interpolation parameter information on the premise that the processing speeds corresponding to the plurality of processing points are kept unchanged, so as to obtain a motion curve;
The position instruction determining module is used for sequentially determining position instructions corresponding to the subdivision positions according to the motion curve, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions;
And the instruction sending module is used for sending the position instruction corresponding to the driver request to the driver after receiving the driver request.
In a third aspect, the present application provides an electronic device, which adopts the following technical scheme:
an electronic device comprising a memory and a processor, the memory having stored thereon a computer program capable of being loaded and executed by the processor to implement the method of any of the preceding claims.
In a fourth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium storing a computer program capable of being loaded and executed by a processor to implement a method according to any one of the preceding claims.
In summary, the present application includes at least one of the following beneficial technical effects:
1. According to the axial position instruction information, performing kinematic inverse solution to obtain corresponding motor position instruction information, obtaining a processing track of a numerical control machine tool according to the motor position instruction information, further performing S-type speed planning according to the interpolation parameter information on the premise that processing speeds corresponding to a plurality of processing points are kept unchanged, obtaining a motion curve, and further determining position instructions corresponding to subdivision positions; sequentially determining position instructions corresponding to the subdivision positions according to the motion curves, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions; after receiving the driver request, sending a position instruction corresponding to the request to the driver, so that the calculation efficiency can be improved; in addition, the application carries out the inverse kinematics solution according to the shaft position instruction information to obtain the corresponding motor position instruction information, and then obtains the processing track of the numerical control machine according to the motor position instruction information; and the motor position command can be flexibly adjusted according to different processing demands, different processing paths and tracks can be realized by changing the motor position command, and the motor position command is suitable for processing workpieces with different shapes and sizes.
2. According to the application, the position and the gesture of the end effector of the machine tool can be accurately calculated through the kinematic model, and the machine tool is ensured to move to the expected position and angle, so that high-precision machining is realized, then the kinematic inverse solution is carried out according to the position and the gesture of the end effector of the machine tool, the angle information of each joint of the machine tool is obtained, and the angle information of each joint of the machine tool is converted into corresponding motor position instruction information, so that more accurate motor position instruction information can be finally obtained, and the motion controller can be conveniently and accurately controlled to finish the subsequent motion instruction of a user.
3. According to the application, the motion buffer area is introduced, so that the calculation of the S-shaped speed planning can be asynchronous with the bus cycle to a certain extent, the links with large calculation amount such as the S-shaped speed planning can be isolated from the real-time bus, the real-time requirement of interpolation calculation is reduced, and the robustness of the system is enhanced.
Drawings
Fig. 1 is a flowchart of a control method of a motion controller according to an embodiment of the present application.
FIG. 2 is a system block diagram of one embodiment of the present application.
FIG. 3 is a schematic diagram of a processing track according to an embodiment of the present application;
fig. 4 is a flowchart of a control method of a motion controller according to another embodiment of the present application.
Fig. 5 is a schematic workflow diagram of an interpolator in an embodiment of the application.
FIG. 6 is a schematic of the workflow of another interpolator in an embodiment of the present application.
Description of the embodiments
The present application is described in further detail below with reference to fig. 1-6.
The embodiment of the application discloses a control method of a numerical control machine tool motion controller. Referring to fig. 1 and 2, a control method of a motion controller of a numerically-controlled machine tool includes the steps of:
s1, acquiring shaft position instruction information and configured interpolation parameter information of a numerical control machine tool;
the shaft position command information includes: the number of the shafts, the number and types of the shafts (such as a linear shaft, a rotary shaft and the like), controllers and drivers corresponding to the shafts and the like; the interpolation parameter information includes: acceleration, jerk and highest running speed of each axis;
s2, performing kinematic inverse solution according to the shaft position command information to obtain corresponding motor position command information;
The method specifically comprises the following steps:
S21, determining a kinematic model of the numerical control machine tool, wherein the kinematic model of the numerical control machine tool comprises information such as a joint and shaft motion rule of the machine tool, and the gesture and position of an end effector;
specifically, the kinematic model of the numerical control machine tool can be determined by the following method:
S211, acquiring structural information of a numerical control machine tool, wherein the structural information comprises the number and the type of joints, the number, the type and the position relation of shafts of the machine tool, and the posture of an end effector;
S212, determining a coordinate system of each joint or shaft, and defining relative positions and directions among the coordinate systems; a Cartesian coordinate system or an affine coordinate system can be used in the implementation;
S213, establishing a geometrical relationship between the joint angle or axis displacement and the posture of the end effector for each joint or axis; in particular, for a rotary joint, the change in its pose can be described using a rotation matrix or quaternion; for a linear shaft, the motion rule of the linear shaft can be described by simple linear transformation;
in practice, the geometric relationship between the joint angle and the pose of the end effector can be established for each joint by:
S2131, calculating a transformation matrix of the link before th joint of the machine tool with respect to the base coordinate system based on the joint angle:
;
Wherein denotes a link length, denotes a joint offset, denotes a joint angle, and denotes a link twist angle;
Link length : representing the length of the links connecting between the various joints;
joint offset : representing the offset distance between the joint rotation axis and the connection position of the adjacent connecting rod;
Joint angle : the rotation angle of the joints is expressed and used for describing the positions of the joints of the machine tool;
Link twist angle : representing the torsion angle of each connecting rod of the machine tool along the rotating shaft;
The selection of these parameters can simplify the positive kinematic computation of the robot so that the pose of the end effector can be quickly computed by means of matrix multiplication. Different types of joint structures may affect the specific values of these parameters, which are the basis for positive kinematic calculations.
S2132, calculating a transformation matrix of the linkage rod relative to the end effector after th joint of the machine tool:
=;
Wherein n represents the coordinate system of the machine tool end effector, represents the transformation matrix of the th coordinate system relative to the th coordinate system; A transformation matrix representing the link after th joint relative to the link after th joint;
in a machine tool, a gesture representation method based on euler angles or quaternions can be adopted, so that a transformation matrix can be formed by a rotation matrix and a displacement vector:
;
Wherein represents a rotation matrix of th coordinate system with respect to th coordinate system, represents a displacement vector of th coordinate system with respect to th coordinate system.
The transformation matrix of the machine tool end effector relative to the connecting rod behind th joint can be obtained by multiplying the transformation matrix of each connecting rod relative to the previous section of connecting rod, so that the motion control and the posture adjustment of the machine tool end effector are realized;
S2133, calculating a transformation matrix of the machine tool end effector with respect to the base coordinate system:
Wherein represents a transformation matrix of the connecting rod in front of the 1 st joint of the machine tool relative to a basic coordinate system,
A transformation matrix representing the connecting rod behind the 2 nd joint of the machine tool relative to the connecting rod behind the 1 st joint of the machine tool, and the like, until ;
S2134, extracting pose information, including position and orientation, of the machine tool end effector relative to the base coordinate system.
Extracting the last column of a transformation matrix of the machine tool end effector relative to a base coordinate system to serve as a displacement vector of the end effector; the rotation part of the transformation matrix of the machine tool end effector relative to the base coordinate system is extracted to obtain a rotation matrix, and then an appropriate method is selected according to the requirement, and the rotation matrix is converted into the direction of the machine tool end effector relative to the base coordinate system, such as Euler angles or other representation methods.
In addition, the geometrical relationship between the machine tool axis displacement and the pose of the machine tool end effector can be established by:
the origin O of the base coordinate system of the machine tool can be mapped to the origin P of the coordinate system of the end effector of the machine tool using the 4*4 homogeneous transformation matrix T; the position and attitude of the machine tool end effector relative to the base coordinate system is described by the translational and rotational portions of the homogeneous transformation matrix T;
Wherein the fourth column vector [ ,,,1]T ] of the homogeneous transformation matrix T represents the translation portion, (,,) represents the amount of translation of the end effector relative to the base coordinate system; the 3x3 submatrix R of the homogeneous transformation matrix T represents the rotation part, which comprises a 3x3 rotation matrix describing the rotation attitude of the end effector with respect to the base coordinate system;
If the axis displacement (i.e., translation) of the machine tool is known, the new position and attitude of the machine tool end effector is calculated by the homogeneous transformation matrix T: a new transformation matrix T 'is constructed, wherein the translation part of the new transformation matrix T' is [ ,,,1]T ] and the rotation part is the rotation part R in the original transformation matrix T.
S214, determining the movement relation between the rotation angle and the translational displacement of the end effector and each joint or shaft according to the end effector type of the machine tool, such as a clamp, a cutter, etc.
In particular, the end effector types of machine tools vary, as do rotational angles and translational displacements relative to the motion of the various joints or axes. For example, for a fixture, the fixture is generally used for fixing a workpiece, no adjustment of a rotation angle is needed, the translational displacement of the fixture is generally controlled by a linear shaft (such as a linear guide rail) of a machine tool, and the translational displacement of the fixture is realized by adjusting the position of the linear shaft. For tools, which are commonly used in cutting operations, the rotation angle and translation displacement are closely related to the joint or axis of the machine, the specific movement relationship depending on the structure and control of the machine, the following are some common cases: the serial structure is as follows: if the machine tool adopts a serial structure, namely, each joint or shaft is connected in sequence, and the cutter is positioned on the last joint or shaft, the rotation angle and the translational displacement of the cutter are directly controlled by the movement of the last joint or shaft; and (3) a parallel structure: if the machine tool adopts a parallel structure, that is, the cutter is controlled by a plurality of joints or shafts at the same time, the rotation angle and the translational displacement of the cutter are realized by the mutual coordination of the motions of the joints or shafts, and usually, an inverse kinematics algorithm is used, and the motion parameters of each joint or shaft are calculated according to the expected position and the expected posture of the cutter, so that the motion of the cutter is realized. Other types: for other types of end effectors (e.g., sensors, guns, etc.), the rotational and translational displacements may also vary from joint to joint or shaft movement, and typically require analysis and design according to specific machine tool configuration and application requirements, and appropriate control algorithms to effect movement of the end effector. In summary, the rotational angle and translational displacement of the end effector of a machine tool are related to the movement of the various joints or axes, depending on the type of end effector and the structure and control of the machine tool, and the specific movement relationship needs to be analyzed and designed according to the actual situation, and an appropriate method is adopted to realize the movement control of the end effector.
In practical application, the kinematic model of the numerical control machine is the basis for path planning, trajectory control and motion optimization. Therefore, establishing an accurate and reliable kinematic model is important for realizing accurate numerical control machining.
S22, obtaining the position and the posture of an end effector of the machine tool according to the kinematic model of the numerical control machine tool and the shaft position instruction information;
s23, performing kinematic inverse solution according to the position and the posture of an end effector of the machine tool to obtain angle information of each joint of the machine tool;
S24, converting the angle information of each joint of the machine tool into corresponding motor position instruction information.
Specifically, the angle information of each joint of the machine tool can be converted into corresponding motor position instruction information by the following method:
S241, the current position information of the motor can be obtained by using sensors such as an encoder and the like;
S242, calculating a required motor position instruction according to the kinematic model of the machine tool and the current position information of the motor.
Specifically, the relation between the angles of all joints of the machine tool and the position of the end effector can be obtained according to the kinematic model of the machine tool; calculating a corresponding motor position instruction according to the required joint angle and the current position information of the motor through a motion control algorithm and a motion controller; these instructions may be pulse signals, PWM signals, or other forms of control signals for driving the motors to achieve precise articulation.
As shown in fig. 2, in the implementation, the PC side may configure the system file, the processing file, and the shaft position instruction table through the upper computer bus based on the motion control function library, or may configure the shaft position instruction table through the peripheral read-write function; interpolation parameters can be configured by calling a system file; after the shaft position command table is configured, compensation processing can be performed to correct the data of the command table. In addition, a follow-up motion buffer area and an Ethercat mapping area can be arranged, and data of the follow-up motion buffer area and the interpolation motion buffer area are transmitted to the Ethercat mapping area and used for transmitting instruction information to a driver in real time; the Ethercat mapping area can also acquire the data of the driver, and the data is fed back to the PC after the positive and negative kinematics solution and the axial position feedback, so as to prompt the motion state of the motor of the current driver.
Another scenario is that there is no PC, and the interpolation starts working by triggering the peripheral.
S3, obtaining a machining track of the numerical control machine according to the motor position instruction information; the processing track is composed of a plurality of processing points;
specifically, the processing track of the numerical control machine tool can be determined by the following method:
S31, determining a numerical control machine tool coordinate system, including a workpiece coordinate system and a machine tool coordinate system; the workpiece coordinate system is a coordinate system established by taking a workpiece as a reference system, the machine tool coordinate system is a coordinate system established by taking a numerical control machine tool as the reference system, and in the machining process, a machining track is converted from the workpiece coordinate system to the machine tool coordinate system;
S32, calculating the position of each motor according to the motor position instruction information, and further calculating the position of each joint of the machine tool;
s33, converting the positions of the joints into machining point positions under a workpiece coordinate system;
s34, generating a processing track according to the processing point position. The processing track is formed by a plurality of processing points, each representing a position in the object coordinate system.
In particular, the processing track is composed of at least three processing points, and the processing track includes the position and processing sequence of each processing point. As shown in fig. 3, a schematic diagram of a processing track provided in an embodiment of the present application includes 8 processing points (including an initial point and a final point), where the processing track is formed by continuous G1-G7 segments.
S4, determining the processing speeds corresponding to the plurality of processing points;
in specific implementation, the processing speeds corresponding to the plurality of processing points can be determined by the following method:
s41, determining the length and the direction vector of line segments of two adjacent processing points, and determining the line segment included angle of the two adjacent line segments according to the direction vector;
s42, determining the speed of the middle processing point of the two adjacent line segments according to the line segment included angle of the two adjacent line segments, the initial speed corresponding to the initial processing point of the two adjacent line segments, the line segment length of the following line segment and the motion constraint information; the motion constraint information includes: acceleration, jerk and highest running speed of each axis;
S43, taking the speed of the middle processing point of the two adjacent line segments as the initial speed corresponding to the initial processing point of the next two adjacent line segments, and carrying out bidirectional scanning according to the speed determination mode to obtain the processing speed corresponding to each processing point.
In specific implementation, the optimal speed can be determined for each processing point according to the position and motion constraint information of each processing point, for example, when three adjacent processing points are on the same straight line, the speed of the middle processing point can be set to be the highest running speed, when three adjacent processing points are not on the same straight line, the speed of the middle processing point can be set to be 0 or a certain preset lower speed, and the setting mode of the preset lower speed can be set according to the processing experience of a technician. In the present application, the processing speed includes a speed value and a speed direction.
S5, on the premise that processing speeds corresponding to the plurality of processing points are kept unchanged, performing S-shaped speed planning according to the interpolation parameter information to obtain a motion curve;
The speed planning is a process of planning displacement, speed, acceleration and jerk of the track corresponding to each line segment in the processing track. The most main purpose of this stage is to program a motion curve with the shortest running time and consistent final engagement speed and look-ahead result, so as to ensure that the speed can start to be reduced at a proper position in front of the processing point during processing, the speed is reduced to a safe speed at the processing point, namely the processing speed determined in the step S4, and the speed is accelerated from a proper position to a normal processing speed after passing through the processing point, so that the whole optimal solution under the constraint of the system motion capability is obtained. The motion curve consists of sub-motion curves corresponding to adjacent processing points. The motion profile may include: one or more of a velocity profile displacement profile, an acceleration profile, and a jerk profile.
When the speed planning is carried out, the S-shaped speed planning mode is adopted, so that the acceleration planning is continuous, abrupt change can not be generated in an acceleration link, and the acceleration corresponding to each processing point is kept unchanged in the planning process, so that the influence of a speed planning result on a look-ahead link can not be introduced, and iterative calculation can be reduced.
In particular, the motion profile can be obtained by:
For each track, performing S-shaped speed iterative planning from the initial two points to the middle to obtain an initial sub-motion curve corresponding to each track, wherein the initial speed, the final speed, the track segment length and the motion constraint information are used for each track;
Judging whether the initial sub-motion curve accords with a minimum instruction period or not;
If not, the initial sub-motion curve is adjusted to obtain a sub-motion curve, wherein the sub-motion curve accords with the minimum instruction period;
if yes, determining the initial sub-motion curve as a sub-motion curve;
and obtaining a motion curve according to each sub-motion curve.
Wherein said adjusting said initial sub-motion profile to obtain a sub-motion profile comprises:
Determining the speed type of the initial sub-motion curve;
judging whether the speed type comprises a constant speed section or a uniform acceleration section;
if yes, carrying out time upward rounding planning on the initial sub-motion curve to obtain the sub-motion curve;
and if not, carrying out time downward rounding planning on the initial sub-motion curve to obtain the sub-motion curve.
By adopting the technical scheme, the time up rounding is tried for the conditions of uniform speed section and uniform acceleration section, and the time down rounding is carried out for the conditions of other and the two types which cannot finish the time up rounding so as to finish S-shaped speed planning. Different conditions are reasonably classified in the S-shaped speed planning link, the condition that the system acceleration and the acceleration are out of limits due to overlarge compensation value of the follow-up compensation deviation correction is avoided as much as possible, the instruction time is round, so that the instruction is continuous and accurate, the error instruction position and the acceleration mutation cannot be introduced in the movement, and the processing precision is high.
In the embodiment of the application, a bidirectional scanning look-ahead is adopted, and the look-ahead process can comprise: determining the maximum value of the given speed at the position of the connecting point by combining the included angles of the line segments with continuous ends with given jerk; and respectively starting to iterate from the two points of the initial speed and the final speed to the middle to obtain the feeding speed which is mainly constrained by the length of the line segment, the previous feeding speed and the motion performance until the scanning of the whole line segment is finished, and finishing the foresight.
It should be noted that if the processing track is all tracks for processing one workpiece, the initial speed is 0 and the final speed is 0; if the processing track is the first stage from the beginning of processing a workpiece to the processing of the workpiece, the initial speed is 0, the final speed corresponds to the first stage, and can be 0 or not 0, and the like, and various conditions exist in the initial speed and the final speed, so that the embodiment of the application is not listed any more, and only meets the actual scene.
In the embodiment of the application, a bidirectional scanning mode is adopted, bidirectional scanning is carried out according to the length of the line segment, the included angle and the motion constraint information, and the scanning efficiency is improved on the premise of ensuring that the speed of all processing points is effective.
S6, sequentially determining position instructions corresponding to the subdivision positions according to the motion curve, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions;
The step is mainly an interpolation refinement stage, and the position instruction of each bus period can be calculated according to the speed, the position and other information of the subdivision position obtained in the speed planning stage and the bus time of each subdivision position.
The number of key points in each sub-motion curve is related to the start and end speeds of the sub-motion curve and the length of the line segment. For example, in the case of speed planning of machining points 1 to 2, if the resulting sub-speed curves for machining points 1 to 2 are standard 7-stage S curves, the number of key points is 7 (including only the point corresponding to the end speed), and each key point corresponds to one stage of S curve planning.
The motion information includes: speed, displacement, acceleration, jerk, and time corresponding to the location of the key point.
As shown in fig. 4, the present application further includes:
S7, judging whether the motion buffer area is free or not in real time; if the motion buffer area is free, writing a residual position instruction into the buffer area according to the current interpolation progress until the motion buffer area is filled;
referring to fig. 5, the interpolator is managed by independent threads in a real-time system. It is assumed that the entire course of motion consists of consecutive m machining points. S0, calculating a plurality of position instructions corresponding to the tracks from P0 to P1, filling the position instructions from P0 to P1 into the motion buffer when the motion buffer is empty, continuously calculating the subsequent position instructions by the interpolator, continuously writing the subsequent position instructions into the motion buffer until the subsequent position instructions are filled, and simultaneously, taking out the corresponding position instructions from the motion buffer when the interpolator receives a request from a driver.
In the embodiment of the application, a motion buffer area is added at the upper layer of the real-time period bus instruction mapping area, and the position instruction of the current period and the subsequent certain time are stored in the motion buffer area. The interpolator can determine the idle condition of the current motion buffer according to the distance between the read pointer and the write pointer of the annular buffer, and further calculate the position instructions corresponding to interpolation sub-division points of corresponding quantity according to the idle allowance when the idle condition exists.
Specifically, 1) check whether there is a free space in the motion buffer. If the current interpolation progress of the current track is idle, the position instruction corresponding to the residual bus period of the current track is filled into the buffer area, and the position instruction filled into the buffer area can be calculated by calculating the speed planning key value of the current processing line segment after the idle operation is determined, or can be calculated in real time;
2) If the current track is already interpolated but the buffer is not filled, reading the next track, repeating the steps described in 1) to calculate the position instruction of the next track, and continuing to fill the position instruction corresponding to the interpolation subdivision point into the buffer.
3) Until the buffer is filled, the interpolation of the thread cycle is ended. The next time the interpolation thread is re-entered, the operation of 1) is repeated.
4) If the current track is completed and the next instruction is not available, the buffer area is not updated any more, the execution of the buffer area instruction is waited for, and the interpolation is completed.
Therefore, the embodiment of the application introduces the motion buffer region, so that the calculation of the speed planning can be asynchronous with the bus cycle to a certain extent, the links with large calculation amount such as the instruction look-ahead speed planning can be isolated from the real-time bus, the real-time requirement of interpolation calculation is reduced, and the robustness of the system is enhanced.
And S8, after receiving a driver request, reading a position instruction corresponding to the request from the motion buffer area and sending the position instruction to the driver.
The driver generally sends a request according to a minimum instruction period, and in a possible case, the request can comprise a time to be processed, and further, after receiving the request, a position instruction is determined according to the time to be processed and returned to the driver; in another possible scenario, no information is carried in the request, and the latest unsent location instruction is sent to the drive when the request is received.
In the embodiment of the application, processing track and motion constraint information formed by a plurality of processing points are acquired in real time; performing look-ahead processing according to the positions of the processing points and the motion constraint information, and determining the processing speed corresponding to each processing point; on the premise that the processing speed corresponding to each processing point is kept unchanged, S-shaped speed planning is carried out according to the motion constraint information, and a motion curve is obtained; the speed of the track joint point is not changed, so that the influence of a speed planning result on a look-ahead link is not introduced, and iterative calculation is avoided; sequentially determining position instructions corresponding to the subdivision positions according to the motion curves, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions; after receiving the driver request, the position instruction corresponding to the request is sent to the driver, so that the calculation efficiency can be improved, and the working stability of the interpolator can be improved.
S9, after receiving a request of real-time speed change, clearing other position instructions after a preset number of position instructions to be executed in the motion buffer area; taking the processing speed in the last position instruction in the motion buffer area as an initial speed; determining the feeding amount required by speed change according to the initial speed, the final speed and the acceleration, wherein the final speed is the speed corresponding to the real-time speed change request; determining a variable-speed interpolation end point according to the feeding amount and the position corresponding to the last position instruction; determining a position corresponding to the last position instruction, a position of the variable speed interpolation end point and a variable speed motion curve corresponding to a processing point passing through the middle; and determining a speed change position instruction corresponding to the position of the speed change key point in sequence according to the speed change motion curve, and writing the speed change position instruction into a motion buffer area.
If the real-time speed change is needed, the embodiment of the application firstly makes a special speed planning and interpolation subdivision based on the current system state and the speed change target, and then updates the new speed limit to global continuous interpolation after finishing, wherein a linear speed planning can be independently made according to the initial speed, the final speed and the acceleration so as to obtain the displacement length, namely the feeding quantity.
Referring specifically to fig. 6, when there is a speed abrupt change event, a preset number of position instructions to be executed in a buffer area are saved, and the remaining buffer is emptied; determining the last instruction point speed in the buffer as the initial speed of interpolation, and calculating the feeding amount (i.e. the movement length) required by speed change according to the final speed (i.e. speed change), the initial speed and the movement constraint information; calculating which segment of a series of instruction points will be followed to complete execution to determine the endpoint of the interpolation (i.e., the ending insertion point); determining a position corresponding to the last position instruction, a position of a variable speed interpolation end point and a variable speed motion curve corresponding to a machining point passing through the middle, wherein the specific process refers to the embodiment, and the embodiment of the application is not repeated; and calculating a position instruction until the interpolation subdivision points between the variable speed interpolation starting point and the variable speed interpolation end point are completely calculated, and exiting the variable speed interpolation.
By adopting the technical scheme, the embodiment of the application can perform speed change response under the condition of needing real-time speed change, and has stronger applicability.
The embodiment also discloses a control system of a numerical control machine tool motion controller, comprising:
The information acquisition module is used for acquiring shaft position instruction information and configured interpolation parameter information of the numerical control machine tool;
the motor position instruction information acquisition module is used for performing kinematic inverse solution according to the shaft position instruction information to acquire corresponding motor position instruction information;
The processing track acquisition module is used for acquiring the processing track of the numerical control machine tool according to the motor position instruction information; the processing track is composed of a plurality of processing points;
the processing speed determining module is used for determining the processing speeds corresponding to the plurality of processing points;
the motion curve acquisition module is used for carrying out S-shaped speed planning according to the interpolation parameter information on the premise that the processing speeds corresponding to the plurality of processing points are kept unchanged, so as to obtain a motion curve;
The position instruction determining module is used for sequentially determining position instructions corresponding to the subdivision positions according to the motion curve, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions;
And the instruction sending module is used for sending the position instruction corresponding to the driver request to the driver after receiving the driver request.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
The embodiment also discloses an electronic device comprising a memory and a processor, the memory having stored thereon a computer program capable of being loaded and executed by the processor to implement the method according to any of the preceding claims.
The electronic device may be an electronic device such as a desktop computer, a notebook computer, or a cloud server, and the electronic device includes, but is not limited to, a processor and a memory, for example, the electronic device may further include an input/output device, a network access device, a bus, and the like.
A processor in the present application may include one or more processing cores. The processor performs the various functions of the application and processes the data by executing or executing instructions, programs, code sets, or instruction sets stored in memory, calling data stored in memory. The processor may be at least one of an Application SPECIFIC INTEGRATED Circuit (ASIC), a digital signal processor (DIGITAL SIGNAL processor, DSP), a digital signal processing device (DIGITAL SIGNAL Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable GATE ARRAY, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronics for implementing the above-described processor functions may be other for different devices, and embodiments of the present application are not particularly limited.
The memory may be an internal storage unit of the electronic device, for example, a hard disk or a memory of the electronic device, or may be an external storage device of the electronic device, for example, a plug-in hard disk, a Smart Memory Card (SMC), a secure digital card (SD), or a flash memory card (FC) provided on the electronic device, or the like, and may be a combination of the internal storage unit of the electronic device and the external storage device, where the memory is used to store a computer program and other programs and data required by the electronic device, and the memory may be used to temporarily store data that has been output or is to be output, which is not limited by the present application.
The present embodiment also discloses a computer readable storage medium storing a computer program capable of being loaded and executed by a processor to implement a method according to any one of the above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program, which may be stored on a non-transitory computer readable storage medium and which, when executed, may comprise the steps of the above-described embodiments of the methods. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The above embodiments are not intended to limit the scope of the present application, so: all equivalent changes according to the method and principle of the present application should be covered by the protection scope of the present application.
Claims (7)
1. The control method of the numerical control machine tool motion controller is characterized by comprising the following steps of:
Acquiring shaft position instruction information and configured interpolation parameter information of a numerical control machine tool;
performing kinematic inverse solution according to the shaft position command information to obtain corresponding motor position command information;
Obtaining a machining track of the numerical control machine according to the motor position instruction information; the processing track is composed of a plurality of processing points;
determining the processing speeds corresponding to the plurality of processing points;
on the premise that the processing speeds corresponding to the processing points are kept unchanged, carrying out S-shaped speed planning according to the interpolation parameter information to obtain a motion curve;
sequentially determining position instructions corresponding to the subdivision positions according to the motion curves, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions;
when a driver request is received, sending a position instruction corresponding to the driver request to the driver;
the method for obtaining the motor position instruction information comprises the following steps of:
determining a kinematic model of the numerical control machine tool;
Obtaining the position and the posture of an end effector of the machine tool according to the kinematic model of the numerical control machine tool and the shaft position instruction information;
Performing kinematic inverse solution according to the position and the posture of an end effector of the machine tool to obtain angle information of each joint of the machine tool;
Converting the angle information of each joint of the machine tool into corresponding motor position instruction information;
the kinematic model of the numerical control machine tool is determined by the following method:
Acquiring structural information of a numerical control machine tool, wherein the structural information comprises the number and the type of joints, the number, the type and the position relation of shafts of the machine tool, and the posture of an end effector;
Determining a coordinate system of each joint or axis and defining a relative position and orientation between the respective coordinate systems;
Establishing a geometric relationship between joint angle or axis displacement and pose of the end effector for each joint or axis;
Determining the motion relation between the rotation angle and the translational displacement of the end effector and each joint or shaft according to the type of the end effector of the machine tool;
The step of obtaining the processing track of the numerical control machine tool according to the motor position instruction information comprises the following steps:
Determining a numerical control machine coordinate system, including a workpiece coordinate system and a machine coordinate system;
Calculating the position of a processing point: according to the motor position instruction information, the position of each motor is calculated, and then the position of each joint of the machine tool is calculated;
converting the positions of the joints into processing point positions under a workpiece coordinate system;
Generating a processing track according to the processing point position;
and/or the number of the groups of groups,
The determining the processing speeds corresponding to the processing points comprises the following steps:
Determining the length and the direction vector of line segments of two adjacent processing points, and determining the line segment included angle of the two adjacent line segments according to the direction vector;
Determining the speed of the middle processing point of the two adjacent line segments according to the line segment included angle of the two adjacent line segments, the initial speed corresponding to the initial processing point of the two adjacent line segments, the line segment length of the following line segment and the motion constraint information; taking the speed of the middle processing point of the two adjacent line segments as the initial speed corresponding to the initial processing point of the next two adjacent line segments, and carrying out bidirectional scanning according to the speed determination mode to obtain the processing speed corresponding to each processing point;
and/or the number of the groups of groups,
And on the premise that the processing speeds corresponding to the processing points are kept unchanged, performing S-shaped speed planning according to the interpolation parameter information to obtain a motion curve, wherein the method comprises the following steps of:
For each track, performing S-shaped speed iterative planning from the initial two points to the middle to obtain an initial sub-motion curve corresponding to each track, wherein the initial speed, the final speed, the track segment length and the motion constraint information are used for each track;
Judging whether the initial sub-motion curve accords with a minimum instruction period or not;
If not, the initial sub-motion curve is adjusted to obtain a sub-motion curve, wherein the sub-motion curve accords with the minimum instruction period;
if yes, determining the initial sub-motion curve as a sub-motion curve;
and obtaining a motion curve according to each sub-motion curve.
2. The control method of a numerical control machine tool motion controller according to claim 1, wherein establishing a geometric relationship between a joint angle and a posture of an end effector for each joint includes:
Calculating a transformation matrix T 0i of a connecting rod in front of the ith joint of the machine tool relative to a base coordinate system;
Calculating a transformation matrix T i,n of the connecting rod behind the ith joint of the machine tool relative to the end effector:
calculating a transformation matrix T 0n of the machine tool end effector relative to a base coordinate system according to the transformation matrices T 0i and T i,n;
extracting attitude information of an end effector of the machine tool relative to a base coordinate system, wherein the attitude information comprises positions and directions;
and/or the number of the groups of groups,
Establishing a geometric relationship between machine tool axis displacement and a pose of a machine tool end effector, comprising:
Mapping an origin O of a basic coordinate system of the machine tool to an origin P of a coordinate system of an end effector of the machine tool by adopting a 4*4 homogeneous transformation matrix T; the position and attitude of the machine tool end effector relative to the base coordinate system is described by the translational and rotational portions of the homogeneous transformation matrix T;
wherein the fourth column vector [ P x,Py,Pz,1]T ] of the homogeneous transformation matrix T represents the translation portion, (P x,Py,Pz) represents the translation amount of the end effector relative to the base coordinate system; the 3x3 submatrix R of the homogeneous transformation matrix T represents a rotation part;
If the axial displacement d of the machine tool is known, calculating the new position and posture of the end effector of the machine tool through the homogeneous transformation matrix T: a new transformation matrix T 'is constructed, wherein the translation part of the new transformation matrix T' is [ d x,dy,dz,1]T ] and the rotation part is the rotation part R in the original transformation matrix T.
3. The control method of a motion controller of a numerically-controlled machine tool according to claim 1 or 2, further comprising, after sequentially determining position instructions corresponding to key points according to the motion curve:
judging whether the motion buffer area is free or not in real time;
If the motion buffer area is free, writing a residual position instruction into the buffer area according to the current interpolation progress until the motion buffer area is filled;
Correspondingly, after receiving the driver request, the method sends the position instruction corresponding to the request to the driver, including:
and after receiving a driver request, reading a position instruction corresponding to the request from the motion buffer area and sending the position instruction to the driver.
4. A control method of a numerical control machine tool motion controller according to claim 3, further comprising:
After receiving a request of real-time speed change, clearing other position instructions after a preset number of position instructions to be executed in the motion buffer area;
taking the processing speed in the last position instruction in the motion buffer area as an initial speed;
Determining the feeding amount required by speed change according to the initial speed, the final speed and the acceleration, wherein the final speed is the speed corresponding to the real-time speed change request;
Determining a variable-speed interpolation end point according to the feeding amount and the position corresponding to the last position instruction;
Determining a position corresponding to the last position instruction, a position of the variable speed interpolation end point and a variable speed motion curve corresponding to a processing point passing through the middle;
and determining a speed change position instruction corresponding to the position of the speed change key point in sequence according to the speed change motion curve, and writing the speed change position instruction into a motion buffer area.
5. A control system of a numerical control machine motion controller based on the control method of claim 1, comprising:
The information acquisition module is used for acquiring shaft position instruction information and configured interpolation parameter information of the numerical control machine tool;
the motor position instruction information acquisition module is used for performing kinematic inverse solution according to the shaft position instruction information to acquire corresponding motor position instruction information;
The processing track acquisition module is used for acquiring the processing track of the numerical control machine tool according to the motor position instruction information; the processing track is composed of a plurality of processing points;
the processing speed determining module is used for determining the processing speeds corresponding to the plurality of processing points;
the motion curve acquisition module is used for carrying out S-shaped speed planning according to the interpolation parameter information on the premise that the processing speeds corresponding to the plurality of processing points are kept unchanged, so as to obtain a motion curve;
The position instruction determining module is used for sequentially determining position instructions corresponding to the subdivision positions according to the motion curve, wherein the position instructions comprise the subdivision positions and motion information corresponding to the subdivision positions;
the instruction sending module is used for sending a position instruction corresponding to the driver request to the driver after receiving the driver request;
wherein, the motor position instruction information acquisition module includes:
the kinematic model determining submodule is used for determining a kinematic model of the numerical control machine tool;
A position and posture acquisition sub-module for acquiring the position and posture of an end effector of the machine tool according to the kinematic model of the numerical control machine tool and the shaft position instruction information;
The angle information acquisition sub-module is used for performing kinematic inverse solution according to the position and the gesture of the end effector of the machine tool to obtain the angle information of each joint of the machine tool;
the conversion sub-module is used for converting the angle information of each joint of the machine tool into corresponding motor position instruction information;
specifically, the kinematic model determination submodule includes:
the structure information acquisition unit is used for acquiring structure information of the numerical control machine tool, and comprises the number and the type of joints, the number, the type and the position relation of shafts of the machine tool, and the posture of the end effector;
A coordinate system determining unit for determining a coordinate system of each joint or axis and defining a relative position and direction between the respective coordinate systems;
a geometric relationship determination unit for establishing a geometric relationship between the joint angle or axis displacement and the posture of the end effector for each joint or axis;
A motion relation determining unit for determining the motion relation between the rotation angle and the translational displacement of the end effector and each joint or shaft according to the type of the end effector of the machine tool;
the processing track acquisition module comprises:
the coordinate system determining submodule is used for determining a numerical control machine coordinate system, and comprises a workpiece coordinate system and a machine coordinate system;
The computing sub-module is used for computing the position of the processing point: according to the motor position instruction information, the position of each motor is calculated, and then the position of each joint of the machine tool is calculated;
the position conversion sub-module is used for converting the positions of the joints into the positions of processing points under a workpiece coordinate system;
The processing track generation sub-module is used for generating a processing track according to the processing point position;
and/or the number of the groups of groups,
The processing speed determining module comprises:
the line segment included angle determining sub-module is used for determining the line segment lengths and direction vectors of the two adjacent processing points and determining the line segment included angles of the two adjacent line segments according to the direction vectors;
the processing speed determining submodule is used for determining the speed of the middle processing point of the two adjacent line segments according to the line segment included angle of the two adjacent line segments, the initial speed corresponding to the initial processing point of the two adjacent line segments, the line segment length of the following line segment and the motion constraint information; taking the speed of the middle processing point of the two adjacent line segments as the initial speed corresponding to the initial processing point of the next two adjacent line segments, and carrying out bidirectional scanning according to the speed determination mode to obtain the processing speed corresponding to each processing point;
and/or the number of the groups of groups,
The motion curve acquisition module comprises:
The initial sub-motion curve determining sub-module is used for carrying out S-shaped speed iterative programming from the initial two points to the middle aiming at each section of track, the initial speed, the final speed, the track segment length and the motion constraint information to obtain an initial sub-motion curve corresponding to each section of track;
the judging submodule is used for judging whether the initial sub-motion curve accords with a minimum instruction period or not;
The first sub-motion curve acquisition sub-module is used for adjusting the initial sub-motion curve to obtain a sub-motion curve if not, wherein the sub-motion curve accords with the minimum instruction period;
The second sub-motion curve acquisition sub-module is used for determining the initial sub-motion curve as a sub-motion curve if the initial sub-motion curve is the sub-motion curve;
And the motion curve determining sub-module is used for obtaining a motion curve according to each sub-motion curve.
6. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that is loadable and executable by the processor to implement the control method of any of claims 1 to 4.
7. A computer-readable storage medium, characterized in that a computer program that realizes the control method according to any one of claims 1 to 4 is stored and can be loaded and executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410038362.3A CN117555293B (en) | 2024-01-11 | 2024-01-11 | Control method and system of motion controller, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410038362.3A CN117555293B (en) | 2024-01-11 | 2024-01-11 | Control method and system of motion controller, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117555293A CN117555293A (en) | 2024-02-13 |
CN117555293B true CN117555293B (en) | 2024-04-16 |
Family
ID=89816992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410038362.3A Active CN117555293B (en) | 2024-01-11 | 2024-01-11 | Control method and system of motion controller, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117555293B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118112993A (en) * | 2024-04-29 | 2024-05-31 | 禾马(苏州)智能科技有限公司 | Control method and system for controlling multi-axis linkage driving of servo driver |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101615024A (en) * | 2009-07-23 | 2009-12-30 | 哈尔滨工业大学 | Five-coordinate numerally controlled machine tool motion controller with NURBS interpolation function |
CN115933538A (en) * | 2022-12-14 | 2023-04-07 | 富联裕展科技(深圳)有限公司 | Equipment control method and system |
CN116512255A (en) * | 2023-04-18 | 2023-08-01 | 深圳市中科银狐机器人有限公司 | Real-time planning method and system for motion trail of arm type robot |
CN116774648A (en) * | 2023-08-16 | 2023-09-19 | 通用技术集团机床工程研究院有限公司 | Speed planning method, device, machine tool control system and storage medium |
CN117301063A (en) * | 2023-10-25 | 2023-12-29 | 五邑大学 | Industrial robot online look-ahead track planning method, electronic equipment and storage medium |
-
2024
- 2024-01-11 CN CN202410038362.3A patent/CN117555293B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101615024A (en) * | 2009-07-23 | 2009-12-30 | 哈尔滨工业大学 | Five-coordinate numerally controlled machine tool motion controller with NURBS interpolation function |
CN115933538A (en) * | 2022-12-14 | 2023-04-07 | 富联裕展科技(深圳)有限公司 | Equipment control method and system |
CN116512255A (en) * | 2023-04-18 | 2023-08-01 | 深圳市中科银狐机器人有限公司 | Real-time planning method and system for motion trail of arm type robot |
CN116774648A (en) * | 2023-08-16 | 2023-09-19 | 通用技术集团机床工程研究院有限公司 | Speed planning method, device, machine tool control system and storage medium |
CN117301063A (en) * | 2023-10-25 | 2023-12-29 | 五邑大学 | Industrial robot online look-ahead track planning method, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117555293A (en) | 2024-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117555293B (en) | Control method and system of motion controller, electronic equipment and storage medium | |
CN110355751B (en) | Control device and machine learning device | |
EP0144442B1 (en) | Method of controlling industrial robot along arc | |
KR101928419B1 (en) | Tool Path Generation Method and Machine Tool | |
CN101957611B (en) | Spline real-time interpolation method | |
JP6585666B2 (en) | Robot for performing learning control in an application that requires constant speed and its control method | |
US4792889A (en) | Device and method for determining workpiece contours | |
CN103180791A (en) | Control device, control system and control method | |
JP5417390B2 (en) | Numerical controller | |
JP5425342B1 (en) | Numerical controller | |
US9958856B2 (en) | Robot, robot control method and robot control program | |
CN111775145B (en) | Control system of serial-parallel robot | |
CN102243486A (en) | Numerical controller for multi-axis machine tool | |
CN104731017A (en) | Numerical controller for smoothing tool path in operation based on table format data | |
JPWO2012056554A1 (en) | Tool path generation method and generation apparatus | |
KR102405096B1 (en) | Method for commanding an automated work cell | |
JP4431880B2 (en) | NC post processor for multi-axis numerical controller | |
CN108829032B (en) | Interpolation method for high-precision control | |
CN109388099B (en) | Machining of workpieces with model-supported error compensation | |
US5412300A (en) | Numerical control device and method for control of movement of a tool | |
CN107966954B (en) | Computer digital control method and system | |
JP4392533B2 (en) | Numerically controlled curved surface processing equipment | |
WO2022138843A1 (en) | Numerical control device | |
US20090125142A1 (en) | Numerically controlled grinding machine and process for controlling same | |
CN112292238B (en) | Method and system for transferring end effector of robot between one end effector pose and another end effector pose |
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 |