Workpiece position adjustment method, device, electronic device and readable storage medium
By using probes and robots on CNC machine tools to record and correct the workpiece position, the problem of workpiece position offset caused by table jitter is solved, and higher machining accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411383755.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-09-30
AI Technical Summary
During CNC machining, the workpiece position may be offset due to the shaking of the workbench, resulting in damage to the workpiece or tool.
Using the method of combining probes and robots, the coordinates of the workpiece at the preset processing position are recorded, the actual position deviation is detected, and the workpiece is moved by the robot to correct its position to ensure that the workpiece is located at the preset processing position.
It effectively reduces the risk of damage caused by workpiece position deviation and improves machining accuracy and stability.
Smart Images

Figure CN119270762B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine tool processing technology, and in particular to a workpiece position adjustment method, device, electronic equipment and readable storage medium. Background Art
[0002] CNC (Computerised Numerical Control) machining, also known as CNC machining, refers to a mechanical machining method that uses digital information to control the displacement of parts and tools on CNC machine tools. Because CNC machining is controlled by a computer after programming, CNC machining has the advantages of stable machining quality, high machining accuracy, high repeatability, the ability to process complex surfaces, and high machining efficiency. When CNC machine tools are performing CNC machining, due to precision requirements, the workpiece needs to be in a precise position. During the machining process, the workbench may shake, causing the workpiece position to shift, which can damage the workpiece or even the tool. Summary of the invention
[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a workpiece position adjustment method, device, electronic device and readable storage medium, which can move the workpiece to a preset processing position and reduce the risk of damage to the workpiece and tool due to workpiece position deviation.
[0004] The workpiece position adjustment method according to the first aspect of the present application is applied to a machine tool, wherein the machine tool is provided with a probe, a first driving module, a workbench and a manipulator, wherein the probe is provided above the workbench, the manipulator is provided on one side of the workbench, the first driving module is connected to the probe, and the first driving module is used to drive the probe to move; the workbench is used to place the workpiece;
[0005] The method comprises:
[0006] When the workpiece is located at a preset processing position, controlling the first driving module to drive the probe to move so that the probe sequentially contacts a first preset position and a second preset position of the workpiece, recording a first pre-recorded coordinate when the probe contacts the first preset position, and recording a second pre-recorded coordinate when the probe contacts the second preset position;
[0007] In response to a preset condition, controlling the first driving module to drive the probe to move on the workbench, recording a first detection coordinate when the probe contacts the workpiece, and determining a first actual coordinate of the first preset part and a second actual coordinate of the second preset part based on the first detection coordinate;
[0008] determining a pre-recorded vector based on the first pre-recorded coordinate and the second pre-recorded coordinate;
[0009] determining a first coordinate error based on the first actual coordinate and the first pre-recorded coordinate;
[0010] The robot is controlled to control the movement of the workpiece based on the second actual coordinate, the first coordinate error and the pre-recorded vector, so that the workpiece is located at the preset processing position.
[0011] According to the workpiece position adjustment method of the embodiment of the present application, there are at least the following beneficial effects: the workpiece position adjustment method of the embodiment of the present application first records the first pre-recorded coordinates of the first preset part and the second pre-recorded coordinates of the second preset part when the workpiece is at the preset processing position; then, in response to the preset conditions, the first detection coordinates when the probe contacts the workpiece are recorded, and the first actual coordinates of the first preset part and the second actual coordinates of the second preset part are determined based on the first detection coordinates. The first actual coordinates and the first pre-recorded coordinates determine the first coordinate error, thereby determining the position deviation of the workpiece, and then based on the second actual coordinates, the first coordinate error and the pre-recorded vector control the manipulator to control the movement of the workpiece so that the workpiece is located at the preset processing position, thereby realizing the correction of the workpiece position. In this way, the method of the present application can move the workpiece to the preset processing position when the workpiece is offset, complete the correction of the workpiece position, and reduce the risk of damage to the workpiece and the tool due to the offset of the workpiece position.
[0012] According to some embodiments of the first aspect of the present application, the first coordinate error includes a first X coordinate error and a first Y coordinate error;
[0013] The controlling the manipulator to control the movement of the workpiece based on the second actual coordinate, the first coordinate error and the pre-recorded vector so that the workpiece is located at the preset processing position includes:
[0014] Performing detection processing on the first coordinate error;
[0015] When it is detected that the first coordinate error is within a preset error range, the manipulator is controlled to control the workpiece to move along the X direction by the first X coordinate error, and the manipulator is controlled to control the workpiece to move along the Y direction by the first Y coordinate error; wherein the X direction and the Y direction are perpendicular to each other, and both the X direction and the Y direction are horizontal directions;
[0016] Determine a third actual coordinate of the first preset position after the workpiece moves based on the first actual coordinate, and determine a fourth actual coordinate of the second preset position after the workpiece moves based on the second actual coordinate;
[0017] Determine a first actual vector based on the third actual coordinate and the fourth actual coordinate;
[0018] Calculating a first angle error between the first actual vector and the pre-recorded vector;
[0019] Taking the first preset position as a rotation center, the robot arm is controlled to control the workpiece to rotate by the first angle error so that the workpiece is located at the preset processing position.
[0020] According to some embodiments of the first aspect of the present application, the machine tool further includes a control panel and a second drive module, the control panel is electrically connected to the second drive module; the workbench is installed on the second drive module, and the second drive module is used to drive the workbench to move along the X direction and the Y direction respectively; the preset error range includes an X-axis error range and a Y-axis error range;
[0021] After the first coordinate error is detected and processed, the method further includes:
[0022] When it is detected that the first coordinate error is not within the preset error range, the first Z coordinate error is zero, and the first X coordinate error is greater than the upper limit value of the X-axis error range or the first Y coordinate error is greater than the upper limit value of the Y-axis error range, the manipulator is controlled to manipulate the control panel so that the second driving module drives the workbench to move along the X direction by the first X coordinate error, and the second driving module drives the workbench to move along the Y direction by the first Y coordinate error;
[0023] Controlling the first driving module to drive the probe to move on the workbench, recording a second detection coordinate when the probe contacts the workpiece, and determining a fifth actual coordinate of the first preset position and a sixth actual coordinate of the second preset position based on the second detection coordinate;
[0024] Obtaining a second coordinate error based on the fifth actual coordinate and the first pre-recorded coordinate; wherein the second coordinate error includes a second X coordinate error and a second Y coordinate error;
[0025] Control the manipulator to control the workpiece to move along the X direction by the second X coordinate error, and control the manipulator to control the workpiece to move along the Y direction by the second Y coordinate error;
[0026] Determine a seventh actual coordinate of the first preset position after the workpiece moves based on the fifth actual coordinate, and determine an eighth actual coordinate of the second preset position after the workpiece moves based on the sixth actual coordinate;
[0027] determining a second actual vector based on the seventh actual coordinate and the eighth actual coordinate;
[0028] Calculating a second angle error between the second actual vector and the pre-recorded vector;
[0029] Taking the first preset position as the rotation center, the robot arm is controlled to control the workpiece to rotate by the second angle error so that the workpiece is located at the preset processing position.
[0030] According to some embodiments of the first aspect of the present application, controlling the manipulator to rotate the workpiece by the second angle error with the first preset position as the rotation center so that the workpiece is located at the preset processing position includes:
[0031] Controlling the first driving module to drive the probe to move so that the probe abuts against the first preset position of the workpiece;
[0032] With the probe as the rotation axis, the manipulator is controlled to control the workpiece to rotate by the second angle error so that the workpiece is located at the preset processing position.
[0033] According to some embodiments of the first aspect of the present application, the control panel is provided with a plurality of buttons, each button corresponding to a preset button coordinate;
[0034] The controlling the manipulator to manipulate the control panel so that the second driving module drives the workbench to move along the X direction by the first X coordinate error, and the second driving module drives the workbench to move along the Y direction by the first Y coordinate error, comprises:
[0035] determining a first button group and a first pressing order of the first button group based on the first X coordinate error; determining a second button group and a second pressing order of the second button group based on the first Y coordinate error;
[0036] Based on the preset button coordinates corresponding to each button in the first button group, a first coordinate group is obtained; based on the preset button coordinates corresponding to each button in the second button group, a second coordinate group is obtained;
[0037] Based on the first coordinate group and the first pressing sequence, a first motion trajectory is obtained; based on the second coordinate group and the second pressing sequence, a second motion trajectory is obtained;
[0038] Based on the first motion trajectory, the manipulator is controlled to operate the button on the control panel, so that the second driving module drives the workbench to move along the X direction by the first X coordinate error; based on the second motion trajectory, the manipulator is controlled to operate the button on the control panel, so that the second driving module drives the workbench to move along the Y direction by the first Y coordinate error.
[0039] According to some embodiments of the first aspect of the present application, the first coordinate error includes a Z coordinate error in a vertical direction;
[0040] After determining the first coordinate error based on the first actual coordinate and the first pre-recorded coordinate, the method further comprises:
[0041] Performing detection processing on the first coordinate error;
[0042] When it is detected that the Z coordinate error of the first coordinate error is a non-zero value, a fault alarm is sent to a preset terminal, and the machine tool is stopped.
[0043] According to some embodiments of the first aspect of the present application, a collision sensor is provided on the workbench; the machine tool is provided with a tool drive module, a disc tool magazine and a tool magazine rotation module, the disc tool magazine and the tool drive module are both arranged above the workbench, the disc tool magazine is arranged on one side of the tool drive module, and the disc tool magazine is provided with a plurality of tools along the circumferential direction; the tool drive module is used to clamp the tools in the disc tool magazine and control the tools to process the workpiece; the tool magazine rotation module is used to rotate the disc tool magazine so that the tool drive module can clamp different tools in the disc tool magazine;
[0044] The preset condition is one of the following:
[0045] receiving collision warning information sent by the collision sensor;
[0046] It is detected that the tool currently clamped by the tool driving module is damaged;
[0047] It is detected that the tool driving module switches the tool from the disc tool magazine.
[0048] A second aspect of the present application provides a workpiece position adjustment device, which is applied to a machine tool. The machine tool is provided with a probe, a first driving module, a workbench and a manipulator, wherein the probe is arranged above the workbench, the manipulator is arranged on one side of the workbench, the first driving module is connected to the probe, and the first driving module is used to drive the probe to move; the workbench is used to place the workpiece;
[0049] The device comprises:
[0050] a recording module, used for controlling the first driving module to drive the probe to move when the workpiece is located at a preset processing position, so that the probe sequentially contacts a first preset position and a second preset position of the workpiece, and recording a first pre-recorded coordinate when the probe contacts the first preset position, and recording a second pre-recorded coordinate when the probe contacts the second preset position;
[0051] a control module, configured to control the first driving module to drive the probe to move on the workbench in response to a preset condition, record a first detection coordinate when the probe contacts the workpiece, and determine a first actual coordinate of the first preset part and a second actual coordinate of the second preset part based on the first detection coordinate;
[0052] a vector determination module, configured to determine a pre-recorded vector based on the first pre-recorded coordinate and the second pre-recorded coordinate;
[0053] a coordinate error determination module, configured to determine a first coordinate error based on the first actual coordinate and the first pre-recorded coordinate;
[0054] A moving module is used to control the manipulator to move the workpiece based on the second actual coordinate, the first coordinate error and the pre-recorded vector, so that the workpiece is located at the preset processing position.
[0055] The third aspect of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the workpiece position adjustment method described in any one of the first aspect of the present application is implemented.
[0056] The fourth aspect of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the workpiece position adjustment method described in any one of the first aspect of the present application is implemented.
[0057] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The present application is further described below with reference to the accompanying drawings and embodiments, wherein:
[0059] Figure 1 A schematic diagram of the structure of a machine tool according to an embodiment of the present application;
[0060] Figure 2 A schematic diagram of the steps of the workpiece position adjustment method according to an embodiment of the present application;
[0061] Figure 3 for Figure 2 A specific flow chart of step S250;
[0062] Figure 4 This is a schematic flow chart of the steps after step S310 of the workpiece position adjustment method according to an embodiment of the present application;
[0063] Figure 5 for Figure 4 A specific flow chart of step S480;
[0064] Figure 6 for Figure 4 A specific flow chart of step S410;
[0065] Figure 7 For the embodiments of this application Figure 1 A schematic diagram of a process flow after step S240;
[0066] Figure 8 A schematic structural diagram of a workpiece position adjustment device according to an embodiment of the present application;
[0067] Fig. 9 A schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0068] Reference numerals:
[0069] Manipulator 100 ; second driving module 200 ; workbench 300 ; probe 400 ; first driving module 500 ; tool driving module 600 ; tool 700 . DETAILED DESCRIPTION
[0070] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0071] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0072] In the description of this application, "several" means more than one, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0073] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0074] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0075] Reference Figure 1 , Figure 1 The schematic diagram of the structure of the machine tool of the embodiment of the present application is shown in FIG. The machine tool includes a probe 400, a first drive module 500, a workbench 300 and a manipulator 100, wherein the probe 400 is arranged above the workbench 300, and the manipulator 100 is arranged on one side of the workbench 300, and the first drive module 500 is connected to the probe 400, and the first drive module 500 is used to drive the probe 400 to move; the workbench 300 is used to place the workpiece; the machine tool also includes a first control module (not shown in the figure), a second control module (not shown in the figure), a tool 700 and a tool drive module 600, wherein the tool 700 is installed on the tool drive module 600, and the tool 700 is located above the preset processing position, and the tool drive module 600 is used to drive the tool 700 to process the workpiece, and the second control module is used to control the operation of the tool drive module 600. The first control module is respectively connected to the first drive module 500 and the manipulator 100, and the first control module is used to control the operation of the first drive module 500 and the manipulator 100. Specifically, when the workpiece is located at the preset processing position, the first control module controls the first driving module 500 to drive the probe 400 to move, so that the probe 400 is in contact with the first preset position and the second preset position of the workpiece in turn, and the first pre-recorded coordinates when the probe 400 contacts the first preset position are recorded, and the second pre-recorded coordinates when the probe 400 contacts the second preset position are recorded. The first control module is also used to control the first driving module 500 to drive the probe 400 to move on the workbench 300, record the first detection coordinates when the probe 400 contacts the workpiece, determine the first actual coordinates of the first preset position and the second actual coordinates of the second preset position based on the first detection coordinates, and the first control module is also used to calculate the pre-recorded vector and the first coordinate error, and control the manipulator 100 to control the movement of the workpiece based on the second actual coordinates, the first coordinate error and the pre-recorded vector, so that the workpiece is located at the preset processing position.
[0076] The first aspect of the present application provides a method for adjusting the position of a workpiece. Figure 2 , Figure 2 The workpiece position adjustment method of the embodiment of the present application is a schematic flow chart of the steps. The workpiece position adjustment method of the embodiment of the present application can be applied to the first control module of the machine tool. The workpiece position adjustment method of the embodiment of the present application can include but is not limited to steps S210 to S250.
[0077] Step S210, when the workpiece is located at a preset processing position, controlling the first driving module to drive the probe to move so that the probe sequentially contacts a first preset portion and a second preset portion of the workpiece, recording a first pre-recorded coordinate when the probe contacts the first preset portion, and recording a second pre-recorded coordinate when the probe contacts the second preset portion;
[0078] It is worth noting that before executing step S210, a spatial rectangular coordinate system needs to be established on the workbench 300, and the coordinate system includes an X-axis, a Y-axis, and a Z-axis, wherein the X-axis and the Y-axis are both horizontal directions, and the Z-axis is a vertical direction. It should be noted that a person skilled in the art can pre-set the motion path of the probe 400 so that the probe 400 can move to the first preset position and the second preset position.
[0079] It is worth noting that the probe 400 uses a trigger probe 400. The trigger probe 400 (Touch Probe) is one of the key tools on CNC machine tools and is mainly used to measure the size, position and contour of workpieces. The trigger probe 400 performs measurement by contacting the surface of the workpiece. It contains a closed active circuit inside, which is connected to a special trigger mechanism. When the end contact of the probe 400 contacts the surface of the workpiece, the trigger mechanism generates a trigger action, causing the circuit state to change and emit an acoustic and optical signal. This signal is transmitted to the control system of the CNC machine tool, and the control system records the current machine tool coordinate position, thereby realizing the measurement of the size, position and contour of the workpiece.
[0080] Specifically, when the probe 400 contacts the first preset position of the workpiece, the probe 400 is triggered and sends a signal to the first control module, and the first control module uses the coordinates of the end of the current probe 400 as the first pre-recorded coordinates of the first preset position. In addition, a spring is provided inside the probe 400, and when the probe 400 contacts the surface of the workpiece, the spring contracts, which can reduce the pressure when the probe 400 contacts the workpiece, and prevent the probe 400 from damaging the workpiece.
[0081] Step S220, in response to a preset condition, controlling the first driving module to drive the probe to move on the workbench, recording a first detection coordinate when the probe contacts the workpiece, and determining a first actual coordinate of the first preset position and a second actual coordinate of the second preset position based on the first detection coordinate;
[0082] It is worth noting that, in response to the preset condition, the tool driving module 600 is first stopped.
[0083] It is worth noting that by recording the first detection coordinates when the probe 400 contacts the workpiece, the contour of the workpiece and the coordinates of the contour position can be determined based on the first detection coordinates. After determining the coordinates of the contour position, the first actual coordinates of the first preset part can be calculated based on the position of the first preset part relative to the contour; the second actual coordinates of the second preset part can be calculated based on the position of the second preset part relative to the contour.
[0084] Exemplarily, the shape of the workpiece, the end face of the workpiece is a square, the first preset position is the center point of the square, the second preset position is the midpoint of the side parallel to the Y axis in the square, and the X-axis coordinate of the side where the second preset position is located is greater than the X-axis coordinate of the other side parallel to the Y axis. The side length of the square is c, and the contour of the workpiece and the coordinates of the contour position are determined by the first detection coordinates, and the coordinates of the four vertices of the square are obtained as (a, b, c), (a, b+f, c), (a+f, b, c), (a+f, b+f, c), then the first actual coordinates of the first preset position can be calculated as (a+f / 2, b+f / 2, c), and the second actual coordinates of the second preset position are (a+f, b+f / 2, c).
[0085] Exemplarily, the workpiece is a cuboid, the end face of the workpiece is a rectangle, the first preset position is the center point of the rectangle, the second preset position is the midpoint of the side of the rectangle parallel to the Y axis, and the X-axis coordinate of the side where the second preset position is located is greater than the X-axis coordinate of the other side parallel to the Y axis. The length of the rectangle is parallel to the Y axis, the width of the rectangle is parallel to the X axis, the length of the rectangle is f, and the width is e. The contour of the workpiece and the coordinates of the contour position are determined by the first detection coordinates, and the coordinates of the four vertices of the rectangle are obtained as (a, b, c), (a+e, b, c), (a, b+f, c), (a+e, b+f, c), respectively. Then, the first actual coordinates of the first preset position can be calculated as (a+e / 2, b+f / 2, c), and the second actual coordinates of the second preset position can be calculated as (a+e, b+f / 2, c).
[0086] Step S230, determining a pre-recorded vector based on the first pre-recorded coordinate and the second pre-recorded coordinate;
[0087] Step S240, determining a first coordinate error based on the first actual coordinate and the first pre-recorded coordinate;
[0088] Step S250 , controlling the robot to move the workpiece based on the second actual coordinate, the first coordinate error and the pre-recorded vector, so that the workpiece is located at a preset processing position.
[0089] The workpiece position adjustment method of the embodiment of the present application first records the first pre-recorded coordinates of the first preset part and the second pre-recorded coordinates of the second preset part when the workpiece is at the preset processing position through steps S210 to S250; then, in response to the preset conditions, the first detection coordinates when the probe 400 contacts the workpiece are recorded, and the first actual coordinates of the first preset part and the second actual coordinates of the second preset part are determined based on the first detection coordinates. The first actual coordinates and the first pre-recorded coordinates determine the first coordinate error, thereby determining the position deviation of the workpiece, and then based on the second actual coordinates, the first coordinate error and the pre-recorded vector control manipulator 100 to control the movement of the workpiece so that the workpiece is located at the preset processing position, thereby correcting the position of the workpiece. In this way, the method of the present application can move the workpiece to the preset processing position when the workpiece is offset, complete the correction of the workpiece position, and reduce the risk of damage to the workpiece and the tool 700 due to the offset of the workpiece position.
[0090] In one embodiment, a collision sensor is provided on the workbench 300; in one embodiment, the machine tool is further provided with a disc tool magazine and a tool magazine rotation module, the disc tool magazine and the tool drive module are both provided above the workbench, the disc tool magazine is provided on one side of the tool drive module, and the disc tool magazine is provided with a plurality of tools along the circumferential direction; the tool drive module is used to clamp the tools in the disc tool magazine and control the tools to process the workpiece; the tool magazine rotation module is used to rotate the disc tool magazine so that the tool drive module can clamp different tools in the disc tool magazine;
[0091] The default condition is one of the following:
[0092] receiving collision warning information sent by a collision sensor;
[0093] It is detected that the tool currently clamped by the tool drive module is damaged;
[0094] It is detected that the tool drive module switches the tool from the disc tool magazine.
[0095] It is worth noting that the collision sensor is in communication connection with the first control module. When the collision sensor senses a collision, the collision sensor sends a collision alarm message to the first control module, indicating that the workbench 300 is shaking and a collision may occur, which may cause the workpiece to shift.
[0096] It is worth noting that when the tool currently held by the tool driving module is detected to be damaged, it may be that an abnormal state occurs when the tool is used to process the workpiece, resulting in damage to the tool. At this time, the position of the workpiece may be offset, so step S220 needs to be executed. In addition, this application does not specifically limit how to detect tool damage.
[0097] It is worth noting that each tool in the disc tool magazine corresponds to a processing procedure. When it is detected that the tool driving module switches the tool from the disc tool magazine, it means that the processing procedure of the workpiece has been switched, and the processing procedure corresponding to the previous tool has been completed. It needs to be replaced with the next tool to carry out the next processing procedure. During the processing of the previous tool, the position of the workpiece may be offset. If the next tool is continued to be used for processing at this time, it is likely to cause defective products. Therefore, when it is detected that the tool driving module switches the tool from the disc tool magazine, step S220 needs to be executed. Specifically, when it is detected that the tool magazine rotation module is used to rotate the disc tool magazine, it can be confirmed that the tool driving module switches the tool from the disc tool magazine.
[0098] In one embodiment, the preset condition is that the current time is the preset time, and there may be multiple preset times. In this way, it is possible to periodically detect whether the workpiece is offset, thereby ensuring the processing quality of the workpiece.
[0099] It can be understood that the first coordinate error includes a first X coordinate error, a first Y coordinate error and a first Z coordinate error; illustratively, the first actual coordinate is (a, b, c), the first pre-recorded coordinate is (i, j, k), then the first X coordinate error is ia; the first Y coordinate error is jb; and the first Z coordinate error is kc.
[0100] Reference Figure 3 , Figure 3 yes Figure 2 A specific flow chart of step S250 in FIG. 2 . Step S250 may include but is not limited to steps S310 to S360.
[0101] Step S310, detecting and processing the first coordinate error;
[0102] Step S320, when it is detected that the first coordinate error is within the preset error range, controlling the manipulator to control the workpiece to move along the X direction by the first X coordinate error, and controlling the manipulator to control the workpiece to move along the Y direction by the first Y coordinate error; wherein the X direction and the Y direction are perpendicular to each other, and both the X direction and the Y direction are horizontal directions;
[0103] It is worth noting that the preset error range includes an X-axis error range, a Y-axis error range, and a Z-axis error range. Those skilled in the art can set the X-axis error range, the Y-axis error range, and the Z-axis error range according to actual conditions. In one embodiment, the first coordinate error includes a Z-axis coordinate error, and when the Z-axis coordinate error is greater than 0, it is determined that the Z-axis coordinate error is not within the Z-axis error range.
[0104] In one embodiment, when it is detected that the first coordinate error is not within the preset error range, and the first X coordinate error is smaller than the lower limit value of the X-axis error range, and the first Y coordinate error is smaller than the lower limit value of the Y-axis error range, it means that the position offset of the workpiece is small and no correction is required.
[0105] Step S330, determining a third actual coordinate of the first preset position after the workpiece moves based on the first actual coordinate, and determining a fourth actual coordinate of the second preset position after the workpiece moves based on the second actual coordinate;
[0106] Exemplarily, the first actual coordinate is (a, b, c), the second actual coordinate is (l, m, n), and the first pre-recorded coordinate is (i, j, k), then the first X coordinate error is ia; the first Y coordinate error is jb; the first Z coordinate error is kc; since the workpiece moves along the X direction by the first X coordinate error, and the robot 100 controls the workpiece to move along the Y direction by the first Y coordinate error, the third actual coordinate is the same as the first pre-recorded coordinate, that is, the third actual coordinate is (i, j, k). The fourth actual coordinate is (l+ia, m+jb, n+kc).
[0107] Step S340, determining a first actual vector based on the third actual coordinate and the fourth actual coordinate;
[0108] Step S350, calculating a first angle error between a first actual vector and a pre-recorded vector;
[0109] It is worth noting that the angle between the first actual vector and the pre-recorded vector is calculated as the first angle error.
[0110] Step S360, taking the first preset position as the rotation center, controlling the robot arm to control the workpiece to rotate by a first angle error, so that the workpiece is located at a preset processing position.
[0111] In step S360 of one embodiment, the first driving module 500 is controlled to drive the probe 400 to move so that the probe 400 abuts against a first preset position of the workpiece; with the probe 400 as the rotation axis, the robot 100 is controlled to control the workpiece to rotate by a first angle error so that the workpiece is located at a preset processing position.
[0112] It is worth noting that in the embodiment of the present application, through steps S310 to S360, when it is detected that the first coordinate error is within the preset error range, the robot 100 is first used to control the movement of the workpiece so that the third actual coordinate of the workpiece is the same as the first pre-recorded coordinate, and then the first actual vector is determined based on the third actual coordinate and the fourth actual coordinate, and the first angle error between the first actual vector and the pre-recorded vector is calculated. Then, with the first preset position as the rotation center, the robot 100 is controlled to control the workpiece to rotate by the first angle error. During the rotation, the actual coordinate of the second preset position gradually approaches the second pre-recorded coordinate. In this way, after the rotation is completed, the actual coordinate of the second preset position can be made the same as the second pre-recorded coordinate, so that the workpiece is located at the preset processing position.
[0113] It is understandable that, referring to Figure 1 The machine tool also includes a control panel and a second driving module 200, the control panel is electrically connected to the second driving module 200; the workbench 300 is installed on the second driving module 200, and the second driving module 200 is used to drive the workbench 300 to move along the X direction and the Y direction respectively; Figure 4 , Figure 4 Schematic diagram of the steps of the workpiece position adjustment method after step S310 according to an embodiment of the present application.
[0114] Step S310 may include but is not limited to steps S410 to S480.
[0115] Step S410, when it is detected that the first coordinate error is not within the preset error range, the first Z coordinate error is zero, and the first X coordinate error is greater than the upper limit value of the X-axis error range or the first Y coordinate error is greater than the upper limit value of the Y-axis error range, control the manipulator to manipulate the control panel so that the second drive module drives the workbench to move along the X direction by the first X coordinate error, and the second drive module drives the workbench to move along the Y direction by the first Y coordinate error;
[0116] It is worth noting that when it is detected that the first coordinate error is not within the preset error range, and the first Z coordinate error is zero, and the first X coordinate error is greater than the upper limit of the X-axis error range or the first Y coordinate error is greater than the upper limit of the Y-axis error range, it means that the position offset of the workpiece has exceeded the modulation range of the manipulator 100, and it is necessary to first drive the workbench 300 to drive the workpiece to move through the second drive module 200, and then further correct the position of the workpiece through the manipulator 100.
[0117] It is worth noting that the control panel (not shown in the figure) is electrically connected to the second control module, and the second driving module 200 can be controlled through the second control module by manipulating the control panel by the manipulator 100 .
[0118] Step S420, controlling the first driving module to drive the probe to move on the workbench, recording the second detection coordinate when the probe contacts the workpiece, and determining the fifth actual coordinate of the first preset position and the sixth actual coordinate of the second preset position based on the second detection coordinate;
[0119] It is worth noting that by recording the second detection coordinates when the probe 400 contacts the workpiece, the contour of the workpiece and the coordinates of the contour position can be determined based on the second detection coordinates. After determining the coordinates of the contour position, the fifth actual coordinates of the first preset part can be calculated based on the position of the first preset part relative to the contour; the sixth actual coordinates of the second preset part can be calculated based on the position of the second preset part relative to the contour.
[0120] Step S430, obtaining a second coordinate error based on the fifth actual coordinate and the first pre-recorded coordinate; wherein the second coordinate error includes a second X coordinate error and a second Y coordinate error;
[0121] Step S440, controlling the manipulator to control the workpiece to move along the X direction by a second X coordinate error, and controlling the manipulator to control the workpiece to move along the Y direction by a second Y coordinate error;
[0122] Step S450, determining a seventh actual coordinate of the first preset position after the workpiece moves based on the fifth actual coordinate, and determining an eighth actual coordinate of the second preset position after the workpiece moves based on the sixth actual coordinate;
[0123] It is worth noting that since the workpiece moves along the X direction by the second X coordinate error and along the Y direction by the second Y coordinate error, the X-axis coordinate of the sixth actual coordinate + the second X coordinate error can be added to obtain the X-axis coordinate of the eighth actual coordinate; the Y-axis coordinate of the sixth actual coordinate + the second Y coordinate error can be added to obtain the Y-axis coordinate of the eighth actual coordinate. And the moving direction of the workpiece is the X direction and the Y direction, therefore, the Z-axis coordinate of the eighth actual coordinate is the same as the Z-axis coordinate of the sixth actual coordinate. At the same time, the seventh actual coordinate of the first preset position can be determined.
[0124] Step S460, determining a second actual vector based on the seventh actual coordinate and the eighth actual coordinate;
[0125] Step S470, calculating a second angle error between a second actual vector and a pre-recorded vector;
[0126] It is worth noting that the angle between the second actual vector and the pre-recorded vector is calculated, and the angle is used as the second angle error.
[0127] Step S480, taking the first preset position as the rotation center, controlling the robot arm to control the workpiece to rotate by a second angle error, so that the workpiece is located at a preset processing position.
[0128] It is worth noting that in the embodiment of the present application, through steps S410 to S480, when it is detected that the first coordinate error is not within the preset error range, and the first Z coordinate error is zero, and the first X coordinate error is greater than the upper limit value of the X-axis error range or the first Y coordinate error is greater than the upper limit value of the Y-axis error range, the workbench 300 is first driven by the second driving module 200 to drive the workpiece to move, and then the position of the workpiece is further corrected by the manipulator 100, so that the workpiece can be moved to the preset processing position.
[0129] It is understandable that, referring to Figure 5 , Figure 5 for Figure 4 A specific flow chart of step S480 in FIG. 4 is shown in FIG. 4. Step S480 may include but is not limited to step S510 and step S520.
[0130] Step S510, controlling the first driving module to drive the probe to move so that the probe abuts against a first preset position of the workpiece;
[0131] Step S520 , using the probe as a rotation axis, controlling the manipulator to rotate the workpiece by a second angle error, so that the workpiece is located at a preset processing position.
[0132] It can be understood that the control panel is provided with a plurality of buttons, each button corresponding to a preset button coordinate; Figure 6 , Figure 6 for Figure 4 A specific flow chart of step S410 in FIG. 4 is a flow chart of step S410 in FIG. 4. Step S410 may include but is not limited to steps S610 to S640.
[0133] Step S610, determining a first button group and a first pressing order of the first button group based on the first X coordinate error; determining a second button group and a second pressing order of the second button group based on the first Y coordinate error;
[0134] It is worth noting that the first button group includes an X-direction preset button group and a button group for inputting a first X coordinate error; the second button group includes a Y-direction preset button group and a button group for inputting a first Y coordinate error.
[0135] Exemplarily, the preset button group in the X direction includes an X button and a confirmation button. When the X button is pressed by the manipulator 100, it indicates that the second drive module 200 needs to be controlled to control the workbench 300 to move in the X direction. When the confirmation button is pressed, it indicates that the control is to be executed. The button group for inputting the first X coordinate error is a button representing the numerical value of the first X coordinate error, and the first pressing order is the X button, the button representing the numerical value of the first X coordinate error, and the confirmation button. For example, if the first X coordinate error is -10, the button group for inputting the first X coordinate error includes a button representing a negative number, a button representing the number 1, and a button representing the number 0, and the first pressing order is the X button, the button representing a negative number, the button representing the number 1, the button representing the number 0, and the confirmation button. For example, if the first X coordinate error is +11, the first pressing order is the X button, the button representing a positive number, the button representing the number 1, the button representing the number 1, and the confirmation button.
[0136] Step S620, obtaining a first coordinate group based on the preset button coordinates corresponding to each button in the first button group; obtaining a second coordinate group based on the preset button coordinates corresponding to each button in the second button group;
[0137] Step S630, obtaining a first motion trajectory based on the first coordinate group and the first pressing sequence; obtaining a second motion trajectory based on the second coordinate group and the second pressing sequence;
[0138] It is worth noting that the first pressing order indicates the pressing order of the buttons in the first button group. Since the coordinates in the first coordinate group are the coordinates of the buttons in the first button group, the coordinates in the first coordinate group are sorted according to the first pressing order to obtain the first motion trajectory. The second pressing order indicates the pressing order of the buttons in the second button group. Since the coordinates in the second coordinate group are the coordinates of the buttons in the second button group, the coordinates in the second coordinate group are sorted according to the second pressing order to obtain the second motion trajectory.
[0139] It is worth noting that when the robot 100 moves along the first motion trajectory, the buttons in the first button group can be pressed in sequence according to the first pressing sequence. When the robot 100 moves along the second motion trajectory, the buttons in the second button group can be pressed in sequence according to the second pressing sequence.
[0140] Step S640: Based on the first motion trajectory, the robot controls the buttons on the control panel to enable the second drive module to drive the workbench to move along the X direction by the first X coordinate error; based on the second motion trajectory, the robot controls the buttons on the control panel to enable the second drive module to drive the workbench to move along the Y direction by the first Y coordinate error.
[0141] It is worth noting that when the first X coordinate error input by the control panel is a positive value, the second driving module 200 is controlled to drive the workbench 300 to move in the positive direction of the X axis, and when the first X coordinate error input by the control panel is a negative value, the second driving module 200 is controlled to drive the workbench 300 to move in the negative direction of the X axis. When the first Y coordinate error input by the control panel is a positive value, the second driving module 200 is controlled to drive the workbench 300 to move in the positive direction of the Y axis, and when the first Y coordinate error input by the control panel is a negative value, the second driving module 200 is controlled to drive the workbench 300 to move in the negative direction of the Y axis.
[0142] The embodiment of the present application achieves, through steps S610 to S640, that even if a large deviation occurs to the workpiece, there is no need for manual adjustment of the control panel. Instead, the robot 100 controls the buttons on the control panel to achieve automatic adjustment.
[0143] It is understandable that, referring to Figure 7 , Figure 7 For the embodiments of this application Figure 1 A flow chart of the process after step S240 in FIG. After step S240, steps S710 and S720 may also be included.
[0144] Step S710, detecting and processing the first coordinate error;
[0145] Step S720: When it is detected that the first Z coordinate error of the first coordinate error is a non-zero value, a fault alarm is sent to a preset terminal, and the machine tool is stopped.
[0146] Specifically, when the first Z coordinate error of the first coordinate error is detected to be a non-zero value, it indicates that the workpiece position has a very large offset and cannot be adjusted automatically, so a fault alarm is sent to the preset terminal to notify relevant personnel to handle it. The manipulator 100 is controlled to press the stop button on the control panel to stop the machine tool.
[0147] Specifically, the preset button coordinates corresponding to the stop button are obtained, and the manipulator 100 is controlled to move to the preset button coordinates to press the stop button in the control panel. The preset terminal is a terminal connected to the first control module for communication, and can be a mobile phone, a laptop computer, a desktop computer, and other devices.
[0148] It can be understood that the second aspect of the present application provides a workpiece position adjustment device. Figure 8 , Figure 8 The schematic diagram of the structure of the workpiece position adjustment device of the embodiment of the present application is shown in FIG. The workpiece position adjustment device is applied to the above-mentioned machine tool, and the device includes:
[0149] The recording module 810 is used to control the first driving module 500 to drive the probe 400 to move when the workpiece is located at a preset processing position, so that the probe 400 sequentially contacts the first preset position and the second preset position of the workpiece, and record the first pre-recorded coordinates when the probe 400 contacts the first preset position, and record the second pre-recorded coordinates when the probe 400 contacts the second preset position;
[0150] The control module 820 is used to control the first driving module 500 to drive the probe 400 to move on the workbench 300 in response to a preset condition, record a first detection coordinate when the probe 400 contacts the workpiece, and determine a first actual coordinate of the first preset part and a second actual coordinate of the second preset part based on the first detection coordinate;
[0151] A vector determination module 830, configured to determine a pre-recorded vector based on the first pre-recorded coordinate and the second pre-recorded coordinate;
[0152] A coordinate error determination module 840, configured to determine a first coordinate error based on the first actual coordinate and the first pre-recorded coordinate;
[0153] The moving module 850 is used to control the robot 100 to move the workpiece based on the second actual coordinate, the first coordinate error and the pre-recorded vector, so that the workpiece is located at a preset processing position.
[0154] The workpiece position adjustment device of the embodiment of the present application is used to execute the workpiece position adjustment method implemented above. When executing the method, the first pre-recorded coordinates of the first preset part and the second pre-recorded coordinates of the second preset part of the workpiece are first recorded when the workpiece is at the preset processing position; then, in response to the preset conditions, the first detection coordinates when the probe 400 contacts the workpiece are recorded, and the first actual coordinates of the first preset part and the second actual coordinates of the second preset part are determined based on the first detection coordinates. The first actual coordinates and the first pre-recorded coordinates determine the first coordinate error, thereby determining the position deviation of the workpiece, and then based on the second actual coordinates, the first coordinate error and the pre-recorded vector control manipulator 100 to control the movement of the workpiece so that the workpiece is located at the preset processing position to achieve the correction of the workpiece position. In this way, the method of the present application can move the workpiece to the preset processing position when the workpiece is offset, complete the correction of the workpiece position, and reduce the risk of damage to the workpiece and the tool 700 due to the offset of the workpiece position.
[0155] Reference Fig. 9 , Fig. 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of the third aspect of the present application. The electronic device includes:
[0156] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0157] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the workpiece position adjustment method of the embodiment of this application;
[0158] Input / output interface 903, used to implement information input and output;
[0159] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0160] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0161] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0162] The fourth aspect of the present application is a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the workpiece position adjustment method of any one of the first aspect embodiments is implemented.
[0163] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0164] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0165] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0166] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0168] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0169] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the mapping relationship of the mapping objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next mapping objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0170] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0171] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0173] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0174] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for adjusting the position of a workpiece, characterized in that: Applied to a machine tool, the machine tool is provided with a probe, a first driving module, a workbench and a manipulator, the probe is arranged above the workbench, the manipulator is arranged on one side of the workbench, the first driving module is connected to the probe, and the first driving module is used to drive the probe to move; The workbench is used to place workpieces; The method comprises: When the workpiece is located at a preset processing position, controlling the first driving module to drive the probe to move so that the probe sequentially contacts a first preset position and a second preset position of the workpiece, recording a first pre-recorded coordinate when the probe contacts the first preset position, and recording a second pre-recorded coordinate when the probe contacts the second preset position; In response to a preset condition, controlling the first driving module to drive the probe to move on the workbench, recording a first detection coordinate when the probe contacts the workpiece, and determining a first actual coordinate of the first preset part and a second actual coordinate of the second preset part based on the first detection coordinate; determining a pre-recorded vector based on the first pre-recorded coordinate and the second pre-recorded coordinate; determining a first coordinate error based on the first actual coordinate and the first pre-recorded coordinate; Based on the second actual coordinate, the first coordinate error and the pre-recorded vector, the manipulator controls the movement of the workpiece so that the workpiece is located at the preset processing position; The determining of the first actual coordinates of the first preset part and the second actual coordinates of the second preset part based on the first detected coordinates comprises: The contour of the workpiece and the coordinates of the contour position are determined based on the first detection coordinates; the first actual coordinates of the first preset part are calculated based on the position of the first preset part relative to the contour; and the second actual coordinates of the second preset part are calculated based on the position of the second preset part relative to the contour.
2. The workpiece position adjustment method according to claim 1, characterized in that: The first coordinate error includes a first X coordinate error and a first Y coordinate error; The controlling the manipulator to control the movement of the workpiece based on the second actual coordinate, the first coordinate error and the pre-recorded vector so that the workpiece is located at the preset processing position includes: Performing detection processing on the first coordinate error; When it is detected that the first coordinate error is within a preset error range, the manipulator is controlled to control the workpiece to move along the X direction by the first X coordinate error, and the manipulator is controlled to control the workpiece to move along the Y direction by the first Y coordinate error; wherein the X direction and the Y direction are perpendicular to each other, and both the X direction and the Y direction are horizontal directions; Determine a third actual coordinate of the first preset position after the workpiece moves based on the first actual coordinate, and determine a fourth actual coordinate of the second preset position after the workpiece moves based on the second actual coordinate; Determine a first actual vector based on the third actual coordinate and the fourth actual coordinate; Calculating a first angle error between the first actual vector and the pre-recorded vector; Taking the first preset position as a rotation center, the robot arm is controlled to control the workpiece to rotate by the first angle error so that the workpiece is located at the preset processing position.
3. The workpiece position adjustment method according to claim 2, characterized in that: The machine tool further includes a control panel and a second drive module, the control panel is electrically connected to the second drive module; the workbench is installed on the second drive module, and the second drive module is used to drive the workbench to move along the X direction and the Y direction respectively; the preset error range includes an X-axis error range and a Y-axis error range; the first coordinate error includes a first Z coordinate error; After the first coordinate error is detected and processed, the method further includes: When it is detected that the first coordinate error is not within the preset error range, the first Z coordinate error is zero, and the first X coordinate error is greater than the upper limit value of the X-axis error range or the first Y coordinate error is greater than the upper limit value of the Y-axis error range, the manipulator is controlled to manipulate the control panel so that the second driving module drives the workbench to move along the X direction by the first X coordinate error, and the second driving module drives the workbench to move along the Y direction by the first Y coordinate error; Controlling the first driving module to drive the probe to move on the workbench, recording a second detection coordinate when the probe contacts the workpiece, and determining a fifth actual coordinate of the first preset position and a sixth actual coordinate of the second preset position based on the second detection coordinate; Obtaining a second coordinate error based on the fifth actual coordinate and the first pre-recorded coordinate; wherein the second coordinate error includes a second X coordinate error and a second Y coordinate error; Control the manipulator to control the workpiece to move along the X direction by the second X coordinate error, and control the manipulator to control the workpiece to move along the Y direction by the second Y coordinate error; Determine a seventh actual coordinate of the first preset position after the workpiece moves based on the fifth actual coordinate, and determine an eighth actual coordinate of the second preset position after the workpiece moves based on the sixth actual coordinate; determining a second actual vector based on the seventh actual coordinate and the eighth actual coordinate; Calculating a second angle error between the second actual vector and the pre-recorded vector; Taking the first preset position as the rotation center, controlling the manipulator to control the workpiece to rotate by the second angle error so that the workpiece is located at the preset processing position; The determining of the fifth actual coordinates of the first preset part and the sixth actual coordinates of the second preset part based on the second detected coordinates includes: Based on the second detection coordinates, the contour of the workpiece and the coordinates of the contour position are determined; based on the position of the first preset part relative to the contour, the fifth actual coordinates of the first preset part are calculated; based on the position of the second preset part relative to the contour, the sixth actual coordinates of the second preset part are calculated.
4. The workpiece position adjustment method according to claim 3, characterized in that: The method of controlling the manipulator to control the workpiece to rotate by the second angle error with the first preset position as the rotation center so that the workpiece is located at the preset processing position includes: Controlling the first driving module to drive the probe to move so that the probe abuts against the first preset position of the workpiece; With the probe as the rotation axis, the manipulator is controlled to control the workpiece to rotate by the second angle error so that the workpiece is located at the preset processing position.
5. The workpiece position adjustment method according to claim 3, characterized in that: The control panel is provided with a plurality of buttons, each button corresponding to a preset button coordinate; The controlling the manipulator to manipulate the control panel so that the second driving module drives the workbench to move along the X direction by the first X coordinate error, and the second driving module drives the workbench to move along the Y direction by the first Y coordinate error, comprises: determining a first button group and a first pressing order of the first button group based on the first X coordinate error; determining a second button group and a second pressing order of the second button group based on the first Y coordinate error; Based on the preset button coordinates corresponding to each button in the first button group, a first coordinate group is obtained; based on the preset button coordinates corresponding to each button in the second button group, a second coordinate group is obtained; Based on the first coordinate group and the first pressing sequence, a first motion trajectory is obtained; based on the second coordinate group and the second pressing sequence, a second motion trajectory is obtained; Based on the first motion trajectory, the manipulator is controlled to operate the button on the control panel, so that the second driving module drives the workbench to move along the X direction by the first X coordinate error; based on the second motion trajectory, the manipulator is controlled to operate the button on the control panel, so that the second driving module drives the workbench to move along the Y direction by the first Y coordinate error.
6. The workpiece position adjustment method according to claim 3, characterized in that: After determining the first coordinate error based on the first actual coordinate and the first pre-recorded coordinate, the method further comprises: Performing detection processing on the first coordinate error; When it is detected that the first Z coordinate error of the first coordinate error is a non-zero value, a fault alarm is sent to a preset terminal, and the machine tool is stopped.
7. The workpiece position adjustment method according to claim 1, characterized in that: The workbench is provided with a collision sensor; the machine tool is provided with a tool driving module, a disc tool magazine and a tool magazine rotation module, the disc tool magazine and the tool driving module are both arranged above the workbench, the disc tool magazine is arranged on one side of the tool driving module, and the disc tool magazine is provided with a plurality of tools along the circumferential direction; the tool driving module is used to clamp the tools in the disc tool magazine and control the tools to process the workpiece; the tool magazine rotation module is used to rotate the disc tool magazine so that the tool driving module can clamp different tools in the disc tool magazine; The preset condition is one of the following: receiving collision warning information sent by the collision sensor; It is detected that the tool currently clamped by the tool driving module is damaged; It is detected that the tool driving module switches the tool from the disc tool magazine.
8. A workpiece position adjustment device, characterized in that: Applied to a machine tool, the machine tool is provided with a probe, a first driving module, a workbench and a manipulator, the probe is arranged above the workbench, the manipulator is arranged on one side of the workbench, the first driving module is connected to the probe, and the first driving module is used to drive the probe to move; The workbench is used to place workpieces; The device comprises: a recording module, used for controlling the first driving module to drive the probe to move when the workpiece is located at a preset processing position, so that the probe sequentially contacts a first preset position and a second preset position of the workpiece, and recording a first pre-recorded coordinate when the probe contacts the first preset position, and recording a second pre-recorded coordinate when the probe contacts the second preset position; a control module, configured to control the first driving module to drive the probe to move on the workbench in response to a preset condition, record a first detection coordinate when the probe contacts the workpiece, and determine a first actual coordinate of the first preset part and a second actual coordinate of the second preset part based on the first detection coordinate; a vector determination module, configured to determine a pre-recorded vector based on the first pre-recorded coordinate and the second pre-recorded coordinate; a coordinate error determination module, configured to determine a first coordinate error based on the first actual coordinate and the first pre-recorded coordinate; A moving module, used for controlling the manipulator to move the workpiece based on the second actual coordinate, the first coordinate error and the pre-recorded vector, so that the workpiece is located at the preset processing position; The determining of the first actual coordinates of the first preset part and the second actual coordinates of the second preset part based on the first detected coordinates comprises: The contour of the workpiece and the coordinates of the contour position are determined based on the first detection coordinates; the first actual coordinates of the first preset part are calculated based on the position of the first preset part relative to the contour; and the second actual coordinates of the second preset part are calculated based on the position of the second preset part relative to the contour.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the workpiece position adjustment method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the workpiece position adjustment method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Machine tool having the function of correcting mounting error through contact detection
CN101357443A
Numerical controller provided with function of correcting displacement error caused by work
CN104731012A