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 &#34;CPU&#34;), 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 &#34;file&#34;) 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 &#34;registering tool data&#34; 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 &#34;tool management name&#34;. As previously explained, the &#34;tool management number&#34; 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 of a 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 &#34;NC DATA CREATING&#34; 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 &#34;tool specifying processing&#34;. 
     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 and 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. 
     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. 
    
    
     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 presentation. 
     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 present invention. 
     FIG. 15 is a schematic diagram illustrating a criterion data setting table according to another preferred embodiment of the present invention. 
     FIGS. 16(A) and 16(B) illustrate 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 register 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. 23 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 &#34;CPU&#34;), 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 off line 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: 
     &#34;T No.&#34; indicates a tool number. 
     &#34;SPARE&#34; indicates a spare tool number and is used to specify which tool will replace a tool that has reached its life. 
     &#34;SHAPE&#34; 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 
     &#34;NOSE R&#34; indicates a tool nose radius or a tool diameter. 
     &#34;ROTATION/HAND&#34; 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 
     &#34;GROOVE DEPTH/ENTERING ANGLE&#34; is used to specify the entering angle of a tool, or if a grooving tool is used, to specify the maximum grooving depth. 
     &#34;NOSE WIDTH/NOSE ANGLE&#34; 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. 
     &#34;CODE NAME&#34; is used to specify the name of a tool. 
     &#34;HOLDER&#34; is used to specify the type of a tool holder. 
     &#34;TOOL WIDTH&#34; is used to specify the width of a tool. 
     &#34;TOOL LENGTH&#34; 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: 
     &#34;MACHINING MODE&#34; 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 
     &#34;DIVISION&#34; 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. 
     &#34;TOOL TYPE 1&#34;, &#34;TOOL TYPE 2&#34; and &#34;TOOL TYPE 3&#34; 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 &#34;SHAPE&#34; 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. 
     &#34;CONDITION 1&#34; to &#34;CONDITION 6&#34; 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&gt;b or a&lt;b. If a&gt;b, the tools are selected in descending order, and if a&lt;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.2 mm and selection is made in order of tools whose nose radius value is closer to 0.2 mm. &#34;*&#34; 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 &#34;*&#34; is specified in the nose width data of &#34;B&#34; in the grooving mode. Also, when &#34;*&#34; is specified in the tool width data of &#34;W&#34; in the drilling mode, the maximum value should indicate the value of a hole diameter to be drilled. In this manner, the value of &#34;*&#34; 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.2 mm 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. &#34;P No.&#34; indicates a process number which is incremented in sequence, beginning with 0. The process number of &#34;0&#34; is used to specify the data of stock, and &#34;MATERIAL&#34; indicates the material of the stock, &#34;OD&#34; the maximum outside diameter of the stock, &#34;ID&#34; the minimum inside diameter of the stock, and &#34;STOCK LENGTH&#34; the overall length of the stock. The process numbers from &#34;1&#34; 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. &#34;R TOOL&#34; is employed to specify a tool used for roughing and &#34;F TOOL&#34; 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 &#34;TOOL SELECT&#34; 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 &#34;INPUT&#34; key which means that the tool is acknowledged. This causes the highlighted tool to be entered as the &#34;R TOOL&#34; or &#34;F TOOL&#34; 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 &#34;INPUT&#34; 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. &#34;R TOOL&#34; or &#34;F TOOL&#34; position in FIG. 7) (step 101), depressing the &#34;TOOL SELECT&#34;. 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 &#34;*&#34; 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 &#34;*&#34; 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 &#34;MODE&#34; 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 &#34;R TOOL,&#34; since data &#34;BAR-OUT&#34; has already been set in &#34;MODE,&#34; the data of which &#34;MACHINING MODE&#34; is &#34;BAR-OUT&#34; and &#34;DIVISION&#34; is &#34;R&#34; 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 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.515            0.221            0.8______________________________________ 
    
     If R0.2:* has been specified in the condition 1, i.e. it is 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 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 &#34;BAR-FCE&#34; machining mode is: &#34;GNL-FCE&#34; and its selection conditions are: 
     a1 to a6. 
     The second appropriate tool type is: 
     &#34;GNL-OUT&#34; 
     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 &#34;*&#34; 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 know how 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. 
     The entire disclosure of each and every foreign patent application from which the benefit of foreign priority has been claimed in the present application is incorporated herein by reference, as if fully set forth. 
     Although this invention has been described in at least one preferred embodiment with a certain degree of particularity, it is to be understood that the present disclosure of the preferred embodiment has been made only by way of example and that numerous changes in the details and arrangement of components may be made without departing from the spirit and scope of the invention as hereinafter claimed.