METHOD OF PREPARING PART PROGRAM

Abstract: A method of preparing an NC part program includes a figure-defining sentence defining a figure (MFIG), a motion-­ defining sentence defining the motion of a tool (TL), and auxiliary machining data, such as feed rate and rotational speed of spindle. The method comprises the steps of: pres­ toring lotion-defining sentences corresponding to various figures together with figure names; supplying a figure name and defining the figure (MFIG) while specifying a point (P₁), straight lines (S₁ to S₄) or circular arcs; and combining the motion-defining sentence corresponding to the supplied fig­ ure name and the specified figure-defining sentence to prepare a part program.

Description: Technical Field This invention relates to a part program creation method through which a part program necessary for the creation of an NC tape can be simply created. More particularly, the invention relates to a method of creating a complete part program merely by storing the non-variable portions of a part program in a memory beforehand and then entering the variable portions of the part program. Background Art An NC machine tool is operated as specified by a machining program data (NC data) stored on an NC tape to subject a workpiece to prescribed machining. To create an NC tape for a certain cutting operation, numerical control information and other machining conditions are punched into a paper tape in accordance with predetermined rules. The numerical control information includes all the information necessary for machining, such as numerical values obtained from a design drawing and relating to the dimensions of the workpiece that is to be machined, feed velocity, and the like. When machining the workpiece by means of an NC machine tool, the NC tape is loaded into the tape reader of an NC device so that the various instructions recorded on the NC tape may be read successively, the NC device responding by executing the instructions to perform the prescribed machining. Thus, an NC tape is a record of NC data, as in the manner of a paper tape, magnetic tape or bubble cassette memory. Since considerable time and experience is required to create the NC tape, an apparatus for creating an NC tape automatically has recently been developed and put into practical use. This NC tape automatic creation apparatus includes a graphic display, keyboard, printer and the like and is extremely useful in preparing NC tapes in a simple, accurate and rapid manner. Consisting of a microcomputer, the NC tape automatic creation apparatus has an internal main memory for storing the NC tape creation software (system program). To create an NC tape by such an NC tape automatic creation apparatus, the prescribed system program is loaded into the main memory, and a group of data (part program) specifying motion of a tool along a contour must be created and entered in accordance with predetermined rules. The part program ordinarily comprises a graphic definition state for defining a graphic, a motion definition statement (motion statement) specifying tool path, and auxiliary machining information such as feed velocity and spindle rotating velocity, and a programmer must create the part program at his desk from a design drawing. Therefore, such creation of a part program is disadvantageous in that it is both a troublesome and time-consuming task and can only be accomplished by a programmer having considerable programming skill. Accordingly, an object of the present invention is to provide a part program data creation method through which even a beginner can readily create a part program in a simple manner. Another object of the present invention is to provide a part program data creation method through which a complete part program can be created merely by storing the non-variable portions (motion definition statements and the like) of a part program in a memory beforehand and then entering the variable portions (graphic definition statements and the like) of the part program. Disclosure of the Invention According to the present invention there is provided a part program creation method, for creating an NC part program comprising a graphic definition statement defining a machining graphic, this graphic indicating a shape to be machined, and a motion definition statement which defines a tool path, specifying tool motion along a tool path, and auxiliary machining information such as feed velocity and spindle rotational velocity, characterised by storing, in a memory, a plurality of motion definition statements, specifying tool motion along respective tool paths conforming to respective different shapes to be machined, each stored motion definition statement including auxiliary machining information such as feed velocity and spindle rotational velocity, defining a machining graphic, using a graphic input device to generate a graphic definition statement, and creating a part program which combines the graphic definition statement so provided with a selected one of the stored motion definition statements. The present invention thus provides a part program creation method for creating an NC part program comprising a graphic definition statement, defining a machining graphic, and a motion definition statement defining a tool path (with auxiliary machining information such as feed velocity and spindle rotational velocity). This method effectively includes completing a program from which a graphic definition statement is excluded but which comprises a motion definition statement (and auxiliary machining information), storing the program in a memory, defining a graphic by a graphic input device (to provide a graphic definition statement) and creating a part program by combining the graphic definition statement and the program which has been stored in advance. Thus, a part program can be created merely by designating a prescribed program from among a plurality of programs (motion definition statements) stored in a memory, followed by defining a graphic. Since it is unnecessary to define a motion statement for each and every part program, a part program can be created simply and in a short time even by a beginner. Further, the present invention provides that a plurality of incomplete graphic definition statements, relating to respective graphics, may be stored in advance. The incomplete graphic definition statements include symbols representing points, straight lines and circular arcs, but not data values relating to the points, straight lines and arcs. An incomplete part program is formed by combining selected motion and graphic definition statements. A complete part program is formed by entering data values for the graphic definition statement. Brief Description of the Drawings Figs. 1, 2 and 3 are schematic views for describing the present invention, Fig. 4 is a view showing the external appearance of an NC tape automatic creation apparatus, Fig. 5 is a perspective view showing the external appearance of a tablet device, Fig. 6 is an enlarged view of a cursor unit, which is one element of the tablet device, Fig. 7 is a block diagram for practicing the part program creation method of the present invention, Fig. 8 is an illustrative view of an image displayed on the screen of a CRT, and Fig. 9 is a view of a menu, Figs. 10 and 11 are illustrative views for describing straight line and circular arc inputs, and Fig. 12 is a flowchart of processing according to the present invention. Best Mode for Carrying Out the Invention Figs. 1 and 2 are schematic views for describing the present invention, in which Fig. 1 is a view for describing a tool path expressed in a three-dimensional coordinate system, and Fig. 2 is a view for describing a tool path obtained by projecting the abovementioned tool path on an XY plane. Assume that a tool TL is to be moved from a reference point P r (where P₁₀₀ is the point obtained by projecting the reference point on the XY plane), shown in Fig. 1, to a point P₁' in a rapid-traverse mode, thereafter to an approach point P a at a velocity F0100 (where F is a word address word indicating feed velocity) and at a spindle rotational velocity S1500 (where S is a word address word indicating spindle rotational velocity), thence to a machining starting point P₁ at a cutting velocity F0050 while the spindle is rotating, thereafter to the point P₁ along straight lines S₁ → S₂ → S₃ → S₄ at the abovementioned cutting velocity (F0050) and spindle rotational velocity (S1500), and then, upon completion of machining, back to the reference point P r in the rapid-traverse mode along the path P₁ → P₁' → Pr. The part program for such movement is as shown below, where we assume that the distance between the approach point P a and the reference point P r along the Z axis is 40, and that the Z-axis coordinate value of the reference point P r is 50: In the above, (a) through (e) constitute a graphic defination statement which, by specifying the point P₁ and straight lines S₁ through S₄, defines a machining graphic MFIG (see Fig. 2). Further, (f) through (q) constitute a motion definition statement, in which F0100, S1500 and F0050 in (h) and (i) are items of auxiliary machining information indicative of cutting velocity and spindle rotational velocity. "RPD" signifies rapid traverse, the numerical value following "DLT" signifies an incremental value along the Z axis, and M02 signifies program end. Ordinarily, the foregoing graphic definition statement and motion definition statement (inclusive of the auxiliary machining information) are sequentially created by a programmer and combined to form a part program. When creating part programs that, like the graphics MFIG₁, MFIG₂ shown in the respective Figs. 3(A), (B), have shapes different from that of the graphic MFIG of Fig. 2 but similar thereto in that the shapes are quadrangles, the graphic and motion definition statements must be created for each and every graphic if the conventional method is used. However, upon careful observation, one notices that the motion definition statements [(f) - (q)] for graphics of shapes that are similar but possessed of different dimensions, are exactly the same. This holds providing that the path from the reference point P r to the machining starting point P₁ is the same as the path going in the opposite direction. Therefore, according to the present invention, which is based upon the foregoing fact, a variety of motion definition statements are registered in memory beforehand with an identifier assigned to each one, only a graphic definition statement is created, a predetermined motion definition statement is called, and the created graphic definition statement and the called motion definition statement are combined to form a part program. Further, upon observing graphic definition statements for graphics of shapes which are similar but possessed of different dimensions, one notices that the arrangement of the symbols representing the points, straight lines and circular arcs are the same, with only the dimension data being different. Therefore, according to the present invention, the symbols representing the points, straight lines and circular arcs are used to create a graphic definition statement, with the data specifying these points, straight lines and circular arcs being left unknown, an incomplete part program comprising this graphic definition statement and a motion definition statement is registered in memory beforehand for each shape, the data specifying the aforementioned points, straight lines and circular arcs are entered, and the predetermined part program is called to create a complete part program. Fig. 4 is an external view of an NC tape automatic creation apparatus. In Fig. 4, numeral 11 denotes the main body of an apparatus for creating NC data. The main body 11 has a keyboard 11a having a multiplicity of keys, a graphic display device 11b, a cassette magnetic tape 11c, a printer 11d, and a control unit, not shown. The latter is constituted by a microcomputer which executes processing for input/output operation, for digitizing and for the creation of a part program, by means of a tablet described hereinbelow, based on a system program stored previously in means such as a ROM. The multiplicity of keys provided on the keyboard 11a are for responding to prompts, for designating system program loading, for entering NC data, etc. The graphic display device 11b displays, in graphical form, coordinate values obtained by digitization of positions designated by the tablet, as well as input data, numerical values, NC data and various messages for conversational operation. The cassette magnetic tape 11c is used to enter a system program into the main body of the NC data creating apparatus. By way of example, when using a tablet to enter coordinate values directly from a drawing and to prepare a part program, the software (system program) for digitizing processing, which is contained in the cassette magnetic tape 11c, must be fed into the main body of the apparatus. To read the magnetic tape, all that need be done is to touch a load button on the keyboard 11a after the tape has been set. The printer lid prints out characters which appear on the screen of the graphic display device 11b, the contents punched in a paper tape, described later, and information which has been written into the magnetic tape. Numeral 12 denotes a paper tape reader/puncher for preparing an NC tape by punching a paper tape with the NC data prepared by the NC data creating apparatus 11, and for reading NC or other data which has already been punched into an NC tape. Numeral 13 denotes a tablet device which, through use of a cursor or stylus, is operable to input positions on a drawing, which is laid on the tablet, into the NC data creating apparatus 11. Fig. 5 is a perspective view showing the external appearance of the tablet device 13. Numeral 13a denotes the tablet proper, 13b a tablet cover, 13c a cursor, 13d a stylus pen, 13e a buzzer, 13f lamps for indicating, e.g., coordinate input mode and introduction of power, 13g an input/output connector for connecting the tablet device 13 to the NC data creating apparatus 11, 13h a power unit for supplying the tablet proper 13a with D.C. power, 13i an A.C. cable, 13j a D.C. cable, and 13m a pen stand for the stylus pen. The cursor 13c or stylus pen 13d is used to enter coordinates and other data. Fig. 6 is an enlarged view off the cursor, which has a cursor body CSB, first and second switches SW1, SW2, a reading focal point RFP, a connector CNT and a cable CBL. To enter coordinates, the intersection Pc of the cross hairs provided on the reading focal point RFP is aligned with a point on a drawing that is desired to be entered, followed by depressing the first switch SW1 or second switch SW2. Fig. 7 is a block diagram for practicing the part program creation method of the present invention. Portions similar to those shown in Fig. 4 are designated by like reference characters. A control unit 21 incorporated within the apparatus 11 includes a motion statement registration memory 21a for storing motion definition statements conforming to each of a variety of shapes (path patterns) on the XY plane, along with the identifiers (graphic identifiers) of the statements, a processor 21b for executing various processing such as processing for data input/output among data input/output devices such as the keyboard 11a, display unit 11b and tablet 13, digitizing processing, part program creation processing and NC tape creation processing, a control program memory 21c storing a control program which controls the various processes, a data memory 21d, an image memory 21e for storing image information relating to path patterns corresponding to respective ones of the motion statements stored in the motion statement registration memory 21a, and a memory (RAM) 21f for storing a created part program and NC data. The procedure for part program creation according to the present invention will now be described in conjunction with the flowchart of Fig. 12. First, a graphic identifier FN of a graphic for which a part program is desired to be created is entered from the keyboard 11a. When the graphic identifier FN has been entered, the processor 21b stores the identifier in the data memory 21d, reads the image information relating to the path pattern corresponding to the graphic identifier out of the image memory 21e, and feeds the information into the graphic display unit 11b. As a result, the graphic display unit displays, on a cathode-ray tube (CRT), a tool path pattern in the XY plane in predetermined dimensions, as shown in Fig. 8, as well as symbols P i (i=1, 2,...), S i (i=1, 2,...), C i (i=1, 2...) representing points, straight lines and circular arcs, respectively, these symbols being displayed close to the corresponding points, straight lines and circular arcs. Thereafter, data specifying the points P i , straight lines S i and circular arcs C i are entered sequentially from the tablet 13. Next, before describing the method of entering these data, point input, straight line input and circular arc input methods will be set forth. Since the tablet device 13 has the capability of recognizing the positions of points designated on the tablet surface, the tablet device 13 can be provided with a switch function if a portion of the tablet surface is divided into a plurality of areas and each area is assigned a meaning. For example, if it is decided that a certain area is to be an absolute command area, absolute NC data will be created by designating this area. Accordingly, in the present invention, a strip of paper printed with the menu shown in Fig. 9 is affixed to the tablet and, by designating a prescribed area on the menu, various modes can be selected, namely a point definition statement creation mode, a point sequence connection statement creation mode, a straight line definition statement creation mode, and a circular arc definition statement creation mode. Specifically, in Fig. 9, area a₁ is a menu selection area. The areas a₁₃, a₁₄, a₁₅, a₁₆ are mode selection areas. The menu selection area a₁ must always be designated before selecting a new mode. The area a₁₃ is an area designated to select the mode for creation of the point/point sequence connection statement. The area a₁₄ is selected to designate the mode for creation of the straight line definition statement, the area a₁₅ to designate the mode for creation of the point sequence connection statement, and the area a₁₆ to designate the mode for creation of the circular arc definition statement. The mode for creation of the point/point sequence connection statement is a mode in which points are entered one at a time to produce, as outputs, a point graphic definition statement and a point-sequence graphic definition statement. Selecting the mode for the creation of the point/point sequence connection statement makes it possible to enter points from a drawing by using the tablet. In other words, when one selects area a₁₃ to establish the mode for creation of the point/point sequence connection statement, aligns the cursor with a prescribed position on a design drawing placed upon the tablet surface and presses the first switch SW1 (Fig. 6), an output of a point definition statement defining said position is produced. The point definition statement to be created will have the following format: P n = x, y where n is a suffix number, namely a numerical value obtained by adding one (+1) to the suffix used in the point definition statement produced previously. The initial value of the suffix is one. Also, x, y are the X and Y coordinate values of the point. The mode for creation of the straight line definition statement is a mode in which a statement defining a straight line passing through two separately entered points is created and produced as an output. Selecting the mode for the creation of the straight line definition statement makes it possible to enter points from a drawing by using the tablet. In other words, when one selects area a₁₄ to establish the mode for creation of the straight line definition statement, aligns the cursor with a single point P i1 on the tablet surface and presses the first switch SW1 or second switch SW2, then aligns the cursor with another point P i2 and presses the first switch SW1 or second switch SW2, as shown in Fig. 10, a statement defining a straight line S i passing through the two points is created and produced as an output. The definition statement to be created will have the following format: S i = x i1 , y i1 ; x i2 , y i2 where i is a suffix which increases by one in the order of the straight line definition statements. The mode for creation of the circular arc definition statement is a mode in which a statement defining a circular arc passing through three separately entered points is created and produced as an output. Selecting the mode for the creation of the circular arc definition statement makes it possible to enter points from a drawing by using the tablet. In other words, when one selects area a₁₆ to establish the mode for creation of the circular arc definition statement, aligns the cursor with a point P n1 located on circular arc C n (Fig. 11) desired to be defined, presses the first switch SW1 or second switch SW2, and then repeats the procedure for two different points P n2 , P n3 on the circular arc, a statement defining a circular arc passing through the three entered points is created and produced as an output. The definition statement to be created will have the following format: C n = x n1 , y n1 ; x n2 , y n2 ; x n3 , y n3 Initially, the suffix numbers of the points, straight lines and circular arcs are initially one, with the suffix number being incremented each time a respective statement is created. When it is desired to restore a suffix number to one, the area a₆ is designated, whereupon the suffixes for all definition statements will be restored to one. If one then proceeds to define a graphic from that point onward, the suffixes will again be incremented starting from one. In entering the data specifying the points P i , straight lines S i and circular arcs C i , one first presses the area a₆ to set the suffix number to "1". Next, points on the design drawing which correspond to the points P₁, P₂,... displaced on the CRT are entered through the foregoing method, and the point data are stored in the data memory 21d (only point P₁ in the example illustrated in Fig. 8). When the entry of data for the various points is completed, the straight lines on the design drawing which correspond to the straight lines S₁, S₂... displayed on the CRT are entered successively through the foregoing method and are likewise stored in the data memory 21d. When the operation for specifying the various straight lines is completed, the circular arcs on the design drawing which correspond to the circular arcs C₁, C₂... displayed on the display unit are entered through the foregoing method and stored in the data memory 21d. This completes the entry of data specifying the points, straight lines and circular arcs that define a graphic. Note that the entry of the points, straight lines and circular arcs can be greatly simplified if the symbols for the points, straight lines and circular arcs to be entered next are made to blink on the display, and if each completion of an input operation for all points, all straight lines and all circular arcs is indicated on the display by way of a message. When the input of a graphic definition is completed through the foregoing operations, the processor 21b goes to the motion statement registration memory 21a to call a prescribed motion definition statement on the basis of the graphic identifier FN stored in the data memory 21d, and creates, in the memory 21f, a part program by combining the motion definition statement with the graphic definition statement stored in the data memory 21d. Note that while the foregoing is for a case where various motion definition statements have been registered in advance, it is also possible to create graphic definition statements using symbols of points, straight lines and circular arcs, with the data specifying these point, straight lines and circular arcs being left as unknowns, and register a plurality of incomplete part programs for respective ones of various shapes, the incomplete part programs comprising these graphic definition statements and motion definition statements. Incomplete part programs may be stored with respective identifiers, used for selecting the incomplete part programs. Image information relating to tool path patterns corresponding to respective stored incomplete part programs may be stored in a memory, in advance, and an image of a selected one of the tool path patterns displayed on a display unit on the basis of stored image information relating to the selected pattern, the selected pattern being selected on the basis of an identifier entered when the part program is being created, graphic elements next to be entered using the graphic input device being also displayed on the display unit. When a part program has been created through the foregoing operations, the processor executes NC data creation processing under the control of the control program. The following NC data are created by the part program [(a) - (q)] of Fig. 1: The blocks (F)-(Q) correspond to blocks (f)-(q) in the above-described part program. In the foregoing NC data, (x₁, y₁) are the coordinate values of the point P₁ in the XY plane, and (X ij , Y ij ) are the coordinate values of the intersection between straight lines S i and 5 j . It should be noted that an arrangement is possible wherein a graphic definition statement created through the foregoing procedure is applied as an input to a separate apparatus, with an NC tape being created by the separate apparatus. For example, it can be arranged so that a graphic definition statement specifying a cross-sectional shape of a curved surface is created by the NC tape automatic creation apparatus shown in Fig. 7, the graphic definition statement is applied as an input to a curved surface generating apparatus, and a curved surface is generated in the curved surface generating apparatus from the graphic definition statement of the cross-sectional shape, thereby to create an NC tape for the curved surface. Processing efficiency can be improved by thus performing decentralized processing. According to the present invention, a part program can be created merely by registering beforehand motion definition statements and the like based on various shapes, and combining these motion statements with created graphic definition statements. Accordingly, the present invention greatly reduces the time required for part program creation and makes it possible for a part program and an NC tape to be simply created even by beginners.

