ANIMATION DRAWING METHOD FOR MULTIPLE-LATHE NUMERIC CONTROLLER

Abstract: An animation drawing method capable of accurately simulating an actual machining operation even when a tool rest moves to another spindle for cutting or when a plurality of tool rests conduct cutting for a work on the same spindle. A drawable range of a tool rest is designated by a range designation command (G10) for setting the drawable range of the tool rest (S3, S4), and the drawable range of each tool rest is displayed on either the left half (13a) or right half (13b) of a display screen (13) depending on whether the operation position of each tool rest exists on the side of a first spindle (14) or a second spindle (16). In this way, a moving trajectory of a tool for effecting an actual machining operation and a cutting state of a work are accurately simulated and drawn.

Description: The present invention relates to an improvement of an animated plotting method for use in a numerical control (NC) apparatus for a multi-system lathe. An animated plotting method in which the state of cutting workpieces by means of a plurality of tool rests of a lathe is simulatively displayed on a single screen at the same time is a known technique. According to the conventional animated plotting method, a plurality of spaces obtained by splitting a monitoring screen depending on the number of the tool rests were assigned to the plottable ranges of the tool rests, or alternatively, the entire monitoring screen was fixedly assigned as the integral plottable range of all of the tool rests. An example of such a method is disclosed in EP-A-0121100. Fig. 5 illustrates, by way of example, a conventional animated plotting with the monitoring screen split into two display spaces correspondingly to a couple of tool rests. As seen from the figure, a display screen 101 of a display means 100 such as a CRT display unit includes a halved screen consisting of a first plottable range 101a for a tool 104 mounted on a first tool rest for exclusively machining a workpiece 103 loaded on a first main spindle 102, and a second plottable range 101b for a tool 107 mounted on a second tool rest for exclusively machining workpiece 106 mounted on a second main spindle 105, whereby the states of cutting the workpieces 103 and 106 each mounted on the corresponding main spindle can be simulatively plotted on the same screen. In this case, the boundary 108 between the two plottable ranges cannot be shifted on the screen 101. Moreover, the screen 101 is not necessarily allowed to correctly represent a mutual positional relationship between the first main spindle 102 and the second main spindle 105. Hence, if either the tool 104 or 107 of the tool rests has moved beyond its plottable range, and such movement is plotted as it is, the relative positions of the tool and the workpiece lying in the other plotting range may become inconsistent with each other, to cause the problem of contradictory display. Therefore, when a tool has moved to another range beyond its plotting range, normally, the plotting of such tool (in the other range) will not be executed. In other words, the plotting of each tool rest will be clipped based on the corresponding plottable range. Fig. 7 is a conceptual diagram illustrating a function of the clipping processing. If the tool 104 mounted on the first tool rest lies within its plottable range 101a, then the whole image of the tool 104 can be plotted as shown in Fig. 7A. If part of the tool 104 lies beyond the boundary 108, however, such part of the tool 104 lying beyond the plottable range 101a will automatically be clipped as shown in Fig. 7B. Accordingly, even when the tool 104 of the first tool rest has moved into the machining area of the second tool rest, the configuration of the tool 104 and the cutting process will not be displayed. Similarly, even if the tool 107 mounted on the second tool rest has moved into the machining area of the first tool rest, the tool 107 and its cutting process will not be displayed. Also, in the case of the conventional example shown in Fig. 6, the workpiece 103 loaded on the first main spindle 102, the tool 104 mounted on the first tool rest for cutting the workpiece 103, the workpiece 106 loaded on the second main spindle 105, and the tool 107 mounted on the second tool rest for machining the workpiece 106 are integrally displayed in the same screen 101 while maintaining their relative positional relationships with one another. For example, according to this simulative plotting, movement of the tool 104 mounted on the first tool rest from the current position of the workpiece 103 to the side of the workpiece 106 can be sequentially plotted. As apparent from this figure, however, the sizes of the images of the workpieces 103 and 106 and the tools 104 and 107 have to be reduced inevitably, and thus it is difficult to have a clear plotting of the machining state displayed on the screen. Since the conventional NC apparatus for a multi-system lathe was exclusively intended to perform a cutting operation for each of the main spindles by providing a plurality of tool rests corresponding to the main spindles, or was intended to cut a workpiece loaded on a single main spindle by means of a plurality of tool rests, the conventional animated plotting method described above and shown in Fig. 5 is good enough for the execution of a full simulation by the conventional animated plotting method. However, recent NC apparatus for a multi-system lathe is often applied even to such a case where the tool 104 mounted on the first tool rest is moved to the machining area assigned to the second tool rest for cutting the workpiece 106 loaded on the second main spindle 105 as shown in Fig. 8(a), or such a case where the workpiece 104 loaded on the first main spindle 102 is subjected to cutting operation by both the tool 107 of the second tool rest and the tool 104 of the first tool rest as shown in Fig. 8(b). In the cases of such application, therefore, it is difficult to simulatively plot such cutting operation by using the animated plotting method such as shown in Fig. 5. On the other hand, the display method not using the split screen as shown in Fig. 6 has a disadvantage that it is not suited for displaying the cutting conditions, that is, the relationship between the tools and the workpieces as well as necessary as discussed previously. It is therefore the object of the present invention to provide an animated plotting method for use in an NC apparatus for a multi-system lathe, in which an actual machining action is accurately simulated even if a tool rest is moved to another main spindle not directly associated therewith for cutting, or a single workpiece loaded on a main spindle is subjected to cutting operations by means of a plurality of tool rests. According to the present invention there is provided an animated plotting method for use in a numerical control apparatus for a multi-system lathe including two or more tool rests, in which one or more workpieces are controllably machined by the tool rests, and the state of the machining is simulatively plotted on a display screen having a first display region associated with one tool rest and a second display region associated with another tool rest, characterised in that: in a machining program for controlling movement of the tool rests, each respective tool rest is associated with blocks of NC data defining the movement of the tool rest, and a predetermined one of said blocks of NC data contains a code specifying a plotting range for said tool rest on the display screen, whereby the dimensions on the display screen of the plotting range for each respective tool rest can be set as required, thereby to provide a display region for the tool rest which can, if necessary, dependent upon the movement of the tool rest as defined by the machining program, overlap or coincide with the display region on the display screen of the other or another tool rest. Preferably, the code includes a code representing a command for specifying a plotting range of the tool rest associated with the block, and a code representing a rectangle of the plotting range specified by two coordinate values. Preferably, when a tool is displaced beyond the range corresponding to the plotting range on the display screen specified by the code, the display of the tool will be discontinued. Preferably, the displacement of a tool on the display screen is desplayed as a movement of a window having the tool displayed therein. According to the present invention as described above, a range specification command for setting a plottable range of a tool rest is used to appropriately change the plottable range of each tool rest depending on the operating position thereof, thereby simultaneously simulating the state of machining of at least one workpiece on a single screen, so that the process of cutting the workpieces loaded on the main spindles and movement paths of the tool rests can be accurately simulated within a required range even when the tool rests move among a plurality of main spindles, and a plurality of main spindles simultaneously perform their cutting operations. BRIEF DESCRIPTION OF DRAWINGS Fig. 1 is a block diagram schematically illustrating the principal part of an NC apparatus for a multi-system lathe which can perform a method in accordance with the present invention; Fig. 2 is a flowchart diagramatically illustrating a simulative processing of the NC apparatus for the multi-system lathe of the same embodiment; Figs. 3 and 4 illustrate, by way of example, a display screen in the NC apparatus for the multi-system lathe of the same embodiment; Figs. 5 and 6 show an example of a simulative plotting according to the conventional method; Fig. 7 is a conceptual diagram for explaining the function of clipping; and Fig. 8 is a schematic diagram illustrating a machining example where a tool rest displaces across a plurality of main spindles. Examples of the present invention will now be described with reference to the accompanying drawings. Fig. 1 is a block diagram illustrating a principal part of a numerical control (NC) apparatus for a multi-system lathe for executing a method embodying the present invention. The NC apparatus comprises a main CPU 1 which controls the drive of the multi-system lathe. The main CPU 1 is connected through a bus to a memory 2, which consists of a ROM storing a control program for the main CPU 1 and a RAM for temporary storage of data, a keyboard 3, a NC data storage memory 4, which stores a machining program previously created by an automatic programming apparatus, a main spindle drive circuit 5, and a servo circuit 6. In response to an instruction from the main CPU 1, the main spindle motors will be driven through the main spindle drive circuit 5 to rotate the workpieces, while the servo motors connected to the shafts of the tool rests receive pulses distributed through the servo circuit 6 to cause the tool rests to move in the directions of their respective main spindles and in their respective radial directions to make cuts in the workpieces with the edges of the tools for performing regular cutting operation of the workpieces, according to the control program stored in the memory 2 and the machining program stored in the NC storage memory 4. The following description will be made of a multi-system lathe including a first and second main spindles and a couple of tool rests, by way of example. In Fig. 1, however, the main spindle motors associated with the spindles and the servo motors having two shafts for driving corresponding tool rests are not shown. In compliance with an instruction derived from the machining program, the tools mounted on the tool rests are allowed to selectively cut into either one of the workpieces loaded on the first and second main spindles. The NC apparatus for a multi-system lathe further comprises a CPU 7 for graphic control (hereinafter, referred to as CPU for GC). The CPU 7 for GC is connected through a bus to a memory 8 storing a control program for the CPU 7 for GC or the like, and to a first and second display space control circuits 10 and 11, comprising an LSI or the like to control corresponding display screens of a CRT display unit 9. There is also provided a shared RAM 12 through which the bus of the main CPU 1 is connected to the bus of the CPU 7 for GC. Thus, when a machining program is selected through the keyboard 3 at the time of check plotting or actual machining, the selected machining program will be read out from the NC data storage memory 4 and converted into (a series of) machining actions by means of the tools. Then, a tool movement for each block is downloaded into the shared RAM 12 in the form of a graphic command to initiate a simulation processing for plotting a tool path and a workpiece cutting process. Incidentally, the CRT display unit 9 includes right and left display spaces each having at its bottom a lead key for finding the leading edge of the machining program, an execution key for executing a simulation plotting, a stop key for terminating a plotting operation, a selection key for selecting other operation, an explanation key for requesting a guidance for the explanation of an operation procedure, and other function keys. The processing action of this embodiment will next be described with reference to a simulation flowchart shown in Fig. 2 The CPU for GC at the start of a simulation first reads out initial configurations of a workpiece 15 mounted on a first main spindle 14 and a workpiece 17 mounted on a second main spindle 16 from the machining program downloaded into the shared RAM 12 as shown in Fig. 3, and then correspondingly displays them on left and right halves of a display screen 13 on the CRT display unit 9, respectively, through the first and second display space control circuits 10 and 11. Subsequently, when the operation of the execution key on the CRT display unit 9 is detected, the CPU 7 for GC reads one block of NC data from the machining program downloaded into the shared RAM 12 (Step S1), and judges whether the NC data indicates a program end or not (Step S2); if not, then it judges whether the NC data is a G10 code for specifying a display space (Step S3). The G10 code for specifying the display space is inputted in the form of "G10 Xi, Yi, Xj, Yj" into the machining program, and is used to set on the display screen 13 a rectangular plottable range having a diagonal line whose ends lie on points (Xi, Yi) and (Xj, Yj), respectively, on XY coordinates on the display screen 13. At least a first G10 code is positioned at the leading edge of the machining program for each of the spindles. Thus, the CPU 7 for GC which has detected the G10 code judges whether the NC data having this code is associated with the first tool rest or the second tool rest; when the code is for the first tool rest, a plottable range for the first tool rest is set on the display screen 13 based on the data (Xi, Yi) and (Xj, Yj) with respect of the detected code, while, when the detected code is for the second tool rest, a plottable range for the second tool rest is to be set on the display screen 13 on the basis of the data (Xi, Yi) and (Xj, Yj) (Step S4). Then, the CPU 7 for GC reads a tool code of the tool rest with the G10 code assigned thereto from the shared RAM 12 (Step S5), produces a tool display window consisting of a horizontal line and a vertical line each passing through the point of the tool (Step S6), and brings the point of the tool to a machining start position based on data of machining start position of the present tool and tool configuration data both derived from the shared RAM 12, thereby displaying a tool configuration (Step S7). Fig. 3 illustrates, by way of example, a case where two points, (X1, Y1) and (X2, Y2), of the first G10 code, associated with the first tool rest, correspond to the middle lower end and the right upper end, respectively, on the display screen 13, and the tool 18 mounted on the first tool rest is used to cut the workpiece 17 loaded on the second main spindle 16. In this instance, the plottable range of the first tool rest will appear on the right half 13b of the display screen 13. The CPU 7 for GC thus allowing the tool configuration to be displayed on the display screen 13 successively reads NC data by the block from the shared RAM 12 until the program end is read (Step S1). When this NC data is neither one signifying the program end nor the G10 code for specifying a display space (Steps S2 and S3), then it will be judged whether or not the NC data includes an instruction for movement to the tool rest having a plottable range specified in advance by the G10 code (Step S8). If the NC data includes the instruction for movement to the tool rest whose plottable range is in advance specified, then it is judged whether or not the tool mounted on the tool rest to be moved by the movement instruction lies within the previously set plottable range (Step S9). If it lies within the plottable range, the entire configuration of the present tool will be displayed with its actual movement, and a part of the displayed workpiece set with respect to this tool and superimposed on the tool display window, that is a display of the cut portion will be erased (Step S11). If the tool configuration partly lies outside the plottable range, the part of the tool extending beyond the plottable range will be clipped for not being displayed (Step S10), and the configuration of the tool lying within the plottable range and the conditions of cutting of the workpiece will be displayed on the display screen 13 (Step S11). The same applies in the case where a G10 code set in the NC data associated with the other tool rest is detected in the processing of Step S3. More specifically, a plottable range of the tool rest is set on the display screen 13 based on the G10 code of the tool rest (Step S4); a code of the tool mounted on the tool rest is read (Step S5); a tool display window tw consisting of a horizontal line and a vertical line each passing through the point of the tool will be produced based on the read code (Step S6); based on data of a machining start position of the tool and data of the tool configuration, the point of the tool is brought to the machining start position where the tool configuration is displayed (Step S7); and, in compliance with the relationship between the position to which the tool has been moved and its plottable range, the display of the tool movement, simulated display of cutting condition of the workpiece and the clipping processing will take place. Fig. 3 illustrates a case where the two points (X0, Y1) and (X1, Y2) represented by the G10 code "G10 X0, Y1, X1, Y2", which has been set at the leading edge of the cutting movement program of the second tool rest, respectively correspond to the lower left end and the upper middle end of the display screen 13, and the tool 19 mounted on the second tool rest is cutting the workpiece 15 loaded on the first main spindle 14. In this case, the plottable range of the second tool rest is set on the left half 13a of the display screen 13. Thus, at this stage in the example shown in Fig. 3, the plottable range of the tool 18 mounted on the first tool rest is set on the right half 13b of the display screen 13, while the plottable range of the tool 19 mounted on the second tool rest is set on the left half 13a of the display screen 13. Accordingly, in case the tool 18 of the first tool rest is required to return to the side of the workpiece 15 loaded on the first spindle 14 for cutting, the entirety of the tool 18 which has moved to the side of the workpiece 15 will have to be clipped. Therefore, under these conditions, the cutting state of the tool 18 is not allowed to appear on the left half 13a of the display screen 13. However, a G10 code for specifying a display space can be inserted into a program at any position, so that, when the G10 code "G10 X0, Y1, X1, Y2" is inserted immediately before the NC data for moving the tool 18 mounted on the first tool rest towards the side of the workpiece 15, and the plottable range of the first tool rest is reset for being displayed in the left half 13 of the display screen 13, the cutting operation and displacement of the tool 18 mounted on the first tool rest and the tool 19 mounted on the second tool rest for cutting the workpiece 15, as well as the cut process of the workpiece 15, can simulatively be displayed in the left half 13a of the display screen 13 at a time, as shown in Fig. 4. The same applies to a case where the tool 19 mounted on the second tool rest is moved, for cutting operation, towards the side of the workpiece 17 loaded on the second main spindle 16. More specifically, when a G10 code "G10 X1, Y1, X2, Y2" is previously inserted to reset the plottable range of the second tool rest for being displayed in the right half 13b of the display screen 13, the tool 18 of the first tool rest and the tool 19 of the second tool rest each moving for cutting the workpiece 17 and the cutting condition of the workpiece 17 can simulatively be displayed in the right half 13 b of the display screen 13 at a time. Since a rectangular plottable range having a diagonal line with its both ends respectively represented by (Xi, Yi) and (Xj, Yj) is designated by a code "G10 Xi, Yi, Xj, Yj", the first and second tool rests may have their respective plottable ranges arbitrarily assigned on the display screen 13 depending on the respective action ranges of the tool rests. Furthermore, when only one of the main spindles is used to perform a cutting or other machining operations, only the initial configuration of the workpiece loaded on the first main spindle 14 or the second main spindle 16 is first read for the display on the display screen 13. Then, a G10 code "G10 X0, Y1, X2, Y2" is set for both the first and second tool rests to designate the whole of the display screen 13 as their respective plottable ranges. Thus, in the same manner as the example of a conventional method shown in Fig. 6, it is possible for the method according to the present invention to execute a simulative plotting even in the case where a single workpiece is subjected to cutting operations by a plurality of tools each mounted on the tool rest. The foregoing description is concerned with a multi-system lathe having first and second main spindles and a couple of tool rests as an embodiment of the present invention. However, except the difference in the processing for assigning the plottable ranges on the display screen 13, the same processing can be applied even to the case of another multi-system lathe having more than two main spindles.

