NUMERICAL CONTROL APPARATUS

Abstract: Disclosed herein is a numerical control apparatus for controlling drive shafts in a rectangular co-ordinate system of machining apparatus such as a lathe, a miller, a laser beam machining apparatus, an electric discharge machining apparatus, a robot and the like, to thereby perform positioning control. More particularly, the numerical control apparatus comprises: a judgement means for judging whether an instruction in a machining program relates to a rapid-traverse circular-arcuate pass mode or not; a computation means (10) for computing a distance by which each servomotor (16a,b,c) is caused to move per unit time in the rapid-traverse circular-arcuate pass mode, when the judgement means proves that the instruction in the machining program relates to the rapid-traverse circular-arcuate pass mode; and a servomotor control means (13) for generating a signal for controlling each of the servomotors in accordance with the result of the computation by the computation means (10) to cause the servomotors to perform the relative positioning in the rapid-traverse circular-arcuate pass mode. Accordingly, the tool of the like can be speedily moved relative to the work along a circular or circular-arcuate pass with no interference.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention generally relates to a numerical control apparatus for controlling axes in a rectangular coordinate system of machinery, such as a machine tool (lathe, miller, machining center, etc.), a laser beam machine, an electric discharge machine, a robot and the like, to thereby perform positioning control. 2. Description of the Prior Art Fig. 1 shows a vertical-type machining center controlled by a numerical control apparatus. In the drawing, the reference numeral 1 designates a table for setting a work on it. The table 1 is movable in the directions of two coordinate axes, that is, x-coordinate axis and y-coordinate axis (hereinafter referred to as X-axis and Y-axis respectively). The reference numeral 2 designates a main spindle head movable in the direction of z-coordinate axis (hereinafter referred to as Z-axis). The main spindle head 2 is provided with a main spindle 3 which is provided at the top and of the main spindle head 2 so that a tool supplied from a tool magazine 4 can be attached to the main spindle 3. The tool magazine 4 is arranged to stock various kinds of tools (T) in it. The reference numeral 5 designates a numerical control apparatus and a power control cabinet, and the reference numeral 6 designates an operating board. In the case where a work is to be machined by use of such a machining center provided with a numerical control apparatus, the table 1 must be moved along the X- and Y-axes and the main spindle head 2 must be moved along the Z-axis so that the tool (T) attached to the main spindle 3 can be subject to positioning control relative to the work placed on the table 1. In other words, it is necerssary that the tool (T) is controlled to come to a target position, such as a machining start point or the like, of the work. The positioning control aims at preparing for machining the work and does not aim at machining the work. Accordingly, it is preferable that the tool is moved as fast as possible, relative to the table. As positioning control in the prior art type numerical control apparatus, positioning control by means of a linearly positioning pass has been used or positioning control using a cutting feed mode had been required. In the case of use of positioning control by means of a linearly positioning pass [EIA word address format: G00], the movement of the tool (T) relative to the work can be made very fast (for example 12000 mm/min). In this case, however, the relative movement is substantially linear. Accordingly, any one of the following three movement forms must be used to generate a machining program, considering factors such as interference between the work and the tool and the like: (A) Simultaneous biaxial control movement (Refer to Figs. 2(A)-(C) and 3(A)-3(C)); (B) Simultaneous uniaxial outer-round movement (Refer to Figs. 4(A)-4(C)); and (C) Simultaneous uniaxial inner-round movement (Refer to Figs. 5(A)-5(C)). In the case of use of positioning control (Refer to Figs. 6(A)-6(C)) using a cutting feed mode [in EIA word address format, G01: linear cutting, G02: circular-arcuate clockwise (right-handed) cutting, G03: circular-arcuate counterclockwise (left-handed) cutting, and the like], the movement of the tool (T) relative to the work not only may be linear, but may be right- or left-handed. However, as speed increases, droop of a servo system with respect to control command increases to exceed an allowable error so that a protective circuit operates for emergency stop. Accordingly, in general, the cutting feed mode cannot be used at a speed higher than 5000 mm/min. In the following, the aforementioned positioning controls are described more in detail to facilitate the understanding as to what form and what size the work should have in various cases where the positioning controls are applied to the work. In the case where drilling is carried out in the work (W) as shown in Figs. 2(A) and 2(B), and more particularly, in the case where drilling points are determined so that the tool (T) is out of touch with the outside wall fo the work (W) even when the top of the tool (T) takes the shortest route to move linearly from the drilling start point (Xa, Ya, Zr₁) to the net drilling start point (Xb, Yb, Zr₁) relative to the work (W), a machining program using linearly positioning pass by means of simultaneously biaxial control movement (A) is generated to establish such a machining pass as shown in Figs. 2(A) and 2(C). In this case, when the co-ordinates and sizes of respective parts are determined as shown in Figs. 2(A) to 2(C), a typical example of the machining program is as follows. <PROGRAM> <OPERATION> N001 G28 X₀ Y₀ Z₀; Check machine origin. N002 G90; Set absolute coordinate system. N003 Tn M06; Replace tool by No.n. Preset tool length. N004 Sn M03; Start n r.p.m. forward rotation of main spindle. N005 G99; Designate to return to point R. N010 G00 Xx a Yy a ; Rapid traverse to first machining start point a. Positioning. N011 G81 Zz₁ Rr₁ Ff₁; Drilling by fixed cycle G81. Return to point R. N020 Xx b Yy b ; Rapid traverse to point b. Positioning. Drilling by fixed cycle G81. Rapid return to point R. N030 Xx c Yy c ; Rapid traverse to point c. Positioning. Drilling by fixed cycle G81. Rapid return to point R. N040 G80; Cancel G81. N041 G28 Z₀; Rapid return to the origin of z-axis. N042 G28 X₀ Y₀; Rapid return to the origin of x- and y-axes. N043 M30; Program end. Rewind tape. In the case where drilling is executed in the work (W) as shown in Figs.3(A) and 3(B), and more particularly, in the case where drilling points are determined so that the tool (T) comes in contact with the outside wall of the work (W) when the top of the tool (T) takes the shortest route to move linearly from the drilling start point (Xa, Ya, Zr₁) to the next drilling start point (Xb, Yb, Zr₁) relative to the work (W), a machining program using linearly positioning pass by means of simultaneously biaxial control movement (A) is generated to establish such a machining pass as shown in Figs. 3(A) to 3(C). In this case, when the co-ordinates and sizes of respective parts are determined as shown in Figs. 3(A) to 3(C), a typical example of the machining program is as folllows. <PROGRAM> <OPERATION> N001 G28 x₀ y₀ z₀; Check machine origin. N002 G90; Set absolute coordinate system. N003 Tn M06; Replace tool by No.n. Preset tool length. N004 Sn M03; Start n r.p.m. forward rotation of main spindle. N010 G0 Xx a Yy a ; Rapid traverse to first machining start point a. Positioning. N011 G0 Zr₁; Rapid traverse to point R. N012 G1 Zz₁ Ff₁; Drilling at f₁ mm/min and feeding to point z₁. N013 G0 Zr₂; Rapid return to point r₂. N020 G0 Xxb Yy b ; Simultaneously biaxial rapid traverse to point b . Positioning. N021 G0 Zr₁; Rapid traverse to point R. N022 G1 Zz₁; Drilling at f₁ mm/min and feeding to point z₁. N023 G0 Zr₂; Rapid return to point r₂. N030 G0 Xx c Yy c ; Simultaneously biaxial rapid traverse to point c . Positioning. N031 G0 Zr₁; Rapid traverse to point R. N032 G1 Zz₁; Drilling at f₁ mm/min and feeding to point z₁. N040 G28 Z₀; Rapid return to the origin of z-axis. N041 G28 X0 Y0; Rapid return to the origin of x- and y- axes. N042 M30; Program end. Rewind tape. In the case where drilling is executed in the work (W) as shown in Figs. 4(A) and 4(B), and more particularly, in the case where drilling points are determined so that the tool (T) comes in contact with the outside wall of the work (W) if the top of the tool (T) takes the shortest route to move linearly from the drilling start point (Xa, Ya, Zr₁) to the next drilling start point (Xb, Yb, Zr₁) relative in the work (W), and so that machining time is prolonged if the aforementioned machining pass (in which the tool can be escaped in the z-axis so as not to interfere with the work at the time of linearly positioning) as shown in Figs. 3(A)-3(C) is employed, a machining program using linear positioning pass by means of simultaneously uniaxial outward-rotatory movement (b) is generated to establish such a machining pass as shown in Figs. 4(A) and 4(C). In this case, when the co-ordinates and sizes of respective parts are determined as shown in Figs. 4(A) to 4(C), a typical example of the machining program is as follows. <PROGRAM> <OPERATION> N001 G28 X₀ Y₀ Z₀; Check machine origin. N002 G90; Set absolute coordinate system. N003 Tn M06; Replace tool by No.n. Preset tool length. N004 Sn M03; Start n r.p.m. forward rotation of main spindle. N005 G99; Set to return to point R. N010 G00 Xx a Yy a ; Rapid traverse to first machining start point a. Positioning. N011 G81 Zz₁ Rr₁ Ff₁; Drilling by fixed cycle G81. Rapid return to point R. N012 G80; Cancel fixed cycle G81. N020 G00 Xx b ; Rapid traverse the x-coordinate to point b . N021 G81 Yy b Zz₁ Rr₁ Ff₁; Rapid traverse the y-coordinate to point b. Positioning. Drilling by fixed cycle G81. Rapid traverse to point R. N022 G80; Cancel fixed cycle G81. N030 G00 Xx c +c; Rapid traverse the x-coordinate to point c'. N031 G00 Yy c ; Rapid traverse the y-coordinate to point c . N032 G81 Xx c Zz₁ Rr₁ Ff₁; Rapid traverse the x-coordinate to point c. Positioning. Drilling by fixed cycle G81. Rapid traverse to point R. N033 G80; Cancel fixed cycle G81. N040 G28 Z₀; Rapid return to the origin of z-axis. N041 G28 X₀ Y₀; Rapid return to the origin of x- and y-axes. N042 M30; Program end. Rewind tape. In the case where drilling is carried out in the work (W) as shown in Figs. 5(A) and 5(B), and more particularly, in the case where boring points are determined so that the tool (T) may impair the inside wall of the work (W) if the top of the tool (T) takes the shortest route to move linearly from the drilling start point (Xa, Ya, Zr₁) to the next drilling start point (Sb, Yb, Zr₁) relative to the work (W), and so that machining time may be prolonged if the aforementioned machining pass (in which the tool can be escaped in the z-coordinate axis so as not to interfere with the work at the time of linear positioning) as shown in Figs. 3(A)-3(C) is employed, a machining program using linear positioning pass by means of simultaneously uniaxial inward-rotatory movement (c) is generated to establish such a machining pass as shown in Figs. 5(A) to 5(C). In this case, when the co-ordinates and sizes of respective parts are determined as shown in Figs. 5(A) to 5(C), a typical example of the machining program is as follows. <PROGRAM> <OPERATION> N001 G28 X₀ Y₀ Z₀ Check machine origin. N002 G90; Set absolute coordinate system. N003 Tn M06; Replace tool by No.n. Preset tool length. N004 Sn M03; Start n r.p.m. forward rotation of main spindle. N005 G99; Set to return to point R. N010 G00 Xx a Yy a ; Rapid traverse to first machining start Point a . Positioning. N011 G81 Zz₁ Rr₁ Ff₁; Drilling by fixed cycle G81. Rapid return to point R. N012 G80; Cancel fixed cycle G81. N020 G00 Yy b ; Rapid traverse the Y-coordinate to point b. N021 G81 Xx b Zz₁ Rr₁ Ff₁; Rapid traverse the X-coordinate to point b . Positioning. Drilling by fixed cycle G81. Rapid traverse to point R. N022 G80; Cancel fixed cycle G81. N030 G00 Yyc; Rapid traversae the y-coordinate to point c . N031 G81 Xxc Zz₁ Rr₁ Ff₁; Rapid traverse the x-coordinate to point c . Positioning. Drilling by fixed cycle G81. Rapid traverse to point R. N032 G80; Cancel fixed cycle G81. N040 G28 Z₀; Rapid return to the origin of z-axis. N041 G28 X₀ X₀; Rapid return to the origin of x- and y-axes. N042 M30; Program end. Rewind tape. In the case where drilling is executed in the work (W) as shown in Figs. 6(A) and 6(B), and more particularly, in the case where drilling points are determined so that the tool (T) may come in contact with the outside or inside wall of the work (W) if the top of the tool (T) is moved from the drilling start point (Xa, Ya, Zr₁) to the next drilling start point (Xb, Yb, Zr₁) by use of any linearly positioning pass of simultaneously biaxial control movement of Figs. 2(A)-2(C), simultaneously uniaxial outside-rotatory movement of Figs. 4(A)-4(C), simultaneously uniaxial inside-rotatory movement of Figs. 5(A)-5(C), and so that machining time may be prolonged if the aforementioned machining pass (in which the tool can be escaped in the z-coordinate axis so as not to interfere with the work at the time of linearly positioning) as shown in Figs. 3(A)-3(C) is employed, a machining program using a cutting feed mode is generated to establish such a circular-arcuate machining pass as shown in Figs. 6(A) to 6(C). In this case, when the co-ordinates and sizes of respective parts are determined as shown in Figs. 6(A) to 6(C), a typical example of the machining program is as follows. <PROGRAM> <OPERATION> N001 G28 X₀ Y₀ Z₀; Check machine origin. N002 G90; Set absolute coordinate system. N003 Tn M06; Replace tool by No.n. Preset tool length. N004 Sn M03; Start n r.p.m. forward rotation of main spindle. N005 G99; Set to return to point R. N010 G00 Xx a Yy a ; Rapid traverse to first machining start point a . Positioning. N011 G81 Zz₁ Rr₁ Ff₁; Drilling by fixed cycle G81. Rapid return to point R. N012 G80; Cancel fixed cycle G81. N020 G03 Xx b Yy b Rr Ff₀; Positioning in arc-like cutting mode to point b . N021 G81 Zz₁ Rr₁ Ff₁; Drilling by fixed cycle G81. Rapid traverse to point R. N022 G80; Cancel fixed cycle G81. N030 G03 Xx c Yy c Rr Ff₀; Positioning in arc-like cutting mode to point c . N031 G81 Zz₁ Rr, Ff₁; Drilling by fixed cycle G81. Rapid traverse to point R. N032 G80; Cancel fixed cycle G81. N040 G28 Z₀; Rapid return to the origin of z-axis. N041 G28 X₀ Y₀; Rapid return to the origin of x- and y-axes. N042 M30; Program end. Rewind tape. It is a matter of course that the positioning control using the aforementioned cutting feed mode can be used for machining the work (W) as shown in Figs. 2(A)-2(C) to Figs. 5(A)-5(C). As described above, in the conventional numerical control apparatus, any one of the four positioning control methods has been used to generate a machining program, consideirng shape and size of the work, psoitioning time and the like. When the positioning control using linearly positioning pass is used, the tool (T) can be moved relative to the work (W) at high speed (for example 12000 mm/min). However, the work (W) and the tool (T) interfere with each other at the time of positioning as shown in Figs. 2(A)-2(C) to Fig. 6(A)-6(C). In the case where the tool (T) must be escaped from the work (W) in any direction of x-, y- and z-axes in order to climinate the interference, the migration distance of the tool relative to the work at the time of positioning may be considerably enlarged. Further, the number of migration passes would be increased relative to positioning by means of the cutting feed mode. For example, when the work (W) used is as shown in Figs. 6(A) and 6(B) and has its U-groove considerably deep, the aforementioned problem exists. Accordingly, considering positioning lag time (for example, G01, G02, G03 : 0.1 sec per pass, G00 : 0.6 sec per pass), large time is often required for positioning. When the positioning control using linearly positioning pass is used in the case where drilling is made in the work (W) as shown in Figs. 6(A) and 6(B), the number of migration passes are 13 (rapid traverse: 10 passes, cutting feed: 3 passes). On the other hand, when the positioning control by means of the cutting feed mode is used, the number of migration passes are 11 (rapid traverse: 6 passes, first cutting feed: 3 passes, second cutting feed (maximum speed for positioning): 2 passes). In the case where the work (W) as shown in Figs. 6(A)-6(C) or other figures is to be machined by use of the positioning control using the cutting feed mode, the tool can be moved along a circular or circular-arcuate pass relative to the work. Accordingly, it is unnecessary to escape the tool (T) from the work (W) in any direction of x, y and z axes to prevent interference at the time of positioning. Accordingly, the migration distance of the tool (T) relative to the work (W) at the time of positioning can be shortened, and the number of migration passes can be reduced. However, as described above, the speed is limited to about 5000 mm/min at the maximum, so that large time is often required for positioning according to the form, size and the like of the work (W). For example, when the work (W) used is as shown in Figs. 6(A)-6(C) and has its U-groove considerably deep, and the drilling positions disposed in a circle are far away from each other, the aforementioned problem exists. In the case where the positioning control using the cutting feed mode is used, it is apparent from the aforementioned machining program that a lot of procedures, such as feed-input setting at the time of positioning circular-arcuate pass [Ff₀ in sequence number N020 and N030; Ff₀ is often set to be the maximum speed (for example 5000 mm/min) to make positioning speedy], feed-input setting again in the next cutting block [Ff₁ in sequence number N021 and N031; Ff₁ is often set to be the lower speed (for example 200 mm/min) considering the machining accuracy, the breakdown of the tool and the like] and the like, are required. Accordingly, a problem exists in that there is the possibility of increasing numerical values inputted in the program, omitting check at the time of program check, and the like. SUMMARY OF THE INVENTION It is therefore an object of the present invention to solve the above problems in the prior art. It is another object of the present invention to provide a numerical control apparatus in which rapid-traverse positioning can be performed even along a circular or circular-arcuate pass so that machining time can be shortened. It is a further object of the present invention to provide a numerical control apparatus in which the entry of a machining program by means of an EIA/ISO word address format for a circular or circular-arcuate pass can be made simply. To attain the above objects, the numerical control apparatus according to the present invention controls servomotors for controlling movement along respective axes to thereby perform positioning control of a tool, said apparatus comprising: (a) means for establishing both a control position error parameter exclusively used for a rapid-traverse circular-arcuate pass mode and a tracking lag error parameter; (b) means for determining whether an instruction in a machining program relates to a rapid-traverse circular-arcuate pass mode or not; (c) a computation means for computing, taking said control position error parameter into consideration, a distance by which each of said servomotors is caused to move per unit time in the rapid-traverse circular-arcuate pass mode, when said determining means determines that said instruction in said machining program relates to the rapid-traverse circular-arcuate pass mode, (d) a servomotor control means for generating signals for controlling each of said servomotors in accordance with the result of the computation by said computation means to cause said servomotors to perform the relative positioning in said rapid-traverse circular-arcuate pass mode, the said control means including a position loop, the gain of which is corrected using the tracking lag error parameter so that the tracking lag error becomes the same as in circular-arcuate cutting feed mode; and (e) means for determining when said relative positioning is being carried out by said servomotors in said rapid-traverse circular-arcuate pass mode whether said positioning is performed within a maximum allowed tracking lag error established by said tracking lag error parameter. Accordingly, the tool of the like can be speedily moved relative to the work or the like along a circular or circular-arcuate pass with no interference with the work or the like. BRIEF DESCRIPTION OF THE DRAWINGS Above and other objects, features and advantages of the present invention will appear more fully from the following description in conjunction with the accompanying drawings, in which: Fig. 1 is a view showing an example of a machine tool to which the present invention is applied; Figs. 2(A)-2(C) to Figs. 6(A)-6(C) are views showing works and machining passes for explaining the prior art, in which Fig. 2(A) is a plan view of a first work, Fig. 2(B) is a sectional view taken along the line B - B of Fig. 2(A), Fig. 2(C) is a view showing the machining pass of the first work, Fig. 3(A) is a plan view of a second work, Fig. 3(B) is a sectional view taken along the line B - B of Fig. 3(A), Fig. 3(C) is a view showing the machining pass of the second work, Fig. 4(A) is a plan view of a third work, Fig. 4(B) is a sectional view taken along the line B - B of Fig. 4(A), Fig. 4(C) is a view showing the machining pass of the third work, Fig. 5(A) is a plan view of a fourth work, Fig. 5(B) is a sectional view taken along the line B - B of Fig. 5(A), Fig. 5(C) is a view showing the machining pass of the fourth work, Fig. 6(A) is a plan view of a fifth work, Fig. 6(B) is a sectional view taken along the line B - B of Fig. 6(A), and Fig. 6(C) is a view showing the machining pass of the fifth work; Figs. 7(1A)-7(3B) are diagrams showing the best machining pass in the case where drilling is carried out in the work having the shape as shown in Figs. 6(A) and 6(B) according to an embodiment of the present invention; Fig. 8 is a block diagram showing the hardware of the embodiment; Figs. 9(A)-9(B) are flow charts for explaining the operation of the embodiment; Fig. 10 is a view for explaining the computation for migration pass and migration distribution command in the embodiment; Fig. 11(A) is a plan view of the work showing an example of machining in the embodiment; Fig. 11(B) is a sectional view taken along the line B - B of Fig. 11(A); and Fig. 12 is a view for explaining the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT The feature of the present invention is in that there is newly provided means in which, for example, when such a work as shown in Figs. 6(A)-6(B) is to be machined, a tool is moved along a circular or circular-arcuate pass relative to the work for example at a high speed of 10000 mm/min to thereby make speedy positioning possible. Figs. 7(1A)-7(3B) are diagrams showing the best positioning passes in the case where a work (W) having such outside and inside walls as shown in Fig. 6(B) requires drilling in the bottom between the inside and outside walls. Figs. 7(1A), 7(2A) and 7(3A) show the best positioning pass in the case where the work (W) is bored successively at the drilling positions (a), (b) and (c). In this case, if the tool (T) is linearly moved between the points (a) and (b) and betwen the points (b) and (c) relative to the work (W), the tool (T) and the work (W) interfere with each other. Accordingly, the arc and the arc are the best passes for minimizing the positioning distance without interference. Figs. 7(1B), 7(2B) and 7(3B) show the best positioning pass in the case where the work (W) is drilled sucessively at the drilling positions (a), (f) and (e). Also in this case, the arc and the arc are the best passes, considering interference between the tool (T) and the work (W) and positioning distance. In order to attain speedy positioning by the numerical control apparatus by use of such circular-arcuate passes, that is, in order to make the numerical control apparatus recognize speedy positioning by means of such circular-arcuate passes, codes used in the machining program are predetermined as follows. G00.2 --- rapid-traverse CW circular-arcuate passes G00.3 --- rapid-traverse CCW circular-arcuate passes G02.0 --- rapid-traverse CW circular-arcuate passes G03.0 --- rapid-traverse CCW circular-arcuate passes G02.1 --- rapid-traverse CW arc equalized positioning G03.1 --- rapid-traverse CCW arc equalized positioning The positioning words G02.1 and G03.1 are provided to set positions at equal distances by one instruction at the time of generation of the machining program in the case where equalized positioning must be required. Although the aforementioned arrangement is made based on "G" codes, that is, based on preparation functions (ISO/EIA word address format), there is no other reason than the programmer will be accustomed to using "G" codes. Accordingly, it is a matter of course that other codes may be used for such arrangement. For example, in the case where address values connected to the "G" codes express co-ordinates and radius [Figs. 7(1A) and 7(1B)], the address values are as follows. Positioning to point (b) --- G00.3 Xx b Yy b R r ; Positioning to point (c) --- G00.3 Xx c Yy c R r ; Positioning to point (f) --- G00.2 Xx f Yy f R r ; Positioning to point (e) --- G00.2 Xx e Yy e R r . For example, in the case where address values express co-ordinates and x- and y-components [Figs. 7(2A) and 7(2B)], the address values are as follows. Positioning to point (b) -- G00.3 Xx b Yy b Ii a Jj a ; Positioning to point (c) -- G00.3 Xx c Yy c Ii b Jj b ; Positioning to point (f) -- G00.2 Xx f Yy f Ii a Jj a ; Positioning to point (e) -- G00.2 Xx e Yy e Ii f Jj f . For example, in the case where address values express angle from reference point (a) and radius [Figs. 7(3A) and 7(3B)], the address values are as follows. Positioning to point (b) --- G00.3 ϑ ϑb Rr; Positioning to point (c) --- G00.3 ϑ ϑc Rr; Positioning to point (f) --- G00.2 ϑ ϑf Rr; Positioning to point (f) --- G00.2 ϑ ϑe Rr; When a machining program is generated by using the aforementioned address values and is inputted into the numerical control apparatus, the numerical control apparatus is arranged to set positions by using high-speed circular-arcuate passes according to the words. On the other hand, for positioning using high-speed circular-arcuate passes, the numerical control apparatus is constructed as follows. Fig. 8 is a diagram showing the hardware of the numerical control apparatus for executing positioning with a high-speed circular-arcuate pass. In the drawing, the reference numeral 10 designates a main control (CPU), the reference numerals 11 and 12 designate memories, the reference numeral 13 designates a servo control (MCU), the reference numerals 14A, 14B and 14C designated servo output controls, the reference numerals 15A, 15B and 15C designate driving units, the reference numerals 16A, 16B and 16C designate servomotors for driving x-, y- and z-axes, the reference numerals 17A, 17B and 17C designate detectors for the respective servomotors, the reference numerals 18A, 18B and 18C designate feedback controls, and the reference numeral 19 designates a setting-indication board composed of a CRT and a key board whereby various kinds of parameters can be set up. The reference numerals 20 and 21 designate interfaces, and the reference numeral 22 designates a tape reader for inputting the machining program. Of course, the machining program may be inputted from the setting-indicaiton board 19 or from other devices, such as a floppy disk drive unit (not shown) or the like. The reference numeral 23A designates a control line, the reference numeral 23B designates an address line, and the reference numeral 23C designates a data line. Devices, such as a sequence control, a printer and the like, which are not shown because they do not directly relate to the present invention, are connected to the lines. The aforementioned hardware constructions are very general for a numerical control apparatus. The control position error parameter exclusively used for rapid-traverse circular-arcuate pass can be inputted into the memory 11 from the setting-indication board 19, the droop error parameter can be inputted into the memory 12 from the board 19, and the software as shown in Figs. 9(A) and 9(B) can be stored in the memory 11. The control position error parameter stated herein means a parameter for expressing the distance between the tool (T) and the wall surface or the work (W), the parameter provided to prevent them from interfering with each other when the tool (W) as shown in Fig. 6(B) is moved along an circular-arc from the drilling positions a to the drilling position b relative to the work (W), consequently the parameter used to decide a migration order value which will be described later. More particularly, for example if the clearance is 1 mm, a parameter "1" is inputted from the board 19. Of course, it is sufficient if the condition of the above-mentioned clearance can be detected, and therefore it is needless to say that, for example, the diameter of the tool and the distance between the inner and outer walls of the work may be inputted to judge the clearance between the tool and the work. Further, in the servo system, there is the following relation among the droop, the feed velocity and the positional loop gain of the servo system: where KP represents the positional loop gain (rad/sec), F represents the feed velocity (mm/min) and D represents the droop. Accordingly, in a circular-arcuate pass mode, as the droop becomes larger, (as the feed velocity becomes higher and as the positional loop gain becomes smaller), the pass has a tendency to approach a linear pass to thereby cause a problem of interference between the tool and the work. Accordingly, in the rapid-traverse circular-arcuate pass mode, the gain is corrected by using the droop error parameter so that the droop becomes the same as that in the circular-arcuate cutting feed mode. The numerical control apparatus is constructed as described above. In the following, the operation is described in detail. The control position error parameter exclusively used for rapid traverse circular-arcuate pass and the droop error parameter are preliminarily set in the memories 11 and 12 from the board 19. In Fig. 9(A) the machining program is read by one block (Step 1), and then the presence of G codes in the block is checked (Step 2). In the case where the block has no G code, modal G codes are checked to thereby judge whether a rapid-traverse circular-arcuate pass or not (Step 3). For example, the block of sequence number N030 is judged to be a rapid-traverse circular-arcuate pass if the machining program is generated as follows. N020 G00.3 X-350 Y-200 R50 ; --- Rapid-traverse CCW arc positioning. N021 M08 : --- Coolant No.1 ON. N022 M09 : --- Coolant OFF. N030 X-300 Y-250 R50 : --- This means rapid-traverse CCW arc positioning, though G00.3 does not exist as an address value. In Step 3, if the block is judged to be not a rapid-traverse circular-arcuate pass, such judgement is executed on other G codes. If the block is judged to be a rapid-traverse circular-arcuate pass, the rapid-traverse circular-arcuate pass subroutine is executed (Step 5). In Step 2, if a G code is present, the G code is judged whether it represents a rapid-traverse circular-arcuate pass or not (Step 4). If the code represents a rapid-traverse circular-arcuate pass, the processing of Step 5 is carried out. If the code does not represents a rapid-traverse circular-arcuate pass, judgement is made on other G codes. In Step 5, the rapid-traverse circular-arcuate pass subroutine as shown in Figs. 9(B) and 10 is executed. More particularly, in Fig. 9(B), the control position parameter stored in the memory 11 is read (Step 501). Then in Step 502, judgement is made as to whether the G-code is either G00.2 (rapid-traverse CW arc positioning) or G00.3 (rapid-traverse CCW arc positioning). If the G-code is either G00.2 or G00.3, judgement is made as to whether numerical data connected to the G-code are X, Y and R (co-ordinates and radius) or not (Step 505). If the numerical data are X, Y and R, ϑ (angle between set points) is calculated (Step 9). For example, in the case where the program input is G00.2 Xxf Yyf Rr [in the case of rapid-traverse circular-arcuate pass positioning from the point a to the point f in Fig. 7(1B) ], ϑ is calculated from the following equation (Refer to Fig. 10). ϑ = cos⁻¹ yf / r (deg) ----- (Equation 1) In Step 502, if the G-code is neither G00.2 nor G00.3, judgement is made in Step 503 as to whether the G-code is either G02.0 (rapid-traverce CW arc positioning) or G03.0 (rapid-traverse CCW arc positioning). If the G-code is either G02.0 or G03.0, the judgement of Step0 505 is carried out. In Step 503, if the G-code is neither C02.0 nor G03.0, judgement is made in Step 503 whether the G-code is either G02.1 (rapid-traverse CW arc equalised positioning) or G03.1 (rapid-traverse CCW arc equalised positioning). If the G-code is either G02.1 or G03.1, the calculation of ϑ of Step 509 is carried out. IF the G-code is neither G02.1 nor G03.1, error processing is carried out. In this case, the judgement of Step 505 is unnecessary, because ϑ can be calculated from the equation when the program input of G02.1 and G03.1 is G02.1 Xx₁ Yy₁ Ir Jϑ', Kn ; G03.1 Xx₁ Yy₁ Ir Jϑ', Kn ; where Xx₁ and Yy₁ are the co-ordinates of the drilling hole circle, Ir is the radius of the drilling hole circle, Jϑ', is the angle between the drilling start point and the x-axis (CCW direction is positive), and kn is the number of boring. In Step 505, if the numerical data are not X, Y and R (coordinates and radius inputs), judgement is made in Step 506 as to whether the numerical data are X, Y, I and J (coordinates and X-, Y-component inputs) or not. If the numerical data are X, Y, I and J, the calculation of r (radius) is carried out in Step 508 and then the calculation of ϑ is carried out in Step 509. For example, in the case where the program input is G00.2 Xxf Yyf Iia Jja (in the case of a rapid-traverse circular-arcuate pass positioning from the point a to the point f in Fig. 7(2B)], r is calucated from the folloiwng equation (Refer to Fig. 10). R = √ I² + J² r = √ (ia)² + (ja)² At the same time, ϑ is calculated from the aforementioned Equation 1. In Step 506, if the numerical data are not X, Y, I and J, judgement is made in Step 507 as to whether the numerical data are ϑ and r (angle and radius inputs) or not. If the numerical data are ϑ and r , the processing of Step 510 (the processing for calculating MAX ϑ) is carried out. If the numerical data are not ϑ and r , error processing is carried out. In this case, the calculatoin of ϑ in Step 509 is unnecessary, because ϑ has been given from the program. Next, in Step 510, MAX Δϑ is calculated from the following equation (Refer to Fig. 10). The term "MAX Δϑ" used herein is defined as an angle for maximum migration per unit time Δt, considering the control position error parameter (which shows the condition of the clearance between the tool and the wall of the work). In other words, MAX Δϑ is a maximum migration angle in which the tool can be moved per unit time Δt relative to the work without interference. MAX Δϑ = 2 · cos⁻¹ R' R where R represents a radius of the rapid-traverse circular-arcuate pass, and R' = R - 0.8 x control position error parameter (0.8 is a safety factor). Next, in Step 511, Δϑ is calculated by use of the following equations. (Refer to Fig. 10) The term "Δϑ" used herein means a migration angle per unit time Δt, without taking the control position error parameter into consideration. For example, in the case where the program input is any one of G00.2 Xxf Yyf Rr, G00.2 Xxf Yyf Iia Jja and G00.2 ϑ ϑf of Rr (Refer to Figs. 7(1B), 7(2B) and 7(3B)), Δϑ is calculated as follows. where: Rapid traverse speed: F = V mm/nin Interrupt signal interval: IT = Δt sec per cycle Migration time of arc af: T Although the description has shown the case where Step 510 is performed prior to Step 511, Step 511 may be executed prior to Step 510. Next, in Step 512, MAX Δϑ and Δϑ are compared with each other. In the case of MAX Δ0 ≧ Δϑ , migration order values are calculated from the following equations (Step 513) using MAX Δϑ, because the tool and the work never interfere with each other if the tool is moved relative to the work at the migration angle of MAX Δ0. (Refer to Fig. 10.) The results Δf₁, Δf₂, ... Δf n ... f are fed as migration values for the x- and y-axis (Step 6). In the case of MAX Δϑ < ϑ in Step 512, MAX Δϑ is recalculated from the following equations (step 514), because the tool and the work interfere with each other if the tool is moved relative to the work at the migration angle of MAX Δϑ. ϑ/MAX Δϑ + 0.5 ≒ N' (divisor for arc af rounded) Δϑ' = ϑ/N' The migration order values are calculated from the following equations (Step 515) using Δϑ', because the tool and the work never interfere with each other if the tool is moved at the migration angle of Δϑ'. (Refer to Fig. 10.) The results Δf₁, Δf₂, ... Δf n ... f are fed as migration values for the x- and y-axes, and then output power for driving the servomotors 16A and 16B is generated with interrupting simultaneous movement is interrupted it every Δt (sec) (Step 6). Consequently, a rapid-traverse circular-arcuate pass, for example approximately from the point (a) to the point (f), is generated. The processing for the aforementioned calculation is made by the main control 10, If the servomotors 16A and 16B for respective control axes are operated through the servomotor control 13, the servo output controls 14A and 14B and the driving units 15A and 15B, then positioning using rapid-traverse circular-arcuate pass is carried out (Step 7). The migration distributing instruction is kwown, and detailed description thereof will be omitted. Although description has made in the case where the aforementioned calcuation is processed by the main control 10, it is to be understood that the aforementioned calculation may be processed by the servo control 13 or by modules having the capability of processing the calculation, such as for example modules having fixed software as if the calculation was processed by the sub-CPU on hardware, and modules perfectly constructed by hardware and having the same function as that of the software of the aforementioned numerical control apparatus. In execution of positioning using a rapid-traverse circular-arcuate pass, the condition is fed back to the servo control 13 through the detectors 17A and 17B and the feedback controls 18A and 18B. By reference to the droop error parameter stored in the second memory 12, the servo control 13 judges whether the current value of droop error is within the predetermined droop error set by the parameter or not (Step 8). If the current value is within the error, positioning is continued. If the current value is out of the error, the output of emergency stop is generated to stop the servomotors. The judgement of the droop error in Step 8 is based on the necessity of considering positioning accuracy and the like. Steps 6, 7, 8 and 9 are repeated till the tool reaches its positioning point. When the tool reaches its positioning point, the migration distributing instruction is terminated so that positioning is finished. According to the numerical control apparatus of the present invention, positioning is made based on such a rapid traverse circular-arcuate pass as described above. In the case a work (W) having such a shape and a size as shown in Fig. 11 is to be bored at three positions by a drill (T), the machining program using the rapid traverse circular-arcuate pass mode according to the present invention is as follows, compared to the conventional machining program using the cutting feed mode <<Machining program according to the present invention>> <<Machining program according to the prior art>> N001 G28X0Y0Z0; N001 G28X0Y0Z0; N002 G90; N002 G90; N003 TnM06; N003 TnM06; N004 SnM03; N004 SnM03; N005 G99; N005 G99; N010 G00X-300.Y-150.; N010 G00X-300.Y-150.; N011 G00Z-339.; N011 G81R-339.Z-394.F200.; N012 G01Z-394.F200.; N012 G80; N013 G00Z-339.; N020 G00.3X-350.Y-200. R50.; N020 G03X-350.Y-200.R50. F5000; N021 G012-394.; N021 G81R-339.Z-394.F200; N022 G00Z-009.; N022 G80; N030 G00.3X-300.Y-250.R50.; N030 G03X-300.Y-250.R50. F5000; N031 G01Z-394.; N031 G81R-339.Z-394.F200.; N032 G80; N040 G28Z0; N040 G28Z0; N041 G28X0Y0; N041 G28X0Y0; N042 M30; N042 M30; It is apparent from the comparison between the two programs that the feed speed (modal value: the condition is kept as it is till the next instruction) (part indicated by solid lines) can be set once according to the present invention, and that input characters can be reduced in number (the invention: 173 characters, the prior art: 191 characters) even if the same work is bore. Accordingly, the program generation can be more improved in efficiency. The meaning of the machining program is obvious from the above description, and the detailed description thereof will be omitted. Although the aforementioned embodiment has shown the case where the machining program is generated according to the ISO/EIA word address format, it is a matter of course that the present invention is applicable to the case where the machining program is generated by an dialogue technique input method out of accordance with the ISO/EIA word address. In other words, the present invention is applicable to the case where input values to be established are the direction of positioning (for example, CW or CCW), the co-ordinates of the starting point (for example, Xs and Ys, or ϑs and Rs), the co-ordinates of the terminal Point (for example, Xe and Ye, or ϑe and Re), the number of machinings (for example, Nn/equalized angle An), the flag for machining the starting point (for example, 0/1), the radius (for example, Rn) and the like. In the automatic programs dialogue technique inputted based on CRT, the drilling positions on the arc are inputted as follows. Examples of the input method for respective items are shown as follows. (Refer to Fig. 12.) I II III IV V VI VII Fig.12(a) CW Xs Ys Xe Ye Nn 1 Rn ← Fig.12(b) CW Xs Ys Xe Ye An 1 Rn ↑ Fig.12(c) CCW Xs Ys Xe Ye Nn 1 Rn ↓ Fig.12(d) CCW Xs Ys Xe Ye An 0 Rn → Fig.12(e) CW ϑs Rs ϑe Re Nn 1 Rn ← Fig.12(f) CW ϑs Rs ϑe Re An 1 Rn ↑ Fig.12(g) CCW ϑs Rs ϑe Re Nn 0 Rn ↓ Fig.12(h) CCW ϑs Rs ϑe Re An 0 Rn → I: the direction of positioning II: the co-ordinates of the starting point III: the co-ordinates of the terminal point IV: the number of machinings/equalized angle V: the flag for machining the starting point VI: the radius VII: the direction of the co-ordinates of the center point In the above table, if not Rx=Re=Rn, the program becomes error. Accordingly, Re and Rn can be omitted. ϑ is calculated from the following equations using the input values, and then the calculition of distributing instruction is carried out by the equations 2 to 7. ϑ = [2 * sin⁻¹{√ (Xs-Xc)²-(Ys-Ye)² }/2R]/Nn ϑ = An ϑ = (ϑs-ϑe)/Nn-1 In the case of x-y coordinate input, the co-ordinates of the respective points are as follows. Starting point: Xs, Ys......ϑ's Second point: ϑ's + ϑ Third point: ϑ's + 2ϑ . . . The n-th point: ϑ's + nϑ = ϑ'e.....Xe, Ye In the case of ϑ-R input, the co-ordinates of the respective points are as follows. Starting point: ϑs Second point: ϑs + ϑ Third point: ϑs + 2ϑ . . . The n-th point: ϑs + nϑ = ϑe Although the aforementioned embodiment has shown the case where positioning is made in the X- and Y-directions, the invention is applicable to the case where positioning is made in the X- and Z-directions or in the Y- and Z-directions. Although the aforementioned embodiment has shown the case where positioning is made for preparation of drilling by a tool such as a drill and the like, it is a matter or course that the invention is not limited to such positioning for machine tool, and that the invention is applicable to other positioning for machinery such as laser machines, electric discharge machines, robots and the like. For example, in the case where the invention is applied to laser machines, the invention can be used to prevent the interference between the laser head and the work (or obstacle) in positioning. Alternatively, for example, in the case where the invention is applied to electric discharge machines, the invention can be used to prevent the interference between the electrode and the work (or obstacle). Still alternatively, for example, in the case where the invention is applied to robots, the invention can be used to prevent the interference between the hand and the work (or obstacle).

