Spindle speed control method and apparatus

Abstract: A method and an apparatus for controlling spindle speed are disclosed. When the speed ranges of respective first, second and third gear ranges are selected in advance so that speed ranges corresponding to neighboring gear ranges par­ tially overlap one another, and the gear range conforming to the commanded spindle speed is selected for rotating the spindle at the commanded spindle speed, it is decided whether the commanded spindle speed belongs to the currently selected range, no gear change is made if the decision is affirmative, and the gear range to which the newly commanded spindle speed belongs is found if the decision is negative, the gear range being switched to the gear range thus found.

Description: This invention relates to a spindle speed control method and apparatus for an NC machine tool, and more particularly to such method and apparatus in which the speed ranges for respective gears are selected in advance so that the speed ranges corresponding to neighboring gears overlap one another. In NC machine tools, the spindle speed is commanded by an S-function instruction from a numerical control device. The spindle speed is required to have a wide speed range. Gear means are used in a known manner so that this wide speed range is covered by a single electric motor. The desired gears are selected in advance by an M-function instruction in accordance with the commanded spindle speed so that the spindle is rotated at the commanded spindle speed. In Fig. 1, the relation between spindle speed ranges and the corresponding gear ranges (i.e. gears) is shown. The first gear covers the speed range between 500 and 1500 rpm, the second gear covers the sped range between 1000 and 3000 rpm, and the third gear covers the speed range between 2000 and 5000 rpm. The speed ranges of neighboring gears overlap one another as shown. When the speed ranges of neighboring gears overlap one another in this manner, care must be taken or the number of times the gears are switched will be unnecessarily high, thus affecting the machining time. This is because conventionally, for controlling the rotational speed of the spindle of an NC machine tool to which the present invention is applicable, a spindle speed is commanded by an S-function instruction, and the gears are switched according to an M-function instruction which corresponds to the commanded spindle speed. According to the conventional control method, it is not determined which gear is selected at present each time a spindle speed is commanded, but gears are successively checked from a low-speed gear upwards until the lowest gear selectable for the commanded speed is determined and then selected, with the result that the gears are required to be switched frequently. This method of determining and then selecting a gear is disadvantageous in that the time necessary for the control of the spindle rotational speed is unnecessarily long. This is because when a spindle speed is commanded by an S-function instruction, an M-function instruction for selecting the appropriate spindle gear on the above basis is given from a numerical control device to the machine tool, and the machining operation of the machine tool is suspended until an M-function completion signal is subsequently sent from the machine tool back to the numerical control device. It can thus be understood that operation involving a high frequency of gear switching will prolong the time necessary for changing the spindle speed and, hence, prolong the machining time. It is therefore necessary to minimize the number of times gear switching is performed. However, the conventional system involves switching gears a large number of times, as has been explained. More specifically, for example with referenced to Figure 1, when the spindle is currently rotating at 1800 rpm in the second gear range, and a newly commanded spindle speed is 1300 rpm, included in the overlapping speed range of the first and second gears, conventionally a gear change is made to the first gear. The reason is that the gear to which the commanded spindle speed belongs is determined and then selected starting from the lower gear, as described hereinbefore. Thus, whether the commanded spindle speed is provided by the first, second or third gear is decided in this order and is based on a negative decision regarding the respective preceding ranges. Thus, when the spindle is rotating at 3100 rpm in the third range, and the newly commanded spindle speed is 2950 rpm which is included in the range overlapping the second and third ranges, the gear is switched from the third gear to the second gear. In actuality, however, gear changes are not required for speed changes from 1800 rpm to 1300 rpm or from 3100 rpm to 2950 rpm. According to one aspect of the present invention there is provided a method of controlling spindle speed in an NC machine tool employing spindle drive gears providing predetermined respective speed ranges such that the speed ranges of neighboring gears overlap one another, the method being to select a gear which can provide a commanded spindle speed and said method comprising the steps of: (a) storing data identifying the currently selected gear; (b) deciding whether a newly commanded spindle speed falls within the speed range of the stored currently selected gear; (c) controlling the spindle speed without making a gear change when the newly commanded spindle speed is found to fall within the speed range of the stored currently selected gear as a result of the decision in step (b) above, even when the newly commanded spindle speed also falls within the speed range of an adjacent gear and irrespective of whether this adjacent gear is higher or lower than the stored currently selected gear; or (d) finding a gear providing a speed range which the newly commanded spindle speed falls and switching to this gear when the newly commanded spindle speed is found not to fall within the speed range of the stored currently selected gear as a result of the decision in step (b) above. According to a further aspect of the present invention there is provided an apparatus for controlling spindle speed for a drive of an NC machine tool in which speed ranges obtainable with respective spindle drive gears are determined in advance such that the speed ranges obtainable with neighboring gears overlap one another, the apparatus being operable to select a gear conforming to a commanded spindle speed and comprising: a) memory means for storing minimum and maximum speeds obtainable with the respective gears; b) gear memory means for storing data identifying the current gear; c) gate means responsive to a newly commanded spindle speed S for delivering the minimum and maximum speeds of the current gear stored in said gear memory means; d) decision means responsive to the output from said gate means for deciding whether the newly commanded spindle speed S falls within the speed range of the current gear, based on said minimum and maximum speeds and said commanded spindle speed; e) means for delivering a signal, indicating that a gear change is not required when the newly commanded spindle speed is found to fall within said range as a result of a decision in said decision means, even when the newly commanded spindle speed also falls within the speed range ot an adjacent gear and irrespective of whether this adjacent gear is higher or lower than the stored currently selected gear; and f) gear change control means for finding a gear which can provide said newly commanded spindie speed, when the commanded spindle speed is found not to fall within said range as a result of a decision in said decision means, and switching to the gear thus found. Examples of the present invention may provide a method and apparatus for controlling spindle speed, according to which the frequency of making gear changes in the foregoing cases is minimized. An example of the present invention provides a method and apparatus for controlling spindle speed, in which a gear change is not made in a case where the spindle speed is changed but the newly commanded spindle speed is included within the current gear speed range, thus reducing the time necessary for switching the spindle speed. According to a preferred example of the present invention, in instances where the speed ranges of the respective gears are selected in advance, and the gears of the gear speed ranges conforming to the commanded spindle speed are selected for rotating the spindle at the commanded spindle speed, the gear speed range of the currently selected gears is stored in memory. It is then decided to which of the gear speed ranges a newly commanded spindle speed belongs, and whether the commanded spindle speed belongs to the speed range of the stored gear. If the commanded spindle speed has been decided as belonging to the speed range of the stored gear, the spindle speed is controlled without making any gear change. If otherwise, the gear speed range to which the newly commanded speed belongs is found and the gear is switched to the gear thus found. Brief description of the drawings Fig. 1 is a diagrammatical view showing the relation between gears and speed ranges; Fig. 2 is a block diagram showing a preferred embodiment of the present invention; and Fig. 3 is a flow chart showing spindle speed control according to the present invention. Fig. 2 is a block diagram showing a preferred embodiment of the present invention. A minimum speed Smi1 and a maximum speed Sma1 for the first gear are stored in a first range memory 101, while a minimum speed Smi2 and a maximum speed Sma2 for the second gear are stored in a second range memory 102. Similarly, a minimum speed Smi3 and a maximum speed Sma3 are stored in a third range memory 103. The current speed range, and thus the first, second or third gear, is stored in a range memory 104 constituted by a ternary register. Thus, when the data stored in the range memory 104 is "01", "10" or "11", the first, second or third gears are stored in the memory 104, respectively. When a new spindle speed S is commanded, the minimum and maximum speeds Smin and Smax for-the current gear stored in the range memory 104 are delivered to a decision unit 106. Using Smax, Smin and the commanded spindle speed S, the unit 106 decides whether the equation Smin≦S≦Smax holds. If the equation (1) does hold, a signal GNC, indicating that a gear change is not required, is delivered by the decision unit 106. In response to the signal GNC, the gear speed range Rn stored in the range memory 104 is delivered through a gate 108 to a gear change control unit, not shown. Thus, no gear change is made. If the equation (1) does not hold, a gear range change signal GRC is delivered from the decision unit 106. Upon receiving the gear range change signal GRC, an arithmetic unit 107 adds +1 to the current range Rn stored in the range memory 104, in other words, it performs an operation Rn+1→Rn (2) and the result of the operation is stored in the range memory 104. The gate 105 is now in a position to supply the decision unit 106 with the minimum and maximum speeds of the speed range stored in the range memory 104. From this time on, the speed range to which the commanded spindle between S belongs is delivered ultimately through gate 108 by a sequence of operations similar to those described above. It should be noted that the minimum and maximum speeds enter the decision unit 106 in the order of the first, second and third gears, the second, third and first gears, or the third, first and second gears, depending on whether the current gear is the first, second or third gear, respectively. Fig. 3 shows a flow chart indicating the sequence for controlling spindle speed according to the present invention. First, the currently selected gear Rn is stored. Then; the maximum speed Smai and the minimum speed Smii of the ith range, that is, the gear to which the currently commanded spindle speed belongs, are stored. When a new spindle speed S is commanded, it is decided whether the new spindle speed S belongs to the currently stored gear Rn. If affirmative, that is, if the new spindle speed S is not larger than the maximum speed Smax of the gear Rn and not smaller than the minimum speed Smin of said gear, the spindle speed is controlled within the current range without making a gear change. If negative, and if the new spindle speed S is larger than the maximum speed Smax of the aforementioned gear Rn, then the gear change is made to Rn+1 and, thus, to a range of an order higher than that of the gear Rn. If the spindle speed S is less than the minimum speed Smin of the aforementioned gear Rn, the gear change is made to Rn-1 and, thus, to a speed range of an order lower than that that of the gear Rn. In the drawing, n designates the gear number, R′ the gear to be selected next, Smin the minimum speed of the nth gear and Smax the maximum speed of the nth gear. From the foregoing, it is seen that, when the spindle speed is changed, it is decided first of all whetherthecommanded spindle speed belongsto the current gear speed range and, if affirmative, no gear change is made. Hence, contrary to the prior-art system, a gear change is not executed when the spindle speed is changed from 1800 to 1300 rpm or from 3100 to 2950 rpm. It is sufficient to change the speed within the current gear speed range, that is, within the second or third gear speed range, respectively, thus making it possible to reduce the time required in switching the spindle speed. The present system is of the type in which the signal GNC is supplied when it is not necessary to make a gear change. However, the present system may be applied to a case in which the gear change signal is supplied only when a gear change is required.

