JP5211192B2 - Numerical control method and apparatus - Google Patents

Numerical control method and apparatus Download PDF

Info

Publication number
JP5211192B2
JP5211192B2 JP2011064985A JP2011064985A JP5211192B2 JP 5211192 B2 JP5211192 B2 JP 5211192B2 JP 2011064985 A JP2011064985 A JP 2011064985A JP 2011064985 A JP2011064985 A JP 2011064985A JP 5211192 B2 JP5211192 B2 JP 5211192B2
Authority
JP
Japan
Prior art keywords
spindle
time
block
speed
command
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.)
Expired - Fee Related
Application number
JP2011064985A
Other languages
Japanese (ja)
Other versions
JP2011118952A (en
Inventor
武都志 福谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2011064985A priority Critical patent/JP5211192B2/en
Publication of JP2011118952A publication Critical patent/JP2011118952A/en
Application granted granted Critical
Publication of JP5211192B2 publication Critical patent/JP5211192B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Automatic Control Of Machine Tools (AREA)
  • Numerical Control (AREA)

Description

この発明は、数値制御方法及びその装置に係り、特に主軸の回転に伴う消費電力の節減に関するものである。   The present invention relates to a numerical control method and an apparatus therefor, and more particularly to a reduction in power consumption accompanying rotation of a main shaft.

旋盤など主軸に加工物を装着し旋削加工する場合には、工具が加工物の中心部に進むにつれて工具接触部の周速が遅くなるので、加工物の切削精度が低下したり、工具寿命が短くなったりする問題がある。そこで一般に加工物と工具接触部の相対速度が一定となるように周速一定制御を行い、切削位置の違いによる切削精度の悪化を防止したり工具寿命を延ばしたりしている。   When turning a workpiece such as a lathe with a workpiece, the peripheral speed of the tool contact portion decreases as the tool advances to the center of the workpiece, so that the cutting accuracy of the workpiece decreases and the tool life decreases. There is a problem of shortening. Therefore, in general, constant peripheral speed control is performed so that the relative speed between the workpiece and the tool contact portion is constant, thereby preventing deterioration in cutting accuracy due to a difference in cutting position and extending the tool life.

一般に旋盤では周速一定制御の基準軸はX軸となり、X軸が主軸に取り付けられた加工ワークの中心に近づくにつれて、主軸の回転数を上げていくことになる。
なお、周速一定制御時の主軸回転数[min−1]は
(1000×S)/(2×π×X) ・・・(1式)
で計算される。ここでSは周速[m/min]、Xは周速一定基準軸のプログラム座標値(ワーク中心からの値)[mm]である。
In general, in a lathe, the reference axis for constant peripheral speed control is the X-axis, and as the X-axis approaches the center of the work piece attached to the spindle, the rotation speed of the spindle is increased.
The spindle speed [min −1 ] during constant peripheral speed control is (1000 × S) / (2 × π × X) (1)
Calculated by Here, S is the peripheral speed [m / min], and X is the program coordinate value (value from the workpiece center) [mm] of the constant peripheral speed reference axis.

第12図は従来の周速一定制御機能を有する数値制御装置の構成を示すブロック図である。即ち図において、101は加工プログラムを1ブロックずつ読み取り、移動量、速度などをGコードなどに従って解析し、ブロック情報を作成するプログラム解析手段で、ブロック情報にはモーダル情報、各軸の移動量、S指令やM指令などの主軸・補助指令データなどの情報が含まれる。102はプログラム解析手段101の作成したブロック情報により各軸に移動量を分配する補間手段、103は各軸に分配された移動量に対し、所定の時定数で加速・減速処理を行う加減速手段、104は加減速を行った位置指令をサーボアンプに出力する位置データ出力手段である。   FIG. 12 is a block diagram showing the configuration of a conventional numerical control device having a constant peripheral speed control function. That is, in the figure, 101 is a program analysis means for reading a machining program one block at a time, analyzing the movement amount, speed, etc. according to the G code and creating block information. The block information includes modal information, the movement amount of each axis, Information such as spindle / auxiliary command data such as S command and M command is included. 102 is an interpolation unit that distributes the movement amount to each axis according to the block information created by the program analysis unit 101. 103 is an acceleration / deceleration unit that performs acceleration / deceleration processing with a predetermined time constant for the movement amount distributed to each axis. , 104 is position data output means for outputting a position command subjected to acceleration / deceleration to the servo amplifier.

また、105は補間された基準軸の位置情報に基づき、周速が一定となるように主軸回転数を演算する周速一定演算手段、106は周速一定演算手段105にて演算した主軸回転数指令を主軸アンプに出力する速度データ出力手段である。   Reference numeral 105 denotes a peripheral speed constant calculating means for calculating the main shaft rotational speed so that the peripheral speed is constant based on the interpolated reference axis position information. Reference numeral 106 denotes a main shaft rotational speed calculated by the constant peripheral speed calculating means 105. Speed data output means for outputting commands to the spindle amplifier.

なお、周速一定演算手段105は、切削送り中は基準軸の座標(半径)に応じて主軸回転数を逐次演算し、早送り中はそのブロックの終点座標を元に主軸回転数を演算する。
また一般に加工プログラムでの指令ではG96で周速一定制御を有効とし、G97でキャンセルとする。
The constant peripheral speed calculation means 105 sequentially calculates the spindle rotation speed according to the coordinate (radius) of the reference axis during cutting feed, and calculates the spindle rotation speed based on the end point coordinates of the block during fast feed.
In general, in the command in the machining program, the peripheral speed constant control is enabled at G96 and canceled at G97.

ところで、周速一定制御を行う場合、例えば次のような加工プログラムが用いられる。なお後述の説明のため、この加工プログラムを、加工プログラムAと称することにしておく。また、この例ではX軸を周速一定演算の基準軸としており、このときの加工動作および主軸回転数は第13図のようになる。   By the way, when performing constant peripheral speed control, for example, the following machining program is used. Note that this machining program will be referred to as machining program A for the following description. In this example, the X axis is used as a reference axis for constant peripheral speed calculation, and the machining operation and the spindle speed at this time are as shown in FIG.

Figure 0005211192
即ち、N004ブロックでは周速200m/minで主軸が回転し、このときの主軸回転数は318min−1となる。
Figure 0005211192
That is, in the N004 block, the main shaft rotates at a peripheral speed of 200 m / min, and the main shaft rotation speed at this time is 318 min −1 .

また、N005ブロックは早送り指令なので、一般には指令終点に対しての周速度を計算する。従ってX軸座標50mmの位置に対して周速が加工プログラムで指令された200m/minになるように周速一定演算を行い、この結果主軸回転数は637min−1となる。 Since the N005 block is a fast-forward command, generally the peripheral speed with respect to the command end point is calculated. Accordingly, a constant peripheral speed calculation is performed so that the peripheral speed is 200 m / min instructed by the machining program with respect to the position of the X-axis coordinate of 50 mm, and as a result, the spindle speed is 637 min −1 .

ここで主軸は318min−1から637min−1へと主軸の速度ループの応答性に従い加速を行う。 Here, the main shaft accelerates from 318 min −1 to 637 min −1 according to the speed loop responsiveness of the main shaft.

また、N006ブロックもN005ブロックと同様に早送り指令なので、X軸座標30mmの位置に対して周速一定演算を行い、主軸回転数は1061min−1となる。 Since the N006 block is also a fast-forward command in the same way as the N005 block, a constant peripheral speed calculation is performed on the position of the X-axis coordinate 30 mm, and the spindle rotation speed is 1061 min −1 .

また、N008ブロックではX軸移動中に逐次周速一定演算を行い、終点座標10mmの位置での回転数は3183min−1となる。 In the N008 block, the constant peripheral speed is sequentially calculated during the X-axis movement, and the rotation speed at the end point coordinate of 10 mm is 3183 min- 1 .

また、N009ブロックではX軸座標に変化がないため主軸回転数はそのまま保持され、N010ブロックではX軸が30mmの位置に移動するに従い、主軸回転数は1061min−1まで減速することとなる。 Further, in the N009 block, the X-axis coordinate does not change, so the main shaft rotation speed is maintained as it is. In the N010 block, the main shaft rotation speed is reduced to 1061 min −1 as the X axis moves to a position of 30 mm.

ところが、上述した従来の技術では、加工プログラム中に周速一定指令(G96)がされると、直ちに周速一定制御を開始し、実際に周速を一定にすべき切削送りブロック以外のとき(N004、N005ブロック等)も、周速一定演算を行っていた。そのため不必要に主軸を加減速制御し、電力を消費する結果となっていた。   However, in the conventional technique described above, when a constant peripheral speed command (G96) is issued during the machining program, the peripheral speed constant control is immediately started, and when the peripheral speed is other than the cutting feed block where the peripheral speed should actually be constant ( N004, N005 block, etc.) also performed constant peripheral speed calculation. For this reason, the main shaft is unnecessarily subjected to acceleration / deceleration control, resulting in power consumption.

また、例えば所定間隔を介して位置する複数の穴の穴明け加工を行う場合、例えば次のような加工プログラムを用いて行われる。なお後述の説明のため、この加工プログラムを、加工プログラムBと称することにしておく。   For example, when drilling a plurality of holes positioned at a predetermined interval, the following machining program is used, for example. Note that this machining program will be referred to as a machining program B for the following description.

Figure 0005211192
ところが、上述のような、所定間隔を介して位置する複数の穴の穴明け加工を行う加工プログラムが与えられた場合、従来の数値制御装置は、主軸回転指令(M3)がされると直ちに指令された回転数(S1500)で回転させ、また、切削と切削の合間にある位置決め移動時にも主軸を回転させたままの状態とする数値制御を行う。
Figure 0005211192
However, when a machining program for drilling a plurality of holes positioned at a predetermined interval as described above is given, the conventional numerical control device immediately issues a command when a spindle rotation command (M3) is issued. The numerical control is performed such that the spindle is rotated at the rotation speed (S1500) and the spindle remains rotated even during the positioning movement between the cutting operations.

このため、切削加工の前には主軸を予め回転させておく必要があるが、加工プログラム中に主軸回転指令(M3)がされても、直ちに主軸を回転させなくてもよい場合があり、この場合、消費電力に無駄が生じていた。   For this reason, it is necessary to rotate the spindle in advance before cutting, but even if a spindle rotation command (M3) is issued during the machining program, it may not be necessary to immediately rotate the spindle. In this case, power consumption is wasted.

また、切削と切削の合間にある位置決め移動時における主軸の回転は、加工に寄与するものでなく、消費電力に無駄が生じていた。   Further, the rotation of the main shaft during the positioning movement between the cutting operations does not contribute to the processing, resulting in wasteful power consumption.

この発明は上記課題を解決するためになされたもので、加工プログラム中に周速一定指令が与えられた場合において、無駄な消費電力を節約できる数値制御方法及びその装置を提供することを目的とする。   The present invention has been made to solve the above problems, and an object thereof is to provide a numerical control method and apparatus capable of saving useless power consumption when a constant peripheral speed command is given in a machining program. To do.

またこの発明は、加工プログラム中に主軸回転指令が与えられた場合において、無駄な消費電力を節約できる数値制御方法及びその装置を提供することを目的とする。   It is another object of the present invention to provide a numerical control method and apparatus capable of saving useless power consumption when a spindle rotation command is given in a machining program.

またこの発明におけるその他の目的は、後述の「発明を実施するための最良の形態」の欄に記載の事項より明らかになるであろう。   Other objects of the present invention will become clear from the matters described in the section of “Best Mode for Carrying Out the Invention” described later.

上述した課題を解決し、目的を達成するために、本発明は、主軸回転数を制御する機能を有した数値制御装置を制御する方法において、1ブロック以上の先読み解析を行い、この先読み解析された結果に基づいて、主軸回転指令がされてから切削送りが開始されるまでの実行時間、及び主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間を得、主軸回転指令がされた後で、かつ、主軸回転指令がされてから前記得られた実行時間より前記得られた主軸加速時間を減算した時間が経過する時までに、主軸を起動することを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention performs a prefetch analysis of one block or more in a method for controlling a numerical control device having a function of controlling the spindle rotational speed, and the prefetch analysis is performed. Based on the result, the execution time from when the spindle rotation command is issued until the cutting feed is started, and the spindle acceleration time from the start of the spindle until the spindle rotation speed is reached by the spindle rotation command are obtained. And the spindle is started by the time when the obtained spindle acceleration time is subtracted from the obtained execution time after the spindle rotation command is issued .

本発明によれば、主軸回転指令がされてから所定時間経過するまで主軸を停止させておくように主軸を制御するので、無駄な消費電力を節約できるというという効果を奏する。   According to the present invention, since the main shaft is controlled so that the main shaft is stopped until a predetermined time elapses after the main shaft rotation command is issued, there is an effect that wasteful power consumption can be saved.

第1図はこの発明の実施の形態1に係る数値制御装置の構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a numerical control apparatus according to Embodiment 1 of the present invention. 第2図はこの発明の実施の形態1に係る先読みバッファの一構成例を示す図である。FIG. 2 is a diagram showing a configuration example of a prefetch buffer according to Embodiment 1 of the present invention. 第3図はこの発明の実施の形態1に係るプログラム先読解析手段の処理手順を示すフローチャートである。FIG. 3 is a flowchart showing the processing procedure of the program prefetch analysis means according to the first embodiment of the present invention. 第4図はこの発明の実施の形態1に係る周速一定制御機能起動タイミング計算手段の処理手順を示すフローチャートである。FIG. 4 is a flowchart showing the processing procedure of the constant peripheral speed control function activation timing calculation means according to the first embodiment of the present invention. 第5図はこの発明の実施の形態1に係る主軸加速時間推定手段に関する説明図である。FIG. 5 is an explanatory diagram relating to the spindle acceleration time estimation means according to Embodiment 1 of the present invention. 第6図はこの発明の実施の形態1に係る周速一定制御時の基準軸の動きと主軸回転数の動きを示す説明図である。FIG. 6 is an explanatory diagram showing the movement of the reference axis and the movement of the main spindle speed during constant peripheral speed control according to Embodiment 1 of the present invention. 第7図はこの発明の実施の形態2に係る数値制御装置の構成を示すブロック図である。FIG. 7 is a block diagram showing the configuration of the numerical controller according to Embodiment 2 of the present invention. 第8図はこの発明の実施の形態2に係るプログラム先読解析手段の処理手順を示すフローチャートである。FIG. 8 is a flowchart showing the processing procedure of the program prefetch analysis means according to the second embodiment of the present invention. 第9図はこの発明の実施の形態2に係る主軸起動タイミング計算手段の処理手順を示すフローチャートである。FIG. 9 is a flowchart showing the processing procedure of the spindle start timing calculation means according to Embodiment 2 of the present invention. 第10図はこの発明の実施の形態2に係る主軸停止タイミング計算手段の処理手順を示すフローチャートである。FIG. 10 is a flowchart showing the processing procedure of the spindle stop timing calculation means according to Embodiment 2 of the present invention. 第11図はこの発明の実施の形態2に係る主軸回転数の変化を示す説明図である。FIG. 11 is an explanatory diagram showing changes in the spindle speed according to Embodiment 2 of the present invention. 第12図は従来の周速一定制御機能を有する数値制御装置の構成を示すブロック図である。FIG. 12 is a block diagram showing the configuration of a conventional numerical control device having a constant peripheral speed control function. 第13図は従来の周速一定制御時の動作を示す説明図である。FIG. 13 is an explanatory diagram showing the operation during conventional peripheral speed constant control.

以下に、本発明にかかる数値制御方法及びその装置の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Embodiments of a numerical control method and apparatus according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

実施の形態1.
本願発明の実施の形態1について第1図〜第6図を用いて説明する。
なお、この実施の形態1は、例えば上記加工プログラムAのような周速一定制御指令が与えられた場合において無駄な消費電力を抑制するための実施の形態を示し、第1図はこの発明の実施の形態1に係る数値制御装置の構成を示すブロック図、第2図はこの発明の実施の形態1に係る先読みバッファの一構成例を示す図、第3図はこの発明の実施の形態1に係るプログラム先読解析手段の処理手順を示すフローチャート、第4図はこの発明の実施の形態1に係る周速一定制御機能起動タイミング計算手段の処理手順を示すフローチャート、第5図はこの発明の実施の形態1に係る主軸加速時間推定手段に関する説明図、第6図はこの発明の実施の形態1に係る周速一定制御時の基準軸の動きと主軸回転の動きを示した説明図である。
Embodiment 1 FIG.
Embodiment 1 of the present invention will be described with reference to FIGS.
The first embodiment shows an embodiment for suppressing wasteful power consumption when a constant peripheral speed control command such as the machining program A is given, for example. FIG. 1 shows the present invention. FIG. 2 is a block diagram showing a configuration of a numerical control apparatus according to Embodiment 1, FIG. 2 is a diagram showing an example of a configuration of a prefetch buffer according to Embodiment 1 of the present invention, and FIG. 3 is Embodiment 1 of the present invention. 4 is a flowchart showing the processing procedure of the program prefetch analysis means according to FIG. 4, FIG. 4 is a flowchart showing the processing procedure of the constant peripheral speed control function activation timing calculation means according to the first embodiment of the invention, and FIG. FIG. 6 is an explanatory diagram showing the spindle acceleration time estimating means according to the first embodiment, and FIG. 6 is an explanatory diagram showing the movement of the reference axis and the movement of the spindle during the constant peripheral speed control according to the first embodiment of the present invention. .

第1図において、1はプログラム先読解析手段であり、現在実行中のブロックから1ブロック以上先のブロックを加工プログラムから先読み及び解析し、先読みバッファ2に解析結果を格納する。先読みバッファ2には各ブロックのモーダル情報、各軸の移動量、主軸指令回転数、送り速度、周速一定制御機能起動タイミング情報などの情報が格納される。3はある一定のサンプリング周期(例えば10ms)毎に起動される補間手段であり、現在実行すべきブロック情報を先読みバッファ2から読み出して補間処理を実行する。補間した結果は加減速手段4により加減速処理され、位置データ出力手段5を経てサーボアンプに出力される。なお、補間手段3、加減速手段4及び位置データ出力手段5は従来から使用されている手段である。   In FIG. 1, reference numeral 1 denotes program prefetch analysis means, which prefetches and analyzes one or more blocks ahead of the currently executing block from the machining program and stores the analysis result in the prefetch buffer 2. The prefetch buffer 2 stores information such as modal information of each block, movement amount of each axis, spindle command rotational speed, feed speed, constant peripheral speed control function activation timing information, and the like. Interpolation means 3 is activated every certain sampling period (for example, 10 ms), reads block information to be currently executed from the prefetch buffer 2 and executes interpolation processing. The interpolated result is subjected to acceleration / deceleration processing by the acceleration / deceleration means 4 and output to the servo amplifier via the position data output means 5. The interpolation unit 3, the acceleration / deceleration unit 4 and the position data output unit 5 are conventionally used units.

6は周速一定制御機能起動タイミング計算手段であり、先読みバッファ2に格納され補間手段3により読み出された周速一定指令がされてから切削開始までの実行時間、切削開始時点の主軸回転数、主軸加速時間等から、周速一定演算手段7を起動させるタイミングを判定し、周速一定演算手段7を起動させるとき、その起動信号を出力する。7は周速一定演算手段であり、切削送り中の基準軸の座標値に応じた主軸回転数を演算し周速を一定に保つ。8は速度データ出力手段であり、主軸アンプに対し主軸回転数を指令する。9は主軸加速時間推定手段であり、主軸が指令回転数まで加速に要する時間を推定する。   6 is a peripheral speed constant control function activation timing calculation means, which is the execution time from when the constant peripheral speed command stored in the prefetch buffer 2 and read by the interpolation means 3 to the start of cutting, and the spindle speed at the start of cutting. The timing for starting the constant peripheral speed calculating means 7 is determined from the spindle acceleration time and the like, and when starting the constant peripheral speed calculating means 7, the start signal is output. 7 is a constant peripheral speed calculation means, which calculates the spindle speed corresponding to the coordinate value of the reference axis during cutting feed and keeps the peripheral speed constant. Reference numeral 8 denotes speed data output means for instructing the spindle speed to the spindle amplifier. 9 is spindle acceleration time estimating means for estimating the time required for the spindle to accelerate to the commanded rotational speed.

第2図は第1図における先読みバッファ2の一構成例を示したものである。先読みバッファ2は1ブロック毎に情報が作成され、Gコードのモーダル情報などを格納する領域、各軸の移動指令を格納する領域、M指令やS指令などの補助・主軸機能指令コードを格納する領域、周速一定指令がされてから切削開始までの実行時間を格納する領域、切削開始時点での主軸回転数を格納する領域などで構成される。   FIG. 2 shows a configuration example of the prefetch buffer 2 in FIG. The look-ahead buffer 2 generates information for each block, stores an area for storing modal information of G codes, an area for storing movement commands for each axis, and auxiliary / spindle function command codes such as M commands and S commands. An area, an area for storing an execution time from when the constant peripheral speed command is issued to the start of cutting, an area for storing the spindle rotational speed at the time of starting cutting, and the like.

第2図ではN004 G96 S200からN007 G01 Z−90. F2000までの解析が終了しており、現在実行中のブロックは先読みバッファの先頭、即ちN004 G96 S200となる。   In FIG. 2, N004 G96 S200 to N007 G01 Z-90. The analysis up to F2000 has been completed, and the block currently being executed is the head of the prefetch buffer, that is, N004 G96 S200.

第1図に示すプログラム先読解析手段1は加工プログラムから1ブロックずつ読み出し解析を行い、周速一定開始指令G96を読み込むと、G01などの切削ブロックが現れるまで加工プログラムの先読みを行い、ブロックの解析を行う。切削ブロックまで先読解析を完了した時点で、現在のブロック(周速一定開始指令G96のブロック)から切削ブロック開始までの実行時間および切削開始位置における主軸回転数を算出し、その時間と回転数を先読みバッファ2のG96ブロック領域の主軸制御情報記憶領域(切削開始までの時間を格納する領域、切削開始時点での主軸回転数を格納する領域)に格納する。
次にプログラム先読解析手段1の詳細な動作について第3図を用いて説明する。
まず、ステップ1で加工プログラムから1ブロックを読み込み、ステップ2で読み込んだブロックを解析する。ステップ3で解析したブロックに周速一定指令Gコード”G96”が含まれているか否かを判定し、含まれていなければ解析終了となる。”G96”が含まれていればステップ4に進み、後に算出する切削開始までの時間データを初期化する。
ステップ5で加工プログラムに次ブロックがあるかどうか判定し、次ブロックがなければ解析終了となる。次ブロックがあればステップ6に進んで次ブロックを読み込み、ステップ7で読み込んだブロックを解析する。ステップ7で解析したブロックに周速一定指令キャンセルGコード”G97”があれば解析終了となる。”G97”でなければステップ9で切削送りかどうか判定し、切削送りであればステップ11に進み、ステップ11では前記1式に基づいて切削開始時点での基準軸座標から指令した周速となる主軸回転数を演算し、先読みバッファ2の切削開始時点の主軸回転数を格納する領域に格納する。ステップ9で切削送りでなければステップ10でそのブロックの実行時間を算出し、先読みバッファ2の切削開始までの時間を格納する領域に記憶しておく。
The program prefetch analysis means 1 shown in FIG. 1 reads and analyzes one block at a time from the machining program, reads a constant peripheral speed start command G96, reads the machining program until a cutting block such as G01 appears, Perform analysis. When the pre-reading analysis is completed up to the cutting block, the execution time from the current block (the block of the constant peripheral speed start command G96) to the cutting block start and the spindle speed at the cutting start position are calculated, and the time and speed Are stored in the spindle control information storage area (the area for storing the time until the start of cutting, the area for storing the spindle speed at the start of cutting) in the G96 block area of the prefetch buffer 2.
Next, the detailed operation of the program prefetch analysis means 1 will be described with reference to FIG.
First, one block is read from the machining program in step 1, and the block read in step 2 is analyzed. It is determined whether or not the block analyzed in step 3 includes the constant peripheral speed command G code “G96”. If it is not included, the analysis ends. If “G96” is included, the process proceeds to step 4 to initialize time data to be calculated later until the start of cutting.
In step 5, it is determined whether or not there is a next block in the machining program. If there is no next block, the analysis ends. If there is a next block, the process proceeds to step 6 to read the next block, and the block read in step 7 is analyzed. If the block analyzed in step 7 has a constant peripheral speed command cancel G code “G97”, the analysis is terminated. If it is not “G97”, it is determined in step 9 whether or not it is a cutting feed, and if it is a cutting feed, the process proceeds to step 11. In step 11, the peripheral speed commanded from the reference axis coordinates at the start of cutting is obtained based on the above-mentioned formula The spindle speed is calculated and stored in the area for storing the spindle speed at the start of cutting in the look-ahead buffer 2. If the cutting feed is not determined in step 9, the execution time of the block is calculated in step 10 and stored in an area for storing the time until the cutting of the prefetch buffer 2 is started.

なお、ブロックの実行時間は次の手順で求める。
(1)早送り指令ブロックのみ場合、そのブロックで最も移動距離の長い軸の移動時間を算出し、加減速時間を加算する。例えば早送り速度60m/min、加減速時定数200ms、移動距離500mmの場合の実行時間は、
500[mm]/((60×1000)/(60×1000))[mm/msec] + 200[msec]= 700[msec]
となる。
The execution time of the block is obtained by the following procedure.
(1) In the case of only the fast-forward command block, the movement time of the axis having the longest movement distance in that block is calculated, and the acceleration / deceleration time is added. For example, the execution time when the fast-forwarding speed is 60 m / min, the acceleration / deceleration time constant is 200 ms, and the moving distance is 500 mm,
500 [mm] / ((60 × 1000) / (60 × 1000)) [mm / msec] +200 [msec] = 700 [msec]
It becomes.

(2)補助機能のみの場合、補助機能実行時間をあらかじめパラメータとして設定しておき、その時間をブロックの実行時間とする。即ち、パラメータメモリの所定個所に、M03:Tm1(実行時間)、M04:Tm2・・・と予め記憶させておき、例えばM03を解析したとき、Tm1を読み出してそのTm1を実行時間とする。 (2) In the case of only the auxiliary function, the auxiliary function execution time is set in advance as a parameter, and that time is set as the block execution time. That is, M03: Tm1 (execution time), M04: Tm2,... Are stored in advance in a predetermined location of the parameter memory, and when M03 is analyzed, for example, Tm1 is read and Tm1 is set as the execution time.

(3)早送り指令と補助機能指令の両方がある場合、早送り実行時間と補助機能実行時間とを比較し、時間の長い方をそのブロックの実行時間とする。 (3) When both the fast-forward command and the auxiliary function command are present, the fast-forward execution time and the auxiliary function execution time are compared, and the longer one is set as the execution time of the block.

(4)ドウェル指令(G04)の場合、ドウェル時間をそのブロックの実行時間とする。 (4) In the case of the dwell command (G04), the dwell time is set as the execution time of the block.

(5)早送り指令、補助機能指令共にない場合、例えばGコードのモーダル設定のみの場合である。周速一定制御機能起動タイミング計算手段6の処理周期、例えば10msecをそのブロックの実行時間とする。 (5) When there is neither a fast-forward command nor an auxiliary function command, for example, only when the G code is modal. The processing period of the constant peripheral speed control function activation timing calculation means 6, for example, 10 msec is set as the execution time of the block.

このようにブロック実行時間を算出した後、ステップ5から繰り返し実行し、切削送り指令が現れるまでの各ブロックの実行時間を積算していく。
即ち、ブロック実行時間の積算時間は、G96指令されてから実際に切削を開始するまでの時間となる。なお、ブロック実行時間と主軸回転数は、先読みバッファ2中のG96ブロックにおける切削開始までの時間を格納する領域及び切削開始時点の主軸回転数を格納する領域に格納される。
After calculating the block execution time in this way, the execution is repeated from step 5 and the execution time of each block until the cutting feed command appears is integrated.
That is, the accumulated time of the block execution time is the time from when the G96 command is issued until the actual cutting is started. The block execution time and the spindle speed are stored in an area for storing the time until the start of cutting in the G96 block in the look-ahead buffer 2 and an area for storing the spindle speed at the start of cutting.

次に周速一定制御機能起動タイミング計算手段6の詳細な動作について第4図を用いて説明する。   Next, the detailed operation of the constant peripheral speed control function activation timing calculation means 6 will be described with reference to FIG.

なお、本処理が最初に起動されるまでの間に、本図に示される(A)ブロック実行時間は初期化(0クリア)されており、また、(A)ブロック実行時間はこの発明による数値制御装置内のメモリ(図示せず)に記憶される。   It should be noted that (A) the block execution time shown in the figure is initialized (cleared to 0) until this processing is first started, and (A) the block execution time is a numerical value according to the present invention. It is stored in a memory (not shown) in the control device.

まず、ステップ41で第一回目の処理か否かを判定する。ここでは(A)ブロック実行時間が0であるとき第一回目の処理とし、0でないとき第二回目以降の処理と判定している。   First, in step 41, it is determined whether or not it is the first processing. Here, (A) when the block execution time is 0, it is determined as the first process, and when it is not 0, it is determined as the second and subsequent processes.

第一回目の処理であれば、ステップ42で先読みバッファ2中の現在実行中のブロック情報に格納されたブロック実行時間を読み出し、(A)ブロック実行時間として記憶する。
なお、ここでいうブロック実行時間とは、第2図に示す切削開始までの時間300msを指す。
If it is the first process, the block execution time stored in the block information currently being executed in the prefetch buffer 2 is read in step 42 and stored as (A) block execution time.
The block execution time here refers to a time of 300 ms until the start of cutting shown in FIG.

次にステップ43でTa(=(A)ブロック実行時間−主軸加速時間(周速一定指令前の主軸回転数から切削ブロック開始時点に必要とされる主軸回転数に達するまでの主軸到達時間)を求める。なお、主軸の加速時間の推定方法については後述する。
次にステップ44でTaが0以下か否か判定し、否であれば、ステップ45で(A)ブロック実行時間から補間時間を引いたものを、新しい(A)ブロック実行時間として上記メモリに記憶し、本処理を終了する。第二回目以降はステップ45にて記憶した(A)ブロック実行時間のデータが上記メモリに格納されており(A)ブロック実行時間が0でないので、ステップ41にて第二回目以降の処理と判断され、このデータを元にステップ43以降を実行する。
Next, at step 43, Ta (= (A) block execution time−spindle acceleration time (spindle arrival time from the spindle speed before the constant peripheral speed command to the spindle speed required at the start of the cutting block) is calculated. The method for estimating the spindle acceleration time will be described later.
Next, in step 44, it is determined whether Ta is 0 or less. If not, in step 45, the value obtained by subtracting the interpolation time from (A) block execution time is stored in the memory as a new (A) block execution time. Then, this process ends. In the second and subsequent times, since the (A) block execution time data stored in step 45 is stored in the memory and (A) the block execution time is not 0, it is determined in step 41 that the second and subsequent processing is performed. Then, step 43 and subsequent steps are executed based on this data.

ステップ44でTaが0以下であれば、ステップ46で、切削送りブロックの座標値に合わせて周速が一定となるような主軸指令回転数に変更する周速一定演算手段7を起動する。主軸はある加速時間をもって指令速度に到達するので、切削送りブロック開始時点でちょうど指令した主軸回転数に到達することになる。   If Ta is equal to or less than 0 in step 44, in step 46, the peripheral speed constant calculating means 7 for changing to a spindle command rotational speed that makes the peripheral speed constant in accordance with the coordinate value of the cutting feed block is activated. Since the spindle reaches the command speed with a certain acceleration time, it reaches the spindle speed just commanded at the start of the cutting feed block.

最後にステップ47で(A)ブロック実行時間を0クリアし、本処理を終了する。
なお、周速一定制御機能起動タイミング計算手段6は所定のサンプリング周期で周期的に処理され、上記の処理を繰り返す。
Finally, in step 47, (A) the block execution time is cleared to 0, and this process is terminated.
The constant peripheral speed control function activation timing calculation means 6 is periodically processed at a predetermined sampling cycle, and the above processing is repeated.

また、本実施の形態1ではプログラム先読解析手段1でブロックの実行時間(例えば第2図の場合300ms)を算出するようにしたが、この実行時間の代わりに、実行時間を周速一定制御機能起動タイミング計算手段6のサンプリング周期で除した値、即ち周速一定制御機能起動タイミング計算手段6のサンプリング回数としても良い。例えば周速一定制御機能起動タイミング計算手段6のサンプリング周期を10msとすると、サンプリング回数は300/10=30(回)となる。更に第4図に示されている、主軸加速時間、(A)ブロック実行時間、補間時間など時間を示すデータをすべて周速一定制御機能起動タイミング計算手段6のサンプリング回数に変換して第4図に置き換えると、例えばステップ45で「補間時間を減ずる」とは、補間時間が10msのため1だけ減ずることになり、またサンプリング回数変換以降の全ての計算を端数のない整数による減算処理だけとなり、よって処理が簡単になりソフトウエア処理する上で扱いやすくなる。   In the first embodiment, the program prefetch analysis means 1 calculates the block execution time (for example, 300 ms in the case of FIG. 2). Instead of this execution time, the execution time is controlled at a constant peripheral speed. The value divided by the sampling period of the function activation timing calculation unit 6, that is, the sampling count of the constant peripheral speed control function activation timing calculation unit 6 may be used. For example, if the sampling period of the constant peripheral speed control function activation timing calculation means 6 is 10 ms, the number of samplings is 300/10 = 30 (times). Further, all the data indicating the spindle acceleration time, (A) block execution time, interpolation time, and the like shown in FIG. 4 are converted into the number of times of sampling of the constant peripheral speed control function activation timing calculation means 6. For example, “decrease the interpolation time” in step 45 means that the interpolation time is 10 ms, so that 1 is reduced, and all calculations after the conversion of the number of samplings are only subtraction processing with a fractional integer, Therefore, the processing becomes simple and easy to handle in software processing.

なお、前記サンプリング回数変換時に端数が生じる場合があるが、この場合には切上げ、または切下げ処理して端数のない整数にしておく。   Note that a fraction may occur during the conversion of the number of samplings. In this case, rounding up or down processing is performed to make an integer without a fraction.

次に主軸加速時間推定手段9について第5図を用いて説明する。
主軸の最高回転数をSmaxとし、Smaxまで加速するのにTmaxだけ時間がかかるとする。主軸指令回転数がSmaxより小さい時は、一般にSmaxまでの加速曲線に近い加速曲線を描いて指令回転数に到達する。Smaxまで加速する時の加速曲線は予め分かっているので、任意の指令回転数に到達するまでの加速時間を推定することができる。しかし、加速曲線を数式で表現すると複雑になるので、実際に任意の指令回転数までの加速時間を求めることは難しい。そこで、加速曲線を1乃至2以上の直線で近似することで加速時間を求める。
Next, the spindle acceleration time estimating means 9 will be described with reference to FIG.
Assume that the maximum number of rotations of the main shaft is Smax, and it takes time Tmax to accelerate to Smax. When the spindle command rotational speed is smaller than Smax, generally, an acceleration curve close to the acceleration curve up to Smax is drawn to reach the command rotational speed. Since the acceleration curve when accelerating to Smax is known in advance, it is possible to estimate the acceleration time until reaching an arbitrary command rotational speed. However, if the acceleration curve is expressed by a mathematical expression, it becomes complicated, and it is difficult to actually obtain the acceleration time up to an arbitrary command rotational speed. Therefore, the acceleration time is obtained by approximating the acceleration curve with one or more straight lines.

まず、主軸最高回転数までの加速波形を測定する。測定手段は問わないが、ここではシンクロスコープなどを用いて、速度波形を記録紙に記録することにする。   First, the acceleration waveform up to the maximum spindle speed is measured. There is no limitation on the measurement means, but here, the velocity waveform is recorded on a recording sheet using a synchroscope or the like.

次に記録紙上で加速曲線に沿って誤差が適当な値になるよう直線を引く。
第5図(a)はSmaxまでの加速曲線を3つの直線a,b,cで近似した一例である。これらの直線はSmaxまでの加速曲線に対し2点を取り、適当な許容値に収まるように結んだものである。近似誤差をより小さくしたければより多くの点を曲線上に取れば良い。
Next, a straight line is drawn on the recording paper so that the error becomes an appropriate value along the acceleration curve.
FIG. 5 (a) shows an example in which an acceleration curve up to Smax is approximated by three straight lines a, b, and c. These straight lines are obtained by taking two points on the acceleration curve up to Smax and connecting them so as to fall within an appropriate allowable value. If you want to make the approximation error smaller, you need to take more points on the curve.

この例では指令速度0から主軸回転数S1までの加速時間がT1、0から主軸回転数S2までの加速時間がT2、0から主軸回転数Smaxまでの加速時間がTmaxとなる。   In this example, the acceleration time from the command speed 0 to the spindle speed S1 is T1, the acceleration time from 0 to the spindle speed S2 is T2, and the acceleration time from 0 to the spindle speed Smax is Tmax.

以上のように求めた主軸回転数と加速時間を本数値制御装置内のメモリに第5図(b)のように設定しておく。このデータは本数値制御装置内に持つ不揮発性RAM(図示せず)に記憶する。   The spindle rotational speed and acceleration time obtained as described above are set in the memory in the numerical controller as shown in FIG. 5 (b). This data is stored in a non-volatile RAM (not shown) included in the numerical controller.

次に各区分の直線の方程式を求め、指令速度に応じた各加速時間を算出すると、
0<指令速度≦S1の時の加速時間は、
加速時間T=(T1/S1)×指令速度
で求められ、S1<指令速度≦S2の時は、
加速時間T=(S2×T1−S1×T2+(T2−T1)×指令速度)/(S2−S1)
で求められ、S2<指令速度≦Smaxの時は、
加速時間T=
(Smax×T2−S2×Tmax+(Tmax−T2)×指令速度)/(Smax−S2)
で求められる。
Next, when calculating the linear equation of each section and calculating each acceleration time according to the command speed,
The acceleration time when 0 <command speed ≦ S1 is
Acceleration time T = (T1 / S1) × command speed, and when S1 <command speed ≦ S2,
Acceleration time T = (S2 * T1-S1 * T2 + (T2-T1) * command speed) / (S2-S1)
When S2 <command speed ≦ Smax,
Acceleration time T =
(Smax * T2-S2 * Tmax + (Tmax-T2) * command speed) / (Smax-S2)
Is required.

従って、指令された主軸回転数が上記の区分のどれに属するかをまず判定し、次に上式に指令回転数を当てはめて計算することにより、主軸回転数に応じた加速時間を容易に計算することができる。   Therefore, it is easy to calculate the acceleration time corresponding to the spindle speed by first determining which of the above categories the commanded spindle speed belongs, and then calculating by applying the command speed to the above equation. can do.

なお、主軸加速時間(周速一定指令前の主軸回転数から周速一定指令による主軸回転数に到達するまでの主軸到達時間)の計算のため、主軸の加速曲線の加速時間を用いたが、減速曲線の減速時間を用いてもよい。   In order to calculate the spindle acceleration time (spindle arrival time from the spindle speed before the constant circumferential speed command to the spindle speed by the constant circumferential speed command), the acceleration time of the spindle acceleration curve was used. You may use the deceleration time of a deceleration curve.

第6図は、実施の形態1における周速一定制御時の基準軸の動きと主軸回転の動きを示した説明図である。従来は切削点までのアプローチ動作である早送りブロックに対しても周速が一定になるように主軸回転数が制御されていたが、本実施の形態1では主軸回転が必要なところで指令した周速度に到達するように無駄なく主軸回転を制御することができる。よって、加工に寄与しない位置決め等のブロックにおいて、主軸の加減速制御を行わないので、無駄に電力を消費することがなくなる。   FIG. 6 is an explanatory diagram showing the movement of the reference axis and the movement of the main shaft during the constant peripheral speed control in the first embodiment. Conventionally, the spindle rotational speed is controlled so that the peripheral speed is constant even for the fast-forward block that is the approach operation up to the cutting point, but in the first embodiment, the peripheral speed commanded when the spindle rotation is required. The spindle rotation can be controlled without waste so as to reach Therefore, since acceleration / deceleration control of the spindle is not performed in a block such as positioning that does not contribute to machining, power is not wasted.

なお、実施の形態1において、周速一定指令がされてから切削送りが開始されるまでの実行時間の計算を、プログラム先読解析手段1にて行うものについて説明したが、プログラム先読解析手段1以外の手段で行っでも初期の目的は達成できる。   In the first embodiment, the calculation of the execution time from when the circumferential speed constant command is issued until the cutting feed is started is described by the program prefetch analysis means 1. Even if it is carried out by means other than 1, the initial purpose can be achieved.

また、周速一定指令前の主軸回転数から周速一定指令による主軸回転数に到達するまでの主軸到達時間の計算を簡単にするため、主軸の加速曲線を複数本の直線で近似し、この直線の式に基づいて主軸到達時間を求めたが、減速曲線を複数本の直線で近似し、この直線の式に基づいて主軸到達時間を求めても、初期の目的は達成できる。   In order to simplify the calculation of the spindle arrival time from the spindle speed before the constant circumferential speed command to the spindle speed achieved by the constant circumferential speed command, the spindle acceleration curve is approximated by multiple straight lines. Although the main shaft arrival time is obtained based on the straight line equation, the initial purpose can be achieved by approximating the deceleration curve with a plurality of straight lines and obtaining the main shaft arrival time based on the straight line equation.

また、実施の形態1においては、周速一定制御による消費電力の節減を最大にするため、周速一定指令から、周速一定指令がされてから切削送りが開始されるまでの実行時間より周速一定指令前の主軸回転数から周速一定指令による切削開始時点の主軸回転数に到達するまでの主軸到達時間を減算した時間が経過したとき、前記周速一定制御機能を起動するもの、即ち、N006ブロックの途中より周速一定制御機能を起動するものについて説明したが、切削開始時点より2つ前のブロック(N005ブロック)より周速一定制御機能を起動しても初期の目的は達成できる。   Further, in the first embodiment, in order to maximize the power saving by the constant peripheral speed control, the peripheral time is determined from the execution time from the constant peripheral speed command until the cutting feed is started after the constant peripheral speed command is issued. When the time of subtracting the spindle arrival time from reaching the spindle speed at the start of cutting by the constant peripheral speed command from the main spindle speed before the constant speed command has elapsed, that is, to activate the peripheral speed constant control function, In this example, the peripheral speed constant control function is activated in the middle of the N006 block. However, even if the peripheral speed constant control function is activated from the block two blocks before the cutting start time (N005 block), the initial purpose can be achieved. .

実施の形態2.
次に本願発明の実施の形態2について第7図〜第11図を用いて説明する。
なお、この実施の形態2は、上記加工プログラムBのような加工プログラムが与えられた場合において、主軸起動指令時及び切削と切削との合間における主軸の回転に伴う無駄な消費電力を抑制するための実施の形態を示し、第7図はこの発明の実施の形態2に係る数値制御装置の構成を示すブロック図、第8図はこの発明の実施の形態2に係るプログラム先読解析手段の処理手順を示すフローチャート、第9図は主軸起動タイミング計算手段の処理手順を示すフローチャート、第10図はこの発明の実施の形態2に係る主軸停止タイミング計算手段の処理手順を示すフローチャート、第11図はこの発明の実施の形態2に係る主軸回転数の変化を示す説明図である。
Embodiment 2. FIG.
Next, a second embodiment of the present invention will be described with reference to FIGS.
In the second embodiment, when a machining program such as the machining program B is given, wasteful power consumption associated with rotation of the spindle at the time of spindle activation command and between cutting operations is suppressed. FIG. 7 is a block diagram showing the configuration of the numerical control apparatus according to the second embodiment of the present invention, and FIG. 8 shows the processing of the program prefetch analysis means according to the second embodiment of the present invention. FIG. 9 is a flowchart showing the processing procedure of the spindle start timing calculation means, FIG. 10 is a flowchart showing the processing procedure of the spindle stop timing calculation means according to Embodiment 2 of the present invention, and FIG. It is explanatory drawing which shows the change of the main shaft rotation speed which concerns on Embodiment 2 of this invention.

第7図において、61はプログラム先読解析手段であり、現在実行中のブロックから1ブロック以上先のブロックを加工プログラムから先読み及び解析し、先読みバッファ2に解析結果を格納する。先読みバッファ2には各ブロックのモーダル情報、各軸の移動量、主軸指令回転数、送り速度、主軸起動タイミング情報などの情報が格納される。3はある一定のサンプリング周期(例えば10ms)毎に処理される補間手段であり、現在すべきブロック情報を先読みバッファ2から読み出し補間処理を実行する。なお、補間した結果は加減速手段4により加減速され、位置データ出力手段5を経てサーボアンプに出力される。また、補間手段3、加減速手段4及び位置データ出力手段5は従来から使用されている手段である。
63は主軸起動タイミング計算手段であり、先読みバッファ2に格納され補間手段3により読み出された主軸回転指令から切削開始までの時間、切削開始時点の主軸回転数、主軸加速時間等から、主軸を起動させるタイミングを判定し、主軸を起動させるとき、その起動信号を出力する。8は速度データ出力手段であり、主軸アンプに対し主軸回転数を指令する。64は主軸が指令回転数まで加速に要する時間及び減速に要する時間を推定する主軸加減速時間推定手段であり、主軸加減速時間の計算を簡単化するため、実施の形態1で説明した主軸加速時間推定手段9と同様に、主軸の加速曲線を複数本の直線で近似し、この直線の式に基づいて主軸加速時間を求め、また主軸の減速曲線を複数本の直線で近似し、この直線の式に基づいて主軸減速時間を求めている。なお、主軸の加速曲線を複数本の直線で近似し、この直線の式に基づいて主軸加速時間を求め、主軸加速時間+主軸加速時間=加減速時間と計算したり、主軸の加減速曲線の式に基づいて加減速時間を推定したりされる場合もある。
In FIG. 7, reference numeral 61 denotes program prefetch analysis means, which prefetches and analyzes one or more blocks ahead of the currently executing block from the machining program and stores the analysis results in the prefetch buffer 2. The prefetch buffer 2 stores information such as modal information of each block, movement amount of each axis, spindle command rotational speed, feed speed, spindle start timing information, and the like. Interpolation means 3 is processed every certain sampling period (for example, 10 ms), reads block information to be present from the prefetch buffer 2 and executes interpolation processing. The interpolated result is accelerated / decelerated by the acceleration / deceleration means 4 and output to the servo amplifier via the position data output means 5. The interpolation unit 3, the acceleration / deceleration unit 4 and the position data output unit 5 are conventionally used units.
63 is a spindle start timing calculation means, which calculates the spindle from the spindle rotation command stored in the prefetch buffer 2 and read by the interpolation means 3 until the start of cutting, the spindle rotation speed at the start of cutting, the spindle acceleration time, etc. The start timing is determined, and when starting the spindle, the start signal is output. Reference numeral 8 denotes speed data output means for instructing the spindle speed to the spindle amplifier. 64 is a spindle acceleration / deceleration time estimation means for estimating the time required for the spindle to accelerate to the commanded rotational speed and the time required for deceleration. In order to simplify the calculation of the spindle acceleration / deceleration time, the spindle acceleration described in the first embodiment is used. Similar to the time estimation means 9, the spindle acceleration curve is approximated by a plurality of straight lines, the spindle acceleration time is obtained based on the formula of this straight line, and the spindle deceleration curve is approximated by a plurality of straight lines. The spindle deceleration time is obtained based on the following formula. The spindle acceleration curve is approximated by a plurality of straight lines, and the spindle acceleration time is calculated based on the formula of this line, and calculated as spindle acceleration time + spindle acceleration time = acceleration / deceleration time, or the acceleration / deceleration curve of the spindle The acceleration / deceleration time may be estimated based on the equation.

62は主軸停止タイミング計算手段であり、主軸回転中に主軸を停止するか否かを判定する。主軸起動タイミング計算手段63と主軸停止タイミング計算手段62の起動条件として、主軸停止中であれば主軸起動タイミング計算手段63を、主軸回転中であれば主軸停止タイミング計算手段62を起動する。   Reference numeral 62 denotes a spindle stop timing calculation means that determines whether or not to stop the spindle while the spindle is rotating. As start conditions for the spindle start timing calculation means 63 and the spindle stop timing calculation means 62, the spindle start timing calculation means 63 is started if the spindle is stopped, and the spindle stop timing calculation means 62 is started if the spindle is rotating.

次にプログラム先読解析手段61の詳細な動作について第8図を用いて説明する。
まず、ステップ71で加工プログラムから1ブロックを読み込み、ステップ72で読み込んだブロックを解析する。ステップ73で現在のブロックが主軸回転中か否か判定し、回転中であればステップ82、回転中でなければステップ74に進む。なお、主軸回転中か否かはステップ75でセットしステップ91およびステップ92でクリアする主軸回転中情報を基に判断する。つまり、主軸回転中情報がセットされていれば主軸回転中、主軸回転中情報がクリアされていれば主軸停止中と判定する。ステップ74では解析したブロックに主軸回転指令が含まれているか否かを判定し、含まれていなければ解析終了となる。主軸回転が含まれていればステップ75に進み、主軸回転中情報をセットする。
Next, the detailed operation of the program prefetch analysis means 61 will be described with reference to FIG.
First, in step 71, one block is read from the machining program, and the block read in step 72 is analyzed. In step 73, it is determined whether or not the current block is rotating. If it is rotating, the process proceeds to step 82. If not rotating, the process proceeds to step 74. Whether or not the spindle is rotating is determined based on the spindle rotating information set in step 75 and cleared in steps 91 and 92. That is, it is determined that the main spindle is rotating while the main spindle rotating information is set, and that the main spindle is stopped if the main spindle rotating information is cleared. In step 74, it is determined whether or not a spindle rotation command is included in the analyzed block. If it is not included, the analysis ends. If the spindle rotation is included, the process proceeds to step 75, and the spindle rotating information is set.

主軸回転指令は一般的にはM3で正転、M4で逆転であり、前述の加工プログラムBではN0403ブロックのM3が主軸回転指令となる。   The spindle rotation command is generally forward rotation at M3 and reverse rotation at M4. In the machining program B described above, M3 in the N0403 block is the spindle rotation command.

ステップ76では後に算出する切削開始までの時間データを初期化する。   In step 76, time data until the start of cutting calculated later is initialized.

ステップ77で加工プログラムに次ブロックがあるかどうか判定し、次ブロックがなければ解析終了となる。次ブロックがあればステップ78でステップ71と同様に次ブロックを読み込み、ステップ79でステップ72と同様に1ブロック解析を行う。ステップ80で解析したブロックに主軸停止指令があるかどうか判定し、主軸停止指令があればステップ91で上記主軸回転中情報をクリアして解析終了となる。主軸停止指令は一般的にはM5が使用され、前述の加工プログラムBではN0412ブロックのM5がそれに当たる。   In step 77, it is determined whether or not there is a next block in the machining program. If there is no next block, the analysis ends. If there is a next block, the next block is read in the same manner as in step 71 in step 78, and one block analysis is performed in step 79 as in step 72. It is determined whether or not there is a spindle stop command in the block analyzed in step 80. If there is a spindle stop command, in step 91, the above spindle rotation information is cleared and the analysis ends. In general, M5 is used as the spindle stop command, and M5 in the N0412 block corresponds to the machining program B described above.

主軸停止指令がなければステップ81で切削送りかどうか判定し、切削送りでなければステップ82に進む。切削送りであれば解析終了となる。ステップ82ではそのブロックの実行時間を算出し、先読みバッファ2に記憶しておく。以降ステップ77からステップ82を繰り返し実行しブロック実行時間を累積していく。   If there is no spindle stop command, it is determined in step 81 whether or not the cutting feed is made. If it is a cutting feed, the analysis ends. In step 82, the execution time of the block is calculated and stored in the prefetch buffer 2. Thereafter, step 77 to step 82 are repeatedly executed to accumulate the block execution time.

前述の加工プログラムBではN0403で主軸回転指令されてから、N0406で切削開始する前、つまりN0405の位置決め時間までが、ブロック実行時間として格納されることになる。   In the above-described machining program B, the block execution time is stored after the spindle rotation command is issued at N0403 and before the cutting is started at N0406, that is, until the positioning time of N0405.

一方、ステップ83では解析したブロックが早送りなどの非切削ブロックであるかどうか判定し、非切削ブロックでなければ解析終了となる。これは主軸回転中で切削ブロックが続いているので主軸を回転させたままとなることを示している。解析したブロックが非切削ブロックであった場合はステップ84で主軸停止時間を初期化する。前述の加工プログラムBではN0407などがこれに該当する。ステップ85で次ブロックがあるか否か判定し、次ブロックがあればステップ86へ進み、なければ解析終了となる。ステップ86およびステップ87ではステップ71およびステップ72と同様に1ブロック読み込みおよび1ブロック解析処理を行う。ステップ88で主軸停止指令(一般的にはM5)が含まれているかどうか判定し、主軸停止指令が含まれていればステップ92で主軸回転中情報をクリアし、さらにステップ93で主軸停止時間をクリアして解析終了する。主軸停止指令が含まれていなければステップ89に進む。ステップ89では解析したブロックが切削送りであるか否かを判定し、含まれていなければステップ90に進み、含まれていれば解析終了となる。ステップ90ではそのブロックの実行時間、主軸停止時間をブロック実行時間として先読みバッファ2に記憶しておく。以降ステップ85からステップ90を繰り返し実行し主軸停止時間を蓄積していく。   On the other hand, in step 83, it is determined whether or not the analyzed block is a non-cutting block such as fast-forwarding. If it is not a non-cutting block, the analysis ends. This indicates that the spindle remains rotated because the cutting block continues while the spindle is rotating. If the analyzed block is a non-cutting block, the spindle stop time is initialized at step 84. In the above-described machining program B, N0407 corresponds to this. In step 85, it is determined whether or not there is a next block. If there is a next block, the process proceeds to step 86, and if not, the analysis ends. In step 86 and step 87, one block reading and one block analysis processing are performed as in step 71 and step 72. In Step 88, it is determined whether or not a spindle stop command (generally M5) is included. If a spindle stop command is included, the information indicating that the spindle is rotating is cleared in Step 92, and the spindle stop time is further determined in Step 93. Clear and finish analysis. If the spindle stop command is not included, the process proceeds to step 89. In step 89, it is determined whether or not the analyzed block is a cutting feed. If not included, the process proceeds to step 90, and if included, the analysis ends. In step 90, the execution time of the block and the spindle stop time are stored in the prefetch buffer 2 as the block execution time. Thereafter, Step 85 to Step 90 are repeatedly executed to accumulate the spindle stop time.

前述の加工プログラムBではN0407,N0408,N0409ブロックの実行時間が主軸停止時間として格納される。つまり主軸停止時間は、主軸回転中の切削ブロックと切削ブロックに挟まれた早送りなどの切削以外のブロックの実行時間となる。   In the machining program B described above, the execution times of the N0407, N0408, and N0409 blocks are stored as the spindle stop time. That is, the spindle stop time is the execution time of blocks other than cutting, such as fast-feeding between the cutting block and the cutting block that are rotating the spindle.

次に主軸起動タイミング計算手段63の詳細な動作について第9図を用いて説明する。   Next, the detailed operation of the spindle start timing calculation means 63 will be described with reference to FIG.

なお、本処理が最初に起動されるまでの間に、本図に示される(A)ブロック実行時間は初期化(0クリア)されており、また、(A)ブロック実行時間はこの発明による数値制御装置内のメモリ(図示せず)に記憶される。   It should be noted that (A) the block execution time shown in the figure is initialized (cleared to 0) until this processing is first started, and (A) the block execution time is a numerical value according to the present invention. It is stored in a memory (not shown) in the control device.

まず、ステップ41で第一回目の処理か否かを判定する。ここでは(A)ブロック実行時間が0であるとき第一回目の処理とし、0でないとき第二回目以降の処理と判定している。   First, in step 41, it is determined whether or not it is the first processing. Here, (A) when the block execution time is 0, it is determined as the first process, and when it is not 0, it is determined as the second and subsequent processes.

第一回目の処理であれば、ステップ42で先読みバッファ2中の現在実行中のブロック情報に格納されたブロック実行時間を読み出し、(A)ブロック実行時間として記憶する。
なお、ここでいうブロック実行時間とは、プログラム先読解析手段61にて第8図のステップ82にて算出・累積されたブロック実行時間を指す。
If it is the first process, the block execution time stored in the block information currently being executed in the prefetch buffer 2 is read in step 42 and stored as (A) block execution time.
The block execution time here refers to the block execution time calculated and accumulated in step 82 in FIG.

次にステップ43でTa(=(A)ブロック実行時間−主軸加速時間(主軸起動から主軸回転指令による主軸回転数に達するまでの加速時間)を求める。なお、主軸の加速時間は、主軸加減速時間推定手段64にて実施の形態1で説明した方法と同様の方法で推定されている。   Next, in step 43, Ta (= (A) block execution time−spindle acceleration time (acceleration time from the start of the main shaft until the main shaft rotation speed is reached) is calculated. The main shaft acceleration time is the main shaft acceleration / deceleration. The time estimation means 64 is estimated by a method similar to the method described in the first embodiment.

次にステップ44でTaが0以下か否か判定し、否であれば、ステップ45で(A)ブロック実行時間から補間時間を引いたものを、新しい(A)ブロック実行時間として上記メモリに記憶し、ステップ41に戻る。第二回目以降はステップ45にて記憶した(A)ブロック実行時間のデータが上記メモリに格納されており(A)ブロック実行時間が0でないので、ステップ41にて第二回目以降の処理と判断され、このデータを元にステップ43以降を実行する。   Next, in step 44, it is determined whether Ta is 0 or less. If not, in step 45, the value obtained by subtracting the interpolation time from (A) block execution time is stored in the memory as a new (A) block execution time. Then, the process returns to step 41. In the second and subsequent times, since the (A) block execution time data stored in step 45 is stored in the memory and (A) the block execution time is not 0, it is determined in step 41 that the second and subsequent processing is performed. Then, step 43 and subsequent steps are executed based on this data.

ステップ44でTaが0以下であれば、ステップ46Aで、速度データ出力手段8を起動し、主軸を起動する。主軸はある加速時間をもって指令速度に到達するので、切削送りブロック開始時点でちょうど指令した主軸回転数に到達することになる。
最後にステップ47で(A)ブロック実行時間を0クリアし、本処理を終了する。
主軸起動タイミング計算手段63はあるサンプリング周期で周期的に処理され、上記の処理を繰り返す。
If Ta is 0 or less at step 44, the speed data output means 8 is activated and the spindle is activated at step 46A. Since the spindle reaches the command speed with a certain acceleration time, it reaches the spindle speed just commanded at the start of the cutting feed block.
Finally, in step 47, (A) the block execution time is cleared to 0, and this process is terminated.
The spindle activation timing calculation means 63 is periodically processed at a certain sampling period and repeats the above processing.

なお、本実施の形態2ではプログラム先読解析手段61でブロックの実行時間を算出するようにしたが、この実施の形態においても実施の形態1と同様にこの実行時間の代わりに、実行時間を主軸起動タイミング計算手段63のサンプリング周期で除した値、即ち主軸起動タイミング計算手段63のサンプリング回数としても良い。例えば実行時間を300ms、主軸起動タイミング計算手段63のサンプリング周期を10msとすると、サンプリング回数は300/10=30(回)となる。更に第9図に示されている、主軸加速時間、(A)ブロック実行時間、補間時間など時間を示すデータをすべて主軸起動タイミング計算手段63のサンプリング回数に変換して第9図に置き換えると、例えばステップ45で「補間時間を減ずる」とは、補間時間が10msのため1だけ減ずることになり、またサンプリング回数変換以降の全ての計算を端数のない整数による減算処理だけとなり、よって処理が簡単になりソフトウエア処理する上で扱いやすくなる。   In the second embodiment, the execution time of the block is calculated by the program prefetch analysis means 61. However, in this embodiment, instead of this execution time, the execution time is changed to the execution time as in the first embodiment. The value divided by the sampling period of the spindle activation timing calculation unit 63, that is, the number of samplings of the spindle activation timing calculation unit 63 may be used. For example, if the execution time is 300 ms and the sampling period of the spindle activation timing calculation means 63 is 10 ms, the number of samplings is 300/10 = 30 (times). Furthermore, when all the data indicating the spindle acceleration time, (A) block execution time, interpolation time, and the like shown in FIG. 9 are converted into the number of sampling times of the spindle start timing calculation means 63 and replaced with FIG. For example, “decrease the interpolation time” in step 45 means that the interpolation time is reduced by 1 because the interpolation time is 10 ms, and all the calculations after the conversion of the number of samplings are only subtraction processing with a fractional integer, and thus the processing is simple. It becomes easy to handle in software processing.

また、前記サンプリング回数変換時に端数が生じる場合があるが、この場合には切上げ、または切下げ処理して端数のない整数にしておく。   A fraction may be generated during the conversion of the number of samplings. In this case, rounding up or down processing is performed to make an integer without a fraction.

次に主軸停止タイミング計算手段62の詳細な動作について第10図を用いて説明する。
まずステップ801で現在実行中のブロックに主軸停止命令があるかどうか判定する。主軸停止命令があればステップ806で主軸を停止させて処理を終了する。
Next, the detailed operation of the spindle stop timing calculating means 62 will be described with reference to FIG.
First, in step 801, it is determined whether there is a spindle stop command in the block currently being executed. If there is a spindle stop command, the spindle is stopped at step 806 and the process is terminated.

主軸停止命令がなければステップ802で現在実行中のブロックが非切削ブロックか否かを判定し、非切削ブロックでない、即ち切削ブロックであればそのまま処理を終了し主軸を回転させたままとする。非切削ブロックであればステップ803に進み、主軸停止時間データがあるかどうか判定する。主軸停止時間とは第8図のステップ90で計算された時間であり、主軸回転中に位置決め等で切削送りが一時的に途切れる場合にその途切れる時間が格納されている。主軸停止時間データはない場合は、切削送りが連続しているか、主軸が回転していないことを示し、主軸停止制御の必要がない。そのためステップ803で主軸停止時間データがない場合(つまり主軸停止時間が0の時)はそのまま何もせず本処理を終了する。   If there is no spindle stop command, it is determined in step 802 whether or not the block currently being executed is a non-cutting block. If it is not a non-cutting block, that is, if it is a cutting block, the process is terminated and the spindle is kept rotating. If it is a non-cutting block, the process proceeds to step 803 to determine whether there is spindle stop time data. The spindle stop time is the time calculated in step 90 of FIG. 8, and stores the time when the cutting feed is temporarily interrupted due to positioning or the like while the spindle is rotating. When there is no spindle stop time data, it indicates that the cutting feed is continuous or the spindle is not rotating, and there is no need for spindle stop control. Therefore, if there is no spindle stop time data in step 803 (that is, when the spindle stop time is 0), this process is terminated without doing anything.

ステップ803で主軸停止時間データが格納されている場合はステップ804に進む。ステップ804では主軸停止時間と主軸加減速時間推定手段64で演算された主軸加減速時間(=主軸加速時間+主軸減速時間)とを比較し、主軸停止時間の方が主軸加速時間よりも長ければステップ805で主軸を停止させる。さらにステップ806では第8図のステップ75で記憶した主軸回転中情報をクリアして本処理を終了する。ステップ804で主軸停止時間が主軸加減速時間以下であると判定した場合は主軸を停止させずに本処理を終了する。   If spindle stop time data is stored in step 803, the process proceeds to step 804. In step 804, the spindle stop time is compared with the spindle acceleration / deceleration time (= spindle acceleration time + spindle deceleration time) calculated by the spindle acceleration / deceleration time estimation means 64, and if the spindle stop time is longer than the spindle acceleration time. In step 805, the spindle is stopped. Further, at step 806, the main spindle rotating information stored at step 75 in FIG. 8 is cleared, and this process is terminated. If it is determined in step 804 that the main shaft stop time is equal to or shorter than the main shaft acceleration / deceleration time, this processing is terminated without stopping the main shaft.

なお、第10図においても、主軸停止時間、主軸加減速時間の代わりに、主軸停止時間、主軸加減速時間を主軸停止タイミング計算手段62のサンプリング周期で除した値、即ち主軸停止タイミング計算手段62のサンプリング回数を用いてもよい。   Also in FIG. 10, instead of the spindle stop time and the spindle acceleration / deceleration time, the value obtained by dividing the spindle stop time and the spindle acceleration / deceleration time by the sampling period of the spindle stop timing calculation means 62, that is, the spindle stop timing calculation means 62. May be used.

第11図は前述のように主軸回転数を制御した場合の主軸回転数の変化を示した説明図である。この図から明らかなように、従来は破線で示すように主軸回転指令がなされてから主軸停止指令がなされるまで主軸は回転したままであった。しかしこの実施の形態2により、主軸回転指令がなされてから実際に主軸が起動されるタイミングは、ちょうど切削が開始される時に指令速度に到達するように制御され、また、主軸回転中に切削指令が途切れる場合は主軸回転を一時的に休止し、次回切削が開始されるタイミングで再び主軸が指令速度に到達するように制御されるようになる。   FIG. 11 is an explanatory diagram showing changes in the spindle rotational speed when the spindle rotational speed is controlled as described above. As is apparent from this figure, conventionally, as shown by the broken line, the main shaft has been rotated from the main shaft rotation command to the main shaft stop command. However, according to the second embodiment, the timing at which the spindle is actually started after the spindle rotation command is issued is controlled so as to reach the command speed when the cutting is started, and the cutting command is executed during the spindle rotation. Is interrupted, the spindle rotation is temporarily stopped, and the spindle is controlled to reach the command speed again at the next cutting start timing.

よって、加工に寄与しない位置決め等のブロックにおいて、主軸の回転を行わないので、無駄に電力を消費することがなくなる。   Therefore, since the spindle is not rotated in a positioning block that does not contribute to machining, power is not wasted.

なお、実施の形態2において、主軸回転指令がされてから切削送りが開始されるまでの実行時間の計算を、プログラム先読解析手段61にて行うものについて説明したが、プログラム先読解析手段61以外の手段で行っても初期の目的は達成できる。
また、実施の形態2においては、主軸回転指令による消費電力の節減を最大にするため、主軸回転指令から、主軸回転指令がされてから切削送りが開始されるまでの実行時間より主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間を減算した時間が経過したとき、主軸を起動するものについて説明したが、前記減算した時間より前の所定時間が経過したとき、主軸を起動しても初期の目的は達成できる。
In the second embodiment, the calculation of the execution time from when the spindle rotation command is issued until the cutting feed is started is described by the program prefetch analysis means 61. However, the program prefetch analysis means 61 has been described. The initial purpose can be achieved even by using other means.
Further, in the second embodiment, in order to maximize the power consumption reduction by the spindle rotation command, the spindle is started from the spindle starting from the execution time until the cutting feed is started after the spindle rotation command is issued. Explained what started the spindle when the time that the spindle acceleration time until reaching the spindle rotation speed by the rotation command has elapsed has been explained, but starts the spindle when a predetermined time before the subtracted time has passed Even so, the initial goal can be achieved.

また、この実施の形態2は、実施の形態1と組み合わせて使用できることは言うまでもない。   Needless to say, the second embodiment can be used in combination with the first embodiment.

以上のようにこの発明によれば、1ブロック以上の先読み解析を行い、この先読み解析された結果に基づいて、前記周速一定制御機能の起動タイミングを制御するので、所定の条件を満たすとき、周速一定指令がされてから所定時間経過するまで周速一定制御を行わない制御を行うことができ、よって周速一定制御実行による無駄な消費電力を節約できるという効果がある。   As described above, according to the present invention, the prefetch analysis of one block or more is performed, and the start timing of the constant peripheral speed control function is controlled based on the result of the prefetch analysis. Control that does not perform constant peripheral speed control can be performed until a predetermined time elapses after a constant peripheral speed command is issued, and thus there is an effect that unnecessary power consumption due to execution of constant peripheral speed control can be saved.

またこの発明によれば、周速一定指令から、周速一定指令がされてから切削送りが開始されるまでの実行時間より周速一定指令前の主軸回転数から周速一定指令による切削開始時点の主軸回転数に到達するまでの主軸到達時間を減算した時間が経過したとき、前記周速一定制御機能を起動するので、切削開始時にちょうど主軸が指令周速に到達することができ、よって切削に支障をきたすことなく、消費電力を最大限節約することができるという効果がある。   Further, according to the present invention, from the constant circumferential speed command to the cutting start time by the constant circumferential speed command from the spindle speed before the constant circumferential speed command from the execution time from when the constant circumferential speed command is issued until the cutting feed is started. Since the peripheral speed constant control function is activated when the time obtained by subtracting the spindle arrival time until the spindle speed reaches the spindle rotational speed, the spindle can reach the commanded peripheral speed at the start of cutting. There is an effect that the power consumption can be saved as much as possible without causing any trouble.

またこの発明によれば、周速一定指令がされてから切削送りが開始されるまでの実行時間、及び周速一定指令前の主軸回転数から周速一定指令による主軸回転数に到達するまでの主軸到達時間(または周速一定指令前の主軸回転数から周速一定指令による切削開始時点の主軸回転数に到達するまでの主軸到達時間)として、ソフトウエアのサンプリング回数に変換したものを用いるので、ソフトウエア処理がし易くなり、CPUの負担が少なくなるという効果がある。   Further, according to the present invention, the execution time from when the circumferential speed constant command is issued until the cutting feed is started, and from the spindle speed before the constant circumferential speed command until the spindle speed according to the constant circumferential speed command is reached. Since the spindle arrival time (or the spindle arrival time from the spindle speed before the constant peripheral speed command to the spindle speed at the start of cutting by the constant peripheral speed command) converted to the number of software samplings is used The software processing is facilitated and the burden on the CPU is reduced.

またこの発明によれば、前記主軸到達時間を、主軸の加速曲線または減速曲線を複数本の直線で近似し、この直線の式に基づいて推定するので、任意の主軸回転数までの主軸到達時間を単純な式で導き出せ、ひいてはCPUの負担が少なくなるという効果がある。   Further, according to the present invention, the spindle arrival time is estimated based on an equation of the straight line by approximating the acceleration curve or deceleration curve of the spindle, and the spindle arrival time up to an arbitrary spindle rotation speed Can be derived by a simple expression, which in turn reduces the burden on the CPU.

またこの発明によれば、1ブロック以上の先読み解析を行い、この先読み解析された結果に基づいて、主軸の起動タイミングを制御するので、所定の条件を満たすとき、主軸回転指令がされてから所定時間経過するまで主軸を停止させておくように主軸を制御することができ、よって非切削ブロックで主軸を回転させておくことによる無駄な消費電力を節約できるという効果がある。   Further, according to the present invention, the pre-reading analysis of one block or more is performed, and the start timing of the spindle is controlled based on the result of the pre-reading analysis. The main shaft can be controlled so that the main shaft is stopped until time elapses. Therefore, there is an effect that unnecessary power consumption can be saved by rotating the main shaft with a non-cutting block.

またこの発明によれば、主軸回転指令から、主軸回転指令がされてから切削送りが開始されるまでの実行時間より主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間を減算した時間が経過したとき、主軸を起動するので、切削開始時にちょうど主軸が指令速度に到達することができ、よって切削に支障をきたすことなく、消費電力を最大限節約することができるという効果がある。   Further, according to the present invention, the spindle acceleration time from the start of the spindle until the spindle speed is reached by the spindle rotation command is subtracted from the execution time from the spindle rotation command to the start of cutting feed from the spindle rotation command. Since the spindle is started when the elapsed time elapses, the spindle can reach the command speed at the start of cutting, and therefore the power consumption can be saved to the maximum without impeding cutting. is there.

またこの発明によれば、主軸回転指令がされてから切削送りが開始されるまでの実行時間、及び主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間として、ソフトウエアのサンプリング回数に変換したものを用いるので、ソフトウエア処理がし易くなり、CPUの負担が少なくなるという効果がある。   Further, according to the present invention, software sampling is performed as the execution time from when the spindle rotation command is issued until the cutting feed is started, and the spindle acceleration time from the start of the spindle until the spindle speed is reached by the spindle rotation command. Since the data converted into the number of times is used, the software processing is facilitated, and the burden on the CPU is reduced.

またこの発明によれば、前記主軸加速時間を、主軸の加速曲線または減速曲線を複数本の直線で近似し、この直線の式に基づいて推定するので、任意の主軸回転数までの加速時間を単純な式で導き出せ、ひいてはCPUの負担が少なくなるという効果がある。   Further, according to the present invention, the spindle acceleration time is estimated based on an equation of the straight line by approximating the acceleration curve or deceleration curve of the spindle, and the acceleration time up to an arbitrary spindle rotation speed can be calculated. There is an effect that it can be derived by a simple expression and the burden on the CPU is reduced.

またこの発明によれば、主軸回転指令中に所定の条件を満たすとき、主軸を停止させるので、無駄に主軸を回転させることがなく、消費電力を節約できるという効果がある。   Further, according to the present invention, when the predetermined condition is satisfied during the spindle rotation command, the spindle is stopped, so that there is an effect that power consumption can be saved without rotating the spindle unnecessarily.

またこの発明によれば、主軸回転中に非切削ブロックでなくなったときに、次に切削を開始するまでの時間、即ち主軸停止時間と、主軸加減速時間を比較し、主軸加減速時間の方が長いときは主軸を停止させないので、無駄に主軸を回転させることがなく、消費電力を節約でき、しかも切削開始時に主軸の速度到達を待ってサイクルタイムが延びてしまうといったことがなく、最適な主軸制御を行うことができるという効果がある。   Further, according to the present invention, when the non-cutting block disappears during the spindle rotation, the time until the next cutting is started, that is, the spindle stop time is compared with the spindle acceleration / deceleration time, and the spindle acceleration / deceleration time is compared. Since the spindle is not stopped when it is long, the spindle is not rotated unnecessarily, power consumption can be saved, and the cycle time is not extended by waiting for the spindle to reach the speed at the start of cutting. There is an effect that spindle control can be performed.

またこの発明によれば、前記主軸加減速時間を、主軸の加速曲線または減速曲線を複数本の直線で近似し、この直線の式に基づいて推定するので、任意の主軸回転数までの加減速時間を単純な式で導き出せ、ひいてはCPUの負担が少なくなるという効果がある。   Further, according to the present invention, the spindle acceleration / deceleration time is estimated based on the equation of the straight line by approximating the acceleration curve or deceleration curve of the main spindle, so that the acceleration / deceleration up to an arbitrary spindle speed is achieved. There is an effect that the time can be derived by a simple expression and the burden on the CPU is reduced.

またこの発明によれば、1ブロック以上の先読み解析を行い、この先読み解析された結果に基づいて前記周速一定制御機能の起動タイミングを制御するので、所定の条件を満たすとき周速一定指令がされてから所定時間経過するまで周速一定制御を行わない制御を行うことができ、また先読み解析された結果に基づいて主軸の起動タイミングを制御するので、所定の条件を満たすとき主軸回転指令がされてから所定時間経過するまで主軸を停止させておくように主軸を制御することができ、よって周速一定制御実行による無駄な消費電力、及び非切削ブロックで主軸を回転させておくことによる無駄な消費電力を節約できるという効果がある。   According to the present invention, pre-read analysis of one block or more is performed, and the start timing of the constant peripheral speed control function is controlled based on the result of the pre-read analysis. Until the predetermined time elapses, control is performed without constant peripheral speed control, and the spindle start-up timing is controlled based on the result of the look-ahead analysis. The main shaft can be controlled so that the main shaft is stopped until a predetermined time has elapsed since then, so that unnecessary power consumption due to execution of constant peripheral speed control and waste due to rotation of the main shaft in a non-cutting block This has the effect of saving significant power consumption.

またこの発明によれば、周速一定指令から、周速一定指令がされてから切削送りが開始されるまでの実行時間より周速一定指令前の主軸回転数から周速一定指令による切削開始時点の主軸回転数に到達するまでの主軸到達時間を減算した時間が経過したとき、前記周速一定制御機能を起動するので、切削開始時にちょうど主軸が指令周速に到達することができ、また主軸回転指令から、主軸回転指令がされてから切削送りが開始されるまでの実行時間より主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間を減算した時間が経過したとき、主軸を起動するので、切削開始時にちょうど主軸が指令速度に到達することができ、よって切削に支障をきたすことなく、消費電力を最大限節約することができるという効果がある。   Further, according to the present invention, from the constant circumferential speed command to the cutting start time by the constant circumferential speed command from the spindle speed before the constant circumferential speed command from the execution time from when the constant circumferential speed command is issued until the cutting feed is started. Since the peripheral speed constant control function is activated when the time obtained by subtracting the spindle arrival time to reach the spindle speed of the spindle has elapsed, the spindle can reach the command peripheral speed at the start of cutting. When the time obtained by subtracting the spindle acceleration time from the start of the spindle until reaching the spindle speed according to the spindle rotation command from the execution time from when the spindle rotation command is issued until cutting feed is started is Therefore, the spindle can reach the command speed at the start of cutting, so that the power consumption can be saved to the maximum without impeding cutting. .

またこの発明によれば、1ブロック以上の先読み解析を行い、この先読み解析された結果に基づいて前記周速一定制御機能の起動タイミングを制御するので、所定の条件を満たすとき周速一定指令がされてから所定時間経過するまで周速一定制御を行わない制御を行うことができ、また主軸回転中に所定の条件を満たすとき、主軸を停止させるので、無駄に主軸を回転させることがなく、消費電力を節約できるという効果がある。   According to the present invention, pre-read analysis of one block or more is performed, and the start timing of the constant peripheral speed control function is controlled based on the result of the pre-read analysis. It is possible to perform control that does not perform constant peripheral speed control until a predetermined time has elapsed since it is done, and when the predetermined condition is satisfied during spindle rotation, the spindle is stopped, so that the spindle is not rotated unnecessarily, There is an effect that power consumption can be saved.

またこの発明によれば、周速一定指令から、周速一定指令がされてから切削送りが開始されるまでの実行時間より周速一定指令前の主軸回転数から周速一定指令による切削開始時点の主軸回転数に到達するまでの主軸到達時間を減算した時間が経過したとき、前記周速一定制御機能を起動するので、また主軸回転中に非切削ブロックでなくなったときに、次に切削を開始するまでの時間、即ち主軸停止時間と、主軸加減速時間を比較し、主軸加減速時間の方が長いときは主軸を停止させないので、切削に支障をきたすことなく、消費電力を最大限節約することができ、しかも切削開始時に主軸の速度到達を待ってサイクルタイムが延びてしまうといったことがなく、最適な主軸制御を行うことができるという効果がある。   Further, according to the present invention, from the constant circumferential speed command to the cutting start time by the constant circumferential speed command from the spindle speed before the constant circumferential speed command from the execution time from when the constant circumferential speed command is issued until the cutting feed is started. When the time to subtract the main shaft arrival time until the main shaft rotation speed is reached, the constant peripheral speed control function is activated, and when the non-cutting block disappears during main shaft rotation, the next cutting is performed. Comparing the time to start, that is, spindle stop time and spindle acceleration / deceleration time. If the spindle acceleration / deceleration time is longer, the spindle will not be stopped. In addition, there is an effect that the optimum spindle control can be performed without waiting for the spindle speed to be reached at the start of cutting and extending the cycle time.

またこの発明によれば、先読み解析された結果に基づいて主軸の起動タイミングを制御するので、所定の条件を満たすとき主軸回転指令がされてから所定時間経過するまで主軸を停止させておくように主軸を制御することができ、また主軸回転中に所定の条件を満たすとき主軸を停止させるので、無駄に主軸を回転させることがなく、消費電力を節約できるという効果がある。   Further, according to the present invention, since the start timing of the spindle is controlled based on the result of the pre-read analysis, the spindle is stopped until a predetermined time elapses after the spindle rotation command is issued when a predetermined condition is satisfied. Since the main shaft can be controlled and the main shaft is stopped when a predetermined condition is satisfied during the main shaft rotation, the main shaft is not rotated unnecessarily, and power consumption can be saved.

またこの発明によれば、主軸回転指令から、主軸回転指令がされてから切削送りが開始されるまでの実行時間より主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間を減算した時間が経過したとき、主軸を起動するので、切削開始時にちょうど主軸が指令速度に到達することができ、また主軸回転中に非切削ブロックでなくなったときに、次に切削を開始するまでの時間、即ち主軸停止時間と、主軸加減速時間を比較し、主軸加減速時間の方が長いときは主軸を停止させないので、切削に支障をきたすことなく、消費電力を最大限節約することができ、しかも切削開始時に主軸の速度到達を待ってサイクルタイムが延びてしまうといったことがなく、最適な主軸制御を行うことができるという効果がある。   Further, according to the present invention, the spindle acceleration time from the start of the spindle until the spindle speed is reached by the spindle rotation command is subtracted from the execution time from the spindle rotation command to the start of cutting feed from the spindle rotation command. Since the spindle is activated when the specified time has elapsed, the spindle can reach the command speed at the start of cutting, and when it is no longer a non-cutting block during spindle rotation, Compare the spindle stop time with the spindle acceleration / deceleration time, and if the spindle acceleration / deceleration time is longer, the spindle will not stop, so the power consumption can be saved to the maximum without hindering cutting. In addition, there is no effect that the spindle time can be optimally controlled without extending the cycle time waiting for the spindle speed to be reached at the start of cutting.

以上のように、この発明にかかる数値制御方法及びその装置は、周速一定制御機能等を有する数値制御装置において用いられるのに適している。   As described above, the numerical control method and apparatus according to the present invention are suitable for use in a numerical control apparatus having a constant peripheral speed control function and the like.

1 プログラム先読解析手段
2 バッファ
3 補間手段
4 加減速手段
5 位置データ出力手段
6 周速一定制御機能起動タイミング計算手段
7 周速一定演算手段
8 速度データ出力手段
9 主軸加速時間推定手段
61 プログラム先読解析手段
62 主軸停止タイミング計算手段
63 主軸起動タイミング計算手段
64 主軸加減速時間推定手段
101 プログラム解析手段
102 補間手段
103 加減速手段
104 位置データ出力手段
105 周速一定演算手段
106 速度データ出力手段
DESCRIPTION OF SYMBOLS 1 Program prefetch analysis means 2 Buffer 3 Interpolation means 4 Acceleration / deceleration means 5 Position data output means 6 Peripheral speed constant control function start timing calculation means 7 Peripheral speed constant calculation means 8 Speed data output means 9 Spindle acceleration time estimation means 61 Program destination Reading analysis means 62 Spindle stop timing calculation means 63 Spindle start timing calculation means 64 Spindle acceleration / deceleration time estimation means 101 Program analysis means 102 Interpolation means 103 Acceleration / deceleration means 104 Position data output means 105 Peripheral speed constant calculation means 106 Speed data output means

Claims (5)

主軸回転数を制御する機能を有した数値制御装置を制御する方法において、1ブロック以上の先読み解析を行い、この先読み解析された結果に基づいて、主軸回転指令がされてから切削送りが開始されるまでの実行時間、及び主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間を得、主軸回転指令がされた後で、かつ、主軸回転指令がされてから前記得られた実行時間より前記得られた主軸加速時間を減算した時間が経過する時までに、主軸を起動することを特徴とする数値制御方法。 In a method of controlling a numerical control device having a function of controlling the spindle rotation speed, one block or more of prefetch analysis is performed, and cutting feed is started after a spindle rotation command is issued based on the result of the prefetch analysis. And the spindle acceleration time from the start of the spindle until the spindle speed is reached by the spindle rotation command, and after the spindle rotation command is issued and after the spindle rotation command is issued A numerical control method , comprising: starting a spindle until a time obtained by subtracting the obtained spindle acceleration time from an execution time elapses . 主軸回転数を制御する機能を有した数値制御装置において、1ブロック以上の先読み解析を行うプログラム先読解析手段と、このプログラム先読解析手段にて先読み解析された結果に基づいて、主軸回転指令がされてから切削送りが開始されるまでの実行時間、及び主軸起動から主軸回転指令による主軸回転数に到達するまでの主軸加速時間を得る手段と、主軸回転指令がされた後で、かつ、主軸回転指令がされてから前記得られた実行時間より前記得られた主軸加速時間を減算した時間が経過する時までに、主軸を起動する主軸起動タイミング計算手段とを備えてなる数値制御装置。 In a numerical control device having a function of controlling the spindle rotational speed, a program prefetch analysis means for performing prefetch analysis of one block or more, and a spindle rotation command based on the result of the prefetch analysis by the program prefetch analysis means Means for obtaining the execution time from the start of the spindle until the cutting feed is started, and the spindle acceleration time from the start of the spindle until the spindle rotation speed is reached by the spindle rotation command, after the spindle rotation command is issued, and A numerical control device comprising: a spindle start timing calculation means for starting the spindle until a time obtained by subtracting the obtained spindle acceleration time from the obtained execution time after the spindle rotation command is issued . 前記主軸起動タイミング計算手段は、主軸回転指令がされてから前記実行時間より前記主軸加速時間を減算した時間が経過したとき、主軸を起動することを特徴とする請求の範囲第2項に記載の数値制御装置。 The spindle start timing calculation means starts the spindle when a time obtained by subtracting the spindle acceleration time from the execution time has elapsed since a spindle rotation command was issued. Numerical control unit. 前記実行時間及び主軸加速時間として、ソフトウエアのサンプリング回数に変換したものを用いることを特徴とする請求の範囲第2項に記載の数値制御装置。   The numerical control device according to claim 2, wherein the execution time and the spindle acceleration time are converted into software sampling times. 前記主軸加速時間は、主軸の加速曲線または減速曲線を複数本の直線で近似し、この直線の式に基づいて推定することを特徴とする請求の範囲第2項に記載の数値制御装置。   The numerical control device according to claim 2, wherein the spindle acceleration time is estimated based on an equation of a straight line obtained by approximating an acceleration curve or a deceleration curve of the spindle with a plurality of straight lines.
JP2011064985A 2011-03-23 2011-03-23 Numerical control method and apparatus Expired - Fee Related JP5211192B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011064985A JP5211192B2 (en) 2011-03-23 2011-03-23 Numerical control method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011064985A JP5211192B2 (en) 2011-03-23 2011-03-23 Numerical control method and apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2002520803A Division JP4823471B2 (en) 2001-02-22 2001-02-22 Numerical control method and apparatus

Publications (2)

Publication Number Publication Date
JP2011118952A JP2011118952A (en) 2011-06-16
JP5211192B2 true JP5211192B2 (en) 2013-06-12

Family

ID=44284113

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011064985A Expired - Fee Related JP5211192B2 (en) 2011-03-23 2011-03-23 Numerical control method and apparatus

Country Status (1)

Country Link
JP (1) JP5211192B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9798312B2 (en) 2012-05-15 2017-10-24 Mitsubishi Electric Corporation Numerical control device
JP5949434B2 (en) * 2012-10-23 2016-07-06 村田機械株式会社 Machine tool control device
JP6521565B2 (en) 2014-01-20 2019-05-29 Dmg森精機株式会社 NC program generation device considering power saving
JP6444933B2 (en) * 2016-04-25 2018-12-26 ファナック株式会社 Numerical control device that reduces power consumption in non-cutting state
JP7215883B2 (en) * 2018-11-19 2023-01-31 ファナック株式会社 Numerical controller
JP2021058992A (en) 2019-10-09 2021-04-15 ファナック株式会社 Numerical control device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6249515A (en) * 1985-08-29 1987-03-04 Mitsubishi Electric Corp Numerical controller
JP3512559B2 (en) * 1996-02-14 2004-03-29 三菱電機株式会社 Numerical control unit

Also Published As

Publication number Publication date
JP2011118952A (en) 2011-06-16

Similar Documents

Publication Publication Date Title
JP5211192B2 (en) Numerical control method and apparatus
WO2002067068A1 (en) Method of numeriacl control and apparatus for the same
JP4980458B2 (en) Machining time prediction device for numerically controlled machine tools
US8036770B2 (en) Numerical control unit with set amount of execution
US7167772B2 (en) Machining time calculating apparatus
JP5339999B2 (en) Numerical control device having interference check function
US10317876B2 (en) Numerical control device and control method for numerical control device
JP4261470B2 (en) Control device
US20140088755A1 (en) Numerical controller with inter-path waiting function
US10416613B2 (en) Machining time estimating apparatus
JP2011118840A (en) Numerical control device having motor load torque measuring function
WO2008053601A1 (en) Working control device, and its program
US9519280B2 (en) Numerical control device for machine tool
US6759825B2 (en) Control method and control apparatus for feed system
JP4823471B2 (en) Numerical control method and apparatus
CN109696879B (en) Numerical controller
JP2010009094A (en) Numerical control device having function of superimposing moving pulse used for high-speed cycle processing and nc program instruction
JP2004058190A (en) Machining time estimation method and device
JP6485950B2 (en) Numerical control system
JP2001312309A (en) Numerical control working machine and acceleration/ deceleration control method therefor
US9740196B2 (en) Numerical controller for controlling drilling operation
CN111185801A (en) Numerical controller
WO2024127673A1 (en) Numerical control device and computer-readable storage medium
JP7332375B2 (en) Control devices and control systems for machine tools
WO2023079589A1 (en) Control device and computer-readable recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110323

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120911

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121024

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130219

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130225

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160301

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees