The above and other objects and features of the present invention will be obvious from the ensuing description of embodiments with reference to the accompanying drawings, in which:
The principle of operation of the present invention will be described first.
When the value of reference L reaches La, a spindle position Xa and a spindle speed Sa are read, and a value Lb of reference L for which a next contour control start command in the path table is set and a spindle position Xb for the start of the contour control commanded in association with the command value Lb are read out. Further, a connection function (linear, quadratic, cubic, or some other multidimensional function) that is commanded next is read out.
Control is made so that the spindle moves in accordance with the read connection function as the value of reference L changes from La to Lb, without being decelerated and stopped,
In order that the spindle reaches the position Xb, commanded in the path table, when the value of reference L reaches Lb, the spindle is controlled to move, without being decelerated or stopped, in accordance with the read connection function as the value of reference L changes from La to Lb. That is a feature of the present invention. After the value of reference L reaches Lb, the spindle is drivingly controlled according to the path-table operation for contour control based on data set in the path table, as in the conventional case.
Cases in which the connection function used for the switchover from speed control to contour control is a linear function will now be described with reference to the diagrams of
If a command to switch the control from speed control to contour control when value of reference L reaches La is set in the path table, the spindle position Xa attained when the value of reference L reaches the command value La is read by a position/speed detector 23 (
First, a difference Dx from the spindle position Xa, in which the command for switchover from speed control to contour control is issued, to the spindle position Xb for the start of contour control is obtained as follows:
Dx=Xb−Xa (degree). (1)
Since connection of a linear function is used in this example, as shown in
In order to make this connection without decelerating and stopping the spindle motion, the current spindle speed Sa is approximated to a speed Sb in the first path (moving action) for the contour control, and a speed is obtained such that the spindle position X reaches the designated position Xb when the value of reference L is Lb.
A speed for a section from the spindle position Xb for the value of reference L=Lb after the start of the contour control to the spindle position Xc for the next value of reference L=Lc is determined by the following equation (2):
Sb={(Xc−Xb)/(Lc−Lb)}×(60/360) (rpm). (2)
Then, an average speed Savg between the current speed Sa and the speed Sb in the first path (between Xc and Xb) for the contour control is obtained as follows:
Savg=(Sa+Sb)/2 (rpm). (3)
Then, a movement amount Dt covered by the average speed Savg for the section from the current position Xa to the position Xb for the start of the contour control is obtained as follows:
Dt=Savg×(360/60)×(Lb−La) (degree). (4)
A movement amount for speed maintenance is expected to be an integer multiple of 360 degrees in order to maintain the contour control starting position Xb being a position within the range of one revolution. Therefore, a movement amount Ds equal to an integer multiple of 360 degrees (integer multiple of a rotational frequency unit), rounded with 360 degrees, is obtained according to the following equation:
Ds=INT(Dt/360)×360 (degree). (5)
In this equation (5), INT(Dt/360) indicates that the numeric value after the decimal point of value (Dt/360) is discarded.
As shown in
D=Dx+Ds (degree). (6)
Since the linear function is designated as the connection function in this example, by dividing the movement amount D by a time elapsing from the value of reference L=La for the spindle position (current position) Xa in which the command for switchover from speed control to contour control is issued to the value of reference L=Lb where the position Xb for the start of contour control is commanded, a spindle speed V for this section is obtained as follows:
V=D/(Lb−La) (degree/sec). (7)
The spindle is driven at the speed V after carrying out interpolation based on the value of reference L from the position Xa (value La of reference) to the position Xb (value Lb of reference). As described in Patent Document 2, position X of each interpolation point is obtained from the value of reference L, as a position corresponding to a value of reference L, by using the following equation (8):
After the value of reference L reaches Lb and the spindle position reaches Xb, the contour control is carried out based on the path table data.
Although a linear function is used for the connection in the example described above, a multidimensional function may be used for the connection. If a quadratic function is used for the connection, as described in Patent Document 2, for example, position X of each interpolation point can be obtained according to the following equation (9):
X=(½)×{(Sb−Sa)/(Lb−La)}×(L−La)2+Sa(L−La)+Xa, (9)
where Sb={2×D/(Lb−La)}−Sa.
If a cubic function is used for the connection, as described in Patent Document 2, position X of each interpolation point is obtained according to the following equation (10), with speed Sb for the value of reference L=Lb set in advance:
X=(⅙)×{(Ab−Aa)/(Lb−La)}×(L−La)3+(½)×Aa(L−La)2+Sa(L−La)+Xa. (10)
Here accelerations Aa and Ab can be obtained under the condition where S=Sb and X=D+Xa when L=Lb.
If a quartic function is used for the connection, position X of each interpolation point is obtained according to the following equation (11), with the value of reference L=Lb and the speed Sb set in advance:
Here, a jerk Ba for the value of reference L=La and a jerk Bb for the value of reference L=Lb are obtained under the boundary conditions where S=Sb and X=D+Xa when L=Lb.
If a quintic function is used for the connection, moreover, position X of each interpolation point is obtained according to the following equation (12), with speed Sb for the value of reference L=Lb and accelerations Aa and Ab for the values of reference L=La and L=Lb set in advance:
Here, acceleration variations Ca and Cb for the values of reference L=La and L=Lb and the jerk Ba for the value of reference L=La are obtained under boundary conditions A=Ab, S=Sb and X=D+Xa when L=Lb.
Since the methods for quartic and quintic connections as well as quadratic and cubic connections are described in Japanese Patent Application Serial No. 2006-130513, filed by the applicants of the present application to the Japanese Patent Office on May 19, 2006, a detailed description thereof is omitted here.
An embodiment of the present invention will now be described with reference to the accompanying drawings.
A processor (CPU) 11 of the numerical controller 10 is connected by a bus 19 with a memory 12, interface 13, display/manual input unit 14, axis control circuits 15, and spindle control circuit 17. The memory 12 is composed of a ROM, RAM, nonvolatile RAM, etc. and is stored with a system program and a machining program. According to the present invention, in particular, the memory 12 is stored with the path table that is loaded with data for path-table operation. The machining program and the path table are externally created and stored into a recording medium (not shown). Then, they are fetched from the recording medium and loaded into the memory 12 through the interface 13. On the other hand, the machining program and the path table data stored in the memory 12 are read out and outputted to an external recording medium through the interface 13.
The display/manual input unit 14 includes a display device, which is composed of a CRT or liquid crystal, and manual input means composed of a keyboard or the like, and is used to input various commands and data.
The axis control circuits 15 are provided individually for feed axes (X-, Y- and Z-axes perpendicular to one another) of a tool. Based on move command amounts from the processor 11 to the individual axes and position/speed feedback signals from axis position/speed detectors 21 that are attached individually to servomotors 20 for the axes, the control circuits 15 perform position feedback control and speed feedback control and cause servo amplifiers 16 for the individual axes to drive the servomotors 20.
In the present embodiment, moreover, a spindle is fitted with the position/speed detector 23 for detecting its rotational position. Based on position and speed feedback signals from the position/speed detector 23 and the move command amounts or speed commands from the processor 11, the spindle control circuit 17 performs position feedback control and speed feedback control and causes a spindle amplifier 18 to drivingly control a spindle motor 22.
In this embodiment, spindle speed or spindle position is set in association with time which is value of reference L. If a speed S is set in association with a value of reference L in the path table T, speed control is performed based on the path-table operation. If position X is set in association with a value of reference L, on the other hand, position control, or contour control, is performed based on the path-table operation. A command R is a command outputted in association with value of reference L.
In the example shown in
The command R33 is a command that designates a linear function as the connection function so as to control the spindle to operates with the linear function in a section from the values of reference L=La to L=Lb. When controlling the spindle with a quadratic function, cubic function, quartic function, quintic function, . . . , instead of a linear function, commands for designating respective functions such as R332, R333, R334, R335, . . . , are set.
Further, reference L=Lc next to value of reference L=Lb is a value (time) at which a contour control is started to execute the next command. The end point Xc of the first path after the start of the contour control and R1 for designating a connection function for switchover from speed control to contour control are set for value of reference L=Lc. This R1 is a command that controls the spindle so as to operates with a linear function in a section from value of reference L=Lb to L=Lc. R2, R3, R4, R5 . . . is set for the control with a quadratic function, control with a cubic function, control with quartic function, control for quintic function, . . . , instead of a linear function.
After the contour control is started, a spindle position X for contour control for the value of reference L is set individually, and a connection function R that connects the set positions may be set in some cases. Data in the path table T after the start of contour control is identical with the path table data used for the conventional path-table operation. A connection function need not be set in the command R during contour control in the case of path-table operation of a type such that no connection function for each path is to be designated in the conventional contour control. In the case where a connection function for each path during contour control is to be set, connection functions are set individually in advance, as described in Patent Document 2.
Although the illustrated path table T is dedicated to the spindle, moreover, path tables for the feed axes (X-, Y- and Z-axes) that are subjected to the path-table operation in synchronism with the spindle are provided in the same manner as in the conventional case. In these path tables, the respective positions of the feed axes that are run in synchronism with one another are set in association with values of reference. Since this point is shared with the conventional case, a description thereof is omitted here.
First, as in the conventional case, a value indicative of a time is read from a counter or the like, and speed control for the spindle is performed based on the read value and the data set in the path table (Step 100). Thus, when the time, as the value of reference L, reaches the value set in the path table, the spindle is drivingly controlled at the speed set for the value L. Then, the value of reference L that is set next in the path table T and the data set for this value are read out. If speed data S is set in association with the value of reference L, it is read out and the speed control is continued.
If the next value of reference L and the command R32 (for the start of switchover from speed control to contour control) for this value L are read out (Step 101), on the other hand, next two values of reference L set in the path table T and data set in association with these values L are read. If the value of reference L=La for which the command R32 is set is read out, in the example of the path table T shown in
Waiting a value in the counter that indicates the value of reference L (time) to reach the value La for which the switching command R32 is set (Step 103), and when L=La is reached, the spindle position Xa for the value La is determined by a feedback signal from the position/speed detector 23. Further, the commanded spindle speed Sa for the value La is obtained from the path table T (or from the speed outputted from the position/speed detector 23) and stored (Step 104).
Then, the rotational angle Dx from the position Xa corresponding to the value of reference L=La for the switching command R32 to the position Xb corresponding to the value of reference L=Lb for which a start of contour control is set by the command R33 is obtained according to the aforesaid equation (1) (Step 105).
Subsequently, the spindle speed Sb in the first path (movement from the spindle position Xb corresponding to the value of reference L=Lb for the start of contour control to the spindle position Xc corresponding to the value of reference L=Lc designated next) after the start of contour control is obtained. Specifically, the operation of the equation (2) is performed in the aforesaid manner to obtain the spindle speed Sb that is converted into a rotational frequency of the spindle per minute (Step 106).
The average speed Savg between the current speed Sa and the speed Sb in the first path for the contour control is obtained according to the equation (3) (Step 107).
Further, the movement amount Dt of the spindle that moves at the average speed Savg in the section from the value of reference L=La for the switching command R32 to the value of reference L=Lb for which a start of contour control is set by R33 is determined by performing the operation of the equation (4) (Step 108), and the operation of the equation (5) is performed using the determined movement amount Dt to obtain the movement amount Ds of the spindle that is equal to an integer multiple of the rotational frequency unit (Step 109).
The movement amount Dx within the range of one revolution of the spindle obtained in Step 105 is added to the movement amount Ds of the spindle obtained in this manner, whereby the movement amount D (=Dx+Ds−) for moving the spindle from the contour control switching command position Xa during the speed control to the contour control starting position Xb, within the range of one revolution of the spindle, is obtained (Step 110).
Then, interpolation processing is executed with a designated connection function (Step 111) based on a command for designating the connection function for switchover from speed control to contour control read in Step 102. Since the command R33 (linear function) is designated in this embodiment, the operation of the equation (8) is performed, and the rotational position X of the spindle is obtained by carrying out interpolation based on the value of reference L (time). The move command amount for the spindle is obtained from the spindle position X and outputted to the spindle control circuit 17, whereby the spindle motor 22 is driven.
Thereafter, contour control is performed by table operation based on the data set in the path table.
The spindle position X for the value of reference L is obtained according to the equation (9) if a quadratic function is designated by a connection function command R332 in Step 111, according to the equation (10) if a cubic function is designated by R333, according to the equation (11) if a quartic function is designated by R334, or according to the equation (12) if a quintic function is designated by R335. A movement amount is determined by this spindle position and outputted to the spindle control circuit 17.
Number | Date | Country | Kind |
---|---|---|---|
269183/2006 | Sep 2006 | JP | national |