JP6380119B2 - Numerical control device and control method - Google Patents

Numerical control device and control method Download PDF

Info

Publication number
JP6380119B2
JP6380119B2 JP2015008207A JP2015008207A JP6380119B2 JP 6380119 B2 JP6380119 B2 JP 6380119B2 JP 2015008207 A JP2015008207 A JP 2015008207A JP 2015008207 A JP2015008207 A JP 2015008207A JP 6380119 B2 JP6380119 B2 JP 6380119B2
Authority
JP
Japan
Prior art keywords
block
command
angle
interpolation
inter
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.)
Active
Application number
JP2015008207A
Other languages
Japanese (ja)
Other versions
JP2016133988A (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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2015008207A priority Critical patent/JP6380119B2/en
Publication of JP2016133988A publication Critical patent/JP2016133988A/en
Application granted granted Critical
Publication of JP6380119B2 publication Critical patent/JP6380119B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、数値制御装置と制御方法に関する。   The present invention relates to a numerical control device and a control method.

工作機械の数値制御装置は、NCプログラムで指令した経路に沿って工具又はワークを移動して加工を行う。その際、数値制御装置は自動的に滑らかな加減速を行い、工作機械の振動を抑える為の加減速制御を行う。加減速制御を行う時、ブロックとブロックの継ぎ目で一旦停止を行うとサイクルタイムが延びる。それ故、数値制御装置は一つ前のブロックの減速中に新たなブロックの加速を開始する制御方式を採用することで、サイクルタイムの短縮を図る。しかし、該方式では、継ぎ目部分のコーナで内回り誤差が発生するという問題点があった。そこで、特許文献1は、許容できるコーナの内回り誤差である許容誤差を予め定め、該許容誤差、加減速の加速度、コーナ角度に基づき、ブロックの継ぎ目部分で一つ前のブロックの減速と新たなブロックの加速が重なる重なり時間を求めるという方法を提案する。数値制御装置は、求めた重なり時間に基づき、新たなブロックの加速を開始することで、コーナで生じる誤差を許容誤差内にできる。   A numerical control device of a machine tool performs machining by moving a tool or a workpiece along a path designated by an NC program. At that time, the numerical control device automatically performs smooth acceleration / deceleration and performs acceleration / deceleration control for suppressing vibration of the machine tool. When acceleration / deceleration control is performed, the cycle time is extended once the block is stopped at the joint between the blocks. Therefore, the numerical controller adopts a control method that starts acceleration of a new block during the deceleration of the previous block, thereby reducing the cycle time. However, this method has a problem that an inward rotation error occurs at the corner of the joint. Therefore, Patent Document 1 predetermines an allowable error that is an allowable inner radius error of a corner, and based on the allowable error, acceleration / deceleration acceleration, and corner angle, the block at the joint of the block is decelerated and a new one is added. We propose a method to obtain the overlap time where the block acceleration overlaps. The numerical controller can start an acceleration of a new block based on the obtained overlap time, thereby making an error occurring in a corner within an allowable error.

特開平6−110534号公報JP-A-6-110534

微小なブロックが連続する経路では、ある一つのコーナで発生した内回り誤差が解消する前に、次のコーナに到達する時がある。特許文献1の方法で次のコーナの重なり時間を求め、該重なり時間に基づき、新たなブロックの加速を開始した時、コーナで生じる誤差が許容誤差を超える可能性がある。   In a path in which minute blocks are continuous, there are times when the next corner is reached before the inner loop error generated in one corner is resolved. When the overlap time of the next corner is obtained by the method of Patent Document 1 and acceleration of a new block is started based on the overlap time, there is a possibility that an error occurring in the corner exceeds the allowable error.

本発明の目的は、微小なブロックが連続する経路であっても、コーナで生じる誤差を許容誤差内に抑えることができる数値制御装置と制御方法を提供することである。   An object of the present invention is to provide a numerical control device and a control method capable of suppressing an error generated at a corner within an allowable error even in a path in which minute blocks are continuous.

本発明の請求項1に係る数値制御装置は、NCプログラムが指令する複数の指令点について隣接する指令点を補間して得られる経路に沿って工具又はワークを移動してワーク加工を実行する数値制御装置において、前記工具又はワークを移動するモータの加減速時定数と、前記経路に対して許容する許容誤差と、前記工具又はワークの移動速度を指令する指令速度と、前記経路のうち、前記NCプログラム中の今回の補間指令で補間する第一ブロックと、前回の補間指令で補間した第二ブロックの間の角度であるブロック間角度に基づき、前記モータに前記今回の補間指令を開始させる時機を演算する演算手段と、前記演算手段が演算した前記時機に基づき、前記モータに前記今回の補間指令を実行させる実行手段とを備え、前記演算手段は、前記ブロック間角度を演算するブロック間角度演算手段と、前記ブロック間角度演算手段が演算した前記ブロック間角度を補正する補正手段とを備え、前記補正手段は、前記第一ブロックよりも過去のブロックである過去ブロックの補間指令の開始点から、前記第一ブロックの補間指令の開始点までの範囲に属する全ブロックの夫々の補間指令の開始点と前記第一ブロックの前記補間指令の開始点とを相互に結ぶ複数の直線と、前記第一ブロックとが成す角度のうち最も小さい角度が前記ブロック間角度よりも小さい時、前記ブロック間角度を前記最も小さい角度に補正することを特徴とする。コーナで生じる誤差は、同一速度であればブロック間角度が小さければ小さいほど大きくなる。数値制御装置は、過去ブロックの補間指令の開始点から第一ブロックの補間指令の開始点までの間に属する全ブロックの補間指令の開始点を求め、全ブロックの補間指令の開始点と第一ブロックが成す角度で最も小さい角度を求める。最も小さい角度がブロック間角度よりも小さい時、数値制御装置は、ブロック間角度を最も小さい角度に補正し、その補正したブロック間角度を用いて今回の補間指令を開始する時機を演算する。それ故、数値制御装置は、微小なブロックが連続する経路であっても、過去ブロックで生じた誤差の影響を受けずに、コーナで生じる誤差を許容誤差内に制御できる。 A numerical control device according to claim 1 of the present invention is a numerical value for executing a workpiece machining by moving a tool or a workpiece along a path obtained by interpolating adjacent command points for a plurality of command points commanded by an NC program. In the control device, the acceleration / deceleration time constant of the motor that moves the tool or workpiece, the allowable error that is allowed for the path, the command speed that commands the moving speed of the tool or workpiece, and the path among the paths When the motor starts the current interpolation command based on the inter-block angle, which is the angle between the first block that is interpolated by the current interpolation command in the NC program and the second block that is interpolated by the previous interpolation command. And a calculation means for causing the motor to execute the current interpolation command based on the timing calculated by the calculation means, the calculation means comprising: An inter-block angle calculating means for calculating the inter-block angle; and a correcting means for correcting the inter-block angle calculated by the inter-block angle calculating means, wherein the correcting means is a block older than the first block. The interpolation command start point of all blocks belonging to the range from the start point of the interpolation command of the past block to the start point of the interpolation command of the first block, and the start point of the interpolation command of the first block and the straight line of multiple binding department mutually, when the smallest angle among angles formed between the first block is smaller than the inter-block angle, and characterized in that to correct the angle between the blocks in the smallest angle To do. The error generated at the corner increases as the angle between the blocks decreases at the same speed. The numerical controller obtains the start points of the interpolation commands for all blocks that belong between the start point of the interpolation command for the past block and the start point of the interpolation command for the first block. Find the smallest angle formed by blocks. When the smallest angle is smaller than the inter-block angle, the numerical controller corrects the inter-block angle to the smallest angle, and calculates the timing for starting the current interpolation command using the corrected inter-block angle. Therefore, the numerical control device can control the error generated in the corner within the allowable error without being affected by the error generated in the past block even in a path in which the minute blocks are continuous.

請求項2に係る発明の数値制御装置は、請求項1に記載の発明の構成に加え、前記過去ブロックは、前記第一ブロックの前記補間指令の開始点から前記加減速時定数の半分の時間前に遡った位置を含むブロックであることを特徴とする。一つのコーナに生じた誤差が解消する前に次のコーナに到達した時、該誤差は加減速時定数の半分の時間だけ残ることがある。数値制御装置は、加減速時定数の半分の時間前に遡った位置を含むブロックを過去ブロックとする。それ故、数値制御装置は、過去に生じた誤差の影響を受けることなく、経路中のコーナに生じる誤差を少なくとも許容誤差内に抑えることができる。   According to a second aspect of the present invention, in addition to the configuration of the first aspect of the invention, the past block is a time half the acceleration / deceleration time constant from the start point of the interpolation command of the first block. It is a block including a position traced back to the front. When the next corner is reached before the error generated in one corner is eliminated, the error may remain for half of the acceleration / deceleration time constant. The numerical control apparatus sets a block including a position traced back a half time before the acceleration / deceleration time constant as a past block. Therefore, the numerical control apparatus can suppress an error occurring in a corner in the path within at least an allowable error without being affected by an error occurring in the past.

請求項3に係る発明の数値制御装置は、請求項2に記載の発明の構成に加え、前記加減速時定数は複数であることを特徴とする。加減速時定数は複数であるので、補間指令に基づく移動速度の変化をより滑らかにできる。   According to a third aspect of the present invention, in addition to the configuration of the second aspect of the invention, the acceleration / deceleration time constant is plural. Since there are a plurality of acceleration / deceleration time constants, the movement speed change based on the interpolation command can be made smoother.

請求項4に係る発明の制御方法は、NCプログラムが指令する複数の指令点について隣接する指令点を補間して得られる経路に沿って工具又はワークを移動してワーク加工を実行する数値制御装置の制御方法において、前記工具又はワークを移動するモータの加減速時定数と、前記経路に対して許容する許容誤差と、前記工具又はワークの移動速度を指令する指令速度と、前記経路のうち、前記NCプログラム中の今回の補間指令で補間する第一ブロックと、前回の補間指令で補間した第二ブロックの間の角度であるブロック間角度に基づき、前記モータに前記今回の補間指令を開始させる時機を演算する演算工程と、前記演算工程で演算した前記時機に基づき、前記モータに前記今回の補間指令を実行させる実行工程とを備え、前記演算工程は、前記ブロック間角度を演算するブロック間角度演算工程と、前記ブロック間角度演算工程で演算した前記ブロック間角度を補正する補正工程とを備え、前記補正工程では、前記第一ブロックよりも過去のブロックである過去ブロックの補間指令の開始点から、前記第一ブロックの補間指令の開始点までの範囲に属する全ブロックの夫々の補間指令の開始点と前記第一ブロックの前記補間指令の開始点とを相互に結ぶ複数の直線と、前記第一ブロックとが成す角度のうち最も小さい角度が前記ブロック間角度よりも小さい時、前記ブロック間角度を前記最も小さい角度に補正することを特徴とする。それ故、数値制御装置は上記制御方法を行うことにより、請求項1に記載の効果を得ることができる。 According to a fourth aspect of the present invention, there is provided a numerical control apparatus for moving a tool or a workpiece along a path obtained by interpolating adjacent command points with respect to a plurality of command points commanded by an NC program and performing workpiece machining. In the control method, the acceleration / deceleration time constant of the motor that moves the tool or workpiece, the allowable error that is allowed for the path, the command speed that commands the moving speed of the tool or workpiece, and the path, Based on the inter-block angle, which is the angle between the first block to be interpolated with the current interpolation command in the NC program and the second block interpolated with the previous interpolation command, causes the motor to start the current interpolation command. A calculation step for calculating a timing, and an execution step for causing the motor to execute the current interpolation command based on the timing calculated in the calculation step. Comprises an inter-block angle calculation step for calculating the inter-block angle, and a correction step for correcting the inter-block angle calculated in the inter-block angle calculation step. The start point of the interpolation command of each block belonging to the range from the start point of the interpolation command of the past block that is the block to the start point of the interpolation command of the first block and the start of the interpolation command of the first block and the straight line multiple imaging department mutually point, when the smallest angle of the first block and is an angle less than the inter-block angle, to correct the angle between the blocks in the smallest angle Features. Therefore, the numerical control device can obtain the effect of the first aspect by performing the control method.

数値制御装置30と工作機械1の電気的構成を示すブロック図。FIG. 3 is a block diagram showing an electrical configuration of the numerical control device 30 and the machine tool 1. 移動速度を二段のFIRフィルタで処理した図。The figure which processed the moving speed with the two-stage FIR filter. メイン処理の流れ図。The flowchart of the main process. 誤差一定制御処理の流れ図。The flowchart of an error fixed control process. ブロック間角度補正処理の流れ図。The flowchart of the angle correction process between blocks. 直線補間ブロックB1と円弧補間ブロックB2で構成する経路の図。The figure of the path | route comprised by linear interpolation block B1 and circular interpolation block B2. 直線補間ブロックB1と円弧補間ブロックB2で構成する経路の図。The figure of the path | route comprised by linear interpolation block B1 and circular interpolation block B2. 円弧補間ブロックB1と直線補間ブロックB2で構成する経路の図。The figure of the path | route comprised by circular interpolation block B1 and linear interpolation block B2. 円弧補間ブロックB1と円弧補間ブロックB2で構成する経路の図。The figure of the path | route comprised by circular interpolation block B1 and circular interpolation block B2. 直線補間ブロックB1とB2で構成する経路の図。The figure of the path | route comprised by linear interpolation block B1 and B2. 図10に示す経路を移動する時の移動速度1と2の変化を示す図。The figure which shows the change of the moving speeds 1 and 2 when moving the path | route shown in FIG. コーナが連続する経路の図。A diagram of a continuous path of corners. 図12に示す経路を移動する時の移動速度と移動時間の関係を示す図。The figure which shows the relationship between the moving speed and moving time at the time of moving the path | route shown in FIG. 速度1と速度2の変化(T=0)を示す図。The figure which shows the change ( Td = 0) of the speed 1 and the speed 2. FIG. 速度1と速度2の変化(T≧t−t)を示す図。It shows changes in velocity 1 and speed 2 (T d ≧ t 1 -t 2 ). 速度1と速度2の変化(T=t+t)を示す図。Graph showing changes in speed 1 and speed 2 (T d = t 1 + t 2).

以下、本発明の実施形態を図面を参照し説明する。以下説明は、図中に矢印で示す上下、左右、前後、を使用する。数値制御装置30は工作機械1を制御しテーブル(図示略)上面に保持したワーク(図示略)の切削加工を行う。工作機械1の左右方向、前後方向、上下方向は、夫々X軸方向、Y軸方向、Z軸方向である。   Embodiments of the present invention will be described below with reference to the drawings. In the following description, the top, bottom, left and right, front and back indicated by arrows in the figure are used. The numerical control device 30 controls the machine tool 1 to cut a workpiece (not shown) held on the upper surface of a table (not shown). The left-right direction, the front-rear direction, and the vertical direction of the machine tool 1 are an X-axis direction, a Y-axis direction, and a Z-axis direction, respectively.

図1を参照し、工作機械1の構成を簡単に説明する。工作機械1は図示しない主軸機構、主軸移動機構、工具交換装置等を備える。主軸機構は主軸モータ52を備え、工具を装着した主軸を回転する。主軸移動機構は、Z軸モータ51、X軸モータ53、Y軸モータ54を備え、テーブル(図示略)上面に支持したワークに対し相対的に主軸をXYZの各軸方向に夫々移動する。工具交換装置はマガジンモータ55を備え、複数の工具を収納する工具マガジン(図示略)を駆動し、主軸に装着した工具を他の工具と交換する。工作機械1は操作盤10を更に備える。操作盤10は入力部24と表示部25を備える。入力部24は各種入力、指示、設定等を行う為の機器である。表示部25は各種画面を表示する機器である。操作盤10は数値制御装置30の入出力部35に接続する。Z軸モータ51はエンコーダ51Bを備える。主軸モータ52はエンコーダ52Bを備える。X軸モータ53はエンコーダ53Bを備える。Y軸モータ54はエンコーダ54Bを備える。マガジンモータ55はエンコーダ55Bを備える。エンコーダ51B〜55Bは数値制御装置30の後述する駆動回路51A〜55Aに各々接続する。   A configuration of the machine tool 1 will be briefly described with reference to FIG. The machine tool 1 includes a spindle mechanism, a spindle movement mechanism, a tool changer, and the like (not shown). The spindle mechanism includes a spindle motor 52, and rotates the spindle on which a tool is mounted. The main shaft moving mechanism includes a Z-axis motor 51, an X-axis motor 53, and a Y-axis motor 54, and moves the main shaft in each of the XYZ axial directions relative to a workpiece supported on the upper surface of a table (not shown). The tool changer includes a magazine motor 55, drives a tool magazine (not shown) that stores a plurality of tools, and exchanges the tool mounted on the spindle with another tool. The machine tool 1 further includes an operation panel 10. The operation panel 10 includes an input unit 24 and a display unit 25. The input unit 24 is a device for performing various inputs, instructions, settings, and the like. The display unit 25 is a device that displays various screens. The operation panel 10 is connected to the input / output unit 35 of the numerical controller 30. The Z-axis motor 51 includes an encoder 51B. The spindle motor 52 includes an encoder 52B. The X-axis motor 53 includes an encoder 53B. The Y-axis motor 54 includes an encoder 54B. The magazine motor 55 includes an encoder 55B. The encoders 51B to 55B are connected to drive circuits 51A to 55A, which will be described later, of the numerical control device 30, respectively.

図1を参照し、数値制御装置30の電気的構成を説明する。数値制御装置30は、CPU31、ROM32、RAM33、記憶装置34、入出力部35、駆動回路51A〜55A等を備える。CPU31は数値制御装置30を統括制御する。ROM32は、メインプログラム等の各種プログラムを記憶する。RAM33は各種処理実行中の各種データを記憶する。記憶装置34は不揮発性メモリである。入出力部35は操作盤10に接続する。駆動回路51AはZ軸モータ51とエンコーダ51Bに接続する。駆動回路52Aは主軸モータ52とエンコーダ52Bに接続する。駆動回路53AはX軸モータ53とエンコーダ53Bに接続する。駆動回路54AはY軸モータ54とエンコーダ54Bに接続する。駆動回路55Aはマガジンモータ55とエンコーダ55Bに接続する。駆動回路51A〜55AはCPU31から後述する駆動信号を受け、対応する各モータ51〜55に駆動電流(パルス)を夫々出力する。駆動回路51A〜55Aはエンコーダ51B〜55Bからフィードバック信号を受け、位置と速度のフィードバック制御を行う。駆動回路51A〜55Aは例えばFPGA回路でもよい。   The electrical configuration of the numerical control device 30 will be described with reference to FIG. The numerical control device 30 includes a CPU 31, a ROM 32, a RAM 33, a storage device 34, an input / output unit 35, drive circuits 51A to 55A, and the like. The CPU 31 performs overall control of the numerical control device 30. The ROM 32 stores various programs such as a main program. The RAM 33 stores various data during execution of various processes. The storage device 34 is a nonvolatile memory. The input / output unit 35 is connected to the operation panel 10. The drive circuit 51A is connected to the Z-axis motor 51 and the encoder 51B. The drive circuit 52A is connected to the spindle motor 52 and the encoder 52B. The drive circuit 53A is connected to the X-axis motor 53 and the encoder 53B. The drive circuit 54A is connected to the Y-axis motor 54 and the encoder 54B. The drive circuit 55A is connected to the magazine motor 55 and the encoder 55B. The drive circuits 51A to 55A receive drive signals described later from the CPU 31, and output drive currents (pulses) to the corresponding motors 51 to 55, respectively. The drive circuits 51A to 55A receive feedback signals from the encoders 51B to 55B and perform position and speed feedback control. The drive circuits 51A to 55A may be, for example, FPGA circuits.

図2を参照し、補間後加減速に用いる移動平均フィルタと時定数を説明する。数値制御装置30は、NCプログラム中の補間指令に基づき、X軸、Y軸、Z軸の駆動軸毎に、目標位置、移動距離、移動速度、移動時間等を夫々演算する。補間指令は、アドレスで指定した移動速度で軸を動かす時に使用する制御指令であり、例えば直線補間指令、円弧補間指令等である。数値制御装置30は、演算した駆動軸毎の移動速度に、移動平均フィルタ(以下、FIRフィルタと呼ぶ)を少なくとも二回以上通して速度変化を滑らかにする補間後加減速を行う。NCプログラムはGコード、Mコード等の制御指令から構成するブロックを複数有する。   The moving average filter and time constant used for post-interpolation acceleration / deceleration will be described with reference to FIG. The numerical controller 30 calculates a target position, a moving distance, a moving speed, a moving time, and the like for each of the X-axis, Y-axis, and Z-axis drive axes based on the interpolation command in the NC program. The interpolation command is a control command used when moving the axis at the moving speed designated by the address, and is, for example, a linear interpolation command, a circular interpolation command, or the like. The numerical control device 30 performs post-interpolation acceleration / deceleration by passing a moving average filter (hereinafter referred to as an FIR filter) at least twice through the calculated movement speed for each drive axis to smooth the speed change. The NC program has a plurality of blocks composed of control commands such as G code and M code.

図2は、X軸方向においてxからxに移動する工具の移動速度を、FIRフィルタで二回処理した結果を示す図表である。FIRフィルタの加減速時定数(以下、時定数と呼ぶ)は、FIRフィルタが平均を行うサンプル数に相当する。例えば、サンプル時間が1msecで、FIRフィルタの時定数が10msecの時、FIRフィルタは今回の補間指令を含めて10個前までの指令の平均を今回の出力とする。一段目のFIRフィルタ(FIR1)の時定数をt、二段目のFIRフィルタ(FIR2)の時定数をtとする。 2, the moving speed of the tool to be moved from x 1 to x 2 in the X-axis direction is a chart showing the result of processing twice with FIR filters. The acceleration / deceleration time constant of the FIR filter (hereinafter referred to as the time constant) corresponds to the number of samples that the FIR filter averages. 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 up to 10 commands including the current interpolation command as the current output. The time constant of the first stage of the FIR filter (FIR1) t 1, the time constant of the second stage of the FIR filter (FIR2) and t 2.

移動速度を二段のFIRフィルタ(FIR1、FIR2)で処理した結果、加速度の変化は一定以下となるので、工具はt+tをかけて緩やかに速度を上げて最高速度に達し、その後、t+tをかけて緩やかに速度を落として停止する。それ故、数値制御装置30は、移動速度を複数のFIRフィルタで処理することで、移動速度の急激な変化を吸収できるので、工作機械1の振動と、動作に必要な最大トルクを抑制できる。 As a result of processing the moving speed with the two-stage FIR filter (FIR1, FIR2), the change in the acceleration is less than a certain value, so the tool gradually increases the speed by applying t 1 + t 2 and reaches the maximum speed. Apply t 1 + t 2 and slow down to stop. Therefore, the numerical control device 30 can absorb a sudden change in the moving speed by processing the moving speed with a plurality of FIR filters, and therefore can suppress the vibration of the machine tool 1 and the maximum torque required for the operation.

上述の如く、補間後加減速では、時定数t,tの影響により、工具が実際に移動する経路は、NCプログラムが指令する経路に対して誤差を生じる。それ故、数値制御装置30は、使用者が予め設定する許容誤差内で工具を移動する為に、前回の補間指令の移動終了後から、今回の補間指令の移動開始時機を遅延させる。数値制御装置30は、後述するメイン処理を実行することで、今回の補間指令の指令開始遅延時間を、小さい計算負荷で簡単に演算できる。 As described above, in the post-interpolation acceleration / deceleration, due to the influence of the time constants t 1 and t 2 , the path on which the tool actually moves causes an error with respect to the path commanded by the NC program. Therefore, the numerical control device 30 delays the movement start timing of the current interpolation command after the movement of the previous interpolation command is completed in order to move the tool within the tolerance set in advance by the user. The numerical control device 30 can easily calculate the command start delay time of the current interpolation command with a small calculation load by executing main processing described later.

図3を参照し、CPU31が実行するメイン処理を説明する。作業者は、加工するワーク形状のNCプログラムの番号を操作盤10の入力部24で入力し、加工開始キー(図示略)を押下する。CPU31は加工開始キーの押下を検出すると、ROM32に記憶したメインプログラムを読み込んで本処理を実行する。   A main process executed by the CPU 31 will be described with reference to FIG. The operator inputs the NC program number of the workpiece shape to be processed with the input unit 24 of the operation panel 10 and presses a processing start key (not shown). When the CPU 31 detects pressing of the machining start key, it reads the main program stored in the ROM 32 and executes this processing.

先ず、CPU31は、記憶装置34から入力部24で入力した番号に対応するNCプログラムを読み込む(S1)。CPU31は読み込んだNCプログラムを先頭行から解釈し(S2)、一行内の制御指令を認識する。CPU31は認識した制御指令がNCプログラムの終了を指示する終了指令か否か判断する(S3)。制御指令が終了指令で無い時(S3:NO)、CPU31は制御指令が補間指令か否か判断する(S4)。制御指令が補間指令以外の指令(例えば、位置決め指令、工具径補正指令、工具交換指令等)の時(S4:NO)、CPU31は制御指令に対応する動作を実行する(S14)。   First, the CPU 31 reads an NC program corresponding to the number input by the input unit 24 from the storage device 34 (S1). The CPU 31 interprets the read NC program from the first line (S2) and recognizes the control command in one line. The CPU 31 determines whether or not the recognized control command is an end command for instructing the end of the NC program (S3). When the control command is not an end command (S3: NO), the CPU 31 determines whether or not the control command is an interpolation command (S4). When the control command is a command other than the interpolation command (for example, positioning command, tool radius correction command, tool change command, etc.) (S4: NO), the CPU 31 executes an operation corresponding to the control command (S14).

制御指令が補間指令の時(S4:YES)、CPU31は補間後の指令点の座標位置(指令位置)を生成する(S5)。続いて、CPU31は誤差一定制御が有効か否か判断する(S6)。誤差一定制御とは、補間後加減速において、NCプログラムが指令する経路に対し、工具が実際に移動する経路が予め設定した許容誤差内となるように、工作機械1の動作を制御する制御方式である。作業者は、操作盤10で誤差一定制御の有効又は無効を予め選択できる。CPU31は、作業者が入力した誤差一定制御の有効又は無効を、例えばフラグ等を用いてRAM33等に記憶する。   When the control command is an interpolation command (S4: YES), the CPU 31 generates the coordinate position (command position) of the command point after interpolation (S5). Subsequently, the CPU 31 determines whether or not the constant error control is effective (S6). The constant error control is a control method for controlling the operation of the machine tool 1 so that the path in which the tool actually moves is within a preset allowable error with respect to the path commanded by the NC program in acceleration / deceleration after interpolation. It is. The operator can select in advance whether the constant error control is valid or invalid on the operation panel 10. The CPU 31 stores the validity or invalidity of the constant error control input by the worker in the RAM 33 or the like using a flag or the like, for example.

−誤差一定制御無効−
誤差一定制御が無効の時(S6:NO)、CPU31は誤差一定制御を実行せずに、補間処理を実行する(S12)。補間処理では、現在位置と指令位置の二点間を補間し、X軸、Y軸、Z軸の駆動軸毎に、目標位置、移動距離、移動速度、移動時間等を演算する。次いで、CPU31はFIRフィルタ処理を実行する(S13)。FIRフィルタ処理では、上述の如く、駆動軸毎に移動速度を二段のFIRフィルタ(FIR1,FIR2)で処理する。それ故、各駆動軸の速度変化は滑らかになる。
−Invalid constant error control−
When the constant error control is invalid (S6: NO), the CPU 31 executes the interpolation process without executing the constant error control (S12). In the interpolation process, the current position and the command position are interpolated, and the target position, moving distance, moving speed, moving time, etc. are calculated for each of the X-axis, Y-axis, and Z-axis drive axes. Next, the CPU 31 executes FIR filter processing (S13). In the FIR filter processing, as described above, the moving speed for each drive shaft is processed by the two-stage FIR filters (FIR1, FIR2). Therefore, the speed change of each drive shaft becomes smooth.

CPU31は駆動信号を生成し、対応する駆動回路51A,53A,54Aに出力する(S11)。駆動信号とは、各駆動軸における目標位置、移動距離、移動速度、移動時間等の各種情報を含む信号である。駆動回路51A,53A,54AはCPU31から受信した駆動信号に基づき、対応するモータ51,53,54に駆動電流(パルス)を夫々出力する。それ故、数値制御装置30はNCプログラムの補間指令が指令する経路に従い、工具を移動できる。   The CPU 31 generates a drive signal and outputs it to the corresponding drive circuits 51A, 53A, 54A (S11). The drive signal is a signal including various information such as a target position, a moving distance, a moving speed, and a moving time on each drive axis. The drive circuits 51A, 53A, and 54A output drive currents (pulses) to the corresponding motors 51, 53, and 54 based on the drive signals received from the CPU 31, respectively. Therefore, the numerical control device 30 can move the tool according to the path commanded by the interpolation command of the NC program.

−誤差一定制御有効−
誤差一定制御が有効の時(S6:YES)、CPU31は誤差一定制御を実行する(S7)。図4を参照し、誤差一定制御処理を説明する。CPU31は解釈した補間指令が円弧補間指令か否か判断する(S21)。円弧補間指令の時(S21:YES)、後に実行するFIRフィルタ処理の時定数tとtの影響により、工具は円弧補間指令が指令する指令円弧に対して内回りに移動する可能性がある。そこで、CPU31は、工具を指令円弧に対して許容誤差内で移動させる為に、以下のパラメータと[数1]を用いて、円弧速度Fを計算する(S22)。[数1]は、FIRフィルタの伝達関数のゲインをテイラー展開近似して整理したものである。
・F:円弧速度(mm/分)
・R:円弧半径(mm)
・ε:許容誤差(mm)
・t:時定数1(FIR1)
・t:時定数2(FIR2)
なお、Rは円弧補間指令から演算する。指令円弧の始点と終点の半径が異なる時、CPU31は小さい方を円弧半径とすればよい。ε、t、tは、作業者が操作盤10の入力部24で予め入力したもので、例えば記憶装置34等に記憶する。

Figure 0006380119
-Effective error control-
When the constant error control is valid (S6: YES), the CPU 31 executes the constant error control (S7). The constant error control process will be described with reference to FIG. The CPU 31 determines whether or not the interpreted interpolation command is a circular interpolation command (S21). When circular interpolation command (S21: YES), the influence of the constant t 1 and t 2 when the FIR filter processing to be executed after the tool is likely to move to the inward turning relative command arc circular interpolation command is a command . Therefore, CPU 31, in order to move within the tolerances of the tool relative to the instruction arc, using the following parameters and Equation 1, to calculate the arc rate F c (S22). [Equation 1] is obtained by arranging the gain of the transfer function of the FIR filter by Taylor expansion approximation.
Fc : arc speed (mm / min)
Rc : Arc radius (mm)
・ Ε: Allowable error (mm)
T 1 : Time constant 1 (FIR1)
T 2 : Time constant 2 (FIR2)
Rc is calculated from a circular interpolation command. When the radius of the start point and the end point of the command arc is different, the CPU 31 may set the smaller one as the arc radius. ε, t 1 , and t 2 are input in advance by the operator through the input unit 24 of the operation panel 10 and are stored in the storage device 34, for example.
Figure 0006380119

CPU31は、計算した円弧速度Fが、円弧補間指令の指令速度Fよりも小さいか否か判断する(S23)。計算した円弧速度Fは、許容誤差ε内で移動する為の数値であるので、円弧速度Fの方が小さい時(S23:YES)、CPU31は計算した円弧速度Fを指令速度Fに設定する(S24)。その反対に、指令速度Fの方が小さい時(S23:NO)、許容誤差ε内で移動できるので、CPU31は指令速度Fを変更しない。なお、解釈した補間指令が直線補間指令である時(S21:NO)、経路に対して誤差を生じないので、CPU31は処理をS25に進める。 CPU31 is calculated arc rate F c is less determines whether than the command speed F of the circular interpolation command (S23). Since the calculated arc speed F c is a numerical value for moving within the allowable error ε, when the arc speed F c is smaller (S23: YES), the CPU 31 sets the calculated arc speed F c to the command speed F. Set (S24). On the other hand, when the command speed F is smaller (S23: NO), the CPU 31 does not change the command speed F because it can move within the allowable error ε. When the interpreted interpolation command is a linear interpolation command (S21: NO), the CPU 31 advances the process to S25 because no error is generated for the path.

−ブロック間角度βの計算−
CPU31は、第一ブロックと第二ブロックのうち、少なくとも一方が円弧補間ブロックか否か判断する(S25)。第一ブロックは今回の補間指令で補間するブロック、第二ブロックは第一ブロックの始点と繋がる前回の補間指令で補間したブロックである。円弧補間ブロックとは、円弧軌跡で補間するブロック、直線補間ブロックとは、直線軌跡で補間するブロックを意味する。第一ブロックと第二ブロックのうち少なくとも一方が円弧補間ブロックである時(S25:YES)、CPU31は円弧補間を考慮したブロック間角度βを計算する(S26)。他方、第一ブロックと第二ブロックの両方が直線補間ブロックである時(S25:NO)、CPU31は二つの直線補間のブロック間角度βを計算する(S27)。ブロック間角度βとは、第一ブロックと第二ブロックを繋ぐ指令点における角度を意味する。CPU31は、二つの直線補間ブロックの方向ベクトルを夫々求め、これらベクトル間の角度をブロック間角度βとして求める。
−Calculation of inter-block angle β−
The CPU 31 determines whether at least one of the first block and the second block is a circular interpolation block (S25). The first block is a block that is interpolated by the current interpolation command, and the second block is a block that is interpolated by the previous interpolation command connected to the start point of the first block. The circular interpolation block means a block to be interpolated with an arc locus, and the linear interpolation block means a block to be interpolated with a linear locus. When at least one of the first block and the second block is a circular interpolation block (S25: YES), the CPU 31 calculates an inter-block angle β considering circular interpolation (S26). On the other hand, when both the first block and the second block are linear interpolation blocks (S25: NO), the CPU 31 calculates the inter-block angle β between the two linear interpolations (S27). The inter-block angle β means an angle at a command point connecting the first block and the second block. The CPU 31 obtains the direction vectors of the two linear interpolation blocks, and obtains the angle between these vectors as the inter-block angle β.

他方、第一ブロックと第二ブロックのうち少なくとも一方が円弧補間ブロックである時、上記の通り、円弧補間指令の指令円弧に対して工具は内回りに移動する。それ故、CPU31は、指令円弧に加え、該指令円弧に内回り誤差を含んだ実円弧を考慮して、円弧補間ブロックの方向ベクトルを決定し、他方のブロックの方向ベクトルとのブロック間角度βを計算する必要がある。   On the other hand, when at least one of the first block and the second block is a circular interpolation block, as described above, the tool moves inward with respect to the command arc of the circular interpolation command. Therefore, the CPU 31 determines the direction vector of the circular interpolation block in consideration of the actual circular arc including the inward error in the command circular arc in addition to the command circular arc, and determines the inter-block angle β with the direction vector of the other block. It is necessary to calculate.

第一ブロックと第二ブロックのうち少なくとも一方が円弧補間ブロックとなる場面は、補間順(第二ブロック、第一ブロックの順)に示すと、以下の3パターンがある。
(1)直線補間ブロック−円弧補間ブロック
(2)円弧補間ブロック−直線補間ブロック
(3)円弧補間ブロック−円弧補間ブロック
A scene in which at least one of the first block and the second block is a circular interpolation block has the following three patterns in the order of interpolation (the order of the second block and the first block).
(1) Linear interpolation block-Circular interpolation block (2) Circular interpolation block-Linear interpolation block (3) Circular interpolation block-Circular interpolation block

(1)直線補間ブロック−円弧補間ブロック
図6は、直線補間ブロックB1の次に、円弧補間ブロックB2が指令点Pで繋がる経路である。CPU31は、前回の直線補間ベクトルa、今回の指令円弧接線ベクトルb、今回の実円弧接線ベクトルcを求める。ベクトルaは、ブロックB1の指令直線のベクトルである。ベクトルbは、ブロックB2の指令円弧の指令点Pから引いた接線ベクトルである。ベクトルcは、実円弧Kの指令点Pから引いた接線ベクトルである。実円弧Kは、ブロックB2の指令円弧に内回り誤差を含む軌跡である。内回り誤差は許容誤差εに置き換えることができる。実円弧Kは、ブロックB2の指令円弧の指令速度Fと実円弧Kの半径から求める。実円弧Kの半径は、ブロックB2の指令円弧の円弧半径Rから許容誤差εを差し引いた長さである。CPU31は、ベクトルaとベクトルbが成す角度、ベクトルaとベクトルcが成す角度を求める。コーナにおける内回り誤差は、同一速度であれば角度が小さいほど大きくなる。図6に示す例では、ベクトルaとベクトルbが成す角度の方が、ベクトルaとベクトルcが成す角度よりも小さい。それ故、CPU31はベクトルaとベクトルbが成す角度をブロック間角度βに決定する。
(1) Linear Interpolation Block-Circular Interpolation Block FIG. 6 shows a path in which the circular interpolation block B2 is connected at the command point P after the linear interpolation block B1. The CPU 31 obtains the previous linear interpolation vector a, the current command arc tangent vector b, and the current actual arc tangent vector c. The vector a is a vector of the command straight line of the block B1. The vector b is a tangent vector drawn from the command point P of the command arc of the block B2. The vector c is a tangent vector drawn from the command point P of the real arc K. The actual arc K is a trajectory including an inward error in the command arc of the block B2. The inward error can be replaced with an allowable error ε. The actual arc K is obtained from the command speed F of the command arc of the block B2 and the radius of the actual arc K. The radius of the actual arc K is the length obtained by subtracting the allowable error ε from the arc radius R c of the instruction arc block B2. The CPU 31 obtains an angle formed by the vector a and the vector b and an angle formed by the vector a and the vector c. The inward rotation error at the corner increases as the angle decreases at the same speed. In the example shown in FIG. 6, the angle formed by the vector a and the vector b is smaller than the angle formed by the vector a and the vector c. Therefore, the CPU 31 determines the angle between the vector a and the vector b as the inter-block angle β.

図7は、円弧補間ブロックB2の指令円弧が反時計回りになった経路である。図6と同様に、CPU31は、前回の直線補間ベクトルa、今回の指令円弧接線ベクトルb、今回の実円弧接線ベクトルcを求め、ベクトルaとベクトルbが成す角度、ベクトルaとベクトルcが成す角度を求める。図7に示す例では、ベクトルaとベクトルcが成す角度の方が、ベクトルaとベクトルbが成す角度よりも小さい。それ故、CPU31はベクトルaとベクトルcが成す角度をブロック間角度βに決定する。   FIG. 7 shows a path in which the command arc of the arc interpolation block B2 is counterclockwise. Similarly to FIG. 6, the CPU 31 obtains the previous linear interpolation vector a, the current command arc tangent vector b, and the current actual arc tangent vector c, and the angle formed by the vector a and the vector b, and the vector a and the vector c are formed. Find the angle. In the example shown in FIG. 7, the angle formed by the vector a and the vector c is smaller than the angle formed by the vector a and the vector b. Therefore, the CPU 31 determines the angle between the vector a and the vector c as the inter-block angle β.

(2)円弧補間ブロック−直線補間ブロック
図8は、図6とは逆に、円弧補間ブロックB1の次に、直線補間ブロックB2が指令点Pで繋がる経路である。CPU31は、前回の指令円弧接線ベクトルa、前回の実円弧接線ベクトルb、今回の直線補間ベクトルcを求める。ベクトルaは、ブロックB1の指令円弧の指令点Pから引いた接線ベクトルである。ベクトルbは、実円弧Kの指令点Pから引いた接線ベクトルである。実円弧Kは、ブロックB1の指令円弧に内回り誤差を含む軌跡である。内回り誤差は許容誤差εに置き換えることができる。実円弧Kは、ブロックB1の指令円弧の指令速度Fと実円弧Kの半径から求める。実円弧Kの半径は、ブロックB1の指令円弧の円弧半径Rから許容誤差εを差し引いた長さである。ベクトルcは、ブロックB2の指令直線のベクトルである。CPU31は、ベクトルaとベクトルcが成す角度、ベクトルbとベクトルcが成す角度を求める。図8に示す例では、ベクトルaとベクトルcが成す角度の方が、ベクトルbとベクトルcが成す角度よりも小さい。それ故、CPU31はベクトルaとベクトルcが成す角度をブロック間角度βに決定する。
(2) Circular Interpolation Block-Linear Interpolation Block FIG. 8 shows a path where the linear interpolation block B2 is connected at the command point P next to the circular interpolation block B1, contrary to FIG. The CPU 31 obtains the previous command arc tangent vector a, the previous actual arc tangent vector b, and the current linear interpolation vector c. The vector a is a tangent vector drawn from the command point P of the command arc of the block B1. The vector b is a tangent vector drawn from the command point P of the real arc K. The actual arc K is a trajectory including an inward error in the command arc of the block B1. The inward error can be replaced with an allowable error ε. The actual arc K is obtained from the command speed F of the command arc of the block B1 and the radius of the actual arc K. The radius of the actual arc K is the length obtained by subtracting the allowable error ε from the arc radius R c of the instruction arc block B1. The vector c is a vector of the command straight line of the block B2. The CPU 31 obtains an angle formed by the vector a and the vector c and an angle formed by the vector b and the vector c. In the example shown in FIG. 8, the angle formed by the vector a and the vector c is smaller than the angle formed by the vector b and the vector c. Therefore, the CPU 31 determines the angle between the vector a and the vector c as the inter-block angle β.

(3)円弧補間ブロック−円弧補間ブロック
図9は、円弧補間ブロックB1の次に、円弧補間ブロックB2が指令点Pで繋がる経路である。該場面では、第一ブロックと第二ブロックの何れもが円弧補間ブロックであるので、CPU31は、前回の指令円弧接線ベクトルa、前回の実円弧接線ベクトルb、今回の指令円弧接線ベクトルc、今回の実円弧接線ベクトルdを求める。ベクトルaは、ブロックB1の指令円弧の指令点Pから引いた接線ベクトルである。ベクトルbは、実円弧K1の指令点Pから引いた接線ベクトルである。実円弧K1は、ブロックB1の指令円弧に内回り誤差を含む軌跡である。内回り誤差は許容誤差εに置き換えることができる。実円弧K1は、ブロックB1の指令円弧の指令速度Fと実円弧Kの半径から求める。実円弧K1の半径は、ブロックB1の指令円弧の円弧半径Rから許容誤差εを差し引いた長さである。
(3) Circular Interpolation Block-Circular Interpolation Block FIG. 9 shows a path in which the circular interpolation block B2 is connected at the command point P after the circular interpolation block B1. In this scene, since both the first block and the second block are circular interpolation blocks, the CPU 31 determines the previous command arc tangent vector a, the previous actual arc tangent vector b, the current command arc tangent vector c, and the current command arc tangent vector c. The real arc tangent vector d is obtained. The vector a is a tangent vector drawn from the command point P of the command arc of the block B1. The vector b is a tangent vector drawn from the command point P of the real arc K1. The actual arc K1 is a locus including an inward error in the command arc of the block B1. The inward error can be replaced with an allowable error ε. The actual arc K1 is obtained from the command speed F of the command arc of the block B1 and the radius of the actual arc K. The radius of the actual arc K1 is the length obtained by subtracting the allowable error ε from the arc radius R c of the instruction arc block B1.

他方、ベクトルcは、ブロックB2の指令円弧の指令点Pから引いた接線ベクトルである。ベクトルdは、実円弧K2の指令点Pから引いた接線ベクトルである。実円弧K2は、ブロックB2の指令円弧に内回り誤差を含む軌跡である。内回り誤差は許容誤差εに置き換えることができる。実円弧K2は、ブロックB2の指令円弧の指令速度Fと実円弧K2の半径から求める。実円弧K2の半径は、ブロックB2の指令円弧の円弧半径Rから許容誤差εを差し引いた長さである。 On the other hand, the vector c is a tangent vector drawn from the command point P of the command arc of the block B2. The vector d is a tangent vector drawn from the command point P of the real arc K2. The actual arc K2 is a trajectory including an inward error in the command arc of the block B2. The inward error can be replaced with an allowable error ε. The actual arc K2 is obtained from the command speed F of the command arc of the block B2 and the radius of the actual arc K2. The radius of the actual arc K2 is the length obtained by subtracting the allowable error ε from the arc radius R c of the instruction arc block B2.

CPU31は、ベクトルaとベクトルcが成す角度、ベクトルaとベクトルdが成す角度、ベクトルbとベクトルcが成す角度、ベクトルbとベクトルdが成す角度を求める。コーナにおける内回り誤差は、同一速度であれば角度が小さいほど大きくなる。図9に示す例では、ベクトルaとベクトルcが成す角度が、他の角度に比べて最も小さい。それ故、CPU31はベクトルaとベクトルcが成す角度をブロック間角度βに決定する。   The CPU 31 obtains an angle formed by the vector a and the vector c, an angle formed by the vector a and the vector d, an angle formed by the vector b and the vector c, and an angle formed by the vector b and the vector d. The inward rotation error at the corner increases as the angle decreases at the same speed. In the example shown in FIG. 9, the angle formed by the vector a and the vector c is the smallest compared to the other angles. Therefore, the CPU 31 determines the angle between the vector a and the vector c as the inter-block angle β.

−ブロック間角度βの補正−
図4に戻り、上述の如く、ブロック間角度βを計算した後(S26,S27)、計算したブロック間角度βについて、CPU31はブロック間角度補正処理を実行する(S28)。
-Correction of inter-block angle β-
Returning to FIG. 4, as described above, after calculating the inter-block angle β (S26, S27), the CPU 31 executes an inter-block angle correction process for the calculated inter-block angle β (S28).

図10〜図12を参照し、ブロック間角度βを補正する理由を説明する。図10に示す経路L1は、二つの直線補間指令で形成され、直線補間ブロックB1の次に、直線補間ブロックB2が指令点Pで繋がる経路である。ブロックB1はX軸方向への直線補間、ブロックB2はY軸方向への直線補間である。ブロック間角度βは90°である。図11は、図10の経路L1を移動する際のブロックB1の移動速度(速度1)とブロックB2の移動速度(速度2)を、二段のFIRフィルタ(FIR1,2)で夫々処理した図である。   The reason for correcting the inter-block angle β will be described with reference to FIGS. A path L1 shown in FIG. 10 is formed by two linear interpolation commands. The linear interpolation block B2 is connected by the command point P next to the linear interpolation block B1. Block B1 is linear interpolation in the X-axis direction, and block B2 is linear interpolation in the Y-axis direction. The inter-block angle β is 90 °. FIG. 11 is a diagram in which the moving speed (speed 1) of the block B1 and the moving speed (speed 2) of the block B2 when moving along the path L1 in FIG. 10 are respectively processed by the two-stage FIR filters (FIR1, 2). It is.

速度1が最大速度から下降を開始する時、速度2は上昇を開始する。速度1と速度2が重なる部分では、工具は経路L1のコーナを内回りに移動する。速度1が最大速度から下降を開始する時、工具はA1に位置する。速度1と速度2が同一速度で最も重なる時、工具はA2に位置する。速度1が最大速度から下降して0になる時、工具はA3に位置する。A2は、経路L1に対して誤差が最大となる位置である。A3は誤差が解消する位置である。誤差が生じて解消するまでのA1〜A3までの時間は、時定数tとtの合計に相当する。即ち、経路L1のコーナで発生した誤差はA3を通過しなければ解消しない。例えばA2を過ぎた直後に次ブロックのコーナがある時、誤差が時定数の合計の半分の時間だけ残る可能性がある。それ故、本実施形態は、過去にコーナで生じた誤差の影響を考慮し、S26,S27で計算したブロック間角度βを補正する。 When speed 1 begins to descend from maximum speed, speed 2 begins to rise. In the part where the speed 1 and the speed 2 overlap, the tool moves inward along the corner of the path L1. When speed 1 starts to drop from maximum speed, the tool is located at A1. When speed 1 and speed 2 overlap at the same speed, the tool is located at A2. When speed 1 drops from maximum speed to zero, the tool is located at A3. A2 is a position where the error is maximum with respect to the path L1. A3 is a position where the error is eliminated. Time to A1~A3 until the error is eliminated occurs when corresponds to the sum of the constants t 1 and t 2. That is, the error generated at the corner of the path L1 is not eliminated unless it passes through A3. For example, when there is a corner of the next block immediately after A2, the error may remain for half the time constant. Therefore, this embodiment corrects the inter-block angle β calculated in S26 and S27 in consideration of the influence of errors that have occurred in the past in the corner.

図5,図12,図13を参照し、ブロック間角度補正処理を説明する。本実施形態は、図12に示す経路L2を想定して説明する。経路L2は、複数のコーナが連続し、全体的に湾曲する経路である。Pは今回の補間指令の開始点である。PN+1は今回の補間指令の移動指令位置である。PN−1は前回(一個前)の補間指令の開始点である。PN−2は二個前の補間指令の開始点である。PN−3は三個前の補間指令の開始点である。PN−4は四個前の補間指令の開始点である。図13は、図12に示す経路L2を移動する時の移動速度の変化について、FIRフィルタ処理を施す前の図表である。 The inter-block angle correction process will be described with reference to FIGS. 5, 12, and 13. This embodiment will be described assuming a route L2 shown in FIG. The path L2 is a path in which a plurality of corners are continuous and curved as a whole. P N is the starting point of the current interpolation command. P N + 1 is the movement command position of the current interpolation command. PN-1 is the start point of the previous (previous) interpolation command. P N−2 is the start point of the previous interpolation command. P N-3 is the start point of the previous three interpolation commands. PN-4 is the start point of the previous four interpolation commands. FIG. 13 is a chart before the FIR filter processing is performed on the change in the moving speed when moving along the route L2 shown in FIG.

図5に示す如く、先ず、CPU31は、遡り時間Tを以下の(数2)で求める(S40)。遡り時間Tは時定数t,tの合計の半分である。
(数2)
=(t+t)/2
・T:遡り時間(msec)
・t:FIR1の時定数(msec)
・t:FIR2の時定数(msec)
As shown in FIG. 5, first, CPU 31 is going back seek time T B by the following equation (2) (S40). Going back time T B is half the sum of the time constant t 1, t 2.
(Equation 2)
T B = (t 1 + t 2 ) / 2
・ T B : Retroactive time (msec)
T 1 : Time constant of FIR1 (msec)
T 2 : Time constant of FIR2 (msec)

次いで、CPU31は、TがTN−1以下か否か判断する(S41)。図13に示す如く、TN−1は、一個前の補間指令の指令開始遅延時間Tと移動時間の合計である。指令開始遅延時間Tとは、一個前の補間指令に基づく移動が終了した時から、今回の補間指令に基づく移動を開始する時機を遅延させる時間である。なお、後述するが、今回の補間指令のTは、ブロック間角度補正処理の後で計算するが(図4のS29参照)、過去の補間指令のTは既に計算済みである。TがTN−1以下の時(S41:YES)、過去の経路誤差は既に解消しているので、CPU31は何もせずに本処理を終了し、図4のS29に処理を進める。 Then, CPU 31 is, T B is determines whether T N-1 or less (S41). As shown in FIG. 13, T N−1 is the sum of the command start delay time T d of the previous interpolation command and the movement time. The command start delay time Td is a time for delaying the timing for starting the movement based on the current interpolation command after the movement based on the previous interpolation command is completed. As will be described later, the Td of the current interpolation command is calculated after the inter-block angle correction process (see S29 in FIG. 4), but the Td of the past interpolation command has already been calculated. When T B is equal to or less than T N−1 (S41: YES), the past path error has already been eliminated. Therefore, the CPU 31 ends this process without doing anything, and proceeds to S29 in FIG.

他方、TがTN−1より大きい時(S41:NO)、過去の誤差が残っているので、CPU31はMに2を代入した上で(S42)、Tが以下の[数3]を満たすか否か判断する(S43)。Mは整数のパラメータである。

Figure 0006380119
・TN−M:M個前の補間指令の指令開始遅延時間と移動時間の合計時間(msec)
・βN−M:直線PN−Mと直線PN+1の内角(deg)
・β´:補正後のブロック間角度(deg) On the other hand, when T B is larger than T N−1 (S41: NO), the past error remains, so the CPU 31 substitutes 2 for M (S42), and T B is the following [Equation 3] It is determined whether or not the condition is satisfied (S43). M is an integer parameter.
Figure 0006380119
・ T N-M : Total time (msec) of command start delay time and movement time of M previous interpolation commands
.Beta.N -M : Interior angle (deg) of straight line P N-M P N and straight line P N P N + 1
Β ′: Angle between blocks after correction (deg)

但し、TN−Mは以下の[数4]で求める。

Figure 0006380119
・TdN−M:M個前の補間指令の指令開始遅延時間(msec)
・LN−M:M個前の補間指令のブロック長(mm)
・FN−M:M個前の補間指令の指令速度(mm/min) However, TN-M is obtained by the following [Equation 4].
Figure 0006380119
· Td N-M: M pieces before the interpolation command instruction start delay time of (msec)
・ L N-M : Block length of mm previous interpolation command (mm)
・ F N-M : Command speed of mm previous interpolation command (mm / min)

M=2で[数3]を満たす時(S43:YES)、過去の誤差が解消しているので、CPU31は角度β〜βN−Mを求める(S45)。他方、M=2で[数3]を満たさない時(S43:NO)、CPU31はMに更に1加算した上で(S44)、S43に戻って[数3]を満たすか否か再度判断する。[数3]を満たした時(S43:YES)、CPU31は[数3]を満たしたMの値で、角度β〜βN−Mを求める(S45)。例えば、図12,図13に示す如く、今回の補間指令の開始点Pから遡り時間T分過去に遡った位置P(図12参照)を想定する。PがPN−2とPN−3の間にある時、CPU31は、三つ前のブロック(本発明の「過去ブロック」に相当)の補間指令の開始点PN−3まで遡り、角度βN−2,βN−3を求める。CPU31は、S45で求めた角度β〜βN−Mのうち最小の角度を補正後のブロック間角度β´に決定する(S46)。図12に示す例では、βN−3をβ´に決定する。CPU31は本処理を終了し、図4のS29に処理を進める。 When satisfying the Equation 3 with M = 2 (S43: YES) , since the past errors are eliminated, CPU 31 obtains the angle β~β N-M (S45). On the other hand, when M = 2 and [Equation 3] is not satisfied (S43: NO), the CPU 31 adds 1 to M (S44) and returns to S43 to determine again whether or not [Equation 3] is satisfied. . When filled with Equation 3] (S43: YES), CPU31 is a value of M which satisfies the equation (3), determining the angle β~β N-M (S45). For example, FIG. 12, as shown in FIG. 13, suppose the position P B going back to going back time T B min past from the starting point P N of this interpolation command (see Figure 12). When P N is between P N−2 and P N−3 , the CPU 31 goes back to the start point P N−3 of the interpolation command of the previous three blocks (corresponding to “past block” of the present invention) Angles β N-2 and β N-3 are obtained. CPU31 determines the corrected interblock angle β'the minimum angle among the angles β~β N-M obtained in S45 (S46). In the example shown in FIG. 12, βN -3 is determined to be β ′. CPU31 complete | finishes this process and advances a process to S29 of FIG.

−指令開始遅延時間Tの計算−
図4の誤差一定制御処理に戻り、CPU31はTを計算する(S29)。図10に示す経路L1で説明する。図14は、図11と同様に、Tを0とした時のFIRフィルタ処理を施した速度1と2の夫々の変化を示す。速度1と2が重なる部分は、工具がコーナを内回りする部分である。速度1と2が重なる部分の長さは、時定数t+tに相当する。速度1と2が重なる部分において、速度1と2の曲線部分は二段目のFIR2の幅tに相当する。速度1と2が最も重なるA2は誤差最大点である。本実施形態は、該誤差からTを求める。誤差最大点の誤差を求めるには、速度1と2が重なり始めてから、速度が曲線で変化する曲線部分と、直線で変化する直線部分の両方を計算する必要がある。
- calculation of the command start delay time T d -
Returning to the constant error control process of FIG. 4, the CPU 31 calculates Td (S29). This will be described with reference to the path L1 shown in FIG. FIG. 14 shows the changes in the speeds 1 and 2 to which the FIR filter processing is performed when Td is 0, as in FIG. The part where the speeds 1 and 2 overlap is the part where the tool goes around the corner. The length of the portion where the speeds 1 and 2 overlap corresponds to the time constant t 1 + t 2 . In a portion where rate 1 and 2 overlap, curved section of the speed 1 and 2 corresponds to the width t 2 of the FIR2 the second stage. A2 where the speeds 1 and 2 overlap most is the maximum error point. In the present embodiment, T d is obtained from the error. In order to obtain the error of the maximum error point, it is necessary to calculate both the curve portion where the speed changes with a curve and the straight line portion where the speed changes with a straight line after the speeds 1 and 2 start to overlap.