Claims: A numerical control apparatus which controls servomotors (16a,b,c) for controlling movement along respective axes to thereby perform positioning control of a tool, said apparatus comprising: (a) means for establishing both a control position error parameter exclusively used for a rapid-traverse circular-arcuate pass mode and a tracking lag error parameter; (b) means for determining whether an instruction in a machining program relates to a rapid-traverse circular-arcuate pass mode or not; (c) a computation means (10) for computing, taking said control position error parameter into consideration, a distance by which each of said servomotors (16a,b,c) is caused to move per unit time in the rapid-traverse circular-arcuate pass mode, when said determining means determines that said instruction in said machining program relates to the rapid-traverse circular-arcuate pass mode, (d) a servomotor control means (13) for generating signals for controlling each of said servomotors (16a,b,c) in accordance with the result of the computation by said computation means (10) to cause said servomotors (16a,b,c) to perform the relative positioning in said rapid-traverse circular-arcuate pass mode, the said control means including a position loop, the gain of which is corrected using the tracking lag error parameter so that the tracking lag error becomes the same as in circular-arcuate cutting feed mode; and (e) means for determining when said relative positioning is being carried out by said servomotors (16a,b,c) in said rapid-traverse circular-arcuate pass mode whether said positioning is performed within a maximum allowed tracking lag error established by said tracking lag error parameter. A numerical control apparatus according to claim 1, in which said machining program includes a machining program based on ISO/EIA word address format. A numerical control apparatus according to claim 1, in which codes used in said machining program for instructing said rapid-traverse circular-arcuate pass mode includes G codes. A numerical control apparatus according to claim 3, in which said computation means (10) includes means for determining whether numerical data in said machining program are inputs of co-ordinates and a radius, co-ordinate and x- and y- components, or an angle and a radius. A numerical control apparatus according to any of claims 1 to 4 characterized in that said tool is a machine tool such as a lathe, miller, machining centre, a laser beam machine, an electric discharge machine or a robot or the like.

Inventors: HIRAI, HAYAO C/O MITSUBISHI DENKI K.K.
Applicants: MITSUBISHI DENKI KABUSHIKI KAISHA
Application year: 1987
Main classification: G05B19
IPC codes: G05B19