Disclosure of Invention
In view of the foregoing, it is desirable to provide an edge searching method and apparatus for laser cutting, a laser cutting device, and a computer readable storage medium.
An edge searching method for laser cutting is based on a laser cutting device, wherein the laser cutting device comprises a cutting head;
the method comprises the following steps:
s1: determining a preset edge searching initial position, and controlling the cutting head to move to the preset edge searching initial position;
s4: controlling the cutting head to move along the preset direction at a preset second edge searching speed, and detecting whether the cutting head generates a second height sudden change or not in the moving process;
s5: under the condition that the second height sudden change of the cutting head is detected, the cutting head is controlled to stop moving, and the coordinate information of the cutting head is obtained and used as the coordinate information of the target edge point corresponding to the preset direction;
s6: repeatedly executing S1-S5 to obtain coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching initial position and/or the preset direction in the searching process of other target edge points, and the number of the plurality of target edge points is at least 2;
s7: and calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, and controlling the cutting head to cut according to the target coordinate system.
Wherein, before the step of controlling the cutting head to move along the preset direction at a preset second edge finding speed, the method further comprises:
s2: controlling the cutting head to move along a preset direction at a preset first edge searching speed, and detecting whether the cutting head has a first height mutation in the moving process;
s3: and under the condition that the first height sudden change of the cutting head is detected, the cutting head is controlled to ascend to a preset height, the cutting head is controlled to retreat along the preset direction, and the second edge searching speed is smaller than the first edge searching speed.
Wherein the step of detecting whether the first abrupt height change occurs in the cutting head during the movement further comprises:
detecting first height change information of the cutting head, judging whether the first height change information meets a preset first height change speed threshold value or not, and judging that the cutting head has a first height sudden change under the condition that the first height change information meets the preset first height change speed threshold value;
the step of detecting whether the cutting head undergoes a second sudden height change during the movement further comprises:
detecting second height change information of the cutting head, judging whether the second height change information meets a preset second height change speed threshold value or not, and judging that the cutting head has second height mutation under the condition that the second height change information meets the preset second height change speed threshold value;
the second altitude change speed threshold is less than the first altitude change speed threshold.
The number of the target edge points is 3, and the preset direction comprises a first preset direction and a second preset direction;
the first preset direction corresponds to 1 target edge point, the second preset direction corresponds to 2 target edge points, or the first preset direction corresponds to 2 target edge points, and the second preset direction corresponds to 1 target edge point.
The first preset direction is one of an X-axis first direction and an X-axis second direction, the second preset direction is one of a Y-axis first direction and a Y-axis second direction, the X-axis first direction and the X-axis second direction are opposite directions, and the Y-axis first direction and the Y-axis second direction are opposite directions.
Wherein, the step of calculating the target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point further comprises:
determining corner point coordinates corresponding to the workpiece to be cut according to the coordinate information of the 3 target edge points;
determining an offset angle corresponding to the workpiece to be cut according to the angular point coordinates and the coordinate information of the 3 target edge points;
and determining a target coordinate system corresponding to the workpiece to be cut according to the offset angle and the coordinate information of the 3 target edge points.
Wherein before the step of controlling the cutting head to cut according to the target coordinate system, the method further comprises:
determining the contour information of the workpiece to be cut according to the coordinate information of the target edge point;
judging whether the size information of the workpiece to be cut is matched with the preset size information of the target workpiece according to the contour information,
if yes, executing the step of controlling the cutting head to cut according to the target coordinate system,
and if not, generating prompt information, wherein the prompt information is used for prompting a user that the current workpiece to be cut cannot be cut by the target workpiece.
Before the step of determining the contour information of the workpiece to be cut according to the coordinate information of the target edge point, the method further comprises the following steps:
acquiring shape template information corresponding to the workpiece to be cut;
judging whether the target edge points can meet the contour construction requirement corresponding to the shape template information or not according to the shape template information,
if so, executing the step of determining the contour information of the workpiece to be cut according to the coordinate information of the target edge point,
if not, controlling the cutting head to carry out edge searching operation in other directions except the preset direction.
An edge finding device for laser cutting is based on a laser cutting device, and comprises a cutting head;
the device comprises:
the initial position determining module is used for determining a preset edge searching initial position and controlling the cutting head to move to the preset edge searching initial position;
an edge point searching module for searching the target edge point,
the edge point searching module comprises a second edge searching unit, and is used for controlling the cutting head to move along the preset direction at a preset second edge searching speed and detecting whether a second height sudden change occurs in the cutting head in the moving process; under the condition that the second height mutation of the cutting head is detected, controlling the cutting head to stop moving, and acquiring coordinate information of the cutting head as coordinate information of a target edge point corresponding to the preset direction;
the circular execution module is used for calling the initial position determination module and the edge point searching module to acquire coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching initial position and/or the preset direction in the searching process of other target edge points, and the number of the plurality of target edge points is at least 2;
the coordinate system determining module is used for calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point;
and the cutting module is used for controlling the cutting head to cut according to the target coordinate system.
The edge searching module further comprises a first edge searching unit, wherein the first edge searching unit is used for controlling the cutting head to move along a preset direction at a preset first edge searching speed and detecting whether a first height mutation occurs to the cutting head in the moving process; and under the condition that the first height sudden change of the cutting head is detected, the cutting head is controlled to ascend to a preset height, the cutting head is controlled to retreat along the preset direction, and the second edge searching speed is smaller than the first edge searching speed.
The number of the target edge points is 3, and the preset direction comprises a first preset direction and a second preset direction; the first preset direction and the second preset direction respectively correspond to at least one target edge point.
The coordinate system determining module is further used for determining corner point coordinates corresponding to the workpiece to be cut according to the coordinate information of the 3 target edge points; determining an offset angle corresponding to the workpiece to be cut according to the angular point coordinates and the coordinate information of the 3 target edge points; and determining a target coordinate system corresponding to the workpiece to be cut according to the offset angle and the coordinate information of the 3 target edge points.
The device also comprises a size judgment module which is used for determining the outline information of the workpiece to be cut according to the coordinate information of the target edge point; judging whether the size information of the workpiece to be cut is matched with the preset size information of the target workpiece or not according to the contour information, calling the cutting module under the condition that the size information of the workpiece to be cut is matched with the preset size information of the target workpiece, and generating prompt information under the condition that the size information of the workpiece to be cut is not matched with the preset size information of the target workpiece, wherein the prompt information is used for prompting a user that the current workpiece to be cut cannot be cut on the target workpiece.
A laser cutting apparatus comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
s1: determining a preset edge searching initial position, and controlling the cutting head to move to the preset edge searching initial position;
s4: controlling the cutting head to move along the preset direction at a preset second edge searching speed, and detecting whether a second height mutation occurs to the cutting head in the moving process;
s5: under the condition that the second height sudden change of the cutting head is detected, the cutting head is controlled to stop moving, and the coordinate information of the cutting head is obtained and used as the coordinate information of the target edge point corresponding to the preset direction;
s6: repeatedly performing S1 to S5 to acquire coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching initial position and/or the preset direction in the searching process of other target edge points, and the number of the target edge points is at least 2;
s7: and calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, and controlling the cutting head to cut according to the target coordinate system.
Wherein the processor is further configured to perform the steps of:
s2: controlling the cutting head to move along a preset direction at a preset first edge searching speed, and detecting whether the cutting head has a first height sudden change or not in the moving process;
s3: and under the condition that the first height sudden change of the cutting head is detected, the cutting head is controlled to ascend to a preset height, the cutting head is controlled to retreat along the preset direction, and the second edge searching speed is smaller than the first edge searching speed.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
s1: determining a preset edge searching initial position, and controlling the cutting head to move to the preset edge searching initial position;
s4: controlling the cutting head to move along the preset direction at a preset second edge searching speed, and detecting whether the cutting head generates a second height sudden change or not in the moving process;
s5: under the condition that the second height sudden change of the cutting head is detected, the cutting head is controlled to stop moving, and the coordinate information of the cutting head is obtained and used as the coordinate information of the target edge point corresponding to the preset direction;
s6: repeatedly executing S1-S5 to obtain coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching initial position and/or the preset direction in the searching process of other target edge points, and the number of the target edge points is at least 2;
s7: and calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, and controlling the cutting head to cut according to the target coordinate system.
Wherein the processor further performs the steps of:
s2: controlling the cutting head to move along a preset direction at a preset first edge searching speed, and detecting whether the cutting head has a first height sudden change or not in the moving process;
s3: and under the condition that the first height sudden change of the cutting head is detected, the cutting head is controlled to ascend to a preset height, the cutting head is controlled to retreat along the preset direction, and the second edge searching speed is smaller than the first edge searching speed.
By adopting the embodiment of the invention, the following beneficial effects are achieved:
after the edge searching method and device, the laser cutting equipment and the computer readable storage medium for laser cutting are adopted, in the edge searching process, the cutting head of the laser cutting device is controlled to move to the preset edge searching initial position, then the cutting head is controlled to move at a smaller accurate second edge searching speed in the preset direction, and under the condition that the height mutation is detected again, the current edge searching is judged to be finished, and the position of the cutting head is obtained as the position of the target edge point. And then, repeatedly executing the edge searching operation to determine other target edge points by using the same or different edge searching initial positions and the same or different preset directions. Under the condition that the edge points are determined, calculating a corresponding coordinate system according to the coordinates of the target edge points, and then controlling the cutting operation of the cutting head according to the coordinate system to finish the operations of edge finding and laser cutting.
Compared with the technical scheme that the accuracy of the edge positioning of the plate is too low and the requirement of plate processing cannot be met due to the fact that the approximate edge position of the plate is only roughly searched and then cutting is carried out in the related technical scheme, in the embodiment of the invention, the position of the edge point can be accurately determined through a small edge searching speed, and the accuracy of determining the edge point is improved.
In addition, in the embodiment of the present invention, before performing the edge searching operation at the second accurate edge searching speed, the edge searching operation may be performed at the first larger edge searching speed, that is, the position of the edge point is roughly determined at the first faster edge searching speed, and then the position of the edge point is accurately determined at the second slower edge searching speed, so that the accuracy of determining the edge point is improved, and the edge searching efficiency is ensured. And a plurality of edge points of the plate are determined by the edge point determining method, so that a corresponding processing coordinate system is constructed to control processing, and the accuracy of laser cutting is ensured.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides an edge searching method for laser cutting, which can be realized based on a laser cutting device, wherein the laser cutting device comprises a processing unit or is connected with an external upper computer, and the processing unit or the upper computer is used for controlling edge searching operation and cutting operation.
Specifically, the laser cutting device comprises a cutting head and a workbench for placing a workpiece to be cut, when cutting operation is carried out, the workpiece to be cut is placed on the workbench, then the cutting head is controlled to carry out edge searching operation so as to obtain edge points of the workpiece to be cut, then a target coordinate system corresponding to the workpiece to be cut is established according to the edge points, and the cutting operation of the workpiece to be cut is controlled according to the target coordinate system.
Specifically, referring to fig. 1, fig. 1 shows a schematic flow chart of an edge finding method for laser cutting according to an embodiment of the present invention.
As shown in fig. 1, the edge finding method of laser cutting includes steps S1-S7 shown in fig. 1:
s1: and determining a preset edge searching initial position, and controlling the cutting head to move to the preset edge searching initial position.
In a specific embodiment, the edge-seeking initial position may be a point on a table of the laser cutting apparatus, and after the workpiece to be cut is placed on the table of the laser cutting apparatus, the edge-seeking initial position is also a point on the workpiece to be cut. The edge-seeking initial position is determined by setting a point on a workpiece to be machined through a preset machine tool interface, and the point on the workpiece to be cut can be determined as the edge-seeking initial position according to the approximate placement position of the workpiece to be cut.
Specifically, referring to fig. 2, a point corresponding to the number S1 shown in fig. 2 is the edge-seeking initial position.
After receiving the instruction of searching for the edge, the cutting head is controlled to move to the initial position of searching for the edge, and then the tunnel system is started, namely, the movement of the cutting head is controlled through the real-time change of the position information (including the coordinate information of three axes X, Y, Z) of the cutting head, so as to achieve the purpose of searching for the edge of the workpiece to be cut more quickly.
S2: controlling the cutting head to move along a preset direction at a preset first edge searching speed, and detecting whether the cutting head has a first height sudden change or not in the moving process;
s3: and under the condition that the first height mutation of the cutting head is detected, controlling the cutting head to ascend by a preset height and controlling the cutting head to retreat along the preset direction.
In the present embodiment, in determining the edge point, it is required to perform edge finding quickly and roughly (i.e., step S2), and then perform edge finding precisely (i.e., step S4).
First, step S2 corresponding to the quick and rough edge seek operation will be described.
Specifically, the cutting head is controlled to move from the edge searching initial position along the preset direction at a first edge searching speed to search for the edge point in the preset direction. Wherein the first edge finding speed is a larger speed, for example 10m/min, to quickly determine the approximate position of the edge point. The preset direction is a direction of edge searching, such as a positive direction of an X axis, a negative direction of a Y axis, and the like.
In the process of controlling the cutting head to move along the preset direction, the height of the cutting head is detected, and whether the sudden height change occurs is judged according to the detection of the height. Specifically, first height change information of the cutting head is detected, whether the first height change information meets a preset first height change speed threshold value is judged, and then under the condition that the first height change information meets the preset first height change speed threshold value, it is judged that first height mutation occurs in the cutting head; if the altitude change is detected but the altitude change does not satisfy the first altitude change speed threshold, the first altitude jump is not considered to occur and no processing is performed.
The height change information of the cutting head indicates whether the Z-axis coordinate change of the cutting head is greater than a certain change speed (namely, a first height change speed threshold), for example, whether the Z-axis coordinate change of the cutting head exceeds 0.3mm within 20ms, and if yes, it is determined that the first height sudden change occurs.
In the case where the first abrupt height change occurs, it is considered that the rough edge seek in the preset direction has ended, and a further precise edge seek operation is required. In this case, the cutting head is controlled to return to the workpiece to be cut and then the edge finding operation is performed again. Specifically, the cutting head is controlled to ascend by a preset height so that the cutting head is above a workpiece to be cut, and then the cutting head is controlled to retreat along a preset direction (for example, 20-30mm of retreat), so that the accurate edge searching operation can be continuously performed along the preset direction in the subsequent process.
S4: controlling the cutting head to move along the preset direction at a preset second edge searching speed, wherein the second edge searching speed is smaller than the first edge searching speed, and detecting whether a second height sudden change occurs in the cutting head in the moving process;
s5: and under the condition that the second height sudden change of the cutting head is detected, controlling the cutting head to stop moving, and acquiring the coordinate information of the cutting head as the coordinate information of the target edge point corresponding to the preset direction.
Specifically, the cutting head is controlled to move from the edge searching initial position along the preset direction at a second edge searching speed so as to search for the edge point in the preset direction. Wherein the second edge finding speed is a smaller speed, for example 1m/min, to determine the accurate position of the edge point accurately and slowly.
In the process of controlling the cutting head to move along the preset direction, the height of the cutting head is detected, and whether the sudden height change occurs is judged according to the detection of the height. Specifically, second height change information of the cutting head is detected, whether the second height change information meets a preset second height change speed threshold value is judged, and then under the condition that the second height change information meets the preset second height change speed threshold value, second height mutation of the cutting head is judged; and if the height change is detected but does not meet the second height change speed threshold value, the second height abrupt change is not considered to occur, and the processing is not carried out.
The height change information of the cutting head indicates whether the Z-axis coordinate change of the cutting head is greater than a certain change speed (i.e. a second height change speed threshold value, where the second height change speed threshold value is smaller than the first height change speed threshold value), for example, whether the Z-axis coordinate of the cutting head suddenly changes by more than 0.08mm within 20ms, and if so, it is determined that the second height sudden change has occurred.
And under the condition that the second height abrupt change occurs, considering that the accurate edge searching along the preset direction is finished, considering that the edge searching is finished, controlling the cutting head to stop moving, and considering that the position of the cutting head is the position of the edge point.
It should be noted that, in steps S2-S5, the corresponding target edge point is determined by determining the edge in the preset direction through rough edge finding and precise edge finding. The first edge searching speed for performing the rough edge searching may be 10m/min, or 8m/min, or 3m/min, or 2m/min, and in a specific embodiment, the first edge searching speed is an edge searching speed greater than 3m/min, or 2 m/min. Further, the second edge searching speed for performing the precise edge searching may be 1m/min or 0.5m/min, and in a specific embodiment, the second edge searching speed is less than or equal to 1m/min or 1.5 m/min. The target edge points determined through the steps S1-S5 have higher accuracy, and the rough position of the edge is determined at a higher speed in the rough edge finding process, and then the edge position is accurately located at a lower edge finding speed, so that the edge finding efficiency is improved under the condition of improving the edge finding accuracy.
In other embodiments, the target edge point may be determined only through steps S1, S4, and S5, that is, the edge position may also be determined accurately and the accuracy of edge finding may also be improved by performing the edge finding operation only at a smaller second edge finding speed with high accuracy. For example, in the case of searching for an edge at an edge searching speed of 0.5m/min, the accuracy of edge searching can be significantly improved compared to 3m/min or 5m/min, which is generally used in the prior art.
The first edge finding speed and/or the second edge finding speed in the finding process for each target edge point may be the same, that is, the same first edge finding speed and/or second edge finding speed is used in the finding process for determining each target edge point. In other embodiments, the first seek edge speed and/or the second seek edge speed in the seek process of different target edge points may be different, or the first seek edge speed and/or the second seek edge speed in the seek process of partial target edge points are the same, and the first seek edge speed and/or the second seek edge speed in the seek process of partial target edge points are different. The cutting device can be specifically set according to the shape and the size of a workpiece to be cut.
Further, in the case of determining only one target edge point, the position of the workpiece to be cut cannot be determined according to one edge point, and the positions of a plurality of edge points are required to be determined.
Therefore, in this embodiment, it is necessary to determine 2 or more than 2 target edge points in one or more predetermined directions to determine the position of the workpiece to be cut.
S6: repeatedly executing S1-S5 or repeatedly executing steps S1, S4-S5 to obtain coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching positions and/or the preset directions in the searching processes of other target edge points, and the number of the target edge points is at least 2.
That is, based on the same edge-seeking initial position, the edge-seeking operation is performed according to steps S1-S5 or S1, S4-S5 in other directions than the preset direction to determine other target edge points. Or, based on different edge searching initial positions, performing edge searching operation according to the steps S1-S5 or S1, S4-S5 in the preset direction or other directions to determine other target edge points.
S7: and calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, and controlling the cutting head to cut according to the target coordinate system.
After the searching of the target edge points is completed, whether the placement of the workpiece to be cut deviates relative to the coordinate system of the workbench or not can be determined according to the target edge points, then the target coordinate system corresponding to the workpiece to be cut is determined according to the deviation condition, the target coordinate system is the coordinate system corresponding to the workpiece to be cut, the cutting according to the target coordinate system can be guaranteed to be based on the workpiece to be cut, the cutting deviation caused by the deviation of the placement of the workpiece to be cut can be avoided, and the cutting accuracy is improved.
The following describes the determination of the number of target edge points, the preset direction and the target coordinate system for different shapes of the workpiece to be cut.
Case 1:
the workpiece to be cut is mostly rectangular or square. In this case, two adjacent edges of the workpiece to be cut are both in a perpendicular relationship, and in this case, when one edge is determined (the edge is determined by two target edge points), it is only necessary to determine one target edge point on the adjacent edge to determine whether there is a deviation between the placement of the workpiece to be cut and the coordinate system of the table. That is, in this case, the number of the target edge points is at least 3, the number of the preset directions is 2 (the first preset direction and the second preset direction), and the number of the target edge points in the first preset direction is 1, the number of the target edge points in the second preset direction is 2, or the number of the target edge points in the first preset direction is 2, and the number of the target edge points in the second preset direction is 1.
In addition, for the convenience of controlling the cutting head, the first preset direction and the second preset direction may be two directions perpendicular to each other in the positive/negative directions of the X axis/Y axis, for example, the first preset direction is a positive direction of the X axis, and the second preset direction is a negative direction of the Y axis. In other embodiments, the first preset direction and the second preset direction may be other directions besides the X axis/Y axis, and are not limited herein. In one embodiment, the first predetermined direction is one of an X-axis first direction and an X-axis second direction, where the X-axis first direction and the X-axis second direction are positive or negative directions of the X-axis, and are directions parallel to the X-axis, and are opposite directions therebetween; the second preset direction is one of a first Y-axis direction and a second Y-axis direction, wherein the first Y-axis direction and the second Y-axis direction are positive or negative Y-axis directions and are parallel to the Y-axis direction, and opposite directions are provided therebetween.
Taking fig. 2 as an example, S1 is the first seek edge initial position, the target edge point a is determined in the positive direction of the X axis through steps S2-S5, the target edge point B is determined in the negative direction of the Y axis through steps S2-S5, then the cutting head is controlled to move to the second seek edge initial position S2, and the target edge point C is determined in the positive direction of the X axis through steps S2-S5, thereby determining 3 target edge points A, B, C. Then, the sides P1P2 and P2P3 of the rectangle and the intersection point P2 (corner point P2) of the two sides can be determined according to the vertical relation between the two sides of the workpiece to be cut.
That is, according to the coordinate information of the target edge point A, B, C, the corner point coordinates corresponding to the corner point P2 can be determined, and then the offset angle α of the workpiece to be cut with respect to the X-axis or the Y-axis (the coordinate system corresponding to the table) can be determined according to the corner point coordinates of the corner point P2 and the coordinate information of the target edge point A, B, C. And then determining a conversion matrix from a coordinate system corresponding to the workbench to a target coordinate system corresponding to the workpiece to be cut according to the offset angle alpha, the corner point coordinate of the corner point P2 and the coordinate information of the target edge point A, B, C, so as to determine the target coordinate system corresponding to the workpiece to be cut, namely, the coordinate of the target workpiece to be cut on the workpiece to be cut is determined.
Case 2:
the workpiece to be cut is a regular polygon, for example, a regular triangle, a square, a regular pentagon, a regular hexagon. The regular polygon is characterized in that the length of each side and the angle of each angle are the same, and the placement position and the angle of the whole regular polygon can be determined under the condition that one point (the initial position of edge searching) and one side (two edge points) on a workpiece to be cut are determined.
That is, in this case, the preset direction is 1 or more than 1, and the number of the target edge points is 2 or more than 2, that is, when the number of the target edge points is 2, the preset directions corresponding to the 2 target edge points are the same and correspond to the same edge of the workpiece to be cut.
Taking fig. 3 as an example for explanation, S1 is the first edge finding initial position, the target edge point a is determined along the positive direction of the X axis (or other directions are also possible) through steps S2-S5, then the cutting head is controlled to move to the second edge finding initial position S2, and the target edge point B is determined along the positive direction of the X axis through steps S2-S5, so that 3 target edge points A, B are determined, that is, one edge P1P2 of the workpiece to be cut can be determined. Then, the offset angle α of the side P1P2 can be determined according to the fact that the workpiece to be cut is a regular polygon (assuming that the P1P2 in the preset placement position of the workpiece to be cut is parallel to the X-axis). And then determining a conversion matrix from the coordinate system corresponding to the workbench to a target coordinate system corresponding to the workpiece to be cut according to the offset angle alpha and the side P1P2, so as to determine the target coordinate system corresponding to the workpiece to be cut, that is, the coordinates of the target workpiece to be cut on the workpiece to be cut are determined.
Case 3:
the work piece to be cut is in other non-regular patterns, such as in the case of trapezoids, triangles or other convex polygons. In the following description, a trapezoidal shape is taken as an example for explanation.
In this case, since the workpiece to be cut is an irregular image, and there is no fixed relationship between the plurality of edges, in the process of determining the offset angle and the target coordinate system of the workpiece to be cut, it is necessary to determine the edge of each edge, that is, in the case where the workpiece to be cut is a trapezoid, it is necessary to determine each edge, and it is necessary to determine 2 target edge points on each edge (one edge is determined from the 2 target edge points).
That is, the number of the target edge points is 8, and the number of the target edge points is 4, and the target edge points correspond to each edge respectively.
Taking fig. 4 as an example, the target edge points a1, a2 are determined along the direction n1 through steps S2-S5, the target edge points B1, B2 are determined along the direction n2 through steps S2-S5, the target edge points C1, C2 are determined along the direction n3 through steps S2-S5, the target edge points D1, D2 are determined along the direction n4 through steps S2-S5, so that 8 target edge points a1, a2, B1, B2, C1, C2, D1, D2 are determined, and 4 edges P1P2, P2P3, P3P4, P4P1 are determined. Each edge then defines the overall contour of the work piece to be cut.
That is, the overall contour and position of the workpiece to be cut are determined according to the 8 target edge points a1, a2, B1, B2, C1, C2, D1, D2 and the 4 sides P1P2, P2P3, P3P4, P4P1, thereby determining the offset angle α of the workpiece to be cut with respect to the X-axis or Y-axis (coordinate system corresponding to the table). And then determining a conversion matrix from the coordinate system corresponding to the workbench to a target coordinate system corresponding to the workpiece to be cut according to the offset angle alpha, thereby determining the target coordinate system corresponding to the workpiece to be cut, namely determining the coordinate of the target workpiece to be cut on the workpiece to be cut.
Optionally, after the edge finding operation is performed on the workpiece to be cut to determine the target edge point and determine the corresponding target coordinate system, the cutting can be performed. However, in actual operation, in order to ensure that the cutting head always moves inside the workpiece to be cut and does not move outside the workpiece to be cut for operation (especially for frameless cutting), it is necessary to confirm whether the target workpiece to be cut is beyond the range of the workpiece to be cut before cutting.
Specifically, referring to fig. 5, in the edge searching method of laser cutting, in step S7: calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, and controlling the cutting head to cut according to the target coordinate system, wherein the method comprises the following steps:
step S71: determining the contour information of the workpiece to be cut according to the coordinate information of the target edge point;
step S72: judging whether the size information of the workpiece to be cut is matched with the preset size information of the target workpiece according to the contour information,
if yes, go to step S7: calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, controlling the cutting head to cut according to the target coordinate system,
if not, go to step S73: and generating prompt information, wherein the prompt information is used for prompting a user that the current workpiece to be cut cannot be cut.
And determining the profile information corresponding to the workpiece to be cut according to the plurality of target edge points determined in the steps S1-S6, for example, determining the position information of each edge of the workpiece to be cut.
In the process of determining the contour information, the position of each side of the workpiece to be cut needs to be determined, but as described above, in the case where the workpiece to be cut is rectangular, only two sides can be determined from 3 target edge points, and therefore, the positions of the other 2 sides need to be determined. That is, the positions of the other two edges also need to be determined by the edge finding operation.
Therefore, before step S71, it is also necessary whether the plurality of target edge points determined so far are sufficient for building the contour of the workpiece to be cut.
Specifically, as shown in fig. 6, the step S71: before the step of determining the contour information of the workpiece to be cut according to the coordinate information of the target edge point, the method further comprises the following steps:
step S711: acquiring shape template information corresponding to the workpiece to be cut;
step S712: judging whether the target edge points meet the contour construction requirement corresponding to the shape template information or not according to the shape template information,
if yes, go to step S71: determining the contour information of the workpiece to be cut according to the coordinate information of the target edge point,
if not, go to step S713: and controlling the cutting head to carry out edge searching operation in other directions except the preset direction.
Generally, the shape of a workpiece to be cut is fixed, so that shape template information of the workpiece to be cut is stored in a storage position of the upper computer, wherein the shape template information comprises template information of the shape or the outline of the workpiece to be cut, and the shape of the workpiece to be cut can be determined according to the shape template information. Therefore, in this embodiment, the number of target edge points required for the contour of the workpiece to be cut and the information of the edge where the target edge points are located can be determined according to the shape of the workpiece to be cut. That is to say, whether the contour of the workpiece to be cut can be constructed by the currently determined target edge points can be determined according to the shape template information, if yes, the contour construction step is executed, otherwise, the cutting head needs to be controlled to continue the edge searching operation in other directions until the determined target edge points can complete the construction of the contour of the workpiece to be cut.
After the contour of the workpiece to be cut is determined, whether the workpiece to be cut is enough to be cut to obtain a target workpiece needs to be judged according to the determined contour information, namely whether the size information of the workpiece to be cut is matched with the preset size information of the target workpiece, if the size information of the workpiece to be cut is matched with the preset size information of the target workpiece, the workpiece to be cut can be cut to obtain the target workpiece, otherwise, if the size information of the workpiece to be cut is not matched with the preset size information of the target workpiece, the workpiece to be cut cannot be cut to obtain the target workpiece. For example, when the size of the target workpiece to be cut is larger than the size of the workpiece to be cut, the cutting of the target workpiece cannot be completed, and in this case, the user should be prompted to replace the workpiece to be cut, that is, the prompt message in step S73 is generated to prompt that the target workpiece cannot be cut for the current workpiece to be cut, and the workpiece to be cut of another size or shape needs to be replaced to complete the cutting.
For the workpieces to be cut under different conditions, the number of target edge points required in the case of determining the contour is also different, and the description is given in the respective cases herein.
Case 1:
the workpiece to be cut is mostly rectangular or square. In the foregoing description, the offset angle and the corresponding target coordinate system may be determined according to 3 target edge points, but the 3 target edge points are not enough to determine the contour of the workpiece to be cut, and the positions of other edges need to be determined, so in this embodiment, it is also necessary to determine target edge points in another 2 directions (for example, the opposite direction of the first preset direction and the opposite direction of the second preset direction) besides the first preset direction and the second preset direction. In addition, because the workpiece to be cut is rectangular, in this case, only one target edge point needs to be determined in the other 2 directions respectively, so that the contour information of the workpiece to be cut can be determined.
Case 2:
the workpiece to be cut is a regular polygon. In the foregoing description, it is only necessary to determine 2 target edge points on one side (first side) of the workpiece to be cut, so that the corresponding offset angle and the target coordinate system can be determined. However, the aforementioned 2 target edge points are not enough to determine the contour information of the workpiece to be cut, and it is also necessary to obtain one target edge point on the side (second side) adjacent to the currently determined side and one target edge point on the other side (third side) adjacent to the second side or the first pass, so as to determine two vertices and 3 sides of the regular polygon, thereby determining the contour information of the workpiece to be cut. That is, under the condition that the workpiece to be cut is a regular polygon, at least 4 target edge points are required to be determined, and the 4 target edge points are located on 3 adjacent edges, and each edge has at least one target edge point, so that the contour information of the workpiece to be cut can be constructed.
Case 3:
the workpiece to be cut is in other irregular patterns. In this case, in the process of determining the offset angle and the target coordinate system, each edge of the workpiece to be cut is already determined, and therefore, the contour information of the workpiece to be cut can be directly determined according to the target edge points.
It should be noted that, in the foregoing description, the determined offset angle is α in fig. 2 as an example, but the offset angle between the actual placement position of the workpiece to be cut and the coordinate system of the table may be β 90 ° - α, in which case further confirmation is required in the case of determining the target coordinate system.
Specifically, in this case, in order to determine the actual offset angle of the workpiece to be cut, it is necessary to determine profile information of the workpiece to be cut, and then correct the determined offset angle α according to the profile information to determine whether the final offset angle is α or β, which is 90 ° - α or other angle values. In the specific operation, the contour information of the workpiece to be cut is determined, and then the actual offset angle of the workpiece to be cut is determined according to the placement position information corresponding to the workpiece to be cut on the upper computer, so that the accuracy of offset angle calculation is improved, the accuracy of determination of a target coordinate system is improved, and the cutting accuracy is finally improved.
In another embodiment, as shown in fig. 7, an edge finder for laser cutting is further provided, based on the laser cutting device, the laser cutting device includes a cutting head;
the apparatus comprises the following modules as shown in fig. 7:
an initial position determining module 102, configured to determine a preset edge finding initial position, and control the cutting head to move to the preset edge finding initial position;
an edge point search module 104 for searching the target edge point,
the edge point search module 104 includes a second edge searching unit 1044, configured to control the cutting head to move in the preset direction at a preset second edge searching speed, where the second edge searching speed is smaller than the first edge searching speed, and detect whether a second height jump occurs in the cutting head during the moving process; under the condition that the second height sudden change of the cutting head is detected, the cutting head is controlled to stop moving, and the coordinate information of the cutting head is obtained and used as the coordinate information of the target edge point corresponding to the preset direction;
a loop execution module 106, configured to invoke the initial position determination module 102 and the edge point search module 104 to obtain coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching initial position and/or the preset direction in the searching process of other target edge points, and the number of the target edge points is at least 2;
a coordinate system determining module 108, configured to calculate a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point;
and the cutting module 110 is used for controlling the cutting head to cut according to the target coordinate system.
In one embodiment, the edge point searching module 104 includes a first edge searching unit 1042, where the first edge searching unit 1042 is configured to control the cutting head to move in a preset direction at a preset first edge searching speed, and detect whether a first abrupt height change occurs in the cutting head during the movement; and under the condition that the first height mutation of the cutting head is detected, controlling the cutting head to ascend by a preset height and controlling the cutting head to retreat along the preset direction.
In an embodiment, the first edge finding unit 1042 is further configured to detect first height change information of the cutting head, determine whether the first height change information satisfies a preset first height change speed threshold, and determine that the cutting head has a first height abrupt change when the first height change information satisfies the preset first height change speed threshold.
In one embodiment, the second edge finding unit 1044 is further configured to detect second altitude change information of the cutting head, determine whether the second altitude change information satisfies a preset second altitude change speed threshold, and determine that a second altitude sudden change occurs in the cutting head when the second altitude change information satisfies the preset second altitude change speed threshold; the second altitude change speed threshold is less than the first altitude change speed threshold.
In one embodiment, the number of the target edge points is 3, and the preset directions include a first preset direction and a second preset direction; the first preset direction corresponds to 1 target edge point, the second preset direction corresponds to 2 target edge points, or the first preset direction corresponds to 2 target edge points, and the second preset direction corresponds to 1 target edge point.
In one embodiment, the first predetermined direction is one of an X-axis first direction and an X-axis second direction, the second predetermined direction is one of a Y-axis first direction and a Y-axis second direction, the X-axis first direction and the X-axis second direction are opposite directions, and the Y-axis first direction and the Y-axis second direction are opposite directions.
In one embodiment, the coordinate system determining module 108 is further configured to determine corner coordinates corresponding to the workpiece to be cut according to the coordinate information of the 3 target edge points; determining an offset angle corresponding to the workpiece to be cut according to the angular point coordinates and the coordinate information of the 3 target edge points; and determining a target coordinate system corresponding to the workpiece to be cut according to the deviation angle and the coordinate information of the 3 target edge points.
In one embodiment, as shown in fig. 7, the edge finder for laser cutting further includes a size determining module 112, configured to determine the contour information of the workpiece to be cut according to the coordinate information of the target edge point; judging whether the size information of the workpiece to be cut is matched with the preset size information of the target workpiece or not according to the contour information, calling the cutting module under the condition that the size information of the workpiece to be cut is matched with the preset size information of the target workpiece, and generating prompt information under the condition that the size information of the workpiece to be cut is not matched with the preset size information of the target workpiece, wherein the prompt information is used for prompting a user that the current workpiece to be cut cannot be cut on the target workpiece.
In one embodiment, the size determining module 112 is further configured to obtain shape template information corresponding to the workpiece to be cut; and judging whether the target edge point can meet the contour construction requirement corresponding to the shape template information or not according to the shape template information, if so, executing the contour information of the workpiece to be cut determined according to the coordinate information of the target edge point, and if not, controlling the cutting head to carry out edge searching operation in other directions except the preset direction.
FIG. 8 is a diagram that illustrates an internal structure of the computer device in one embodiment. The computer device may specifically be a terminal, and may also be a server. As shown in fig. 8, the computer device includes a processor, a memory, and an initial position determination module, an edge point finding module, etc. connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and also stores a computer program, and when the computer program is executed by a processor, the computer program can enable the processor to realize the edge searching method for laser cutting. The internal memory may also store a computer program, and when the computer program is executed by the processor, the computer program may cause the processor to execute the edge-searching method of laser cutting. It will be appreciated by those skilled in the art that the configuration shown in fig. 8 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a laser cutting device is presented, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
s1: determining a preset edge searching initial position, and controlling the cutting head to move to the preset edge searching initial position;
s2: controlling the cutting head to move along a preset direction at a preset first edge searching speed, and detecting whether the cutting head has a first height mutation in the moving process;
s3: under the condition that the first height sudden change of the cutting head is detected, the cutting head is controlled to ascend by a preset height, and the cutting head is controlled to retreat along the preset direction;
s4: controlling the cutting head to move along the preset direction at a preset second edge searching speed, wherein the second edge searching speed is smaller than the first edge searching speed, and detecting whether a second height sudden change occurs in the cutting head in the moving process;
s5: under the condition that the second height sudden change of the cutting head is detected, the cutting head is controlled to stop moving, and the coordinate information of the cutting head is obtained and used as the coordinate information of the target edge point corresponding to the preset direction;
s6: repeatedly performing S1 to S5 to acquire coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching initial position and/or the preset direction in the searching process of other target edge points, and the number of the target edge points is at least 2;
s7: and calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, and controlling the cutting head to cut according to the target coordinate system.
In one embodiment, a computer-readable storage medium is proposed, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the steps of:
s1: determining a preset edge searching initial position, and controlling the cutting head to move to the preset edge searching initial position;
s2: controlling the cutting head to move along a preset direction at a preset first edge searching speed, and detecting whether the cutting head has a first height mutation in the moving process;
s3: under the condition that the first height mutation of the cutting head is detected, the cutting head is controlled to rise to a preset height, and the cutting head is controlled to retreat along the preset direction;
s4: controlling the cutting head to move along the preset direction at a preset second edge searching speed, wherein the second edge searching speed is smaller than the first edge searching speed, and detecting whether a second height sudden change occurs in the cutting head in the moving process;
s5: under the condition that the second height sudden change of the cutting head is detected, the cutting head is controlled to stop moving, and the coordinate information of the cutting head is obtained and used as the coordinate information of the target edge point corresponding to the preset direction;
s6: repeatedly performing S1 to S5 to acquire coordinate information of a plurality of target edge points; the preset edge searching initial position and/or the preset direction in the searching process of each target edge point are the same as or different from the preset edge searching initial position and/or the preset direction in the searching process of other target edge points, and the number of the target edge points is at least 2;
s7: and calculating a target coordinate system corresponding to the workpiece to be cut according to the coordinate information of the target edge point, and controlling the cutting head to cut according to the target coordinate system.
The embodiment of the invention has the following beneficial effects:
after the edge searching method and device, the laser cutting equipment and the computer readable storage medium for laser cutting are adopted, in the edge searching process, the cutting head of the laser cutting device is controlled to move to the preset edge searching initial position, then the cutting head is controlled to move at a smaller accurate second edge searching speed in the preset direction, and under the condition that the height mutation is detected again, the current edge searching is judged to be finished, and the position of the cutting head is obtained as the position of the target edge point. And then, repeatedly executing the edge searching operation to determine other target edge points by using the same or different edge searching initial positions and the same or different preset directions. Under the condition that the edge points are determined, a corresponding coordinate system is calculated according to the coordinates of the target edge points, then the cutting operation of the cutting head is controlled according to the coordinate system, and the operations of edge searching and laser cutting are completed.
Compared with the technical scheme that the accuracy of the edge positioning of the plate is too low and the requirement of plate processing cannot be met due to the fact that the approximate edge position of the plate is only roughly searched and then cutting is carried out in the related technical scheme, in the embodiment of the invention, the position of the edge point can be accurately determined through a small edge searching speed, and the accuracy of determining the edge point is improved.
In addition, in the embodiment of the present invention, before performing the edge searching operation at the second accurate edge searching speed, the edge searching operation may be performed at the first larger edge searching speed, that is, the position of the edge point is roughly determined at the first faster edge searching speed, and then the position of the edge point is accurately determined at the second slower edge searching speed, so that the accuracy of determining the edge point is improved, and the edge searching efficiency is ensured. And a plurality of edge points of the plate are determined by the edge point determining method, so that a corresponding processing coordinate system is constructed to control processing, and the accuracy of laser cutting is ensured.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a non-volatile computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.