Claims: An animated plotting method for use in a numerical control apparatus for a multi-system lathe including two or more tool rests (19,18), in which one or more workpieces (15,17) are controllably machined by the tool rests (19,18), and the state of the machining is simulatively plotted on a display screen (13) having a first display region (13a) associated with one tool rest (19) and a second display region (13b) associated with another tool rest (18), characterised in that: in a machining program for controlling movement of the tool rests (19,18), each respective tool rest (19 or 18) is associated with blocks of NC data defining the movement of the tool rest (19 or 18), and a predetermined one of said blocks of NC data contains a code (G10) specifying a plotting range for said tool rest (19 or 18) on the display screen (13), whereby the dimensions on the display screen (13) of the plotting range for each respective tool rest (19 or 18) can be set as required, thereby to provide a display region for the tool rest (19 or 18) which can, if necessary, dependent upon the movement of the tool rest (19 or 18) as defined by the machining program, overlap or coincide with the display region on the display screen (13) of the other or another tool rest (18 or 19). An animated plotting method for use in a numerical control (NC) apparatus for a multi-system lathe according to claim 1, wherein the code (G10) includes a code representing a command for specifying a plotting range of the tool rest (19 or 18) associated with the corresponding block, and a code representing a rectangular plotting range specified by two coordinate values. An animated plotting method for use in a numerical control apparatus according to claim 1 or 2, wherein, when a tool is displaced beyond the range corresponding to the plotting range specified by the code (G10) on the display screen (13), the display of the tool will be discontinued. An animated plotting method for use in a numerical control (NC) apparatus according to claim 1, 2 or 3, wherein the displacement of a tool on the display screen (13) is displayed as a movement of a window in which the tool is displayed.

Inventors: MATSUMURA TERUYUKI, SHINOZAKI SATORU, MATSUMURA, TERUYUKI, SHINOZAKI, SATORU, MATSUMURA, TERUYUKI, FANUC DAI-3 VIRA-KARAMATSU
Applicants: FANUC LTD, FANUC LTD.
Application year: 1992
Main classification: G05B19
IPC codes: G05B19