他方、図15に示す如く、速度1と2の重なり時間が2×tよりも短い時、速度1と2が重なる部分の速度変化は全て曲線となる。それ故、誤差からTを求める式は、図14の時と異なる。なお、図16に示す如く、Tをt+tとした時、速度1と2は重ならず、コーナにおける誤差は0である。この時のTは最大値である。 On the other hand, as shown in FIG. 15, when the overlapping time of the speeds 1 and 2 is shorter than 2 × t 2 , the speed change in the part where the speeds 1 and 2 overlap is a curve. Therefore, the formula for obtaining Td from the error is different from that in FIG. As shown in FIG. 16, when T d is t 1 + t 2 , the speeds 1 and 2 do not overlap and the error at the corner is zero. At this time, Td is the maximum value.

以上のことを踏まえ、Tについて、以下の関係が成り立つ。εmaxは誤差の最大値である。
・T=0 ならば 誤差=εmax
・T=t+t ならば 誤差=0
Based on the above, the following relationship holds for Td . ε max is the maximum value of error.
If T d = 0, error = ε max
If T d = t 1 + t 2 then error = 0

図14に示す如く、T<t−tでは、速度1と2が重なる部分の変化は、直線部分と曲線部分の両方を含む。他方、図15に示す如く、T≧t−tでは、速度1と2が重なる部分の変化は曲線部分のみである。即ち、Tの長さによって誤差を求める式は異なる。それ故、本実施形態は、許容誤差εからTを求める為に、T=t−tとなる時の誤差εt1−t2を予め求めておけば、二通りの計算式のうち何れの式を使ってTを求めればよいかを容易に判別できる。そこで、CPU31は、(εt1−t2/εmax)=Kと置き換え、以下の[数5]と[数6]に示す如く、ε/εmaxがK未満か以上かで、Tを計算する式を判別する。[数5]と[数6]に示すTの算出式は、図15に示す速度波形を積分して得られる位置とTの関係より求めた。 As shown in FIG. 14, when T d <t 1 -t 2 , the change in the portion where the speeds 1 and 2 overlap includes both the straight line portion and the curved portion. On the other hand, as shown in FIG. 15, when T d ≧ t 1 −t 2 , the change of the portion where the speeds 1 and 2 overlap is only the curved portion. That is, the equation for calculating the error differs depending on the length of Td . Therefore, in this embodiment, in order to obtain T d from the allowable error ε, if the error ε t1−t2 when T d = t 1 −t 2 is obtained in advance, It can be easily determined which formula should be used to determine Td . Therefore, the CPU 31 replaces (ε t1 -t 2 / ε max ) = K, and calculates T d when ε / ε max is less than or greater than K as shown in the following [Equation 5] and [Equation 6]. Determine which expression to use. The formula for calculating Td shown in [Equation 5] and [Equation 6] was obtained from the relationship between the position obtained by integrating the velocity waveform shown in FIG. 15 and Td .

