CN108241341A - Numerical control device and control method - Google Patents
Numerical control device and control method Download PDFInfo
- Publication number
- CN108241341A CN108241341A CN201711437886.6A CN201711437886A CN108241341A CN 108241341 A CN108241341 A CN 108241341A CN 201711437886 A CN201711437886 A CN 201711437886A CN 108241341 A CN108241341 A CN 108241341A
- Authority
- CN
- China
- Prior art keywords
- command
- spindle
- origin
- action
- motor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000033001 locomotion Effects 0.000 claims abstract description 196
- 230000009471 action Effects 0.000 claims abstract description 117
- 238000005520 cutting process Methods 0.000 claims description 65
- 238000010079 rubber tapping Methods 0.000 claims description 60
- 230000001174 ascending effect Effects 0.000 claims description 33
- 230000008859 change Effects 0.000 claims description 20
- 238000003754 machining Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 description 33
- 230000001133 acceleration Effects 0.000 description 17
- 238000003860 storage Methods 0.000 description 14
- 238000009826 distribution Methods 0.000 description 13
- 230000007246 mechanism Effects 0.000 description 12
- 238000005553 drilling Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000005284 excitation Effects 0.000 description 5
- 238000005070 sampling Methods 0.000 description 5
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000003825 pressing Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010438 heat treatment Methods 0.000 description 1
- 229910052742 iron Inorganic materials 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
- G05B19/414—Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller
- G05B19/4142—Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller characterised by the use of a microprocessor
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/30—Nc systems
- G05B2219/34—Director, elements to supervisory
- G05B2219/34013—Servocontroller
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P70/00—Climate change mitigation technologies in the production process for final industrial or consumer products
- Y02P70/10—Greenhouse gas [GHG] capture, material saving, heat recovery or other energy efficient measures, e.g. motor control, characterised by manufacturing processes, e.g. for rolling metal or metal working
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Human Computer Interaction (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Numerical Control (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种数值控制装置和控制方法。The invention relates to a numerical control device and a control method.
背景技术Background technique
具备刀具更换装置的机床在使主轴马达停止并将安装于主轴的刀具更换为其它刀具之后,再次使主轴旋转来再开始进行设备加工。在日本专利公开1984年80172号公报所公开的主轴马达控制方式中,在进行刀具更换时,使主轴马达停止于目标位置,将停止的状态的主轴锁定于设备主体。在主轴马达控制方式中,在主轴锁定的期间内的一部分期间将主轴马达的励磁断开,使得即使主轴在锁定期间因外力被强制地发生变化也避免主轴马达发热。在主轴马达控制方式中,在将其它刀具安装于主轴之后,将主轴马达的励磁接通,以再次使主轴旋转。In a machine tool equipped with a tool changer, the spindle motor is stopped and the tool attached to the spindle is replaced with another tool, and then the spindle is rotated again to restart machine processing. In the spindle motor control method disclosed in Japanese Patent Laying-Open No. 80172 of 1984, when performing tool replacement, the spindle motor is stopped at a target position, and the spindle in the stopped state is locked to the main body of the device. In the spindle motor control method, the excitation of the spindle motor is turned off during a part of the spindle lock period to prevent the spindle motor from heating even if the spindle is forcibly changed by external force during the lock period. In the spindle motor control method, after another tool is mounted on the spindle, the excitation of the spindle motor is turned ON to rotate the spindle again.
从主轴马达的励磁为断开的状态起直到将励磁接通来能够进行旋转为止需要规定时间。因此,以往存在如下问题点:在伴随刀具更换进行的动作时,主轴的旋转开始延迟该规定时间。It takes a predetermined time from when the excitation of the spindle motor is turned off until when the excitation is turned on and the spindle motor can be rotated. Therefore, conventionally, there has been a problem in that the start of rotation of the spindle is delayed by the predetermined time during an operation accompanying tool replacement.
发明内容Contents of the invention
本发明的目的在于,提供一种即使在执行当前的动作的过程中用于驱动主轴的马达的通电(励磁)为断开状态也能够在下一动作中迅速使主轴开始进行旋转的数值控制装置和控制方法。An object of the present invention is to provide a numerical control device and a numerical control device capable of rapidly starting the rotation of the main shaft in the next operation even if the energization (excitation) of the motor for driving the main shaft is off during the current operation. Control Method.
技术方案1的数值控制装置具备控制部,该控制部对NC程序的控制指令进行解释来生成内部指令,按照所生成的该内部指令来控制设备的动作,在数值控制装置中,所述设备具有用于安装刀具的主轴,所述控制部具备:第一判断部,其判断是否为用于对所述主轴进行旋转驱动的马达的通电为断开状态且所述设备的当前的动作为轴移动;第二判断部,在所述第一判断部判断为所述马达的通电为断开状态且所述当前的动作为轴移动时,所述第二判断部判断在下一动作的所述内部指令中是否包含用于使所述主轴旋转的主轴旋转指令;以及通电控制部,在所述第二判断部判断为在所述下一动作的所述内部指令中包含所述主轴旋转指令时,所述通电控制部在轴移动完成之前,将所述马达的通电从断开状态切换为接通状态。在将用于驱动主轴的马达从断开状态切换为接通状态时,耗费时间。在当前的动作为轴移动且在下一动作的内部指令中包含主轴旋转指令时,在作为当前的动作的轴移动完成之前,数值控制装置将马达的通电从断开状态切换为接通状态。因此,数值控制装置能够在下一动作中缩短直至马达成为接通状态使主轴能够进行旋转为止的待机时间。在不使用用于对主轴进行旋转驱动的马达的期间,原则上将该马达的通电设为断开状态即可。因此,数值控制装置能够消耗设备所消耗的电力。The numerical control device of claim 1 includes a control unit that interprets a control command of the NC program to generate an internal command, and controls the operation of the device according to the generated internal command. In the numerical control device, the device has A spindle for mounting a tool, wherein the control unit includes: a first judging unit that judges whether the power supply to the motor for rotationally driving the spindle is off and the current operation of the device is shaft movement. the second judging part, when the first judging part judges that the power supply of the motor is off and the current action is shaft movement, the second judging part judges that the internal command in the next action whether the main shaft rotation command for rotating the main shaft is included in; and the energization control unit determines that the main shaft rotation command is included in the internal command for the next operation when the second determination unit determines that the main shaft rotation command is included. The energization control unit switches energization of the motor from an off state to an on state before the movement of the shaft is completed. It takes time to switch the motor for driving the spindle from the off state to the on state. When the current operation is axis movement and the spindle rotation command is included in the internal command for the next operation, the numerical controller switches the power supply to the motor from OFF to ON before the axis movement as the current operation is completed. Therefore, the numerical control device can shorten the standby time until the motor turns on and the main shaft can rotate in the next operation. When the motor for rotationally driving the main shaft is not used, in principle, the power supply to the motor should be turned off. Therefore, the numerical controller can consume the power consumed by the equipment.
技术方案2的数值控制装置的所述控制部也可以还具备旋转执行部,在所述通电控制部将所述马达的通电设为接通状态之后,当轴移动完成后执行所述下一动作的所述内部指令时,所述旋转执行部执行所述主轴旋转指令。数值控制装置即使在轴移动完成之前将马达的通电设为接通状态,也在执行下一内部指令之前不使主轴旋转。假设在轴移动完成的时间点停止设备的动作时,主轴为停止状态。因此,数值控制装置防止主轴成为旋转状态,从而能够提高作业的安全性。The control unit of the numerical control device according to claim 2 may further include a rotation execution unit configured to execute the next operation after the shaft movement is completed after the energization control unit turns on the energization of the motor. When the internal command is issued, the rotation execution unit executes the spindle rotation command. The numerical controller does not rotate the main shaft until the next internal command is executed even if the motor is turned on before the movement of the axis is completed. Assume that the spindle is in a stopped state when the machine is stopped at the point in time when the axis movement is completed. Therefore, the numerical control device prevents the main shaft from being rotated, thereby improving the safety of work.
技术方案3、4的数值控制装置的所述控制部也可以是,在所述NC程序的所述控制指令为对被削件执行攻螺纹的攻螺纹指令时,所述控制部生成轴移动指令、切削进给指令以及退出指令来作为所述内部指令,所述轴移动指令用于在所述马达的通电为断开状态下从当前位置向基准点进行轴移动,所述基准点是在所述被削件中开始进行加工的位置,所述切削进给指令包含使所述主轴旋转的所述主轴旋转指令,用于根据所述主轴旋转指令使所述主轴旋转且从所述基准点向所述被削件的目标位置进行切削进给,所述退出指令用于在将所述切削进给进行到所述目标位置之后,使所述主轴向与所述切削进给时的旋转方向相反的方向旋转,且进行用于将所述主轴从形成于所述被削件的孔中退出的轴移动,在所述第一判断部判断为所述马达的通电为断开状态且所述当前的动作为与所述轴移动指令对应的轴移动,并且所述第二判断部判断为在作为所述下一动作的所述内部指令的所述切削进给指令中包含所述主轴旋转指令时,所述通电控制部在作为所述当前的动作的向所述基准点的轴移动完成之前,将所述马达的通电从断开状态切换为接通状态。控制部当对攻螺纹指令进行解释时,生成轴移动指令、切削进给指令、退出指令这三个内部指令。在执行从当前位置至基准点的轴移动指令的过程中马达的通电为断开状态时,下一动作的内部指令为包含主轴旋转指令的切削进给指令。因此,数值控制装置能够在至基准点的轴移动完成之前,将马达的通电从断开状态切换为接通状态。因此,数值控制装置在进行攻螺纹动作时,也能够缩短直至将马达设为接通状态来使主轴旋转为止的待机时间。In the numerical control device according to claims 3 and 4, the control unit may generate an axis movement command when the control command of the NC program is a tapping command for performing tapping on a workpiece. , a cutting feed command, and an exit command are used as the internal commands. The axis movement command is used to move the axis from the current position to the reference point when the power to the motor is turned off. The reference point is at the The position at which machining starts in the workpiece, the cutting feed command includes the spindle rotation command for rotating the spindle, and is used to rotate the spindle according to the spindle rotation command from the reference point to the The cutting feed is performed at the target position of the workpiece, and the exit command is used to make the spindle direction and the rotation direction during the cutting feed after the cutting feed is carried out to the target position. Rotate in the opposite direction and perform shaft movement for withdrawing the main shaft from the hole formed in the workpiece, and the first judging unit judges that the energization of the motor is off and the The current operation is an axis movement corresponding to the axis movement command, and the second determination unit determines that the spindle rotation command is included in the cutting feed command as the internal command for the next operation. , the energization control unit switches the energization of the motor from the OFF state to the ON state before the axis movement to the reference point as the current operation is completed. When the control unit interprets the tapping command, it generates three internal commands of an axis movement command, a cutting feed command, and an exit command. When the motor is turned off during the execution of the axis movement command from the current position to the reference point, the internal command for the next operation is a cutting feed command including a spindle rotation command. Therefore, the numerical controller can switch the energization of the motor from the OFF state to the ON state before the axis movement to the reference point is completed. Therefore, the numerical control device can also shorten the standby time until the motor is turned on and the main shaft is rotated when the tapping operation is performed.
技术方案5~8的数值控制装置的所述控制部所控制的所述设备也可以是,具备:主轴头,其以所述主轴能够旋转的方式支承该主轴,且被设置为能够沿上下方向移动;以及刀库,在所述主轴头位于ATC原点时,所述刀库旋转且支承刀具,所述ATC原点是所述主轴头的上下方向的移动范围内的比设备原点靠上方的位置,所述设备能够执行刀具更换动作,该刀具更换动作包括以下动作:第一上升动作,使所述主轴头从当前位置向所述设备原点上升;第二上升动作,使所述主轴头从所述设备原点向所述ATC原点上升,在此期间,将当前安装于所述主轴的当前刀具卸下后交接到所述刀库;旋转动作,在所述主轴头位于所述ATC原点时,使所述刀库旋转来将接下来向所述主轴安装的下一刀具定位成与所述主轴相向;第一下降动作,使所述主轴头从所述ATC原点向所述设备原点下降,在此期间,从所述刀库接收所述下一刀具后安装于所述主轴;以及第二下降动作,使所述主轴头从所述设备原点向目标位置下降,在此期间,使所述主轴旋转,在所述NC程序的所述控制指令为用于指示所述刀具更换动作的刀具更换指令时,所述生成部生成第一上升指令、第二上升指令、旋转指令、第一下降指令以及第二下降指令来作为所述内部指令,所述第一上升指令用于指示所述第一上升动作的轴移动,所述第二上升指令用于指示所述第二上升动作的轴移动,所述旋转指令用于指示所述旋转动作,所述第一下降指令用于指示所述第一下降动作的轴移动,所述第二下降指令用于指示所述第二下降动作的轴移动,并且包含使所述主轴旋转的所述主轴旋转指令,在所述第一判断部判断为所述马达的通电为断开状态且所述当前的动作为与所述第一下降指令对应的轴移动,并且所述第二判断部判断为在作为所述下一动作的所述内部指令的所述第二下降指令中包含所述主轴旋转指令时,所述通电控制部在所述第一下降动作中的向所述设备原点的轴移动完成之前,将所述马达的通电从断开状态切换为接通状态。控制部对刀具更换指令进行解释,生成第一上升指令、第二上升指令、旋转指令、第一下降指令以及第二下降指令来作为内部指令。第二下降指令是包含主轴旋转指令的指令。因此,数值控制装置在执行第一下降指令的过程中,在下一动作的内部指令为第二下降指令时,能够在第一下降动作中的向设备原点的轴移动完成之前,将马达的通电从断开状态切换为接通状态。因此,数值控制装置在进行刀具更换动作时,也能够缩短直至将马达设为接通状态来使主轴旋转为止的待机时间。The device controlled by the control unit of the numerical control device according to claims 5 to 8 may include: a spindle head that supports the spindle in a rotatable manner and is provided so as to be able to move vertically in the vertical direction. moving; and a tool magazine, the tool magazine rotates and supports a tool when the spindle head is located at an ATC origin, the ATC origin is a position above the equipment origin within the movement range of the spindle head in the up and down direction, The device is capable of performing a tool replacement action, and the tool replacement action includes the following actions: a first lifting action, which makes the spindle head rise from the current position to the origin of the device; a second lifting action, which makes the spindle head rise from the The origin of the equipment rises to the origin of the ATC. During this period, the current tool currently installed on the spindle is removed and handed over to the tool magazine; when the spindle head is at the origin of the ATC, the rotation action makes the The tool magazine rotates to position the next tool to be installed on the main shaft to face the main shaft; the first descending action makes the main shaft head descend from the ATC origin to the equipment origin, during which , receiving the next tool from the tool magazine and installing it on the spindle; and a second descending action, causing the spindle head to descend from the origin of the device to a target position, during which time the spindle is rotated, When the control command of the NC program is a tool replacement command for instructing the tool replacement operation, the generator generates a first ascending command, a second ascending command, a rotation command, a first descending command, and a second A descending command is used as the internal command, the first ascending command is used to instruct the shaft movement of the first ascending action, the second ascending command is used to indicate the shaft movement of the second ascending action, and the rotation The command is used to indicate the rotation action, the first lowering command is used to indicate the shaft movement of the first lowering action, and the second lowering command is used to indicate the shaft movement of the second lowering action, and includes The main shaft rotation command for the main shaft rotation is judged by the first judging unit that the energization of the motor is off and the current operation is a shaft movement corresponding to the first lowering command, and the When the second determination unit determines that the second lowering command as the internal command for the next operation includes the main shaft rotation command, the direction of the energization control unit during the first lowering operation The energization of the motor is switched from an off state to an on state before the axis movement of the origin of the device is completed. The control unit interprets the tool replacement command, and generates a first ascending command, a second ascending command, a rotation command, a first descending command, and a second descending command as internal commands. The second descending command is a command including a spindle rotation command. Therefore, when the numerical control device executes the first lowering command, when the internal command for the next operation is the second lowering command, it is possible to stop the power supply of the motor from The off state is switched to the on state. Therefore, the numerical control device can also shorten the standby time until the motor is turned on and the main shaft is rotated when the tool replacement operation is performed.
技术方案9的数值控制装置也可以是,还具备设定部,该设定部能够设定如下范围的上限值,该范围是在所述第一下降动作中在比对所述主轴安装所述刀具的规定位置靠下方且比所述设备原点靠上方的范围内所述通电控制部能够将所述马达的通电从断开状态切换为接通状态的范围,在所述第一判断部判断为所述马达的通电为断开状态且所述当前的动作为与所述第一下降指令对应的轴移动,并且所述第二判断部判断为在作为所述下一动作的所述内部指令的所述第二下降指令中包含所述主轴旋转指令,且在所述第一下降动作中为所述设定部设定的所述上限值以下时,所述通电控制部在向所述设备原点的轴移动完成之前,将所述马达的通电从断开状态切换为接通状态。数值控制装置能够设定在第一下降动作中在比规定位置靠下方且比设备原点靠上方的范围内能够将马达的通电从断开状态切换为接通状态的范围的上限值。在到达了规定位置时,主轴的马达为断开状态,处于马达的转矩没有施加于主轴的状态。因此,数值控制装置防止在到达了规定位置时马达的转矩对设备产生影响。The numerical control device according to claim 9 may further include a setting unit capable of setting an upper limit value of a range that is compared with that of the spindle attachment during the first lowering operation. In the range where the energization control unit can switch the energization of the motor from the off state to the on state within the range below the predetermined position of the cutter and above the origin of the device, the first determination unit judges The energization of the motor is off and the current operation is shaft movement corresponding to the first lowering command, and the second determination unit determines that the internal command that is the next operation is When the spindle rotation command is included in the second lowering command, and the upper limit value set by the setting unit is equal to or smaller than the upper limit value set by the setting unit during the first lowering operation, the energization control unit sends Before the axis movement of the origin of the device is completed, the energization of the motor is switched from the OFF state to the ON state. The numerical controller can set an upper limit value of a range in which energization of the motor can be switched from an off state to an on state within a range below the predetermined position and above the origin of the device during the first lowering operation. When the predetermined position is reached, the motor of the main shaft is turned off, and the torque of the motor is not applied to the main shaft. Therefore, the numerical controller prevents the torque of the motor from affecting the equipment when the predetermined position is reached.
在技术方案10的控制方法是一种数值控制装置的控制方法,包括控制步骤,在该控制步骤中,对NC程序的控制指令进行解释来生成内部指令,按照所生成的所述内部指令来对具有用于安装刀具的主轴的设备的动作进行控制,在所述控制方法中,所述控制步骤包括以下步骤:第一判断步骤,判断是否为用于对所述主轴进行旋转驱动的马达的通电为断开状态且在所述控制步骤中控制的所述设备的当前的动作为轴移动;第二判断步骤,在所述第一判断步骤中判断为所述马达的通电为断开状态且所述当前的动作为轴移动时,判断在下一动作的所述内部指令中是否包含用于使所述主轴旋转的主轴旋转指令;以及通电控制步骤,在所述第二判断步骤中判断为在所述下一动作的所述内部指令中包含所述主轴旋转指令时,在轴移动完成之前,将所述马达的通电从断开状态切换为接通状态。数值控制装置通过进行上述步骤,能够得到技术方案1~9所记载的效果。The control method in claim 10 is a control method of a numerical control device, including a control step in which an internal command is generated by interpreting a control command of the NC program, and the internal command is executed according to the generated internal command. In the control method, the control step includes the following steps: a first judging step, judging whether it is the energization of the motor for rotationally driving the main shaft is in an off state and the current action of the device controlled in the control step is shaft movement; in the second judging step, it is judged in the first judging step that the energization of the motor is in an off state and the When the current action is axis movement, it is judged whether the internal command for the next action includes a spindle rotation command for rotating the spindle; When the internal command for the next operation includes the main shaft rotation command, the power supply to the motor is switched from the OFF state to the ON state before the shaft movement is completed. The numerical control device can obtain the effects described in claims 1 to 9 by performing the above steps.
本发明也可以将上述权利要求1~9的发明特定事项的一部分任意地组合。In the present invention, a part of the invention-specific matters of the above-mentioned claims 1 to 9 may be arbitrarily combined.
附图说明Description of drawings
图1是机床1的立体图。FIG. 1 is a perspective view of a machine tool 1 .
图2是主轴头7周围的局部剖视图。FIG. 2 is a partial cross-sectional view around the spindle head 7 .
图3是刀具更换动作的路径图。Fig. 3 is a route diagram of a tool replacement operation.
图4是主轴头7的升降动作中的主轴头7周围的局部剖视图。FIG. 4 is a partial cross-sectional view around the spindle head 7 during the lifting operation of the spindle head 7 .
图5是主轴头7的升降动作中的主轴头7周围的局部剖视图。FIG. 5 is a partial cross-sectional view around the spindle head 7 during the up-and-down operation of the spindle head 7 .
图6是主轴头7的升降动作中的主轴头7周围的局部剖视图。FIG. 6 is a partial cross-sectional view around the spindle head 7 during the lifting operation of the spindle head 7 .
图7是主轴头7的升降动作中的主轴头7周围的局部剖视图。FIG. 7 is a partial cross-sectional view around the spindle head 7 during the up-and-down operation of the spindle head 7 .
图8是示出机床1和数值控制装置30的电结构的框图。FIG. 8 is a block diagram showing the electrical configuration of the machine tool 1 and the numerical control device 30 .
图9是对速度块B1施以加减速处理的图。FIG. 9 is a diagram in which acceleration and deceleration processing is applied to the speed block B1.
图10是示出基本动作模式中的主轴马达接通指令的输出时的时刻图。FIG. 10 is a timing chart showing the output of the spindle motor ON command in the basic operation mode.
图11是示出对象动作模式A~G的表。FIG. 11 is a table showing target operation modes A to G.
图12是移动控制处理的流程图。Fig. 12 is a flowchart of movement control processing.
图13是示出图12的后续的流程图。FIG. 13 is a flowchart showing a continuation of FIG. 12 .
图14是模式A的时刻图。FIG. 14 is a timing chart of Mode A. FIG.
图15是模式B的时刻图。FIG. 15 is a timing chart of mode B.
图16是攻螺纹动作的路径图。Fig. 16 is a path diagram of a tapping operation.
图17是模式C的时刻图。FIG. 17 is a timing chart of mode C.
图18是模式D的时刻图。FIG. 18 is a timing chart of Mode D. FIG.
图19是模式G的时刻图。FIG. 19 is a time chart of mode G.
图20是钻孔动作的路径图。Fig. 20 is a path diagram of the drilling operation.
具体实施方式Detailed ways
说明本发明的实施方式。在以下说明中,使用图1中用箭头表示的左右、前后、上下。机床1的左右方向、前后方向、上下方向分别为机床1的X轴方向、Y轴方向、Z轴方向。Embodiments of the present invention will be described. In the following description, left and right, front and rear, and up and down indicated by arrows in FIG. 1 are used. The left-right direction, front-rear direction, and up-down direction of the machine tool 1 are the X-axis direction, the Y-axis direction, and the Z-axis direction of the machine tool 1 , respectively.
参照图1来说明机床1的构造。机床1具备基台2、设备主体3、工作台10以及刀具更换装置20等。基台2是大致长方体状的铁制基台。设备主体3设置于基台2上部后方,用于对被保持于工作台10上表面的被削件(省略图示)进行切削。工作台10设置于基台2上部中央,能够通过X轴马达51、Y轴马达52(参照图8)以及引导机构(省略图示)来沿X轴方向和Y轴方向移动。刀具更换装置20被固定于设置于设备主体3上部的框架8,用于将设备主体3的主轴9上安装的刀具4更换为其它刀具(以下称为下一刀具)。The configuration of the machine tool 1 will be described with reference to FIG. 1 . The machine tool 1 includes a base 2 , an equipment main body 3 , a table 10 , a tool changing device 20 , and the like. The base 2 is a substantially cuboid iron base. The equipment main body 3 is provided behind the upper part of the base 2 and is used for cutting a workpiece (not shown) held on the upper surface of the table 10 . The table 10 is provided at the upper center of the base 2, and is movable in the X-axis direction and the Y-axis direction by an X-axis motor 51, a Y-axis motor 52 (see FIG. 8 ) and a guide mechanism (not shown). The tool changer 20 is fixed to the frame 8 provided on the upper part of the equipment main body 3, and is used to replace the tool 4 mounted on the main shaft 9 of the equipment main body 3 with another tool (hereinafter referred to as the next tool).
机床1具备操作板15(参照图8)。操作板15具备输入部24和显示部25。作业人员通过输入部24来输入NC程序、刀具的种类、刀具信息、各种参数等。当作业人员操作输入部24时,显示部25显示各种输入画面或操作画面等。The machine tool 1 includes an operation panel 15 (see FIG. 8 ). The operation panel 15 includes an input unit 24 and a display unit 25 . A worker inputs an NC program, a tool type, tool information, various parameters, and the like through the input unit 24 . When a worker operates the input unit 24 , the display unit 25 displays various input screens, operation screens, and the like.
参照图1、图2来说明设备主体3的结构。设备主体3具备立柱5、主轴头7、主轴9以及控制箱6等。立柱5竖立设置于基台2上部后方。主轴头7能够沿着立柱5前表面沿Z轴方向升降。在主轴9处安装有刀具保持件17(参照图2),主轴9通过主轴马达54的驱动来进行高速旋转。主轴马达54设置于主轴头7上部。刀具保持件17用于保持刀具4。控制箱6用于收纳数值控制装置30(参照图8)。数值控制装置30对机床1的动作进行控制。The configuration of the device main body 3 will be described with reference to FIGS. 1 and 2 . The device main body 3 includes a column 5, a spindle head 7, a spindle 9, a control box 6, and the like. The column 5 is vertically arranged behind the upper part of the abutment 2 . The spindle head 7 can be raised and lowered along the Z-axis direction along the front surface of the column 5 . A tool holder 17 (see FIG. 2 ) is attached to the spindle 9 , and the spindle 9 is driven to rotate at high speed by a spindle motor 54 . The spindle motor 54 is arranged on the top of the spindle head 7 . The knife holder 17 serves to hold the knife 4 . The control box 6 houses a numerical controller 30 (see FIG. 8 ). The numerical controller 30 controls the operation of the machine tool 1 .
主轴头7通过设置于立柱5前表面的Z轴移动机构来沿Z轴方向进行升降。Z轴移动机构具备一对Z轴引导机构(省略图示)、Z轴滚珠丝杠26以及Z轴马达53(参照图8)。Z轴引导机构沿Z轴方向延伸且沿Z轴方向引导主轴头7。Z轴滚珠丝杠26配置在一对Z轴引导机构之间,设置为能够通过上侧轴承部27和下侧轴承部(省略图示)来进行旋转。主轴头7在背面具备螺母29。螺母29与Z轴滚珠丝杠26螺纹结合。Z轴马达53使Z轴滚珠丝杠26向正反方向旋转。因此,主轴头7与螺母29一起沿Z轴方向移动。主轴头7在前方下部的内侧以主轴9能够旋转的方式支承主轴9。主轴9具有沿上下方向延伸的旋转轴。主轴9经由连结部23来与主轴马达54的驱动轴连结。因此,主轴9通过主轴马达54的旋转驱动来进行旋转。主轴9具备锥形孔18、保持件夹持构件19以及牵引杆81。锥形孔18设置于主轴9顶端部(下端部)。保持件夹持构件19设置于锥形孔18上方。牵引杆81设置于主轴9内部。刀具保持件17在一端侧保持刀具4,在另一端侧具备锥形安装部17A和牵引螺栓(pull stud)17B。锥形安装部17A为大致圆锥状。牵引螺栓17B从锥形安装部17A的顶部沿轴向突出。锥形安装部17A安装于主轴9的锥形孔18。当将锥形安装部17A安装于锥形孔18时,保持件夹持构件19夹持牵引螺栓17B。当牵引杆81向下方按压保持件夹持构件19时,保持件夹持构件19将对牵引螺栓17B的夹持解除。主轴头7在后方上部内侧具备杆构件60。杆构件60为大致L字型,以支轴61为中心摆动自如。支轴61固定于主轴头7内。杆构件60具备纵向杆63和横向杆62。纵向杆63从支轴61起相对于立柱5侧向斜上方延伸后在中间部65向上方弯曲并进一步向上方延伸。横向杆62从支轴61起向主轴9侧大致水平地延伸。横向杆62前端部能够从与牵引杆81正交地突出设置的销58的上方与该销58卡合。纵向杆63在上端部背面具备板凸轮体66。板凸轮体66在立柱5侧具备凸轮面。板凸轮体66的凸轮面能够与固定于上侧轴承部27的凸轮从动件67接触和分离。凸轮从动件67在板凸轮体66的凸轮面滑动。拉伸盘簧(省略图示)以具有弹力的方式设置于纵向杆63与主轴头7之间。在从右侧面观察杆构件60时,拉伸盘簧始终沿顺时针方向对杆构件60施力。因此,杆构件60始终将由横向杆62对销58向下方向的按压解除。刀具更换装置20具备刀库21。刀库21具备圆盘状的刀库基部71和多个握持臂90。多个握持臂90沿着刀库基部71外周以能够沿前后方向摆动的方式设置。刀库支承台45固定于框架8一端。框架8另一端固定于立柱5。刀库支承台45以支轴75能够旋转的方式支承支轴75。支轴75相对于机床1的前方向斜下方延伸。支轴75以刀库基部71能够旋转的方式支承刀库基部71。刀库基部71以正面朝向机床1的前方的方式配置。The spindle head 7 is raised and lowered in the Z-axis direction by a Z-axis moving mechanism provided on the front surface of the column 5 . The Z-axis moving mechanism includes a pair of Z-axis guide mechanisms (not shown), a Z-axis ball screw 26 , and a Z-axis motor 53 (see FIG. 8 ). The Z-axis guide mechanism extends in the Z-axis direction and guides the spindle head 7 in the Z-axis direction. The Z-axis ball screw 26 is disposed between a pair of Z-axis guide mechanisms, and is provided rotatably via an upper bearing portion 27 and a lower bearing portion (not shown). The spindle head 7 is provided with a nut 29 on the back. The nut 29 is threadedly combined with the Z-axis ball screw 26 . The Z-axis motor 53 rotates the Z-axis ball screw 26 in forward and reverse directions. Therefore, the spindle head 7 moves in the Z-axis direction together with the nut 29 . The spindle head 7 rotatably supports the spindle 9 inside the front lower portion. The main shaft 9 has a rotation axis extending in the vertical direction. The spindle 9 is connected to the drive shaft of the spindle motor 54 via the connection portion 23 . Therefore, the spindle 9 is rotated by the rotation drive of the spindle motor 54 . The main shaft 9 is provided with a tapered hole 18 , a holder holding member 19 , and a draw bar 81 . The tapered hole 18 is provided at the top end (lower end) of the main shaft 9 . The holder clamping member 19 is disposed above the tapered hole 18 . The draw bar 81 is arranged inside the main shaft 9 . The tool holder 17 holds the tool 4 on one end side, and has a tapered mounting portion 17A and a pull stud 17B on the other end side. The tapered mounting portion 17A has a substantially conical shape. A draw bolt 17B axially protrudes from the top of the tapered mounting portion 17A. The tapered mounting portion 17A is mounted on the tapered hole 18 of the main shaft 9 . When the tapered mounting portion 17A is mounted to the tapered hole 18 , the holder holding member 19 holds the pull bolt 17B. When the draw bar 81 presses the holder clamping member 19 downward, the holder clamping member 19 releases the clamping of the draw bolt 17B. The spindle head 7 is provided with a rod member 60 inside the rear upper portion. The lever member 60 has a substantially L-shape and is free to swing around the support shaft 61 . The supporting shaft 61 is fixed inside the spindle head 7 . The rod member 60 includes a longitudinal rod 63 and a lateral rod 62 . The longitudinal rod 63 extends obliquely upward relative to the side of the column 5 from the support shaft 61 , then bends upward at the middle portion 65 and further extends upward. The transverse rod 62 extends substantially horizontally from the support shaft 61 toward the main shaft 9 side. The front end portion of the transverse rod 62 can engage with the pin 58 protruding perpendicularly to the draw bar 81 from above the pin 58 . The longitudinal bar 63 is provided with a plate cam body 66 on the back of the upper end. The plate cam body 66 has a cam surface on the column 5 side. The cam surface of the plate cam body 66 is capable of contacting and separating from the cam follower 67 fixed to the upper bearing portion 27 . The cam follower 67 slides on the cam surface of the plate cam body 66 . A tension coil spring (not shown) is elastically provided between the longitudinal rod 63 and the spindle head 7 . When viewing the lever member 60 from the right side, the tension coil spring always urges the lever member 60 in the clockwise direction. Therefore, the lever member 60 always releases the downward pressing of the pin 58 by the horizontal lever 62 . The tool changing device 20 includes a tool magazine 21 . The tool magazine 21 includes a disk-shaped tool magazine base 71 and a plurality of grip arms 90 . A plurality of grip arms 90 are provided along the outer periphery of the tool magazine base 71 so as to be swingable in the front-rear direction. The tool magazine supporting platform 45 is fixed on one end of the frame 8 . The other end of the frame 8 is fixed to the column 5 . The tool magazine support 45 supports the spindle 75 so that the spindle 75 can rotate. The support shaft 75 extends obliquely downward with respect to the front of the machine tool 1 . The support shaft 75 supports the magazine base 71 in a rotatable manner. The magazine base 71 is arranged so that the front faces the front of the machine tool 1 .
参照图3~图7来说明刀具更换动作。在以下说明中,将Z轴的设备原点称为Z轴原点。设备原点是X轴、Y轴的设备坐标为零的位置,是Z轴的设备坐标成为能够对被削件进行加工的上限位置的位置。在本实施方式中,为了便于说明,将目标位置(加工位置)假定为Z200,将当前位置假定为Z300,将Z轴原点假定为Z400,将ATC原点假定为Z500(参照图3)。比Z轴原点靠工作台10侧的区域为加工区域,比Z轴原点靠与加工区域相反的一侧的区域为刀具更换区域。加工区域是用于进行被削件的加工动作的区域。刀具更换区域是用于由刀具更换装置20进行刀具更换的区域。各数字的单位为mm。刀具更换动作包括第一工序101~第五工序105。如图4所示,第一工序101是在将刀具保持件17的锥形安装部17A安装于主轴9的锥形孔18的状态下使主轴头7从当前位置(例如加工位置)朝向Z轴原点上升来执行主轴9的定向(orient)动作的工序。定向动作是将主轴9的旋转角度位置停止于规定位置的动作。第二工序102是使主轴头7从Z轴原点朝向ATC原点上升并将主轴马达54的电源设为断开状态的工序。在Z轴原点与ATC原点之间的规定位置,设置于杆构件60的板凸轮体66与凸轮从动件67接触来进行滑动。如图5所示,握持臂90的把持部91把持刀具保持件17,凸轮从动件67沿着板凸轮体66的凸轮形状滑动。杆构件60在右侧面观察时以支轴61为中心沿逆时针方向旋转。横向杆62从销58的上方与销58卡合后向下方按压牵引杆81。牵引杆81向下方对保持件夹持构件19施力。保持件夹持构件19将对牵引螺栓17B的夹持解除。The tool replacement operation will be described with reference to FIGS. 3 to 7 . In the following description, the device origin of the Z-axis is referred to as the Z-axis origin. The machine origin is a position where the machine coordinates of the X-axis and the Y-axis are zero, and is a position where the machine coordinates of the Z-axis are the upper limit position where a workpiece can be machined. In this embodiment, for convenience of description, the target position (processing position) is assumed to be Z200, the current position is assumed to be Z300, the Z-axis origin is assumed to be Z400, and the ATC origin is assumed to be Z500 (see FIG. 3 ). The area closer to the table 10 than the Z-axis origin is the machining area, and the area opposite the Z-axis origin to the machining area is the tool replacement area. The machining area is an area for performing machining operations on workpieces. The tool changing area is an area for tool changing by the tool changing device 20 . The unit of each figure is mm. The tool replacement operation includes a first step 101 to a fifth step 105 . As shown in FIG. 4 , the first step 101 is to move the spindle head 7 from the current position (for example, the processing position) toward the Z-axis in the state where the tapered mounting portion 17A of the tool holder 17 is mounted on the tapered hole 18 of the spindle 9 . This is a process of performing an orienting operation of the main shaft 9 by raising the origin. The orientation operation is an operation for stopping the rotational angular position of the main shaft 9 at a predetermined position. The second step 102 is a step of raising the spindle head 7 from the Z-axis origin toward the ATC origin and turning off the power supply of the spindle motor 54 . At a predetermined position between the Z-axis origin and the ATC origin, the plate cam body 66 provided on the lever member 60 contacts and slides with the cam follower 67 . As shown in FIG. 5 , the grip portion 91 of the grip arm 90 grips the knife holder 17 , and the cam follower 67 slides along the cam shape of the plate cam body 66 . The lever member 60 rotates counterclockwise around the support shaft 61 when viewed from the right side. The horizontal bar 62 engages with the pin 58 from above and presses the draw bar 81 downward. The draw bar 81 biases the holder holding member 19 downward. The holder clamping member 19 releases the clamping of the pull bolt 17B.
如按图6、图7的顺序所示的那样,主轴头7进一步上升。刀具保持件17从主轴9的锥形孔18脱出。刀具保持件17从主轴9的锥形孔18的拆卸完成。如上述的那样,在第二工序102中,主轴马达54为断开状态。因此,机床1防止用于对主轴9装卸刀具保持件17的机械机构与主轴马达54的接通状态时的转矩相叠加而发生振荡,因此不对机械机构施加负荷。机械机构包含牵引杆81、杆构件60、拉伸盘簧等。主轴头7到达ATC原点。第三工序103是使刀库21旋转的工序。刀具更换装置20将NC程序的控制指令所指定的下一刀具定位于刀具更换位置。刀具更换位置是刀库21的最下方位置且与主轴9接近并相向的位置。被定位于刀具更换位置的下一刀具位于移动到ATC原点的主轴头7的下方。如按图7、图6的顺序所示的那样,第四工序104是主轴头7从ATC原点朝向Z轴原点下降来使刀具保持件17的锥形安装部17A进入到主轴9的锥形孔18的工序。在将刀具保持件17的锥形安装部17A插入到主轴9的锥形孔18的状态下,主轴头7进一步下降。设置于杆构件60的板凸轮体66向凸轮从动件67滑动。凸轮从动件67沿着板凸轮体66的凸轮形状滑动。如图5所示,杆构件60在右侧面观察时以支轴61为中心沿顺时针方向旋转。因此,横向杆62与销58分离,将对牵引杆81向下方的按压解除。牵引杆81将对保持件夹持构件19向下方的施力解除,保持件夹持构件19夹持牵引螺栓17B。主轴头7进一步下降来到达Z轴原点。第五工序105是主轴头7从Z轴原点朝向目标位置下降的工序。在刀具更换动作结束之后接着执行切削进给时,在主轴头7到达目标位置之前,数值控制装置30使主轴马达54开始旋转。主轴头7到达目标位置,刀具更换动作结束。在主轴头7到达目标位置之后,主轴转速达到目标值后,数值控制装置30执行切削进给。第一工序101和第二工序102为上升工序,第四工序104和第五工序105为下降工序。As shown in the order of FIGS. 6 and 7 , the spindle head 7 is further raised. The tool holder 17 emerges from the tapered hole 18 of the spindle 9 . The removal of the tool holder 17 from the tapered hole 18 of the spindle 9 is complete. As described above, in the second step 102, the spindle motor 54 is turned off. Therefore, the machine tool 1 prevents the mechanical mechanism for attaching and detaching the tool holder 17 from the spindle 9 from oscillating due to the superposition of the torque of the spindle motor 54 in the ON state, so that no load is applied to the mechanical mechanism. The mechanical mechanism includes a draw bar 81, a rod member 60, a tension coil spring, and the like. The spindle head 7 arrives at the ATC origin. The third step 103 is a step of rotating the tool magazine 21 . The tool changer 20 positions the next tool designated by the control command of the NC program at the tool change position. The tool replacement position is the lowermost position of the tool magazine 21 and a position close to and facing the main shaft 9 . The next tool positioned at the tool change position is located below the spindle head 7 moved to the ATC origin. As shown in the order of FIG. 7 and FIG. 6 , the fourth process 104 is to lower the spindle head 7 from the ATC origin toward the Z-axis origin so that the tapered mounting portion 17A of the tool holder 17 enters the tapered hole of the spindle 9 18 processes. With the tapered mounting portion 17A of the tool holder 17 inserted into the tapered hole 18 of the spindle 9 , the spindle head 7 further descends. The plate cam body 66 provided on the lever member 60 slides toward the cam follower 67 . The cam follower 67 slides along the cam shape of the plate cam body 66 . As shown in FIG. 5 , the lever member 60 rotates clockwise around the support shaft 61 when viewed from the right side. Therefore, the horizontal bar 62 is separated from the pin 58, and the downward pressing on the draw bar 81 is released. The draw bar 81 releases the downward bias on the holder holding member 19 , and the holder holding member 19 holds the draw bolt 17B. The spindle head 7 further descends to reach the Z-axis origin. The fifth step 105 is a step in which the spindle head 7 descends from the Z-axis origin toward the target position. When the cutting feed is performed next to the end of the tool changing operation, the numerical controller 30 starts the rotation of the spindle motor 54 before the spindle head 7 reaches the target position. The spindle head 7 reaches the target position, and the tool replacement operation ends. After the spindle head 7 reaches the target position and the spindle speed reaches the target value, the numerical control device 30 executes the cutting feed. The first process 101 and the second process 102 are ascending processes, and the fourth process 104 and the fifth process 105 are descending processes.
参照图8来说明数值控制装置30和机床1的电结构。数值控制装置30具备CPU 31、ROM 32、RAM 33、存储装置34、输入输出部50以及马达控制部35~39等。CPU 31对数值控制装置30进行统一控制。ROM 32存储各种程序等。ROM 32存储用于CPU 31执行后述的移动控制处理(参照图12、图13)的移动控制程序。CPU 31作为通过将ROM 32中存储的移动控制程序在RAM 33上解压来执行移动控制部的处理装置的一例发挥功能。RAM 33暂时存储执行各种处理的过程中的各种数据。存储装置34例如是非易失性的快闪存储器,例如存储作业人员通过输入部24输入并登记的多个NC程序等。NC程序由包含各种控制指令的多个块构成,以块为单位对包括机床1的轴移动、刀具更换等在内的各种动作进行控制。轴移动是指使主轴的位置移动的动作。控制部对一个控制指令进行解释所生成的内部指令的数量根据控制指令的种类而不同。内部指令是指用于通过对NC程序的控制指令进行解释来具体地控制设备的动作的指令。在本实施方式中,将内部指令中的用于指示轴的移动的指令称为移动指令,例如快进指令、切削进给指令等移动指令符合。“在下一动作的所述内部指令中包含使所述主轴旋转的主轴旋转指令”例如是包括在内部指令的一部分中包含主轴旋转指令、内部指令本身为主轴旋转指令的情况等的概念。X轴马达51、Y轴马达52、Z轴马达53、主轴马达54、刀库马达55例如为伺服马达。马达控制部35与X轴马达51及编码器51B连接。马达控制部36与Y轴马达52及编码器52B连接。马达控制部37与Z轴马达53及编码器53B连接。马达控制部38与主轴马达54及编码器54B连接。马达控制部39与刀库马达55及编码器55B连接。马达控制部35~39从CPU 31接收内部指令,向对应的马达51~55输出驱动电流。马达控制部35~39从编码器51B~55B接收反馈信号,来进行位置和速度的反馈控制。反馈信号是脉冲信号。在以下说明中,在对马达控制部35~39进行统称时,称为马达控制部40。马达控制部40各自具备后述的分配处理部401和滤波器处理部402。输入输出部50与输入部24及显示部25连接。使用者能够通过输入部24来从多个NC程序中选择一个NC程序。CPU 31将选择出的NC程序显示于显示部25。CPU 31基于显示部25中显示的NC程序来控制机床1的动作。The electrical configurations of the numerical controller 30 and the machine tool 1 will be described with reference to FIG. 8 . The numerical controller 30 includes a CPU 31 , a ROM 32 , a RAM 33 , a storage device 34 , an input/output unit 50 , motor control units 35 to 39 , and the like. The CPU 31 collectively controls the numerical controller 30 . The ROM 32 stores various programs and the like. The ROM 32 stores a movement control program for the CPU 31 to execute movement control processing (see FIGS. 12 and 13 ), which will be described later. The CPU 31 functions as an example of a processing device that executes the movement control unit by decompressing the movement control program stored in the ROM 32 on the RAM 33 . The RAM 33 temporarily stores various data during execution of various processes. The storage device 34 is, for example, a nonvolatile flash memory, and stores, for example, a plurality of NC programs input and registered by an operator through the input unit 24 . The NC program is composed of a plurality of blocks including various control commands, and controls various operations including axis movement and tool replacement of the machine tool 1 in block units. Axis movement refers to an operation to move the position of the main axis. The number of internal commands generated by the control unit by interpreting one control command differs depending on the type of control command. The internal command refers to a command for specifically controlling the operation of the device by interpreting the control command of the NC program. In this embodiment, the command for instructing the movement of the axis among the internal commands is referred to as a movement command, such as a fast-forward command, a cutting feed command, and other movement commands. "The internal command for the next operation includes a spindle rotation command to rotate the spindle" includes, for example, a spindle rotation command included in a part of the internal commands, or a case where the internal command itself is a spindle rotation command. The X-axis motor 51 , the Y-axis motor 52 , the Z-axis motor 53 , the spindle motor 54 , and the magazine motor 55 are, for example, servo motors. The motor control unit 35 is connected to the X-axis motor 51 and the encoder 51B. The motor control unit 36 is connected to the Y-axis motor 52 and the encoder 52B. The motor control unit 37 is connected to the Z-axis motor 53 and the encoder 53B. The motor control unit 38 is connected to the spindle motor 54 and the encoder 54B. The motor control unit 39 is connected to the magazine motor 55 and the encoder 55B. The motor control units 35 to 39 receive internal commands from the CPU 31 and output drive currents to the corresponding motors 51 to 55 . Motor control units 35 to 39 receive feedback signals from encoders 51B to 55B, and perform feedback control of position and speed. The feedback signal is a pulse signal. In the following description, when the motor control units 35 to 39 are collectively referred to as the motor control unit 40 . The motor control unit 40 each includes a distribution processing unit 401 and a filter processing unit 402 which will be described later. The input/output unit 50 is connected to the input unit 24 and the display unit 25 . The user can select one NC program from a plurality of NC programs through the input unit 24 . The CPU 31 displays the selected NC program on the display unit 25 . The CPU 31 controls the operation of the machine tool 1 based on the NC program displayed on the display unit 25 .
参照图9来说明移动速度的加减速处理。CPU 31按每块来解释NC程序,按X轴、Y轴、Z轴生成内部指令。在生成了作为内部指令之一的移动指令时,马达控制部40从CPU 31接收移动指令。马达控制部40基于接收到的移动指令,来按各轴运算目标位置、移动距离、移动速度、移动时间等。数值控制装置30进行加减速处理。加减速处理是针对所运算出的按各轴的移动速度通过移动平均滤波器(以下称为FIR滤波器)使速度变化平滑的处理。FIR滤波器的加减速时间常数(以下称为时间常数)相当于FIR滤波器进行平均的采样数。例如,在采样时间为1msec,FIR滤波器的时间常数为10msec时,FIR滤波器将包括本次的移动指令在内的直至前10个指令为止的指令的平均设为本次的输出。FIR滤波器的时间常数为t1。马达控制部40从t11起每1msec对移动速度进行分配并在FIR滤波器中进行处理后输出到X轴马达51、Y轴马达52、Z轴马达53的各轴。刀具从t11起花费时间t1使速度平缓地上升后在t12达到最高速度。刀具以最高速度移动,在t13移动速度的分配完成的同时,刀具使速度从最高速度起花费时间t1平缓地下降,在t14停止。因此,数值控制装置30通过利用FIR滤波器对移动速度进行处理,来吸收移动速度的急剧的变化,从而抑制机床1的振动。内部指令除了具有移动指令以外,还具有M03的主轴旋转指令等不伴随被削件或主轴头7的移动的指令。The acceleration and deceleration processing of the moving speed will be described with reference to FIG. 9 . The CPU 31 interprets the NC program for each block, and generates internal commands for the X-axis, Y-axis, and Z-axis. When generating a movement command as one of the internal commands, the motor control unit 40 receives the movement command from the CPU 31 . The motor control unit 40 calculates a target position, a moving distance, a moving speed, a moving time, and the like for each axis based on the received moving command. The numerical controller 30 performs acceleration and deceleration processing. The acceleration/deceleration process is a process of smoothing the speed change with respect to the calculated moving speed for each axis through a moving average filter (hereinafter referred to as an FIR filter). The acceleration and deceleration time constant of the FIR filter (hereinafter referred to as the time constant) corresponds to the number of samples averaged by the FIR filter. For example, when the sampling time is 1 msec and the time constant of the FIR filter is 10 msec, the FIR filter uses the average of the commands up to the previous 10 commands including the current movement command as the current output. The time constant of the FIR filter is t 1 . The motor control unit 40 distributes the moving speeds every 1 msec from t11 , processes them with an FIR filter, and outputs them to the axes of the X-axis motor 51 , Y-axis motor 52 , and Z-axis motor 53 . The tool takes time t1 from t11 to increase the speed gently and then reaches the maximum speed at t12. The tool moves at the highest speed, and at the same time as the assignment of the moving speed at t13 is completed, the speed of the tool gradually decreases from the highest speed over time t1 , and stops at t14. Therefore, the numerical controller 30 absorbs a sudden change in the moving speed by processing the moving speed with an FIR filter, thereby suppressing the vibration of the machine tool 1 . In addition to the movement command, the internal command includes a command such as a spindle rotation command of M03 that does not involve movement of the workpiece or the spindle head 7 .
参照图10来说明主轴马达54的接通指令先行的基本动作模式。主轴马达54的接通指令是指将主轴马达54的通电接通的指令。在从主轴马达54的通电断开状态起执行主轴旋转指令时,主轴9的旋转开始延迟从输出主轴马达54的接通指令起到成为通电接通状态为止所需要的时间。例如,在本实施方式中,假想如下的移动指令:主轴马达54为断开状态,且当前的动作(以下称为当前动作)为快进,下一动作包含主轴旋转指令。图10的上部的图表示出以往的基本动作模式。作为当前动作的快进指令的速度块B2从t20起开始按采样周期开始移动速度的分配,利用FIR滤波器进行加减速的处理。因此,刀具从t20起平缓地进行加速,在t21达到最高速度。在t22移动速度的分配完成的同时,从最高速度起平缓地进行减速,在t23到达目标位置后停止。以往的数值控制装置在到达快进指令的目标位置的t23输出主轴马达54的接通指令。在主轴马达54成为接通状态的t24,主轴9能够开始进行旋转,在t26作为下一动作的移动完成。关于快进指令,代表性的为G00,是用于以存储装置34中存储的定位最高速度进行定位的指令。图10的下部的图表示出本实施方式的基本动作模式。本实施方式的数值控制装置30在快进指令的移动速度的分配完成的t22,输出主轴马达54的接通指令。在移动速度的分配完成的t22,数值控制装置30判定下一动作的内部指令是否为包含主轴旋转指令的移动指令。通过在t22执行主轴马达54的接通指令,在到达快进指令的目标位置的t23,已经将主轴马达54设为接通状态。因此,在t23主轴9能够立即进行旋转,因此与以往相比,数值控制装置30能够缩短加工周期。A basic operation pattern in which the spindle motor 54 is turned on first will be described with reference to FIG. 10 . The command to turn on the spindle motor 54 is a command to turn on the power to the spindle motor 54 . When the spindle rotation command is executed from the energized OFF state of the spindle motor 54 , the rotation start of the spindle 9 is delayed by the time required from the output of the ON command of the spindle motor 54 to the energized ON state. For example, in this embodiment, a movement command is assumed in which the spindle motor 54 is off, the current operation (hereinafter referred to as the current operation) is fast forward, and the next operation includes a spindle rotation command. The upper graph in FIG. 10 shows a conventional basic operation pattern. The speed block B2, which is the fast-forward command of the current action, begins to distribute the moving speed according to the sampling period from t20, and uses the FIR filter to perform acceleration and deceleration processing. Thus, the tool accelerates smoothly from t20 onwards and reaches its maximum speed at t21. Simultaneously with the completion of the allocation of the moving speed at t22, the vehicle decelerates gradually from the highest speed, and stops after reaching the target position at t23. The conventional numerical controller outputs an ON command for the spindle motor 54 at t23 when the target position of the fast forward command is reached. At t24 when the spindle motor 54 is turned on, the spindle 9 can start to rotate, and at t26 the movement as the next operation is completed. A typical fast-forward command is G00, which is a command for positioning at the highest positioning speed stored in the storage device 34 . The lower graph in FIG. 10 shows the basic operation pattern of this embodiment. The numerical controller 30 of the present embodiment outputs an ON command for the spindle motor 54 at t22 when the assignment of the moving speed of the fast forward command is completed. At t22 when the distribution of the moving speed is completed, the numerical controller 30 determines whether the internal command for the next operation is a movement command including a spindle rotation command. By executing the ON command of the spindle motor 54 at t22, at t23 at which the target position of the fast-forward command is reached, the spindle motor 54 has been brought into the ON state. Therefore, the main shaft 9 can be rotated immediately at t23, so that the numerical control device 30 can shorten the machining cycle compared with conventional ones.
参照图11来说明本实施方式的对象动作模式。对象动作模式A~G是基于对NC程序进行解释所生成的移动指令的动作模式,至少定义当前动作和下一动作。在将下一动作设为第N个动作时,当前动作为第N-1个动作。当前动作开始时的主轴马达54均为断开状态。数值控制装置30在不使主轴9旋转时,原则上通过将主轴马达54的通电设为断开状态,能够节约主轴马达54的驱动所耗费的电力。The target operation pattern of this embodiment will be described with reference to FIG. 11 . The target operation patterns A to G are operation patterns based on movement commands generated by interpreting the NC program, and define at least the current operation and the next operation. When the next action is the Nth action, the current action is the N-1th action. The spindle motors 54 are all in the off state when the current operation starts. When the numerical controller 30 does not rotate the spindle 9 , in principle, by turning off the energization of the spindle motor 54 , the power consumed for driving the spindle motor 54 can be saved.
模式A~F的第N-1个动作为快进。模式A的第N个动作为切削进给和主轴旋转。模式B的第N个动作为攻螺纹。模式C的第N个动作为快进和主轴旋转,第N+1个动作为切削进给。模式D的第N个动作为快进和主轴旋转,第N+1个动作为快进,第N+2个动作为切削进给。模式E的第N个动作为主轴旋转,第N+1个动作为切削进给。模式F的第N个动作为主轴旋转,第N+1个动作为快进,第N+2个动作为切削进给。模式G的第N-1个动作为刀具更换动作中的从ATC原点起的下降动作,第N个动作为刀具更换动作中的从Z轴原点起的下降动作和主轴旋转,第N+1个动作为切削进给。关于切削进给的指令(切削进给指令),通常,在程序中记载进给速度,但在本实施方式中,使用预先存储于存储装置34的切削进给最高速度。The N-1th action of modes A to F is fast forward. The Nth action of mode A is cutting feed and spindle rotation. The Nth action of mode B is tapping. The Nth action in mode C is fast forward and spindle rotation, and the N+1th action is cutting feed. The Nth action of mode D is fast forward and spindle rotation, the N+1th action is fast forward, and the N+2th action is cutting feed. The Nth action in mode E is spindle rotation, and the N+1th action is cutting feed. The Nth action of mode F is spindle rotation, the N+1st action is fast forward, and the N+2th action is cutting feed. The N-1th action of mode G is the descending action from the ATC origin in the tool changing action, the Nth action is the descending action from the Z-axis origin and the spindle rotation in the tool changing action, and the N+1th action The action is cutting feed. Regarding the cutting feed command (cutting feed command), the feed speed is usually described in the program, but in this embodiment, the highest cutting feed speed stored in advance in the storage device 34 is used.
参照图12、图13来说明移动控制处理。使用者在利用操作板15选择NC程序并输入了执行操作时,CPU 31从ROM 32读入移动控制程序,执行本处理。Movement control processing will be described with reference to FIGS. 12 and 13 . When the user selects an NC program using the operation panel 15 and inputs an execution operation, the CPU 31 reads the movement control program from the ROM 32 and executes this process.
示出模式A的NC程序P1的一例。An example of the NC program P1 of pattern A is shown.
如图12所示,CPU 31读入一个块的NC程序P1(S1)。CPU 31判断在所读入的一个块内是否存在M30的结束指令(S2)。在所读入的一个块内不存在M30(S2:否),因此CPU 31对作为所读入的一个块内的控制指令的G00进行解释来生成内部指令(S3),将所生成的内部指令输出到马达控制部40(S4)。G00为快进指令,因此CPU 31生成作为内部指令的快进的移动指令。CPU 31判断主轴马达54是否为断开状态且X轴、Y轴、Z轴当前是否正在移动(S5)。主轴马达54为断开状态,但X轴、Y轴、Z轴当前没有进行移动(S5:否),因此CPU 31判断所接收到的内部指令是否为最初的移动指令(S20)。最初的移动指令是指对NC程序进行解释所生成的最初的移动指令。所执行的内部指令为最初的移动指令(S20:是),因此马达控制部40的分配处理部401开始进行作为快进的移动指令的速度块B3(参照图14)的移动分配(S17)。As shown in FIG. 12, the CPU 31 reads the NC program P1 of one block (S1). The CPU 31 judges whether or not there is an end command of M30 in one read block (S2). There is no M30 in the read-in block (S2: No), so the CPU 31 interprets G00 as a control command in the read-in block to generate an internal command (S3), and the generated internal command It is output to the motor control unit 40 (S4). G00 is a fast-forward command, so the CPU 31 generates a fast-forward movement command as an internal command. The CPU 31 judges whether the spindle motor 54 is off and whether the X-axis, Y-axis, and Z-axis are currently moving (S5). The spindle motor 54 is off, but the X-axis, Y-axis, and Z-axis are not currently moving (S5: No), so the CPU 31 judges whether the received internal command is the first moving command (S20). The first movement command refers to the first movement command generated by interpreting the NC program. Since the executed internal command is the first movement command (S20: YES), the allocation processing unit 401 of the motor control unit 40 starts the movement allocation of the speed block B3 (see FIG. 14 ) which is a fast-forward movement command (S17).
如图14所示,在t30,马达控制部40的分配处理部401开始按采样周期进行速度块B3的移动分配。马达控制部40的滤波器处理部402利用FIR滤波器针对各轴进行移动速度的加减速处理,向各马达51~53输出驱动电流。因此,刀具4从t30起平缓地进行加速,在t31达到最高速度。CPU 31判断速度块B3的移动分配是否已完成(S18)。在移动分配没有完成的期间(S18:否),CPU 31返回到S18进行待机。当在t32速度块B3的移动分配完成时(S18:是),CPU 31判断为一个块内的所有移动指令已完成(S19:是),读入NC程序P1的第二行(S1)。在所读入的第二行的一个块内不存在M30(S2:否),因此对所读入的第二行进行解释来生成内部指令(S3),将内部指令输出到马达控制部40(S4)。第二行的G01是包含主轴旋转指令的切削进给指令。当前的状态为主轴马达54为断开状态且正在移动(S5:是),因此CPU 31判断内部指令是否包含主轴旋转指令(S6)。内部指令包含主轴旋转指令(S6:是),因此CPU 31判断内部指令是否为刀具更换动作中的从Z轴原点下降(S7)。内部指令不为从Z轴原点下降(S7:否),因此在速度块B3的移动分配完成的t32,CPU 31向主轴马达54输出接通指令(S10)。刀具从t32起平缓地进行减速。在刀具在t33停止于目标位置之前,主轴马达54成为接通状态。CPU 31判断刀具的当前坐标是否到达了目标位置(S11)。在当前坐标没有到达目标位置的期间(S11:否),CPU 31返回到S11进行待机。在t33当前坐标到达了目标位置时(S11:是),CPU 31对主轴马达54指示旋转(S12)。主轴马达54开始进行旋转。在当前坐标没有到达目标位置的期间,主轴马达54不进行旋转,因此数值控制装置30通过不包含主轴旋转指令的当前动作来防止主轴9旋转。CPU 31判断当前动作是否为刀具更换动作中的从Z轴原点下降(S13)。当前动作不为从Z轴原点下降(S13:否),因此CPU 31判断下一动作是否为攻螺纹动作(S14)。下一动作为切削进给(S14:否),因此CPU 31判断下一动作是否为快进(S15)。下一动作为切削进给(S15:否),因此CPU 31判断主轴转速是否达到了目标值(S16)。目标值例如按相对于主轴转速(S指令值)的比例(P%)决定即可。例如在P=85(%)的情况下,相对于S指令值10000(rpm),在8500(rpm)视为主轴转速达到目标值。在主轴转速没有达到目标值时(S16:否),CPU 31返回到S16进行待机。在t34主轴转速达到了目标值时(S16:是),马达控制部40开始进行切削进给指令的速度块B4的移动分配(S17),利用FIR滤波器进行处理后输出到各马达51~53。因此,刀具从t34起速度平缓地上升,在t35达到最高速度。在t36速度块B4的移动分配完成时(S18:是),一个块内的所有移动指令已完成(S19:是),因此CPU 31返回到图12的S1,重复进行处理。在所读入的一个块内存在M30时(S2:是),CPU 31结束本处理。As shown in FIG. 14 , at t30 , the allocation processing unit 401 of the motor control unit 40 starts the movement allocation of the speed block B3 in each sampling cycle. The filter processing unit 402 of the motor control unit 40 performs acceleration and deceleration processing of the moving speed for each axis using an FIR filter, and outputs drive currents to the motors 51 to 53 . The tool 4 thus accelerates smoothly from t30 onwards, reaching its maximum speed at t31. The CPU 31 judges whether the movement assignment of the speed block B3 has been completed (S18). While the movement allocation is not completed (S18: No), the CPU 31 returns to S18 and waits. When the movement allocation of the velocity block B3 is completed at t32 (S18: Yes), the CPU 31 judges that all movement commands in one block have been completed (S19: Yes), and reads the second line of the NC program P1 (S1). There is no M30 in one block of the read second line (S2: No), so the read second line is interpreted to generate an internal command (S3), and the internal command is output to the motor control unit 40 ( S4). G01 on the second line is a cutting feed command including a spindle rotation command. The current state is that the spindle motor 54 is off and moving (S5: YES), so the CPU 31 judges whether the internal command includes a spindle rotation command (S6). Since the internal command includes a spindle rotation command (S6: YES), the CPU 31 judges whether or not the internal command is descending from the Z-axis origin during the tool change operation (S7). Since the internal command is not descending from the Z-axis origin (S7: No), the CPU 31 outputs an ON command to the spindle motor 54 at t32 when the movement allocation of the speed block B3 is completed (S10). The tool decelerates gradually from t32 onwards. Before the tool stops at the target position at t33, the spindle motor 54 is turned on. The CPU 31 judges whether or not the current coordinates of the tool have reached the target position (S11). While the current coordinates have not reached the target position (S11: No), the CPU 31 returns to S11 and waits. When the current coordinate reaches the target position at t33 (S11: YES), the CPU 31 instructs the spindle motor 54 to rotate (S12). The spindle motor 54 starts to rotate. While the current coordinates do not reach the target position, the spindle motor 54 does not rotate, and therefore the numerical controller 30 prevents the spindle 9 from rotating through the current operation that does not include a spindle rotation command. The CPU 31 judges whether or not the current operation is descending from the Z-axis origin during the tool replacement operation (S13). The current operation is not descending from the Z-axis origin (S13: No), so the CPU 31 judges whether the next operation is a tapping operation (S14). The next operation is cutting feed (S14: No), so the CPU 31 judges whether the next operation is fast forward (S15). The next operation is cutting feed (S15: No), so the CPU 31 judges whether or not the spindle rotation speed has reached the target value (S16). The target value may be determined, for example, as a ratio (P%) to the spindle speed (S command value). For example, in the case of P=85(%), it is considered that the spindle speed reaches the target value at 8500 (rpm) relative to the S command value of 10000 (rpm). When the spindle rotation speed has not reached the target value (S16: No), the CPU 31 returns to S16 and waits. When the spindle speed reaches the target value at t34 (S16: Yes), the motor control unit 40 starts the movement distribution of the speed block B4 of the cutting feed command (S17), and outputs it to each motor 51-53 after processing by the FIR filter. . Therefore, the tool speed increases gradually from t34 to reach the highest speed at t35. At t36, when the movement allocation of the speed block B4 is completed (S18: Yes), all the movement instructions in one block are completed (S19: Yes), so the CPU 31 returns to S1 in FIG. 12 and repeats the process. When M30 exists in one read block (S2: YES), the CPU 31 ends this process.
如以上所述,在模式A中,数值控制装置30在当前动作完成的t33之前,输出主轴马达54的接通指令。因此,能够将时间缩短主轴马达54的通电接通所耗费的时间,因此能够缩短t33~t34的等待时间W1。As described above, in the mode A, the numerical controller 30 outputs the ON command of the spindle motor 54 before t33 when the current operation is completed. Therefore, the time required for the spindle motor 54 to be energized and turned on can be shortened, and thus the waiting time W1 from t33 to t34 can be shortened.
示出模式B的NC程序P2。NC program P2 of mode B is shown.
如图12所示,CPU 31读入一个块的NC程序P2(S1)。NC程序P2的第一行与模式A的NC程序P1的第一行相同,因此简化或省略对同一部分的说明。如图15所示,在t40,马达控制部40的分配处理部401开始按采样周期进行快进指令的速度块B5的移动分配(S17)。马达控制部40的滤波器处理部402利用FIR滤波器针对各轴进行移动速度的加减速处理,向各马达51~53输出驱动电流。因此,刀具4从t40起平缓地进行加速并达到最高速度。当在t41速度块B5的移动分配完成时(S18:是),一个块内的所有移动指令已完成(S19:是),因此CPU 31读入NC程序P2的第二行(S1)。第二行为G77的攻螺纹指令,不为M30(S2:否),因此CPU 31对所读入的第二行的G77进行解释来生成四个内部指令(S3)。如图16所示,攻螺纹动作例如具备快进动作151、攻螺纹动作152、攻螺纹动作153以及快进动作154这四个动作。快进动作151例如是使主轴9不进行旋转地从Z100以快进的方式移动至Z40的基准点(R点)的动作。攻螺纹动作152是通过使主轴9从R点起向一个方向旋转且向Z20的孔底移动来实施攻螺纹加工的动作。攻螺纹动作153是使主轴9向反方向旋转且从孔底向R点退回地进行移动的动作,是攻螺纹退回动作。快进动作154是使主轴9不进行旋转地从R点到退回至Z100为止以快进方式移动的动作。因此,CPU 31根据一个块内的G77生成与快进动作151、攻螺纹动作152、攻螺纹动作153、快进动作154对应的四个移动指令(两个快进指令和两个攻螺纹指令)。与攻螺纹动作152、153对应的移动指令均需要使主轴9旋转,因此包含主轴旋转指令。与快进动作154对应的快进指令包含主轴停止指令。处于G77的攻螺纹指令中的I2表示攻螺纹节距为2。CPU 31生成快进指令来作为与快进动作151对应的内部指令后输出到马达控制部40(S4)。在t41,主轴马达54为断开状态且正在移动(S5:是)。快进指令不包含主轴旋转指令(S6:否),也不是最初的移动指令(S20:否)。CPU 31判断当前正在移动的刀具的当前坐标是否到达了目标位置(Z100)(S21)。在当前坐标没有到达目标位置的期间(S21:否),CPU 31返回到S21进行待机。在t42当前坐标到达了目标位置时(S21:是),CPU 31判断下一动作是否为攻螺纹退回动作(S22)。下一动作不是攻螺纹退回动作(S22:否),因此CPU 31判断主轴9是否正在进行旋转(S23)。主轴9没有进行旋转(S23:否),因此马达控制部40开始进行攻螺纹指令的速度块B6的移动分配(S17),利用FIR滤波器进行移动速度的加减速处理,向Z轴马达53输出驱动电流。因此,刀具4从t42起平缓地进行加速并达到最高速度后进行快进动作151。当在t43速度块B6的移动分配完成时(S18:是),CPU 31判断一个块内的所有内部指令是否已完成(S19)。还剩下对G77进行解释所生成的四个内部指令中的三个内部指令(S19:否),因此CPU 31将与攻螺纹动作152对应的攻螺纹指令输出到马达控制部40(S4)。在t43,主轴马达54为断开状态且正在进行移动(S5:是)。攻螺纹指令包含主轴旋转指令(S6:是),但是攻螺纹指令不为从Z轴原点下降(S7:否),因此CPU 31在速度块B6的移动分配完成的t43输出主轴马达54的接通指令(S10)。刀具4从t43起平缓地进行减速。在刀具4在t44停止于作为目标位置的R点之前,主轴马达54成为接通状态。CPU 31判断刀具的当前坐标是否到达了R点(S11)。在t44当前坐标到达了R点时(S11:是),CPU 31向主轴马达54输出旋转指令(S12)。主轴马达54开始旋转。CPU 31判断当前动作是否为刀具更换动作中的从Z轴原点下降(S13)。当前动作不为从Z轴原点下降(S13:否),因此CPU 31判断下一动作是否为攻螺纹动作(S14)。下一动作为攻螺纹动作(S14:是),因此马达控制部40开始进行攻螺纹指令的速度块B7的移动分配(S17)。马达控制部40利用FIR滤波器进行移动速度的加减速处理,向Z轴马达53输出驱动电流。因此,刀具4从t44起进行旋转且平缓地加速来进行攻螺纹动作。当在t45速度块B7的移动分配完成时(S18:是),CPU 31判断一个块内的所有内部指令是否已完成(S19)。还剩下对G77进行解释所生成的四个内部指令中的两个内部指令(S19:否),因此CPU 31将与攻螺纹动作153对应的内部指令输出到马达控制部40(S4)。在t45,主轴马达54为接通状态(S5:否),内部指令不为最初的移动指令(S20:否),因此CPU 31判断刀具4的当前坐标是否到达了Z20(S21)。Z20为攻螺纹动作152的目标位置。在t46当前坐标到达了目标位置时(S21:是),CPU 31判断下一动作是否为攻螺纹退回动作(S22)。作为下一动作的攻螺纹动作153为攻螺纹退回动作(S22:是),因此CPU 31使主轴马达54在保持接通状态下暂时停止后反向旋转,且开始进行与攻螺纹动作153对应的攻螺纹指令的速度块的移动分配(S17)。马达控制部40利用FIR滤波器进行移动速度的加减速处理,向Z轴马达53输出驱动电流。因此,刀具4从t46起反向旋转且一边平缓地进行加速一边向上方移动,从进行攻螺纹所得到的孔中向上方逐渐退出。当攻螺纹动作153的速度块的移动分配完成时(S18:是),CPU31判断一个块内的所有内部指令是否已完成(S19)。还剩下对G77进行解释所生成的四个移动指令中的一个移动指令(S19:否),因此CPU 31将与快进动作154对应的快进指令输出到马达控制部40(S4)。主轴马达54为接通状态(S5:否),因此CPU 31判断快进指令是否为最初的移动指令(S20)。快进指令不为最初的移动指令(S20:否),因此CPU 31判断是否到达了R点(Z40)(S21)。R点为攻螺纹动作153的目标位置。刀具4当到达了R点时(S21:是),从进行攻螺纹加工所得到的孔中向上方退出。下一动作不为攻螺纹退回动作(S22:否),因此CPU 31判断主轴9是否正在进行旋转(S23)。主轴9正在进行旋转(S23:是),因此CPU 31判断在所接收到的快进指令中是否包含主轴停止指令(S24)。与快进动作154对应的快进指令包含主轴停止指令(S24:是),因此CPU 31输出主轴马达54的断开指令(S25)。因此,主轴9的旋转停止。马达控制部40开始进行快进指令的速度块的移动分配(S17)。马达控制部40利用FIR滤波器进行移动速度的加减速处理,向Z轴马达53输出驱动电流。因此,刀具4从R点起一边平缓地提高速度一边向上方移动。当快进动作154的速度块的移动分配完成时(S18:是),一个块内的所有移动指令已完成(S19:是),因此CPU 31读入下一个块(S1)。当快进动作154完成时,刀具4返回到Z100的位置。在所读入的一个块内存在M30时(S2:是),CPU 31结束本处理。As shown in FIG. 12, the CPU 31 reads the NC program P2 of one block (S1). The first line of the NC program P2 is the same as the first line of the NC program P1 of the mode A, and therefore descriptions of the same parts are simplified or omitted. As shown in FIG. 15 , at t40 , the allocation processing unit 401 of the motor control unit 40 starts the movement allocation of the speed block B5 for the fast-forward command in each sampling period ( S17 ). The filter processing unit 402 of the motor control unit 40 performs acceleration and deceleration processing of the moving speed for each axis using an FIR filter, and outputs drive currents to the motors 51 to 53 . The tool 4 thus accelerates smoothly from t40 onwards and reaches its maximum speed. When the movement allocation of the speed block B5 is completed at t41 (S18: YES), all movement instructions in one block are completed (S19: Yes), so the CPU 31 reads the second line of the NC program P2 (S1). The second line is a tapping command of G77, which is not M30 (S2: No), so the CPU 31 interprets the read G77 of the second line to generate four internal commands (S3). As shown in FIG. 16 , the tapping operation includes, for example, four operations of a fast-forwarding operation 151 , a tapping operation 152 , a tapping operation 153 , and a fast-forwarding operation 154 . The fast-forward operation 151 is, for example, an operation for moving the main shaft 9 from the Z100 to the reference point (point R) of the Z40 in a fast-forward manner without rotating the spindle 9 . The tapping operation 152 is an operation of performing tapping by rotating the spindle 9 in one direction from the point R and moving to the bottom of the hole at Z20. The tapping operation 153 is an operation in which the main shaft 9 is rotated in the reverse direction and moved back from the hole bottom to the point R, and is a tapping retraction operation. The fast-forward operation 154 is an operation for moving the main shaft 9 in a fast-forward manner from point R to retracting to Z100 without rotating the main shaft 9 . Therefore, the CPU 31 generates four movement instructions (two fast-forward instructions and two tapping instructions) corresponding to the fast-forward operation 151, the tapping operation 152, the tapping operation 153, and the fast-forward operation 154 based on G77 in one block. . The movement commands corresponding to the tapping operations 152 and 153 all need to rotate the main shaft 9, and therefore include a main shaft rotation command. The fast-forward command corresponding to the fast-forward action 154 includes a spindle stop command. I2 in the tapping command of G77 means that the tapping pitch is 2. The CPU 31 generates a fast-forward command as an internal command corresponding to the fast-forward operation 151, and outputs it to the motor control unit 40 (S4). At t41, the spindle motor 54 is off and moving (S5: YES). The fast forward command does not include the spindle rotation command (S6: No), nor is it the first movement command (S20: No). The CPU 31 judges whether the current coordinates of the tool currently moving have reached the target position (Z100) (S21). While the current coordinates have not reached the target position (S21: No), the CPU 31 returns to S21 and waits. When the current coordinate reaches the target position at t42 (S21: YES), the CPU 31 judges whether or not the next operation is a tapping retracting operation (S22). The next operation is not a tapping retracting operation (S22: No), so the CPU 31 judges whether the spindle 9 is rotating (S23). The main shaft 9 is not rotating (S23: No), so the motor control unit 40 starts to distribute the movement of the speed block B6 of the tapping command (S17), uses the FIR filter to perform acceleration and deceleration processing of the movement speed, and outputs to the Z-axis motor 53 drive current. Therefore, the tool 4 gradually accelerates from t42 and then performs the fast-forward operation 151 after reaching the maximum speed. When the movement assignment of the speed block B6 is completed at t43 (S18: YES), the CPU 31 judges whether all internal instructions within a block have been completed (S19). Three of the four internal commands generated by interpreting G77 remain (S19: No), so the CPU 31 outputs a tapping command corresponding to the tapping operation 152 to the motor control unit 40 (S4). At t43, the spindle motor 54 is off and moving (S5: YES). The thread tapping instruction includes the spindle rotation instruction (S6: Yes), but the thread tapping instruction is not descending from the Z-axis origin (S7: No), so the CPU 31 outputs the connection of the spindle motor 54 at t43 when the movement distribution of the speed block B6 is completed. instruction (S10). The tool 4 decelerates gradually from t43 onwards. Before the tool 4 stops at point R which is the target position at t44, the spindle motor 54 is turned on. The CPU 31 judges whether or not the current coordinates of the tool have reached the R point (S11). When the current coordinate reaches point R at t44 (S11: YES), the CPU 31 outputs a rotation command to the spindle motor 54 (S12). The spindle motor 54 starts to rotate. The CPU 31 judges whether or not the current operation is descending from the Z-axis origin during the tool replacement operation (S13). The current operation is not descending from the Z-axis origin (S13: No), so the CPU 31 judges whether the next operation is a tapping operation (S14). Since the next operation is a tapping operation (S14: YES), the motor control unit 40 starts the movement distribution of the speed block B7 of the tapping command (S17). The motor control unit 40 performs acceleration and deceleration processing of the moving speed using an FIR filter, and outputs a drive current to the Z-axis motor 53 . Therefore, the tool 4 rotates from t44 and accelerates gently to perform the tapping operation. When the movement assignment of the speed block B7 is completed at t45 (S18: YES), the CPU 31 judges whether all internal instructions within a block have been completed (S19). Two of the four internal commands generated by interpreting G77 remain (S19: No), so the CPU 31 outputs an internal command corresponding to the tapping operation 153 to the motor control unit 40 (S4). At t45, the spindle motor 54 is turned on (S5: No), and the internal command is not the first movement command (S20: No), so the CPU 31 judges whether the current coordinate of the tool 4 has reached Z20 (S21). Z20 is the target position of the tapping operation 152 . When the current coordinate reaches the target position at t46 (S21: YES), the CPU 31 judges whether or not the next operation is a tapping retracting operation (S22). The tapping operation 153 that is the next operation is a tapping retraction operation (S22: Yes), so the CPU 31 temporarily stops the spindle motor 54 in the ON state and then rotates it in the reverse direction, and starts the operation corresponding to the tapping operation 153. Movement allocation of the speed block of the tapping instruction (S17). The motor control unit 40 performs acceleration and deceleration processing of the moving speed using an FIR filter, and outputs a drive current to the Z-axis motor 53 . Therefore, the cutter 4 reversely rotates from t46, moves upward while gradually accelerating, and gradually retreats upward from the hole obtained by tapping. When the movement allocation of the speed block of the tapping operation 153 is completed (S18: YES), the CPU 31 judges whether all internal commands in one block have been completed (S19). One of the four movement commands generated by interpreting G77 remains (S19: No), so the CPU 31 outputs a fast-forward command corresponding to the fast-forward operation 154 to the motor control unit 40 (S4). Since the spindle motor 54 is on (S5: NO), the CPU 31 judges whether the fast forward command is the first movement command (S20). The fast-forward command is not the first movement command (S20: NO), so the CPU 31 judges whether or not the R point has been reached (Z40) (S21). Point R is the target position of the tapping operation 153 . When the tool 4 reaches the R point (S21: YES), it withdraws upward from the hole obtained by performing the tapping process. The next operation is not a tapping retraction operation (S22: No), so the CPU 31 judges whether the main shaft 9 is rotating (S23). The spindle 9 is rotating (S23: YES), so the CPU 31 judges whether or not a spindle stop command is included in the received fast-forward command (S24). The fast-forward command corresponding to the fast-forward operation 154 includes a spindle stop command (S24: YES), so the CPU 31 outputs a command to turn off the spindle motor 54 (S25). Therefore, the rotation of the main shaft 9 stops. The motor control unit 40 starts the movement distribution of the speed block of the fast forward command (S17). The motor control unit 40 performs acceleration and deceleration processing of the moving speed using an FIR filter, and outputs a drive current to the Z-axis motor 53 . Therefore, the cutter 4 moves upward while gradually increasing the speed from the R point. When the movement allocation of the speed block of the fast-forward action 154 is completed (S18: Yes), all movement instructions in one block are completed (S19: Yes), so the CPU 31 reads in the next block (S1). When the fast forward action 154 is completed, the tool 4 returns to the Z100 position. When M30 exists in one read block (S2: YES), the CPU 31 ends this process.
如以上所述,在模式B中,数值控制装置30在作为当前动作的快进动作151完成的t44之前输出主轴马达54的接通指令。因此,数值控制装置30能够将时间缩短主轴马达54的通电接通所耗费的时间,因此能够在快进动作151完成的t44后迅速开始进行作为下一动作的攻螺纹动作。As described above, in the mode B, the numerical controller 30 outputs the ON command of the spindle motor 54 before t44 when the fast-forward operation 151 as the current operation is completed. Therefore, the numerical control device 30 can shorten the time required for the spindle motor 54 to be energized, so that the tapping operation as the next operation can be quickly started after t44 when the fast-forward operation 151 is completed.
示出模式C的NC程序P3的一例。An example of the NC program P3 of pattern C is shown.
CPU 31读入一个块的NC程序P3(S1)。NC程序P3的第一行与模式A的NC程序P1的第一行相同,为G00。如图17所示,在t50,马达控制部40开始按采样周期进行快进指令的速度块B8的移动分配(S17)。马达控制部40利用FIR滤波器针对各轴进行移动速度的加减速处理,向各马达51~53输出驱动电流。因此,刀具从t50起平缓地进行加速并达到最高速度。当在t51移动分配完成时(S18:是),一个块内的所有移动指令已完成(S19:是),因此CPU 31读入NC程序P2的第二行(S1)。第二行为G00的快进指令和M03的主轴旋转指令(S2:否)。因此,CPU 31生成包含主轴旋转指令的快进指令来作为内部指令(S3)。CPU 31将快进指令输出到马达控制部40(S4)。在t51,主轴马达54为断开状态且正在进行移动(S5:是)。所输出的快进指令包含主轴旋转指令(S6:是),但不为从Z轴原点下降(S7:否),因此CPU 31在速度块B8的移动分配完成的t51输出主轴马达54的接通指令(S10)。刀具4从t51起平缓地进行减速。在刀具4在t52停止于目标位置之前,主轴马达54成为接通状态。马达控制部40判断刀具4的当前坐标是否到达了目标位置(S11)。在t52刀具4的当前坐标到达了目标位置时(S11:是),CPU 31指示主轴马达54的旋转(S12)。主轴马达54开始旋转。当前动作不为从Z轴原点下降(S13:否),下一动作不为攻螺纹动作(S14:否),因此CPU 31判断下一动作的移动指令是否为快进指令(S15)。下一动作的移动指令为快进指令(S15:是),因此在t52马达控制部40开始进行快进指令的速度块B9的移动分配(S17)。马达控制部40利用FIR滤波器针对各轴进行移动速度的加减速处理,向各马达51~53输出驱动电流。因此,刀具4从t52起平缓地进行加速并达到最高速度。当在t53移动分配完成时(S18:是),一个块内的所有移动指令已完成(S19:是),因此CPU 31读入NC程序P2的第三行(S1)。第三行为G01的切削进给指令(S2:否)。因此,CPU 31生成切削进给指令来作为内部指令(S3)。CPU 31将切削进给指令输出到马达控制部40(S4)。在t53,主轴马达54为接通状态且正在进行移动(S5:否)。CPU 31判断快进指令是否为最初的移动指令(S20)。快进指令不为最初的移动指令(S20:否),因此CPU 31判断刀具4是否到达了快进指令的目标位置(S21)。在t54当前坐标到达了目标位置时(S21:是),下一动作不为攻螺纹退回动作(S22:否),当前主轴9正在进行旋转(S23:是),因此CPU 31判断在切削进给指令中是否包含主轴停止指令(S24)。切削进给指令不包含主轴停止指令(S24:否),因此CPU 31判断下一动作是否为快进(S26)。下一动作为切削进给(S26:否),因此CPU 31判断主轴转速是否达到了目标值(S27)。在t55主轴转速达到了目标值时(S27:是),马达控制部40开始进行切削进给指令的速度块B10的移动分配(S17)。马达控制部40利用FIR滤波器针对各轴进行移动速度的加减速处理,向各马达51~53输出驱动电流。因此,刀具4从t55起平缓地进行加速并达到最高速度。当在t56速度块B10的移动分配完成时(S18:是),一个块内的所有内部指令已完成(S19:是),因此CPU 31读入NC程序P3的下一个块(S1)。在t57刀具4到达切削进给的目标位置。在所读入的一个块内存在M30时(S2:是),CPU 31结束本处理。The CPU 31 reads the NC program P3 of one block (S1). The first line of NC program P3 is the same as the first line of NC program P1 in mode A, which is G00. As shown in FIG. 17 , at t50 , the motor control unit 40 starts assignment of movement of the speed block B8 for the fast-forward command in each sampling cycle ( S17 ). The motor control unit 40 performs acceleration and deceleration processing of the moving speed for each axis using an FIR filter, and outputs drive currents to the respective motors 51 to 53 . The tool therefore accelerates smoothly from t50 onwards to its maximum speed. When the movement assignment is completed at t51 (S18: YES), all movement instructions in one block have been completed (S19: YES), so the CPU 31 reads the second line of the NC program P2 (S1). The second line is the fast forward command of G00 and the spindle rotation command of M03 (S2: No). Therefore, the CPU 31 generates a fast-forward command including a spindle rotation command as an internal command ( S3 ). The CPU 31 outputs a fast-forward command to the motor control unit 40 (S4). At t51, the spindle motor 54 is off and moving (S5: YES). The outputted fast-forward command includes the spindle rotation command (S6: yes), but it does not descend from the Z-axis origin (S7: no), so the CPU 31 outputs the connection of the spindle motor 54 at t51 when the movement distribution of the speed block B8 is completed. instruction (S10). The tool 4 decelerates gradually from t51 onwards. Before the tool 4 stops at the target position at t52, the spindle motor 54 is turned on. The motor control unit 40 judges whether or not the current coordinates of the tool 4 have reached the target position (S11). When the current coordinates of the tool 4 have reached the target position at t52 (S11: YES), the CPU 31 instructs the rotation of the spindle motor 54 (S12). The spindle motor 54 starts to rotate. The current action is not descending from the Z-axis origin (S13: No), and the next action is not a tapping action (S14: No), so the CPU 31 judges whether the movement command of the next action is a fast forward command (S15). Since the movement command of the next operation is a fast-forward command (S15: YES), at t52 the motor control unit 40 starts the movement allocation of the speed block B9 for the fast-forward command (S17). The motor control unit 40 performs acceleration and deceleration processing of the moving speed for each axis using an FIR filter, and outputs drive currents to the respective motors 51 to 53 . The tool 4 therefore accelerates smoothly from t52 onwards and reaches its maximum speed. When the move allocation is completed at t53 (S18: YES), all the move instructions in one block have been completed (S19: YES), so the CPU 31 reads the third line of the NC program P2 (S1). The third line is the cutting feed command of G01 (S2: No). Therefore, the CPU 31 generates a cutting feed command as an internal command (S3). The CPU 31 outputs a cutting feed command to the motor control unit 40 (S4). At t53, the spindle motor 54 is turned on and is moving (S5: NO). The CPU 31 judges whether the fast forward command is the first movement command (S20). Since the fast forward command is not the first movement command (S20: No), the CPU 31 judges whether or not the tool 4 has reached the target position of the fast forward command (S21). When the current coordinates at t54 have reached the target position (S21: Yes), the next action is not a tapping thread retraction action (S22: No), and the current spindle 9 is rotating (S23: Yes), so the CPU 31 judges that the cutting feed is in progress. Whether the command includes the spindle stop command (S24). The cutting feed command does not include a spindle stop command (S24: No), so the CPU 31 judges whether or not the next operation is fast forward (S26). The next operation is cutting feed (S26: No), so the CPU 31 judges whether or not the spindle rotation speed has reached the target value (S27). When the spindle rotation speed reaches the target value at t55 (S27: YES), the motor control unit 40 starts the movement distribution of the speed block B10 of the cutting feed command (S17). The motor control unit 40 performs acceleration and deceleration processing of the moving speed for each axis using an FIR filter, and outputs drive currents to the respective motors 51 to 53 . Tool 4 therefore accelerates smoothly from t55 onwards and reaches its maximum speed. When at t56 the movement allocation of the speed block B10 is completed (S18: YES), all internal commands in one block are completed (S19: YES), so the CPU 31 reads the next block of the NC program P3 (S1). At t57 the tool 4 reaches the target position of the cutting feed. When M30 exists in one read block (S2: YES), the CPU 31 ends this process.
如以上所述,在模式C中,数值控制装置30在当前动作完成的t52之前,输出主轴马达54的接通指令。因此,数值控制装置30能够将时间缩短主轴马达54的接通所耗费的时间,因此能够在当前动作完成的t52后迅速使主轴9旋转。在下一动作的快进过程中,主轴转速上升。数值控制装置30在下一动作结束之后主轴转速达到目标值后进行切削进给,因此t54与t55之间为等待时间W2。模式C能够将等待时间W2缩短主轴马达54的接通所耗费的时间。As described above, in the mode C, the numerical controller 30 outputs an ON command for the spindle motor 54 before t52 when the current operation is completed. Therefore, the numerical controller 30 can shorten the time required to turn on the spindle motor 54 , and therefore can quickly rotate the spindle 9 after t52 when the current operation is completed. During the fast forward of the next action, the spindle speed increases. The numerical controller 30 performs the cutting feed after the spindle speed reaches the target value after the next operation is completed, so the period between t54 and t55 is the waiting time W2. Mode C can shorten the waiting time W2 by the time it takes for the spindle motor 54 to be turned on.
示出模式D的NC程序P4的一例。An example of the NC program P4 of the pattern D is shown.
模式D的第一行和第二行与模式C的第一行和第二行相同,因此在本实施方式中省略与模式C相同的部分的说明,使用图18以与模式C的不同之处为中心进行说明。速度块B11与第一行的G00的快进指令对应。刀具4在t60开始移动,在t62到达目标位置。速度块B12与第二行的G00的快进指令和M03的主轴旋转指令对应。刀具4在t62开始旋转且开始移动。当刀具在t63到达目标位置时(S21:是),CPU 31判断下一动作是否为攻螺纹退回动作(S22)。速度块B13与第三行的G00的快进指令对应。下一动作为快进,主轴9当前正在进行旋转,下一动作不包含主轴停止指令(S22:否,S23:是,S24:否,S26:是),因此CPU 31在t63使马达控制部40开始进行快进指令的速度块B13的移动分配(S17)。在t63,主轴转速没有达到目标值,但继续向目标值上升。刀具4在t64到达目标位置。速度块B14与第四行的G01的切削进给指令对应。在第三行的快进动作(第N+1个动作)结束的t64,主轴转速没有达到目标值。因此,在主轴转速没有达到目标值的期间,刀具4不开始进行速度块B14的移动。在t65,主轴转速达到目标值。因此,刀具4通过在t65开始进行旋转且开始进行移动来对被削件进行切削,在t66到达目标位置。在模式D中,t64与t65之间成为等待时间W3。速度块B11的移动分配在t60开始,在t61完成。下一动作为包含主轴旋转指令的快进。因此,CPU 31在t61输出主轴马达54的接通指令。在通过当前动作的快进来使刀具到达目标位置的t62之前,主轴马达54成为接通状态。因此,数值控制装置30能够将时间缩短主轴马达54的接通所耗费的时间,因此能够在当前动作完成的t62后迅速使主轴9旋转。因此,数值控制装置30能够将等待时间W3缩短主轴马达54的接通所耗费的时间。The first row and the second row of pattern D are the same as those of pattern C, so the description of the same parts as pattern C will be omitted in this embodiment, and the differences from pattern C will be described using FIG. 18 Describe the center. The speed block B11 corresponds to the fast forward command of G00 in the first line. The tool 4 starts moving at t60 and reaches the target position at t62. The speed block B12 corresponds to the fast forward command of G00 and the spindle rotation command of M03 in the second line. The tool 4 starts to rotate and starts to move at t62. When the tool reaches the target position at t63 (S21: YES), the CPU 31 judges whether the next motion is a tapping retracting motion (S22). The speed block B13 corresponds to the fast forward command of G00 in the third line. The next action is fast forward, the main shaft 9 is currently rotating, and the next action does not include a main shaft stop command (S22: No, S23: Yes, S24: No, S26: Yes), so the CPU 31 causes the motor control section 40 to start at t63. The movement distribution of the speed block B13 of the fast forward command is performed (S17). At t63, the spindle speed did not reach the target value, but continued to increase towards the target value. Tool 4 reaches the target position at t64. The speed block B14 corresponds to the cutting feed command of G01 in the fourth line. At t64 when the fast-forward action (N+1th action) in the third row ends, the spindle speed does not reach the target value. Therefore, the tool 4 does not start moving the speed block B14 while the spindle rotation speed has not reached the target value. At t65, the spindle speed reaches the target value. Therefore, the tool 4 cuts the workpiece by starting to rotate at t65 and starting to move, and reaches the target position at t66. In pattern D, the period between t64 and t65 becomes the waiting time W3. The movement assignment of speed block B11 starts at t60 and finishes at t61. The next action is fast forward including the spindle rotation command. Therefore, the CPU 31 outputs an ON command of the spindle motor 54 at t61. The spindle motor 54 is turned on until t62 when the tool reaches the target position by the fast-forward of the current operation. Therefore, the numerical controller 30 can shorten the time required to turn on the spindle motor 54 , and therefore can quickly rotate the spindle 9 after t62 when the current operation is completed. Therefore, the numerical controller 30 can shorten the waiting time W3 by the time it takes for the spindle motor 54 to be turned on.
示出模式E的NC程序P5的一例。An example of the NC program P5 of the pattern E is shown.
对NC程序P5的第一行进行解释所生成的移动指令为G00的快进指令,对第二行进行解释所生成的内部指令为M03的主轴旋转指令,对第三行进行解释所生成的移动指令为G01的切削进给指令。在模式E中,第一行的动作为当前动作。第二行仅为主轴旋转指令,第三行为切削进给指令,因此将第二行和第三行组合所得到的切削进给成为下一动作。因此,模式E成为与图14所示的模式A相同的行为。在模式E中,数值控制装置30也在作为当前动作的快进完成的t33之前输出主轴马达54的接通指令。因此,数值控制装置30能够将时间缩短主轴马达54的接通所耗费的时间,因此能够将直至开始进行下一动作为止的等待时间W1缩短主轴马达54的接通所耗费的时间。The movement command generated by interpreting the first line of NC program P5 is the fast forward command of G00, the internal command generated by interpreting the second line is the spindle rotation command of M03, and the movement command generated by interpreting the third line The command is the cutting feed command of G01. In mode E, the action in the first line is the current action. The second line is only the spindle rotation command, and the third line is the cutting feed command, so the cutting feed obtained by combining the second line and the third line becomes the next action. Therefore, pattern E behaves the same as pattern A shown in FIG. 14 . Also in the mode E, the numerical controller 30 outputs an ON command for the spindle motor 54 before t33 when the fast forwarding of the current operation is completed. Therefore, the numerical controller 30 can shorten the time taken to turn on the spindle motor 54 , and thus can shorten the waiting time W1 until the next operation starts.
示出模式F的NC程序P6的一例。An example of the NC program P6 of pattern F is shown.
对NC程序P6的第一行进行解释所生成的移动指令为G00的快进指令,对第二行进行解释所生成的内部指令为M03的主轴旋转指令,对第三行进行解释所生成的移动指令为G00的快进指令,对第四行进行解释所生成的移动指令为G01的切削进给指令。在模式F中,第一行的动作也为当前动作。第二行仅为主轴旋转指令,第三行为快进指令,因此将第二行和第三行组合所得到的快进动作成为下一动作。因此,模式F成为与图15所示的模式C相同的行为。在模式F中,数值控制装置30也在作为当前动作的快进完成的t44之前输出主轴马达54的接通指令。因此,数值控制装置30能够将时间缩短主轴马达54的接通所耗费的时间,因此能够在当前动作完成的t44后迅速使主轴9旋转。The movement command generated by interpreting the first line of NC program P6 is the fast forward command of G00, the internal command generated by interpreting the second line is the spindle rotation command of M03, and the movement command generated by interpreting the third line The command is the fast forward command of G00, and the movement command generated by explaining the fourth line is the cutting feed command of G01. In mode F, the action on the first line is also the current action. The second line is only the spindle rotation command, and the third line is the fast forward command, so the fast forward action obtained by combining the second line and the third line becomes the next action. Therefore, pattern F behaves the same as pattern C shown in FIG. 15 . Also in the mode F, the numerical controller 30 outputs an ON command for the spindle motor 54 before t44 when the fast-forwarding of the current operation is completed. Therefore, the numerical controller 30 can shorten the time required to turn on the spindle motor 54 , and therefore can quickly rotate the spindle 9 after t44 when the current operation is completed.
示出模式G的NC程序P7的一例,使用图19来进行说明。An example of the NC program P7 of the mode G is shown and described using FIG. 19 .
NC程序P7的第一行的G100为刀具更换指令。刀具更换动作如上述的那样。如图3所示,在本实施方式中,通过第四工序104在Z轴上设定指定位置Ps。数值控制装置30在第五工序105中使主轴9旋转。数值控制装置30为了在第五工序105中迅速使主轴9旋转,在第四工序104中进行主轴马达54的接通指令的先行。在第四工序104中,刀具保持件17从主轴9的锥形孔18的下方安装于该锥形孔18。在对主轴9安装刀具保持件17之前,主轴马达54接通。有可能产生用于驱动主轴9的主轴马达54的转矩与上述的机械机构相叠加而发生振荡等影响。因此,优选的是,数值控制装置30在对主轴9安装刀具保持件17之后,输出主轴马达54的接通指令。第四工序104中设定的指定位置Ps是可以将主轴马达54设为接通状态的位置。指定位置Ps例如是能够利用操作板15自由设定的参数,例如也可以存储于存储装置34等。G100 in the first line of NC program P7 is a tool replacement command. The tool replacement operation is as described above. As shown in FIG. 3 , in the present embodiment, the designated position Ps is set on the Z axis in the fourth step 104 . The numerical controller 30 rotates the spindle 9 in the fifth step 105 . In order to quickly rotate the spindle 9 in the fifth step 105 , the numerical controller 30 preempts the ON command of the spindle motor 54 in the fourth step 104 . In the fourth step 104 , the tool holder 17 is attached to the tapered hole 18 of the main shaft 9 from below the tapered hole 18 . Before the tool holder 17 is mounted on the spindle 9, the spindle motor 54 is switched on. There is a possibility that the torque of the spindle motor 54 for driving the spindle 9 is superimposed on the above-mentioned mechanical mechanism to cause an influence such as oscillation. Therefore, it is preferable that the numerical controller 30 outputs an ON command for the spindle motor 54 after the tool holder 17 is attached to the spindle 9 . The specified position Ps set in the fourth step 104 is a position where the spindle motor 54 can be turned on. The specified position Ps is, for example, a parameter that can be freely set using the operation panel 15, and may be stored in the storage device 34 or the like, for example.
如图12所示,CPU 31读入一个块的NC程序P7(S1)。在所读入的一个块内不存在M30(S2:否),因此CPU 31对所读入的一个块内的G100进行解释,来生成五个内部指令(S3)。五个内部指令为与第一工序101对应的第一快进指令、与第二工序102对应的第二快进指令和主轴停止指令、与第三工序103对应的刀库旋转指令、与第四工序104对应的第三快进指令以及与第五工序105对应的第四快进指令和主轴旋转指令。所生成的内部指令中的第一快进指令~第四快进指令为移动指令。所生成的内部指令存储于RAM 33。CPU 31将第一快进指令输出到马达控制部40(S4)。主轴马达54为断开状态,但刀具4已停止(S5:否),因此CPU31判断第一快进指令是否为最初的移动指令(S20)。第一快进指令为最初的移动指令(S20:是),因此马达控制部40开始进行第一快进指令的速度块的移动分配(S17)。当移动分配完成时(S18:是),一个块内存在没有完成的移动指令(S19:否),因此CPU 31将第二快进指令和主轴停止指令输出到马达控制部40(S4)。主轴马达54为断开状态且正在进行移动,第二快进指令不包含旋转指令(S5:是,S6:否),因此CPU 31判断第二快进指令是否为最初的移动指令(S20)。第二快进指令不为最初的移动指令(S20:否),因此CPU 31判断主轴头7是否到达了作为第一工序101的目标位置的Z轴原点(S21)。在主轴头7到达了Z轴原点时(S21:是),下一动作不为攻螺纹退回动作(S22:否),主轴9为断开状态(S22:否),因此马达控制部40开始进行第二快进指令的移动分配(S17)。主轴头7开始从Z轴原点朝向ATC原点移动。当移动分配完成时(S18:是),在一个块内存在没有完成的内部指令(S19:否),因此CPU 31将第三快进指令输出到马达控制部40(S4)。当前的主轴马达54为断开状态且主轴头7正在进行移动(S5:是),但是第三快进指令不包含主轴旋转指令(S6:否),因此CPU 31判断第三快进指令是否为最初的移动指令(S20)。第三快进指令不为最初的移动指令(S20:否),因此CPU 31判断主轴头7是否到达了作为第二工序102的目标位置的ATC原点(S21)。当主轴头7到达ATC原点时(S21:是),下一动作不为攻螺纹退回动作(S22:否),主轴9没有进行旋转(S23:否)。因此,在作为第三工序103的刀库基部71的旋转动作完成之后,马达控制部40在t70开始进行第三快进指令的速度块B15的移动分配(S17)。主轴头7开始从ATC原点朝向Z轴原点下降。当在t71速度块B15的移动分配完成时(S18:是),在一个块内存在没有完成的内部指令(S19:否),因此CPU 31将第四快进指令输出到马达控制部40(S4)。当前的主轴马达54为断开状态且主轴头7正在进行移动(S5:是),第四快进指令包含主轴旋转指令(S6:是),因此CPU 31判断第四快进指令是否为从Z轴原点下降(S7)。第四快进指令为从Z轴原点下降(S7:是),因此马达控制部40开始进行第四快进指令的速度块B16的移动分配(S8)。速度块B16是使主轴头7在t72到达Z轴原点之前低速移动并从Z轴原点起高速移动的速度块。因此,在从t71起使速度块B15的速度平缓地进行减速但使速度块B16的速度平缓地进行加速的t71~t72之间,移动速度固定。As shown in FIG. 12, the CPU 31 reads the NC program P7 of one block (S1). Since M30 does not exist in one read block (S2: No), the CPU 31 interprets G100 in one read block to generate five internal commands (S3). The five internal commands are the first fast-forward command corresponding to the first process 101, the second fast-forward command and the spindle stop command corresponding to the second process 102, the tool magazine rotation command corresponding to the third process 103, and the fourth The third fast-forward command corresponding to the process 104 and the fourth fast-forward command and spindle rotation command corresponding to the fifth process 105 . Among the generated internal commands, the first to fourth fast forward commands are movement commands. The generated internal commands are stored in RAM 33 . The CPU 31 outputs the first fast-forward command to the motor control unit 40 (S4). The spindle motor 54 is off, but the tool 4 has stopped (S5: No), so the CPU 31 judges whether the first fast-forward command is the first movement command (S20). Since the first fast-forward command is the first movement command (S20: YES), the motor control unit 40 starts the movement allocation of the speed block of the first fast-forward command (S17). When the movement allocation is completed (S18: Yes), there is an incomplete movement command in one block (S19: No), so the CPU 31 outputs the second fast forward command and the spindle stop command to the motor control unit 40 (S4). The spindle motor 54 is off and moving, and the second fast forward command does not include a rotation command (S5: Yes, S6: No), so the CPU 31 determines whether the second fast forward command is the first move command (S20). Since the second fast forward command is not the first movement command (S20: No), the CPU 31 determines whether the spindle head 7 has reached the Z-axis origin which is the target position of the first process 101 (S21). When the spindle head 7 has reached the Z-axis origin (S21: Yes), the next action is not a tapping retraction action (S22: No), and the main shaft 9 is in a disconnected state (S22: No), so the motor control unit 40 starts Movement allocation of the second fast forward instruction (S17). The spindle head 7 starts to move from the origin of the Z axis towards the origin of the ATC. When the movement allocation is completed (S18: Yes), there is an internal command not completed within one block (S19: No), so the CPU 31 outputs the third fast-forward command to the motor control unit 40 (S4). The current spindle motor 54 is in an off state and the spindle head 7 is moving (S5: Yes), but the third fast-forward command does not include a spindle rotation command (S6: No), so the CPU 31 judges whether the third fast-forward command is The first movement instruction (S20). Since the third fast forward command is not the first movement command (S20: No), the CPU 31 determines whether the spindle head 7 has reached the ATC origin which is the target position of the second process 102 (S21). When the spindle head 7 reaches the ATC origin (S21: Yes), the next action is not a tapping retreat action (S22: No), and the main shaft 9 does not rotate (S23: No). Therefore, after the rotation operation of the tool magazine base 71 as the third step 103 is completed, the motor control unit 40 starts the movement distribution of the speed block B15 of the third fast forward command at t70 ( S17 ). The spindle head 7 starts to descend from the ATC origin toward the Z-axis origin. When the movement allocation of the speed block B15 at t71 is completed (S18: Yes), there is an internal instruction not completed in one block (S19: No), so the CPU 31 outputs the fourth fast-forward instruction to the motor control section 40 (S4 ). The current spindle motor 54 is in an off state and the spindle head 7 is moving (S5: Yes), and the fourth fast-forward command includes a spindle rotation command (S6: Yes), so the CPU 31 judges whether the fourth fast-forward command is from Z The axis origin is lowered (S7). The fourth fast-forward command is descending from the Z-axis origin (S7: YES), so the motor control unit 40 starts the movement distribution of the speed block B16 for the fourth fast-forward command (S8). The speed block B16 is a speed block for moving the spindle head 7 at a low speed until reaching the Z-axis origin at t72 and then moving at a high speed from the Z-axis origin. Therefore, the moving speed is fixed between t71 and t72 when the speed of the speed block B15 is gradually decelerated from t71 and the speed of the speed block B16 is gradually accelerated.
CPU 31判断主轴头7的当前坐标是否为指定位置Ps以下(S9)。在当前坐标比指定位置Ps高时(S9:否),CPU 31返回到S9进行待机。在t711当前坐标变为指定位置Ps以下时(S9:是),刀具保持件17已经安装于主轴9,因此CPU 31输出主轴马达54的接通指令(S10)。因此,数值控制装置30防止用于将刀具保持件17安装并固定于主轴9的上述机械机构与主轴马达54的接通状态时的转矩相叠加而发生振荡,因此不对机械机构施加负荷。The CPU 31 judges whether or not the current coordinates of the spindle head 7 are equal to or less than the designated position Ps (S9). When the current coordinates are higher than the designated position Ps (S9: NO), the CPU 31 returns to S9 to stand by. When the current coordinate at t711 becomes below the designated position Ps (S9: YES), the tool holder 17 is already attached to the spindle 9, so the CPU 31 outputs a command to turn on the spindle motor 54 (S10). Therefore, the numerical control device 30 prevents the mechanical mechanism for attaching and fixing the tool holder 17 to the spindle 9 from oscillating due to superposition of the torque of the spindle motor 54 in the ON state, and thus does not apply a load to the mechanical mechanism.
CPU 31判断主轴头7是否到达了作为第四工序104的目标位置的Z轴原点(S11)。在没有到达Z轴原点的期间(S11:否),CPU 31返回到S11进行待机。在t72到达了Z轴原点时(S11:是),CPU 31对主轴马达54指示旋转(S12)。正在执行的动作为第五工序105且为从Z轴原点下降(S13:是),因此CPU 31判断第四快进指令的速度块B16的移动分配是否已完成(S18)。在t73速度块B16的移动分配完成时(S18:是),一个块内的所有内部指令已完成(S19:是),因此CPU 31返回到S1,读入NC程序P7的第二行的块。第二行为G01的切削进给指令,不为M30(S2:否),因此CPU 31对所读入的第二行的G01进行解释,生成切削进给指令来作为内部指令(S3)。CPU 31将切削进给指令输出到马达控制部40(S4)。主轴头7正在进行移动,但主轴马达54已经成为接通状态(S5:否),因此CPU 31判断切削进给指令是否为最初的移动指令(S20)。切削进给指令不为最初的移动指令(S20:否),因此CPU 31判断主轴头7是否到达了第五工序105的目标位置(Z20)(S21)。在到达了目标位置时(S21:是),作为下一动作的切削进给不为攻螺纹退回动作(S22:否),主轴9正在进行旋转(S23:是),切削进给指令不包含主轴停止指令(S24:否),因此CPU 31判断下一动作是否为快进(S26)。下一动作为切削进给动作(S26:否),因此CPU 31判断主轴转速是否为目标值以上(S27)。在主轴转速小于目标值时(S27:否),CPU 31返回到S27进行待机。因此,在主轴转速小于目标值的期间,主轴头7停止。在t75主轴转速变为目标值以上时(S27:是),马达控制部40开始进行切削进给指令的速度块B17的移动分配(S17)。在模式G中,t74与t75之间成为等待时间W4。主轴头7开始朝向目标位置移动,因此刀具4进行旋转来对被削件进行切削。当速度块B17的移动分配完成时(S18:是),NC程序P7的第二行的一个块内的所有移动指令已完成(S19:是),因此CPU31读入NC程序P7的下一个块(S1)。在所读入的下一个块为M30时(S2:是),数值控制装置30结束本处理。主轴头7在t76结束切削进给动作。The CPU 31 judges whether or not the spindle head 7 has reached the Z-axis origin which is the target position in the fourth step 104 (S11). While the Z-axis origin is not reached (S11: No), the CPU 31 returns to S11 and waits. When the Z-axis origin is reached at t72 (S11: YES), the CPU 31 instructs the spindle motor 54 to rotate (S12). The ongoing operation is the fifth process 105 and descending from the Z-axis origin (S13: Yes), so the CPU 31 judges whether the movement allocation of the speed block B16 of the fourth fast-forward command has been completed (S18). When the movement assignment of the speed block B16 at t73 is completed (S18: Yes), all internal instructions in one block have been completed (S19: Yes), so the CPU 31 returns to S1 and reads the block of the second line of the NC program P7. The second row is a cutting feed command of G01, which is not M30 (S2: No), so the CPU 31 interprets the read G01 of the second row, and generates a cutting feed command as an internal command (S3). The CPU 31 outputs a cutting feed command to the motor control unit 40 (S4). The spindle head 7 is moving, but the spindle motor 54 is already on (S5: NO), so the CPU 31 judges whether the cutting feed command is the first movement command (S20). Since the cutting feed command is not the first movement command (S20: No), the CPU 31 determines whether the spindle head 7 has reached the target position (Z20) of the fifth step 105 (S21). When the target position is reached (S21: Yes), the cutting feed as the next action is not a tapping retraction action (S22: No), the spindle 9 is rotating (S23: Yes), and the cutting feed command does not include the spindle The command is stopped (S24: NO), so the CPU 31 judges whether the next action is fast forward (S26). The next operation is the cutting feed operation (S26: No), so the CPU 31 judges whether or not the spindle rotation speed is equal to or greater than the target value (S27). When the spindle rotation speed is smaller than the target value (S27: NO), the CPU 31 returns to S27 and waits. Therefore, while the spindle speed is lower than the target value, the spindle head 7 stops. When the spindle rotation speed becomes equal to or greater than the target value at t75 (S27: YES), the motor control unit 40 starts the movement distribution of the speed block B17 of the cutting feed command (S17). In pattern G, the period between t74 and t75 becomes the waiting time W4. Since the spindle head 7 starts moving toward the target position, the tool 4 rotates to cut the workpiece. When the movement distribution of the speed block B17 was completed (S18: yes), all movement instructions in a block of the second line of the NC program P7 had been completed (S19: yes), so the CPU31 read into the next block of the NC program P7 ( S1). When the next block to be read is M30 (S2: YES), the numerical controller 30 ends this process. The spindle head 7 ends the cutting feed operation at t76.
如以上所述,在模式G中,数值控制装置30在通过刀具更换动作的下降工序从ATC原点朝向Z轴原点下降的当前动作完成的t72之前,输出主轴马达54的接通指令。因此,数值控制装置30能够将时间缩短主轴马达54的接通所耗费的时间,因此能够在主轴头7到达Z轴原点的t72之后迅速使主轴9旋转。t74~t75的等待时间W4为从主轴转速达到目标值所需要的时间减去主轴头7的移动时间(从Z轴原点移动到目标位置所需要的时间)所得到的时间。因此,数值控制装置30能够将等待时间W4缩短主轴马达54的接通所耗费的时间。As described above, in mode G, the numerical controller 30 outputs an ON command for the spindle motor 54 before t72 when the current operation of descending from the ATC origin toward the Z-axis origin in the descending step of the tool replacement operation is completed. Therefore, the numerical controller 30 can shorten the time required to turn on the spindle motor 54 , and thus can quickly rotate the spindle 9 after the spindle head 7 reaches the Z-axis origin at t72 . The waiting time W4 from t74 to t75 is the time obtained by subtracting the movement time of the spindle head 7 (time required to move from the Z-axis origin to the target position) from the time required for the spindle rotation speed to reach the target value. Therefore, the numerical controller 30 can shorten the waiting time W4 by the time it takes for the spindle motor 54 to be turned on.
在本实施方式中,作为对NC程序按块进行解释来生成多个移动指令的例子,说明了模式B的攻螺纹指令(G77)和模式G的刀具更换指令(G100),但例如在钻孔指令(S81)中也通过CPU 31的解释来生成三个移动指令。在本实施方式中,以下示出使用了钻孔指令的钻孔动作的NC程序的一例。In this embodiment, the tapping command (G77) in mode B and the tool change command (G100) in mode G were described as an example of generating a plurality of movement commands by interpreting the NC program block by block. Instruction (S81) is also interpreted by the CPU 31 to generate three movement instructions. In this embodiment, an example of an NC program for a drilling operation using a drilling command is shown below.
如图20所示,钻孔动作例如具备快进动作201、切削进给动作202以及快进动作203这三个动作。快进动作201例如是使主轴9旋转并且从Z100向Z40的基准点(R点)以快进方式移动的动作。切削进给动作202例如是从R点向Z20移动且使主轴9向一个方向旋转来对被削件开孔的动作。快进动作203是使主轴9不进行旋转地从孔底以快进方式向Z100退回地进行移动的动作。因此,CPU 31对钻孔指令进行解释,来生成与快进动作201、切削进给动作202以及快进动作203这三个动作分别对应的三个内部指令。As shown in FIG. 20 , the drilling operation includes, for example, three operations of a fast-forward operation 201 , a cutting feed operation 202 , and a fast-forward operation 203 . The fast-forward operation 201 is, for example, an operation for rotating the main shaft 9 and moving in a fast-forward manner from Z100 to the reference point (R point) of Z40. The cutting feed operation 202 is, for example, an operation of moving from point R to Z20 and rotating the main shaft 9 in one direction to drill a hole in a workpiece. The fast-forward operation 203 is an operation in which the main shaft 9 is moved back from the bottom of the hole toward Z100 in fast-forward without rotating. Therefore, the CPU 31 interprets the drilling command, and generates three internal commands corresponding to the three operations of the fast-forward operation 201 , the cutting feed operation 202 , and the fast-forward operation 203 .
与快进动作201对应的内部指令需要使主轴9旋转,因此包含主轴旋转指令。因此,通过在快进动作201之前设定轴移动的动作(例如快进等),钻孔动作与模式A的动作对应。此时,数值控制装置30在开始进行快进动作201之前,能够使主轴马达54的接通指令先行,因此能够缩短直至开始进行作为下一动作的快进动作201为止的等待时间W1。The internal command corresponding to the fast-forward operation 201 needs to rotate the spindle 9, and therefore includes a spindle rotation command. Therefore, by setting the motion of the axis movement (for example, fast forward) before the fast forward motion 201, the drilling motion corresponds to the motion of the mode A. In this case, the numerical control device 30 can give the spindle motor 54 an ON command before starting the fast forward operation 201 , so that the waiting time W1 until the next fast forward operation 201 starts can be shortened.
在以上说明中,数值控制装置30的CPU 31是本发明的控制部的一例。机床1是本发明的设备的一例。执行S5的处理的CPU 31是本发明的第一判断部的一例。执行S6的处理的CPU 31是本发明的第二判断部的一例。执行S10的处理的CPU 31是本发明的通电控制部的一例。执行S12的处理的CPU 31是本发明的旋转执行部的一例。操作板15是本发明的设定部的一例。In the above description, the CPU 31 of the numerical controller 30 is an example of the control unit of the present invention. The machine tool 1 is an example of the equipment of the present invention. The CPU 31 that executes the process of S5 is an example of the first judging unit of the present invention. The CPU 31 executing the process of S6 is an example of the second judging unit of the present invention. The CPU 31 executing the process of S10 is an example of the energization control unit of the present invention. The CPU 31 that executes the process of S12 is an example of the rotation execution unit of the present invention. The operation panel 15 is an example of the setting unit of the present invention.
在模式B中,快进动作151的快进指令是本发明的轴移动指令的一例。攻螺纹动作152的攻螺纹指令是本发明的切削进给指令的一例。攻螺纹动作153的攻螺纹指令是本发明的退出指令的一例。在模式G中,第一工序101是本发明的第一上升动作的一例。第二工序102是本发明的第二上升动作的一例。第三工序103是本发明的旋转动作的一例。第四工序104是本发明的第一下降动作的一例。第五工序105是本发明的第二下降动作的一例。Z轴原点是本发明的设备原点的一例。指定位置Ps是能够将马达的通电从断开状态切换为接通状态的范围的上限值的一例。In the mode B, the fast-forward command of the fast-forward operation 151 is an example of the axis movement command of the present invention. The tapping command of the tapping operation 152 is an example of the cutting feed command of the present invention. The tapping command of the tapping operation 153 is an example of the withdrawal command of the present invention. In pattern G, the first step 101 is an example of the first raising operation of the present invention. The second step 102 is an example of the second raising operation of the present invention. The third step 103 is an example of the rotation operation of the present invention. The fourth step 104 is an example of the first lowering operation in the present invention. The fifth step 105 is an example of the second lowering operation of the present invention. The Z-axis origin is an example of the device origin of the present invention. The specified position Ps is an example of an upper limit value of a range in which energization of the motor can be switched from an off state to an on state.
如以上所说明的那样,本实施方式的数值控制装置30的CPU 31对NC程序的控制指令进行解释,来生成移动指令等内部指令,按照所生成的内部指令来控制机床1的动作。机床1具有用于安装支承刀具4的刀具保持件17的主轴9。CPU 31判断主轴马达54的通电是否为断开状态且机床1的当前的动作是否为轴移动。在判断为通电为断开状态且机床1的当前的动作为轴移动时,CPU 31判断在下一动作的移动指令中是否包含主轴旋转指令。在判断为在下一动作的移动指令中包含主轴旋转指令时,CPU 31在轴移动完成之前,将主轴马达54的通电从断开状态切换为接通状态。因此,数值控制装置30能够缩短直至在下一动作中主轴马达54成为接通状态使主轴9旋转为止的待机时间。As described above, the CPU 31 of the numerical controller 30 of the present embodiment interprets the control commands of the NC program, generates internal commands such as movement commands, and controls the operation of the machine tool 1 according to the generated internal commands. The machine tool 1 has a spindle 9 for mounting a tool holder 17 supporting a tool 4 . The CPU 31 judges whether the spindle motor 54 is powered off and whether the current operation of the machine tool 1 is axis movement. When it is determined that the power is off and the current operation of the machine tool 1 is axis movement, the CPU 31 determines whether or not a spindle rotation command is included in the movement command for the next operation. When it is determined that the movement command for the next operation includes the spindle rotation command, the CPU 31 switches the energization of the spindle motor 54 from OFF to ON before the axis movement is completed. Therefore, the numerical controller 30 can shorten the standby time until the spindle motor 54 is turned on to rotate the spindle 9 in the next operation.
本发明不限于上述实施方式,能够进行各种变形。上述实施方式的模式A~G是主轴马达54为断开状态且当前动作为轴移动且下一动作为包含主轴旋转指令的动作的对象动作模式的例示,也可以是这些模式以外的动作模式。NC程序P1~P7是用于执行模式A~G的动作模式的NC程序的一例,不限定于这些NC程序P1~P7。NC程序中的G指令、M指令等控制指令也是例示,也可以通过这些指令以外的控制指令来设定动作。The present invention is not limited to the above-described embodiments, and various modifications are possible. Modes A to G in the above-described embodiment are examples of target operation modes in which the spindle motor 54 is OFF, the current operation is axis movement, and the next operation includes an operation including a spindle rotation command, and operation modes other than these modes may be used. NC programs P1 to P7 are examples of NC programs for executing the operation modes of modes A to G, and are not limited to these NC programs P1 to P7. Control commands such as G command and M command in the NC program are also examples, and the operation may be set by control commands other than these commands.
上述实施方式的数值控制装置30针对所运算出的各轴的移动速度,进行通过移动平均滤波器使速度变化平滑的加减速处理。在图9所示的加减速处理的例子中,为了便于说明,以利用一阶移动平均滤波器进行了处理的情况为例进行了说明,但也可以利用二阶以上的移动平均滤波器进行处理。因此,数值控制装置30能够进一步吸收刀具4的移动速度的急剧的变化,因此能够有效地抑制机床1的振动。The numerical controller 30 of the above-described embodiment performs acceleration and deceleration processing for smoothing the speed change by using a moving average filter with respect to the calculated moving speed of each axis. In the example of acceleration and deceleration processing shown in Fig. 9, for the sake of explanation, the case where processing is performed using a first-order moving average filter is described as an example, but processing can also be performed using a second-order or higher moving average filter. . Therefore, the numerical controller 30 can further absorb a sudden change in the moving speed of the tool 4 , and thus can effectively suppress the vibration of the machine tool 1 .
在上述实施方式中,在模式G中,在第四工序104中设定了可以将主轴马达54接通的指定位置Ps,但也可以不设定指定位置Ps。即,也可以省略图12的S9的判断处理。In the above-described embodiment, in the mode G, the designated position Ps at which the spindle motor 54 can be turned on is set in the fourth step 104, but the designated position Ps may not be set. That is, the determination process of S9 in FIG. 12 may be omitted.
在本实施方式中,也可以将微型计算机、ASIC(应用专用集成电路)、FPGA(现场可编程门阵列)等用作处理装置,来代替CPU 31。关于移动控制处理,也可以利用多个处理装置进行分散处理。用于存储程序的ROM 32例如也可以由HDD和/或存储装置34等快闪存储器等其它非暂时性的存储介质构成。非暂时性的存储介质只要是能够与存储信息的期间无关地保留住信息的存储介质即可。非暂时性的存储介质也可以不包含暂时性的存储介质(例如,所传输的信号)。移动控制程序例如也可以从与未图示的网络连接的服务器进行下载(即,作为传输信号发送)后存储到存储装置34等。在该情况下,将移动控制程序保存在设置于服务器中的HDD等非暂时性的存储介质中即可。In this embodiment, instead of the CPU 31 , a microcomputer, an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or the like may be used as a processing device. Regarding the movement control processing, distributed processing may be performed by a plurality of processing devices. The ROM 32 for storing the program may be constituted by, for example, HDD and/or other non-transitory storage media such as flash memory such as the storage device 34 . The non-transitory storage medium may be any storage medium as long as it can retain information regardless of the storage period of the information. Non-transitory storage media may also exclude transitory storage media (eg, transmitted signals). The mobility control program may be downloaded (that is, transmitted as a transmission signal) from a server connected to a network not shown, for example, and may be stored in the storage device 34 or the like. In this case, the movement control program may be stored in a non-transitory storage medium such as an HDD installed in the server.
Claims (10)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016-250820 | 2016-12-26 | ||
JP2016250820A JP6693409B2 (en) | 2016-12-26 | 2016-12-26 | Numerical control device and control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108241341A true CN108241341A (en) | 2018-07-03 |
CN108241341B CN108241341B (en) | 2021-06-25 |
Family
ID=62701214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711437886.6A Active CN108241341B (en) | 2016-12-26 | 2017-12-26 | Numerical control device and control method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6693409B2 (en) |
CN (1) | CN108241341B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111103845A (en) * | 2018-10-26 | 2020-05-05 | 兄弟工业株式会社 | Numerical control device, control method of numerical control device |
CN112578731A (en) * | 2019-09-30 | 2021-03-30 | 兄弟工业株式会社 | Numerical controller and control method for numerical controller |
CN112650151A (en) * | 2019-10-10 | 2021-04-13 | 兄弟工业株式会社 | Numerical controller and control method |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7091979B2 (en) * | 2018-09-28 | 2022-06-28 | ブラザー工業株式会社 | Numerical control device and control method |
DE112021003632T5 (en) * | 2020-07-07 | 2023-05-11 | Fanuc Corporation | Numerical control device and control method |
JP7533093B2 (en) | 2020-09-30 | 2024-08-14 | ブラザー工業株式会社 | Control device, control method, control program, and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1586809A (en) * | 2004-10-11 | 2005-03-02 | 李维谦 | Numerical control machine tool main shaft speed change logic control method |
CN101367173A (en) * | 2008-09-16 | 2009-02-18 | 重庆大学 | A method for implementing energy-saving shutdown during no-load operation between adjacent steps of CNC machine tools |
JP2010005743A (en) * | 2008-06-27 | 2010-01-14 | Aisin Takaoka Ltd | Ball screw thermal displacement correcting device |
CN102554668A (en) * | 2010-12-13 | 2012-07-11 | 兄弟工业株式会社 | Numerical control device and method for controlling numerical control device |
CN106154977A (en) * | 2016-09-27 | 2016-11-23 | 重庆大学 | The determination methods at crucial moment in a kind of numerical control machine tool cutting work step overall process |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5136853B2 (en) * | 2008-09-16 | 2013-02-06 | ブラザー工業株式会社 | Numerically controlled machine tool and control program for numerically controlled machine tool |
US9645599B2 (en) * | 2010-10-01 | 2017-05-09 | Citizen Watch Co., Ltd. | Power supply management device and machine tool having the power-supply management device |
JP2012206227A (en) * | 2011-03-30 | 2012-10-25 | Brother Industries Ltd | Machine tool |
JP2015225617A (en) * | 2014-05-30 | 2015-12-14 | ブラザー工業株式会社 | Numerical value control device and control method |
-
2016
- 2016-12-26 JP JP2016250820A patent/JP6693409B2/en active Active
-
2017
- 2017-12-26 CN CN201711437886.6A patent/CN108241341B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1586809A (en) * | 2004-10-11 | 2005-03-02 | 李维谦 | Numerical control machine tool main shaft speed change logic control method |
JP2010005743A (en) * | 2008-06-27 | 2010-01-14 | Aisin Takaoka Ltd | Ball screw thermal displacement correcting device |
CN101367173A (en) * | 2008-09-16 | 2009-02-18 | 重庆大学 | A method for implementing energy-saving shutdown during no-load operation between adjacent steps of CNC machine tools |
CN102554668A (en) * | 2010-12-13 | 2012-07-11 | 兄弟工业株式会社 | Numerical control device and method for controlling numerical control device |
CN106154977A (en) * | 2016-09-27 | 2016-11-23 | 重庆大学 | The determination methods at crucial moment in a kind of numerical control machine tool cutting work step overall process |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111103845A (en) * | 2018-10-26 | 2020-05-05 | 兄弟工业株式会社 | Numerical control device, control method of numerical control device |
CN112578731A (en) * | 2019-09-30 | 2021-03-30 | 兄弟工业株式会社 | Numerical controller and control method for numerical controller |
CN112650151A (en) * | 2019-10-10 | 2021-04-13 | 兄弟工业株式会社 | Numerical controller and control method |
Also Published As
Publication number | Publication date |
---|---|
JP6693409B2 (en) | 2020-05-13 |
CN108241341B (en) | 2021-06-25 |
JP2018106350A (en) | 2018-07-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108241341B (en) | Numerical control device and control method | |
JP6051937B2 (en) | Numerical controller | |
US11338404B2 (en) | Machine tool and control apparatus of the machine tool | |
JP5482639B2 (en) | Numerical control device, control program, and storage medium | |
CN106475833B (en) | Numerical control device and control method | |
CN113677462B (en) | Machine tool and control device for machine tool | |
JP5958188B2 (en) | Numerical controller | |
CN104460497B (en) | CNC device | |
JP6376440B2 (en) | Machine Tools | |
JP2014193495A (en) | Machine tool | |
JP2015217492A5 (en) | ||
JP2012206227A (en) | Machine tool | |
CN107272575A (en) | Numerical control device and control method | |
JP2014161986A (en) | Machine tool and tool changing method | |
CN109725605B (en) | Numerical control device and speed control method | |
JP4362095B2 (en) | Numerical controller | |
CN108687558B (en) | Numerical control device and control method | |
JP5136853B2 (en) | Numerically controlled machine tool and control program for numerically controlled machine tool | |
JP7529779B2 (en) | Numerical control device and control method | |
JP7574590B2 (en) | Numerical control device and control method | |
JP6028573B2 (en) | Control system, machine tool, servo motor control device, and position information transmission / reception method | |
US10315282B2 (en) | Control device and control method | |
JP2605649B2 (en) | Multi face processing equipment | |
JP2025103423A (en) | Numerical control device, control method, and program | |
CN112650151A (en) | Numerical controller and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |