Numerical controller, control method, and program
Through the numerical control device to switch paths and recalculate the recovery position during the tool change process, the problem of long tool change time in the existing technology is solved, and a more efficient tool change operation is achieved.
Patent Information
- Application Number
- CN202380025004.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-31
- Filing Date
- 2023-03-14
- Publication Date
- 2024-10-18
AI Technical Summary
In the prior art, the spindle temporarily moves from the recovery position to the mechanical origin and then moves to the tool change preparation position, resulting in a too long tool change time.
Through the numerical control device, the path is switched based on the recovery position. The spindle moves directly from the recovery position to the tool change preparation position or passes through the mechanical origin position and then moves to the tool change preparation position to avoid the tool from colliding with the workpiece and fixture and recalculate in the return path. Reset position to accommodate different tool lengths.
The tool changing time is shortened, the collision between the tool, the workpiece and the fixture is avoided, and the tool changing efficiency is improved.
Smart Images

Figure CN118805147A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a numerical control device, a control method and a program. Background Art
[0002] The machine tool described in Patent Document 1 is horizontal, and the axis of the spindle is horizontal. By arranging the tool change area on the upper side of the processing area, the mechanical dimensions in the axial direction are suppressed. When changing the tool, the spindle is moved from the current position to the recovery position, and then moved to the mechanical origin in the direction orthogonal to the axial direction and then moved to the tool change preparation position to prevent the tool from colliding with the workpiece and fixture. The recovery position is set by the user to a position where the tool will not collide with the workpiece and fixture. The mechanical origin is the position of maximum avoidance in the axial direction.
[0003] Prior art literature
[0004] Patent Literature
[0005] Patent Document 1: Japanese Patent No. 3044782 Summary of the invention
[0006] Problems to be solved by the invention
[0007] Regardless of the return position set by the user, the spindle temporarily moves from the return position to the machine origin and then moves to the tool change preparation position, so there is a problem that the tool change time is long.
[0008] An object of the present invention is to provide a numerical control device, a control method and a program capable of shortening the tool change time according to a return position.
[0009] Technical means of solving problems
[0010] The numerical control device of claim 1 comprises: a spindle for mounting a tool; a tool magazine arranged in an area overlapping with a processing area in the axial direction of the spindle and storing the tool; a forward control unit, after machining a workpiece fixed on a worktable by a fixture, moves the spindle to a recovery position where the tool mounted on the spindle does not collide with the workpiece and the fixture, and then moves to the tool changing position via a tool changing preparation position which is the same position in the axial direction as the tool changing position in the area; and a tool changing unit, which, in a state where the forward control unit has moved the spindle to the tool changing position, based on the reciprocating movement of the spindle in the axial direction, The numerical control device is characterized in that the forward path control unit includes a forward path switching unit, and the forward path switching unit switches the path for moving the spindle from the return position to the tool change preparation position to any one of a first path and a second path based on the return position, wherein the first path is a path for directly moving the spindle from the return position to the tool change preparation position, and the second path is a path for moving the spindle from the return position to the origin position in a direction orthogonal to the axial direction, and then moving from the origin position to the tool change preparation position. Thus, the numerical control device can switch the path based on the return position in the forward path from the spindle to the tool change position, thereby shortening the tool change time corresponding to the return position and preventing the tool installed on the spindle from colliding with the workpiece and the fixture. The term “directly” in the first path “a path for directly moving the spindle from the restoration position to the tool change preparation position” refers to a path that has no vertex (corner) in the path accompanied by movement in the axial direction.
[0011] The forward path switching unit of the numerical control device of claim 2 can also switch the path according to whether the return position is closer to the origin position than the tool change preparation position in the axial direction. In the axial direction, the path is switched according to whether the return position is on the origin position side based on the tool change preparation position, so that the tool change time can be shortened according to the return position and the tool installed on the spindle can be prevented from colliding with the workpiece and the fixture.
[0012] The forward path switching unit of the numerical control device of claim 3 can also switch the path to the first path when the return position is closer to the opposite side of the origin position than the tool change preparation position, and switch the path to the second path when the return position is closer to the origin position than the tool change preparation position. In the axial direction, the path is switched to the first path when the return position is located on the opposite side of the origin position with the tool change preparation position as a reference, and the path is switched to the second path when it is located on the origin position side, so that the tool change time can be shortened in the first path, and in both the first path and the second path, it can be prevented that the tool mounted on the spindle hits the workpiece and the fixture.
[0013] The numerical control device of claim 4 to claim 6 may also include: a return control unit, which moves the spindle from the tool change position to the return position via the tool change preparation position and then to the command point, and the return control unit includes a return switching unit, which switches the path of moving the spindle from the tool change preparation position to the return position and then to the command point to any one of a third path and a fourth path based on the return position, wherein the third path is a path of moving the spindle directly from the tool change preparation position to the return position and then to the command point, and the fourth path is a path of moving the spindle from the tool change preparation position to the return position in the axial direction, then to a position having the same coordinates as the command point in a direction orthogonal to the axial direction, and then to the command point. Thus, the numerical control device can also switch the path based on the return position in the return path of moving the spindle from the tool change preparation position to the command point, thereby shortening the tool change time corresponding to the return position and preventing the tool mounted on the spindle from colliding with the workpiece and the fixture. In addition, the term “directly” in the third path “a path in which the spindle is directly moved from the tool change preparation position to the return position and then to the command point” refers to a path that has no vertex (corner) in the path accompanied by movement in the axial direction.
[0014] The return position of the numerical control device of claim 7 may also be a position offset by the tool length. Since the tip of the tool can be set to the return position, even if the tool length is different, the tool can be prevented from colliding with the workpiece and the fixture during the movement of the path.
[0015] The recovery position of the numerical control device of claim 8 may also be a position offset by the tool length, and the forward path control unit includes a first recovery position calculation unit that calculates the recovery position based on the control instructions of the numerical control (NC) program, and the return path control unit includes a second recovery position calculation unit that recalculates the recovery position based on the control instructions of the NC program. In the return path, there is a high possibility that a tool different from the tool installed on the spindle during the forward path is installed on the spindle, so the tool length may be different in the forward path and the return path. Since the tool length offset is implemented for the recovery position, if the tool length is different, the position of the spindle will also change. Therefore, the return path control unit recalculates the recovery position based on the control instructions of the NC program, so that the tool installed on the spindle can be prevented from contacting the workpiece and the fixture at the recovery position.
[0016] The numerical controller of claim 9 may have the axial direction of the main shaft in a horizontal direction, and can be applied to a horizontal machine in which the axial direction of the main shaft is in a horizontal direction.
[0017] The control method of claim 10 is a control method for a numerical control device, the control method comprising a forward control step, wherein after machining a workpiece fixed on a worktable by a fixture, a spindle on which a tool is mounted is moved to a recovery position where the tool mounted on the spindle does not collide with the workpiece and the fixture, and then the spindle is moved to the tool changing position via a tool changing preparation position which is the same position as the tool changing position in the axial direction of the spindle, and when the spindle is moved to the tool changing position, a tool mounted on the spindle is replaced based on the reciprocating movement of the spindle in the axial direction. The tool and the tool stored in the tool magazine, the control method is characterized in that the forward path control step includes a forward path switching step, the forward path switching step is based on the recovery position, the path for moving the spindle from the recovery position to the tool change preparation position is switched to any one of a first path and a second path, the first path is a path for directly moving the spindle from the recovery position to the tool change preparation position, and the second path is a path for moving the spindle from the recovery position to the origin position in a direction orthogonal to the axial direction, and then moving from the origin position to the tool change preparation position. By performing the steps by a numerical control device, the effect described in claim 1 can be obtained.
[0018] The program of claim 11 enables a numerical control device to function, the program including a forward path control step, wherein after machining a workpiece fixed on a worktable by a fixture, a spindle on which a tool is mounted is moved to a recovery position where the tool mounted on the spindle does not collide with the workpiece and the fixture, and then the spindle is moved to the tool changing position via a tool changing preparation position which is the same position as the tool changing position in the axial direction of the spindle, and when the spindle is moved to the tool changing position, the tool mounted on the spindle is replaced with a tool changer based on the reciprocating movement of the spindle in the axial direction. The tool stored in the library, the program is characterized in that the computer is made to execute a forward path switching step in the forward path control step, the forward path switching step is based on the recovery position, the path for moving the spindle from the recovery position to the tool change preparation position is switched to any one of a first path and a second path, the first path is a path for directly moving the spindle from the recovery position to the tool change preparation position, and the second path is a path for moving the spindle from the recovery position to the origin position in a direction orthogonal to the axial direction, and then moving from the origin position to the tool change preparation position. The effect described in claim 1 can be obtained by executing the steps by the computer of the numerical control device. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] [ Figure 1 ] is a front view of the machine tool 1.
[0020] [ Figure 2 ] is a right side view of the machine tool 1.
[0021] [ Figure 3 ] is a diagram showing the route of ATC action.
[0022] [ Figure 4 ] is a diagram showing the return path of ATC action.
[0023] [ Figure 5 ] is a block diagram showing the electrical structure of the machine tool 1.
[0024] [ Figure 6 ] is a flow chart of NC control processing.
[0025] [ Figure 7 ] is a flow chart of the route determination process.
[0026] [ Figure 8 ] is a flowchart of the reset decision processing.
[0027] [ Fig. 9 ] is a flowchart of the forward execution processing.
[0028] [ Fig.10 ] is a flowchart of the reset decision processing.
[0029] [ Fig.11 ] is a diagram showing the first path of the route.
[0030] [ Fig.12 ] is a diagram showing a second path of the outbound route.
[0031] [ Fig.13 ] is a diagram showing the third path of the return path.
[0032] [ Fig.14 ] is a diagram showing the fourth path of the return path. DETAILED DESCRIPTION
[0033] This embodiment describes the left and right, up and down, and front and back of a machine tool 1 in the direction of arrows shown in the drawings. Figure 1 The machine tool 1 shown is a horizontal machine tool in which the axial direction of the main shaft 20 is horizontal. The left and right, up and down, front and back of the machine tool 1 are the X-axis, the Y-axis, and the Z-axis.
[0034] Reference Figure 1 , Figure 2 The structure of the machine tool 1 is described below. The machine tool 1 includes a base 2, a column 5, a saddle body 10, a spindle head 18, a spindle 20, and a tool changing device (Automatic Tool Changer (ATC) device) 40.
[0035] The base 2 is provided at the bottom of the machine tool 1 and is an iron base that is generally rectangular and long in the front-to-back direction when viewed from above. A pair of guide rails 3 are provided on the rear side of the upper surface of the base 2. The pair of guide rails 3 extend in the left-right direction and are spaced apart from each other in the front-to-back direction. An X-axis motor 6 is provided between the pair of guide rails 3. A workbench 27 (see FIG. 2 ) for holding a workpiece (not shown) is provided on the front side of the upper surface of the base 2. Figure 3 , Figure 1 , Figure 2 A pair of left and right support members 51, 52 are fixed to the front sides of the left and right sides of the upper surface of the base 2. A tool magazine 45 of the ATC device 40 described later is fixed to the upper end of each of the support members 51, 52.
[0036] The column 5 is mounted on a pair of guide rails 3 so as to be freely movable in the left-right direction (X-axis direction) via a sliding member 4. The column 5 is horizontally moved in the left-right direction by the drive of the X-axis motor 6. The column 5 is a roughly columnar structure formed by a casting. A large through hole 7 is provided in the central part of the front surface of the column 5. A pair of left and right guide rails 8 are provided on the left and right sides of the front surface of the column 5. The guide rails 8 extend in the up-down direction. A Y-axis motor 13 is provided on the top of the column 5. A feed screw 14 is provided on the inner side of the column 5. The feed screw 14 extends in the up-down direction, and its upper end is connected to the rotating shaft (not shown) of the Y-axis motor 13.
[0037] The saddle body 10 is connected to the sliding member 9 (see Figure 2 ) is mounted on a pair of left and right guide rails 8 so as to be movable in the up-down direction (Y-axis direction). A saddle base 11 is integrally provided at the lower end of the saddle body 10. A large notch 12 is formed at the lower part of the saddle body 10, forming a hole with the saddle base 11. The rear end of the saddle base 11 extends to the inside of the through hole 7 of the column 5. A Z-axis motor 19 is fixed to the rear end of the saddle base 11. A pair of left and right guide rails 16 are provided on the upper part of the saddle base 11. The pair of left and right guide rails 16 extend in the front-to-back direction and are spaced apart from each other in the left-to-right direction. A nut 15 is fixed to the rear surface of the saddle body 10. The nut 15 is screwed into the feed screw 14 which is driven to rotate by the Y-axis motor 13. As a result, the saddle body 10 and the saddle base 11 move in the up-down direction together with the nut 15 in response to the rotation drive of the Y-axis motor 13.
[0038] The spindle head 18 is mounted on a pair of guide rails 16 on the upper part of the saddle base 11 so as to be freely movable in the front-rear direction via a sliding member 17, and is horizontally moved in the front-rear direction by the drive of the Z-axis motor 19. The spindle head 18 emerges from the front through a hole formed by the notch 12 at the lower part of the saddle body 10 and the saddle base 11. The feed screw 14 is arranged at a position rightward from the center of the front surface. Therefore, when the saddle body 10 and the saddle base 11 rise, the spindle head 18 and the feed screw 14 do not collide with each other. A spindle motor 21 is fixed to the rear end of the spindle head 18.
[0039] The spindle 20 is rotatably supported on the spindle head 18 and is rotationally driven by the spindle motor 21. The spindle 20 extends in the front-to-back direction. The axial direction of the spindle 20 is the Z-axis direction. A tapered hole for mounting a tool shank (not shown) is provided on the front end surface of the spindle 20. The tool is held in the tool shank. A known tool clamping device (not shown) is installed in the spindle 20. The tool clamping device clamps the tool shank by clamping the pull stud of the tool shank mounted in the tapered hole.
[0040] The ATC device 40 includes a tool magazine 45 and ten gripping parts 50. The tool magazine 45 is roughly cylindrical and is supported in front of the upper front surface of the column 5 by support members 51 and 52 in a posture with its axis facing the front-to-back direction. The ten gripping parts 50 are supported in a radial arrangement along the outer periphery of the tool magazine 45. The gripping part 50 includes a tool holder (pot). A tool holder is detachably mounted in the tool holder. The tool magazine 45 can be moved by a tool magazine motor 47 (see Figure 5 ) The ten holding parts 50 are rotated and positioned around the axis.
[0041] Reference Figure 1 to Figure 3The so-called mechanical origin refers to the position where the mechanical coordinates of the X-axis and Y-axis are 0, and the mechanical coordinates of the Z-axis are the origin size. The origin size of the Z-axis is Figure 2 The rear end of the machining area shown is determined according to the structure of the machine tool 1. The mechanical origin of the X axis is the X axis origin (X=0 mm), the mechanical origin of the Y axis is the Y axis origin (Y=0 mm), and the mechanical origin of the Z axis is the Z axis origin (Z=origin size).
[0042] The machining area is located in a space closer to the base 2 side (lower side) than the Y-axis origin. The ATC area is located in a space on the opposite side (upper side) of the machining area relative to the Y-axis origin. The machining area is an area where the workpiece fixed to the worktable 27 is machined. The ATC area is an area where tool changes are performed. Figure 3 As shown, the ATC area is located above the processing area in the Y-axis direction and overlaps with the processing area in the Z-axis direction. As a result, the machine tool 1 can make the mechanical dimensions in the Z-axis direction more compact compared to a machine tool in which the ATC area is located behind the processing area. Therefore, the machine tool 1 can reduce the installation area in a factory or the like.
[0043] Reference Figure 3 , Figure 4 The outline of the tool changing action is described below. When the machine tool 1 is in a state of cutting a workpiece, the spindle 20 is located in the processing area. After the processing with the tool 23 mounted on the spindle 20 is completed, the machine tool 1 performs a tool changing action. The tool changing action includes a forward path and a return path with respect to the path along which the spindle 20 moves. In addition, in the present embodiment, the so-called "moving the spindle 20" is synonymous with "moving the spindle head 18".
[0044] The forward path is the path that moves the spindle 20 from the current position to the ATC origin (refer to Figure 3 ), the return path is the path from the ATC origin to the command point (refer to Figure 4 The ATC origin is a reference point for tool change in the ATC area, and is a position where the tool magazine 45 can rotate. The command point is a target position to move the spindle 20 after tool change, and can be set using G100 described later.
[0045] Explain the route. Figure 3As shown, the machine tool 1 moves the spindle 20 from the current position toward the Z-axis + direction, passes through the R point described later, and moves along the first path or the second path described later to the ATC preparation position. The so-called ATC preparation position refers to a position with the same coordinates as the ATC position described later in the Z-axis direction. In addition, the method for determining the first path and the second path in the outgoing path will be described later. Next, the machine tool 1 raises the spindle 20 from the ATC preparation position to the Y-axis ATC origin. The so-called Y-axis ATC origin refers to a position with the same coordinates as the ATC origin in the Y-axis direction, which is equivalent to the ATC position (the "tool change position" of the present invention). At this time, the tool 23 mounted on the spindle 20 engages from the bottom to the empty tool holder of the gripping portion 50 located directly below the tool magazine 45. In this way, the outgoing path is completed.
[0046] In this state, the machine tool 1 moves the spindle 20 backward from the Y-axis ATC origin toward the Z-axis + direction until it reaches the ATC origin. At this time, the position of the tool 23 engaged with the tool holder of the gripping portion 50 is fixed, so the tool 23 is pulled out from the spindle 20. The machine tool 1 rotates the tool magazine 45 and positions the gripping portion 50 holding the next tool to be installed directly below the tool magazine 45. At this time, the next tool faces the front of the spindle 20. In this state, as shown in FIG. Figure 4 As shown, the machine tool 1 moves the spindle 20 located at the ATC origin in the Z-axis direction until it reaches the Y-axis ATC origin. Thus, the next tool is mounted on the spindle 20.
[0047] The following describes the return path. Figure 4 As shown in the figure, when the next tool is installed on the spindle 20, the machine tool 1 lowers the spindle 20 from the Y-axis ATC origin to the ATC preparation position. Next, the machine tool 1 moves the spindle 20 from the ATC preparation position along the third path or the fourth path described later to the R point described later, and then moves to the command point set by G100. In this way, the return path is completed, and a series of tool change actions are completed.
[0048] Reference Figure 5 The electrical structure of the machine tool 1 is described below. The machine tool 1 includes a numerical control device 30, a spindle motor 21, an X-axis motor 6, a Y-axis motor 13, a Z-axis motor 19, a tool magazine motor 47, drive circuits 61 to 65, encoders 21A, 6A, 13A, 19A, 47A, and an operation panel 25.
[0049] The numerical control device 30 includes a central processing unit (CPU) 31, a read only memory (ROM) 32, a random access memory (RAM) 33, a storage device 34, a communication interface (I / F) 35, an input / output interface 36, etc. The CPU 31 performs overall control of the numerical control device 30. The ROM 32 stores various programs such as an NC control program. The NC control program executes the NC control processing described later (see Figure 6 ). RAM 33 stores various data in various processing executions. Storage device 34 is a non-volatile memory, and stores various data in addition to NC programs for processing, for example. Communication I / F 35 can be connected to a terminal (not shown) by wire or wireless. Input / output interface 36 is connected to operation panel 25 and drive circuits 61 to 65.
[0050] The spindle motor 21 rotates the spindle 20 on which the tool is mounted. The X-axis motor 6, the Y-axis motor 13, and the Z-axis motor 19 move the workpiece and the spindle 20 relatively along the X-axis, Y-axis, and Z-axis directions. The spindle motor 21, the X-axis motor 6, the Y-axis motor 13, the Z-axis motor 19, and the tool magazine motor 47 are servo motors. The drive circuit 61 controls the spindle motor 21 based on a control signal from the CPU 31. The drive circuit 62 controls the X-axis motor 6 based on a control signal from the CPU 31. The drive circuit 63 controls the Y-axis motor 13 based on a control signal from the CPU 31. The drive circuit 64 controls the Z-axis motor 19 based on a control signal from the CPU 31. The drive circuit 65 controls the tool magazine motor 47 based on a control signal from the CPU 31.
[0051] The encoder 21A detects the rotation position of the spindle motor 21 and sends its detection signal to the drive circuit 61. The drive circuit 61 performs feedback control on the spindle motor 21 based on the detection signal. The encoder 6A detects the rotation position of the X-axis motor 6 and sends its detection signal to the drive circuit 62. The drive circuit 62 performs feedback control on the X-axis motor 6 based on the detection signal. The encoder 13A detects the rotation position of the Y-axis motor 13 and sends its detection signal to the drive circuit 63. The drive circuit 63 performs feedback control on the Y-axis motor 13 based on the detection signal. The encoder 19A detects the rotation position of the Z-axis motor 19 and sends its detection signal to the drive circuit 64. The drive circuit 64 performs feedback control on the Z-axis motor 19 based on the detection signal. The encoder 47A detects the rotation position of the magazine motor 47 and sends its detection signal to the drive circuit 65. The drive circuit 65 performs feedback control on the magazine motor 47 based on the detection signal. The operation panel 25 can display and input various information.
[0052] The command format of the tool change action is described. The tool change action can be set by a control command of the NC program. The command format can use G100 or M06, for example. Specific examples of G100 and M06 are as follows.
[0053] ·G100T_L_X_Y_Z_R_
[0054] ·M06T_L_X_Y_Z_R_
[0055] T, L, X, Y, Z, R are addresses. T is the tool number, tool holder number or group number. L specifies the T modal value after G100. X, Y, Z are the X, Y, Z coordinate values of the command point. R is the coordinate value of the Z-axis recovery position (point R), which is the coordinate value of the position where the tool does not contact the workpiece and fixture on the workbench. In addition, regarding the positioning of the spindle 20 toward point R, the CPU 31 implements a tool length offset and operates. The so-called tool length offset refers to correcting the coordinate value of the Z axis in a way that the front end of the tool becomes the reference point.
[0056] Reference Figure 6 to Figure 14 The NC control process will be described below. The user selects an NC program using the operation panel 25. When receiving an operation to execute the NC program selected by the operation panel 25, the CPU 31 reads the NC control program from the ROM 32 and executes this process.
[0057] like Figure 6 As shown, CPU 31 reads the selected NC program from storage device 34 (S11). CPU 31 performs a block interpretation starting from the first line of the read NC program (S12). CPU 31 determines whether the control instruction of the interpreted block is M30 (end command) (S13). If the interpreted control instruction is not M30 (S13: No), CPU 31 determines whether the interpreted control instruction is G100 or M06 (S14). If neither G100 nor M06 is (S14: No), CPU 31 executes the interpreted control instruction (S15). CPU 31 moves to the next block (S21) and returns to S12 to repeat the above process. If the control instruction of the interpreted block is G100 or M06 (S14: Yes), CPU 31 executes the path determination process.
[0058] Reference Figure 7To illustrate the path determination process. If the interpreted control instruction is G100, the CPU 31 obtains the coordinate value of the R point from the R address of G100 (S31). In order to determine the path from the current position to the ATC origin, the CPU 31 determines whether the R point is closer to the mechanical origin side than the ATC preparation position in the Z-axis direction (S32). The ATC preparation position is pre-stored in the storage device 34. If the R point is located on the side opposite to the mechanical origin side (Z-axis-direction side) than the ATC preparation position (S32: No), the CPU 31 determines it as the first path (S33). If the R point is located on the side closer to the mechanical origin side (Z-axis+direction side) than the ATC preparation position (S32: Yes), the CPU 31 determines it as the second path (S34). Specific examples of the first path and the second path will be described later. The CPU 31 stores the determined path in the RAM 33 (S35). The CPU 31 ends the path determination process and returns. Figure 6 , and executes the reset decision processing (S17).
[0059] Reference Figure 8 The process of determining the return path is described below. The CPU 31 reacquires the coordinate value of the R point from the R address of G100 (S41). The reason for reacquiring the R point is that in the return path, there is a high possibility that the next tool different from the tool 23 installed on the spindle 20 in the forward path is installed on the spindle 20, so the tool length is sometimes different in the forward path and the return path. As described above, since the tool length offset is implemented for the R point, if the tool length is different, the position of the spindle 20 will also change. Therefore, the CPU 31 can reacquire the coordinate value of the R point based on the tool length of the next tool newly installed on the spindle 20 by tool change.
[0060] Regarding the tool length in the forward path, if there is a tool length correction command (G43H) before the current G100, the tool length of the tool number specified by its H address can also be obtained. In addition, the tool length of the tool number specified by the T address of the previous G100 can also be simply obtained. On the other hand, regarding the tool length in the backward path, if there is a tool length correction command (G43H) at the same time as the current G100 command (that is, in the case of being recorded in a block like "G100T_X_Y_Z_R_G43H"), the tool length of the tool number specified by its H address can also be obtained. In this regard, the tool length of the tool number specified by the T address of the current G100 can also be simply obtained.
[0061] In order to determine the return path from the ATC origin to the command point, the CPU 31 determines whether the R point re-acquired in S41 is closer to the mechanical origin side than the ATC preparation position in the Z-axis direction (S42). If the R point is located on the side opposite to the mechanical origin side than the ATC preparation position (S42: No), the CPU 31 determines it as the third path (S43). If the R point is located on the side closer to the mechanical origin side than the ATC preparation position (S42: Yes), the CPU 31 determines it as the fourth path (S44). Specific examples of the third path and the fourth path will be described later. The CPU 31 stores the determined path in the RAM 33 (S45). The CPU 31 ends the return path determination process and returns to the control unit. Figure 6 Then, the CPU 31 executes the forward execution process (S18).
[0062] Reference Fig. 9 The CPU 31 refers to the path stored in the RAM 53 to determine whether the outgoing path is the first path (S51).
[0063] The case of the first path (S51: Yes) is described below. Figure 3 , Fig.11 As shown in FIG. 5 , the CPU 31 moves the spindle 20 from the current position toward the Z-axis + direction and retreats to point R (S52). Point R is the return point, which is set to a position where the tool 23 mounted on the spindle 20 does not contact the workpiece and the fixture fixed on the worktable 27. As described above, in the Z-axis direction, point R is located on the side opposite to the mechanical origin side of the ATC preparation position (refer to Fig.11 ). At this time, no matter where the spindle 20 is moved from the R point to the Z-axis + direction side, the tool 23 will not contact the workpiece and the fixture. Therefore, the CPU 31 moves the spindle 20 from the R point toward the ATC preparation position in all directions of the X-axis, Y-axis, and Z-axis (S53). During the period from the R point to the ATC preparation position, the CPU 31 moves the spindle 20 directly to the ATC preparation position without passing through any place, so that the movement time can be shortened compared to the case of passing through the mechanical origin side. In addition, the so-called "direct movement" refers to a path that does not have a vertex (corner) in its path while moving in the Z-axis direction, for example, also includes a path in which the movement path is slightly set as a curve.
[0064] After the spindle 20 is moved to the ATC preparation position, the CPU 31 moves the spindle 20 in the Y-axis + direction until it rises to the Y-axis ATC origin (S54). The Y-axis ATC origin has the same coordinate value as the ATC origin in the Y-axis direction. The Y-axis ATC origin corresponds to the tool holder position of the gripping portion 50 directly below the tool magazine 45. Therefore, by the spindle 20 rising to the Y-axis ATC origin, the tool 23 mounted on the spindle 20 is mounted from below to the empty tool holder. In this way, the movement of the first path is completed.
[0065] The case of the second path (S51: No) is described below. Figure 3 , Fig.12 As shown, the CPU 31 moves the spindle 20 from the current position toward the Z-axis + direction and retreats to the R point (S55). As described above, in the Z-axis direction, the R point is located closer to the mechanical origin side than the ATC preparation position (refer to Fig.12 ). At this time, the workpiece and the fixture may be located between the R point and the ATC preparation position. Therefore, if it is assumed that the spindle 20 is moved directly from the R point to the ATC preparation position as in the first path, it is possible that the workpiece and the fixture may be contacted. The CPU 31 moves the spindle 20 from the R point toward the X-axis direction (+ direction or - direction) and the Y-axis + direction, and rises to the Y-axis origin (S56). After the spindle 20 moves to the Y-axis origin and the X-axis moves to the ATC preparation position, the CPU 31 moves from the axis origin to the Z-axis - direction, and advances to the ATC preparation position (S57). By moving the spindle 20 from the R point via the Y-axis origin to the ATC preparation position in this way, the tool 23 mounted on the spindle 20 can be prevented from contacting the workpiece and the fixture. After moving the spindle 20 to the ATC preparation position, the CPU 31 moves the spindle 20 toward the Y-axis + direction and rises to the Y-axis ATC origin (S58). The tool 23 mounted on the spindle 20 is mounted from below in the empty tool holder. In this way, the movement of the second path is completed.
[0066] return Figure 6 According to the process, after the CPU 31 raises the spindle 20 to the Y-axis ATC origin, it executes ATC (tool change) (S19). The CPU 31 moves the spindle 20 from the Y-axis ATC origin to the ATC origin. Thus, the tool 23 is pulled out from the spindle 20. The machine tool 1 rotates the tool magazine 45 and positions the gripping portion 50 that holds the next tool to be installed directly below the tool magazine 45. The CPU 31 moves the spindle 20 located at the ATC origin to the Y-axis ATC origin. Thus, the next tool is installed on the spindle 20, and the ATC of S19 is completed. Next, the CPU 31 executes the reset execution process (S20).
[0067] Reference Fig.10The CPU 31 refers to the path stored in the RAM 53 to determine whether the restoring path is the third path (S61).
[0068] The case of the third path (S61: Yes) is described below. Figure 4 , Fig.13 As shown, the CPU 31 moves the spindle 20 from the Y-axis ATC origin toward the Y-axis direction until it descends to the ATC preparation position (S62). In the Z-axis direction, the R point is located on the side opposite to the mechanical origin side of the ATC preparation position (refer to Fig.13 ). At this time, the workpiece and the fixture are not located between the ATC preparation position and the R point. The CPU 31 moves the spindle 20 from the ATC preparation position in all directions of the X-axis, Y-axis, and Z-axis to the R point (S63). During the period from the ATC preparation position to the R point, the CPU 31 moves the spindle 20 directly to the R point without passing through any place, so that the movement time can be shortened compared to the case of passing through the mechanical origin side. In addition, the so-called "direct movement" refers to a path that does not have a vertex (corner) in its path while moving in the Z-axis direction, for example, also includes a path in which the movement path is slightly set as a curve. After the CPU 31 moves the spindle 20 to the R point, it moves to the instruction point set by G100 (S64). In this way, the movement of the third path is completed.
[0069] The fourth path (S61: No) is described below. Figure 4 , Fig.14 As shown, the CPU 31 moves the spindle 20 from the Y-axis ATC origin toward the Y-axis direction until it descends to the ATC preparation position (S65). In the Z-axis direction, the R point is located closer to the mechanical origin than the ATC preparation position (refer to Fig.14 ). At this time, the workpiece and the fixture may be located between the ATC preparation position and the R point. Therefore, the CPU 31 moves the spindle 20 in the Z-axis + direction and retreats to the Z-axis R point (S66). The so-called Z-axis R point refers to a position with the same coordinates as the R point in the Z-axis direction.
[0070] Then, the CPU 31 moves the spindle 20 from the Z-axis R point toward the Y-axis direction and the X-axis direction while maintaining the Z-axis, thereby moving it to the R point (S67). That is, the spindle 20 is moved from the ATC preparation position to the R point via the Z-axis R point, thereby preventing the tool 23 mounted on the spindle 20 from contacting the workpiece and the fixture. After the CPU 31 moves the spindle 20 to the R point, it moves to the command point set by G100 (S68). In this way, the movement of the fourth path is completed.
[0071] return Figure 6The CPU 31 ends the series of tool changing actions of G100, and thus moves to the next block (S21), and interprets the next block (S12). If the interpreted next block is M30 (S13: Yes), the CPU 31 ends this processing.
[0072] In the above description, point R is an example of the "reset position" of the present invention. The ATC area is an example of the "area overlapping with the processing area" of the present invention. The ATC position (Y-axis ATC origin) is an example of the "tool change position" of the present invention. The ATC preparation position is an example of the "tool change preparation position" of the present invention. Execution Figure 6 The CPU 31 executing S16 is an example of the "forward path switching unit" of the present invention. The CPU 31 executing S17 is an example of the "return path switching unit" of the present invention. The CPU 31 executing S18 is an example of the "forward path control unit" of the present invention. The CPU 31 executing S19 is an example of the "tool changing unit" of the present invention. The CPU 31 executing S20 is an example of the "return path control unit" of the present invention. The NC control program is an example of the "program" of the present invention. Figure 7 The CPU 31 of the process of S31 is an example of the "first restoration position calculation unit" of the present invention. Figure 8 The CPU 31 performing the process of S41 is an example of the “second return position calculation unit” of the present invention.
[0073] As described above, the numerical control device 30 of the present embodiment includes a spindle 20 and a tool magazine 45. The spindle 20 is provided with a tool installation. The tool magazine 45 stores the tool and is provided in an ATC area overlapping with the processing area in the axial direction of the spindle 20, that is, in the Z-axis direction. After processing the workpiece fixed on the worktable 27 by the fixture, the CPU 31 of the numerical control device 30 moves the spindle 20 to the R point, and then moves to the Y-axis ATC origin via the ATC preparation position. In the state where the spindle 20 is moved to the Y-axis ATC origin, the tool installed on the spindle 20 and the tool stored in the tool magazine 45 are replaced based on the reciprocating movement of the spindle 20 in the Z-axis direction. In the numerical control device 30 including the above structure, the CPU 31 switches the path of the outward path that moves the spindle 20 from the R point to the ATC preparation position to either the first path or the second path based on the R point. The first path is a path that moves the spindle 20 from the R point to the ATC preparation position. The second path is a path in which the spindle 20 is moved from point R to the Y-axis origin and then from the Y-axis origin to the ATC preparation position. Thus, the numerical control device 30 can shorten the tool change time corresponding to point R and prevent the tool installed on the spindle 20 from colliding with the workpiece and the fixture when moving the spindle 20 from point R to the ATC preparation position.
[0074] The present invention is not limited to the above-described embodiment, and various modifications are possible. The machine tool 1 is a horizontal machine tool, but may be a vertical machine tool in which the axial direction of the main axis is in the vertical direction.
[0075] The machine tool 1 moves the column 5 toward the X-axis direction, the spindle 20 toward the Z-axis direction, and the saddle body 10 and the saddle base 11 toward the Y-axis direction, thereby moving the workpiece and the tool relatively along the X-axis, Y-axis, and Z-axis. However, it can also be a structure other than this, for example, the column 5 can be moved along the X-axis direction and the Z-axis direction, and the spindle 20 can be moved along the Y-axis direction.
[0076] Figure 6 In the NC control processing, the forward path determination processing and the return path determination processing are executed in S16 and S17. After first determining both the forward path and the return path, the spindle 20 is moved along the determined forward path and return path. However, for example, the forward path determination processing may be executed before moving along the forward path, and the return path determination processing may be executed before moving along the return path.
[0077] Explanation of symbols
[0078] 20: Spindle
[0079] 27: Workbench
[0080] 30: Numerical control device
[0081] 31: CPU
[0082] 45: Tool magazine
Claims
1. A numerical control device, comprising: Spindle, for tool installation; A tool magazine is provided in an area overlapping with the machining area in the axial direction of the spindle and stores tools; A forward control unit, after machining a workpiece fixed on a worktable by a fixture, moves the spindle to a recovery position where a tool mounted on the spindle does not collide with the workpiece and the fixture, and then moves to the tool changing position via a tool changing preparation position which is the same position as the tool changing position in the area in the axial direction; as well as The tool changing unit replaces the tool mounted on the spindle with the tool stored in the tool magazine based on the reciprocating movement of the spindle in the axial direction when the forward path control unit has moved the spindle to the tool changing position. The numerical control device is characterized in that The forward path control unit includes a forward path switching unit, which switches a path for moving the spindle from the return position to the tool change preparation position to one of a first path and a second path based on the return position. The first path is a path for directly moving the spindle from the restoration position to the tool change preparation position. The second path is a path for moving the spindle from the return position to an origin position in a direction perpendicular to the axial direction and then moving from the origin position to the tool change preparation position.
2. The numerical control device according to claim 1, characterized in that: The forward path switching unit switches the path according to whether the return position is located closer to the origin position than the tool change preparation position in the axial direction.
3. The numerical control device according to claim 2, characterized in that: The forward path switching unit switches the path to the first path when the restoration position is closer to the origin position than the tool change preparation position, and switches the path to the second path when the restoration position is closer to the origin position than the tool change preparation position.
4. The numerical control device according to claim 1, characterized in that include: The return control unit moves the spindle from the tool change position to the return position via the tool change preparation position and then to the command point. The reset control unit includes a reset switching unit, which switches a path for moving the spindle from the tool change preparation position to the reset position and then to the command point to one of a third path and a fourth path based on the reset position. The third path is a path for moving the spindle directly from the tool change preparation position to the return position and then to the command point. The fourth path is a path in which the spindle is moved from the tool change preparation position to the restoration position in the axial direction, then to a position having the same coordinates as the command point in a direction orthogonal to the axial direction, and then to the command point.
5. The numerical control device according to claim 2, characterized in that include: The return control unit moves the spindle from the tool change position to the return position via the tool change preparation position and then to the command point. The reset control unit includes a reset switching unit, which switches a path for moving the spindle from the tool change preparation position to the reset position and then to the command point to one of a third path and a fourth path based on the reset position. The third path is a path for moving the spindle directly from the tool change preparation position to the return position and then to the command point. The fourth path is a path in which the spindle is moved from the tool change preparation position to the restoration position in the axial direction, then to a position having the same coordinates as the command point in a direction orthogonal to the axial direction, and then to the command point.
6. The numerical control device according to claim 3, characterized in that include: The return control unit moves the spindle from the tool change position to the return position via the tool change preparation position and then to the command point. The reset control unit includes a reset switching unit, which switches a path for moving the spindle from the tool change preparation position to the reset position and then to the command point to one of a third path and a fourth path based on the reset position. The third path is a path for moving the spindle directly from the tool change preparation position to the return position and then to the command point. The fourth path is a path in which the spindle is moved from the tool change preparation position to the restoration position in the axial direction, then to a position having the same coordinates as the command point in a direction orthogonal to the axial direction, and then to the command point.
7. The numerical control device according to claim 1, characterized in that: The return position is a position offset by the tool length.
8. The numerical control device according to any one of claims 4 to 6, characterized in that: The recovery position is a position offset by the tool length. The forward path control unit includes a first return position calculation unit that calculates the return position based on a control instruction of a numerical control program. The reset control unit includes a second return position calculation unit that recalculates the return position based on the control command of the numerical control program.
9. The numerical control device according to claim 1, characterized in that: The axial direction of the main shaft is a horizontal direction.
10. A control method for a numerical control device, the control method comprising a forward control step, wherein after machining a workpiece fixed on a worktable by a fixture, a spindle on which a tool is mounted is moved to a recovery position where the tool mounted on the spindle does not collide with the workpiece and the fixture, and then the spindle is moved to the tool changing position via a tool changing preparation position which is the same position as the tool changing position in the axial direction of the spindle, and when the spindle is moved to the tool changing position, the tool mounted on the spindle and the tool stored in the tool magazine are replaced based on the reciprocating movement of the spindle in the axial direction. The control method is characterized in that The forward path control step includes a forward path switching step, wherein the forward path switching step switches the path for moving the spindle from the return position to the tool change preparation position to one of a first path and a second path based on the return position, The first path is a path for directly moving the spindle from the restoration position to the tool change preparation position. The second path is a path for moving the spindle from the return position to an origin position in a direction perpendicular to the axial direction and then moving from the origin position to the tool change preparation position.
11. A program for making a numerical control device function, the program comprising a forward control step, the forward control step being that after machining a workpiece fixed on a worktable by a fixture, a spindle on which a tool is mounted is moved to a recovery position where the tool mounted on the spindle does not collide with the workpiece and the fixture, and then the spindle is moved to the tool changing position via a tool changing preparation position which is the same position as the tool changing position in the axial direction of the spindle, and when the spindle is moved to the tool changing position, the tool mounted on the spindle and the tool stored in the tool magazine are replaced based on the reciprocating movement of the spindle in the axial direction, the program being characterized in that, The computer is caused to execute a forward path switching step in the forward path control step, wherein the forward path switching step switches the path for moving the spindle from the return position to the tool change preparation position to one of a first path and a second path based on the return position, The first path is a path for directly moving the spindle from the restoration position to the tool change preparation position. The second path is a path for moving the spindle from the return position to an origin position in a direction perpendicular to the axial direction and then moving from the origin position to the tool change preparation position.
