Tool specifying method and apparatus for an NC automatic programming system

Abstract: In an NC automatic programming system for defining the process and equipment for machining a workpiece, a method and apparatus for automatically selecting a tool out of a plurality of available tools for machining the workpiece. The data defining the tools and data defining the criteria for selecting the most appropriate tool on the basis of machining mode are entered and stored. On the basis of the entered data, the available tools are arranged automatically according to preference for the desired machining. The recommended tool may be accepted or another of the recommended tools may be selected at operator discretion and based on operator experience.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tool specifying method in an NC automatic programming system. 2. Description of the Background Art When a machining program or the like is defined in an NC automatic programming system employing an automatic programming unit, a CNC unit, etc., the particular tool to be used may be specified according to each machining process in the machining program. It is known in the art that a particular tool to be used may be specified in a program by entering a corresponding tool management number. That number is selected from plural specific tool management numbers, each corresponding to a respective tool and each having been set and stored beforehand in the system. To specify a tool in this method, it is necessary for an operator to understand the relationships between the tools and corresponding tool management numbers in advance. When a large number of tools are handled, however, it is virtually impossible for an operator to memorize such correspondences. Accordingly, the operator identifies the tool management numbers corresponding to the tools to be used by referring to a prepared correspondence chart or the like indicating the relationships between the tools and tool management numbers. However, this method consumes much time and labor to retrieve the required tool management number and may result in specifying an incorrect tool due to misreading of the chart. To solve such disadvantages, a tool specifying method as disclosed in Japanese Patent Disclosure Publication No. 83106 of 1991 has been devised, in which a pre-defined tool management name consisting of a tool name, a nominal diameter, etc. is entered to specify a tool. The art disclosed in Japanese Patent Disclosure Publication No. 83106 of 1991 will now be described. Fig. 22 is a block diagram showing the major components of an NC automatic programming unit serving as an automatic programming system. The numeral 1A indicates a processor (hereinafter referred to as the "CPU"), 2A a ROM storing a control program for controlling said automatic programming unit, 3A a RAM acting as storing means for storing various programs and data loaded from a floppy disk FL, the operation processing results of the CPU 1A, etc., 4A an NC data memory for storing NC data created, 5A a keyboard, 6A a disk controller, and 7A a CRT device serving as an interactive visual display. Elements 1A to 7A are connected by a bus line 8A. The keyboard 5A serving as data entry means is provided with alphanumeric keys, an execute key, cursor moving keys, etc. The CRT display device 7A may have a plurality of soft keys 9a to 9e (Fig. 20) and menu keys (not shown), which constitute part of the data entry means and are disposed along the bottom of the display screen. Available as a floppy disk FL is a system disk having a preset storage area (hereinafter referred to as the "file") for correspondingly storing tools and tool identifying data, in addition to various programs required to create NC data, register tool data and specify tools. A tool specifying method in this example will now be described with reference to a flowchart in Fig. 18, illustrating the general processing of registering the tool data stored on the floppy disk FL acting as the system disk, and a flowchart illustrating general tool specifying processing in Fig. 19. The operator first powers up the NC automatic programming unit, sets the floppy disk FL into the disk controller 6A, and loads various programs and data stored on the floppy disk FL into the RAM 3A in accordance with the processing of the CPU 1A driven on the basis of the control program stored in the ROM 3A. The CPU 1A then displays options, which represent processings corresponding to various programs loaded into the RAM 3A, on the CRT display device 7A in an interactive mode, and waits for the operator to select any option by depressing a corresponding menu key. The operator depresses the desired menu key to select the option to be executed. When the option for "registering tool data" has been selected, the CPU 1A switches the display of the CRT display device 7A to a tool data setting screen, initiates the tool data registering processing, and waits for data input. Fig. 20 is a schematic diagram showing the tool data setting screen. The operator hereafter enters various data representing tool attributes sequentially via the tool data setting screen serving as an interactive screen. The data that can be registered as data indicating the tool attributes includes: a tool management number, a nominal diameter, a tool name, a material, a T code (tool number), an H code (tool length offset number) and a D code (tool diameter offset number). In this example, the nominal diameter, tool name and material are necessary and sufficient as data specifying a tool. Character string data displaying the nominal diameter, tool name and material constitutes a "tool management name". As previously explained, the "tool management number" is data comprising a character string (numeral) corresponding one-for-one with each tool. Now, the operator first controls the cursor moving keys on the keyboard 5A to move a cursor 10A on the CRT display device 7A to the position ofa required item, and depresses the soft key 9a (INPUT key) to declare to the CPU 1A that the processing to be performed from now on is data input. Then, the operator sets character strings to each item by controlling the alphanumeric keys of the keyboard 5A. When the displayed string is found to be correct, the operator depresses the EXECUTE key to store the character strings into the RAM 3A on an item basis, thereby registering the character strings of the tool management number, nominal diameter, tool name, material, T code, H code and D code on a tool basis (Fig. 20). The data of each tool thus registered is finally stored into the file of the floppy disk FL via the disk controller 6A (for the above operation, refer to step S101A in Fig. 18). By specifying the processing to be executed by depressing any of the soft keys 9b to 9e with the tool data setting screen displayed, data can be inserted (key 9c), deleted (key 9d) or retrieved (key 9e). These functions are conventional and will not be described further. While the item equivalent to the soft key 9b is left blank in Fig. 20, it indicates that there is no item corresponding to the soft key 9b on this screen. The machining of a workpiece using desired tools is conducted on the basis of input NC data, under the control of a program that is assembled in blocks. To create the necessary NC data, the operator selects an "NC DATA CREATING" option from among the options displayed on the CRT display device 7A to activate a program for NC data creation and to load the file of the floppy disk FL into the RAM 3A. If a block, for which a tool to be used must be specified, has been appropriately programmed during the creation of NC data, the CPU 1A automatically responds to the programming and initiates a "tool specifying processing". When the tool specifying processing is initiated as seen in Fig. 19, the CPU 1A first displays a message (SPECIFY TOOL) prompting the operator to enter a tool management name or a tool management number on the CRT display device 7A and waits for the operator to select an input mode on the basis of the display in Fig. 21. By controlling the cursor moving keys of the keyboard 5A, the operator moves the cursor 10A on the CRT display device 7A, selects the specifying mode by means of said cursor 10A, then sets the character string for the selected TOOL MANAGEMENT NAME or TOOL MANAGEMENT NUMBER mode by controlling the alphanumeric keys of the keyboard 5A, and enters the character string by depressing the execute key, thereby temporarily storing it into the CPU 1A. Also, the CPU 1A stores which specifying mode, tool management name or tool management number, has been selected according to the position of the cursor 10A. This selection process is identified in step S201A of Fig. 19. The CPU 1A then judges whether the specifying mode is the TOOL MANAGEMENT NAME mode or not on the basis of the data stored (step S202A). If it is the TOOL MANAGEMENT NAME mode, the CPU 1A searches the file loaded into the RAM 3A on the basis of the character string representing the tool management name entered, i.e. nominal diameter, tool name and material (step S203A), and determines whether or not a tool management name matching the one entered exists in the file (step S204A). If the matching tool management name exists, the CPU 1A reads the tool management number corresponding to that tool management name from the file and writes and stores it into the currently created program (step 205A), then terminates the tool specifying processing and returns to the NC data creation processing. If it has been determined in the step S204A that the tool management name entered does not exist in the file, the CPU 1A judged it as a tool management name input error, shifts to step S206A, displays on the CRT display device 7A a message prompting the operator to re-enter the tool management name or tool management number, returns to the step S201A, and waits for the tool management name or tool management number to be re-entered. If it has been determined in the step S202A that the specifying mode does not use the tool management name, it means that the specifying mode is the TOOL MANAGEMENT NUMBER mode. Hence, the CPU 1A searches the file loaded in the RAM 3A on the basis of the tool number entered (step S207A) and determines whether a tool management number matching the one entered exists in the file (step S208A). If the matching tool management number exists, the CPU 1A writes and stores that number into the currently created program (step 205A), then terminates the tool specifying processing and returns to the NC data creation processing. If it has been determined in the step S208A that the tool management number matching the one entered does not exist in the file, the CPU 1A judges it as a tool management number input error, shifts to step S209, displays on the CRT display device 7A a message prompting the operator to re-enter the tool management name or tool management number, returns to the step S201A, and waits for the tool management name or tool management number to be re-entered. In such a method, simple tool selection mistakes can be prevented. However as the number of tools employed increases, particularly where many tools of the same type exist, a tool list must be prepared and tools selected on the tool data screen. When the number of tools is large, it still takes a long time to select the most appropriate one from among the many available tools, as previously. In another conventional system, as disclosed in Japanese Patent Disclosure Publication No. 126303 of 1990, the disadvantage of a fully automatic tool selection system is discussed. In such fully automatic system, tool determination data is first gathered and a tool file containing tool groups organized on the basis of tool determination data is searched. The most appropriate tool group and the most appropriate tool in the group is selected automatically, without operator input. Recognizing that the operator may have substantial know how with regard to tool selection, the disclosed system adds to a fully automated mode an operator determination mode. Fig. 23, taken from the reference, illustrates the process used in the dual mode operation. First, a selection is made of a tool determination mode (step S1). If the automatic mode is selected, the tool is determined by gathering tool data (step S2), searching for a tool file on the basis of that data (step S3), extracting the most appropriate tool group from memory (step S4), determining the appropriate tool in the group (step S5) and displaying the tool (step S6). If the operator determination mode is selected, the tool determination data is collected from set machining information (step S7), the tool file including tool groups is searched for a corresponding tool group on the basis of tool determination data (step S8), a decision on the group mode (step S9) and the group is displayed (step S10). The operator refers to the displayed group und selects the most appropriate tool using the keyboard (step S11). The reference suggests that the data for the selected tool may be displayed (step S12) but does not teach the content of such data. This generic description of the operator selection process does not identify in detail (i) the quantity or identity of the tool selection criteria, (ii) how the tool selection criteria are identified or (iii) whether or how that process may be modified. Where the number of tools from which a selection is to be made becomes very large, the operator still is burdened by the need to select the most appropriate one from many tools. EP-A-0 229 848 discloses a display system for automatically displaying the profile of a tool. The displayed profile relates to a tool which is used when a workpiece is to be machined into a predetermined shape. The system comprises memory means storing tool data as well as control means for selecting an optimum tool depending upon specified machining data relating to a machining region and a machined profile of the workpiece. The tool profile display data are calculated on the basis of the data relating to the tool profile and mounting position contained in the memory storing the tool data. FR-A-2 523 329 discloses a method for controlling the selection of tools in a four axis NC controlled machine tool. According to this document a memory 12 contains a table of different types of tools which are used for particular machining modes. A memory 10 stores data defining the tools, positions of respective tools when mounted on a tool holder, and so on. Depending on the machining mode and the part to be machined during each machining phase the table storing different types of tools is read. The data defining the tools are used for determining the tools which can be used for each machining phase. From FR-A-2 522 567 it is known to store a program in the memory of a numerically controlled machine tool which specifies different machining models as well as tools used for the specific machining steps. EP-A-0 425 674 discloses an automatic tool selecting system. According to this system tools are read out from a tool file corresponding to an input shape to which a material is to be machined and moreover corresponding to cutting conditions regarding the nature of the material to be machined. An automatic tool selecting means calculates the machining time required with each tool, and the tool having the shortest machining time is selected. SUMMARY OF THE INVENTION It is, accordingly, an object of the present invention to overcome the disadvantages in the background art by providing a tool specifying method in an NC automatic programming system which can specify a tool to be used rapidly and properly. It is another object of the present invention to provide a tool determining method which selects the most appropriate tool for machining in sequence from among a plurality of tools. A criterion table is provided to set selection reference data for selecting tools appropriate for each machining, and a machining tool matching data in said criterion table is determined as the most appropriate tool. When the machining tool is selected, tools are displayed on the screen in the order from the most to least appropriate ones so that the operator is allowed to select the tool. Tools adequate for each machining are selected from among a plurality of tools and displayed on the screen in order of tool preferability, whereby the operator can select the most appropriate tool easily, rapidly and reliably. Thus, the objects are solved by a method according to claim 1 and an apparatus according to claim 7 and a system according to claim 14. The subclaims show further advantages of the invention. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram illustrating the major components of an NC automatic programming unit acting as an automatic programming system for carrying out a method of the present invention. Fig. 2 is a schematic diagram illustrating an operation board of the present invention. Fig. 3 is an external view of an offline type NC automatic programming system according to another preferred embodiment of the present invention. Fig. 4 is a schematic diagram illustrating a tool data setting screen of the present invention. Fig. 5 is a schematic diagram illustrating a setting table in a criterion data setting screen of the present invention. Fig. 6 provides an example of a machining drawing. Fig. 7 provides an example of a machining program. Fig. 8 provides a display example of tool data according to the present invention. Fig. 9 is a main tool selection block diagram according to the present invention. Fig. 10 is a flowchart illustrating tool selection processing according to the present invention. Fig. 11 is a flowchart illustrating tool determination processing according to the present invention. Fig. 12 illustrates processing for tool selection according to the present invention. Fig. 13 is a flowchart illustrating tool determination processing according to the present invention. Fig. 14 illustrates processing for tool determination according to the present invention. Fig. 15 is a schematic diagram illustrating a criterion data setting table according to another preferred embodiment of the present invention. Fig. 16 illustrates tool data display according to the present invention. Fig. 17 is a flowchart illustrating a general operating procedure according to the present invention. Fig. 18 is a flowchart illustrating conventional tool data registration processing. Fig. 19 is a flowchart illustrating conventional tool specifying processing. Fig. 20 is a schematic diagram illustrating an example of a conventional tool data setting screen. Fig. 21 is a schematic diagram illustrating an example of a display screen in the conventional tool specifying processing. Fig. 22 is a block diagram illustrating the main components of an NC automatic programming unit serving as an automatic programming system for executing a conventional method. Fig. 23 is a flowchart illustrating a conventional tool specifying processing using both automatic and operator selection of tools. DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to the appended drawings. Fig. 1 is a block diagram showing the main components of an NC automatic programming unit serving as an automatic programming system for executing the method of the present invention, wherein the numeral 1 indicates a processor (hereinafter referred to as the "CPU"), 2 a ROM storing a control program for controlling said automatic programming unit, 3 a RAM acting as storing means for storing various data, the operation processing results of the CPU 1, etc., 4 a keyboard, 5 a CRT display device serving as an interactive screen, 6 a machining program memory for storing NC machining programs created, 7 a tool data memory for storing the data of each tool, and 8 a criterion table memory for storing a criterion table which indicates the basis of selecting the most appropriate tool for each machining. Elements 1 to 8 are connected by a bus line 9. Fig. 2 illustrates an example of an operation board comprising the keyboard 4 and CRT display device 5. The keyboard 4, acting as data entry means, is provided with data setting keys 11 comprising numeric keys (0 to 9), cursor moving keys, an input key (INPUT), a clear key (CLEAR) and screen switching keys, and other various machine control keys 12. The CRT display device 5 has a plurality of menu keys 10 constituting part of the data entry means disposed along the bottom edge of the display screen. The NC automatic programming system contained in the numerical controller, which is indicated in the present embodiment as an example, may be replaced by an offline type NC automatic programming system installed separately from the numerical controller. The offline NC automatic programming system, comprising a keyboard 4 and a CRT display device 5 as shown in Fig. 3, has the same hardware configuration as generally available work stations or personal computers. In this case, the various machine control keys 12 shown in Fig. 2 are not needed because of an offline system, and the menu keys 10 may be substituted by the function keys on the keyboard 4. The tool specifying method in the present embodiment will now be described in accordance with a flowchart indicating a general operating procedure of the present invention in Fig. 17. The operator first powers up the NC automatic programming unit (step 400), and the CPU 1 displays options, which represent processings corresponding to various programs on the basis of the control program stored in the ROM 2, on the CRT display device 5 in an interactive mode (step 401), and waits for the operator to select any option by depressing the corresponding menu key 10. The operator depresses the required menu key 10 to select the option to be executed. If a menu for registering tool data is selected (step 402), the CPU 1 switches the display of the CRT display device 5 to a tool data setting screen and displays tool data on the screen (step 403). If it is desired to correct the tool data (step 411), the operator makes tool data correction (step 412). If the display or correction of the tool data is complete (step 413), the processing jumps to step 410. If the operator does not power down the unit in the step 410, the CPU 1 returns to the step 401 and displays the menu. Fig. 4 is a schematic diagram showing the tool data setting screen. Hereafter, the operator sequentially enters various data indicating tool attributes via the tool data setting screen serving as an interactive screen. Referring to Fig. 4: "T No." indicates a tool number. "SPARE" indicates a spare tool number and is used to specify which tool will replace a tool that has reached its life. "SHAPE" indicates a tool type and a machined portion. For turning, for instance, the tool type includes the following: GNL: general turning tool GRV: grooving tool THR: threading tool DRL: drilling tool TAP: tap SPT: special tool SENSOR: tactile sensor The machined portion includes the following: OUT: outside diameter machining IN: inside diameter machining FCE: end facing "NOSE R" indicates a tool nose radius or a tool diameter. "ROTATION/HAND" indicates the direction of rotation of a spindle and the right- or left-handedness of a tool, allowing any of the following options to be selected: 1: forward rotation/right hand 2: reverse rotation/right hand 3: forward rotation/left hand 4: reverse rotation/left hand "GROOVE DEPTH/ENTERING ANGLE" is used to specify the entering angle of a tool, or if a grooving tool is used, to specify the maximum grooving depth. "NOSE WIDTH/NOSE ANGLE" is used to specify the nose angle of a tool, or if a grooving tool is used, to specify the width of a tool nose. "CODE NAME" is used to specify the name of a tool. "HOLDER" is used to specify the type of a tool holder. "TOOL WIDTH" is used to specify the width of a tool. "TOOL LENGTH" is used to specify the length of a tool. 12 indicates a screen page when the tool data setting screen comprises a plurality of screens. The numeral 13 indicates a screen mode display representing that this screen is the tool setting screen. 14 indicates a menu display from which a required menu is selected by depressing the corresponding menu key 10. Now, the operator first moves a cursor 15 of the CRT display device 5 to the position of a required item by controlling the cursor moving keys of the keyboard 4, and enters the required data from the keys on the keyboard 4. The operator thus enters data on all tools loaded on the machine tool. Tool data 7a thus entered is all stored into the tool data memory 7 shown in Fig. 1. Once set, the tool data 7a need not be set unless any tool loaded on the machine tool is replaced. If a menu for registering criterion data is then selected (step 404), the CPU 1 switches the display of the CRT display device 5 to a criterion data setting screen and displays criterion data on the screen (step 405). If it is desired to correct the criterion data (step 414), the operator makes criterion data correction (step 415). If the display or correction of the criterion data is complete (step 416), the processing jumps to the step 410. Fig. 5 is a schematic diagram showing a setting table in the criterion data setting screen. Hereafter, the operator sequentially enters various data indicating the selection reference data of tools via the criterion data setting screen acting as an interactive screen. Referring to Fig. 5: "MACHINING MODE" indicates a machining type and a machined portion. For turning, for example, the machining type includes the following: BAR: bar work process CPY: copying process CNR: corner rounding process EDG: end facing process THR: threading process GRV: grooving process DRL: drilling process TAP: tapping process MES: measuring process The machined portion includes the following: OUT: outside diameter machining IN: inside diameter machining FCE: end facing "DIVISION" differentiates between roughing (R) and finishing (F). When there are roughing and finishing in the machining mode, criteria are set separately for roughing and finishing. "TOOL TYPE 1", "TOOL TYPE 2" and "TOOL TYPE 3" are used to specify the most appropriate tool types and machined portions in each machining mode. The tool types and machined portions are identical to those of "SHAPE" described in Fig. 4. Selection priority is given in order of tool types 1, 2 and 3. Ordinarily in one machining mode, only one tool type is appropriate for machining. However, if the tool type 1 does not exist and the tool type 2 or 3 may be used instead, the tool types 2 and 3 are specified. Where there are no replaceable tools, the tool types 2 and 3 are left blank. "CONDITION 1" to "CONDITION 6" are used to specify conditions to be satisfied by the tools to be selected for those specified in the tool types. Tool selection is made with priority given in order of conditions 1, 2, 3, 4, 5 and 6. Namely, tools satisfying the condition 2 are selected from among those satisfying the condition 1, and further tools satisfying the condition 3 are selected from such tools. Where there are fewer than six conditions to be set, any unset conditions are left blank. The conditions to be set are as follows: R: nose radius K: rotation/hand A: groove depth/entering angle B: nose width/nose angle H: holder W: tool width L: tool length These conditions are employed to specify which of the data shown in Fig. 4 is used to select the most appropriate tool. A value following any of R, K, A, B, H, W and L indicates a criterion. A condition of a:b indicates that a tool having a value within the range a to b is selected. When there are a plurality of tools that satisfy this condition, tool selection is performed in the order from a to b. The magnitude relationship of a and b may either be a>b or a<b. If a>b, the tools are selected in descending order, and if a<b, they are selected in ascending order, i.e. a is the most appropriate value and the permissible value is up to b. For example, R0.2:* indicates that the tool to be selected has the nose radius value of not less than 0.2mm and selection is made in order of tools whose nose radius value is closer to 0.2mm. "*" indicates the maximum value. Although the maximum value usually indicates the largest value among data set as the tool data, it should indicate the value of a groove width to be machined when "*" is specified in the nose width data of "B" in the grooving mode. Also, when "*" is specified in the tool width data of "W" in the drilling mode, the maximum value should indicate the value of a hole diameter to be drilled. In this manner, the value of "*" may be the maximum machinable value according to the machining mode. R*:0.2 indicates that the tool to be selected has the nose radius value of not less than 0.2mm and selection is made in order of tools whose nose radius values are larger. As described in the case of the tool data, the operator moves the cursor 15 to the position of a required item by controlling the cursor moving keys of the keyboard 4; and enters the required data from the keys on the keyboard 4. The criterion data thus entered is all stored into the criterion table memory 8 shown in Fig. 1. Once set, the criterion data need not be reset unless the criteria are changed. When creating an NC machining program, the operator selects an NC machining program creation menu from among the options displayed on the CRT display device 5 (step 406). The CPU 1 then switches the display of the CRT display device 5 to an NC machining program display screen and displays an NC machining program on the screen (step 407). If it is desired to correct the NC machining program, the operator makes NC machining program correction (step 418). If the display or correction of the machining program is complete (step 419), the processing jumps to the step 410. In creating or correcting the NC machining program, the operator enters the NC machining program on the basis of a machining drawing as shown in Fig. 6 via an NC machining program edit screen serving as an interactive screen (step 407). Fig. 7 shows a machining program thus entered on the basis of the machining drawing shown in Fig. 6. "P No." indicates a process number which is incremented in sequence, beginning with 0. The process number of "0" is used to specify the data of stock, and "MATERIAL" indicates the material of the stock, "OD" the maximum outside diameter of the stock, "ID" the minimum inside diameter of the stock, and "STOCK LENGTH" the overall length of the stock. The process numbers from "1" onward each indicate the machining processes and comprise one-line process data which defines each machining and multi-line sequence data (SEQ) which defines a machining shape. A tool used in the corresponding process is defined in the process data. "R TOOL" is employed to specify a tool used for roughing and "F TOOL" to specify a tool used for finishing. When the cursor 15 has reached a position requiring a tool to be specified, i.e. when the cursor 15 has come to the position of R TOOL (tool used for roughing) or F TOOL (tool used for finishing) in Fig. 7, during the creation of the NC machining program and the operator depresses the "TOOL SELECT" menu key (not shown) (step 408), automatic tool selection is performed and the tools appropriate for the machining are displayed on the CRT display device 5 as shown in Fig. 8 in the order in which they seem to be more appropriate (step 409). The tools are displayed on the screen in the order in which they seem to be more appropriate on the basis of the criteria. The top tool number in T No. is highlighted, indicating that it is the tool judged as the most appropriate for the corresponding machining. If the system-selected tool is satisfactory, the operator depress the "INPUT" key which means that the tool is acknowledged. This causes the highlighted tool to be entered as the "R TOOL" or "F TOOL" data. If the operator does not desire to select the most appropriate tool selected by the system, i.e. highlighted tool, the operator moves the cursor to the position of the tool desired to be highlighted by depressing the cursor moving keys, and depresses the "INPUT" key. This allows the tool other than the system-selected, most appropriate tool to be selected. Fig. 9 is a tool selection block diagram. To cause a tool to be automatically selected during the edition of an NC machining program 6, appropriate tools are determined in accordance with the tool data 7a and criterion table 8a and displayed on the screen in order of appropriateness, from which the operator is prompted to select. The processing wherein the operator makes tool selection will now be described with reference to a general tool selection flowchart shown in Fig. 10. The operator creates the NC machining program by entering the data of the NC machining program shown in Fig. 7 from the keys on the keyboard 4 on the basis of the machining drawing shown in Fig. 6. At this time, the cursor is displayed (not shown) at a data input position on the CRT display device 5. When this cursor is at a tool data setting position (i.e. "R TOOL" or "F TOOL" position in Fig. 7) (step 101), depressing the "TOOL SELECT" menu key (step 102) causes automatic tool determination to be started (step 103). The tool determination method will be detailed later. If the tool number to be specified is known beforehand, that tool number (T No.) may be directly entered and set as data from the keyboard 4. In this case, the automatic tool determination is not carried out. When the automatic tool determination is complete, tool data is displayed on the CRT display device 5 in order of appropriate tools (step 104). At this time, the tool data which seems to be the most appropriate is highlighted as shown in Fig. 8. By depressing the input key (INPUT) in that state, that tool number is set. The tool data is displayed in the order in which the tools seem to be more appropriate, and the tool data conforming to the criterion conditions 1 to 6 is marked "*" so that it may be differentiated from the other tools. For the tools that do not conform to the conditions, their tool data is displayed next to the tools satisfying the criteria in order of tool numbers. In the example of Fig. 8, the tool numbers (T No.) of the tools conforming to the conditions are 3, 7 and 2 and are marked "*" indicating that they are conforming. The conforming tools are displayed in order of conformance and the tool 3 seeming to be the most appropriate is highlighted. The non-conforming tools are displayed in order of tool numbers (1, 4, 5, 6, 8, 9, ...) without the conforming tools. Then, the operator shifts the highlight by depressing the cursor moving keys on the keyboard 4 so that the tool data desired to be selected is highlighted (step 105). When the tool data to be selected has been highlighted, the operator depresses the input key (INPUT) (step 106). The highlighted tool is then selected and its tool number is entered as the tool data (step 107). The tool determination method will now be described with reference to a flowchart in Fig. 11 and structure of Fig. 12. First, a work table 20 and a display table 30 are all cleared (step 200). The work table 20 consists of extraction flags 21 indicating extracted tools and tool numbers 22 as shown in a diagram illustrating the processing for tool selection in Fig. 12, and has a sufficient capacity to store the data of all tools. The display table 30 consists of selection flags 31 indicating selected tools and tool numbers 32 as shown in Fig. 12, and has a sufficient capacity to store the data of all tools. The tool numbers of all tools in the tool data 7a are then set in order of tool numbers 22 in the work table 20 (step 201). Since the data in the tool data 7a is arranged in order of tool numbers, the data of the work table 20 is also arranged in order of tool numbers. Variables N and DN are initialized (step 202). The variable N indicates a tool type number (1 to 3) shown in Fig. 5 and the variable DN indicates a data setting position in the display table 30. It is determined whether the data of the tool type N has already been set (step 203). If it has been set, the processing progresses to step 204. If not yet set, the processing jumps to step 205. The tools satisfying the conditions shown in Fig. 5 are then selected (step 204). The selection method will be described later in detail. This step selects the tools of which types have been specified in the tool type N appropriate for the machining mode of the machining program, where tool data is to be set, and which satisfy the conditions 1 to 6. The value of N is then incremented by 1 (step 205). It is determined whether the N value has exceeded 3 or not (step 206). If it has not yet exceeded 3, the processing is repeated, beginning with the step 203. If it has exceeded 3, the judgement on all the tool types 1 to 3 is complete and the remaining data in the work table 20, i.e. the tools that did not satisfy the conditions shown in Fig. 5, are set to the display table 30 in sequence (step 207). The tools that did not satisfy the conditions are data of which extraction flags 21 in the work table 20 in Fig. 12 are OFF. These tools are set to the display table 30 in order of tool numbers. The tool selection method in the step 203 will now be described with reference to a flowchart shown in Fig. 13. The data to be judged is extracted from the criterion table 8a (step 300a). Since the machining mode has already been set in the "MODE" data in the process data specified in the machining program, the data to be judged is extracted in accordance with the machining mode and the machining division (roughing or finishing) in the tool data. In Fig. 7, for example, assuming that tool selection is made with the cursor 15 located in the position of "R TOOL," since data "BAR-OUT" has already been set in "MODE," the data of which "MACHINING MODE" is "BAR-OUT" and "DIVISION" is "R" in the criterion table 8a in Fig. 5 is extracted and defined as tool judgement reference data. Variable K is initialized (step 300). The variable K indicates the position of data in the work table 20. It is judged whether the extraction flag 21 of the Kth data in the work table 20 is OFF or not (step 301). If it is OFF, the processing advances to step 302. If it is ON, the processing jumps to step 311. The tool number TN of the Kth data in the work table 20 is extracted (step 302). It is determined whether the shape of the data equivalent to the tool number TN of the tool data 7a is the tool type N or not (step 303). If they match, the processing moves on to step 304. If they do not match, the processing jumps to the step 311. Variable L is initialized (step 304). The variable L indicates the condition number of the conditions 1 to 6. It is judged whether the tool having the tool number TN conforms to the condition L (step 305). If it conforms, the processing proceeds to step 306. If not, the processing jumps to the step 311. The value of the variable L is incremented by 1 (step 306). It is determined whether the value of the variable L has exceeded 6 (step 307). If it is 6 or less, the processing is repeated from the step 305 onward. If it is over 6, all the conditions 1 to 6 are regarded as satisfied and the processing advances to step 308. The extraction flag 21 in the work table 20 is switched ON (step 308). The value of TN is set to the DNth tool number 32 in the display table 30 (step 309). The value of the variable DN is incremented by 1 (step 310). The value of the variable K is incremented by 1 (step 311). It is determined whether or not the value of the variable K has exceeded the value of TMAX indicating the number of tools (step 312). If TMAX has not been exceeded, it is regarded that there are unjudged tools and the processing is repeated from the step 301 onward. If TMAX has been exceeded, the processing progresses to step 313. Among the data stored in the display table 30, the data of which selection flags 31 are OFF are rearranged in order of condition 1 (step 313). Then, in regards to the already set data of the display table 30, all the selection flags are switched ON (step 314). Namely, as shown in Fig. 14, for example, this is to change the data indicated on the left-hand side 33 in Fig. 14 to that indicated on on the right-hand side 34. Referring to Fig. 14, assume that the nose radius values of the tools are as follows, with the data of the tool numbers 3, 8, 15 and 21 added as indicated on the left-hand side 33: Tool Number Nose Radius Value 3 0.7 8 0.5 15 0.2 21 0.8 If R0.2:* has been specified in the condition 1, i.e. if it has been specified to arrange the tool numbers in the order in which their nose radius values are closer to 0.2, the tool numbers satisfying this condition are rearranged in order of: 15, 8, 3, 21 and the selection flags 31 of these data are switched ON. Whereas there are three tool types, 1 to 3, and six conditions, 1 to 6, in the tool selection criterion table 8 in the present embodiment, these numbers may be changed as required. Also, while all of the tool types 1 to 3 are judged by the conditions 1 to 6 in the present embodiment, the conditions may be set individually to each tool type as shown in Fig. 15. In this case, the first tool type appropriate for the "BAR-FCE" machining mode is: "GNL-FCE" and its selection conditions are: a1 to a6. The second appropriate tool type is: "GNL-OUT" and its selection conditions are: b1 to b6. For the display of the tools selected, while the tool data is displayed in a window provided in some part of the screen as shown in Fig. 16 (A) in the present embodiment, the entire screen may be switched as shown in Fig. 16 (B). Whereas the machining modes and tool data for turning machines, such as lathes, are indicated in the present embodiment, the present embodiment is also applicable to machining centers, etc. The "*" marks employed in the present embodiment to differentiate between the tools satisfying the criteria and the other tools may be replaced by other marks. In addition, this differentiation may be made in another method, e.g. the tools satisfying the criteria may be displayed in a different color or the tools satisfying the criteria and the other tools may be displayed in separate positions. Also, while the data of the tool judged as the most appropriate is highlighted in the present embodiment, it may be displayed in another way, e.g. the most appropriate tool may be indicated by the cursor or only the most appropriate tool may be displayed in a different color. Further, the present embodiment is not restricted to the machining modes, machined portions and tool data indicated herein. It will be apparent that the invention, as described above, achieves a tool specifying method which allows conditions for selection of the most appropriate tool to be specified optionally for each machining mode, whereby selection reference can be provided so that tool selection may be made according to a machining status. The tool selection reference of this tool specifying method is so definite that which tool will be selected can be expected and knowhow on the tool selection of each operator can be incorporated by correcting the conditions. Since a tool to be used is specified by the operator out of selected tools displayed on the screen in the order in which they seem to be more appropriate for machining, the tool selected can be changed optionally if it is not satisfactory. To ensure ease of selection for the operator, the tools are displayed on the screen in the order in which they seem to be more appropriate for machining. The operator specifies a required tool while simultaneously viewing the tool data displayed on the screen, whereby simple input mistakes can be prevented and the tool to be used can be specified rapidly and reliably.

