Abstract:
A numerical control method for numerically controlling a machine tool such as a multi-spindle lathe having two or more tools (TL 1 , TL 2 , TL 3 ). The numerical control method has steps of creating numerical control data specifying a relation between time and a position along each axis of movement (X 1 , X 2 , X 3 , Z), numerically controlling the position along each of the axes of movement (X 1 , X 2 , X 3 , Z) on the basis of the numerical control data, monitoring whether elapsed time has reached a time specified by numerical control data for each and every axis of movement (X 1 , X 2 , X 3 , Z), and when elapsed time has become equal to a time specified by numerical control data for a predetermined axis of movement, controlling the position along the axis of movement in accordance with succeeding numerical control data for the axis of movement.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to a numerical control method and, more particularly, to a numerical control method well-suited for application to a machine tool such as multi-spindle automatic lathe. 
     As shown in FIG. 1, a multi-spindle automatic lathe, which is for the purpose of shortening machining time and fostering mass production, has a number of mutually independently movable shafts (tools) TL 1  through TL 3  arrayed about a workpiece WK. The arrangement is such that the lathe subjects the workpiece WK to prescribed machining by applying machining performed by one tool followed by machining performed by a subsequent one of the tools when the preceeding machining is completed. However, in order to make it possible to control the movement of each tool independently in such a multi-spindle automatic lathe, a cam rotated by a rotary shaft, not shown, is provided for each and every tool, and it is arranged so that the workpiece is subjected to prescribed machining by moving the tools toward the workpiece independently due to rotation of the cams. This results in structural complexity and higher cost. Furthermore, though multi-spindle automatic lathes may be controlled numerically, the creation of NC data is troublesome. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide a novel numerical control method in which such cams are unnecessary, and through which NC data can be created in a simple manner and numerical control performed on the basis of such NC data. 
     Another object of the present invention is to provide an effective numerical control method for use in controlling a multi-spindle automatic lathe. 
     A further object of the present invention is to provide a numerical control method whereby there is created NC data which indicates the correspondence between time and position for every axis of movement, or NC data which indicates the correspondence between a rotational angle of a predetermined rotary shaft and position for every axis of movement. Formation in accordance with information, whenever elapsed time or the rotational angle of the rotary shaft becomes equal to a time or rotational angle specified by NC data in a currently prevailing block, a position along a predetermined axis of movement is controlled in accordance with NC data in a succeeding block. 
     The present invention provides a numerical control method which includes creating, for every axis of movement, a relation between time and a position along the axis of movement or a relation between a rotational angle and a position along the axis of movement, the relation serving as numerical control data; controlling each axis of movement based on the numerical control data; monitoring elapsed time or the rotational angle; and, whenever the elapsed time or rotational angle attains a time or rotational angular position specified by the numerical control data for each axis of movement, controlling the axis of movement in accordance with succeeding numerical control data. According to this numerical control method, NC data can be created in simple fashion so that the method is well-suited for use in controlling a multi-spindle automatic lathe or the like. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 schematically illustrates a multi-spindle lathe; 
     FIG. 2 is a block diagram of an NC apparatus to which the present invention is applied; 
     FIG. 3 is a illustrates a machined shape according to the present invention; 
     FIG. 4 illustrates curves showing the relation between position and time for each axis of movement for the purpose of obtaining the machined shape shown in FIG. 3; 
     FIG. 5 illustrates the NC data used to obtain the machined shape shown in FIG. 3; 
     FIG. 6 is a block diagram of a pulse distributor circuit in FIG. 2; 
     FIG. 7 is another block diagram of an NC apparatus to which the present invention is applied; and 
     FIG. 8 is a block diagram of a pulse distributor circuit in FIG. 7. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 2 is a block diagram of a first embodiment of the present invention. Hereafter a case will be described wherein a part having the shape shown in FIG. 3 is machined by a multi-spindle automatic lathe which includes three tools TL 1 , TL 2 , TL 3 . In the description it will be assumed that X 1 , X 2  and X 3  respective are the axes along which the first, second and third tools TL 1 , TL 2 , TL 3  move, and that the Z axis is the axis along which the workpiece moves with respect to the tools in a longitudinal direction. 
     An NC data read operation is initiated by an operator&#39;s panel 102. This causes a processor 101, under the control of a control program stored in a ROM 103, to deliver an NC data read command to a data reader 104. This command causes the reader to read numerical control data (NC data) punched in a paper tape 105. The read NC data is stored in a RAM 106. 
     If we assume that the part having the shape shown in FIG. 3 is to be machined, then a relation (time chart) between position and time for each of the axes of movement will be as illustrated in FIG. 4. The NC data created in accordance with the time chart are stored (punched) on the paper tape 105. More specifically, the NC data is created in the following form and punched into the paper tape 105: 
     X 1  T 1 , 0; T 2 , x 1  ; T 3 , x 1  ; T 4 , x 4  ; T 4  &#39;, 0; M99; 
     X 2  T 6 , 0; T 7 , x 2  ; T 8 , 0; M99; 
     X 3  T 8 , 0; T 9 , x 3  ; T 10 , x 3  ; T 11 , 0; M99; 
     Z T 2 , 0; T 4 , (z 1  +z 2 ); T 5 , 0; T 9 , 0; T 10 , z 3  ; 
     T 11 , 0; M99; 
     where M99 signifies the end of the command for each axis. Accordingly, after reading the NC data, this data will be stored for each axis in the RAM 106 in order of time as shown in FIG. 5. 
     When an NC control start signal is issued by the operator&#39;s panel 102 after the NC data is stored in the RAM 106, the processor 101 reads a first item of NC data for each axis out of the RAM 106, that is, reads T 1 , 0; with regard to the X 1  axis, T 6 , 0; with regard to the X 2  axis, T 8 , 0; with regard to the X 3  axis, and T 2 , 0; with regard to the Z axis, stores these data in respective registers 107X 1 , 107X 2 , 107X 3  and 107Z of a register section 107, and initiates the timing operation of a timer 108. Of the first items of NC data for these axes, times T 1 , T 6 , T 8 , T 2  are applied to respective comparators 109X 1 , 109X 2 , 109X 3  and 109Z. Further, the first items of NC data T 1 , 0; T 6 , 0; T 8 , 0; T 2 , 0; are applied to respective pulse distributor circuits 110X 1 , 110X 2 , 110X.sub. 3, 110Z. As shown in FIG. 6, the pulse distributor circuits 110X 1 , 110X 2 , 110X 3 , 110Z each have a position register APR (initial value zero), a time register TR (initial value zero), an arithmetic unit SPMC, and a well-known pulse interpolator PIC. Let us assume that a position commanded by the NC data is L t , that a commanded position in a preceding block stored in the position register APR is L a , that a time commanded by the NC data is T t , and that a commanded time in the preceding block stored in the time register TR is T a . The arithmetic unit SPMC calculates an incremental value L i  and a feedrate F i  based on the following equations: 
     
         L.sub.i =L.sub.t -L.sub.a                                  (1) 
    
     
         F.sub.i =|L.sub.t -L.sub.a |/(T.sub.t -T.sub.a) (2) 
    
     and delivers these to the pulse interpolator PIC. The latter performs a well-known pulse interpolation operation based on L i  and F i  to produce distributed pulses having a frequency proportional to F i . It should be noted that the content of the position register APR and of the time register TR is replaced by L t , T t , respectively, after the operations of Eqs. (1), (2) are performed. 
     When the first items of NC data are applied to the pulse distributor circuits 110X 1 , 110X 2 , 110X 3 , 110Z, Eqs. (1), (2) are evaluated. Since the results of the computations will be zero, however, no distributed pulses are produced. 
     Meanwhile, the comparators 109X 1 , 109X 2 , 109X 3 , 109Z constantly determine whether a present time t has become equal to times T 1 , T 6 , T 8 , T 2  applied thereto from the register section 107. The comparator 109X 1  produces a time-over signal TOX 1  if t=T 1  holds, the comparator 109Z a time-over signal TOZ if t=T 2  holds, the comparator 109X 2  a time-over signal TOX 2  if t=T 6  holds, and the comparator 109X 3  a time-over signal TOX 3  if t=T 8  holds. When the time-over signals TOX 1 , TOX 2 , TOX 3 , TOZ are generated, the corresponding pulse distributor circuits 110X 1 , 110X 2 , 110X 3 , 110Z immediately cease their pulse distribution operations and corresponding counters 111X 1 , 111X 2 , 111X 3 , 111Z have their states (initial value 1) SN 1 , SN 2 , SN 3 , SN 4  incremented by one in accordance with the following expressions: 
     
         SN.sub.1 +1→SN.sub.1, SN.sub.2 +1→SN.sub.2, 
    
     
         SN.sub.3 +1→SN.sub.3, SN.sub.4 +1→SN.sub.4 
    
     The time-over signals TOX 1 , TOX 2 , TOX 3 , TOZ enter an interrupt circuit 112 to interrupt the processor 101 immediately. When this occurs, the processor 101 reads the state of the counters (111X 1 , 111X 2 , 111X 3 , 111Z) associated with the axes of movement for which the time-over signals have been generated, accesses RAM 106 to read the NC data designated by these counters; and delivers the NC data to the register section 107. This NC data is delivered to the comparators and pulse distributor circuits of the corresponding axes. 
     If we take FIGS. 3 and 4 as an example, the time-over signal TOX 1  is generated and the state SN 1  of counter 111X 1  is incremented to 2 when t=T 1  holds. As a result, the processor 101 goes to the RAM 106 to read out NC data (a second item of NC data) T 2 , x 1  ; concerning the X 1  axis, which data is designated by the state SN 1  of the counter. The processor sets this data in the register 107X 1 . The commanded time T 2  and the commanded position x 1  enter the pulse distributor circuit 110X1. The commanded time T 2  is also applied to the comparator 109X 1 , in response to which the comparator 109X 1  restarts the time comparison operation. Meanwhile, the pulse distributor circuit 110X 1  executes the evaluation of Eqs. (1), (2) to obtain the incremental value L i  and feedrate F i , and executes a pulse distribution operation based on L i , F i  to generate distributed pulses XP 1 . It should be noted that L i  =x 1 , F i  =x 1  /(T 2  -T 1 ) since L t  =x 1 , L a  =0, T t  =T 2 , T t  =T 1  in Eqs. (1), (2). 
     The distributed pulses XP 1  produced by the pulse distributor circuit 110X 1  enter a servo circuit 113X 1 . An X 1  -axis motor 114X 1  rotates under the control of the servo circuit 113X 1  so that the tool TL 1  (FIG. 3) starts to move (refer to segment X 1  in FIG. 4). By continuing the foregoing control operation, the tool TL 1  reaches a point P 11  in FIG. 3 at a time t=T 2 . 
     When the relation t=T 2  is attained, the comparators 109X 1 , 109Z generate the time-over signals TOX 1 , TOZ, in response to which the pulse distributor circuit 110X 1  immediately halts the pulse distribution operation. Moreover, the states SN 1 , SN 4  of counters 111X 1 , 111Z attain values of 3 and 2, respectively, and the processor 101 is interrupted. Upon being interrupted as described, the processor 101 reads the contents of counters 111X 1 , 111Z and, using the states SN 1 , SN 4 , access RAM 106 to read a third item of NC data T 3 , x 1  ; with regard to the X 1  axis and a second item of NC data T 4 , (z 1  +z 2 ); with regard to the Z axis, this NC data then being set in the registers 107X 1 , 107Z, respectively. Of the NC data T 3 , x 1  for the X 1  axis, the commanded time T 3  is applied to the comparator 109X 1  and pulse distributor circuit 110X 1 , and the commanded position x 1  is applied to the pulse distributor circuit 110X 1 . Of the NC data T 4 , (z 1  +z 2 ) for the Z axis, the commanded time T 4  is applied to the comparator 109Z and pulse distributor circuit 110Z, and the commanded position (z 1  +z 2 ) is applied to the pulse distributor circuit 110Z. Thereafter, the comparators 109X 1 , 109Z resume the time comparison operations. Meanwhile, the pulse distributor circuits 110X 1 , 110Z evaluate the Eqs. (1), (2) to obtain the incremental value L i  and the feedrate F i  and execute pulse distribution operations based on these values. With regard to the X 1  axis, L i  =0, F i  =0 will hold. As a result, no distributed pulses are generated and movement stops along the X 1  axis. Further, since L i  =(z 1  +z 2 ), F i  =(z 1  +z 2 )/(T 4  -T 2 ) will hold for the Z axis, distributed pulses ZP are generated and enter a servo circuit 113Z. As a result, a Z-axis motor 114Z rotates so that the workpiece WK (FIG. 3) starts to be moved along the +Z axis (refer to segment Z in FIG. 1). The tool TL 1  consequently travels relative to the workpiece WK, i.e., along a straight line segment L 1  (FIG. 3) to perform cutting. By continuing the foregoing control operation, the tool TL 1  moves relative to the workpiece and arrives at a point P 12  in FIG. 3 at the instant t=T 3  is attained. 
     Meanwhile, when t=T 3  is attained, the comparator X 1  generates the time-over signal TOX 1  to increment the state SN 1  of counter 111X 1  to 4 and interrupt the processor 101. Upon being interrupted, the processor 101 reads the state SN 1  (=4) of counters 111X 1 , accesses RAM 106 to read a fourth item of NC data T 4 , x 4  ;, and sets the data in the register 107X 1 . Of the NC data set in the register 107X 1 , the commanded time T 4  is applied to the comparator 109X 1  and pulse distributor circuit 110X 1 , and the commanded position x 4  is applied to the pulse distributor circuit 110X 1 . Thereafter, the comparator 109X 1  resumes the time comparison operation, and the pulse distributor 110X 1  evaluates the Eqs. (1), (2) to obtain the incremental value L i  and the feedrate F i  and executes pulse distribution operations based on these values. It should be noted that at this time the following holds: L i  =(x 4  -x 1 ), F i  =(x 1  -x 4 )/(T 4  -T 3 ). 
     As a result, simultaneous two-axis control is exercised along the X 1  and Z axes so that the tool TL 1  is moved along a line segment L 2  (FIG. 3) to perform taper cutting. By continuing taper machining, the tool TL 1  will reach a point P 13  at the instant t=T 4  is attained. 
     When the relation t=T 4  is attained, the comparators 109X 1 , 109Z generate the time-over signals TOX 1 , TOZ, in response to which the pulse distributor circuits 110X 1 , 110Z immediately halt their pulse distribution operations. Moreover, the states SN 1 , SN 4  of counters 111X 1 , 111Z attain values of 5 and 3, respectively, and the processor 101 is interrupted. Upon being interrupted, the processor 101 reads the contents of counters 111X 1 , 111Z and, using the states SN 1 , SN 4 , accesses RAM 106 to read a fifth item of NC data T 4  &#39;, 0 with regard to the X 1  axis and a third item of NC data T 5 , 0 with regard to the Z axis. This data being set in the registers 107X 1  and 107Z, respectively. After this has been accomplished, this data is applied to the comparators 109X 1 , 109Z and to the pulse distributor circuits 110X 1 , 110Z. Thereafter, control similar to the foregoing is carried out to return the tool TL 1  to its initial position at time T 4  &#39; and to return the workpiece WK to its initial position at time T 5 , so that the relation between the workpiece and each of the tools will be as shown in FIG. 3. When the relation t=T 5  is attained, the state SN 4  of the counter 111Z takes on a numerical value of 4 and a fourth item of NC data T 9 , 0 relating to the Z axis is set in the register 107Z. Since L i  =0 will hold, however, there is no movement of the workpiece WK along the Z axis so that the workpiece is at rest until t=T 9  is achieved. Further, when the relation t=T 4  &#39; is attained, the state SN 1  of the counter 111X 1  takes on a numerical value of 6, so that the processor 101 reads a sixth item of NC data concerning the X 1  axis out of the RAM 106. Since the sixth item of NC data is M99;, however, the processor 101 identifies this as indicating the end of control along the X 1  axis. 
     Thereafter, the comparator X 2  generates the time-over signal TOX 2  when the relation t=T 6  is attained. As a result, the state SN 2  of the counter X 2  takes on a numerical value of 2, so that the processor 101 reads a second item of NC data T 7 , x 2  concerning the X 2  axis out of the RAM 106 and sets the data in the register 107X 2 . The commanded time T 7  and the commanded position x 2  enter the pulse distributor circuit 110X2. The commanded time T 7  is also applied to the comparator 109X 2 , in response to which the comparator 109X 2  restarts the time comparison operation. Meanwhile, the pulse distributor circuit 110X 2  executes the evaluation of Eqs. (1), (2) to obtain the incremental value L i  and feedrate F i , and executes a pulse distribution operation based on L i , F i  to generate distributed pulses XP 2 . It should be noted that at this time the following holds: L i  = x 2 , F i  =x 2  /(T 7  -T 6 ). 
     The distributed pulses XP 2  produced by the pulse distributor circuit 110X 2  enter a servo circuit 113X 2 . An X 2  -axis motor 114X2 rotates under the control of the servo circuit 113X 2  so that the tool TL 2  (FIG. 3) starts to move (refer to segment X 2  in FIG. 4). The tool TL 2  reaches a point P 2  in FIG. 3 at a time t=T 7 . 
     Thereafter, control similar to the foregoing is carried out to return the tool TL 2  to its initial position at t=T 8 . At the same time that the tool TL 2  is returned to its initial position, the tool TL 3  starts travelling (see segment X 3  in FIG. 3) and stops upon arriving at a point P 31  (FIG. 3) at time T 9 . When time T 9  is reached, the workpiece WK travels a distance z 3  along the +Z axis until time t 10 . In other words, the tool TL 3  travels relative to the workpiece WK along a straight line L 3  to perform cutting. The tool TL 3  and workpiece Wk subsequently return to their initial positions and control for machining the part having the shape shown in FIG. 3 ends. 
     According to the foregoing description, the arrangement is such that a subsequent item of NC data is read out of the RAM 106 whenever a time-over signal is generated. However, an arrangement is permissible wherein two blocks of NC data are read at all times by means of a prereading technique. It is also possible to provide the NC data with an M-function instruction or the like. Furthermore, while the NC data have been created so as to specify a relation between time and position by using a time chart, it is also possible to create NC data so as to specify a relation between a rotational angle and position by using a Q-l table in which a rotational angle Q is taken as a horizontal axis and position l is taken as a vertical axis. FIG. 7 is a block diagram of an embodiment for a case where NC data are created by using a Q-l table. FIG. 8 is an example of a pulse distributor circuit in such case. 
     FIG. 7 differs from FIG. 2 in that (1) the timer 108 of FIG. 2 is supplanted by a pulse generator 202 for generating one rotation pulse RP each time a motor 201 driving a rotary shaft rotates through a predetermined angle, and by a counter 203 for monitoring the rotational angle by counting the rotation pulses RP generated by the pulse generator 202, (2) a value (rotational angle) A counted by the counter 203 is applied as an input to each of the comparator circuits 109X 1 , 109X 2 , 109X 3 , 109Z and (3) the rotation pulses RP are applied as inputs to the pulse distributor circuits 110X 1 , 110X 2 , 110X 3 , 110Z. 
     The comparators 109X 1 , 109X 2 , 109X 3 , 109Z compare rotational angles A 1 , A 2 , A 3 , A 4  specified by NC data with the actual rotational angle A produced by the counter 203. When agreement is attained, the comparators produce respective arrival signals AR 1 , AR 2 , AR 3 , AR 4  instead of the time-over signals TOX 1 , TOX 2 , TOX 3 , TOX 4  of FIG. 2. The arithmetic unit SPMC (FIG. 8) of each of the pulse distributor circuits 110X 1 , 110X 2 , 110X 3 , 110Z calculates the incremental value L i , which is the difference between the position L t  commanded by the NC data and the commanded position L a  of the preceding block stored in the position register APR, and delivers the incremental value to the pulse interpolator PIC. The latter produces distributed pulses by executing a well-known pulse interpolation calculation based on the incremental value L i  whenever the rotation pulse RP is generated. 
     According to the present invention, the arrangement is such that correspondence between time and position, or between rotational angle and position, is created for each controlled axis. NC data can therefore be created in a simple manner from a time chart or a Q-l table. In addition, according to the present invention, the apparatus is so constructed as to enable NC control on a time or rotational angle basis so that numerical control can be performed by using the aforementioned NC data. The invention is therefore extremely effective when applied to a multi-spindle automatic lathe.