High-precision pulse interpolation method
CROSS REFERENCE TO RELATED APPLICATIONS 
     This application is cross-referenced to U.S. application Ser. No. 07/342,533 and U.S. application Ser. No. 07/342,534. 
     BACKGROUND OF THE INVENTION 
     The present invention relates to a high-precision pulse interpolation method, and more particularly, to a high-precision pulse interpolation method for controlling a piston lathe and the like. 
     Due to the increasing speed of microprocessors and increased integration of memory circuits, etc., numerical control apparatuses must carry out more complex controls and process greater quantities of data. Accordingly, a time allowed for carrying out pulse interpolation is very limited. Particularly, when using an increased number of axes, it is difficult to shorten the task period for a pulse interpolation, which is about 5 to 10 ms. 
     Nevertheless, to carry out machining by using a piston lathe, a cam grinder or the like, or the equivalent to a conventional machining using a cam, a task period of about 1 ms is required. 
     Such a task period can be achieved if a faster microprocessor or more microprocessors are used. This, however, greatly increases costs and thus is not practical. 
     SUMMARY OF THE INVENTION 
     In view of the foregoing, the object of the present invention is to provide a high-precision pulse interpolation method of controlling a piston lathe and the like. 
     To achieve the above object, the present invention provides a high-precision pulse interpolation method wherein an amount of movement of individual axes of a numerical control apparatus is interpolated with a high precision. The ; and method comprises outputting an interpolation pulse twice or more during one task, the interpolation pulse being output at regular intervals by a servo control circuit to thereby carry out a pulse interpolation with a high precision. 
     That is, a plurality of interpolations are carried out during one task. Each interpolation pulse is delivered to the servo control circuit, which then outputs the interpolation pulse at regular intervals for processing, whereby a result equivalent to a pulse interpolation in a shorter task period can be obtained. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram illustrating a numerical control apparatus according to one embodiment of the present invention; 
     FIG. 2 is a flowchart of a process executed in the numerical control apparatus (CNC); 
     FIG. 3 is a schematic diagram of a piston lathe to which the present invention is applied; and 
     FIG. 4 is a diagram illustrating the relationship between an interpolation and a task time. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     An embodiment of the present invention will now be described with reference to the drawings. 
     FIG. 3 is an example of a piston lathe to which the present invention is applied. In FIG. 3, a piston 11 is fixed to and rotated by a chuck, not shown, and a tool 14 for turning is moved in the X-axis and Z-axis directions. The X axis comprises an X1 axis 13 and an X2 axis 12. The X2 axis 12 is designed to move at a high speed. The movement of the X axis is normally controlled by the X1 axis 13. 
     To machine the piston 11 at a high speed with the arrangement of FIG. 3, the X2 axis 12 must quickly respond in synchronism with the rotation of the piston 11, and therefore, a task time for the necessary interpolation should be approximately 1 ms. 
     FIG. 4 is a diagram illustrating the relationship between the interpolation and the task time. Assuming that an interpolation is carried out between points P0 and P8, if the task period is 8 ms, then the interpolation is carried out linearly from point P0 to point P8, and accordingly, a deviation from the intended curve occurs. In contrast, if the task period is 1 ms, an interpolation is carried out for points P1, P2, P3, . . . and P8, whereby a curve closer to the intended curve is obtained. The present invention is capable of carrying out such an interpolation regardless of the performance of the microprocessor and without increasing the number of microprocessors used. 
     FIG. 1 is a block diagram of a numerical control apparatus according to one embodiment of the invention. As shown in FIG. 1 a numerical control apparatus (CNC) 1, a shared RAM 2, a digital servo control circuit 3, a servo amplifier 4, and a servomotor 5 are connected in series. The numerical control apparatus (CNC) 1 carries out a pulse interpolation eight times during a one eighth period of every task, and writes data 10 of the eight interpolations into the shared RAM 2. 10a denotes the data number and 10b denotes the number of pulses for one interpolation. 
     The digital servo control circuit 3 reads this data, and delivers it separately according to the eight interpolations, and therefore, the numerical control apparatus (CNC) 1 can control the servomotor 5 in the same way as when the interpolation is carried out in a 1/8 period of a task. 
     Of course, the number of times the interpolation is carried out during one task is determined by the required interpolation period, the processing speed of the microprocessor, and tasks to be processed other than the pulse interpolation, etc. 
     Instead of performing a plurality of interpolations during each task, a large number of interpolations may be previously carried out. The interpolation data may be sent collectively in units of eight interpolations to the digital servo control circuit 3 through the shared RAM 2. 
     FIG. 2 is a flowchart of a process executed in the numerical control apparatus (CNC) 1, wherein the number prefixed by &#34;S&#34; represents the step number. 
     [S1] It is determined whether the mode is a high-speed interpolation mode. If the mode is a high-speed interpolation mode, S2 is executed, and if not, S3 is executed. 
     [S2] An interpolation is carried out eight times during an interpolation task period, an interpolation pulse P0 is output, and a flag HRS=1 is set to inform a pulse interpolator of the interpolation period. 
     [S3] An interpolation is carried out in accordance with the interpolation task period, and an interpolation pulse P0 corresponding to one interpolation is output for one task. The interpolation period for the pulse interpolator is equal to the task period, and HRS=0 is set. 
     [S4] P0 and HRS are set in the interpolator. 
     A high-precision pulse interpolation is carried out as shown above, but of course, the number of times the interpolation is carried out during one task is determined by the required interpolation period, the processing speed of the microprocessor, and tasks to be processed other than the pulse interpolation, etc. 
     In the above description, the piston lathe is referred to as a controlled system. The invention also can be used, for example, for a prior art grinder using a cam, etc. The use of the present invention eliminates the need to fabricate a cam and thus shortens the process. 
     As described above, according to the present invention, an interpolation is carried out twice or more during one task period, and the interpolation data is divided and output by the servo control circuit. Accordingly, it is unnecessary to use a microprocessor having a different performance, or to increase the number of microprocessors, to carry out a high-precision pulse interpolation. Therefore, a high-precision pulse interpolation can be carried out for a prior art machine tool which performs machining by using a cam, by eliminating the need to use a cam.