Claims: A method of controlling spindle speed in an NC machine tool employing spindle drive gears providing predetermined respective speed ranges such that the speed ranges of neighboring gears overlap one another, the method being to select a gear which can provide a commanded spindle speed and said method comprising the steps of: a) storing data identifying the currently selected gear; b) deciding whether a newly commanded spindle speed falls within the speed range of the stored currently selected gear; c) controlling the spindle speed without making a gear change when the newly commanded spindle speed is found to fall within the speed range of the stored currently selected gear as a result of the decision in step b) above, even when the newly commanded spindle speed also falls within the speed range of an adjacent gear and irrespective of whether this adjacent gear is higher or lower than the stored currently selected gear; or d) finding a gear providing a speed range within which the newly commanded spindle speed falls and switching to this gear when the newly commanded spindle speed is found not to fall within the speed range of the stored currently selected gear as a result of the decision in step b) above. The method as claimed in Claim 1, wherein said step d) comprises selecting a gear of an order higher than the currently selected gear when the newly commanded spindle speed is larger than the maximum speed provided by said currently selected gear. The method as claimed in Claim 1 or 2, wherein said step d) comprises selecting a gear of an order lower than the currently selected gaer when the newly commanded spindle speed is lower than the minimum speed provided by said currently selected gear. An apparatus for controlling spindle speed for a drive of an NC machine tool in which speed ranges obtainable with respective spindle drive gears are determined in advance such that the speed ranges obtainable with neighboring gears overlap one another, the apparatus being operable to select a gear conforming to a commanded spindle speed and comprising: a) memory means (101, 102, 103) for storing minimum and maximum speeds obtainable with the respective gears; b) gear memory means (104) for storing data identifying the current gear; c) gate means (105) responsive to a newly commanded spindle speed S for delivering the minimum and maximum speeds of the current gear stored in said gear memory means; d) decision means (106) responsive to the output from said gate means (105) for deciding whether the newly commanded spindle speed S falls within the speed range of the current gear, based on said minimum and maximum speeds and said commanded spindle speed; e) means (106) for delivering a signal, indicating that a gear change is not required when the newly commanded spindle speed is found to fall within said range as a result of a decision in said decision means (106), even when the newly commanded spindle speed also falls within the speed range of an adjacent gear and irrespective of whether this adjacent gear is higher or lower than the stored currently selected gear; and f) gear change control means for finding a gear which can provide said newly commanded spindle speed, when the commanded spindle speed is found not to fall within said range as a result of a decision in said decision means (106), and switching to the gear thus found.

Inventors: KISHI HAJIMU, TAKEGAHARA TAKASHI, TANAKA KUNIO, KISHI, HAJIMU, TAKEGAHARA, TAKASHI, TANAKA, KUNIO
Applicants: FANUC LTD, FANUC LTD.
Application year: 1983
Main classification: G05B19
IPC codes: G05B19, G05D13