Control unit for a machine tool
The control device for a machine tool temporarily stops the feed mechanism near changed sections to prevent tool interference and maintain accuracy, addressing the issue of incorrect changes in set values or codes in conventional controllers.
Patent Information
- Application Number
- DE102011089791
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2011-01-12
- Filing Date
- 2011-12-23
- Publication Date
- 2025-01-09
- Estimated Expiration
- 2031-12-23
AI Technical Summary
Conventional machine tool controllers risk reducing machining accuracy due to incorrect or inapplicable changes in set values, parameters, or codes, leading to tool interference with the workpiece or structure and decreased machining precision.
A control device for a machine tool that includes a program storage section, parameter storage section, program analysis section, execution control section, and data changing section, which temporarily stops the feed mechanism before or after executing operation commands near changed sections to prevent tool interference and maintain accuracy.
Ensures safe machining of workpieces without reducing accuracy by temporarily stopping the feed mechanism near changed sections, allowing users to review and correct errors, thereby preventing tool interference and maintaining machining precision.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical area
[0001] The present invention relates to a control device for a machine tool for controlling a feed mechanism that moves a tool and a workpiece relative to each other. More specifically, the present invention relates to a control device for a machine tool that is configured to edit an NC program and a parameter. Background of the invention
[0002] As a conventional control device for a machine tool, for example, the control device in Japanese Unexamined Patent Application Laid-Open No. 7-227739 is known.This controller has a program storage section in which an NC program is stored, an override switch for changing, when the NC program stored in the program storage section is executed, a feed rate and a rotational speed of the spindle instructed in the NC program, a correction value storage section in which a correction value of the override switch is stored, a machining section that machines the NC program stored in the program storage section based on the correction value stored in the correction value storage section, and thus changes a feed rate and a rotational speed of the spindle instructed in the NC program into the feed rate and the rotational speed of the spindle corresponding to the correction values.
[0003] In this controller, when the offset switch is operated during the execution of the NC program, the then-current offset value is stored in the offset value storage section, and a command value (a feed rate or a spindle speed) in the NC program is changed to the command value corresponding to the offset value.
[0004] In addition to this control device, furthermore, in a control device having a machining function in which data is directly input by a user, a command value and a code such as a feed rate, a spindle speed and a shift position are changed, and a parameter such as the amount of tool offset and the amount of zero point offset of the workpiece is changed. Summary of the inventionTechnical problem
[0005] However, with the above-mentioned conventional controller, for example, there is a concern that when a setpoint, parameter, or code is changed, it will be changed to an incorrect or inapplicable value or an incorrect code due to a change error. When an NC program containing an incorrect or inapplicable value or an incorrect code is executed, a problem occurs that a tool interferes with a workpiece or the structure of the machining tool, and a problem that the machining accuracy of the workpiece is reduced.
[0006] The present invention has been achieved in view of the above-described circumstances, and an object thereof is to provide a control apparatus for a machine tool which is capable of machining a workpiece with certainty without lowering the machining accuracy once an NC program including a changed command value, parameter or code is executed. Solution to the problem
[0007] The present invention for achieving the above-described object relates to a control device for a machine tool which controls a feeding mechanism which moves a tool and a workpiece relative to each other, comprising: a program storage section in which an NC program is stored; a parameter storage section in which parameters for codes that configure the NC program are stored; a program analyzing section for analyzing the NC program stored in the program storage section, data block by data block in order, and extracting operation commands for the feeding mechanism; an execution control section for executing, on the basis of the operation instructions extracted by the program analysis section in sequence and the parameters stored in the parameter storage section, the operation instructions and thus controlling the feeding mechanism; and a data changing section for changing at least one of the NC program stored in the program storage section and the parameters stored in the parameter storage section, characterized in that the control device further has a change information storage section in which change information is stored which relates to a changed section which has been changed by the data change section; the execution control section is arranged to check, when executing the operation instructions extracted by the program analysis section, on the basis of the change information stored in the change information storage section, whether the data block of each operation instruction is the data block immediately preceding a data block relating to the changed section, and, if it is decided that this is the immediately preceding data block, then it temporarily stops the operation of the feed mechanism before or after the execution of the operation instruction; a stop data block storage section (18) in which a stop data block, that is, a data block for temporarily stopping the operation of the feeding mechanism, is stored, and a data block analysis section (17) which analyzes the data block immediately preceding a data block relating to a data block of the changed section on the basis of the NC program stored in the program storage section and the change information stored in the change information storage section, and checks whether the immediately preceding data block relates to a cutting command, and if it is decided that it does not relate to a cutting command, then stores the immediately preceding data block as the stop data block in the stop data block storage section, and if it is decided,that it refers to a cutting instruction, then analyses the data block before the immediately preceding data block, detects a data block which does not refer to a cutting data block and is closest to the data block which refers to the changed section, and stores the detected data block as a stop data block in the stop data block storage section; and, the execution control section is arranged to, when executing the operation instructions extracted by the program analysis section, check whether the data block of each operation instruction is the stop data block based on the stop data block stored in the stop data block storage section, and if it is decided that it is the stop data block, temporarily stop the operation of the feeding mechanism before or after executing the operation instruction.
[0008] According to the invention, when an NC program stored in the program storage section or a parameter stored in the parameter storage section is changed by the data change section, change information related to the changed section is stored in the change information storage section. Note that, as the parameter, for example, an offset amount (tool offset) used for tool length compensation, tool radius offset, tool origin offset, tool wear compensation, and the offset amount of the workpiece origin can be specified.
[0009] Thereafter, when the NC program stored in the program storage section is executed, the program analysis section analyzes the NC program data block by data block in sequence and extracts operation commands for the feeding mechanism, and the execution control section executes the operation commands in sequence based on the extracted operation commands and the parameters stored in the parameter storage section, thus controlling the feeding mechanism.
[0010] At this time, in the execution control section, when the executed operation instructions are executed, a check is made based on the change information stored in the change information storage section as to whether the data block of each operation instruction is the data block immediately preceding a data block relating to the changed portion, and if it is the immediately preceding data block, then the operation of the feed mechanism is temporarily stopped before or after the execution of the operation instruction.
[0011] Note that, as the mode of re-actuating the feeding mechanism after the temporary stop, for example, a mode may be specified in which machining is restarted after a machining restart signal inputted by a user is received by the control section for execution.
[0012] According to the control device for a machine tool of the present invention, since the operation of the feed mechanism is temporarily stopped before or after the operation command of the data block immediately preceding a data block related to the changed portion is executed in a case where an NC program or a parameter has been changed, it is possible to prompt the user to check the changed portion. Even if a set value, parameter, or code is changed to an incorrect or inapplicable value or to an incorrect code due to an error in the change, it is possible to prompt the user to take note of this.Therefore, it is possible to prevent the occurrence of a problem that the tool interferes with the workpiece or a structure of the machining tool, and a problem that the machining accuracy of the workpiece is reduced.
[0013] When the change information is stored in the change information storage section, the data block analysis section analyzes the data block immediately preceding a data block relating to the changed section on the basis of the change information and the NC program stored in the program storage section, and thus checks whether the immediately preceding data block relates to a cutting command.If it does not relate to a cutting instruction, then the immediately preceding data block is stored in the stop data block storage section as a stop data block, and if it relates to a cutting instruction, then the data block before the immediately preceding data block is analyzed and a data block is detected which does not relate to a cutting instruction and is closest to the data block which relates to the changed section, and the detected data block is stored in the stop data block storage section as a stop data block.
[0014] In the execution control section, when the extracted operation instructions are executed, a check is performed based on the stop data block stored in the stop data block storage section to determine whether the data block of the operation instruction is the stop data block. If it is the stop data block, the operation of the feed mechanism is temporarily stopped before or after the execution of the operation instruction.
[0015] In this way, a data block that does not relate to a machining command is designated as a stop data block. Therefore, it is possible to prevent the relative movement of the tool and workpiece from being temporarily stopped during machining, and thus prevent the machining accuracy of the workpiece from being reduced by stopping the movement of the tool and workpiece during machining.
[0016] Furthermore, a configuration is possible in which: the control device has a history information storage section in which history information is stored relating to the NC program stored in the program storage section, the history information including information on whether the NC program has been executed after changing at least one of the NC program and the parameters, and a history information management section which monitors the processing in the execution control section and the data change section, and when an NC program which has not been executed after being changed is executed after the change by the execution control section, then it adjusts the execution state of the NC program stored in the history information storage section to "Executed",and when at least one of an NC program and a parameter is changed by the data changing section, it adjusts the execution state of the corresponding NC program stored in the history information storage section to "Not Executed"; and the execution control section is configured to, when the operation commands extracted by the program analysis section are executed, check, based on the history information stored in the history information storage section, whether the executed NC program was executed after the change, and if it is determined that it was not executed after the change, temporarily stop the operation of the feed mechanism before or after executing the operation command of a predetermined data block.
[0017] In this case, when an NC program which has not been executed after the change is executed by the execution control section, the execution state of the NC program stored in the history information storage section is adjusted to "Executed" by the history information management section, and when at least one of an NC program and a parameter is changed by the data change section, the execution state of the corresponding NC program stored in the history information storage section is adjusted to "Not Executed" by the history information management section.
[0018] Furthermore, in the execution control section, when the extracted operation commands are executed, a check is made as to whether the executed NC program has been executed after being changed based on the history information stored in the history information storage section, and if it has not been executed after being changed, then the operation of the feeding mechanism is temporarily stopped before or after the execution of the operation command of a predetermined data block.
[0019] As described above, it is possible to temporarily pause machining before a data block related to the changed section only at the time of execution after changing the NC program or a parameter, and not temporarily pause machining during the second and subsequent executions. Therefore, it is possible to avoid temporarily pausing machining for each execution immediately before a data block related to the changed section, which would result in inefficient machining of the workpiece.
[0020] Furthermore, a configuration is possible in which: the control device has a display means, and a control section for displaying on the display means the NC program executed by the control section for execution; and the control section for displaying, when displaying the NC program executed by the control section for execution, the changed section displays in a manner different from the manner of displaying other sections, on the basis of the Change information stored in the change information storage section.
[0021] In this case, since when the NC program executed by the execution control section is displayed on the display means of the display control section, the changed section is displayed in a manner different from the display manner of other sections based on the change information stored in the change information storage section, the user can easily recognize the changed section. Note that for the different manner, for example, displaying a data block related to the changed section in a flashing manner, displaying it in a different color, or displaying it inversely may be specified. Advantageous effects of the invention
[0022] As described above, according to the control apparatus for a machine tool of the present invention, since when an NC program or a parameter is changed, the operation of the feed mechanism is temporarily stopped immediately before a data block related to the changed area, thus causing the user to pay attention, it is possible to machine a workpiece with certainty without lowering the machining accuracy. Short character description Fig. 1 is a block diagram showing a schematic configuration of a control device for a machine tool and other components in accordance with an embodiment of the present invention; Fig. 2 is a pictorial representation showing an example of changing an NC program; Fig. 3 is a pictorial representation showing an example of changing a parameter; Fig. 4 is a flowchart showing a sequence of process steps in a data block analysis section of the embodiment; Fig. 5 is a data table showing history information stored in a history information storage section of the embodiment; Fig. 6 is a flowchart showing a sequence of process steps in a control section for carrying out the embodiment; Fig. 7 is a flowchart showing a sequence of process steps in the control section for carrying out the embodiment; Fig. 8 is a pictorial view showing a part of an image displayed by a display control section of the embodiment; Fig. 9 is a block diagram showing a schematic configuration of a control device for a machine tool and other components according to another embodiment of the present invention; and Fig. 10 is a flowchart showing a sequence of process steps in a control section for carrying out the further embodiment of the present invention. Description of embodiments
[0023] In the following, specific embodiments of the present invention will be described based on the accompanying drawings.
[0024] As in Fig. 1, a control device 1 of the embodiment has a program storage section 11, a parameter storage section 12, a program processing section 13, a parameter processing section 14, a change information storage section 15, a program analysis section 16, a data block analysis section 17, a stop data block storage section 18, a history information storage section 19, a history information management section 20, an execution control section 21, a display control section 22, a display device with a screen 23, an input device (not shown) and other components, and is provided on a machine tool 5 which is provided with a feed mechanism 6 for relatively moving a tool and a workpiece in three orthogonal directions, the X-axis directions,the Y-axis and the Z-axis, and a spindle device for holding the tool or the workpiece and for rotating the held tool or the workpiece about its axis by means of a spindle motor 7.,
[0025] An NC program is stored in the program storage section 11, and parameters for codes that configure an NC program are stored in the parameter storage section 12. Note that, as specific examples of the parameters, for example, an offset amount (tool offset) used for tool length compensation, a tool radius offset, a tool zero point offset, and a tool wear compensation, and the offset amount of the workpiece origin can be given.
[0026] The program editing section (data modification section) 13 modifies the NC program stored in the program storage section 11 based on data input using the input device (not shown). Specifically, the program editing section 13 modifies a command value, such as a feed rate, a spindle speed, and a shift position, and a code. Fig. 2, the commanded position in the X-axis direction is changed from -95 to -96 in each of data block 15, data block 17, and data block 19.
[0027] The parameter editing section (data changing section) 14 changes the parameters stored in the parameter storage section 12 based on data input using the input device (not shown). Fig. In the example shown in Figure 3, for a tool length compensation parameter in data block 13, the value of the “Shape” element is changed from 10,500 to 10,200, and the value of the “Wear” element is changed from 1,230 to 1,120.
[0028] In the change information storage section 15, change information relating to a changed section in the NC program changed by the program editing section 13 and change information relating to a changed section in the parameters changed by the parameter editing section 14 are stored. The change information includes, for example, information on a data block relating to the changed section, data before change, data after change, and the like. Note that for a changed section in the parameters, a data block relating to the changed section means a data block including a code (command) relating to the changed section in the parameters.
[0029] The program analysis section 16 analyzes the NC program stored in the program storage section 11, data block by data block, and extracts operation commands for the feed mechanism 6 and the spindle motor 7. As the operation command for the feed mechanism 6, commands relating to the feed rates of the tool and workpiece, the tool shift position, and the workpiece shift position can be specified. As the operation command for the spindle motor 7, commands relating to the spindle speed, the start of spindle rotation, and the stop of spindle rotation can be specified.
[0030] The data block analysis section 17 analyzes the data block preceding a data block relating to the changed section on the basis of the NC program stored in the program storage section 11 and the change information stored in the change information storage section 15, detects a stop data block which is a data block for temporarily stopping the operation of the feed mechanism 6 and the spindle motor 7, and stores the detected stop data block in the stop data block storage section 18. It should be noted that in the stop data block storage section 18, a stop data block for an NC program stored in the program storage section 11 and having a changed section which was changed by the program editing section 13 or the parameter editing section 14.
[0031] In particular, the analysis section for a data block 17 is arranged to carry out a sequence of process steps as in Fig. 4. First, the data block analysis section 17 detects a changed NC program stored in the program storage section 11 (step S1), detects the change information stored in the change information storage section 15 (step S2), and sets the data block immediately preceding the data block relating to the changed section as a stop data block (step S3). In the Fig. 2, data block 14, data block 16 and data block 18 are each defined as a stop data block, and in the example shown in Fig. In the example shown in Figure 3, data block 12 is defined as a stop data block.
[0032] Next, the specified stop data block is analyzed, and a check is performed to determine whether the stop data block refers to a cutting command (step S4). Whether or not it refers to a cutting command can be determined by determining whether it is a data block in which a cutting code is valid.
[0033] If a decision is made that the stop data block refers to a cutting command, then the stop data block is reset to the data block immediately preceding the stop data block set in step S3 (step S5), and the reset stop data block is analyzed and checked to determine whether it refers to a cutting command (step S4). In this way, the process steps in steps S4 and S5 are repeated until a stop data block is found that does not refer to a cutting command. Fig. In the example shown in Figure 2, data block 13 and data block 17 are each recognized as a stop data block which does not refer to a machining command, since data block 14 and data block 18 each refer to a machining command.
[0034] If a stop data block is detected which does not relate to a cutting command (step S4), then the stop data block which was set in step S3 or the stop data block which was reset in step S5 is stored in the stop data block storage section 18 (step S6), and the sequence of process steps is ended. Fig. 2, the data block 13, the data block 16 and the data block 17 are stored in the stop data block storage section 18 as the stop data blocks and, in the example shown in Fig. 3, data block 12 is stored in the stop data block storage section 18 as a stop data block.
[0035] In the history information storage section 19, history information relating to NC programs stored in the program storage section 11 is stored. As shown in Fig. 5, the history information includes information about the program name, whether at least either the NC program or the parameters have been changed (whether the NC program has any changed section), and, if at least either the NC program or the parameters have been changed, whether the NC program was executed after the change, and this information is related to each other. It should be noted that the program name is a number of a program, as in Fig. 5, or can be another file name.
[0036] The history information management section 20 monitors the processing in the program editing section 13, the parameter editing section 14, and the execution control section 21. Once all of the data blocks of an NC program that has not been executed after the change are executed by the execution control section 21, the execution state of the NC program stored in the history information storage section 19 is adjusted to "Executed."When an NC program stored in the program storage section 11 is modified by the program editing section 13, or a parameter stored in the parameter storage section 12 is modified by the parameter editing section 14, the execution status of the corresponding NC program stored in the history information storage section 19 is adjusted to "Not Executed." Furthermore, when a new NC program is stored in the program storage section 11, the history information management section 20 generates history information related to the new NC program and stores the information in the history information storage section 19.
[0037] The execution control section 21 executes the operation commands sequentially extracted by the program analysis section 16 and the parameters stored in the parameter storage section 12, and thus controls the feed mechanism 6 and the spindle motor 7.
[0038] In particular, the control section for execution 21 is arranged to carry out a sequence of method steps as in Fig. 6 and Fig. 7. First, the execution control section 21 recognizes the history information stored in the history information storage section 19 (step S11) and checks, based on the recognized history information, whether an NC program to be executed has a changed section (step S12). If it is decided that the NC program to be executed has any changed section (for example, in Fig. 5, if the program name of the NC program to be executed is O0001, O0003 or O0004), the execution control section 21 also checks whether the NC program to be executed has been executed after the change (step S13).
[0039] If a decision is made that the NC program has been executed after modification (for example, in Fig. 5, if the program name of the NC program is O0001 or O0004), and if a decision was made in step S12 that the NC program does not have a changed section (for example, in Fig. 5, when the program name of the NC program is O0002 or O0005), the execution control section 21 sets a counter n to n=1 (step S14), receives the operation command of the nth data block from the program analysis section 16 (step S15), and executes the received operation command (step S16). Thereafter, a check is performed to determine whether the operation commands of all the data blocks of the NC program have been executed (step S17). After the operation commands of all the data blocks are executed while the counter n is adjusted (steps S17, S18), the sequence of processing steps is terminated.
[0040] On the other hand, if a decision is made in step S13 that the NC program has not been executed after the change (for example, in Fig. 5, when the program name of the NC program is O0003), the execution control section 21 detects the stop data block stored in the stop data block storage section 18 (step S19), sets the counter n to n=1 (step S20), receives the operation command of the n-th data block from the program analysis section 16 (step S21), and checks whether the n-th data block is the stop data block based on the detected stop data block (step S22).
[0041] If it is decided that the n-th data block is the stop data block, the execution control section 21 executes the received operation command (step S23), and then issues a stop command and temporarily stops the operation of the feed mechanism 6 and the spindle motor 7 (step S24). Fig. 2, for example, the operation of the feed mechanism 6 and the spindle motor 7 is temporarily stopped after the operation command of data block 13 is executed, after the operation command of data block 16 is executed and after the operation command of data block 17 is executed, and in the Fig. In the example shown in Figure 3, the operation of the feed mechanism 6 and the spindle motor 7 is temporarily stopped after the operation command of data block 12 is executed.
[0042] Thereafter, a signal for restarting machining is input by the user using the input device (not shown), and this signal is received (step S25), and then processing proceeds to step S27. On the other hand, if a decision is made in step S22 that the nth data block is not the stop data block, the received operation command is executed (step S26), and processing proceeds to step S27.
[0043] In step S27, a check is performed to determine whether the operation commands of all data blocks of the NC program have been executed. After the operation commands of all data blocks of the NC program have been executed while the counter n is being adjusted (steps S27, S28), the sequence of process steps is terminated.
[0044] The display control section 22 displays an NC program executed by the execution control section 21 on the display device having a screen 23. Furthermore, when displaying an NC program, the display control section 22 displays a changed section in a manner different from the way other sections are displayed, based on the change information stored in the change information storage section 15.
[0045] At this point, an explanation is given using the Fig. 2 shown NC program is given as an example. As in Fig. For example, as shown in Figure 8, data block 15, data block 17, and data block 19, which are data blocks related to the modified section, are displayed in a flashing manner. Alternatively, data block 15, data block 17, and data block 19 can be displayed in a different color or can be displayed in reverse.
[0046] According to the control device 1 of the embodiment configured in this way, when an NC program stored in the program storage section 11 is changed by the program editing section 13, and when a parameter stored in the parameter storage section 12 is changed by the parameter editing section 14, change information related to the changed section is stored in the parameter storage section 12. Change information 15 is stored and the execution state of the corresponding NC program stored in the history information storage section 19 is adjusted to “Not Executed” by the history information management section 20.
[0047] Furthermore, data blocks before a data block relating to the changed section are analyzed by the data block analyzing section 17 on the basis of the NC program stored in the program storage section 11 and the change information stored in the change information storage section 15, and a data block which does not relate to a cutting command and which is closest to the data block relating to the changed section is stored in the stop data block storage section 18 as a stop data block.
[0048] Thereafter, the program analysis section 16 analyzes the NC program stored in the program storage section 11, data block by data block in sequence, and extracts operation commands for the feed mechanism 6 and the spindle motor 7, and the execution control section 21 executes the operation commands in sequence based on the extracted operation commands and the parameters stored in the parameter storage section 12, thereby controlling the feed mechanism 6 and the spindle motor 7.
[0049] At this time, in the execution control section 21, a decision is initially made as to whether the NC program to be executed has been executed after being modified based on the history information stored in the history information storage section 19. If a decision is made that the NC program has not been executed after being modified, the operation of the feed mechanism 6 and the spindle motor 7 is temporarily stopped after the operation command of the stop data block stored in the stop data block storage section 18 is executed.On the other hand, if the NC program has no changed portion, and even if the NC program has any changed portion, if a decision is made that the NC program has been executed after being changed, then the operation commands are executed in sequence without the operation of the feed mechanism 6 and the spindle motor 7, which are temporarily stopped.
[0050] Furthermore, the NC program executed by the execution control section 21 is displayed on the display device having a screen 23 by the display control section 22, and the changed section detected on the basis of the change information stored in the change information storage section 15 is displayed in a manner different from the manner of displaying other sections.
[0051] Note that once all the data blocks of an NC program that has not been executed after the change is executed by the execution control section 21, the execution state of the NC program stored in the history information storage section 19 is adjusted to "Executed" by the history information management section 20.
[0052] In this way, according to the control device 1 of the embodiment, when an NC program or a parameter is changed, the operation of the feed mechanism 6 and the spindle motor 7 are temporarily stopped after the operation command of the data block immediately preceding a data block related to the changed portion is executed. For this reason, it is possible to prompt the user to check the changed portion. Even if a set value, a parameter, or a code is changed to an incorrect or inapplicable value, or to an incorrect code due to an error in the change, it is possible to prompt the user to take note of this.For this reason, it is possible to prevent the occurrence of a problem that the tool interferes with a workpiece or a structure of the machining tool and a problem that the machining accuracy of the workpiece is reduced.
[0053] Furthermore, since the data block immediately preceding a data block relating to the changed portion relates to a cutting command, the operation of the feed mechanism 6 and the spindle motor 7 is temporarily stopped after a data block not relating to a cutting command and closest to the data block relating to the changed portion is executed, it is possible to prevent the relative movement of the tool and the workpiece to each other or to prevent the workpiece and the rotation of the spindle from being temporarily stopped during cutting, and therefore it can be avoided that the machining accuracy of the workpiece is reduced by stopping the movement of the tool and the workpiece or by stopping the rotation of the spindle during cutting.
[0054] Furthermore, since once all the data blocks of an NC program that has not been executed after being changed are executed by the execution control section 21, the execution state of the NC program stored in the history information storage section 19 is adjusted to "Executed" by the history information management section 20, it is possible to temporarily stop machining immediately before a data block only at the time of the first execution after changing the NC program or parameters related to the changed section, and not to temporarily stop machining at the times of the second or subsequent executions.For this reason, it is possible to prevent machining from being temporarily paused immediately before a data block related to the modified section during each execution, resulting in ineffective machining of the workpiece. In addition, since the execution state is adjusted after all the data blocks of the NC program have been executed, it is possible to prevent the execution state from being adjusted even if the execution of the NC program is interrupted, and the execution state is therefore adjusted at a stage where all the modified sections have not been executed.
[0055] Furthermore, since when an NC program executed by the execution control section 21 is displayed on the display device having a screen 23 by the display control section 22, the changed portion is displayed in a manner different from the manner of displaying other portions based on the change information stored in the change information storage section 15, the user can easily recognize the changed portion.
[0056] Thus, one embodiment of the present invention has been described. However, a specific embodiment in which the present invention can be implemented is not limited to this.
[0057] For example, the analysis section for a data block 17 and the storage section for a stop data block 18 of the control unit 1 in Fig. 1 are omitted, and a control unit 2 in which these are omitted has, as in Fig. 9, a program storage section 11, a parameter storage section 12, a program processing section 13, a parameter processing section 14, a change information storage section 15, a program analysis section 16, a history information storage section 19, a history information management section 20, and an execution control section 21', a display control section 22, a display device with a screen 23, and an input device (not shown). The control device 2 differs from the control device 1 in that the data block analysis section 17 and the stop data block storage section 18 are omitted in the control device 2, and in that the execution control section 21' is provided instead of the execution control section 21.
[0058] The execution control section 21' executes the operation commands based on the operation commands sequentially executed by the program analysis section 16, the parameters stored in the parameter storage section 12, and the change information stored in the change information storage section 15, and thus controls the feed mechanism 6 and the spindle motor 7.
[0059] In particular, the control section for execution 21' is arranged to carry out a sequence of method steps as in Fig. 6 and Fig. 10. Since the execution control section 21' performs similar processing to that of the execution control section 21 for steps S11 to S18, their description will be omitted, and step 31 and subsequent steps will be described below.
[0060] That is, if a decision is made in step S13 that the NC program to be executed has not been executed after being changed, the execution control section 21' recognizes the change information stored in the change information storage section 15 (step S31), sets a counter n to n=1 (step S32), receives the operation command of the n-th data block from the program analysis section 16 (step S33), and checks, based on the recognized change information, whether the n-th data block is the data block immediately preceding a data block relating to the changed section (step S34). In the Fig. In the example shown in Figure 2, for example, a check is carried out to determine whether the n-th data block corresponds to data block 14, data block 16 or data block 18, and in the Fig.In the example shown in Figure 3, a check is carried out to determine whether the nth data block corresponds to data block 12.
[0061] If it is decided that the n-th data block is the immediately preceding data block, the received operation command is executed (step S35), and then a stop command is issued, and the operation of the feed mechanism 6 and the spindle motor 7 is temporarily stopped (step S36). Thereafter, a machining restart signal input by the user using the input device (not shown) is received (step S37), and processing proceeds to step S39. On the other hand, if it is decided in step S34 that the n-th data block is not the immediately preceding data block, the received operation command is executed (step S38), and processing proceeds to step S39.
[0062] In step S39, a check is performed to determine whether the operation commands of all data blocks of the NC program have been executed. After the operation commands of all data blocks of the NC program have been executed while the counter n is being adjusted (steps S39, S40), the sequence of process steps is terminated.
[0063] When the controller 2 is configured in this manner, since the operation of the feed mechanism 6 and the spindle motor 7 are temporarily stopped after the operation command of the data block immediately preceding a data block relating to a changed portion of the NC program or a changed portion of a parameter is executed, then an effect similar to that of the above controller 1 can also be obtained.
[0064] Furthermore, although the control devices 1, 2 are configured to temporarily stop the operation of the feed mechanism 6 and the spindle motor 7 after executing the operation command of a predetermined data block, there is no limitation, and a configuration is possible in which the operation of the feed mechanism 6 and the spindle motor 7 is temporarily stopped before the operation command of a predetermined data block is executed, and after the machining restart signal is received, the machining is restarted and the operation command of the predetermined data block is executed. List of reference symbols 1 control unit for a machine tool 5 Machine tool 6 Feeding mechanism 11 Memory section for a program 12 Memory section for parameters 13 Section for program editing 14 Parameter editing section 15 Storage section for change information 17 Analysis section for a data block 21 Control section for execution
Claims
[1] Control device (1; 2) for a machine tool (5) which controls a feeding mechanism (6) which moves a tool and a workpiece relatively, comprising: a program storage section (11) in which an NC program is stored; a parameter storage section (12) in which parameters for codes that configure the NC program are stored; a program analysis section (16) for analyzing the NC program stored in the program storage section (11) data block by data block in order and extracting operation commands for the feed mechanism (6); an execution control section (21) for executing, on the basis of the operation instructions extracted in sequence by the program analysis section (16) and the parameters stored in the parameter storage section (12), the operation instructions and thus controlling the feeding mechanism (6); and a data changing section (13, 14) for changing at least one of the NC program stored in the program storage section (11) and the parameters stored in the parameter storage section (12), characterized by , that the control device (1; 2) further comprises a change information storage section (15) in which change information is stored relating to a changed section changed by the data change section (13, 14); the execution control section is configured to check, upon executing the operation instructions extracted by the program analysis section (16), on the basis of the change information stored in the change information storage section (15), whether the data block of each operation instruction is the data block immediately preceding a data block relating to the changed section, and, if it is decided that it is the immediately preceding data block,then temporarily stop the operation of the feeding mechanism (6) before or after the execution of the operation command; a stop data block storage section (18) in which a stop data block, that is, a data block for temporarily stopping the operation of the feeding mechanism (6), is stored, and a data block analysis section (17) which analyzes the data block immediately preceding a data block relating to a data block of the changed section on the basis of the NC program stored in the program storage section (11) and the change information stored in the change information storage section (15), and checks whether the immediately preceding data block relates to a cutting command, and if it is decided that it does not relate to a cutting command,then stores the immediately preceding data block as the stop data block in the stop data block storage section (18), and if it is decided that it relates to a cutting instruction, then analyzes the data block before the immediately preceding data block, detects a data block which does not relate to a cutting data block and is closest to the data block which relates to the changed section, and stores the detected data block as a stop data block in the stop data block storage section (18); and, the execution control section is arranged to, when executing the operation instructions extracted by the program analysis section (16), check whether the data block of each operation instruction is the stop data block based on the stop data block stored in the stop data block storage section (18), and if it is decided that it is the stop data block, temporarily stop the operation of the feeding mechanism (6) before or after executing the operation instruction. [2] Control device (1; 2) for a machine tool (5) according to claim 1, characterized bythat the control device (1; 2) has a history information storage section (19) in which history information is stored relating to the NC program stored in the program storage section (11), the history information including information on whether the NC program has been executed after changing at least one of the NC program and the parameters, and a history information management section (20) which monitors the processing in the execution control section and the data change section (13, 14), and when an NC program which has not been executed after the change is executed by the execution control section, then it adjusts the execution state of the NC program stored in the history information storage section (19) to "Executed",and when at least one of the NC program and the parameters is changed by the data changing section (13, 14), it adjusts the execution state of the corresponding NC program stored in the history information storage section (19) to "Not Executed"; and, the execution control section is arranged to, when the operation commands extracted by the program analysis section (16) are executed, check whether the executed NC program has been executed after being changed based on the history information stored in the history information storage section (19), and if it is decided that it has not been executed after being changed, then temporarily stop the operation of the feed mechanism (6) before or after executing the operation command of a predetermined data block. [3] Control device (1; 2) for a machine tool (5) according to claim 1 or 2, characterized by , that the control device (1; 2) has a screen means (23), and a control section for displaying (22) for displaying the NC program executed by the control section for execution on the screen means (23), and the display control section (22), when displaying the NC program executed by the execution control section, displays the changed section in a manner different from the manner of displaying other sections, based on the change information stored in the change information storage section (15).
Citation Information
Patent Citations
Numerical control device
JP1995227739A
Controller and control method
JP2002091521A
Method and device for checking machining program of NC machine tool, as well as NC machine tool equipped therewith
JP2003271215A
JP000H07227739A
JP002002091521A