Figure 0006380119
Figure 0006380119
Figure 0006380119
Figure 0006380119

なお、指令速度Fが大きければ大きいほど、誤差は大きくなることから、Tは大きくなる。それ故、Tを計算する時の指令速度Fは、ブロックB1の指令速度とブロックB2の指令速度のうち大きいものを用いるのが望ましい。 Note that the larger the command speed F, the larger the error, so that Td increases. Therefore, it is desirable to use a larger command speed F of the block B1 and the command speed of the block B2 when calculating Td .

図4に示す如く、CPU31は、Kの値に応じて何れか一方の式を使ってTを計算し、計算したTを記憶装置34に記憶する(S30)。それ故、CPU31は、時定数t1,t2、許容誤差ε、指令速度F、ブロック間角度βに基づき、速度1と2の重なり具合に応じて、Tを簡単に計算できる。CPU31は誤差一定制御処理を終了し、図3のメイン処理のS8に処理を進める。 As shown in FIG. 4, the CPU 31 calculates Td using one of the equations according to the value of K, and stores the calculated Td in the storage device 34 (S30). Therefore, the CPU 31 can easily calculate Td according to the overlapping degree of the speeds 1 and 2 based on the time constants t1 and t2, the allowable error ε, the command speed F, and the inter-block angle β. The CPU 31 finishes the constant error control process, and advances the process to S8 of the main process in FIG.

次いで、CPU31は、今回の補間指令に基づき、前回の補間指令の指令点(現在位置)から指令位置までの補間処理を実行する(S8)。次いで、CPU31は、駆動軸毎の移動速度に対して二段のFIRフィルタ処理を実行し(S9)、駆動軸毎に駆動信号を生成する。次いで、CPU31は、前回の補間指令の移動が終了した時から記憶装置34に記憶したTが経過したか否か判断する(S10)。Tが経過していない時(S10:NO)、CPU31は待機する。Tが経過した時(S10:YES)、CPU31は補間指令に対応するモータ51,53,54の駆動回路51A,53A,54Aに駆動信号を出力する(S11)。駆動信号を受信した駆動回路51A,53A,54Aに対応するモータ51,53,54は駆動する。前回の補間指令の移動が終了してT経過後に、今回の補間指令に基づく工具の移動が開始する。 Next, based on the current interpolation command, the CPU 31 executes an interpolation process from the command point (current position) of the previous interpolation command to the command position (S8). Next, the CPU 31 executes a two-stage FIR filter process on the moving speed for each drive axis (S9), and generates a drive signal for each drive axis. Next, the CPU 31 determines whether or not Td stored in the storage device 34 has elapsed since the last movement of the interpolation command was completed (S10). When Td has not elapsed (S10: NO), the CPU 31 stands by. When Td has elapsed (S10: YES), the CPU 31 outputs a drive signal to the drive circuits 51A, 53A, 54A of the motors 51, 53, 54 corresponding to the interpolation command (S11). The motors 51, 53, 54 corresponding to the drive circuits 51A, 53A, 54A that have received the drive signal are driven. After Td has elapsed since the last movement of the interpolation command has been completed, the movement of the tool based on the current interpolation command is started.

CPU31はS2に戻り、次ブロックを解釈する。次ブロックが終了指令で無い時(S3:NO)、CPU31は次ブロックについて処理を繰り返す。次ブロックが終了指令の時(S3:YES)、CPU31は本処理を終了する。それ故、数値制御装置30は、本処理を実行することにより、NCプログラムが指令する経路に対して、工具を許容誤差ε内で移動できる。   The CPU 31 returns to S2 and interprets the next block. When the next block is not an end command (S3: NO), the CPU 31 repeats the process for the next block. When the next block is an end command (S3: YES), the CPU 31 ends this process. Therefore, the numerical controller 30 can move the tool within the allowable error ε with respect to the path commanded by the NC program by executing this process.

以上説明の如く、本実施形態の数値制御装置30は、NCプログラムが指令する経路に沿って工具を移動してワーク加工を実行する。経路は、複数の指令点について隣接する指令点を補間して得られる。数値制御装置30のCPU31は、工具を移動するモータの加減速時定数t,tと、経路に対して許容する許容誤差εと、工具の移動速度を指令する指令速度Fと、経路中の第一ブロックと第二ブロックのブロック間角度βに基づき、モータ51,53,54に前回の補間指令の移動が終了してから今回の補間指令を開始するまでの指令開始遅延時間Tを演算する。第一ブロックは今回の補間指令で補間するブロック、第二ブロックは前回の補間指令で補間したブロックである。CPU31は、演算したTに基づき、対応するモータ51,53,54に今回の補間指令の移動を実行する駆動信号を駆動回路51A,53A,54Aに出力する。それ故、数値制御装置30は、NCプログラムが指令する経路について、小さい計算負荷で、経路誤差を常に許容誤差ε内に制御できる。 As described above, the numerical control device 30 according to the present embodiment moves a tool along a path instructed by the NC program and executes workpiece machining. The route is obtained by interpolating adjacent command points for a plurality of command points. The CPU 31 of the numerical controller 30 includes acceleration / deceleration time constants t 1 and t 2 of the motor that moves the tool, an allowable error ε that is allowed for the path, a command speed F that commands the moving speed of the tool, Based on the inter-block angle β between the first block and the second block, the command start delay time T d from the end of the movement of the previous interpolation command to the motors 51, 53, 54 until the start of the current interpolation command is obtained. Calculate. The first block is a block that is interpolated by the current interpolation command, and the second block is a block that is interpolated by the previous interpolation command. Based on the calculated Td , the CPU 31 outputs to the drive circuits 51A, 53A, and 54A a drive signal for executing the movement of the current interpolation command to the corresponding motors 51, 53, and 54. Therefore, the numerical controller 30 can always control the path error within the allowable error ε with a small calculation load for the path commanded by the NC program.

