Turning control apparatus and method
BACKGROUND OF THE INVENTION 
     This invention relates to an apparatus and method for controlling a turning operation and, more particularly, to a turning control apparatus and method wherein spindle speed may be varied without either defacing screw threads or diminishing the dimensional accuracy of a screw. 
     A turning machining operation, such as may be applied to the cutting of screws and gears or to the grinding of gear wheels, requires that movement of the workpiece or tool cutting the workpiece be synchronized with the rotation of the machine tool spindle. When cutting a screw, for example, failure to synchronize movement of the cutting tool along the Z-axis with rotation of the spindle results in a screw of poor dimensional precision or causes the formation of double threads or the defacement of threads when the screw is subjected to finishing work. For this reason, a signal is generated at each revolution of the spindle, movement of the cutting tool along the Z-axis is started in synchronization with the signal, and subsequent feed along said axis is made synchronous with spindle rotation, based on the generated signal. Also, in view of a delay attributed to the associated servo system, in the prior art the same rotational speed is adopted for both rough machining and finishing machining. The reason for the latter will now be set forth. 
     Theoretically, cutting speed can be raised for finishing work because the load sustained during finishing is lighter than that which prevails during rough machining. When the rotational frequency (r.p.m.) of the spindle and the synchronized feed speed along the Z axis are made m times greater than what would prevail during rough machining, however, the amount of delay imposed by the Z-axis servo system differs from the delay which occurs during rough machining. The servo delay d is proportional to the feed speed f and is expressed by the following: 
     
         d=f/k                                                      (1) 
    
     where k the servo system gain. The difference in delay between the rough and finishing machining operations would give rise to a screw cutting error, making it impossible to cut a screw to a high precision. It is for this reason that the spindle is rotated at the same speed for both rough machining and finishing. 
     A disadvantage encountered in the prior art, therefore, is that a highly efficient operation cannot be achieved since it is necessary to perform the finishing process at the slow speed decided by rough machining. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the present invention is to provide a turning control apparatus and method wherein the rotational speed of the spindle can be varied from one speed during rough machining to another speed during finishing work. 
     Another object of the present invention is to provide a turning control apparatus and method wherein machining time can be shortened by varying the rotational speed of a spindle when required without causing any deviation is the path of the thread being cut. 
     A further object of the present invention is to provide a turning control apparatus and method wherein total machining time is shortened and a highly accurate screw cutting operation achieved when the same workpiece is subjected to screw cutting work such as rough cutting and finishing by various cutting tools that are exchanged for one another. 
     According to the present invention, the foregoing objects are attained by providing a system for controlling a turning operation in which a workpiece, rotated by a spindle, is cut by a cutting tool transported axially of the spindle in synchronization with the rotation thereof. The rotational speed of the spindle is sensed prior to the start of cutting, and the tool position axially of the spindle is corrected prior to the start of cutting based on the sensed rotational speed. In another aspect of the invention, once the rotational speed of the spindle has been sensed, a correction based on the sensed speed can be effected in the position at which a signal indicative of one spindle revolution is generated. The signal acts as a start signal to initiate cutting of the workpiece. In either case, cutting will always start from the same angular position of the workpiece so that a thread to be cut will not deviate from the intended path even when the rotational speed of the spindle is changed. This permits machining speed for finishing to be made larger than that for rough machining, thereby shortening machining time. A highly accurate threading operation is possible despite variations in spindle speed. 
     Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a diagrammatic representation useful in describing a threading operation; 
     FIG. 2 is a development of a thread groove where a workpiece is cut along one side thereof and the workpiece surface developed in a plane; 
     FIG. 3 is a view showing the delay characteristic of a servo system; 
     FIGS. 4A and 4B, which are views useful in describing the principle of the present invention, showing how the stopping position of a cutting tool prior to the start of threading work is changed in accordance with the rotational speed of a spindle; 
     FIG. 5, which is a view useful in describing the principle of the present invention, shows how a position at which a one-revolution signal is generated is changed in accordance with the rotational speed of a spindle; 
     FIG. 6 is a block diagram illustrating a first embodiment of a turning control apparatus according to the present invention; 
     FIG. 7 is a block diagram illustrating a second embodiment of a turning control apparatus according to the present invention; and 
     FIG. 8 shows the threading starting position on the workpiece and the direction of its shift according to the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     With reference to FIG. 1 illustrating a screw threading operation in diagrammatic form, a workpiece WK is rotated at a constant speed by a spindle motor, not shown, while a cutting tool TB is transported at a predetermined speed along the Z axis, namely axially of the spindle, so that the nose of the cutting tool may cut a thread groove TD in the outer peripheral surface of the workpiece WK. If L (mm/rev) represents the lead of the screw, feed will be so controlled that the cutting tool TB travels L mm. per spindle revolution. To cut a screw having the same lead L at, say, twice the feed speed, therefore, the rotational speed of the spindle motor will also need to be doubled. 
     FIG. 2 is useful in describing the cutting of a thread groove and represents a development of the peripheral surface of the workpiece WK obtained by cutting the surface along the dot-and-dash line, shown in FIG. 1, and developing the surface in a plane. The solid line in FIG. 2 is a development of an ideal thread groove, while the dashed line and dot-and-dash line are developments of thread grooves at feed speeds of f S  and f L , respectively, where f L  &gt;f S . In the ideal case where servo system delay is non-existent, the thread groove will always be cut in accurate fashion, as indicated by the solid line, regardless of the feed speed. Delay does exist in actual practice, however, and is dependent upon feed speed. Specifically, as shown in FIG. 3, the actual speed f at which the tool TB moves is expressed by the following for the feed speed f S  : 
     
         f=f.sub.S [1-exp(-kt)] 
    
     so that there is a delay of d S  (=f S  /k). Similarly, the actual speed f for the feed speed f L  is expressed by: 
     
         f=f.sub.L [1-exp(-kt)] 
    
     the delay being d L  (=f L  /k). As a consequence, when the Z-axis feed motor is started, the actual speed will attain the commanded feed speed f S  or f L  upon passage of a length of time corresponding to a time constant T (equivalent to 1/k, which is the reciprocal of the gain). Because of the relation f S  &lt;f L , the relation r S  &lt;r L  will hold with respect to the rotational speed of the spindle (where r S , r L  are the rotational speeds which prevail at the feed speeds f S , f L , respectively), so that the angular positions O S , O L  of the spindle (workpiece) upon attainment of the feed speeds f S , f L , respectively, will be related by the inequality O S  &lt;O L . The result is that the cutting tool cuts the thread groove indicated by the dashed line in FIG. 2 when the feed speed f S  is commanded, and by the dot-and-dash line when the feed speed f L  is commanded. 
     It follows from the foregoing that conducting the threading operation at the feed speed f S  during rough machining and at the feed speed f L  for finishing work will cause the tool nose to follow paths that are not in agreement, resulting in double or overlapping threads or in a screw of poor dimensional precision. 
     Accordingly, if control is so executed in such a manner that threading can be carried out after the Z-axis feed speed attains a constant speed and from the same angular position regardless of the magnitude of the feed speed, then highly accurate threading will take place even if the feed speed and rotational speed are changed. 
     Therefore, according to a feature of the present invention which may be understood from FIG. 4A, the position along the Z-axis at which the cutting tool TB is stopped prior to beginning threading is changed between positions B S  and B L , depending upon the rotational speed of the spindle. The stopping positions may be decided in the following manner, serving as one example. 
     In FIG. 2, when the feed speed f L  is commanded for finishing machining (the rotational speed of the spindle being r L  for finishing, as mentioned above), the actual speed of the Z-axis feed motor attains the commanded value of f L  after the delay d L  (=f L  /k), and the angular position of the spindle assumes the value O L . Accordingly, if the position at which the tool is stopped prior to the start of the finishing operation is spaced away from the end face of the workpiece WK by a distance equivalent to d L  (FIGS. 4A and 4B), then the constant feed speed of f L  will be reached, and the workpiece will be subjected to the finishing process, starting at the angular position O L  after the generation of a signal indicative of the one revolution. On the other hand, the position at which the tool is stopped prior to rough machining is spaced from the end face of the workpiece WK by a distance equivalent to D S  &#39; (FIGS. 4A and 4B). Consequently, the constant speed of f S  will be reached at the angular position O S  after the generation of the one-revolution signal, and threading will start at the feed speed f S  exactly from the angular position O L . In other words, machining begins from a fixed angular position for both finishing and rough machining, and the feed speeds of f L  and f S  are attained by the time the machining operation starts. A further description of this feature of the invention will be had later in conjunction with FIG. 6. 
     According to another feature of the invention, the angular position at which the one-revolution signal is generated is changed while the position at which the cutting tool is stopped prior to machining is kept fixed, thereby holding the machining starting position constant and establishing a constant rotational speed at said starting position. This will now be described with reference to FIG. 5. 
     It was described in connection with FIG. 2 that when the feed speed f L  is commanded for finishing machining, the actual speed of the Z-axis feed motor attains the commanded value f L  after the delay d L  (=f L  /k), and that the angular position of the spindle assumes the value O L . Accordingly, by spacing the cutting tool from the end face of the workpiece WK by the distance equivalent to d L  prior to the finishing operation, the constant feed speed of f L  is reached and the workpiece is subjected to finishing starting at the angular position O L  after the generation of the one-revolution signal. Now, rather than establishing a different stopping position for the tool prior to rough machining, which is the approach taken in FIG. 4, the angular position at which a one-revolution signal is generated is, in effect, shifted to the right by an amount O d  in FIG. 5. In other words, the generation of a one-revolution signal is delayed by an amount corresponding to O d . Thus, a corrected one-revolution signal for rough machining is generated after the delay Od, which is measured from the instant at which a &#34;true&#34; one-revolution pulse is produced by a pulse coder, described later. The result is that machining will begin from a fixed angular position for both finishing and rough machining, with the feed speeds of f L  and f S  being attained by the time the machining operation starts. This aspect of the invention will be described later in further detail with reference to FIG. 7. 
     On further consideration of above operations, it becomes obvious that a shift of the threading starting position along the Z-axis i.e. axially of the spindle, is equivalant to a shift along the X-axis which is perpendicular to the spindle. This will be described in reference to FIG. 8. In FIG. 8, it is assumed that the programmed threading starting position is P, that the programmed threading stopping position is Q, that the threading starting position when the starting position is shifted along the Z axis is Psz, and that the threading starting position when the starting point is shifted along the X-axis is Psx. In a case where the threading starting position is shifted along the X-axis, the threading operation will proceed from Psx to P and from P to Q after detection of the one revolution signal, following movement of the cutting tool or workpiece to the point Psx. 
     Reference will now be had to the block diagram of FIG. 6 to describe a first embodiment of a turning control apparatus according to the present invention, wherein the stopping position of the cutting tool prior to the start of machining is changed in accordance with the rotational speed of the spindle. 
     In response to a command from a numerical control device (not shown), the cutting tool TB ordinarily is brought to rest at a position B L  spaced from the end face of the workpiece WK by a distance corresponding to d L  (FIG. 4) prior to the start of machining. A spindle motor 101 for rotating the workpiece has a pulse coder 102 mounted on its shaft. The pulse coder 102 is adapted to generate a single pulse P s  each time the spindle motor 101 rotates through a predetermined angle, as well as a one-revolution pulse P r  produced each time the spindle motor makes one full revolution. A speed sensor 103 counts the number of pulses P s  generated over a fixed length of time to thereby sense the rotational speed V s  of the spindle motor 101, a signal indicative of V s  being applied to a tool stopping position correction unit 104. The latter produces a signal indicative of a distance d c , based upon a relation between rotational speed and tool stopping position, which relation is stored previously in a memory 105. The distance d c  is equivalent to a distance given by d S  &#39;-d L , namely the distance between the stopping position B L  (FIG. 4) when finishing is to be performed, and the stopping position B S  when rough machining is to be carried out. The signal indicative of d c  is applied to a pulse distributor 107 through a gate circuit 106, the pulse distributor 107 performing a known pulse distribution operation based on d c  to produce distributed pulses P z , the number whereof corresponds to d c . A Z-axis servo circuit 108 responds to the pulses P z  to rotate a Z-axis servomotor MZ, which in turn transports the cutting tool to move its nose from point B L  to point B S . 
     Now assume that the numerical control device issues a numerical command for the threading operation, and that the gate circuit 106 allows the command to pass. Then, when the pulse coder 102 subsequently generates a one-revolution pulse Pr, the pulse distributor 107 responds by initiating a pulse distribution based on the numerical command applied thereto, whereby the rotation of the Z-axis servomotor MZ is controlled to transport the cutting tool along the Z axis. The feed speed becomes constant at the angular position O S , and cutting starts from the angular position O L . 
     FIG. 7 is a block diagram illustrating a second embodiment of a turning control apparatus according to the present invention, wherein a correction is made in the position at which the one-revolution signal is generated. 
     As described above with reference to the embodiment of FIG. 6, a command from the numerical control device stops the cutting tool at a position spaced from the end face of the workpiece WK by a distance corresponding to d L  (FIG. 5) prior to the start of machining. The pulse coder 102 generates a single pulse P s  each time the spindle motor 101 rotates through a predetermined angle, and a one-revolution pulse P r  produced each time the spindle motor makes one full revolution. A speed sensor 103 counts the number of pulses P s  generated over a fixed length of time to sense the rotational speed V s  of the spindle motor 101, and produces the signal indicative of V s . In accordance with this embodiment of the invention, the signal V s  is applied to a correction unit 201 for producing a signal indicative of a changed, or corrected, position for generation of the one-revolution signal, as will be described below. The correction unit 201 provides the abovementioned angle of rotation O d  using a relation between rotational speed and the position at which the one-revolution pulse P r  is generated, the relation being obtained from a memory 202. The angle of rotation O d  is expressed as the number of pulses P s  generated by the pulse coder 102. Accordingly, after the pulse coder 102 produces the one revolution pulse P r , the correction unit 201 produces a one-revolution signal P r  &#39; at the instant that O d  -number of pulses P s  are generated by the pulse coder. As seen from the pulse distributor 107, the one-revolution signal P r  &#39; is generated at an angular position different from that at which the one-revolution pulse Pr is produced. The pulse distributor 107, in response to the signal P r  &#39;, starts producing distributed pulses P z  based on a numerical command for threading received from the numerical control device. The distributed pulses control the rotation of the Z-axis motor MZ through the servo circuit 108, so that the cutting tool starts to be moved along the Z axis. The feed speed becomes constant at the angular position O S , and machining starts from the angular position O L . 
     Thus the spindle rotational speed during rough machining is stored in the memory, while the spindle rotational speed during finishing machining is picked up by the speed sensor, and the difference between these rotational speeds is obtained. During finishing machining operation, the one-revolution signal or machining starting position on the workpiece is shifted according to the difference. Following the above, the object of the present invention is achieved. 
     In accordance with the present invention as described and illustrated hereinabove, a thread being cut will not deviate from the intended path even when the rotational speed of the spindle is changed. This permits machining speed for finishing to be made larger than that for rough machining, thereby shortening machining time. A highly accurate threading operation is possible despite variations in spindle speed. 
     As many apparently widely different embodiments of the present invention can be made without departing from the spirit and scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.