Claims: A tool specifying method in an NC automatic programming system for specifying a tool out of a plurality of tools by use of displayed tool data of the plurality of tools (5), said data describes at least tool types and the location of a machining operation to be performed at a workpiece, which tool data identifies the tools, said method comprising the steps of: setting and registering said tool data (7a) ; setting and registering tool criteria (8a) specifying the data for a tool being necessary for a certain machining mode, said tool criteria comprising at least one of (1) machining type and machined workpiece portion, (2) roughing or finishing machining, (3) tool type, and (4) tool parameter conditions for specifying conditions to be satisfied by the tools to be selected for those specified by the tool types; characterized by automatically arranging and displaying said tool data (103, 104) in accordance with said set criteria in an order according to a decreasing satisfaction of said criteria by said tool data; selecting and specifying desired tool data (105) from among said displayed tool data. A method according to claim 1, wherein the step of automatically arranging and displaying (103, 104) said tool data comprises the steps of arranging said tool data in a first order in accordance with said set criteria, arranging said tool data not satisfying said criteria in a second order, and divisionally displaying said tool data satisfying said criteria and said tool data not satisfying said criteria in said arranged orders. A method according to claim 2, wherein said second order is based on tool numbers (201; 22, 32). A method according to any of the preceding claims, wherein said criteria are specified in a range by the most appropriate value for a certain machining operation and a predetermined value thereof greater or smaller than said most appropriate value. A method according to any of the preceding claims, wherein said tool data satisfying said criteria is displayed in the order from the most to least appropriate tools for a certain machining operation. A method according to any of the preceding claims, comprising the steps of displaying said set and registered tool criteria (fig.5); changing and registering said criteria (313) if it is judged that said displayed criteria are not adequate for a certain machining operation; and rearranging and displaying (313) said tool data in accordance with said changed criteria. A tool specifying apparatus in an NC automatic programming system for specifying a tool out of a plurality of tools by use of displayed tool data of the plurality of tools (5), said data describes at least tool types and the location of a machining operation to be performed at a workpiece, said apparatus comprising: means for setting and registering said tool data (7a) ; means for setting and registering tool criteria (8a) specifying the data for a tool being necessary for a certain machining mode, said tool criteria comprising at least one of 1) machining type and machined workpiece portion, 2) roughing or finishing machining, 3) tool type, and 4) tool parameter conditions for specifying conditions to be satisfied by the tools to be selected for those specified by the tool types; characterized by means (103, 104) for automatically arranging and displaying said tool data in accordance with said set criteria in an order according to a decreasing satisfaction of said criteria by said tool data; means (105) for selecting and specifying desired tool data from among said tool data displayed. An apparatus according to claim 7, wherein said arranging means (103) is operative to arrange said tool data in a first order in accordance with said set criteria and to arrange said tool data not satisfying said criteria in a second order. An apparatus according to claim 8, wherein said means (104) for displaying said tool data is operative to divisionally display said tool data satisfying said criteria and said tool data not satisfying said criteria in said arranged orders. An apparatus according to claim 9, wherein said divisional display corresponds to said arranged first and second orders. An apparatus according to any of the claims 7 to 10, wherein said criteria are specified in a range by the most appropriate value for a certain machining operation and a predetermined value thereof greater or smaller than said most appropriate value. An apparatus according to any of the claims 7 to 11, wherein said tool data satisfying said criteria is displayed in the order from the most to least appropriate tools for a certain machining operation. An apparatus according to any of the claims 7 to 12, further comprising means (fig. 5) for displaying said set and registered tool criteria (fig. 5); means (313) for changing and registering said criteria if it is judged that said displayed criteria are not adequate; and means (313) for rearranging and displaying said tool data in accordance with said changed criteria. A NC automatic programming system for creating a NC machining program in which a plurality of NC programs (6) are selectable for controlling the machining of a workpiece by one of a plurality of available tools, said programs being interactive editable (4) to provide a desired machining, said system comprising automatic tool selection means (4, 5) for selecting the most appropriate one of said plurality of available tools on the basis of specified data, said automatic tool selection means comprising an apparatus according to any of the claims 7 to 13.

Inventors: NIWA TOMOMITSU, NIWA, TOMOMITSU, Niwa, Tomomitsu, c/o Mitsubishi Denki K. K.
Applicants: MITSUBISHI ELECTRIC CORP, MITSUBISHI DENKI KABUSHIKI KAISHA
Application year: 1992
Main classification: G05B19
IPC codes: B23Q15, G05B19