上記実施形態は特に、第一ブロックと第二ブロックのブロック間角度βを演算した後に、過去のブロックのコーナで生じた誤差を考慮して、該演算したブロック間角度βを補正する。CPU31は、今回の補間指令に対応する第一ブロックよりも過去のブロックである過去ブロックの補間指令の開始点から、第一ブロックの補間指令の開始点までの範囲に属する全ブロックの夫々の補間指令の開始点と第一ブロックの補間指令の開始点とを相互に結ぶ複数の直線を求める。CPU31は求めた複数の直線と第一ブロックが成す角度を夫々求める。CPU31は求めた角度のうち最も小さい角度がブロック間角度βよりも小さい時、ブロック間角度βを最も小さい角度β´に補正する。それ故、数値制御装置30は、微小なブロックが連続する経路であっても、過去ブロックで生じた誤差の影響を受けずに、経路中のコーナに生じる誤差を少なくとも許容誤差ε内に抑えることができる。

In particular, in the above embodiment, after calculating the inter-block angle β between the first block and the second block, the calculated inter-block angle β is corrected in consideration of an error occurring in the corner of the past block. The CPU 31 performs interpolation for all the blocks belonging to the range from the start point of the interpolation command of the past block, which is a block before the first block corresponding to the current interpolation command, to the start point of the interpolation command of the first block. department forming a starting point of the interpolation command of the start point and the first block of instructions mutually determine the straight line multiple. CPU31 is the angle between the multiple lines and first blocks obtained respectively determined. When the smallest angle among the obtained angles is smaller than the inter-block angle β, the CPU 31 corrects the inter-block angle β to the smallest angle β ′. Therefore, the numerical control device 30 suppresses the error generated in the corner in the path to at least the allowable error ε without being affected by the error generated in the past block even in the path where the minute blocks are continuous. Can do.

上記実施形態は更に、第一ブロックの補間指令の開始点から時定数t,tの合計の半分の時間前に遡った位置を含むブロックの補間指令の開始点から、今回の補間指令に対応する第一ブロックの補間指令の開始点までの間に属する全ブロックの補間指令の開始点を求め、全ブロックの補間指令の開始点と第一ブロックが成す角度で最も小さい角度を求める。最も小さい角度がブロック間角度βよりも小さい時、CPU31は、ブロック間角度βを最も小さい角度β´に補正し、その補正したブロック間角度β´を用いて今回の補間指令を開始する時機を演算する。それ故、数値制御装置30は、微小なブロックが連続する経路であっても、過去ブロックで生じた誤差の影響を受けずに、コーナで生じる誤差を許容誤差ε内に制御できる。 In the above embodiment, the interpolation command is changed from the start point of the interpolation command of the block including the position that goes back half the sum of the time constants t 1 and t 2 from the start point of the interpolation command of the first block. The start point of the interpolation command of all the blocks belonging to the corresponding start point of the interpolation command of the first block is obtained, and the smallest angle between the start point of the interpolation command of all the blocks and the first block is obtained. When the smallest angle is smaller than the inter-block angle β, the CPU 31 corrects the inter-block angle β to the smallest angle β ′ and uses the corrected inter-block angle β ′ to start the current interpolation command. Calculate. Therefore, the numerical controller 30 can control the error generated in the corner within the allowable error ε without being affected by the error generated in the past block, even if the path is a continuous path of minute blocks.

上記実施形態の時定数は二つであるので、補間指令に基づく移動速度の変化を滑らかにできる。それ故、数値制御装置30は工作機械1にかかる負荷を軽減できる。   Since there are two time constants in the above embodiment, the change in the moving speed based on the interpolation command can be made smooth. Therefore, the numerical control device 30 can reduce the load on the machine tool 1.

以上説明にて、S7の処理を実行するCPU31が本発明の演算手段に相当し、S10,S11の処理を実行するCPU31が本発明の実行手段に相当し、S26,S27の処理を実行するCPU31が本発明のブロック間角度演算手段に相当し、S28の処理を実行するCPU31が本発明の補正手段に相当する。   In the above description, the CPU 31 that executes the process of S7 corresponds to the calculation means of the present invention, the CPU 31 that executes the processes of S10 and S11 corresponds to the execution means of the present invention, and the CPU 31 that executes the processes of S26 and S27. Corresponds to the inter-block angle calculation means of the present invention, and the CPU 31 that executes the processing of S28 corresponds to the correction means of the present invention.

本発明は上記実施形態に限らず種々の変更が可能である。例えば、上記実施形態は、移動速度を二段のFIRフィルタ(FIR1,FIR2)で処理するが、三段、若しくはそれ以上のFIRフィルタで処理してもよい。例えば、三段のFIRフィルタで処理する時の時定数を大きいほうから順に、夫々、t,t,tとした時、指令開始遅延時間Tの計算は以下の[数7]〜[数11]のように計算すればよい。以下、[t≦t+tの場合]と[t>t+tの場合]に分けて説明する。 The present invention is not limited to the above embodiment, and various modifications can be made. For example, in the above embodiment, the moving speed is processed by a two-stage FIR filter (FIR1, FIR2), but may be processed by a three-stage or more FIR filter. For example, when the time constant when processing with a three-stage FIR filter is set to t 1 , t 2 , and t 3 in order from the largest, the command start delay time T d is calculated as follows: What is necessary is just to calculate like [Formula 11]. Hereinafter, the description will be divided into [when t 1 ≦ t 2 + t 3 ] and [when t 1 > t 2 + t 3 ].

[t≦t+tの場合]
・0≦ε/εmax≦Kの時

Figure 0006380119
・K<ε/εmax≦Kの時
Figure 0006380119
・K<ε/εmax≦Kの時
Figure 0006380119
なお、[数9]の解の候補(1)〜(4)のうち、次の二つの条件[1]、[2]を共に満たす解をTとする。
[1]ルート内の計算結果が0以上である。
[2]Tが「−t+t+t≦T≦t−t+t」を満たす。
・K<ε/εmax≦1の時
Figure 0006380119
なお、[数10]の解の候補(1)〜(4)のうち、次の二つの条件[1]、[2]を共に満たす解をTとする。
[1]ルート内の計算結果が0以上である。
[2]Tが「0≦T≦−t+t+t」を満たす。
但し、
Figure 0006380119
[When t 1 ≦ t 2 + t 3 ]
・ When 0 ≦ ε / ε max ≦ K 1
Figure 0006380119
・ When K 1 <ε / ε max ≦ K 2
Figure 0006380119
・ When K 2 <ε / ε max ≦ K 3
Figure 0006380119
Of the solution candidates (1) to (4) in [Equation 9], let T d be a solution that satisfies both of the following two conditions [1] and [2].
[1] The calculation result in the route is 0 or more.
[2] T d satisfies “−t 1 + t 2 + t 3 ≦ T d ≦ t 1 −t 2 + t 3 ”.
・ When K 3 <ε / ε max ≦ 1
Figure 0006380119
Of the solution candidates (1) to (4) in [Equation 10], let T d be a solution that satisfies both of the following two conditions [1] and [2].
[1] The calculation result in the route is 0 or more.
[2] T d satisfies “0 ≦ T d ≦ −t 1 + t 2 + t 3 ”.
However,
Figure 0006380119

[t>t+tの場合]
・0≦ε/εmax≦Kの時

Figure 0006380119
・K≦ε/εmax≦Kの時
Figure 0006380119
・K≦ε/εmax≦Kの時
Figure 0006380119
なお、[数14]の解の候補(1)〜(4)のうち、次の二つの条件[1]、[2]を共に満たす解をTとする。
[1]ルート内の計算結果が0以上である。
[2]Tが「t−t−t≦T≦t−t+t」を満たす。
・K≦ε/εmax≦1の時
Figure 0006380119
但し、
Figure 0006380119
[When t 1 > t 2 + t 3 ]
・ When 0 ≦ ε / ε max ≦ K 1
Figure 0006380119
・ When K 1 ≦ ε / ε max ≦ K 2
Figure 0006380119
・ When K 2 ≦ ε / ε max ≦ K 3
Figure 0006380119
Of the solution candidates (1) to (4) in [Equation 14], let T d be a solution that satisfies both of the following two conditions [1] and [2].
[1] The calculation result in the route is 0 or more.
[2] T d satisfies “t 1 −t 2 −t 3 ≦ T d ≦ t 1 −t 2 + t 3 ”.
・ When K 3 ≦ ε / ε max ≦ 1
Figure 0006380119
However,
Figure 0006380119

また、上記実施形態は、更に種々の変更が可能である。上記実施形態は、図4に示す誤差一定制御処理の中のブロック間角度補正処理(S28)を省略してもよい。   Further, various modifications can be made to the above embodiment. In the above embodiment, the inter-block angle correction process (S28) in the constant error control process shown in FIG. 4 may be omitted.

また上記実施形態は、NCプログラムが指令する経路に沿って工具を移動するが、経路に沿ってワークを移動させてもよい。   Moreover, although the said embodiment moves a tool along the path | route which an NC program commands, you may move a workpiece | work along a path | route.

また上記実施形態は、主軸の軸線が上下方向に延びる立型の工作機械1を例に説明したが、主軸の軸線が水平方向に延びる横型の工作機械にも適用可能である。   Moreover, although the said embodiment demonstrated the vertical type machine tool 1 in which the axis line of a main axis | shaft extended to an up-down direction as an example, it is applicable also to the horizontal type machine tool in which the axis line of a main axis | shaft extends in a horizontal direction.

また上記実施形態は、モータの加減速時定数として移動平均を行うFIRフィルタの時定数を用いたが、時定数を持つその他フィルタについても適用可能である。例えば、FIRフィルタの代わりに[数17]に示すような1次のローパスフィルタを用いて加減速を行っても良い。Tは時定数である。

Figure 0006380119
Moreover, although the said embodiment used the time constant of the FIR filter which performs a moving average as an acceleration / deceleration time constant of a motor, it is applicable also to the other filter with a time constant. For example, acceleration / deceleration may be performed using a primary low-pass filter as shown in [Equation 17] instead of the FIR filter. T is a time constant.
Figure 0006380119

1 工作機械
30 数値制御装置
31 CPU
51 Z軸モータ
52 X軸モータ
53 Y軸モータ
1 Machine tool 30 Numerical control device 31 CPU
51 Z-axis motor 52 X-axis motor 53 Y-axis motor

Claims (4)

NCプログラムが指令する複数の指令点について隣接する指令点を補間して得られる経路に沿って工具又はワークを移動してワーク加工を実行する数値制御装置において、
前記工具又はワークを移動するモータの加減速時定数と、前記経路に対して許容する許容誤差と、前記工具又はワークの移動速度を指令する指令速度と、前記経路のうち、前記NCプログラム中の今回の補間指令で補間する第一ブロックと、前回の補間指令で補間した第二ブロックの間の角度であるブロック間角度に基づき、前記モータに前記今回の補間指令を開始させる時機を演算する演算手段と、
前記演算手段が演算した前記時機に基づき、前記モータに前記今回の補間指令を実行させる実行手段と
を備え、
前記演算手段は、
前記ブロック間角度を演算するブロック間角度演算手段と、
前記ブロック間角度演算手段が演算した前記ブロック間角度を補正する補正手段と
を備え、
前記補正手段は、
前記第一ブロックよりも過去のブロックである過去ブロックの補間指令の開始点から、前記第一ブロックの補間指令の開始点までの範囲に属する全ブロックの夫々の補間指令の開始点と前記第一ブロックの前記補間指令の開始点とを相互に結ぶ複数の直線と、前記第一ブロックとが成す角度のうち最も小さい角度が前記ブロック間角度よりも小さい時、前記ブロック間角度を前記最も小さい角度に補正する
ことを特徴とする数値制御装置。
In a numerical control apparatus for moving a tool or a workpiece along a path obtained by interpolating adjacent command points for a plurality of command points commanded by an NC program,
The acceleration / deceleration time constant of the motor that moves the tool or workpiece, the allowable error that is allowed for the path, the command speed that commands the moving speed of the tool or workpiece, and the path in the NC program Calculation that calculates the timing for the motor to start the current interpolation command based on the angle between the first block that is interpolated by the current interpolation command and the second block that is interpolated by the previous interpolation command. Means,
An execution means for causing the motor to execute the current interpolation command based on the timing calculated by the calculation means;
The computing means is
An inter-block angle calculating means for calculating the inter-block angle;
Correction means for correcting the inter-block angle calculated by the inter-block angle calculation means,
The correction means includes
The interpolation command start point of each block belonging to the range from the start point of the interpolation command of the past block, which is a block past the first block, to the start point of the interpolation command of the first block, and the first block when the start point of the interpolation command of the block and mutually sintering department number multiple of straight, the smallest angle of the first block and is an angle less than the inter-block angle, the most the interblock angle A numerical control device characterized by correcting to a small angle.
請求項1に記載の数値制御装置であって、
前記過去ブロックは、
前記第一ブロックの前記補間指令の開始点から前記加減速時定数の半分の時間前に遡った位置を含むブロックである
ことを特徴とする数値制御装置。
The numerical control device according to claim 1,
The past block is
The numerical control apparatus according to claim 1, wherein the numerical control apparatus is a block including a position retroactive to a half time before the acceleration / deceleration time constant from the start point of the interpolation command of the first block.
請求項2に記載の数値制御装置であって、
前記加減速時定数は複数である
ことを特徴とする数値制御装置。
The numerical control device according to claim 2,
The numerical control apparatus according to claim 1, wherein the acceleration / deceleration time constant is plural.
NCプログラムが指令する複数の指令点について隣接する指令点を補間して得られる経路に沿って工具又はワークを移動してワーク加工を実行する数値制御装置の制御方法において、
前記工具又はワークを移動するモータの加減速時定数と、前記経路に対して許容する許容誤差と、前記工具又はワークの移動速度を指令する指令速度と、前記経路のうち、前記NCプログラム中の今回の補間指令で補間する第一ブロックと、前回の補間指令で補間した第二ブロックの間の角度であるブロック間角度に基づき、前記モータに前記今回の補間指令を開始させる時機を演算する演算工程と、
前記演算工程で演算した前記時機に基づき、前記モータに前記今回の補間指令を実行させる実行工程と
を備え、
前記演算工程は、
前記ブロック間角度を演算するブロック間角度演算工程と、
前記ブロック間角度演算工程で演算した前記ブロック間角度を補正する補正工程と
を備え、
前記補正工程では、
前記第一ブロックよりも過去のブロックである過去ブロックの補間指令の開始点から、前記第一ブロックの補間指令の開始点までの範囲に属する全ブロックの夫々の補間指令の開始点と前記第一ブロックの前記補間指令の開始点とを相互に結ぶ複数の直線と、前記第一ブロックとが成す角度のうち最も小さい角度が前記ブロック間角度よりも小さい時、前記ブロック間角度を前記最も小さい角度に補正する
ことを特徴とする制御方法。
In a control method of a numerical controller that moves a tool or a workpiece along a path obtained by interpolating adjacent command points for a plurality of command points commanded by an NC program,
The acceleration / deceleration time constant of the motor that moves the tool or workpiece, the allowable error that is allowed for the path, the command speed that commands the moving speed of the tool or workpiece, and the path in the NC program Calculation that calculates the timing for the motor to start the current interpolation command based on the angle between the first block that is interpolated by the current interpolation command and the second block that is interpolated by the previous interpolation command. Process,
An execution step of causing the motor to execute the current interpolation command based on the timing calculated in the calculation step;
The calculation step includes
An inter-block angle calculating step for calculating the inter-block angle;
A correction step of correcting the inter-block angle calculated in the inter-block angle calculation step,
In the correction step,
The interpolation command start point of each block belonging to the range from the start point of the interpolation command of the past block, which is a block past the first block, to the start point of the interpolation command of the first block, and the first block when the start point of the interpolation command of the block and mutually sintering department number multiple of straight, the smallest angle of the first block and is an angle less than the inter-block angle, the most the interblock angle A control method characterized by correcting to a small angle.
JP2015008207A 2015-01-20 2015-01-20 Numerical control device and control method Active JP6380119B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015008207A JP6380119B2 (en) 2015-01-20 2015-01-20 Numerical control device and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015008207A JP6380119B2 (en) 2015-01-20 2015-01-20 Numerical control device and control method

Publications (2)

Publication Number Publication Date
JP2016133988A JP2016133988A (en) 2016-07-25
JP6380119B2 true JP6380119B2 (en) 2018-08-29

Family

ID=56464354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015008207A Active JP6380119B2 (en) 2015-01-20 2015-01-20 Numerical control device and control method

Country Status (1)

Country Link
JP (1) JP6380119B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6769219B2 (en) * 2016-09-30 2020-10-14 ブラザー工業株式会社 Numerical control device
CN108375957B (en) * 2017-01-31 2021-03-26 兄弟工业株式会社 Numerical controller and control method
JP7037457B2 (en) * 2018-09-05 2022-03-16 オークマ株式会社 Numerical control device and numerical control method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05313729A (en) * 1992-05-08 1993-11-26 Hitachi Seiki Co Ltd Numerical controller
JPH06110534A (en) * 1992-09-29 1994-04-22 Intetsuku:Kk Position control method for machine tool
JPH07200034A (en) * 1993-12-30 1995-08-04 Nippei Toyama Corp Device and method for controlling acceleration/ deceleration for working head
JP2000311010A (en) * 1999-04-27 2000-11-07 Mitsubishi Electric Corp Track controller, program generation device and program conversion device
JP2001312309A (en) * 2000-04-28 2001-11-09 Makino Milling Mach Co Ltd Numerical control working machine and acceleration/ deceleration control method therefor
JP2004326238A (en) * 2003-04-22 2004-11-18 Toshiba Mach Co Ltd Numerical control device and numerical control method
JP5317532B2 (en) * 2008-05-23 2013-10-16 三菱電機株式会社 Numerical controller

Also Published As

Publication number Publication date
JP2016133988A (en) 2016-07-25

Similar Documents

Publication Publication Date Title
JP6435872B2 (en) Numerical control device and control method
JP5417392B2 (en) Numerical controller
JP5009010B2 (en) Numerical controller
JP5762625B2 (en) Trajectory control device
JP6450732B2 (en) Numerical controller
JP2011237885A (en) Numerical control apparatus with function of tip r correction or tool diameter correction in control by tabular data
JP5079165B2 (en) Numerical control apparatus and numerical control method
JP6380119B2 (en) Numerical control device and control method
JP2010170435A (en) System and method for instructing motion control, and motion control system
WO2013179366A1 (en) Numerical control device
EP1508843B1 (en) Numerical control apparatus
JP5905521B2 (en) Numerical control device characterized by suppressing backlash generated during tool tip point control
JP2008046899A (en) Numerical control device
JP2017084189A (en) Control apparatus, machine tool, control method and computer program
JP2007304714A (en) Numerical control device
CN108375957B (en) Numerical controller and control method
JP5983181B2 (en) Numerical control device and control method
JP6455019B2 (en) Robot control apparatus and control method
JP5573664B2 (en) Numerical control apparatus, movement control method, movement control program, and storage medium
JP5875740B1 (en) Numerical controller
JP5375703B2 (en) Numerical controller
JP5143661B2 (en) NC lathe control method and control device
JP5659666B2 (en) Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium
JP6068614B2 (en) Numerical control device characterized by suppressing backlash generated during tool tip point control
WO2002033815A1 (en) Method for controlling acceleration/deceleration of motor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180314

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180403

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180524

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: 20180703

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180716

R150 Certificate of patent or registration of utility model

Ref document number: 6380119

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150