Three-dimensional galvanometer correction method and laser equipment
By establishing the RZ mapping relationship and calculating the grid intersection, the XYZ correlation correction of the three-dimensional galvanometer is realized, which solves the problem of inconsistent focal length in the existing technology and improves the processing accuracy and efficiency of the laser equipment.
Patent Information
- Application Number
- CN202211736887.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The existing three-dimensional galvanometer correction method of laser equipment only performs XY correction, which cannot effectively solve the problems of processes with strict height requirements or large processing steps, resulting in inconsistent focal lengths and inability to achieve precise graphic processing.
By establishing the RZ mapping relationship between the Z value of the 3D galvanometer and the radius R, the galvanometer coordinates of the grid intersection are calculated, and the machine coordinates are obtained through camera scanning and converted into mathematical coordinates, ultimately achieving the correlation correction of XY and Z for each point.
The accuracy of 3D galvanometer correction is improved, ensuring the consistency of the XYZ relationship of each point on the plane, thereby improving processing accuracy and efficiency.
Smart Images

Figure CN116117361B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent manufacturing technology, and in particular to a three-dimensional galvanometer correction method and laser equipment. Background Art
[0002] Because galvanometers can produce distortions such as barrel, trapezoid, and parallelogram shapes, laser equipment equipped with galvanometers must first calibrate the galvanometers before processing products to ensure that the processed graphics are consistent with the theory before proceeding to the next step of debugging. The farther the processing position of a 2D galvanometer is from the center, the longer the optical path, and the focal length across the entire format is shaped like a pot lid. The processing surfaces are basically flat or multi-layered planes, making it impossible to achieve consistent focal lengths and requiring calibration. For processes with strict height requirements or large processing step differences, 3D galvanometers are required. Currently, most laser equipment manufacturers only perform XY calibration on 3D galvanometers. Summary of the Invention
[0003] In view of this, it is necessary to provide a three-dimensional galvanometer correction method and laser equipment to achieve the XY and Z correlation correction of each point of the pattern to be engraved on the plane, which improves the correction accuracy compared with the traditional galvanometer correction method.
[0004] A first aspect of the present application provides a three-dimensional galvanometer correction method, which is applied to a laser device including a three-dimensional galvanometer, wherein the three-dimensional galvanometer is mounted on a machine platform of the laser device, and the method includes: establishing an RZ mapping relationship between the Z value of the three-dimensional galvanometer and the radius R of the initial processed figure; calculating the first galvanometer coordinates of each intersection of a preset first grid based on the RZ mapping relationship; performing grid engraving based on the first galvanometer coordinates of each intersection of the preset first grid to obtain an engraved second grid; calculating the machine coordinates of each intersection of the second grid, and converting the machine coordinates of each intersection of the second grid into mathematical coordinates; converting the mathematical coordinates of any point of the figure to be engraved into second galvanometer coordinates based on the mathematical coordinates of each intersection of the second grid, thereby obtaining the second galvanometer coordinates of each point of the figure to be engraved; performing grid engraving based on the second galvanometer coordinates of each point of the figure to be engraved to obtain a processed figure.
[0005] According to one embodiment of the present application, establishing the RZ mapping relationship between the Z value of the three-dimensional galvanometer and the radius R of the initial processed graphic includes: when the Z value of the three-dimensional galvanometer is equal to 0, determining the target Z' value of the machine based on the Z' value range of the machine; adjusting the Z' value of the machine to the target Z' value, and determining the radius R corresponding to each Z value in the Z value range of the three-dimensional galvanometer; according to each Z value in the Z value range of the three-dimensional galvanometer and the radius R corresponding to each Z value, using a preset curve fitting algorithm to establish the RZ mapping relationship.
[0006] According to one embodiment of the present application, determining the target Z' value of the machine based on the Z' value range of the machine includes: determining N Z' values of the machine based on the Z' value range of the machine and a preset first interval; engraving a circle based on each Z' value of the N Z' values to obtain N circles, and the N circles correspond one-to-one to the N Z' values; obtaining the line width of each of the N circles detected by the camera; based on the line width of each of the N circles, selecting a circle corresponding to the narrowest line width from the N circles as the target circle, and using the Z' value of the machine corresponding to the target circle as the target Z' value of the machine.
[0007] According to one embodiment of the present application, determining the radius R corresponding to each Z value in the Z value range of the three-dimensional galvanometer includes: determining Q Z values of the three-dimensional galvanometer based on the Z value range of the three-dimensional galvanometer and a preset second interval; engraving M concentric circles based on each Z value of the Q Z values of the three-dimensional galvanometer; and obtaining the radius R corresponding to each Z value in the Q Z values based on the M concentric circles corresponding to each Z value in the Q Z values.
[0008] According to one embodiment of the present application, calculating the first galvanometer coordinates of each intersection of a preset first grid based on the RZ mapping relationship includes: calculating the X coordinate and Y coordinate of each intersection of the first grid with the central intersection of the first grid as the origin; obtaining the distance R from each intersection of the first grid to the origin based on the X coordinate and Y coordinate of each intersection of the first grid; obtaining the Z value of the three-dimensional galvanometer corresponding to each intersection of the first grid based on the RZ mapping relationship, thereby obtaining the first galvanometer coordinates of each intersection of the first grid.
[0009] According to one embodiment of the present application, the calculation of the machine coordinates of each intersection of the second grid and the conversion of the machine coordinates of each intersection of the second grid into mathematical coordinates include: receiving the machine coordinates of the center intersection of the second grid detected by the camera; obtaining the offset of the camera at any one of the other intersections of the second grid, and receiving the current machine coordinates of the machine detected by the camera; determining the machine coordinates of any one intersection of the second grid based on the offset of the camera and the current machine coordinates of the machine; subtracting the machine coordinates of the center intersection of the second grid from the machine coordinates of any one intersection of the second grid to obtain the mathematical coordinates of any one intersection of the second grid.
[0010] According to one embodiment of the present application, converting the mathematical coordinates of any point of the figure to be engraved into second galvanometer coordinates based on the mathematical coordinates of each intersection of the second grid includes: determining the position of any point of the figure to be engraved in the second grid according to the mathematical coordinates of any point of the figure to be engraved and the mathematical coordinates of each intersection of the second grid; determining four target points on the second grid closest to any point of the figure to be engraved based on the position of any point of the figure to be engraved in the second grid; calculating the distance ratio from any point of the figure to be engraved to the four target points; calculating the X coordinate and Y coordinate of the corresponding point of any point of the figure to be engraved in the galvanometer coordinate system according to the distance ratio from any point of the figure to be engraved to the four target points; and calculating the Z coordinate of the corresponding point of any point of the figure to be engraved in the galvanometer coordinate system based on the RZ mapping relationship according to the X coordinate and Y coordinate of the corresponding point of any point of the figure to be engraved in the galvanometer coordinate system, thereby obtaining the second galvanometer coordinates of any point of the figure to be engraved.
[0011] According to one embodiment of the present application, the determining of the four target points on the second grid that are closest to any point of the figure to be engraved; calculating the distance ratio from any point of the figure to be engraved to the four target points includes: drawing a horizontal line and a vertical line passing through any point of the figure to be engraved in the second grid, obtaining a plurality of first intersection points where the horizontal line intersects with the second grid and a plurality of second intersection points where the vertical line intersects with the second grid; determining two first target points and two second target points closest to any point of the figure to be engraved from the plurality of first intersection points and the plurality of second intersection points; respectively calculating the distance D1 between the two first target points, the distance D2 between any point of the figure to be engraved and one of the first target points, and the distance D3 between the two first target points and the distance D4 between any point of the figure to be engraved and one of the first target points. The distance D1' and the distance D1" of any point of the pattern to be engraved and the other first target point are calculated to obtain a distance ratio D1' / D1 and a distance ratio D1" / D1, and the distance ratio D1' / D1 and the distance ratio D1" / D1 are used as a first distance ratio between any point of the pattern to be engraved and the two first target points; the distance D2 between the two second target points, the distance D2' between any point of the pattern to be engraved and one of the second target points, and the distance D2" between any point of the pattern to be engraved and the other second target point are calculated respectively to obtain a distance ratio D2' / D2 and a distance ratio D2" / D2, and the distance ratio D2' / D2 and the distance ratio D2" / D2 are used as a second distance ratio between any point of the pattern to be engraved and the two first target points.
[0012] According to one embodiment of the present application, calculating the X coordinate and Y coordinate of the corresponding point of any point of the figure to be engraved in the galvanometer coordinate system according to the distance ratio from any point of the figure to be engraved to the four target points includes: calculating the X coordinate and Y coordinate of the corresponding point of any point of the figure to be engraved in the galvanometer coordinate system using an equal proportional difference method according to a first distance ratio from any point of the figure to be engraved to the two first target points and a second distance ratio from any point of the figure to be engraved to the two first target points.
[0013] A second aspect of the present application provides a laser device, comprising: a processor, wherein the processor is configured to execute at least one instruction stored in a memory to implement the three-dimensional galvanometer correction method.
[0014] Compared with the existing technology, this application first maps the Z axis and R of the three-dimensional galvanometer, and the plane correction is to engrave an n*n grid. The RZ imaging relationship is called according to the distance between the galvanometer coordinates and the origin, and the Z values of all grid intersections are calculated and engraved. The camera scans the grid intersections to obtain the corresponding machine coordinates and converts them into mathematical coordinates. Based on the mapping relationship between the galvanometer coordinates and the data coordinates, the mathematical coordinates of any point of the figure to be engraved are converted into galvanometer coordinates. Finally, the figure is engraved according to the galvanometer coordinates of each point of the figure to be engraved, realizing the correlation correction of XY and Z of each point of the figure to be engraved on the plane, which improves the correction accuracy of the galvanometer compared to the traditional galvanometer correction method. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0016] Figure 1A Shown is a block diagram of a laser device provided in an embodiment of the present application.
[0017] Figure 1B Shown is an application scenario diagram of the laser device provided in an embodiment of the present application.
[0018] Figure 2 Shown is a flow chart of a three-dimensional galvanometer correction method provided in an embodiment of the present application.
[0019] Figure 3 Give an example of the line width of a circle.
[0020] Figure 4 This example illustrates printing multiple concentric circles.
[0021] Figure 5 The first grid is illustrated as an example.
[0022] Figure 6 The second grid is illustrated as an example.
[0023] Figure 7 An example is given to illustrate the position of the mathematical coordinate point P1 in the second grid.
[0024] Figure 8 An example is given to illustrate the corresponding galvanometer coordinate P2 of the mathematical coordinate point P1 in the galvanometer coordinate system.
[0025] The following specific implementation methods will further illustrate the present application in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0026] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features therein can be combined with each other in the absence of conflict.
[0027] The following description sets forth many specific details to facilitate a full understanding of the present application. The embodiments described are only a portion of the embodiments of the present application, not all of the embodiments. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present application without creative effort are intended to fall within the scope of protection of the present application.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application.
[0029] See Figure 1A FIG. 1 is a block diagram of a laser device according to an embodiment of the present application. Figure 1B As shown in FIG. , it is an application scenario diagram of the laser device provided in the embodiment of the present application. In the embodiment of the present application, the laser device 3 includes, but is not limited to, a memory 31, at least one processor 32, a camera 33, and a three-dimensional galvanometer 34. Among them, the camera 33 and the three-dimensional galvanometer 34 are mounted on the machine 30. The three-dimensional galvanometer 34 includes an X-axis galvanometer, a Y-axis galvanometer, and a Z-axis galvanometer. The printing range of the three-dimensional galvanometer 34 is as follows: Figure 1BAs shown. In the embodiment of the present application, the coordinate system of the three-dimensional galvanometer 34 is OXYZ (hereinafter referred to as the galvanometer coordinate system), and the coordinate system of the machine 30 is O'X'Y'Z' (hereinafter referred to as the machine coordinate system). The present application also defines a mathematical coordinate system as O"X"Y"Z". That is, the difference between the machine coordinate system and the mathematical coordinate system is that the origin between the two is different. Accordingly, in the present application, the coordinates in the galvanometer coordinate system are called galvanometer coordinates, the coordinates in the machine coordinate system are called machine coordinates, and the coordinates in the mathematical coordinate system are called mathematical coordinates.
[0030] Those skilled in the art will understand that Figure 1A The structure of the laser device shown does not constitute a limitation of the embodiments of the present application. The laser device 3 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components.
[0031] In some embodiments, the laser device 3 includes a terminal that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, a dedicated integrated circuit, a programmable gate array, a digital processor, and an embedded device.
[0032] It should be noted that the laser device 3 is only an example. Other existing or future laser devices that can be adapted to the embodiments of the present application should also be included in the protection scope of the embodiments of the present application and included herein by reference.
[0033] In some embodiments, the memory 31 is used to store program codes and various data, such as the three-dimensional galvanometer correction system 311 installed in the laser device 3, and to achieve high-speed and automatic access to programs or data during the operation of the laser device 3. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable storage medium capable of carrying or storing data.
[0034] In some embodiments, at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. At least one processor 32 is the control core (Control Unit) of the laser device 3, and utilizes various interfaces and lines to connect the various components of the entire laser device 3. By running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31, the processor executes various functions of the laser device 3 and processes data, such as executing Figure 2 The 3D galvanometer correction function is shown.
[0035] Although not shown, the laser device 3 may further include a power source (e.g., a battery) for powering various components. Preferably, the power source may be logically connected to the at least one processor 32 via a power management device, thereby enabling the power management device to manage charging, discharging, and power consumption. The power source may further include one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0036] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0037] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes several instructions for enabling a laser device to execute various embodiments of the present application.
[0038] In a further embodiment, in combination Figure 1A and Figure 1B At least one processor 32 can execute the operating system of the laser device 3 and various installed application programs (such as the three-dimensional galvanometer correction system 311).
[0039] The memory 31 stores program codes, and at least one processor 32 can call the program codes stored in the memory 31 to execute related functions, thereby achieving Figure 2 The 3D galvanometer correction function is shown.
[0040] In one embodiment of the present application, the memory 31 stores one or more instructions (ie, at least one instruction), and the at least one instruction is executed by at least one processor 32 to implement Figure 2 The purpose of 3D galvanometer correction is shown.
[0041] In one embodiment of the present application, the three-dimensional galvanometer correction system 311 can be divided into one or more program modules according to the functions to be implemented. The one or more program modules are stored in the memory 31. When the one or more program modules are executed by at least one processor 32, the functions to be implemented are realized. Figure 2 The purpose of 3D galvanometer correction is shown.
[0042] See also Figure 2 , which is a flow chart of a three-dimensional galvanometer correction method provided in an embodiment of the present application.
[0043] In this embodiment, the three-dimensional galvanometer correction method can be applied to a laser device including a three-dimensional galvanometer (eg Figure 1A In the laser device 3) shown, for laser devices that require three-dimensional galvanometer correction, the three-dimensional galvanometer correction function provided by the method of the embodiment of the present application can be directly integrated on the laser device, or run on the laser device in the form of a software development kit (SDK).
[0044] like Figure 2 As shown, the three-dimensional galvanometer correction method provided in the embodiment of the present application specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0045] Step S1: establishing an RZ mapping relationship between the Z value of the three-dimensional galvanometer and the radius R of the initial processing figure.
[0046] In the embodiment of the present application, the Z value of the three-dimensional galvanometer is also the Z coordinate of the three-dimensional galvanometer in the three-dimensional coordinates of the galvanometer coordinate system.
[0047] In one embodiment, the initial processing shape is a circle.
[0048] In one embodiment, establishing the RZ relationship between the Z value of the 3D galvanometer and the radius R of the initial processed pattern includes steps (a1) to (a3):
[0049] (a1) When the Z value of the 3D galvanometer is equal to 0, determine the target Z' value of the machine based on the Z' value range of the laser equipment machine;
[0050] (a2) Adjusting the Z' value of the machine to the target Z' value and determining the radius R corresponding to each Z value in the Z value range of the 3D galvanometer;
[0051] (a3) According to each Z value in the Z value range of the three-dimensional galvanometer and the radius R corresponding to each Z value, a preset curve fitting algorithm is used to establish an RZ mapping relationship.
[0052] In this embodiment, in step (a1), determining the target Z' value of the machine based on the Z' value range of the machine includes:
[0053] Determine N Z' values of the machine based on the Z' value range of the machine and a preset first interval; engrave a circle based on each of the N Z' values of the machine to obtain N circles, and the N circles correspond one-to-one to the N Z' values of the machine; detect the line width of each of the N circles through the camera of the laser device; determine a target circle from the N circles based on the line width of each of the N circles, and use the Z' value of the machine corresponding to the target circle as the target Z' value of the machine.
[0054] In one embodiment, N is a positive integer greater than 1. For example, if the Z' value range of the machine is [1, 10] and the preset first interval is 1 mm, then N can be determined to be 10, and 10 Z' values of the machine can be determined, and the 10 Z' values are respectively equal to 1 mm, 2 mm, 3 mm, 4 mm, ..., 10 mm.
[0055] In one embodiment, a circle is engraved based on each of the N Z' values of the machine. That is, under the premise that the Z value of the 3D galvanometer is equal to 0, the laser device prints a circle at each Z' value of the machine.
[0056] In one embodiment, the radius of each printed circle may be equal to 1 / 2 of the maximum format of the 3D galvanometer. For example, assuming the maximum format of the 3D galvanometer is 50*50, then the radius of each printed circle R=50 / 2, i.e., 25 mm.
[0057] In one embodiment, the line width of each circle is W1 = D1 - D1 ', wherein D1 represents the distance from the outer contour of each circle to the center of the circle, and D1 ' represents the distance from the inner contour of each circle to the center of the circle.
[0058] For example, see Figure 3 As shown, assuming that the distance from the outer contour of the printed circle C to the center is D1 and the distance from the inner contour to the center is D1' detected by the camera, then the line width W1 of the circle C is the value of D1-D1'.
[0059] The embodiment of the present application carves a circle based on each of the N Z' values of the machine, determines the circle corresponding to the narrowest line width as the target circle, and uses the Z' value of the machine corresponding to the target circle as the target Z' value of the machine. This can quickly determine the target Z' value of the machine, is simple to operate, and facilitates the determination of the target Z' value of the machine during the calibration process of the three-dimensional galvanometer.
[0060] In one embodiment, the laser device determines the circle corresponding to the narrowest line width among the N circles as the target circle.
[0061] In this embodiment, in step (a2), after the Z' value of the machine is adjusted to the target Z' value, determining the radius R corresponding to each Z value in the Z value range of the three-dimensional galvanometer includes: determining Q Z values of the three-dimensional galvanometer based on the Z value range of the three-dimensional galvanometer and a preset second interval; engraving M concentric circles based on each Z value of the Q Z values of the three-dimensional galvanometer; and obtaining the radius R corresponding to each Z value in the Q Z values based on the M concentric circles corresponding to each Z value in the Q Z values.
[0062] In one embodiment, Q is a positive integer greater than or equal to 1. For example, taking the Z value range of the 3D galvanometer as [-10, 10] and the preset second interval as 1 mm, 20 Z values of the 3D galvanometer can be determined, including Z values equal to -10 mm, -9 mm, ..., 9 mm, and 10 mm, respectively.
[0063] In one embodiment, M concentric circles are engraved based on each of the Q Z values of the three-dimensional galvanometer. That is, under the premise that the Z' value of the machine is adjusted to the target Z' value, at each of the Q Z values of the three-dimensional galvanometer, the laser device engraves M concentric circles, that is, each Z value corresponds to M concentric circles.
[0064] In one embodiment, M can be determined based on the maximum amplitude of the 3D galvanometer and the preset second interval. For example, assuming the maximum amplitude of the 3D galvanometer is 50*50 and the preset second interval is 1mm, then M=50, that is, at each Z value of the 3D galvanometer, 50 concentric circles are printed. The radii of the 50 concentric circles are 1mm, 2mm, 3mm...49mm, 50mm, for example. Figure 4 It should be noted that, in order to clearly and simply explain this application, Figure 4 Only 9 concentric circles are illustrated.
[0065] In one embodiment, obtaining a radius R corresponding to each of the Q Z values based on the M concentric circles corresponding to each of the Q Z values includes: for each of the M concentric circles corresponding to any one of the Q Z values, detecting a line width of each concentric circle using a camera; determining a target concentric circle from the M concentric circles corresponding to any one of the Z values based on the line width of each concentric circle; and using the radius R of the target concentric circle as the radius R corresponding to any one of the Z values.
[0066] In one embodiment, the line width W2 of any concentric circle among the M concentric circles corresponding to any Z value is W2=D2-D2', where D2 represents the distance from the outer contour of any concentric circle to the center of the circle, and D2' represents the distance from the inner contour of any concentric circle to the center of the circle.
[0067] In one embodiment, the laser device determines the concentric circle corresponding to the narrowest line width among the M concentric circles corresponding to any Z value as the target concentric circle.
[0068] In an embodiment of the present application, after the Z' value of the machine is adjusted to the target Z' value, M concentric circles are engraved based on each Z value of the three-dimensional galvanometer, and the concentric circle corresponding to the narrowest line width among the M concentric circles corresponding to any Z value of the three-dimensional galvanometer is determined as the target concentric circle, and the radius R of the target concentric circle is used as the radius R corresponding to any Z value of the three-dimensional galvanometer. In this way, the radius R of the circle that is most suitable for printing at each Z value of the three-dimensional galvanometer can be quickly determined.
[0069] In one embodiment, in step (a3), the preset curve fitting algorithm can be the least squares method. The RZ mapping relationship can be expressed as Z = A*R^4+B*R^3+C*R^2+D*R+E. Among them, A, B, C, D, and E are known coefficients. In the embodiment of the present application, considering that when the 3D galvanometer is engraved on a large scale, the focal length is in the shape of a pot cover and is not in the same plane, and the galvanometer itself has various distortions, so when performing plane correction, the focus Z-axis factor is taken into account and an RZ mapping relationship is constructed. Subsequently, the Z-axis coordinate of the galvanometer can be determined according to the RZ mapping relationship to achieve Z-direction correction of the galvanometer.
[0070] Step S2: The laser device calculates the first galvanometer coordinates of each intersection point of the preset first grid based on the RZ mapping relationship.
[0071] In one embodiment, the first grid may be a two-dimensional grid including H rows and 1 columns. For example, the first grid includes 9 rows and 9 columns, and the smallest grid unit of the first grid is a square with a side length of a preset value, such as 1 mm. Figure 5 The first grid g1 is shown.
[0072] In one embodiment, calculating the first galvanometer coordinates of each intersection of a preset first grid based on an RZ mapping relationship includes: calculating the X coordinate and Y coordinate of each intersection of the first grid with the central intersection of the first grid as the origin; obtaining the distance R from each intersection of the first grid to the origin based on the X coordinate and Y coordinate of each intersection of the first grid; and obtaining the Z value of the three-dimensional galvanometer corresponding to each intersection of the first grid based on the RZ mapping relationship, thereby obtaining the first galvanometer coordinates of each intersection of the first grid.
[0073] For example, combining Figure 5As shown, taking the smallest grid unit of the first grid g1 as a square with a side length of 1mm as an example, and taking the central intersection of the first grid g1 as the origin, it can be calculated that the horizontal coordinate X1 corresponding to the intersection P1 is equal to 1, and the vertical coordinate Y1 is equal to 1. According to the Pythagorean theorem, the distance R from the intersection P1 to the origin can be obtained. Based on the distance R from the intersection P1 to the origin and the RZ mapping relationship, the Z value of the three-dimensional galvanometer corresponding to the intersection P1 can be obtained. Assuming it is Z1, the first galvanometer coordinate corresponding to the intersection P1 is (X1, Y1, Z1). In this way, the first galvanometer coordinates of each other intersection of the first grid g1 can be obtained.
[0074] Step S3: The laser device performs grid engraving based on the first galvanometer coordinates of each intersection of the preset first grid to obtain an engraved second grid.
[0075] For example, see Figure 6 As shown, the laser device performs grid engraving based on the first galvanometer coordinates of each intersection of the first grid g1 to obtain the engraved second grid g2. Figure 6 It can be seen that the carved figures are distorted.
[0076] Step S4: The laser device calculates the machine coordinates of each intersection point of the second grid, and converts the machine coordinates of each intersection point of the second grid into mathematical coordinates.
[0077] In one embodiment, calculating the machine coordinates of each intersection point of the second grid and converting the machine coordinates of each intersection point of the second grid into mathematical coordinates includes: obtaining the machine coordinates of the central intersection point of the second grid; and determining the mathematical coordinates of other intersection points in the second grid based on the machine coordinates of the central intersection point of the second grid.
[0078] In this embodiment, the laser device uses the camera's crosshairs to locate the center intersection point PO' of the second grid and obtain the machine coordinates (x0', y0', z0') of the center intersection point PO' of the second grid. In one embodiment, the machine coordinates of the center intersection point PO' can be read when the camera's crosshairs are aligned with the center intersection point PO' of the second grid.
[0079] In one embodiment, determining the mathematical coordinates of any one of the other intersections in the second grid includes: controlling the movement of the machine so that the crosshairs of the camera are aligned with the position of any intersection, obtaining the current offset of the camera and reading the current machine coordinates of the machine; determining the machine coordinates of any one of the intersections based on the current offset of the camera and the current machine coordinates of the machine; subtracting the machine coordinates of the center intersection of the second grid from the machine coordinates of any one of the intersections to obtain the mathematical coordinates of any one of the intersections.
[0080] In one embodiment, the laser device can control the movement of the machine according to the set movement interval and movement times, so that the crosshairs of the camera are aligned with the position of any intersection.
[0081] For example, see Figure 6 As shown, assuming that the camera is currently aimed at the center intersection PO', the machine coordinates (x0', y0', z0') of the center intersection PO' are obtained. Assuming that the movement interval of the machine each time is 1 mm, the camera can be aimed at the position of the intersection P1' by controlling the machine to move up once and to the right once. At this time, the current offset of the camera is read, for example (Δx, Δy) and the current machine coordinates of the machine are read (x1', y1', z1'). Based on the current offset of the camera (Δx, Δy) and the current machine coordinates of the machine (x1', y1', z1'), the machine coordinates of the intersection P1' (x1'+Δx, y1'+Δy, z1') can be obtained. The laser device subtracts the machine coordinates of the center intersection point PO' (x0', y0', z0') from the machine coordinates of intersection point P1' (x1'+Δx, y1'+Δy, z1') to obtain the mathematical coordinates of intersection point P1' (x1'+Δx-x0', y1'+Δy-y0', z1'). It should be noted that the X-axis and Y-axis coordinates of the machine coordinates of intersection point P1' are subtracted from the X-axis and Y-axis coordinates of the machine coordinates of the center intersection point PO'; the Z-axis coordinate remains unchanged.
[0082] Step S5: giving the mathematical coordinates of any point of the figure to be engraved, and converting the mathematical coordinates of any point of the figure to be engraved into second galvanometer coordinates based on the mathematical coordinates of each intersection point of the second grid, thereby obtaining the second galvanometer coordinates of each point of the figure to be engraved.
[0083] In one embodiment, converting the mathematical coordinates of any point of the pattern to be engraved into the second galvanometer coordinates based on the mathematical coordinates of each intersection point of the second grid includes (b1)-(b5):
[0084] (b1) determining the position of any point of the pattern to be engraved in the second grid according to the mathematical coordinates of any point of the pattern to be engraved and the mathematical coordinates of each intersection point of the second grid;
[0085] (b2) determining, based on the position of the arbitrary point in the second grid, four target points on the second grid that are closest to the arbitrary point;
[0086] (b3) Calculate the distance ratio from any point to the four target points;
[0087] (b4) Calculate the X and Y coordinates of the corresponding point of any point in the galvanometer coordinate system based on the distance ratio between any point and the four target points;
[0088] (b5) According to the X coordinate and Y coordinate of the corresponding point of any point in the galvanometer coordinate system, based on the RZ mapping relationship, the Z coordinate of the corresponding point of any point in the galvanometer coordinate system is calculated, thereby obtaining the second galvanometer coordinate of any point.
[0089] In one embodiment, in step (b2), taking any point P1 as an example, based on the position of the any point P1 in the second grid, determining the four target points closest to the any point P1 on the second grid includes:
[0090] In the second grid, draw a horizontal line and a vertical line through any point P1, obtain N1 first intersection points where the horizontal line intersects the second grid, and determine the two first target points closest to any point P1 from the N1 first intersection points; obtain N2 second intersection points where the vertical line intersects the second grid, and determine the two second target points closest to any point P1 from the N2 second intersection points; the two first target points and the two second target points are used as the four target points closest to any point P1.
[0091] For example, see Figure 7 As shown, a horizontal line L1 and a vertical line L2 are drawn from the second grid g2 through any point P1. This can obtain multiple first intersection points between the horizontal line L1 and the second grid g2, as well as multiple second intersection points between the vertical line L2 and the second grid g2. In one embodiment, the laser device selects a first intersection point (e.g., the first intersection point) that is located to the left of any point P1 and closest to any point P1 from the multiple first intersection points. Figure 7 As shown in FIG1 , a first target point is set as the first intersection point (eg, P11) located on the right side of any point P1 and closest to any point P1. Figure 7 P12) shown is used as another first target point, thereby obtaining two first target points.
[0092] In one embodiment, the laser device selects a second intersection point (eg, Figure 7 As shown in FIG. 13 ), a second target point is taken as a second intersection point (eg, P13) located below and closest to any point P1. Figure 7 P14) shown is used as another second target point, thereby obtaining two second target points.
[0093] In one embodiment, in step (b3), calculating the distance ratio from any point to the four target points includes: obtaining a first distance ratio based on two first target points; and obtaining a second distance ratio based on two second target points.
[0094] In one embodiment, obtaining a first distance ratio based on two first target points includes: calculating the distance D1 between the two first target points and calculating the distance D1' between any point P1 and one of the first target points to obtain a distance ratio D1' / D1; calculating the distance D1" between any point P1 and another first target point to obtain a distance ratio D1" / D1, and using the distance ratio D1' / D1 and the distance ratio D1" / D1 as the first distance ratio.
[0095] In one embodiment, obtaining a second distance ratio based on two second target points includes: calculating the distance D2 between the two second target points and calculating the distance D2' between any point P1 and one of the second target points to obtain a distance ratio D2' / D2; calculating the distance D2" between any point P1 and another second target point to obtain a distance ratio D2" / D1, and using the distance ratio D2' / D1 and the distance ratio D2" / D1 as the second distance ratio. That is, the distance ratios from any point to the four target points include the distance ratio D1' / D1, the distance ratio D1" / D1, the distance ratio D2' / D1, and the distance ratio D2" / D1.
[0096] In one embodiment, the laser device can calculate the corresponding point (e.g., Figure 8 The X and Y coordinates of P2) are shown.
[0097] In one embodiment, the distance R from any point P1 to the origin is calculated based on the X coordinate and Y coordinate of the corresponding point of any point P1 in the galvanometer coordinate system; based on the RZ mapping relationship, the Z coordinate of the corresponding point of any point P1 in the galvanometer coordinate system is calculated, thereby obtaining the second galvanometer coordinate of any point P1.
[0098] In the embodiment of the present application, the correlation correction of XY and Z of each point of the pattern to be engraved on the plane is achieved, which improves the correction accuracy compared with the traditional galvanometer correction method.
[0099] In the embodiment of the present application, compared with traditional 3D galvanometer correction, the relationship between the correction graphics XYZ is reflected in the grid intersection engraving, rather than the two being independent and affecting each other, thereby improving the accuracy of correction.
[0100] Step S6: The laser device performs grid engraving based on the second galvanometer coordinates of each point of the pattern to be engraved to obtain the engraved processed pattern.
[0101] The above-mentioned three-dimensional galvanometer correction method first establishes an RZ mapping relationship, calculates the first galvanometer coordinates of each intersection of a preset first grid based on the RZ mapping relationship, and obtains a second grid engraved based on the first galvanometer coordinates of each intersection of the preset first grid; calculates the machine coordinates of each intersection of the second grid, and converts the machine coordinates of each intersection of the second grid into mathematical coordinates; gives the mathematical coordinates of any point of the figure to be engraved, and converts the mathematical coordinates of any point of the figure to be engraved into second galvanometer coordinates based on the mathematical coordinates of each intersection of the second grid, thereby obtaining the second galvanometer coordinates of each point of the figure to be engraved; performs grid engraving based on the second galvanometer coordinates of each point of the figure to be engraved to obtain a processed figure, which can quickly realize 3D galvanometer XYZ correction and improve work efficiency.
[0102] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.
[0103] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0104] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0105] It is obvious to those skilled in the art that the embodiments of the present application are not limited to the details of the above exemplary embodiments, and that the embodiments of the present application can be implemented in other specific forms without departing from the spirit or essential features of the embodiments of the present application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the embodiments of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the embodiments of the present application. Any figure mark in the claims should not be regarded as limiting the claim involved.
[0106] In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. The multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. In addition, in the embodiment of the present application, "at least one" refers to one or more, and "plurality" refers to two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the description, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application and are not limiting. Although the embodiments of the present application are described in detail with reference to the preferred embodiments, ordinary technicians in this field should understand that the technical solutions of the embodiments of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A three-dimensional galvanometer calibration method, applied to a laser device including a three-dimensional galvanometer, wherein the three-dimensional galvanometer is mounted on a machine platform of the laser device, characterized in that: The method comprises: Establishing an RZ mapping relationship between the Z value of the three-dimensional galvanometer and the radius R of the initial processing figure; Calculate the first galvanometer coordinates of each intersection point of a preset first grid based on the RZ mapping relationship; Performing grid engraving based on the first galvanometer coordinates of each intersection point of the preset first grid to obtain an engraved second grid; calculating the machine coordinates of each intersection point of the second grid, and converting the machine coordinates of each intersection point of the second grid into mathematical coordinates; Converting the mathematical coordinates of any point of the pattern to be engraved into second galvanometer coordinates based on the mathematical coordinates of each intersection point of the second grid, thereby obtaining the second galvanometer coordinates of each point of the pattern to be engraved; Grid engraving is performed based on the second galvanometer coordinates of each point of the pattern to be engraved to obtain a processed pattern.
2. The three-dimensional galvanometer calibration method according to claim 1, wherein: The establishing of the RZ mapping relationship between the Z value of the three-dimensional galvanometer and the radius R of the initial processing pattern includes: When the Z value of the three-dimensional galvanometer is equal to 0, determining the target Z' value of the machine based on the Z' value range of the machine; Adjusting the Z' value of the machine to the target Z' value, and determining the radius R corresponding to each Z value in the Z value range of the three-dimensional galvanometer; The RZ mapping relationship is established using a preset curve fitting algorithm according to each Z value in the Z value range of the three-dimensional galvanometer and the radius R corresponding to each Z value.
3. The three-dimensional galvanometer calibration method according to claim 2, wherein: Determining a target Z' value of the machine based on the Z' value range of the machine includes: Determining N Z' values of the machine based on the Z' value range of the machine and a preset first interval; Carving a circle based on each of the N Z' values to obtain N circles, wherein the N circles correspond one to one to the N Z' values; Obtaining the line width of each of the N circles detected by the camera; According to the line width of each circle in the N circles, a circle corresponding to the narrowest line width is selected from the N circles as a target circle, and the Z' value of the machine corresponding to the target circle is used as the target Z' value of the machine.
4. The three-dimensional galvanometer calibration method according to claim 2, wherein: Determining the radius R corresponding to each Z value in the Z value range of the three-dimensional galvanometer includes: Determining Q Z values of the three-dimensional galvanometer based on the Z value range of the three-dimensional galvanometer and a preset second interval; Carving M concentric circles based on each of Q Z values of the three-dimensional galvanometer; A radius R corresponding to each of the Q Z values is obtained based on the M concentric circles corresponding to each of the Q Z values.
5. The three-dimensional galvanometer calibration method according to claim 1, wherein: Calculating the first galvanometer coordinates of each intersection point of the preset first grid based on the RZ mapping relationship includes: Calculate the X coordinate and Y coordinate of each intersection point of the first grid with the central intersection point of the first grid as the origin; Obtaining a distance R from each intersection point of the first grid to the origin based on an X coordinate and a Y coordinate of each intersection point of the first grid; The Z value of the three-dimensional galvanometer corresponding to each intersection of the first grid is obtained based on the RZ mapping relationship, thereby obtaining the first galvanometer coordinates of each intersection of the first grid.
6. The three-dimensional galvanometer calibration method according to claim 1, wherein: Calculating the machine coordinates of each intersection point of the second grid and converting the machine coordinates of each intersection point of the second grid into mathematical coordinates includes: receiving the machine coordinates of the central intersection of the second grid detected by the camera; Obtaining an offset of the camera at any one of the other intersections of the second grid, and receiving the current machine coordinates of the machine detected by the camera; Determining the machine coordinates of any intersection point of the second grid based on the camera offset and the current machine coordinates of the machine; The mathematical coordinates of any intersection point of the second grid are obtained by subtracting the machine coordinates of the central intersection point of the second grid from the machine coordinates of any intersection point of the second grid.
7. The three-dimensional galvanometer calibration method according to claim 1, wherein: The converting the mathematical coordinates of any point of the to-be-engraved pattern into the second galvanometer coordinates based on the mathematical coordinates of each intersection point of the second grid comprises: Determining a position of any point of the pattern to be engraved in the second grid according to the mathematical coordinates of any point of the pattern to be engraved and the mathematical coordinates of each intersection point of the second grid; Based on the position of any point of the pattern to be engraved in the second grid, determining four target points on the second grid that are closest to any point of the pattern to be engraved; Calculating the distance ratio between any point of the pattern to be engraved and the four target points; Calculate the X coordinate and Y coordinate of the corresponding point of any point of the pattern to be engraved in the galvanometer coordinate system according to the distance ratio between any point of the pattern to be engraved and the four target points; According to the X coordinate and Y coordinate of the corresponding point of any point of the pattern to be engraved in the galvanometer coordinate system, based on the RZ mapping relationship, the Z coordinate of the corresponding point of any point of the pattern to be engraved in the galvanometer coordinate system is calculated, thereby obtaining the second galvanometer coordinate of any point of the pattern to be engraved.
8. The three-dimensional galvanometer calibration method according to claim 7, wherein: Determining four target points on the second grid that are closest to any point of the pattern to be engraved; Calculating the distance ratio between any point of the to-be-engraved figure and the four target points includes: Drawing a horizontal line and a vertical line passing through any point of the pattern to be engraved in the second grid, respectively, to obtain a plurality of first intersection points where the horizontal line intersects the second grid, and a plurality of second intersection points where the vertical line intersects the second grid; Determining two first target points and two second target points closest to any point of the pattern to be engraved from the plurality of first intersection points and the plurality of second intersection points respectively; Calculate the distance D1 between the two first target points, the distance D1' between any point of the pattern to be engraved and one of the first target points, and the distance D1", between any point of the pattern to be engraved and the other first target point, to obtain a distance ratio D1' / D1 and a distance ratio D1", / D1, and use the distance ratio D1' / D1 and the distance ratio D1", / D1 as a first distance ratio between any point of the pattern to be engraved and the two first target points; Calculate the distance D2 between the two second target points, the distance D2' between any point of the pattern to be engraved and one of the second target points, and the distance D2", between any point of the pattern to be engraved and the other second target point, to obtain a distance ratio D2' / D2 and a distance ratio D2", / D2. The distance ratio D2' / D2 and the distance ratio D2", / D2 are used as the second distance ratio from any point of the pattern to be engraved to the two first target points.
9. The three-dimensional galvanometer calibration method according to claim 8, wherein: Calculating the X coordinate and Y coordinate of a corresponding point of any point of the pattern to be engraved in the galvanometer coordinate system according to the distance ratio between any point of the pattern to be engraved and the four target points includes: According to a first distance ratio from any point of the pattern to be engraved to the two first target points and a second distance ratio from any point of the pattern to be engraved to the two first target points, the X coordinate and Y coordinate of the corresponding point of any point of the pattern to be engraved in the galvanometer coordinate system are calculated using an equal proportional difference method.
10. A laser device, characterized in that: The laser device includes a processor, and the processor is used to execute at least one instruction stored in a memory to implement the three-dimensional galvanometer correction method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Three-dimensional laser marking method and device and storage medium
CN108015428A
Galvanometer type laser processing grid zoning compensation method
CN110193673A