Cylindrical surface marking method, device, electronic device and readable storage medium
By obtaining the coordinates and focal length of the marking point on the cylindrical surface and controlling the galvanometer marking pattern, the problem of low marking accuracy of the 2D galvanometer on the cylindrical surface is solved, and precise positioning and high-precision marking are achieved.
Patent Information
- Application Number
- CN202211313664.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-10-25
AI Technical Summary
In the prior art, when marking on the cylindrical surface through a 2D galvanometer, the marking accuracy is low, resulting in deviations from the processing size and theoretical size.
Obtain the coordinates of the marking point of the figure to be marked on the target cylindrical surface, and determine that the focal length of the marking point is the vertical distance between the marking point and the focal point of the galvanometer. The figure is marked on the cylindrical surface by controlling the galvanometer, and the coordinates and focal length of the marking point are used for precise positioning.
The accuracy of marking the 2D galvanometer on the cylindrical surface is improved, and the dimensional deviation caused by the spatial deformation of the planar figure is overcome, thus achieving the purpose of accurately positioning the marking points.
Smart Images

Figure CN115815818B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser marking technology, and in particular to a cylindrical surface marking method, device, electronic device and readable storage medium. Background Art
[0002] With the continuous development of laser marking technology, laser marking is being applied in more and more fields, such as laser welding, laser marking, laser cutting and laser treatment. During laser marking, in order to ensure marking accuracy, a high-speed scanning galvanometer (Galvo scanning system) is usually used to control the direction of the laser. At present, for laser marking of cylindrical surfaces, 3D galvanometers are generally used for spatial laser marking. However, the cost of 3D galvanometers is relatively expensive. Therefore, 2D galvanometers used for plane laser marking are occasionally used for cylindrical surface marking. However, due to the deformation of plane figures in space, there will be a deviation between the processed size and the theoretical size. Therefore, the current marking accuracy of cylindrical surfaces using 2D galvanometers is low. Summary of the Invention
[0003] The main purpose of this application is to provide a cylindrical surface marking method, device, electronic device and readable storage medium, aiming to solve the technical problem of low marking accuracy on cylindrical surfaces using 2D galvanometers in the prior art.
[0004] To achieve the above objectives, the present application provides a cylindrical surface marking method, which comprises:
[0005] Obtaining the coordinates of at least one marking point of the pattern to be marked on the target cylindrical surface;
[0006] Determine the corresponding marking point focal length according to the coordinates of each marking point, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer;
[0007] According to the focal length of each marking point and the coordinates of each marking point, the target galvanometer is controlled to mark the pattern to be marked on the target cylindrical surface.
[0008] Optionally, the step of obtaining the coordinates of the marking points of the pattern to be marked on the target cylindrical surface includes:
[0009] Obtaining the initial coordinates of the positioning points of the graphic to be marked;
[0010] The initial coordinates of the positioning point are converted into marking point coordinates, wherein the marking point coordinates are used to represent the spatial position of the marking point of the pattern to be marked on the target cylindrical surface.
[0011] Optionally, the step of converting the initial coordinates of the positioning point into the coordinates of the marking point includes:
[0012] Obtaining the coordinates of the center point of the target cylindrical surface and the center point of the target galvanometer;
[0013] Determine the center point distance based on the coordinates of the center point of the cylindrical surface and the coordinates of the center point of the galvanometer;
[0014] The coordinates of the marking point are calculated based on the center point distance and the initial coordinates of the positioning point.
[0015] Optionally, before the step of obtaining the initial coordinates of the positioning points of the pattern to be marked, the cylindrical surface marking method further comprises:
[0016] Acquire a graphic to be marked input by a user, wherein the graphic to be marked includes at least one marking simulation point;
[0017] The positioning point simulation coordinates of the simulation positioning point are selected from each of the marked simulation points as the positioning point starting coordinates.
[0018] Optionally, the step of determining the focal length of the corresponding marking point according to the coordinates of each marking point includes:
[0019] Calculating a focal depth correction parameter of at least one marking point on the cylindrical surface according to the coordinates of each marking point;
[0020] According to each of the focal depth correction parameters, the focal length of the galvanometer mirror of the corresponding marking point is corrected to obtain the focal length of each marking point.
[0021] Optionally, the step of controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to the focal length of each marking point and the coordinates of each marking point includes:
[0022] generating at least one positioning control signal according to the coordinates of each marking point and the corresponding focal length of the marking point;
[0023] According to each of the positioning control signals and the corresponding marking control signal, the target galvanometer is controlled to mark the pattern to be marked on the target cylindrical surface.
[0024] Optionally, the step of controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to each of the positioning control signals and the corresponding marking control signal further includes:
[0025] In response to a cylindrical surface marking planning operation on a preset marking interface, obtaining graphic marking path planning information of the graphic to be marked;
[0026] matching a signal execution strategy for each of the positioning control signals and the corresponding positioning control signal based on the graphic marking path planning information;
[0027] According to the signal execution strategy, each of the positioning control signals and the corresponding marking control signal is executed to mark the pattern to be marked on the target cylindrical surface based on the target galvanometer.
[0028] To achieve the above-mentioned purpose, the present application further provides a cylindrical surface marking device, the cylindrical surface marking device comprising:
[0029] An acquisition module, used to acquire the coordinates of at least one marking point of the pattern to be marked on the target cylindrical surface;
[0030] A determination module, configured to determine a corresponding marking point focal length according to the coordinates of each marking point, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer;
[0031] The control module is used to control the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to the focal length of each marking point and the coordinates of each marking point.
[0032] Optionally, the acquisition module is further configured to:
[0033] Obtaining the initial coordinates of the positioning points of the graphic to be marked;
[0034] The initial coordinates of the positioning point are converted into marking point coordinates, wherein the marking point coordinates are used to represent the spatial position of the marking point of the pattern to be marked on the target cylindrical surface.
[0035] Optionally, the acquisition module is further configured to:
[0036] Obtaining the coordinates of the center point of the target cylindrical surface and the center point of the target galvanometer;
[0037] Determine the center point distance based on the coordinates of the center point of the cylindrical surface and the coordinates of the center point of the galvanometer;
[0038] The coordinates of the marking point are calculated based on the center point distance and the initial coordinates of the positioning point.
[0039] Optionally, the cylindrical surface marking device is further used for:
[0040] Acquire a graphic to be marked input by a user, wherein the graphic to be marked includes at least one marking simulation point;
[0041] The positioning point simulation coordinates of the simulation positioning point are selected from each of the marked simulation points as the positioning point starting coordinates.
[0042] Optionally, the determining module is further configured to:
[0043] Calculating a focal depth correction parameter of at least one marking point on the cylindrical surface according to the coordinates of each marking point;
[0044] According to each of the focal depth correction parameters, the focal length of the galvanometer mirror of the corresponding marking point is corrected to obtain the focal length of each marking point.
[0045] Optionally, the control module is further configured to:
[0046] generating at least one positioning control signal according to the coordinates of each marking point and the corresponding focal length of the marking point;
[0047] According to each of the positioning control signals and the corresponding marking control signal, the target galvanometer is controlled to mark the pattern to be marked on the target cylindrical surface.
[0048] Optionally, the cylindrical surface marking device is further used for:
[0049] In response to a cylindrical surface marking planning operation on a preset marking interface, obtaining graphic marking path planning information of the graphic to be marked;
[0050] matching a signal execution strategy for each of the positioning control signals and the corresponding positioning control signal based on the graphic marking path planning information;
[0051] According to the signal execution strategy, each of the positioning control signals and the corresponding marking control signal is executed to mark the pattern to be marked on the target cylindrical surface based on the target galvanometer.
[0052] The present application also provides an electronic device, which includes: a memory, a processor, and a program of the cylindrical surface marking method stored in the memory and runnable on the processor. When the program of the cylindrical surface marking method is executed by the processor, the steps of the cylindrical surface marking method as described above can be implemented.
[0053] The present application also provides a computer-readable storage medium, on which is stored a program for implementing a cylindrical surface marking method. When the program for the cylindrical surface marking method is executed by a processor, the steps of the cylindrical surface marking method as described above are implemented.
[0054] The present application also provides a computer program product, comprising a computer program, which implements the steps of the cylindrical surface marking method as described above when executed by a processor.
[0055] The present application provides a cylindrical surface marking method, device, electronic device and readable storage medium, that is, obtaining the coordinates of at least one marking point of a pattern to be marked on a target cylindrical surface; determining the corresponding marking point focal length based on each marking point coordinate, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of a target galvanometer; and controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface based on each marking point focal length and each marking point coordinate. Since the marking point coordinates are the coordinates of the figure to be marked on the cylindrical surface, and the marking point focal length is the distance between the marking point on the cylindrical surface and the target galvanometer, the marking point coordinates and the marking point focal length can fully reflect the actual position of the marking point on the cylindrical surface, that is, the purpose of accurately locating the marking point on the cylindrical surface is achieved, rather than relying on the actual position of the marking point on the plane when marking the figure on the cylindrical surface through a 2D galvanometer. Therefore, the technical defect of deviation between the processing size and the theoretical size caused by the deformation of the plane figure in space is overcome, and the marking accuracy of marking on the cylindrical surface through a 2D galvanometer is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0057] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0058] Figure 1 This is a schematic flow chart of the first embodiment of the cylindrical surface marking method of the present application;
[0059] Figure 2 A schematic plan view of a cylindrical surface marking method according to the present application for marking a pattern to be marked;
[0060] Figure 3 This is a flow chart of the second embodiment of the cylindrical surface marking method of the present application;
[0061] Figure 4 This is a schematic diagram of an embodiment of a cylindrical surface marking device of the present application;
[0062] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the cylindrical surface marking method in the embodiment of the present application.
[0063] The purpose, features and advantages of this application will be further explained with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0064] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0065] Example 1
[0066] First of all, it should be understood that lasers have the advantages of high energy density, directional luminescence and high collimation. By using laser to locally irradiate the processing surface, physical or chemical changes will occur on the processing surface, and finally a permanent mark will be left on the surface. Among them, 3D galvanometers are usually used for spatial graphic marking, such as arc surface laser marking, and 2D galvanometers are usually used for plane graphic marking. However, due to the cost considerations of 3D galvanometers, some spatial graphics will still be marked with 2D galvanometers. However, since plane graphics will be deformed in space, there will often be a large error between the processing size and the theoretical size. For example, assuming that a square is to be marked on the arc surface of a cylinder by a 2D galvanometer, the shape of the graphic obtained by marking according to the existing scheme is roughly a rectangle, and since the focal depths of different contour points of the square are different, the final graphic is difficult to meet the user's marking needs. Therefore, the current method of marking on a cylindrical surface with a 2D galvanometer has a low marking accuracy.
[0067] The present application provides a cylindrical surface marking method. In the first embodiment of the cylindrical surface marking method of the present application, referring to Figure 1 , the cylindrical surface marking method includes:
[0068] Step S10, obtaining the coordinates of at least one marking point of the pattern to be marked on the target cylindrical surface;
[0069] Step S20, determining the corresponding marking point focal length according to the coordinates of each marking point, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer;
[0070] In this embodiment, it should be noted that the pattern to be marked is used to represent the pattern waiting to be marked, and the pattern to be marked is marked on the target cylindrical surface, which is the cylindrical surface selected by the user to mark the pattern to be marked. There is a position on the target cylindrical surface that has not been marked with a pattern. The target cylindrical surface may have a marked pattern or may not have a marked pattern. The cylindrical surface marking method is applied to a laser marking system, and the motion component of the cylindrical surface marking is controlled to move by the input / output signal of the laser marking system to mark the pattern to be marked. The cylindrical surface marking system is set on an intelligent device, which can be a computer or a personal PC, etc. The cylindrical surface marking system can be provided with a graphics drawing module or may not be provided with graphics drawing software. For example, assuming that a graphics drawing module is provided on the cylindrical surface marking system and the intelligent device is a computer, then when the computer enters the cylindrical surface marking system, it can automatically or based on the user's manual operation obtain the pattern to be marked from the graphics drawing software installed on the computer.
[0071] In addition, it should be noted that the process of cylindrical surface marking by the cylindrical surface marking system can be understood as follows: the cylindrical surface marking system controls the 2D galvanometer to perform patrol marking at a specified position in space through input / output signals until the marking of the pattern to be marked is completed, wherein the input / output signal can be a signal for marking a specified marking point constituting the pattern to be marked, or a signal for marking a specified marking area representing the pattern to be marked. For example, in one feasible method, the cross-sectional direction of the cylindrical surface can be set as the X-axis direction, the height direction of the cylindrical surface can be set as the Y-axis direction, and the direction of the center point of the 2D galvanometer perpendicular to the cylindrical surface can be set as the Z direction. The input / output signal is used to control the 2D galvanometer to move along the X, Y and Z axes to reach the specified position in space.
[0072] In addition, it should be noted that the marking point coordinates are used to characterize the spatial position of the marking point of the figure to be marked on the target cylindrical surface, wherein the spatial position can be characterized by a preset spatial coordinate system, and the marking figure obtained by marking the figure to be marked on the target cylindrical surface is composed of multiple marking points. Due to the different marking focal depths, the same marking figure can also have different presentations, that is, when marking the figure to be marked, the spatial position of each point needs to be determined. For example, in a three-dimensional coordinate system, the horizontal size of the figure to be marked needs to be determined through the cross-sectional direction of the cylindrical surface, the vertical size of the figure to be marked needs to be determined through the height direction of the cylindrical surface, and the focal depth of the figure to be marked needs to be determined through the depth direction between the cylindrical surface and the 2D galvanometer.
[0073] In addition, it should be noted that the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer. When the marking point focal length is smaller, the marking focal depth is larger, and when the marking point focal length is larger, the marking focal depth is smaller. For example, assuming that the user wants to mark squares with the same focal depth at each point on the cylindrical surface, since the graphic is completely fitted to the cylindrical surface, in addition to the size correction, the marking point focal length corresponding to each marking point also needs to be corrected. Therefore, the marking point coordinates and the marking point focal length can be solved through the cylindrical surface expansion diagram. For example, refer to Figure 2 , Figure 2 is a planar schematic diagram representing the marking of the pattern to be marked, wherein the preset spatial coordinate system is a three-dimensional coordinate system with the cross-sectional direction of the target cylindrical surface as the X-axis direction, the height direction of the target cylindrical surface as the Y-axis direction, and the direction of the center point of the 2D galvanometer perpendicular to the target cylindrical surface as the Z-direction. The origin of the three-dimensional coordinate system is the starting marking point of the target galvanometer, and its coordinate value is (0,0,0). 100 is the top view of the target cylindrical surface, 200 is the plan view of the target galvanometer, 300 is the marking point coordinate, 400 is the starting coordinate, 600 is the cross-sectional radius R of the target cylindrical surface, 500 is the distance between the center point of the target galvanometer and the center point of the target cylindrical surface, a is the angle between the marking point 300 and the cross-sectional radius 600 of the target cylindrical surface, and b is the angle between the starting point 400 and the cross-sectional radius 600 of the target cylindrical surface. Thus, any marking point can be set to (x i ,y i ,z i ), where i can be a natural number, i corresponds to a marking point one-to-one, for example, i=1 represents the first marking point, i=2 represents the second marking point, the vertical distance from the starting point 400 to the center line of the target galvanometer is the horizontal distance, when the 2D galvanometer is at the same height and moves around the cylindrical surface, it can be determined that the 2D galvanometer is moving around the X-axis direction, and when the 2D galvanometer moves in the height direction of the cylindrical surface, it can be determined that the 2D galvanometer is moving around the Y-axis direction.
[0074] As an example, steps S10 to S20 include: obtaining the marking point coordinates of at least one marking point of the figure to be marked on the target cylindrical surface in a preset spatial coordinate system; determining the corresponding marking point focal length based on each of the marking point coordinates, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer.
[0075] The step of obtaining the coordinates of the marking points of the pattern to be marked on the target cylindrical surface includes:
[0076] Step A10, obtaining the initial coordinates of the positioning points of the pattern to be marked;
[0077] Step A20: converting the initial coordinates of the positioning point into marking point coordinates, wherein the marking point coordinates are used to represent the spatial position of the marking point of the pattern to be marked on the target cylindrical surface.
[0078] In this embodiment, it should be noted that after determining the starting marking point of the figure to be marked, any marking point on the target cylindrical surface can be used as a positioning point, and then by converting the coordinate value of the marking point of the figure to be marked on the target cylindrical surface and the coordinate value of the plane view of the figure to be marked, the figure to be marked on the target cylindrical surface is completely consistent with the plane view of the figure to be marked. The initial coordinates of the positioning point are the initial coordinate values of the positioning point in the plane coordinate system. The initial coordinates of the positioning point can be obtained by the cylindrical surface marking system based on the graphics drawing software outside the system, and can also be set by the cylindrical surface marking system based on the built-in graphics drawing software.
[0079] As an example, steps A10 to A20 include: selecting a positioning point on the figure to be marked, and extracting the initial coordinates of the positioning point; converting the initial coordinates of the positioning point into marking point coordinates, wherein the marking point coordinates are used to represent the spatial position of the marking point of the figure to be marked on the target cylindrical surface.
[0080] The step of converting the initial coordinates of the positioning point into the coordinates of the marking point includes:
[0081] Step B10, obtaining the coordinates of the center point of the target cylindrical surface and the coordinates of the center point of the target galvanometer;
[0082] Step B20, determining the center point distance based on the coordinates of the center point of the cylindrical surface and the coordinates of the center point of the galvanometer;
[0083] Step B30: Calculate the coordinates of the marking point based on the center point distance and the initial coordinates of the positioning point.
[0084] In this embodiment, it should be noted that since there is a correlation between the unfolded view of the cylindrical surface and the plane view of the cylindrical surface, the initial coordinates of the positioning point of the positioning point of the to-be-marked figure can be converted into the marking point coordinates through the key points corresponding to the 2D galvanometer in the preset spatial coordinate system and the corresponding key points on the target cylindrical surface. Among them, due to the spatial characteristics of the cylindrical surface, the vertical coordinate of the marking point of the to-be-marked figure on the plane view is consistent with its vertical coordinate on the unfolded view of the cylindrical surface. Then, when converting the initial coordinates of the positioning point of the figure to be marked, the vertical coordinate of the positioning point remains unchanged. That is, when marking the marking point on the target cylindrical surface parallel to the main line direction of the target cylindrical surface, only the horizontal coordinate of the marking point is corrected, and the figure to be marked marked according to the corrected coordinates can also meet user needs.
[0085] In addition, it should be noted that the coordinates of the center point of the cylindrical surface are used to represent the coordinate value of the center point of the cylindrical surface in the preset plane coordinate system, the coordinates of the center point of the galvanometer are used to represent the coordinate value of the center point of the galvanometer in the preset plane coordinate system, and the center point distance is used to represent the spatial distance between the center point of the cylindrical surface and the center point of the galvanometer in the preset plane coordinate system. By inputting the center point of the cylindrical surface, the center point of the galvanometer and the center point distance into the preset coordinate conversion model, the coordinate conversion of each marking point of the figure to be marked can be performed. For example, in one practicable method, assuming that the coordinates of the center point of the cylindrical surface are (x m ,y m ), the coordinates of the center point of the galvanometer are (x n ,y n ), the center point distance is
[0086] As an example, steps B10 to B30 include: obtaining a first coordinate value of the center point of the cylindrical surface of the target cylindrical surface and a second coordinate value of the center point of the galvanometer of the target galvanometer in a preset spatial coordinate system; calculating the center point distance using the first coordinate value and the second coordinate value; and inputting the center point distance and the initial coordinates of the positioning point into a preset coordinate conversion model to obtain the coordinates of the marking point, wherein the preset coordinate conversion model is provided with a coordinate conversion formula, and the coordinate conversion formula is as follows:
[0087]
[0088] y2=y1
[0089] Among them, (x1, y1) is the initial coordinate of the positioning point, (x2, y2) is the coordinate of the marking point, L is the center point distance, and R is the cross-sectional radius of the target cylindrical surface.
[0090] Wherein, before the step of obtaining the initial coordinates of the positioning points of the pattern to be marked, the cylindrical surface marking method further comprises:
[0091] Step C10, obtaining a pattern to be marked input by a user, wherein the pattern to be marked includes at least one marking simulation point;
[0092] Step C20 , selecting the positioning point simulation coordinates of the simulation positioning point from each of the marked simulation points as the positioning point starting coordinates.
[0093] In this embodiment, it should be noted that the marking simulation point is used to represent the point on the simulated figure of the figure to be marked on the graphics drawing software, and the selected simulation positioning point is used to represent any marking simulation point that constitutes the simulated figure. The positioning point simulation coordinates are the coordinate values of the simulation positioning point. After a certain simulation positioning point is selected, the point can be used as the marking positioning point. For example, in an implementable method, it is assumed that a coordinate system of the cylindrical surface is established with the cross-sectional direction of the cylindrical surface as the X-axis and the height direction as the Y-axis, wherein the Y-axis direction is parallel to the Y-direction of the target galvanometer. When the coordinates of a certain point are selected as (x0, y0), (x0, y0) can be used as the initial coordinates of the positioning point.
[0094] As an example, steps C10 to C20 include: obtaining the graphics to be marked input by the user on a preset marking interface, wherein the preset marking interface is set on the smart device, and the user can draw the graphics to be marked in real time on the preset marking interface, or can trigger the acquisition of existing graphics to be marked by dragging or pressing buttons on the preset marking interface, and the graphics to be marked include at least one marking simulation point; and selecting the coordinate value of the simulated positioning point in each of the marking simulation points as the starting coordinates of the positioning point.
[0095] The step of determining the focal length of the corresponding marking point according to the coordinates of each marking point includes:
[0096] Step D10, calculating a focal depth correction parameter of at least one marking point on the cylindrical surface according to the coordinates of each marking point;
[0097] In step D20 , the focal length of the galvanometer mirror corresponding to the marking point is corrected according to the focal depth correction parameters to obtain the focal length of each marking point.
[0098] In this embodiment, it should be noted that after the coordinates of the marking points on the to-be-marked figure are converted by a preset coordinate conversion model, the laser emitted by the target galvanometer can accurately reach the marking points required by the user. However, due to the different focal distances of the target galvanometer, the focal depth will be different. In order to ensure the marking accuracy, the focal depth of different marking points needs to be corrected. Therefore, the focal depth correction parameter is used to correct the focal depth. When the focal length of the galvanometer is smaller, the marking figure is smaller, and when the focal length is larger, the marking figure is larger. The correction of the Z axis of the plane and space coordinate system of the 2D galvanometer is indispensable.
[0099] In addition, it should be noted that the effective Z-axis value range of the pattern to be marked on the target cylindrical surface is ±z0. Taking the Z-axis coordinate of the center point as a reference, the focal length of the center point is H0, and the size of the pattern to be marked is measured as and If Z i > 0 (the Z axis position of the i-th marking point is less than the center focal length), then divide Z0 into n equal parts to determine Zi Position width, if m<Z i <m+1, then determine Z by interpolation i The position width, where 0<m<n-1, the actual width value of m The actual width of m+1 is Then according to Z i The width ratios of H0 are fsx and fsy, that is, the depth of focus correction parameter calculation formula is as follows:
[0100]
[0101]
[0102] Finally, the corrected coordinates of the marking point (x′, y′) are obtained, where x′=x i *fsx,y′=y i *fsy.
[0103] As an example, steps D10 to D20 include: determining the Z-axis width value corresponding to each marking point based on the correspondence between the coordinates of each marking point and the valid Z-axis value range, and calculating the focal depth correction parameter of at least one marking point on the cylindrical surface based on each Z-axis width value; and correcting the galvanometer focal length of the corresponding marking point based on each focal depth correction parameter to obtain the focal length of each marking point.
[0104] Step S30 , controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to the focal length of each marking point and the coordinates of each marking point.
[0105] As an example, step S30 includes: according to at least one control signal corresponding to the focal length of each marking point and the coordinates of each marking point, controlling the target galvanometer to mark each marking point in turn, so as to mark the pattern to be marked on the target cylindrical surface, wherein the control signal is used to control the target galvanometer to move to the spatial position corresponding to the marking point and perform marking.
[0106] The step of controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to the focal length of each marking point and the coordinates of each marking point includes:
[0107] Step E10, generating at least one positioning control signal according to the coordinates of each marking point and the corresponding focal length of the marking point;
[0108] Step E20 , controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to each of the positioning control signals and the corresponding marking control signal.
[0109] In this embodiment, it should be noted that, since the pattern to be marked may need to be changed due to subjective and objective factors during the marking process, a positioning control signal may be generated when correcting the focal length of each marking point and the coordinates of each marking point of the pattern to be marked, wherein the positioning control signal is used to position the target galvanometer at the spatial position corresponding to the marking point, and the marking control signal is used to control the target galvanometer for marking, and the marking control signal may be triggered by the marking control operation performed by the user on the cylindrical marking system, that is, marking is not performed automatically after correction, but is performed according to the marking control operation of the user, so that the marking flexibility is improved while ensuring the marking accuracy.
[0110] As an example, steps E10 to E20 include: converting the coordinates of each marking point and the corresponding marking point focal length into a corresponding positioning control signal according to a preset signal conversion format, wherein the preset signal conversion method can be set according to user needs; in response to the user's marking control operation, obtaining the marking control signal corresponding to each positioning control signal, and executing each marking control signal in turn to mark the pattern to be marked on the target cylindrical surface based on the target galvanometer.
[0111] An embodiment of the present application provides a cylindrical surface marking method, that is, obtaining the coordinates of at least one marking point of a figure to be marked on a target cylindrical surface; determining the corresponding marking point focal length based on each marking point coordinate, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of a target galvanometer; and controlling the target galvanometer to mark the figure to be marked on the target cylindrical surface based on each marking point focal length and each marking point coordinate. Since the marking point coordinates are the coordinates of the figure to be marked on the cylindrical surface, and the marking point focal length is the distance between the marking point on the cylindrical surface and the target galvanometer, the marking point coordinates and the marking point focal length can fully reflect the actual position of the marking point on the cylindrical surface, that is, the purpose of accurately locating the marking point on the cylindrical surface is achieved, rather than relying on the actual position of the marking point on the plane when marking the figure on the cylindrical surface through a 2D galvanometer. Therefore, the technical defect of deviation between the processing size and the theoretical size caused by the deformation of the plane figure in space is overcome, and the marking accuracy of marking on the cylindrical surface through a 2D galvanometer is improved.
[0112] Example 2
[0113] Further, refer to Figure 3 In another embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to above and will not be described in detail. On this basis, the step of controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to each of the positioning control signals and the corresponding marking control signal further includes:
[0114] Step F10, in response to the cylindrical surface marking planning operation on the preset marking interface, obtaining the graphic marking path planning information of the graphic to be marked;
[0115] Step F20, matching a signal execution strategy for each positioning control signal and a corresponding positioning control signal according to the graphic marking path planning information;
[0116] Step F30 , executing each of the positioning control signals and the corresponding marking control signals according to the signal execution strategy, so as to mark the pattern to be marked on the target cylindrical surface based on the target galvanometer.
[0117] In this embodiment, it should be noted that for different graphics to be marked, the visualization effects are presented differently. Therefore, by freely setting the graphic marking path planning information, the user can avoid marking risks in time during the marking process. For example, assuming that the graphic A to be marked is marked with marking path 1, the user needs to mark 3 / 4 of the graphic to be marked before he can detect whether there is a marking abnormality. However, if it is marked with marking path 2, the user only needs to mark 1 / 4 of the graphic to be marked before he can detect whether there is a marking abnormality. Therefore, the use of marking path 2 can avoid the time cost and consumables cost consumed due to substandard marking during the marking process. Therefore, the graphic marking path planning information is used to plan the marking path for the graphic to be marked. For example, assuming that the graphic to be marked is a rectangle with four corners A1, A2, A3 and A4 respectively, the graphic marking path can be A2→A4→A3→A1, and the signal execution strategy is used to plan the execution order of the graphic marking path planning information signal that is adapted to the graphic to be marked.
[0118] As an example, steps F10 to F30 include: in response to a cylindrical surface marking planning operation on a preset marking interface, obtaining graphic marking path planning information of the graphic to be marked, wherein the cylindrical surface marking planning operation can be triggered by voice or key operation input by the user on the preset marking interface; based on the graphic marking path planning information, matching a signal execution strategy for each of the positioning control signals and the corresponding positioning control signal; according to the signal execution strategy, executing each of the positioning control signals and the corresponding marking control signal to mark the graphic to be marked on the target cylindrical surface based on the target galvanometer.
[0119] An embodiment of the present application provides a galvanometer marking control method, that is, in response to a cylindrical surface marking planning operation on a preset marking interface, obtaining graphic marking path planning information of the graphic to be marked; based on the graphic marking path planning information, a signal execution strategy is matched for each of the positioning control signals and the corresponding positioning control signal; according to the signal execution strategy, each of the positioning control signals and the corresponding marking control signal is executed to mark the graphic to be marked on the target cylindrical surface based on the target galvanometer. Compared with marking the graphics to be marked according to the pre-default marking path, the embodiment of the present application adapts the graphic marking path to the graphics to be marked based on the graphic marking path planning information, and then controls the target galvanometer to mark the graphics to be marked on the target cylindrical surface according to the signal execution strategy corresponding to the graphic marking path, thereby achieving the purpose of setting different graphic marking paths for different graphics to be marked. Since the visualization effects of different graphics to be marked are different, the marking risks in the marking process can be avoided by setting the graphic planning path in a targeted manner. Therefore, it lays the foundation for improving the marking accuracy of marking on the cylindrical surface by using a 2D galvanometer.
[0120] Example 3
[0121] The present application also provides a cylindrical surface marking device, referring to Figure 4 , the cylindrical surface marking device comprises:
[0122] An acquisition module 101 is used to acquire the coordinates of at least one marking point of a pattern to be marked on a target cylindrical surface;
[0123] The decryption module 102 is configured to determine the corresponding marking point focal length according to the coordinates of each marking point, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer;
[0124] The determination module 103 is configured to control the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to the focal length of each marking point and the coordinates of each marking point.
[0125] Optionally, the acquisition module 101 is further configured to:
[0126] Obtaining the initial coordinates of the positioning points of the graphic to be marked;
[0127] The initial coordinates of the positioning point are converted into marking point coordinates, wherein the marking point coordinates are used to represent the spatial position of the marking point of the pattern to be marked on the target cylindrical surface.
[0128] Optionally, the acquisition module 101 is further configured to:
[0129] Obtaining the coordinates of the center point of the target cylindrical surface and the center point of the target galvanometer;
[0130] Determine the center point distance based on the coordinates of the center point of the cylindrical surface and the coordinates of the center point of the galvanometer;
[0131] The coordinates of the marking point are calculated based on the center point distance and the initial coordinates of the positioning point.
[0132] Optionally, the cylindrical surface marking device is further used for:
[0133] Acquire a graphic to be marked input by a user, wherein the graphic to be marked includes at least one marking simulation point;
[0134] The positioning point simulation coordinates of the simulation positioning point are selected from each of the marked simulation points as the positioning point starting coordinates.
[0135] Optionally, the determining module 102 is further configured to:
[0136] Calculating a focal depth correction parameter of at least one marking point on the cylindrical surface according to the coordinates of each marking point;
[0137] According to each of the focal depth correction parameters, the focal length of the galvanometer mirror of the corresponding marking point is corrected to obtain the focal length of each marking point.
[0138] Optionally, the control module 101 is further configured to:
[0139] generating at least one positioning control signal according to the coordinates of each marking point and the corresponding focal length of the marking point;
[0140] According to each of the positioning control signals and the corresponding marking control signal, the target galvanometer is controlled to mark the pattern to be marked on the target cylindrical surface.
[0141] Optionally, the control module 101 is further configured to:
[0142] In response to a cylindrical surface marking planning operation on a preset marking interface, obtaining graphic marking path planning information of the graphic to be marked;
[0143] matching a signal execution strategy for each of the positioning control signals and the corresponding positioning control signal based on the graphic marking path planning information;
[0144] According to the signal execution strategy, each of the positioning control signals and the corresponding marking control signal is executed to mark the pattern to be marked on the target cylindrical surface based on the target galvanometer.
[0145] The cylindrical surface marking device provided by the present invention utilizes the cylindrical surface marking method described in the aforementioned embodiment to address the technical issue of low marking accuracy associated with 2D galvanometers used for marking cylindrical surfaces. Compared to the prior art, the cylindrical surface marking device provided by the present invention achieves the same beneficial effects as the cylindrical surface marking method described in the aforementioned embodiment. Other technical features of the cylindrical surface marking device are the same as those disclosed in the aforementioned embodiment and are not further detailed here.
[0146] Example 4
[0147] An embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the cylindrical surface marking method of the above-mentioned embodiment 1.
[0148] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0149] like Figure 5 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. Various programs and data required for the operation of the electronic device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus.
[0150] Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009. The communication devices can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have instead.
[0151] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1009, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0152] The electronic device provided by the present invention utilizes the cylindrical surface marking method described in the above-mentioned embodiment to solve the technical problem of low marking accuracy on cylindrical surfaces using a 2D galvanometer. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as those of the cylindrical surface marking method described in the above-mentioned embodiment. Other technical features of the electronic device are the same as those disclosed in the above-mentioned embodiment and are not further described here.
[0153] It should be understood that various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in an appropriate manner.
[0154] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
[0155] Example 5
[0156] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the cylindrical surface marking method in the above embodiment.
[0157] The computer-readable storage medium provided in the embodiment of the present invention can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0158] The computer-readable storage medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0159] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: obtains the coordinates of at least one marking point of the figure to be marked on the target cylindrical surface; determines the corresponding marking point focal length according to each of the marking point coordinates, wherein the marking point focal length is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer; and controls the target galvanometer to mark the figure to be marked on the target cylindrical surface according to each of the marking point focal lengths and each of the marking point coordinates.
[0160] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0161] The flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0162] The modules involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0163] The computer-readable storage medium provided by the present invention stores computer-readable program instructions for executing the aforementioned cylindrical surface marking method, resolving the technical issue of low marking accuracy associated with 2D galvanometers used for marking cylindrical surfaces. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided by the present invention are similar to those of the cylindrical surface marking method provided by the aforementioned embodiment and are not further elaborated here.
[0164] Example 6
[0165] The present application also provides a computer program product, comprising a computer program, which implements the steps of the cylindrical surface marking method as described above when executed by a processor.
[0166] The computer program product provided in this application solves the technical problem of low marking accuracy when marking cylindrical surfaces using a 2D galvanometer. Compared to the prior art, the beneficial effects of the computer program product provided by the embodiments of the present invention are the same as those of the cylindrical surface marking method provided by the above-mentioned embodiments, and are not further described here.
[0167] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A cylindrical surface marking method, characterized in that: The cylindrical surface marking method comprises: Obtaining the coordinates of at least one marking point of the pattern to be marked on the target cylindrical surface, the step of obtaining the coordinates of the marking point of the pattern to be marked on the target cylindrical surface comprises: obtaining the initial coordinates of the positioning point of the pattern to be marked; converting the initial coordinates of the positioning point into the marking point coordinates, wherein the marking point coordinates are used to represent the spatial position of the marking point of the pattern to be marked on the target cylindrical surface; According to the coordinates of each marking point, the focal length of the corresponding marking point is determined, wherein the focal length of the marking point is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer; the step of determining the focal length of the corresponding marking point according to the coordinates of each marking point includes: calculating a focal depth correction parameter of at least one marking point on the cylindrical surface according to the coordinates of each marking point; and correcting the galvanometer focal length of the corresponding marking point according to each focal depth correction parameter to obtain the focal length of each marking point, wherein the calculation formula of the focal depth correction parameter is as follows: ; ; in, is the initial coordinate of the positioning point; the effective Z-axis value range of the figure to be marked on the target cylindrical surface is , taking the Z-axis coordinate of the center point as a reference, the focal length of the center point is ; Measure the size of the graphic to be marked and ; , that is, the Z-axis position of the i-th marking point is smaller than the focal length of the center point. Divide into equal parts by length n to determine The position width; if , then determine by interpolation The position width, where , the actual width of m is ;The actual width of m+1 is , and then according to and The width ratio is and ; According to the focal length of each marking point and the coordinates of each marking point, the target galvanometer is controlled to mark the pattern to be marked on the target cylindrical surface.
2. The cylindrical surface marking method according to claim 1, characterized in that: The step of converting the initial coordinates of the positioning point into the coordinates of the marking point comprises: Obtaining the coordinates of the center point of the target cylindrical surface and the center point of the target galvanometer; Determine the center point distance based on the coordinates of the center point of the cylindrical surface and the coordinates of the center point of the galvanometer; The coordinates of the marking point are calculated based on the center point distance and the initial coordinates of the positioning point.
3. The cylindrical surface marking method according to claim 1, wherein: Before the step of obtaining the initial coordinates of the positioning points of the pattern to be marked, the cylindrical surface marking method further comprises: Acquire a graphic to be marked input by a user, wherein the graphic to be marked includes at least one marking simulation point; The positioning point simulation coordinates of the simulation positioning point are selected from each of the marked simulation points as the positioning point starting coordinates.
4. The cylindrical surface marking method according to claim 1, wherein: The step of controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to the focal length of each marking point and the coordinates of each marking point comprises: generating at least one positioning control signal according to the coordinates of each marking point and the corresponding focal length of the marking point; According to each of the positioning control signals and the corresponding marking control signal, the target galvanometer is controlled to mark the pattern to be marked on the target cylindrical surface.
5. The cylindrical surface marking method according to claim 4, characterized in that: The step of controlling the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to each of the positioning control signals and the corresponding marking control signal further includes: In response to a cylindrical surface marking planning operation on a preset marking interface, obtaining graphic marking path planning information of the graphic to be marked; matching a signal execution strategy for each of the positioning control signals and the corresponding positioning control signal based on the graphic marking path planning information; According to the signal execution strategy, each of the positioning control signals and the corresponding marking control signal is executed to mark the pattern to be marked on the target cylindrical surface based on the target galvanometer.
6. A cylindrical surface marking device, characterized in that: The cylindrical surface marking device comprises: An acquisition module is used to acquire the coordinates of at least one marking point of the pattern to be marked on the target cylindrical surface, and the acquisition module is used to acquire the initial coordinates of the positioning point of the pattern to be marked; and convert the initial coordinates of the positioning point into marking point coordinates, wherein the marking point coordinates are used to represent the spatial position of the marking point of the pattern to be marked on the target cylindrical surface; A determination module is configured to determine the focal length of the corresponding marking point based on the coordinates of each marking point, wherein the focal length of the marking point is the vertical distance between the marking point on the target cylindrical surface and the focus of the target galvanometer; the determination module is configured to calculate a focal depth correction parameter of at least one marking point on the cylindrical surface based on the coordinates of each marking point; and correct the galvanometer focal length of the corresponding marking point based on each focal depth correction parameter to obtain the focal length of each marking point, wherein the focal depth correction parameter calculation formula is as follows: ; ; in, is the initial coordinate of the positioning point; the effective Z-axis value range of the figure to be marked on the target cylindrical surface is , taking the Z-axis coordinate of the center point as a reference, the focal length of the center point is ; Measure the size of the graphic to be marked and ; , that is, the Z-axis position of the i-th marking point is smaller than the focal length of the center point. Divide into equal parts by length n to determine The position width; if , then determine by interpolation The position width, where , the actual width of m is ;The actual width of m+1 is , and then according to and The width ratio is and ; The control module is used to control the target galvanometer to mark the pattern to be marked on the target cylindrical surface according to the focal length of each marking point and the coordinates of each marking point.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the cylindrical surface marking method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program for implementing the cylindrical surface marking method, and the program for implementing the cylindrical surface marking method is executed by a processor to implement the steps of the cylindrical surface marking method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Conical surface marking method and device and computer readable storage medium
CN112605532A
Laser engraving machine focus adjusting method based on galvanometer and laser engraving machine
CN115156724A