Numerical controller
11126163 · 2021-09-21
Assignee
Inventors
Cpc classification
G05B19/41
PHYSICS
G05B19/416
PHYSICS
International classification
Abstract
A numerical controller suppresses change of a axis speed to be slow even when a lookahead distance varies with small steps. The numerical controller includes: a lookahead unit that looks ahead a plurality of instruction blocks from an NC program; an analysis unit that analyzes the looked ahead instruction blocks and creates motion instruction data; a target speed calculation unit that calculates a target speed of the axis based on a lookahead distance; an interpolation unit that generates interpolation data based on the motion instruction data and the target speed; and a servo control unit that controls a motor based on the interpolation data. The target speed calculation unit refrains from recalculation of the target speed when a change of the lookahead distance is within a margin.
Claims
1. A numerical controller that controls a machine tool based on an NC program, wherein the machine tool is adapted to drive an axis thereof to displace a tool relative to a workpiece and configured to machine the workpiece, the numerical controller comprising: a lookahead unit that looks ahead a plurality of instruction blocks from the NC program; an analysis unit that analyzes the plurality of instruction blocks looked ahead by the lookahead unit and creates motion instruction data for driving the axis; a target speed calculation unit that calculates a target speed of the axis based on a lookahead distance through which the axis is to be moved in accordance with an instruction provided by the plurality of instruction blocks looked ahead by the lookahead unit; an interpolation unit that generates interpolation data based on the motion instruction data and the target speed; and a servo control unit that, based on the interpolation data, controls a motor configured to drive the machine tool, wherein the target speed calculation unit refrains from recalculation of the target speed when the lookahead distance changes and the change of the distance is within a predetermined margin defined in advance.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The above and other objects and the features of the present invention will be apparent from description of the following embodiments with reference to the attached drawings, in which:
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
(6) Embodiments of the present invention will be described with reference to the attached drawings.
(7)
(8) A CPU 11 included in the numerical controller 1 of the present embodiment is a processor that generally controls the numerical controller 1. The CPU 11 reads a system program stored in a ROM 12 via a bus 20 and controls the overall numerical controller 1 in accordance with the system program. A RAM 13 temporarily stores temporary calculation data or display data, various data input externally, and the like.
(9) A nonvolatile memory 14 is comprised of a battery backed up memory or a solid state drive (SSD), or the like, and a storage state thereof is maintained even when the numerical controller 1 is powered off. The nonvolatile memory 14 stores an NC program loaded from an external device 72 via an interface 15, an NC program input via a display device/MDI unit 70, or the like. The NC program or various data stored in the nonvolatile memory 14 may be loaded to and deploy in the RAM 13 upon executed. Further, various system programs such as a known analysis program or the like are written in the ROM 12 in advance.
(10) The interface 15 is an interface used for connecting the CPU 11 of the numerical controller 1 to the external device 72 such as a USB device. A program, various parameters, or the like used for control of a machine tool is loaded from the external device 72 side. Further, the NC program, various parameters, or the like edited inside the numerical controller 1 can be stored in an external storage unit via the external device 72. A programmable machine controller (PMC) 16 outputs a signal to a machine tool and a peripheral device thereof (for example, a tool changer, an actuator such as a robot, a sensor attached to the machine tool, or the like) via an I/O unit 17 in accordance with a sequence program installed in the numerical controller 1 and controls the machine tool and the peripheral device thereof. Further, the PMC 16 receives a signal from various switches on an operating panel, peripheral devices, or the like equipped to a main body of a machine tool, performs necessary signal processing thereon, and then passes the processed signal to the CPU 11.
(11) The display device/MDI unit 70 is a manual data input device including a display, a keyboard, or the like. An interface 18 receives an instruction or data from a keyboard of the display device/MDI unit 70 and passes the instruction or the data to the CPU 11. An interface 19 is connected to a control panel 71 including a manual pulse generator or the like used when manually driving each axis.
(12) A axis control circuit 30 used for controlling an axis provided in a machine tool receives an instruction on motion amount of the axis from the CPU 11 and outputs the instruction to a servo amplifier 40. The servo amplifier 40 receives such an instruction and drives a servo motor 50 that moves the axis provided in the machine tool. The servo motor 50 of the axis has a built-in position/speed detector and feeds a position/speed feedback signal from the position/speed detector back to the axis control circuit 30 to perform feedback control of the position/speed. Note that, although the hardware configuration diagram of
(13) A spindle control circuit 60 receives a spindle rotation instruction and outputs a spindle speed signal to a spindle amplifier 61. The spindle amplifier 61 receives the spindle speed signal and rotates the spindle motor 62 of a machine tool at the instructed rotational rate to drive a tool. A position coder 63 is coupled to the spindle motor 62, the position coder 63 outputs feedback pulses in synchronization with rotation of a main axis, and the feedback pulses are read by the CPU 11.
(14)
(15) The numerical controller 1 of the present embodiment includes a lookahead unit 100, an analysis unit 110, a target speed calculation unit 120, an interpolation unit 130, a servo control unit 140, and a spindle control unit 150. Further, the nonvolatile memory 14 of the numerical controller 1 pre-stores an NC program 200 used for performing control to drive a spindle having a tool attached thereto relatively to a workpiece to machine the workpiece.
(16) The lookahead unit 100 is implemented through the execution of a system program read from the ROM 12 by the CPU 11 provided in the numerical controller 1 illustrated in
(17) The analysis unit 110 is implemented through the execution of a system program read from the ROM 12 by the CPU 11 provided in the numerical controller 1 illustrated in
(18) The target speed calculation unit 120 is implemented execution of a system program read from the ROM 12 by the CPU 11 provided in the numerical controller 1 illustrated in
(19)
(20) [Step SA01] The target speed calculation unit 120 determines whether or not the current lookahead distance d is greater than or equal to a distance dF at which stopping from the currently set target speed F is possible. If the lookahead distance d is greater than or equal to the stoppable distance dF, the process proceeds to step SA03, and if the lookahead distance d is less than the stoppable distance dF, the process proceeds to step SA02.
[Step SA02] The target speed calculation unit 120 sets, as a new target speed F, a value obtained by multiplying the currently set target speed F by a predefined reduction rate r (0<r<1) and ends the process in this flowchart.
[Step SA03] The target speed calculation unit 120 determines whether or not the current lookahead distance d is greater than a value obtained by multiplying the stoppable distance dF by (1+a predetermined margin m defined in advance). If the current lookahead distance d is greater than (1+m)×dF, the process proceeds to step SA04, and otherwise ends the process of this flowchart without recalculating the target speed F.
[Step SA04] The target speed calculation unit 120 sets, as a new target speed F, a value obtained by dividing the currently set target speed F by a predefined reduction rate r (0<r<1).
(21) [Step SA05] The target speed calculation unit 120 determines whether or not the new target speed F set in step SA04 is greater than an instructed speed F0 instructed by motion instruction data. If the new target speed F is greater than the instructed speed F0, the process proceeds to step SA06, and otherwise, the process of this flowchart ends.
(22) [Step SA06] The target speed calculation unit 120 clamps the new target speed F at the instructed speed F0 (sets the instructed speed F0 as the new target speed F). In the flowchart illustrated as an example in
(23) The interpolation unit 130 is implemented through execution of a system program read from the ROM 12 by the CPU 11 provided in the numerical controller 1 illustrated in
(24) The servo control unit 140 is implemented through execution of a system program read from the ROM 12 by the CPU 11 provided in the numerical controller 1 illustrated in
(25) The spindle control unit 150 is implemented through the execution of a system program read from the ROM 12 by the CPU 11 provided in the numerical controller 1 illustrated in
(26)
(27) As described above, with speed control being performed in accordance with the proposed scheme of the present invention, the feed speed of a tool with respect to a workpiece during machining stably changes. Therefore, grade of the machined surface of a workpiece is stabilized, and machining quality is expected to be maintained.
(28) Although the embodiments of the present invention have been described above, the present invention is not limited to only the examples in the embodiments described above and can be implemented in various forms by adding appropriate modification.