Control device, control method, control program, and storage medium
The control device addresses safety issues by determining stroke over based on machine status and command type, enabling flexible operation and compatibility with different machine tools.
Patent Information
- Application Number
- JP2020166125
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-09-30
- Publication Date
- 2024-08-14
- Estimated Expiration
- 2040-09-30
AI Technical Summary
Existing control devices for machine tools require operators to manually move parts within the stroke before starting a new machining program, which can lead to safety issues if the stroke is exceeded during operation, and do not account for the machine's operating status.
A control device that determines stroke over based on the machine's operating status by distinguishing between first and subsequent movement commands, allowing or disallowing movement from outside the stroke for the first command, and enabling or disabling error processing based on operator settings.
Enhances safety by preventing unnecessary error processing when moving from outside the stroke for the first movement command, allowing flexible operation and compatibility with various machine tools.
Smart Images

Figure 0007533093000003 
Figure 0007533093000006 
Figure 0007533093000002
Abstract
Description
[Technical field]
[0001] The present invention relates to a control device, a control method, a control program, and a storage medium. [Background technology]
[0002] There are control devices that control machine tools based on machining programs. The numerical control device in Patent Document 1 controls the movement of the moving part of the machine tool based on the movement commands in the machining program. The numerical control device constantly judges whether the current position of the moving part moving based on the movement commands is within the stroke. If the current position exceeds the stroke, the numerical control device judges that the stroke is over. At that time, the numerical control device performs processing such as stopping the movement of the moving part. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Special Publication No. 59-47322 Summary of the Invention [Problem to be solved by the invention]
[0004] After control based on a machining program is completed, an operator may move the moving part outside the stroke for jig replacement or the like, and then the numerical control device may perform control based on the next machining program. At that time, when control based on the movement command of the next machining program is performed, the moving part starts moving from outside the stroke. Therefore, the numerical control device determines that the stroke is over at the start of control based on the movement command. Therefore, with the above-mentioned numerical control device, the operator had to move the moving part into the stroke before control based on the movement command. On the other hand, if stroke over is always permitted regardless of the operating status of the machine tool, a safety problem may arise.
[0005] An object of the present invention is to provide a control device, a control method, a control program, and a storage medium that are capable of determining whether a stroke has exceeded the limit in accordance with the operating conditions of a machine tool. [Means for solving the problem]
[0006] The control device of claim 1 is a control device that controls a machine tool having a holding unit that holds a workpiece and a moving unit that moves relative to the holding unit based on a machining program, and is characterized in that it comprises a movement control unit that controls the movement of the moving unit based on a movement command defined by the machining program, a stroke judgment unit that judges whether the movement command will be an over-stroke in which the moving unit moves outside a predetermined stroke relative to the holding unit, an error processing unit that performs a predetermined error processing when the judgment result of the stroke judgment unit is the over-stroke, and a command judgment unit that judges whether the movement command is a first movement command that is the first of one or more movement commands defined by the machining program, and the error processing unit does not perform the error processing when the command judgment unit judges that the movement command is the first movement command and the moving unit moves from outside the stroke for the movement command.
[0007] According to the control device of claim 1, the determination of stroke over differs depending on whether the movement command is the first movement command or not, so the control device can determine stroke over depending on the operating status of the machine tool.
[0008] In the control device of claim 2, the stroke determination unit may determine whether the movement command is over-stroke by determining whether the movement start position of the moving part, the movement end position of the moving part, and the intermediate positions from the movement start position to the movement end position of the moving part are within the stroke. In this case, the control device can determine whether the movement command is over-stroke from the beginning to the end of the movement of the moving part based on the movement command.
[0009] The control device of claim 3 includes a setting unit that sets whether or not to permit the moving unit to move from outside the stroke in response to the first movement command, and the error processing unit, when the setting unit sets that the moving unit is permitted to move from outside the stroke in response to the first movement command and the command determination unit determines that the movement command is the first movement command, may not perform the error processing when the moving unit moves from outside the stroke in response to the movement command. At that time, the control device can set whether or not to permit the moving unit to move from outside the stroke in response to the first movement command, depending on, for example, the manner in which the machine tool is used by an operator.
[0010] In the control device of claim 4, the movement control unit controls the movement of the moving unit, which moves relatively to the holding unit in X-axis, Y-axis, and Z-axis directions perpendicular to each other, based on the movement command, and the stroke includes an X-axis stroke corresponding to the X-axis direction, a Y-axis stroke corresponding to the Y-axis direction, and a Z-axis stroke corresponding to the Z-axis direction, and the setting unit may set whether or not to permit the moving unit to move from outside the stroke in response to the first movement command, for each of the X-axis stroke, the Y-axis stroke, and the Z-axis stroke. In this case, the control device can be compatible with various types of machine tools.
[0011] In the control device of claim 5, the moving unit can be equipped with a tool, and the machine tool can include an automatic tool changer capable of exchanging the tool attached to the moving unit with another tool in a tool change operation area, the tool change operation area being located outside the stroke. In this case, even if an operator moves the moving unit to the ATC area after control based on the machining program is completed, the control device can operate not to perform error processing even if the stroke is over when the moving unit moves thereafter based on the first movement command. Therefore, the control device makes it easy for the operator to handle the machine tool.
[0012] A control method according to claim 6 is a control method by a control device that controls a machine tool having a holding part that holds a workpiece and a moving part that moves relative to the holding part based on a machining program, the control method comprising: a movement control step of controlling the movement of the moving part based on a movement command defined by the machining program; a stroke judgment step of judging whether the movement command causes the moving part to move outside a predetermined stroke relative to the holding part, an error processing step of performing a predetermined error processing when the judgment result in the stroke judgment step is the stroke over; and a command judgment step of judging whether the movement command is a first movement command that is the first of one or more movement commands defined by the machining program, the error processing step not performing the error processing when the command judgment step judges that the movement command is the first movement command and the moving part moves from outside the stroke for the movement command. The control method according to claim 6 can achieve the same effect as the control device according to claim 1.
[0013] The control program of claim 7 provides a computer of a control device that controls a machine tool having a holding unit that holds a workpiece and a moving unit that moves relatively to the holding unit based on a machining program, the computer executing the following steps: a movement control process that controls movement of the moving unit based on a movement command defined by the machining program; a stroke determination process that determines whether the movement command results in an over-stroke in which the moving unit moves outside a predetermined stroke relative to the holding unit; a predetermined error process that is performed when the determination result in the stroke determination process is the over-stroke; and a command determination process that determines whether the movement command is a first movement command that is the first of one or more movement commands defined by the machining program. and when it is determined in the command determination process that the movement command is the first movement command, the error process is not executed when the moving unit moves from outside the stroke in response to the movement command. The control program of claim 7 can achieve the same effect as the control device of claim 1.
[0014] A storage medium according to claim 8 stores the control program according to claim 7. The storage medium according to claim 8 can achieve the same effect as the control device according to claim 1. [Brief description of the drawings]
[0015] [Figure 1] FIG. [Diagram 2] FIG. 4 is a right side cross-sectional view of the upper part of the machine tool 1 during a tool 4 replacement operation. [Diagram 3] FIG. 2 is a diagram showing the XYZ coordinate system of the machine tool 1. [Figure 4] FIG. 2 is a block diagram showing the electrical configuration of the machine tool 1. [Diagram 5] FIG. 4 is a conceptual diagram showing an example of a machining program. [Figure 6] FIG. 13 is a conceptual diagram showing an error prohibition setting. [Figure 7] 1 is a flow diagram of the main process. [Figure 8] 1 is a flow diagram of the main process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] An embodiment of the present invention will be described. In the following description, left and right, front and rear, and up and down will be used as indicated by arrows in the drawings. The left and right directions, front and rear directions, and up and down directions of the machine tool 1 are the X-axis direction, Y-axis direction, and Z-axis direction of the machine tool 1, respectively. The left, right, front, rear, downward, and upward directions of the machine tool 1 are the negative X-axis direction, positive X-axis direction, negative Y-axis direction, positive Y-axis direction, negative Z-axis direction, and positive Z-axis direction of the machine tool 1, respectively.
[0017] The configuration of machine tool 1 will be described with reference to Figures 1 and 2. Machine tool 1 comprises a machine body 3 and an automatic tool changer (hereinafter referred to as ATC 20). Machine body 3 is fixed onto base 2 and cuts a workpiece. ATC 20 is located above machine body 3 and changes tools 4 for a spindle 9 (see Figure 2) described below.
[0018] The configuration of the machine body 3 will be described. The machine body 3 is equipped with a table 10, a column 5, and a spindle head 7. The table 10 is provided on the base 2 and holds a workpiece (not shown). The table 10 moves in the X-axis direction when driven by an X-axis motor 51 (see FIG. 4), and moves in the Y-axis direction when driven by a Y-axis motor 52 (see FIG. 4). The column 5 is provided behind the table 10 on the base 2, and supports the spindle head 7 so that it can be raised and lowered.
[0019] The spindle head 7 moves in the Z-axis direction by being driven by a Z-axis motor 53 (see FIG. 4). The spindle head 7 supports a spindle 9. The spindle 9 extends in the Z-axis direction and rotates by being driven by a spindle motor 54. A tool 4 is detachably attached to the spindle 9.
[0020] The machining operation of the workpiece by the machine tool 1 will be described. As the table 10 moves in the X-axis and Y-axis directions, the spindle head 7 moves in the X-axis and Y-axis directions relative to the workpiece on the table 10. As the spindle head 7 moves up and down relative to the workpiece on the table 10, it moves in the Z-axis direction. As the spindle 9 rotates, the tool 4 cuts the workpiece. In this manner, the machine tool 1 performs the machining operation of the workpiece.
[0021] The configuration of the ATC 20 will be described. The ATC 20 comprises a support part 28, a magazine body 21, and multiple grip arms 23. The support part 28 is fixed to the column 5 and supports a shaft 25. The shaft 25 extends diagonally downward and forward from the support part 28 and is fixed to the magazine body 21. The magazine body 21 rotates about the shaft 25 when driven by a magazine motor 55. The multiple grip arms 23 are provided on the outer periphery of the magazine body 21 and can hold tools 4.
[0022] The operation of changing the tool 4 by the machine tool 1 will be described. While the spindle head 7 rises to the tool change origin, which is the upper end of the ATC area D2 described later, the grip arm 23 holds the tool 4 attached to the spindle 9 and removes the tool 4 from the spindle 9. Then, the magazine body 21 rotates about the axis 25. This causes the grip arm 23 holding the next tool 4 to move below the spindle head 7. Then, the spindle head 7 moves to the upper limit position of the machining area D1 in the Z-axis direction (the upper limit of the Z-axis stroke described later) and attaches the next tool 4 to the spindle 9.
[0023] With reference to Fig. 3, the machining area D1 and tool change area (hereinafter referred to as ATC area D2) will be described in terms of the XYZ coordinate system. The origin (0,0,0) of the XYZ coordinate system in this embodiment is defined as an absolute position relative to the machine tool 1 (see Fig. 1). The machining area D1 is the area in which the table 10 and spindle head 7 move during machining operations by the machine tool 1. The machining area D1 is defined by the X-axis stroke, Y-axis stroke, and Z-axis stroke in the XYZ coordinate system.
[0024] The X-axis stroke is the movable range of the table 10 in the X-axis direction. The Y-axis stroke is the movable range of the table 10 in the Y-axis direction. The Z-axis stroke is the movable range of the spindle head 7 in the Z-axis direction.
[0025] In this embodiment, the X-axis stroke is defined by the X coordinate as -500 (lower limit of the X-axis stroke) to 0 (upper limit of the X-axis stroke). The Y-axis stroke is defined by the Y coordinate as -400 (hereinafter referred to as lower limit of the Y-axis stroke) to 0 (upper limit of the Y-axis stroke). The Z-axis stroke is defined by the Z coordinate as 180 (lower limit of the Z-axis stroke) to 480 (upper limit of the Z-axis stroke). Note that the specific numerical values of each coordinate are merely examples.
[0026] The area outside the machining area D1 is the outside-stroke area. In this embodiment, the outside-stroke area is divided into an X-axis negative side outside-stroke area and an X-axis positive side stroke area in the X-axis direction, a Y-axis negative side outside-stroke area and a Y-axis positive side stroke area in the Y-axis direction, and a Z-axis negative side stroke area and a Z-axis positive side stroke area in the Z-axis direction.
[0027] The negative X-axis outer stroke area is the stroke area on the negative side of the X-axis stroke lower limit (X coordinate -500). The positive X-axis outer stroke area is the stroke area on the positive side of the X-axis stroke upper limit (X coordinate 0). The negative Y-axis outer stroke area is the stroke area on the negative side of the Y-axis stroke lower limit (Y coordinate -400). The positive Y-axis outer stroke area is the stroke area on the positive side of the Y-axis stroke upper limit (Y coordinate 0). The negative Z-axis outer stroke area is the stroke area on the negative side of the Z-axis stroke lower limit (Z coordinate 180). The positive Z-axis outer stroke area is the stroke area on the positive side of the Z-axis stroke upper limit (Z coordinate 480).
[0028] The ATC area D2 is an area on the Z-axis positive side from the upper limit of the Z-axis stroke (Z coordinate 480), i.e., it is inside the area outside the Z-axis positive stroke. The ATC area D2 is an area to which the spindle head 7 moves when the tool 4 is replaced. Therefore, the ATC area D2 is an area above the machining area D1, and the upper end in the Z-axis direction is the tool replacement origin. The magazine body 21 becomes rotatable at the tool replacement origin.
[0029] The electrical configuration of machine tool 1 will be described with reference to Figure 4. Machine tool 1 is equipped with a control device 30. Control device 30 is equipped with a CPU 31, ROM 32, RAM 33 and storage device 34. CPU 31 controls the operation of machine tool 1. ROM 32 stores a main program etc. for CPU 31 to execute main processing (see Figures 7 and 8) described below. RAM 33 temporarily stores various information etc. required for executing the main program. Storage device 34 is non-volatile, and stores various information such as a machining program (see Figure 5) and error prohibition settings (see Figure 6) described below.
[0030] The CPU 31 is connected to the X-axis motor 51, the Y-axis motor 52, the Z-axis motor 53, the spindle motor 54, the magazine motor 55, and the input unit 61. The X-axis motor 51, the Y-axis motor 52, the Z-axis motor 53, the spindle motor 54, and the magazine motor 55 are respectively equipped with encoders 511, 521, 531, 541, and 551. The encoders 511, 521, 531, 541, and 551 detect the rotation angles of the X-axis motor 51, the Y-axis motor 52, the Z-axis motor 53, the spindle motor 54, and the magazine motor 55, and output the detection results to the CPU 31.
[0031] The input unit 61 is a touch panel or the like, and outputs information according to an operation by an operator to the CPU 31. For example, the operator can operate the input unit 61 to specify a machining program and input an instruction to execute the specified machining program to the control device 30. The operator can operate the input unit 61 to input an instruction to change an error inhibition setting, described below, between enabled and disabled, to the control device 30.
[0032] An example of a machining program will be described with reference to Figure 5. In a machining program, various commands are defined for each block, and the commands are executed in order starting from block No. 1. In other words, the block No. indicates the processing order of each block. The various commands include a coolant command, a movement command, a tool change command, an end of program command, etc.
[0033] The coolant command is a command to perform a coolant operation in which cutting oil is discharged from the oil discharge device (not shown) of the machine tool 1 toward the workpiece and tool 4. The movement command is a command to move the spindle head 7 or table 10 to a specified movement end position in the XYZ coordinate system. The movement command specifies the movement end position. In other words, the movement end position is the position of the table 10 and spindle head 7 after movement based on the movement command. The tool change command is a command to perform a change operation of the tool 4. The end of program command is a command to end the machining program being executed.
[0034] The machining program shown in Figure 5 is composed of eight blocks, block Nos. 1 to 8. Explanations of blocks Nos. 3, 5, and 7 will be omitted. Block No. 1 defines a coolant command. Block No. 2 defines a movement command, and specifies a first position as the movement end position. Block No. 4 defines a tool change command. Block No. 6 defines a movement command, and specifies a second position as the movement end position. Block No. 8 defines an end of program command.
[0035] Hereinafter, the first move command among one or more move commands defined by a machining program will be referred to as the first move command, and a move command other than the first move command will be referred to as the second move command. In other words, the first move command is the move command with the smallest block number among one or more move commands defined by a machining program. In the machining program shown in Figure 5, the command type of block No. 1 is a command other than a move command (coolant command), so the move command of block No. 2 is the first move command. For example, there is at least a move command of block No. 2 before block No. 6, so the move command of block No. 6 is the second move command.
[0036] The determination of stroke over will now be explained. The determination of stroke over is made as to whether or not each movement command will result in a stroke over, and is made during control based on the machining program. A stroke over is a state in which the spindle head 7 or table 10 moves in an out-of-stroke area during operation based on a movement command. If the result of the stroke over determination is a stroke over, the control device 30 performs various controls (hereinafter referred to as error processing) such as stopping each motor and issuing an error notification for safety, and stops control based on the machining program.
[0037] The control device 30 judges whether or not a stroke has been exceeded based on the start, end, and intermediate positions of the movement. The start position of the movement is the position of the table 10 and spindle head 7 before the movement starts based on a movement command. The intermediate position of the movement is the position of the table 10 and spindle head 7 from the start of the movement to the end position of the movement.
[0038] The control device 30 judges whether the movement start position and the movement end position are over-stroke before the start of movement based on the movement command. Before the start of movement, when the movement start position is within the out-of-stroke area, the control device 30 judges that the movement will be over-stroke. Before the start of movement, when the movement end position is within the out-of-stroke area, the control device 30 judges that the movement will be over-stroke.
[0039] In the following, the current positions of the table 10 and spindle head 7 are referred to as the current position. The next position on the movement path from the movement start position to the movement end position (mid-way position) after the current position is referred to as the next position. Regarding mid-way positions, the controller 30 determines whether they are over-stroke when moving from the current position to the next position. When moving from the current position to the next position, if at least one of the current position and the next position is within the out-of-stroke area, the controller 30 determines that the stroke is over.
[0040] The error prohibition setting will be described with reference to Fig. 6. The error prohibition setting is a setting as to whether or not to execute error processing when the spindle head 7 or table 10 moves from outside the stroke in response to the first movement command. The error prohibition setting in this embodiment is set to either enabled or disabled for each target area of the X-axis negative side out-of-stroke area, the X-axis positive side out-of-stroke area, the Y-axis negative side out-of-stroke area, the Y-axis positive side out-of-stroke area, the Z-axis negative side out-of-stroke area, and the Z-axis positive side out-of-stroke area. The target areas are out-of-stroke areas for which the error prohibition setting is set to either enabled or disabled. For the sake of convenience, the error prohibition setting is assigned a setting number to each target area.
[0041] The enabled error prohibition setting indicates that error processing will not be executed when the spindle head 7 or table 10 moves from outside the stroke for the first movement command. The disabled error prohibition setting indicates that error processing will be executed when the spindle head 7 or table 10 moves from outside the stroke for the first movement command. The operator can set each setting number to either enabled or disabled by operating the input unit 61. The error prohibition setting shown in Figure 6 is set to disabled for setting numbers 1 to 5, and enabled for setting number 6.
[0042] Hereinafter, the X-axis stroke outer area (X-axis negative stroke outer area, X-axis positive stroke outer area) with the error prohibition setting enabled will be collectively referred to as the X-axis allowed stroke. The Y-axis stroke outer area (Y-axis negative stroke outer area, Y-axis positive stroke outer area) with the error prohibition setting enabled will be collectively referred to as the Y-axis allowed stroke. The Z-axis stroke outer area (Z-axis negative stroke outer area, Z-axis positive stroke outer area) with the error prohibition setting enabled will be collectively referred to as the Z-axis allowed stroke.
[0043] The control device 30 sets the permitted area according to whether the error prohibition settings of setting Nos. 1 to 6 are enabled or disabled. The permitted area is an area outside the stroke area that is defined by the X-axis permitted stroke, the Y-axis permitted stroke, and the Z-axis permitted stroke, and is an area outside the stroke area where movement of the spindle head 7 is permitted in response to the first movement command.
[0044] In the error prohibition settings shown in Figure 6, settings No. 1 and 2 are invalid, so there is no X-axis allowed stroke. Settings No. 3 and 4 are invalid, so there is no Y-axis allowed stroke. Setting No. 5 is invalid and setting No. 6 is valid, so the Z-axis allowed stroke is outside the Z-axis positive stroke area. Therefore, in the error prohibition settings shown in Figure 6, area D3, which is specified by the Z-axis positive stroke outside area (Z-axis allowed stroke) among the stroke outside areas, is the allowed area. At that time, area D3 and ATC area D2 coincide.
[0045] Similarly, when all error prohibition settings of setting Nos. 1 to 6 are enabled, the entire outside-stroke area becomes the permitted area. When all error prohibition settings of setting Nos. 1 to 6 are disabled, the permitted area does not exist.
[0046] The main processing will be described with reference to Figures 7 and 8. When an operator turns on the power of the control device 30, the CPU 31 executes the main processing based on the main program in the ROM 32. In the main processing, the CPU 31 performs settings such as enabling and disabling the error inhibition setting and control based on the machining program.
[0047] 7, the CPU 31 determines whether or not an instruction to change the error inhibition setting has been given in response to an operator's operation of the input unit 61 (S11). If there is no instruction to change (S11: NO), the CPU 31 proceeds to S13. If there is an instruction to change (S11: YES), the CPU 31 changes the enable / disable status of each target area in the error inhibition setting of the storage device 34 (see FIG. 6) in response to the instruction to change (S12).
[0048] Since the memory device 34 is non-volatile and the error inhibition setting is stored in the memory device 34, when the power of the control device 30 is turned on, the error inhibition setting retains the setting state (enabled or disabled) when the power of the control device 30 is turned off. The error inhibition setting may be stored in the RAM 33 and initially set when the power of the control device 30 is turned on. The following describes when the CPU 31 operates based on the error inhibition setting shown in Fig. 6. At that time, the permitted area is area D3 (see Fig. 3).
[0049] The CPU 31 determines whether or not an execution instruction for the machining program has been issued in response to an operator's operation of the input unit 61 (S13). If there has been no execution instruction (S13: NO), the CPU 31 returns the process to S11. If there has been an execution instruction (S13: YES), the CPU 31 performs control based on the machining program, which will be described below.
[0050] The CPU 31 designates a target block from one or more blocks defined by the machining program (S14). The target block is a block to be processed, and is designated in order starting from block No. 1 each time S14 is executed. The following describes when an execution instruction designates the machining program shown in FIG. 5.
[0051] The following describes the case where CPU 31 designates block No. 1 (see FIG. 5) as the target block in S14. As shown in FIG. 7, CPU 31 determines whether the command in block No. 1 (target block) is an end of program command (S15). The command in block No. 1 is a coolant command, so it is not an end of program command (S15: NO). At that time, CPU 31 determines whether the command in block No. 1 (target block) is a movement command (S16).
[0052] The command for block No. 1 is a coolant command, and is not a movement command (S16: NO). At this time, the CPU 31 performs a coolant operation based on the coolant command for block No. 1 (S17). In S17, the CPU 31 controls an oil discharge device (not shown) to discharge cutting oil toward the workpiece and tool 4. The CPU 31 returns the process to S14 and designates block No. 2 as the target block.
[0053] The following describes the case where CPU 31 designates block No. 2 (see FIG. 5) as the target block in S14. The command for block No. 2 (target block) is not an end of program command (S15: NO), but a movement command (S16: YES). At that time, as shown in FIG. 8, CPU 31 determines whether the movement command for block No. 2 (target block) is the first movement command based on whether there is a movement command in a block before block No. 2 (target block) (S21).
[0054] Since there is no block prior to block No. 2 that specifies a movement command, the movement command for block No. 2 is the first movement command (S21: YES). At that time, CPU 31 determines whether the current position is within area D3 (permission area) (S22).
[0055] CPU 31 identifies the current position based on detection signals from encoders 511, 521, 531 (see FIG. 4). When spindle head 7 is at position P1 (-400, -200, 480) shown in FIG. 3, for example, the Z coordinate (480) is within the Z-axis stroke (180 to 480). At that time, since the Z coordinate of region D3 is greater than the upper limit (480) of the Z-axis stroke, the identified current position (position P1) is outside region D3 (S22: NO). At that time, CPU 31 determines whether the movement start position is within the stroke or not (S23).
[0056] The current position at the time of executing S23 is the movement start position. CPU 31 identifies the current position (movement start position) based on the detection signals from encoders 511, 521, 531. When spindle head 7 is at position P1 (-400, -200, 480), for example, the identified movement start position is within the stroke (S23: YES). At this time, it is not over the stroke, so CPU 31 transitions the process to S24.
[0057] For example, when the spindle head 7 is at position P2 (-250, -500, 180), the Y coordinate (-500) is outside the Y-axis stroke (-400 to 0). At this time, the identified movement start position (position P2) is in the out-of-stroke area (S23: NO). At this time, since it is over-stroke, the CPU 31 performs error processing (S43). In the error processing, the CPU 31 stops each motor, notifies the user of an error, etc. The CPU 31 stops the control based on the machining program shown in FIG. 5, and returns the process to S11 (see FIG. 7).
[0058] In S22, when the spindle head 7 is at position P3 (-250, -200, 600), for example, the identified current position is within region D3 (S22: YES). At that time, the CPU 31 does not execute error processing by not determining whether the movement start position is over-stroke. Therefore, the CPU 31 proceeds to S24 without proceeding to S23.
[0059] The CPU 31 judges whether the movement end position is within the stroke or not (S24). The CPU 31 identifies the first position specified as the movement end position by the movement command of block No. 2. When the first position is, for example, position P2 (-250, -500, 180), the identified movement end position is in the out-of-stroke area (S24: NO). Since the stroke is exceeded at this time, the CPU 31 performs error processing (S43). The CPU 31 stops control based on the machining program shown in FIG. 5, and returns the process to S11.
[0060] For example, when the first position is position P4 (-250, -200, 300), the identified movement end position is within the stroke (S24: YES). At this time, since it is not over the stroke, the CPU 31 analyzes the movement path (movement intermediate position) based on the identified movement start position and movement end position (S31).
[0061] CPU 31 determines whether the stroke is over based on whether both the current position and the next position (position during movement) are within the stroke (S32). CPU 31 specifies the current position as one of the positions during movement based on the detection signals from encoders 511, 521, 531. CPU 31 specifies the next position as one of the positions during movement based on the analyzed movement route. When both the current position and the next position specified as positions during movement are within the stroke (S32: YES), it is not over the stroke, so CPU 31 transitions the process to S33.
[0062] When at least one of the current position and the next position identified as the mid-movement position is within the outside-stroke region (S32: NO), the CPU 31 determines whether the movement command for block No. 2 (target block) is the first movement command (S41).
[0063] The movement command for block No. 2 is the first movement command (S41: YES). At that time, the CPU 31 judges whether or not both the current position and the next position specified as the midway position are within the region D3 (permitted region) (S42). If at least one of the current position and the next position specified as the midway position is outside the region D3 (S42: NO), it is over-stroke, so the CPU 31 performs error processing (S43).
[0064] When both the current position and the next position identified as the mid-movement position are within the area D3 (S42: YES), the CPU 31 does not execute error processing for the mid-movement position, and therefore the CPU 31 shifts the process to S33 without shifting the process to S43.
[0065] CPU 31 controls X-axis motor 51, Y-axis motor 52, and Z-axis motor 53 to move spindle head 7 or table 10 from the current position to the next position (S33). CPU 31 determines whether spindle head 7 or table 10 has reached the movement end position (S34). CPU 31 identifies the current position based on detection signals from encoders 511, 521, and 531. CPU 31 identifies the first position specified as the movement end position by the movement command for block No. 2 (target block). If the identified current position is different from the movement end position, CPU 31 determines that spindle head 7 or table 10 has not reached the movement end position (S34: NO). At that time, CPU 31 returns the process to S32 and repeats the processes from S32 onwards.
[0066] When the identified current position coincides with the movement end position, the CPU 31 determines that the spindle head 7 or table 10 has reached the movement end position (S34: YES). At that time, the CPU 31 ends the control based on the movement command for block No. 2 (target block). The CPU 31 returns the process to S14 (see FIG. 7) and specifies blocks No. 3 and 4 as target blocks in that order.
[0067] The case where the CPU 31 designates block No. 4 (see FIG. 5) as the target block in S14 will be described. As shown in FIG. 7, the command of block No. 4 (target block) is a tool change command, so it is not an end of program command (S15: NO) and is not a movement command (S16: NO). At this time, the CPU 31 performs the change operation of the tool 4 based on the tool change command of block No. 4 (target block) (S17). In S17, the CPU 31 controls the Z-axis motor 53 to raise the spindle head 7 from the machining area D1 to the ATC area D2. The CPU 31 controls the magazine motor 55 to rotate the magazine body 21 and perform the change operation of the tool 4. The CPU 31 controls the Z-axis motor 53 to lower the spindle head 7 from the ATC area D2 to the machining area D1. The CPU 31 returns the process to S14 and designates block Nos. 5 and 6 as the target blocks in that order.
[0068] The following describes the case where CPU 31 designates block No. 6 (see FIG. 5) as the target block in S14. As shown in FIG. 7, the command for block No. 6 (target block) is not an end of program command (S15: NO), but a movement command (S16: YES). As shown in FIG. 8, block No. 2 (i.e., the block before block No. 6) designates a movement command, so the movement command for block No. 6 (target block) is a second movement command (S21: NO). At that time, CPU 31 judges whether the stroke is over based on whether the movement start position is within the stroke (S23).
[0069] When the movement command for the target block is the second movement command, unlike when the movement command is the first movement command, CPU 31 always judges whether the movement start position is over-stroke. For example, let us consider the case where the movement start position is position P3. In the process based on the first movement command of block No. 2, position P3 (movement start position) is within area D3 (permitted area) (S22: YES), so CPU 31 does not judge whether the movement start position is over-stroke and does not perform error processing. In the process based on the second movement command of block No. 6, even if position P3 (movement start position) is within area D3 (permitted area), CPU 31 judges it to be over-stroke (S23: NO) and performs error processing (S43).
[0070] If the movement start position is within the stroke (S23: YES), the CPU 31 thereafter performs the processes of S24, S31, and S32 in the same manner as when block No. 2 is the target block. If at least one of the current position and the next position identified as the mid-movement position is within the out-of-stroke area (S32: NO), the movement command for block No. 6 (target block) is the second movement command (S41: NO), so the CPU 31 performs error processing (S43). In other words, unlike when the movement command for the target block is the second movement command, the CPU 31 always judges whether the mid-movement position is over-stroke, and if it is over-stroke, it always performs error processing.
[0071] When both the current position and the next position identified as intermediate positions are within the stroke (S32: YES), the CPU 31 performs the processes of S33 and S34 in the same manner as when block No. 2 is the target block. When the spindle head 7 or table 10 reaches the end position of movement (S34: YES), the CPU 31 ends the control based on the movement command for block No. 6 (target block). The CPU 31 returns the process to S14 (see FIG. 7) and specifies block Nos. 7 and 8 as target blocks in that order.
[0072] The case where the CPU 31 designates block No. 8 (see FIG. 5) as the target block in S14 will be described. As shown in FIG. 7, the command for block No. 8 (target block) is an end of program command (S15: YES). At that time, the CPU 31 ends the control based on the machining program shown in FIG. 5 and returns the process to S11.
[0073] As explained above, when the movement command is the first movement command, the controller 30 does not perform error processing when the spindle head 7 or table 10 moves from outside the stroke in response to the movement command. Therefore, the determination of stroke over differs depending on whether the movement command is the first movement command or not. Therefore, the controller 30 can determine stroke over depending on the operating status of the machine tool 1.
[0074] The control device 30 judges whether the movement start position, the movement end position, and the movement intermediate position are within the stroke, thereby judging whether the movement command is over the stroke. Therefore, the control device 30 can judge whether the movement command is over the stroke from the beginning to the end of the movement of the spindle head 7 or the table 10 based on the movement command.
[0075] Control device 30 sets whether the error inhibition setting is enabled or disabled. Therefore, for example, the error inhibition setting can be set to be enabled or disabled depending on the manner in which machine tool 1 is used by an operator.
[0076] The control device 30 sets the error inhibition setting to enabled or disabled for each of the X-axis stroke, Y-axis stroke, and Z-axis stroke. Therefore, the control device 30 can handle models in which the movement direction of the spindle head 7 or table 10, the position of the ATC area D2, etc. are different from those of the machine tool 1 of the above embodiment by changing the error inhibition setting according to the stroke of each axis. Therefore, the control device 30 can handle various models of machine tools 1.
[0077] The ATC area D2 is located outside the stroke. At that time, for safety reasons, etc., an operator may move the spindle head 7 to the ATC area D2 after the machining program is completed. Even if the operator moves the spindle head 7 to the ATC area D2 after control based on the machining program is completed, the control device 30 can operate so as not to perform error processing when the spindle head 7 moves thereafter based on the first movement command, even if the movement is over the stroke. Therefore, the control device 30 makes it easy for the operator to handle the machine tool 1.
[0078] In the above embodiment, the table 10 corresponds to the "holding unit" of the present invention. The spindle head 7 corresponds to the "moving unit" of the present invention. The CPU 31 that executes the processing of S33 in FIG. 8 corresponds to the "movement control unit" of the present invention. The CPU 31 that executes the processing of S23, S24, and S32 in FIG. 8 corresponds to the "stroke judgment unit" of the present invention. The CPU 31 that executes the processing of S43 in FIG. 8 corresponds to the "error processing unit" of the present invention. The CPU 31 that executes the processing of S21 and S41 in FIG. 8 corresponds to the "command judgment unit" of the present invention. The CPU 31 that executes the processing of S12 in FIG. 7 corresponds to the "setting unit" of the present invention.
[0079] The process of S33 in Fig. 8 corresponds to the "movement control step" and "movement control process" of the present invention. The processes of S23, S24, and S32 in Fig. 8 correspond to the "stroke judgment step" and "stroke judgment process" of the present invention. The process of S43 in Fig. 8 corresponds to the "error processing step" and "error processing" of the present invention. The processes of S21 and S41 in Fig. 8 correspond to the "command judgment step" and "command judgment process" of the present invention.
[0080] The present invention can be modified from the above embodiment. For example, in the above embodiment, when the movement command for the target block is the first movement command (S21: YES) and the current position is within the permitted area (S22: YES), the CPU 31 shifts the process to S24 without determining whether the movement start position is within the stroke (S23). On the other hand, when the movement start position is in the area outside the stroke (S23: YES), the movement command for the target block is the first movement command and the current position is within the permitted area, the CPU 31 may shift the process to S24 instead of S43.
[0081] In the above embodiment, when at least one of the current position and the next position is in the area outside the stroke (S32: NO), the movement command for the target block is the first movement command (S41: YES) and the current position is in the permitted area (S42: YES), the CPU 31 shifts the process to S33 instead of S43. In contrast, when the movement command for the target block is the first movement command (S41: YES) and the current position is in the permitted area (S42: YES), the CPU 31 may shift the process to S33 without determining whether at least one of the current position and the next position is in the stroke (S32).
[0082] In the above embodiment, the CPU 31 judges whether or not the stroke is over for each of the movement start position, the movement end position, and the movement intermediate position. In contrast, the CPU 31 may, for example, not judge whether or not the stroke is over for the movement intermediate position, but may judge whether or not the stroke is over for the movement start position and the movement end position.
[0083] In the above embodiment, the control device 30 sets the stroke judgment setting to be enabled or disabled for each of the X-axis negative side outside-stroke region, the X-axis positive side outside-stroke region, the Y-axis negative side outside-stroke region, the Y-axis positive side outside-stroke region, the Z-axis negative side outside-stroke region, and the Z-axis positive side outside-stroke region. In contrast, the control device 30 may set the stroke judgment setting to be enabled or disabled for each of the X-axis outside-stroke region, the Y-axis outside-stroke region, and the Z-axis outside-stroke region, or may set the stroke judgment setting to be enabled or disabled only for the Z-axis positive side outside-stroke region, for example. The control device 30 may uniformly set the stroke judgment setting to be enabled or disabled for all of the outside-stroke regions. The control device 30 may set the stroke judgment setting to be enabled or disabled only for a portion of the outside-stroke regions (for example, the ATC region D2).
[0084] In the above embodiment, the control device 30 allows the operator to change the stroke judgment setting between enabled and disabled in response to operation of the input unit 61. However, the control device 30 may not be able to change the stroke judgment setting between enabled and disabled.
[0085] The machine tool 1 in the above embodiment is a so-called vertical machine in which the spindle 9 extends in the Z-axis direction. In contrast, the machine tool 1 may be a so-called horizontal machine in which the spindle 9 extends in the X-axis direction. In the above embodiment, the spindle head 7 does not move in the X-axis direction and the Y-axis direction relative to the column 5. In contrast, the spindle head 7 may also move in the X-axis direction and the Y-axis direction relative to the column 5. In the above embodiment, the spindle head 7 can move in each of the X-axis direction, the Y-axis direction, and the Z-axis direction relative to the table 10. In contrast, the spindle head 7 may be able to move only in the Z-axis direction among the X-axis direction, the Y-axis direction, and the Z-axis direction relative to the table 10. In other words, the table 10 may be immovable in the X-axis direction and the Y-axis direction.
[0086] In the above embodiment, the ATC region D2 is located in the Z-axis positive side outside-stroke region. However, the ATC region D2 may be located in an outside-stroke region other than the Z-axis positive side outside-stroke region, or may be located within the stroke.
[0087] In the above embodiment, the control device 30 may determine whether the control based on the machining program is the first control based on the machining program after the control device 30 is powered on. The CPU 31 may execute S14 to S43 only when the control based on the first machining program after the control device 30 is powered on. For the control based on the machining program from the second time onwards after the control device 30 is powered on, the CPU 31 may omit the processes of, for example, S21, S22, S41, and S42. In other words, the first movement command may be the first movement command after the control device 30 is powered on.
[0088] In the above-described embodiments, the mechanism for holding the workpiece is not limited to the table 10. That is, the machine tool 1 may hold the workpiece by, for example, the arm of a robot. The spindle 9 may not be able to detach the tool 4. In such a case, the spindle 9 may be formed integrally with the tool 4, and the machine tool 1 may omit the ATC 20. The manner of operation of replacing the tool 4 by the ATC 20 is not limited to the above-described embodiments.
[0089] The content of the error processing is not limited to that in the above embodiment. That is, the CPU 31 may perform only one of notifying an error and stopping each motor in the error processing, or may perform other control. [Explanation of symbols]
[0090] 1 Machine tools 7 Spindle Head 9 Main axis 10 Tables 20 ATC 30 Control device 31 CPU 32 ROM 33 RAM 34 Storage device
Claims
1. A control device controls a machine tool having a holding unit that holds a workpiece and a moving unit that moves relative to the holding unit based on a machining program, A movement control unit that controls the movement of the moving unit based on a movement command defined by the machining program; a stroke determination unit that determines whether the movement command causes the moving unit to move outside a predetermined stroke relative to the holding unit; an error processing unit that performs a predetermined error process when the stroke determination unit determines that the stroke is over; a command determination unit that determines whether the movement command is a first movement command that is the first movement command among one or more movement commands defined by the machining program; Equipped with the stroke determination unit determines whether or not a movement start position of the moving unit, a movement end position of the moving unit, and an intermediate position of the moving unit from the movement start position to the movement end position are each within the stroke, thereby determining whether or not the movement command will be over the stroke; When the command determination unit determines that the movement command is the first movement command, the error processing unit does not perform the error processing when the movement unit moves from outside the stroke in response to the movement command. A control device comprising:
2. a setting unit that sets whether or not to permit the moving unit to move from outside the stroke in response to the first movement command, The control device according to claim 1, characterized in that when the setting unit sets that the moving unit is permitted to move from outside the stroke in response to the first movement command and the command judgment unit judges that the movement command is the first movement command, the error processing unit does not perform the error processing when the moving unit moves from outside the stroke in response to the movement command.
3. the movement control unit controls the movement of the moving unit, which moves relative to the holding unit in an X-axis direction, a Y-axis direction, and a Z-axis direction that are perpendicular to each other, based on the movement command; the stroke includes an X-axis stroke corresponding to the X-axis direction, a Y-axis stroke corresponding to the Y-axis direction, and a Z-axis stroke corresponding to the Z-axis direction, 3. The control device according to claim 2, wherein the setting unit sets, for each of the X-axis stroke, the Y-axis stroke, and the Z-axis stroke, whether or not to permit the moving unit to move from outside the stroke in response to the first movement command.
4. The moving unit is capable of mounting a tool, The machine tool includes an automatic tool changer capable of replacing the tool attached to the moving unit with another tool in a tool change operation area, 4. The control device according to claim 1, wherein the tool changing operation area is located outside the stroke.
5. A control method for a machine tool including a holding unit for holding a workpiece and a moving unit that moves relative to the holding unit, the control method comprising the steps of: a movement control step of controlling the movement of the moving part based on a movement command defined by the machining program; a stroke determination step of determining whether the movement command results in a stroke over that causes the moving unit to move outside a predetermined stroke relative to the holding unit; an error processing step for performing a predetermined error processing when a result of the determination in the stroke determination step is the stroke over; a command determining step of determining whether the movement command is a first movement command that is the first movement command among one or more movement commands defined by the machining program; Equipped with the stroke determination step determines whether or not a movement start position of the moving part, a movement end position of the moving part, and an intermediate position of the moving part from the movement start position to the movement end position are within the stroke, thereby determining whether or not the movement command is over the stroke; The error processing step is a step of not performing the error processing when the command determination step determines that the movement command is the first movement command and the moving unit moves from outside the stroke in response to the movement command. A control method comprising:
6. A computer of a control device that controls a machine tool including a holding unit that holds a workpiece and a moving unit that moves relative to the holding unit based on a machining program, A movement control process that controls the movement of the moving part based on a movement command defined by the machining program; a stroke determination process for determining whether or not the movement command results in a stroke over that causes the moving unit to move outside a predetermined stroke relative to the holding unit; a predetermined error process to be performed when the stroke determination process results in the stroke being over; a command determination process for determining whether the movement command is a first movement command that is the first movement command among one or more movement commands defined by the machining program; A control program for executing the stroke determination process determines whether or not a movement start position of the moving part, a movement end position of the moving part, and an intermediate position of the moving part from the movement start position to the movement end position are within the stroke, thereby determining whether or not the movement command is over the stroke; The control program causes the computer to When the command determination process determines that the movement command is the first movement command, the error process is not executed when the moving unit moves from outside the stroke in response to the movement command. A control program comprising:
7. A storage medium storing the control program according to claim 6.
Citation Information
Patent Citations
Numerical value control system
JP1981024608A
Heat treatment for workpiece
JP1984047322A
Numerical controlling system
JP1985230205A
Method for changing stroke limit
JP1987063042A
Interference detecting method for stroke
JP1995001283A