Claims: A part program creation method, for creating an NC part program comprising a graphic definition statement defining a machining graphic, this graphic indicating a shape to be machined, and a motion definition statement which defines a tool path, specifying tool motion along a tool path, and auxiliary machining information such as feed velocity and spindle rotational velocity, characterised by storing, in a memory, a plurality of motion definition statements, specifying tool motion along respective tool paths conforming to respective different shapes to be machined, each stored motion definition statement including auxiliary machining information such as feed velocity and spindle rotational velocity, defining a machining graphic, using a graphic input device to generate a graphic definition statement, and creating a part program which combines the graphic definition statement so provided with a selected one of the stored motion definition statements. A part program creation method according to claim 1, characterised by entering an identifier, on the basis of which one of the stored motion definition statements is selected for combination with the generated graphic definition statement. A part program creation method according to claim 2, characterised in that the step of defining the machining graphic involves entering predetermined points, straight lines and circular arcs for the graphic. A part program creation method according to claim 3, characterised in that a straight line is entered by specifying two points on said straight line, and a circular arc is entered by specifying three points on said circular arc. A part program creation method according to claim 4, characterised in that a point on the graphic is designated by said graphic input device, whereby the coordinate values of said point are entered. A part program creation method according to claim 4, characterised by storing in a memory, in advance, image information relating to tool path patterns corresponding to respective stored motion definition statements, displaying an image of a selected one of the tool path patterns on a display unit on the basis of stored image information relating to the selected pattern, designated by an identifier entered when the part program is being created, and displaying on the display unit predetermined elements indicating either a point, a straight line or a circular arc in relation to which data is to be entered next. A part program creation method according to claim 1, characterised in that a plurality of incomplete graphic definition statements are provided in advance, these incomplete statements using symbols representing points, straight lines and circular arcs, with data specifying the points, straight lines and circular arcs which constitute the graphic, being left unknown, a plurality of incomplete part programs, each comprising such an incomplete graphic definition statement and a motion definition statement are stored, in a memory, in advance, and a complete graphic definition statement is generated by specifying data for each point, straight line and circular arc involved, using the graphic input device, to define a machining graphic, and a complete part program is created by using the specified data and a stored incomplete part program. A part program creation method according to claim 7, characterised in that incomplete part programs are stored with respective identifiers, used for selecting the incomplete part programs. A part program creation method according to claim 8, characterised by storing in a memory, in advance, image information relating to tool path patterns corresponding to respective stored incomplete part programs, displaying an image of a selected one of the tool path patterns on a display unit on the basis of stored image information relating to the selected pattern, the selected pattern being selected on the basis of an identifier entered when the part program is being created, and displaying on the display unit graphic elements next to be entered using the graphic input device.

Inventors: KISHI, HAJIMU, SEKI, MASAKI
Applicants: FANUC LTD.
Application year: 1983
Main classification: G05B19
IPC codes: G06F9, G05B19