JP6885350B2 - Numerical control device and control method - Google Patents

Numerical control device and control method Download PDF

Info

Publication number
JP6885350B2
JP6885350B2 JP2018013342A JP2018013342A JP6885350B2 JP 6885350 B2 JP6885350 B2 JP 6885350B2 JP 2018013342 A JP2018013342 A JP 2018013342A JP 2018013342 A JP2018013342 A JP 2018013342A JP 6885350 B2 JP6885350 B2 JP 6885350B2
Authority
JP
Japan
Prior art keywords
error
point
command
block
interpolation
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
JP2018013342A
Other languages
Japanese (ja)
Other versions
JP2018124996A (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
Publication of JP2018124996A publication Critical patent/JP2018124996A/en
Application granted granted Critical
Publication of JP6885350B2 publication Critical patent/JP6885350B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/41Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by interpolation, e.g. the computation of intermediate points between programmed end points to define the path to be followed and the rate of travel along that path
    • G05B19/4103Digital interpolation
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34085Software interpolator

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)
  • Automatic Control Of Machine Tools (AREA)

Description

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

工作機械の数値制御装置は、NCプログラムで指令した経路に沿って工具又は被削材を移動して加工を行う。その際、数値制御装置は自動的に滑らかな加減速を行い、工作機械の振動を抑える為の加減速制御を行う。加減速制御を行う時、ブロックとブロックの継ぎ目で一旦停止を行うと加工周期が延びる。故に数値制御装置は一つ前のブロックの減速中に新たなブロックの加速を開始する制御方式を採用することで、加工周期の短縮を図る。該方式は、継ぎ目部分のコーナで内回り誤差が発生するという問題点がある。特許文献1が開示する数値制御装置は、ブロックの移動指令開始を遅延することで、ブロックの継ぎ目部分で一つ前のブロックの減速と新たなブロックの加速が重なる重なり時間を調整する。内回り誤差は重なり時間に起因する。故に数値制御装置は内回り誤差を許容誤差内に調整できる。 The numerical control device of a machine tool moves a tool or a work material along a path instructed by an NC program to perform machining. 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 accelerating / decelerating control is performed, the machining cycle is extended once the block is stopped at the joint between blocks. Therefore, the numerical control device shortens the machining cycle by adopting a control method that starts acceleration of a new block while decelerating the previous block. This method has a problem that an inner loop error occurs at the corner of the seam portion. The numerical control device disclosed in Patent Document 1 adjusts the overlap time in which the deceleration of the previous block and the acceleration of the new block overlap at the joint portion of the blocks by delaying the start of the movement command of the blocks. The inner loop error is due to the overlap time. Therefore, the numerical control device can adjust the inner loop error within the margin of error.

特開2016−133988号公報Japanese Unexamined Patent Publication No. 2016-133988

上記の数値制御装置は、特に微小ブロックが連続する滑らかな移動経路にて、コーナ部分の減速とブロック部分の加速を頻繁に繰り返すので、加工面の品質が低下するという問題点があった。 The above-mentioned numerical control device has a problem that the quality of the machined surface deteriorates because the deceleration of the corner portion and the acceleration of the block portion are frequently repeated, particularly in a smooth movement path in which minute blocks are continuous.

本発明の目的は、微小ブロックが連続する移動経路であっても加工品質を向上できる数値制御装置と制御方法を提供することである。 An object of the present invention is to provide a numerical control device and a control method capable of improving processing quality even in a continuous movement path of minute blocks.

本発明の請求項1に係る数値制御装置は、NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、各指令点の間の距離と速度の情報を含む速度プロファイルを作成し、フィルタによる加減速処理を行った結果に基づき、工具又は被削材の移動を制御する制御手段を備える数値制御装置において、前記制御手段は、前記経路中の前記指令点の中から注目する指令点を注目指令点として指定する指定手段と、前記指定手段が指定した前記注目指令点の前後において、前記フィルタの時定数に基づく時間の区間を指定する区間指定手段と、前記区間指定手段が指定する前記区間を所定時間で分割し、指令補間点を計算する分割手段と、前記指令補間点について、前記分割手段が分割した前記区間を前記フィルタと同等の時定数を持つフィルタで処理し、動作補間点を計算する処理手段と、前記処理手段で処理した前記区間において、前記注目指令点における移動平均フィルタで処理した動作補間点におけるプログラム経路からの誤差を算出する誤差算出手段と、前記誤差算出手段が算出した前記誤差が、予め設定した規定値を超えるか判断する判断手段と、前記判断手段が、前記誤差は前記規定値を超えると判断した場合、前記規定値と前記誤差に基づく減速率を算出する算出手段と、前記区間指定手段が指定した前記区間と、前記算出手段が算出した前記減速率とに基づき、前記速度プロファイルを更新する更新手段とを備えたことを特徴とする。数値制御装置は指令点のみで減速するのではなく、該指令点を含む区間で減速するので、仮に微小ブロックが連続するような経路においても頻繁に加減速を繰り返すことが無い。故に数値制御装置は被削材の加工面の品質を向上できる。数値制御装置は、経路中の各指令点について複数の注目指令点を順に指定することで、経路中のコーナ部分、円弧部分、曲線部分において加減速によって生じる誤差を総合的に抑制できる。 The numerical control device according to claim 1 of the present invention creates a speed profile including information on the distance and speed between each command point along a path obtained by interpolating a plurality of command points commanded by an NC program. Then, in the numerical control device including the control means for controlling the movement of the tool or the work material based on the result of the acceleration / deceleration process by the filter, the control means pays attention from the command points in the path. The designation means for designating the command point as the attention command point, the section designation means for designating the time interval based on the time constant of the filter before and after the attention command point designated by the designation means, and the section designation means the section to be specified by dividing a predetermined time, and dividing means for calculating a command interpolation point, for the instruction interpolation point, processing the section in which the dividing means is divided by a filter having a time constant equivalent to the filter, The processing means for calculating the motion interpolation point, the error calculating means for calculating the error from the program path at the motion interpolation point processed by the moving average filter at the attention command point in the section processed by the processing means, and the error. A determination means for determining whether the error calculated by the calculation means exceeds a preset specified value, and a deceleration based on the specified value and the error when the determination means determines that the error exceeds the specified value. It is characterized by including a calculation means for calculating the rate, the section designated by the section designation means, and an update means for updating the speed profile based on the deceleration rate calculated by the calculation means. Since the numerical control device does not decelerate only at the command point but decelerates in the section including the command point, acceleration / deceleration is not frequently repeated even in a path where minute blocks are continuous. Therefore, the numerical control device can improve the quality of the machined surface of the work material. The numerical control device can comprehensively suppress errors caused by acceleration / deceleration in the corner portion, the arc portion, and the curved portion in the route by designating a plurality of attention command points in order for each command point in the route.

請求項2に係る数値制御装置の前記区間は、前記注目指令点の前において、少なくとも前記フィルタの時定数の合計の半分の時間で移動する小区間を含み、前記注目指令点の後においても、同様の小区間を含むとよい。故に数値制御装置は、指令点における誤差に影響する区間において速度プロファイルを更新できるので、指令点における誤差を効果的に抑制できる。 The section of the numerical control device according to claim 2 includes a small section that moves in front of the attention command point in at least half the time of the total time constant of the filter, and even after the attention command point. Similar subsections may be included. Therefore, since the numerical control device can update the speed profile in the section that affects the error at the command point, the error at the command point can be effectively suppressed.

請求項3に係る数値制御装置の前記算出手段は、前記規定値を前記誤差で除して得られる割合を前記減速率として算出するとよい。故に数値制御装置は減速率を容易に算出できる。 The calculation means of the numerical control device according to claim 3 may calculate the ratio obtained by dividing the specified value by the error as the deceleration rate. Therefore, the numerical control device can easily calculate the deceleration rate.

請求項4に係る数値制御装置は、前記算出手段が算出した前記減速率で前記区間を移動したときの前記誤差が前記規定値に対して許容範囲内か否か判断する誤差判断手段と、前記誤差判断手段が、前記誤差は前記許容範囲外であると判断した場合、前記誤差が前記許容範囲内となるように前記減速率を変更する変更手段とを備えるとよい。数値制御装置は、誤差が許容範囲内となるように減速率を変更するので、減速し過ぎることが無い。故に数値制御装置は短い加工周期で被削材の加工を完了できる。減速が不足することも無いので、誤差が許容範囲を超えないことがより確かとなる。 The numerical control device according to claim 4 includes an error determining means for determining whether or not the error when moving in the section at the deceleration rate calculated by the calculating means is within an allowable range with respect to the specified value, and the above. When the error determining means determines that the error is out of the permissible range, it is preferable to include a changing means for changing the deceleration rate so that the error is within the permissible range. Since the numerical control device changes the deceleration rate so that the error is within the permissible range, the deceleration does not occur too much. Therefore, the numerical control device can complete the machining of the work material in a short machining cycle. Since there is no shortage of deceleration, it is more certain that the error does not exceed the permissible range.

請求項5に係る数値制御装置は、前記経路中の各指令点間であるブロックが直線補間であるか円弧補間であるかを判断する補間判断手段と、前記補間判断手段が、前記ブロックは前記円弧補間であると判断した場合、前記円弧補間の部分に仮想指令点を追加する追加手段とを備え、前記指定手段は、前記補間判断手段が、前記ブロックは前記直線補間であると判断した場合、前記ブロックの終点を前記注目指令点として指定し、前記補間判断手段が、前記ブロックは前記円弧補間であると判断した場合、前記追加手段が追加した前記仮想指令点と、前記ブロックの終点とを前記注目指令点として夫々指定するとよい。経路中のブロックが円弧補間である場合、円弧補間の部分に仮想指令点を追加することで、円弧部分の曲率に起因する内回りの誤差を考慮できる。故に円弧補間の場合でも、仮想指令点における内回り誤差、即ち円弧に対する内回り誤差を規定値以下に抑制できる。故に円弧補間の部分においても、被削材の加工面の品質を向上できる。 The numerical control device according to claim 5 includes an interpolation determining means for determining whether a block between each command point in the path is linear interpolation or an arc interpolation, and the interpolation determining means, wherein the block is the said. When it is determined that it is arc interpolation, it is provided with an additional means for adding a virtual command point to the arc interpolation portion, and the designation means determines that the interpolation determination means is the linear interpolation for the block. When the end point of the block is designated as the attention command point and the interpolation determination means determines that the block is the arc interpolation, the virtual command point added by the additional means and the end point of the block May be designated as the point of interest, respectively. When the block in the path is circular interpolation, by adding a virtual command point to the circular interpolation part, the inward error due to the curvature of the circular part can be taken into consideration. Therefore, even in the case of circular interpolation, the inner loop error at the virtual command point, that is, the inner loop error with respect to the arc can be suppressed to a specified value or less. Therefore, the quality of the machined surface of the work material can be improved even in the arc interpolation portion.

請求項6に係る数値制御装置の前記更新手段は、前記注目指令点が前記ブロックの終点である場合、前記算出手段が算出した前記減速率で移動する減速区間を、前記区間に設定する第一設定手段と、前記注目指令点が前記仮想指令点である場合、前記減速区間を、少なくとも前記円弧補間の全域に設定する第二設定手段とを備えるとよい。注目指令点が円弧上に追加された仮想指令点である場合、数値制御装置は減速区間を円弧補間の全域に設定する。故に数値制御装置は円弧部分の曲率に起因する内回りの誤差を考慮できる。 When the attention command point is the end point of the block, the updating means of the numerical control device according to claim 6 sets a deceleration section that moves at the deceleration rate calculated by the calculation means in the section. It is preferable to include a setting means and a second setting means for setting the deceleration section to at least the entire area of the arc interpolation when the attention command point is the virtual command point. When the command point of interest is a virtual command point added on the arc, the numerical controller sets the deceleration section over the entire arc interpolation. Therefore, the numerical control device can consider the inner loop error due to the curvature of the arc portion.

請求項7に係る数値制御装置は、前記更新手段が前記速度プロファイルを更新した後、前記速度プロファイルに基づき移動した場合の前記誤差を再度算出する再算出手段と、前記再算出手段が再度算出した前記誤差が前記規定値を超えるか再度判断する再判断手段とを備え、前記制御手段は、前記再判断手段が、前記誤差は前記規定値を超えると判断した場合、前記算出手段、及び前記更新手段による各処理を再度実行するとよい。故に数値制御装置は経路からの誤差を規定値以下に確実に抑制できる。 The numerical control device according to claim 7 includes a recalculation means for recalculating the error when the updating means updates the speed profile and then moves based on the speed profile, and the recalculation means recalculates. The control means includes a re-judgment means for re-determining whether the error exceeds the specified value, and when the re-judgment means determines that the error exceeds the specified value, the calculation means and the update. It is advisable to re-execute each process by means. Therefore, the numerical control device can surely suppress the error from the path to the specified value or less.

請求項8に係る数値制御装置は、前記更新手段が前記速度プロファイルを更新した後、前記速度プロファイルに基づき移動した場合の前記誤差を再度算出する再算出手段と、前記再算出手段が再度算出した前記誤差が前記規定値を超えるか再度判断する再判断手段とを備え、前記制御手段は、前記再判断手段が、前記誤差は前記規定値を超えると判断した場合、前記誤差が前記規定値以下となるまで、前記算出手段、及び前記更新手段による各処理を繰り返し実行するとよい。故に数値制御装置は経路からの誤差を規定値以下に確実に抑制できる。 The numerical control device according to claim 8 includes a recalculation means for recalculating the error when the updating means updates the speed profile and then moves based on the speed profile, and the recalculation means recalculates. The control means includes a re-judgment means for re-determining whether the error exceeds the specified value, and when the re-judgment means determines that the error exceeds the specified value, the error is equal to or less than the specified value. It is preferable to repeatedly execute each process by the calculation means and the update means until the result becomes. Therefore, the numerical control device can surely suppress the error from the path to the specified value or less.

本発明の請求項9に係る制御方法は、NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、各指令点の間の距離と速度の情報を含む速度プロファイルを作成し、フィルタによる加減速処理を行った結果に基づき、工具又は被削材の移動を制御する数値制御装置の制御方法において、前記経路中の前記指令点の中から注目する指令点を注目指令点として指定する指定工程と、前記指定工程で指定した前記注目指令点の前後において、前記フィルタの時定数に基づく時間の区間を指定する区間指定工程と、前記区間指定工程で指定する前記区間を所定時間で分割し、指令補間点を計算する分割工程と、前記指令補間点について、前記分割工程で分割した前記区間を前記フィルタと同等の時定数を持つフィルタで処理し、動作補間点を計算する処理工程と、前記処理工程で処理した前記区間において、前記注目指令点における移動平均フィルタで処理した動作補間点におけるプログラム経路からの誤差を算出する誤差算出工程と、前記誤差算出工程で算出した前記誤差が、予め設定した規定値を超えるか判断する判断工程と、前記判断工程において、前記誤差は前記規定値を超えると判断した場合、前記規定値と前記誤差に基づく減速率を算出する算出工程と、前記区間指定工程において指定した前記区間と、前記算出工程で算出した前記減速率とに基づき、前記速度プロファイルを更新する更新工程とを備えたこと
を特徴とする。故に数値制御装置は上記各工程を実行することで、請求項1の効果を得ることができる。

The control method according to claim 9 of the present invention creates a speed profile including information on the distance and speed between each command point along a path obtained by interpolating a plurality of command points commanded by an NC program. In the control method of the numerical control device that controls the movement of the tool or the work material based on the result of the acceleration / deceleration processing by the filter, the command point to be noted from the command points in the path is set as the attention command point. Before and after the designated process designated in the designated step and the attention command point designated in the designated step, a section designation step for designating a time interval based on the time constant of the filter and the section designated in the section designation step are designated for a predetermined time. A division step of dividing by and calculating a command interpolation point, and a process of processing the section divided in the division step with a filter having a time constant equivalent to that of the filter to calculate an operation interpolation point. The error calculation step for calculating the error from the program path at the motion interpolation point processed by the moving average filter at the attention command point in the step and the section processed in the processing step, and the error calculated in the error calculation step. However, in the determination step of determining whether or not the predetermined value exceeds the preset value, and in the determination step, when it is determined that the error exceeds the specified value, the specified value and the calculation step of calculating the deceleration rate based on the error. It is characterized by including the section designated in the section designation step and an update step of updating the speed profile based on the deceleration rate calculated in the calculation step. Therefore, the numerical control device can obtain the effect of claim 1 by executing each of the above steps.

数値制御装置30と工作機械1の電気的構成を示すブロック図。The block diagram which shows the electrical structure of a numerical control device 30 and a machine tool 1. 移動速度を二段の移動平均フィルタで処理した図。The figure which processed the moving speed by a two-step moving average filter. 直線補間ブロックB1とB2で構成するプログラム経路R1と、フィルタ処理後の経路R2の図。The figure of the program path R1 composed of linear interpolation blocks B1 and B2, and the path R2 after filtering. 図3に示す経路R2を移動する時の移動速度1と2の変化を示す図。The figure which shows the change of the moving speed 1 and 2 when moving the path R2 shown in FIG. プログラム経路R3を減速しない時の経路R4と、全自動減速処理した時の経路R5の図である。It is a figure of the path R4 when the program path R3 is not decelerated, and the path R5 when the fully automatic deceleration processing is performed. 減速しない時の速度ブロックと、全自動減速処理した時の速度ブロックを示す図である。It is a figure which shows the speed block at the time of not decelerating, and the speed block at the time of fully automatic deceleration processing. メイン処理の流れ図。Flow diagram of main processing. ブロック情報20の概念図。The conceptual diagram of the block information 20. 全自動減速処理の流れ図。Flow chart of fully automatic deceleration processing. 減速計算処理の流れ図。Flow chart of deceleration calculation processing. 円弧補間に設定する円弧中央指令点を示す図。The figure which shows the arc center command point to be set for arc interpolation. 円弧中央指令点計算処理の流れ図。A flow chart of the arc center command point calculation process. プログラム経路における着目指令点、影響開始点、影響終了点を示す図。The figure which shows the attention command point, the influence start point, and the influence end point in a program path. 影響区間計算処理の流れ図。Flow chart of influence section calculation process. 着目指令点よりも前の影響区間(T/2)と影響開始点を示す図。The figure which shows the influence section (T / 2) before the command point of interest and the influence start point. 着目指令点よりも後の影響区間(T/2)と影響終了点を示す図。The figure which shows the influence section (T / 2) after the command point of interest and the influence end point. 誤差計算処理の流れ図。Flow diagram of error calculation processing. 指令点と探索点の誤差を示す図。The figure which shows the error of a command point and a search point. ベクトルの成す角が鋭角の場合における指令点からの最接近点を示す図。The figure which shows the closest approach point from a command point when the angle formed by a vector is an acute angle. 誤差が二番目に小さい動作補間点を、誤差最小の動作補間点から見たベクトルpと、指令点を誤差最小の動作補間点から見たベクトルεを示す図。The figure which shows the vector p which saw the motion interpolation point with the second smallest error from the motion interpolation point of the minimum error, and vector ε 2 which saw the command point from the motion interpolation point of the minimum error. 図20における指令点からの最接近点と誤差εを示す図である。It is a figure which shows the approach point from a command point in FIG. 20, and an error ε. ベクトルの成す角が鈍角の場合における指令点からの最接近点を示す図。The figure which shows the closest approach point from a command point when the angle formed by a vector is an obtuse angle. 誤差抑制処理の流れ図である。It is a flow chart of an error suppression process. 線形補間で誤差を目標誤差に近付ける方法を示す図。The figure which shows the method of making an error close to a target error by linear interpolation. 速度プロファイル更新処理の流れ図。Flow chart of speed profile update process. C3指令点を着目指令点に指定したときの影響区間を示す図。The figure which shows the influence section when the C3 command point is designated as the attention command point. C3指令点の速度プロファイルを示す図表。The chart which shows the velocity profile of the C3 command point. C4指令点を着目指令点に指定したときの影響区間を示す図。The figure which shows the influence section when the C4 command point is designated as the attention command point. C4指令点の速度プロファイルを示す図表。The chart which shows the velocity profile of the C4 command point. C3指令点とC4指令点の各速度プロファイルを重ね合わせた図表。A chart in which each speed profile of the C3 command point and the C4 command point is superimposed. C3指令点とC4指令点の各速度プロファイルを統合した速度プロファイルデータの概念図。The conceptual diagram of the speed profile data which integrated each speed profile of a C3 command point and a C4 command point. 円弧中央指令点の減速区間を円弧全域に設定した図。The figure which set the deceleration section of the arc center command point to the whole arc. 円弧中央指令点の速度プロファイルを示す図表。A chart showing the velocity profile of the arc center command point. 着目指令点の誤差を抑制する為に減速した結果、次の指令点の誤差が大きくなった移動軌跡とその拡大図。As a result of decelerating to suppress the error of the command point of interest, the error of the next command point has increased. The movement locus and its enlarged view. 誤差確認処理の流れ図。Flow diagram of error confirmation processing. ブロックB1とB2で構成する経路に仮想指令点を追加した図。The figure which added the virtual command point to the path which consists of blocks B1 and B2. 減速計算処理で生成した速度プロファイルを示す図。The figure which shows the velocity profile generated by the deceleration calculation process. 誤差確認処理で生成した速度プロファイルを示す図。The figure which shows the velocity profile generated by the error confirmation processing. 二つの速度プロファイルデータを纏めた図。The figure which put together the two speed profile data. 置換処理後の速度プロファイルデータを示す図。The figure which shows the velocity profile data after a replacement process. シミュレーションに用いたプログラム経路を示す図。The figure which shows the program path used for the simulation. シミュレーション結果である速度プロファイルを示す図。The figure which shows the velocity profile which is a simulation result. シミュレーション結果である移動速度(フィルタ処理後)を示す図。The figure which shows the moving speed (after filtering) which is a simulation result. シミュレーション結果である移動経路を示す図。The figure which shows the movement path which is a simulation result. シミュレーション結果である誤差を示す図。The figure which shows the error which is a simulation result. 長ブロックの後に微小ブロックが連続するプログラム経路を示す図。The figure which shows the program path which a small block continues after a long block. 速度分割数調整処理の流れ図。Flow chart of speed division number adjustment processing. 速度分割数調整処理の前後の速度プロファイルを示す図。The figure which shows the speed profile before and after the speed division number adjustment processing.

以下、本発明の実施形態を説明する。図1は本発明が対象とする工作機械の構成の一例である。図1に示す数値制御装置30は工作機械1の軸移動を制御することで、テーブル(図示略)上面に保持した被削材(図示略)の切削加工を行う。工作機械1の左右方向、前後方向、上下方向は、夫々X軸方向、Y軸方向、Z軸方向である。 Hereinafter, embodiments of the present invention will be described. FIG. 1 is an example of the configuration of a machine tool targeted by the present invention. The numerical control device 30 shown in FIG. 1 controls the axial movement of the machine tool 1 to cut a work material (not shown) held on the upper surface of a table (not shown). The horizontal direction, the front-rear direction, and the vertical direction of the machine tool 1 are the X-axis direction, the Y-axis direction, and the Z-axis direction, respectively.

図1を参照し、工作機械1の構成を説明する。工作機械1は、例えばテーブル上面に保持した被削材に対し、主軸に装着した工具をX軸方向、Y軸方向、Z軸方向に移動して切削加工を行う立型工作機械である。工作機械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に各々接続する。 The configuration of the machine tool 1 will be described with reference to FIG. The machine tool 1 is, for example, a vertical machine tool that cuts a work material held on the upper surface of a table by moving a tool mounted on a spindle in the X-axis direction, the Y-axis direction, and the Z-axis direction. The machine tool 1 includes a spindle mechanism (not shown), a spindle moving mechanism, a tool changing device, and the like. The spindle mechanism includes a spindle motor 52 and rotates a spindle equipped with a tool. The spindle moving mechanism includes a Z-axis motor 51, an X-axis motor 53, and a Y-axis motor 54, and moves the spindle in each axial direction of XYZ relative to the work material supported on the upper surface of the table (not shown). .. The tool changing device includes a magazine motor 55, drives a tool magazine (not shown) for storing a plurality of tools, and replaces a 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 control device 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 the drive circuits 51A to 55A 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〜55Aはサーボアンプである。駆動回路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 controls the numerical control device 30 in an integrated manner. The ROM 32 stores various programs such as the main program. The RAM 33 stores various data during execution of various processes. The storage device 34 is a non-volatile memory. The input / output unit 35 is connected to the operation panel 10. The drive circuits 51A to 55A are servo amplifiers. 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 a drive signal 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, an FPGA circuit.

図2を参照し、加減速処理に用いる移動平均フィルタと時定数を説明する。数値制御装置30は、NCプログラムの補間指令に基づき、X軸、Y軸、Z軸の軸毎に、目標位置、移動距離、移動速度、移動時間等を夫々演算する。補間指令は、アドレスで指定した移動速度で軸を動かす時に使用する制御指令であり、例えば直線補間指令、円弧補間指令等である。数値制御装置30は、補間後加減速処理を行う。補間後加減速処理は、演算した軸毎の移動速度に、移動平均フィルタ(FIRフィルタ)を少なくとも二回以上通して速度変化を滑らかにする処理である。 A moving average filter and a time constant used for acceleration / deceleration processing will be described with reference to FIG. The numerical control device 30 calculates the target position, the moving distance, the moving speed, the moving time, etc. for each of the X-axis, the Y-axis, and the Z-axis based on the interpolation command of the NC program. The interpolation command is a control command used when moving the axis at a moving speed specified by an address, and is, for example, a linear interpolation command, an arc interpolation command, or the like. The numerical control device 30 performs acceleration / deceleration processing after interpolation. The post-interpolation acceleration / deceleration process is a process in which a moving average filter (FIR filter) is passed through the calculated moving speed for each axis at least twice to smooth the speed change.

図2は、X軸方向においてxからxに移動する移動速度を、移動平均フィルタで二回処理した結果を示す。移動平均フィルタの加減速時定数(以下、時定数と呼ぶ)は、移動平均フィルタが平均を行うサンプル数に相当する。例えば、サンプル時間が1msecで、移動平均フィルタの時定数が10msecの時、移動平均フィルタは今回の補間指令を含めて10個前までの指令の平均を今回の出力とする。一段目の移動平均フィルタ(FIR1)の時定数をt、二段目の移動平均フィルタ(FIR2)の時定数をtとする。 Figure 2 shows the results of the moving velocity for moving from x 1 to x 2 in the X-axis direction, and treated twice with moving average filter. The acceleration / deceleration time constant of the moving average filter (hereinafter referred to as the time constant) corresponds to the number of samples averaged by the moving average filter. For example, when the sample time is 1 msec and the time constant of the moving average filter is 10 msec, the moving average filter uses the average of up to 10 commands including the current interpolation command as the current output. Let t 1 be the time constant of the first-stage moving average filter (FIR1) and t 2 be the time constant of the second-stage moving average filter (FIR2).

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

図3,図4を参照し、移動経路中のコーナに生じる内回り誤差を説明する。図3に示す経路R1は、二つの直線補間指令(G1指令)で形成し、直線補間ブロックB1の次に、直線補間ブロックB2が指令点Pで繋がる。ブロックB1はX軸方向への直線補間、ブロックB2はY軸方向への直線補間である。ブロック間角度βは90°である。故に指令点Pはコーナを形成する。図4は、図3の経路R1を移動する際のブロックB1の移動速度(速度1)とブロックB2の移動速度(速度2)を、二段の移動平均フィルタ(FIR1,2)で処理した図である。 The inner loop error that occurs in the corner in the movement path will be described with reference to FIGS. 3 and 4. The path R1 shown in FIG. 3 is formed by two linear interpolation commands (G1 commands), and the linear interpolation block B2 is connected to the linear interpolation block B1 at the command point P after 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 °. Therefore, the command point P forms a corner. FIG. 4 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 R1 of FIG. 3 are processed by a two-stage moving average filter (FIR1, 2). Is.

速度1が最大速度から減速を開始する時、速度2は加速を開始する。速度1と速度2が重なる部分では、工具は経路R1のコーナである指令点P付近を内回りに移動する(経路R2参照)。速度1が最大速度から減速を開始する時、工具はA1に位置する。A2は、指令点Pと経路R2が最も近づく点である。指令点PからA2までの距離が内回り誤差(以下、誤差と呼ぶ)である。速度1が最大速度から減速して0になる時、工具はA3に位置する。A2は、経路R1に対して誤差が最大となる位置である。A3は誤差が解消する位置である。誤差が生じて解消するまでのA1〜A3までの時間は、時定数tとtの合計に相当する。コーナに生じる誤差を目標誤差に抑制する方法の一例として、コーナ手前で減速する方法がある。コーナ手前で減速することで、速度1と速度2の重なり時間を小さくできるので、誤差を目標誤差に抑制できる。但し、後述するように、コーナ手前で減速する方法は、微小ブロックが連続する経路においては問題が生じる。 When speed 1 starts decelerating from the maximum speed, speed 2 starts accelerating. At the portion where the velocity 1 and the velocity 2 overlap, the tool moves inward in the vicinity of the command point P which is the corner of the path R1 (see the path R2). When speed 1 starts decelerating from maximum speed, the tool is located at A1. A2 is the point where the command point P and the path R2 are closest to each other. The distance from the command point P to A2 is the inner loop error (hereinafter referred to as an error). When the velocity 1 decelerates from the maximum velocity to 0, the tool is located at A3. A2 is a position where the error is maximum with respect to the path R1. A3 is the 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. As an example of a method of suppressing the error generated in the corner to the target error, there is a method of decelerating in front of the corner. By decelerating before the corner, the overlapping time of speed 1 and speed 2 can be reduced, so that the error can be suppressed to the target error. However, as will be described later, the method of decelerating before the corner causes a problem in a path in which minute blocks are continuous.

図5,図6を参照し、微小ブロックが連続する経路に生じる内回り誤差と、本発明の概要を説明する。図5(1)に示す経路R3は、NCプログラムに基づくプログラム経路である。経路R3は、ブロック長の短い複数の微小ブロック(G1ブロック)B1〜B6を有する。ブロックとブロックの継ぎ目は指令点である。微小ブロックB1は指令点C0とC1の間、微小ブロックB2は指令点C1とC2の間、微小ブロックB3は指令点C2とC3の間、微小ブロックB4は指令点C3とC4の間、微小ブロックB5は指令点C4とC5の間、微小ブロックB6は指令点C5とC6の間である。 With reference to FIGS. 5 and 6, the inner loop error that occurs in the path in which the minute blocks are continuous and the outline of the present invention will be described. The route R3 shown in FIG. 5 (1) is a program route based on the NC program. Path R3 has a plurality of microblocks (G1 blocks) B1 to B6 having a short block length. The block-to-block seam is the command point. The minute block B1 is between the command points C0 and C1, the minute block B2 is between the command points C1 and C2, the minute block B3 is between the command points C2 and C3, and the minute block B4 is between the command points C3 and C4. B5 is between command points C4 and C5, and microblock B6 is between command points C5 and C6.

図6(1)は、図5(1)の経路R3を移動する際の移動速度を、二段の移動平均フィルタで処理した速度プロファイルである。速度プロファイルとは、各ブロックの距離と速度(切削送り速度)を設定したものである。フィルタ処理後の移動速度は、緩やかに速度を上げて最高速度に達し、微小ブロックB1〜B6においては最高速度で移動し、その後、緩やかに速度を落として停止する。図5(1)に示す経路R4は、図6(1)の移動速度で移動したフィルタ処理後の経路である。微小ブロックB1〜B6が連続する部分では、軸は大きく内回りに移動している。例えば指令点C1を過ぎた直後に次の指令点C2があるので、指令点C1に生じる誤差が解消されないまま次の指令点C2を通過することになる。そして、指令点C3、C4・・・と順次連続して通過するので、経路R4は経路R3に対して大きく内回りに移動することになる。指令点C0〜C6と経路R4との離間距離は誤差に相当する。このような誤差を目標誤差に抑制する為、上記した様に、ブロックの継ぎ目部分で減速する方法を採用した場合、微小ブロックが連続する経路では、ブロックの継ぎ目部分の減速と次のブロックの加速を頻繁に繰り返すことになる。頻繁な加減速を行うと機械の振動が発生し、加工面の品質が低下する場合がある。また、加工面の切削痕(ツールマーク、カッターマーク)は送り速度によって変化するため、加減速を繰り返すと切削痕によるスジが発生し、加工面の品質が低下する。 FIG. 6 (1) is a speed profile obtained by processing the moving speed when moving along the path R3 of FIG. 5 (1) with a two-stage moving average filter. The speed profile sets the distance and speed (cutting feed speed) of each block. The moving speed after the filtering process gradually increases to reach the maximum speed, moves at the maximum speed in the minute blocks B1 to B6, and then gradually slows down and stops. The path R4 shown in FIG. 5 (1) is a path after filtering that has moved at the moving speed of FIG. 6 (1). In the portion where the minute blocks B1 to B6 are continuous, the axis moves largely inward. For example, since there is the next command point C2 immediately after passing the command point C1, the next command point C2 is passed without eliminating the error generated at the command point C1. Then, since the command points C3, C4, and the like are passed in succession in sequence, the route R4 moves largely inward with respect to the route R3. The separation distance between the command points C0 to C6 and the path R4 corresponds to an error. In order to suppress such an error to the target error, when the method of decelerating at the joint part of the block is adopted as described above, the deceleration of the joint part of the block and the acceleration of the next block are performed in the path where the minute blocks are continuous. Will be repeated frequently. Frequent acceleration / deceleration may cause machine vibration and reduce the quality of the machined surface. Further, since the cutting marks (tool mark, cutter mark) on the machined surface change depending on the feed rate, streaks due to the cutting marks occur when acceleration and deceleration are repeated, and the quality of the machined surface deteriorates.

本実施形態は、微小ブロックが連続する経路に生じる誤差を予め設定した目標誤差以下に抑制する為、後述する全自動減速処理(図9参照)を実行する。全自動減速処理は、指令点毎に誤差に影響する影響区間を求め、それら影響区間の減速率を計算し、最適な速度プロファイルを決定する処理である。影響区間とは、指令点の前後の区間であり、本実施形態では時定数合計の半分の時間で移動する小区間である。 In this embodiment, a fully automatic deceleration process (see FIG. 9), which will be described later, is executed in order to suppress an error that occurs in a path in which minute blocks are continuous to a preset target error or less. The fully automatic deceleration process is a process of obtaining the affected sections that affect the error for each command point, calculating the deceleration rate of those affected sections, and determining the optimum speed profile. The influence section is a section before and after the command point, and in the present embodiment, it is a small section that moves in half the time of the total time constant.

図6(2)に示す速度プロファイルは、図6(1)の速度プロファイルを全自動減速処理したものである。全自動減速処理後の移動速度は、フィルタ処理しただけの移動速度とは異なり、速度を上げて最高速度に達した後、微小ブロックB1〜B6を移動する間では、指令点C0〜C6の各影響区間に応じて緩やかに減速する。即ち、微小ブロックB1〜B6が連続する部分では、移動速度は減速と加速を頻繁に繰り返すことが無い。ブロックB6を通過した後、再度最高速度まで加速し、その後、減速して停止する。図5(2)に示す経路R5は、全自動減速処理後の移動経路である。経路R5は、経路R4に比べ、経路R3との誤差が小さい。故に本実施形態は、微小ブロックが連続する経路に生じる誤差を抑制できる。 The speed profile shown in FIG. 6 (2) is a fully automatic deceleration process of the speed profile shown in FIG. 6 (1). The moving speed after the fully automatic deceleration processing is different from the moving speed just filtered, and after increasing the speed and reaching the maximum speed, while moving the minute blocks B1 to B6, each of the command points C0 to C6. Decelerate slowly according to the affected section. That is, in the portion where the minute blocks B1 to B6 are continuous, the moving speed does not frequently repeat deceleration and acceleration. After passing through block B6, it accelerates to the maximum speed again, then decelerates and stops. The route R5 shown in FIG. 5 (2) is a movement route after the fully automatic deceleration process. The error of the route R5 with that of the route R3 is smaller than that of the route R4. Therefore, in this embodiment, it is possible to suppress an error that occurs in a path in which minute blocks are continuous.

図7を参照し、メイン処理を説明する。作業者が操作盤10にてNCプログラムを指定し実行操作を入力すると、CPU31はROM32からメインプログラムを呼び出し、本処理を実行する。CPU31は、指定したNCプログラムを記憶装置34から呼び出して解釈する(S1)。CPU31はNCプログラムの解釈に基づき複数の移動指令を生成する(S2)。移動指令は軸を移動する位置(座標値)を指定する。移動指令の一例は、直線補間指令と円弧補間指令である。移動指令で指定した位置は指令点である。指令点と指令点の間はブロックである。各指令点を結んだ経路はプログラム経路である。 The main process will be described with reference to FIG. 7. When the operator specifies the NC program on the operation panel 10 and inputs the execution operation, the CPU 31 calls the main program from the ROM 32 and executes this process. The CPU 31 calls the designated NC program from the storage device 34 and interprets it (S1). The CPU 31 generates a plurality of movement commands based on the interpretation of the NC program (S2). The move command specifies the position (coordinate value) to move the axis. An example of the movement command is a linear interpolation command and an arc interpolation command. The position specified by the move command is the command point. There is a block between the command points. The route connecting each command point is a program route.

CPU31は生成した複数の移動指令に基づきブロック情報20を作成する(S3)。図8に示すように、ブロック情報20は、ブロック番号と軸移動情報を備える。ブロック番号は、プログラム経路を構成するブロックの順番である。軸移動情報は、各ブロックにおける軸移動に関する情報であり、例えば移動ベクトル、ブロック長、移動速度、移動時間等の各種情報を含む。ブロック情報20はRAM33に記憶する。移動ベクトルは、ブロックの方向ベクトルである。 The CPU 31 creates block information 20 based on a plurality of generated movement commands (S3). As shown in FIG. 8, the block information 20 includes a block number and axis movement information. The block number is the order of the blocks constituting the program path. The axis movement information is information related to the axis movement in each block, and includes various information such as a movement vector, a block length, a movement speed, and a movement time. The block information 20 is stored in the RAM 33. The movement vector is the direction vector of the block.

CPU31は全自動減速モードがオンか否か判断する(S4)。全自動減速モードは、各指令点の影響区間で減速することで、移動経路の誤差を予め設定した目標誤差以下に自動で調整するモードである。全自動減速モードの設定は、例えば操作盤10の入力部24で行うことができる。全自動減速モードがオンの場合(S4:YES)、CPU31は全自動減速処理(図9参照)を実行する(S5)。全自動減速処理実行後、CPU31は本処理を終了する。全自動減速モードがオフの場合(S4:NO)、CPU31は通常処理を実行する(S6)。通常処理は、RAM33に記憶するブロック情報20に基づき、移動速度のフィルタ処理を行い、軸移動について加減速制御を行う。通常処理実行後、CPU31は本処理を終了する。 The CPU 31 determines whether or not the fully automatic deceleration mode is on (S4). The fully automatic deceleration mode is a mode in which the error of the movement path is automatically adjusted to be less than or equal to the preset target error by decelerating in the affected section of each command point. The fully automatic deceleration mode can be set, for example, by the input unit 24 of the operation panel 10. When the fully automatic deceleration mode is on (S4: YES), the CPU 31 executes the fully automatic deceleration process (see FIG. 9) (S5). After executing the fully automatic deceleration process, the CPU 31 ends this process. When the fully automatic deceleration mode is off (S4: NO), the CPU 31 executes normal processing (S6). In the normal processing, the movement speed is filtered based on the block information 20 stored in the RAM 33, and acceleration / deceleration control is performed for the axis movement. After executing the normal process, the CPU 31 ends this process.

図8,図9を参照し、全自動減速処理を説明する。本実施形態は、あるブロックの移動指令を実行するまでに、速度プロファイルを決定する必要がある。速度プロファイルを決定するには、図9に示す全自動減速処理の後述する減速計算処理(S11)と誤差確認処理(S12)を実行する必要がある。故にCPU31はブロックの移動指令を実行する際に、ブロック情報20の先読みが必要である。先読みとは将来実行するブロックを予め読み込むことである。減速計算処理では、各指令点における経路誤差が目標範囲内になる様に、各指令点において、指令点よりも前の過去の影響ブロックと、指令点よりも後の将来の影響ブロックの夫々の速度が変更される。即ち速度プロファイルが更新される。影響ブロックとは、各指令点の誤差に影響を与える範囲内のブロックを示し、後述するように、影響ブロックは指令点の前と後において、それぞれ時定数合計の半分の時間の範囲に存在するブロックである。誤差確認処理では、減速計算処理によって更新された速度プロファイルについて、各指令点における経路誤差が目標範囲内に入っていることの確認を行い、経路誤差が目標範囲内に入っていない場合は再度速度プロファイルの更新処理を行う。減速計算処理においては、前述したように各指令点とその前後の影響範囲内のブロックの速度が更新されるので、相互に影響を与えることを防ぐために誤差確認処理は減速計算処理を行う指令点の影響範囲の外のブロックに対して行う必要がある。即ち、減速計算処理と誤差確認処理の夫々において、過去の影響ブロックと将来の影響ブロックの速度が変更されるので、ブロックの移動指令を実行する際には、少なくとも時定数を2倍した時間後までに処理されるブロックについて先読みする必要がある。 The fully automatic deceleration process will be described with reference to FIGS. 8 and 9. In this embodiment, it is necessary to determine the velocity profile before executing the movement command of a certain block. In order to determine the speed profile, it is necessary to execute the deceleration calculation process (S11) and the error confirmation process (S12), which will be described later, in the fully automatic deceleration process shown in FIG. Therefore, the CPU 31 needs to pre-read the block information 20 when executing the block movement command. Look-ahead is to pre-read a block to be executed in the future. In the deceleration calculation process, at each command point, the past influence block before the command point and the future influence block after the command point are set so that the path error at each command point is within the target range. The speed is changed. That is, the speed profile is updated. The influence block indicates a block within the range that affects the error of each command point, and as described later, the influence block exists in the time range of half of the total time constant before and after the command point. It is a block. In the error confirmation process, for the speed profile updated by the deceleration calculation process, it is confirmed that the path error at each command point is within the target range, and if the path error is not within the target range, the speed is regained. Perform profile update processing. In the deceleration calculation process, the speeds of each command point and the blocks within the influence range before and after it are updated as described above, so the error confirmation process is the command point that performs the deceleration calculation process in order to prevent mutual influence. Must be done for blocks outside the range of influence of. That is, since the speeds of the past influence block and the future influence block are changed in each of the deceleration calculation process and the error confirmation process, when the block movement command is executed, at least after a time of doubling the time constant. It is necessary to look ahead for the blocks processed by.

先読みには、定数SとGを用いる。Sは先読みブロック数、Gは影響ブロック数である。影響ブロックの数は、時定数の合計によって決まるため、時定数が可変のシステムにおいては、時定数の合計が最も大きい状況が最悪条件となる。最悪条件として、例えば時定数合計が6000msec(最大設定値)の場合を考える。また、CPU31の処理周期(サンプル時間)が1msecの時、CPU31が処理できるもっとも短いブロックは1msecで移動完了するブロックである。全てのブロックがサンプル時間1msecで移動完了するブロックである場合、Gは最大値をとる。時定数が最大設定値である6000msecの場合、Gは6000/2=3000ブロックである。前述したように先読みに必要なブロック数は時定数を2倍した時間後までに処理されるブロック数であるので、CPU31は、4×3000=12000ブロックの先読みが必要である。図8に示すように、kを誤差確認ブロック番号とした場合、減速計算ブロック番号はk+2G、先読みブロック番号はk+3G、実行ブロック番号はk―Gとなる。減速計算ブロック番号は、減速計算処理を実行するブロック番号である。誤差確認ブロック番号は、誤差確認処理を実行するブロック番号である。実行ブロック番号は、実行するブロック番号である。 Constants S and G are used for look-ahead. S is the number of look-ahead blocks, and G is the number of affected blocks. Since the number of affected blocks is determined by the sum of the time constants, the worst condition is the situation where the sum of the time constants is the largest in a system with a variable time constant. As the worst condition, for example, consider the case where the total time constant is 6000 msec (maximum set value). When the processing cycle (sample time) of the CPU 31 is 1 msec, the shortest block that the CPU 31 can process is the block that completes the movement in 1 msec. When all the blocks are blocks that complete the movement in the sample time of 1 msec, G takes the maximum value. When the time constant is 6000 msec, which is the maximum set value, G is 6000/2 = 3000 blocks. As described above, the number of blocks required for pre-reading is the number of blocks processed by the time after doubling the time constant, so the CPU 31 needs to pre-read 4 × 3000 = 12000 blocks. As shown in FIG. 8, when k is used as the error confirmation block number, the deceleration calculation block number is k + 2G, the look-ahead block number is k + 3G, and the execution block number is k−G. The deceleration calculation block number is a block number for executing the deceleration calculation process. The error confirmation block number is a block number for executing the error confirmation process. The execution block number is the block number to be executed.

図9を参照し、初期状態からの処理の流れを説明する。CPU31はRAM33に記憶するブロック情報20(図8参照)から、ブロックB(1)〜ブロックB(3G)を読み込む(S7)。上記の通り、本実施形態のGは3000である。故にCPU31はブロックB(1)〜ブロックB(9000)を読み込む。CPU31は読み込んだブロックB(1)〜ブロックB(2G)の減速計算処理を実行する(S8)。CPU31は1を誤差確認ブロック番号kに設定する(S9)。 The flow of processing from the initial state will be described with reference to FIG. The CPU 31 reads blocks B (1) to B (3G) from the block information 20 (see FIG. 8) stored in the RAM 33 (S7). As described above, G of this embodiment is 3000. Therefore, the CPU 31 reads blocks B (1) to B (9000). The CPU 31 executes the deceleration calculation process of the read blocks B (1) to B (2G) (S8). The CPU 31 sets 1 to the error confirmation block number k (S9).

図10を参照し、減速計算処理を説明する。k+2G=6001であるので、CPU31はブロックB(6001)に着目すればよい。CPU31は着目するブロックB(6001)の移動指令が直線補間指令(G1指令)か円弧補間指令(G2指令)か判断する(S22)。直線補間指令である場合(S22:直線補間)、CPU31はブロックB(6001)の終点を着目指令点とする(S25)。円弧補間指令である場合(S22:円弧補間)、CPU31は円弧中央指令点計算処理を実行する(S23)。 The deceleration calculation process will be described with reference to FIG. Since k + 2G = 6001, the CPU 31 may pay attention to the block B (6001). The CPU 31 determines whether the movement command of the block B (6001) of interest is a linear interpolation command (G1 command) or an arc interpolation command (G2 command) (S22). In the case of the linear interpolation command (S22: linear interpolation), the CPU 31 sets the end point of the block B (6001) as the command point of interest (S25). In the case of the arc interpolation command (S22: circular interpolation), the CPU 31 executes the arc center command point calculation process (S23).

図11,図12を参照し、円弧中央指令点計算処理を説明する。全自動減速処理では、着目指令点での誤差を計算し、その誤差を目標誤差以下にする移動速度を求める。しかし、例えば図11に示すように、A点とB点の間を円弧で補間する円弧補間指令では、円弧始点部の指令点における誤差と円弧終点部の指令点における誤差のみを抑制しただけでは、円弧途中部で誤差が目標誤差を超える可能性がある。本実施形態は、円弧中央部に仮想的な指令点(以下、円弧中央指令点と呼ぶ)を作成し、円弧中央指令点の誤差も抑制することで、円弧の曲率に起因する誤差も抑制できる。円弧中央指令点は、円弧始点部の指令点から円弧終点部の指令点を円弧補間する際の移動距離が半分になる点である。 The arc center command point calculation process will be described with reference to FIGS. 11 and 12. In the fully automatic deceleration process, the error at the command point of interest is calculated, and the moving speed that makes the error equal to or less than the target error is obtained. However, as shown in FIG. 11, for example, in the arc interpolation command for interpolating between points A and B with an arc, only the error at the command point at the arc start point and the error at the command point at the arc end are suppressed. , The error may exceed the target error in the middle of the arc. In this embodiment, a virtual command point (hereinafter referred to as an arc center command point) is created in the center of the arc, and an error due to the curvature of the arc can be suppressed by suppressing an error of the arc center command point. .. The arc center command point is a point at which the moving distance when the command point at the arc end point is interpolated from the command point at the arc start point is halved.

図13,図14を参照し、影響区間計算処理を説明する。図13に示すプログラム経路において、着目指令点をi番目の指令点posとする。本計算処理で使用する記号の意味は次の通りである。
・L:i番目のブロック長(mm)
・F:i番目のブロックの速度(mm/分)
・nc:i番目のブロックの指令補間点数(実数)(個)
・nblock:先読みした指令の最大個数(個)
・dt:サンプル時間(msec)
・T:時定数の合計(msec)
・posx,posy,posz:i番目とi+1番目の継ぎ目の指令点
・posxis,posyis,poszis:誤差に影響を及ぼす最も早い指令点(mm)
・posxie,posyie,poszie:誤差に影響を及ぼす最も遅い指令点(mm)
・i:誤差に影響を及ぼす最も早い指令番号
・i:誤差に影響を及ぼす最も遅い指令番号
・posxsti,posysti,poszsti:i番目の指令点に対する影響開始点(mm)
・posxeni,posyeni,poszeni:i番目の指令点に対する影響終了点(mm)
なお、サンプル時間dtは処理周期に相当する。
The influence interval calculation process will be described with reference to FIGS. 13 and 14. In the program path shown in FIG. 13, the command point of interest is set to the i-th command point pos i . The meanings of the symbols used in this calculation process are as follows.
Li : i-th block length (mm)
Fi : Speed of the i-th block (mm / min)
-Nc i : Command interpolation points (real numbers) (pieces) of the i-th block
-N block : Maximum number of pre-read commands (pieces)
-Dt: Sample time (msec)
・ T: Total time constant (msec)
-Posx i , possy i , posz i : Command point at the i-th and i + 1-th seam-posx is , possy is , posz is : The earliest command point that affects the error (mm)
-Posx ie , possy ie , posz ie : The slowest command point (mm) that affects the error
· I s: affects the error earliest command number · i e: impact on the error slowest command number · posx sti, posy sti, posz sti: i -th impact the starting point for the command point (mm)
-Posx eni , posey eni , posz eni : end point of influence on the i-th command point (mm)
The sample time dt corresponds to the processing cycle.

図14に示すように、CPU31は、ブロック毎に移動距離と移動速度から指令補間点数を実数で求める(S51)。CPU31は、例えばi番目のブロックの指令補間点数(実数)を、以下の数式で計算する。
・nc=(L×60×1000/F)/dt
As shown in FIG. 14, the CPU 31 obtains the number of command interpolation points in real numbers from the movement distance and the movement speed for each block (S51). The CPU 31 calculates, for example, the number of command interpolation points (real numbers) of the i-th block by the following formula.
· Nc i = (L i × 60 × 1000 / F i) / dt

次いで、CPU31は、着目指令点に影響を及ぼす最も早い指令点の指令番号を求める(S52)。着目指令点に影響を及ぼす最も早い指令点とは、着目指令点から時定数合計の半分の時間だけ遡った時点までの範囲の中に存在する指令点のうち、もっとも指令番号の小さい指令点である。 Next, the CPU 31 obtains the command number of the earliest command point that affects the command point of interest (S52). The earliest command point that affects the command point of interest is the command point with the smallest command number among the command points that exist within the range from the command point of interest to the time point that goes back half the time of the total time constant. is there.

次いで、CPU31は、着目指令点に影響を及ぼす最も遅い指令点の指令番号を求める(S53)。着目指令点に影響を及ぼす最も遅い指令点とは、着目指令点から時定数合計の半分の時間だけ経過した時点までの範囲の外に存在する指令点のうち、もっとも指令番号の小さい指令点である。 Next, the CPU 31 obtains the command number of the slowest command point that affects the command point of interest (S53). The slowest command point that affects the command point of interest is the command point with the smallest command number among the command points that exist outside the range from the command point of interest to the time when half the time of the total time constant has elapsed. is there.

CPU31は影響開始点を求める(S54)。影響開始点とは、着目するブロックの誤差に影響を及ぼす区間の開始位置である。図15に示すように、i番目の指令点posの影響開始点possti指令点posよりも前で、且つ指令点posからの距離が時定数合計の半分に相当する距離となる位置となる。 The CPU 31 obtains the influence start point (S54). The influence start point is the start position of the section that affects the error of the block of interest. As shown in FIG. 15, i-th impact starting point pos sti of command point pos i, before than the command point pos i, and the distance the distance from the command point pos i corresponds to half the total time constant It becomes the position.

CPU31は影響終了点を求める(S55)。影響終了点とは、着目するブロックの誤差に影響を及ぼす区間の終了位置である。図16に示すように、i番目の指令点posの影響終了点poseni指令点posよりも後で、且つ指令点posからの距離が時定数合計の半分に相当する距離となる位置となる。CPU31は本処理を終了し、図10のS27に処理を進める。CPU31は指令補間点計算処理を実行する(S27)。指令補間点計算処理とは、影響開始点から影響終了点までの間の指令補間点を求める処理である。指令補間点とは各ブロックをサンプル時間ごとに分割したもので、各ブロックの移動速度とサンプル時間から計算できる。 The CPU 31 obtains the influence end point (S55). The influence end point is the end position of the section that affects the error of the block of interest. As shown in FIG. 16, i-th impact end point pos eni the command point pos i is the distance later than the command point pos i, the and the distance from the command point pos i corresponds to half the total time constant It becomes the position. The CPU 31 ends this process and proceeds to S27 in FIG. The CPU 31 executes the command interpolation point calculation process (S27). The command interpolation point calculation process is a process of obtaining a command interpolation point between the influence start point and the influence end point. The command interpolation point is a block divided by sample time, and can be calculated from the movement speed and sample time of each block.

CPU31はフィルタ処理を実行する(S28)。フィルタ処理は、S27の処理で計算した指令補間点に対し、移動平均フィルタで処理することで、動作補間点を求める。移動平均フィルタは一般的に二つ以上用いられる。例えば異なる切削送り時定数を備える三つの移動平均フィルタによって、三段階でフィルタ処理を行う。本計算処理で使用する記号の意味は次の通りである。
・px,py,pz:指令補間点(mm)
・prx,pry,prz:動作補間点(mm)
・t:時定数1(msec)
・t:時定数2(msec)
・t:時定数3(msec)
・dt:サンプル時間(msec)
なお、各時定数1〜3はサンプル時間の整数倍である。
The CPU 31 executes the filter process (S28). In the filter processing, the operation interpolation points are obtained by processing the command interpolation points calculated in the process of S27 with the moving average filter. Two or more moving average filters are generally used. For example, the filtering process is performed in three stages by three moving average filters having different cutting feed time constants. The meanings of the symbols used in this calculation process are as follows.
-Px i , py i , pz i : Command interpolation point (mm)
-Prx i , pry i , prz i : motion interpolation point (mm)
-T 1 : Time constant 1 (msec)
-T 2 : Time constant 2 (msec)
・ T 3 : Time constant 3 (msec)
-Dt: Sample time (msec)
Each time constant 1 to 3 is an integral multiple of the sample time.

i番目の補間点の移動平均フィルタの計算式は、以下の[数1]の通りである。

Figure 0006885350

なお、j=1〜3である。CPU31は、指令補間点と動作補間点の始点と終点を一致させるため、指令補間点の始点前と終点後に(t/dt)個だけ、始点と終点と同じ値を指令補間点に付け加えて計算する。CPU31は、誤差計算処理を実行する(S29)。 The formula for calculating the moving average filter at the i-th interpolation point is as shown in [Equation 1] below.
Figure 0006885350

It should be noted that j = 1 to 3. In order to match the start point and the end point of the command interpolation point and the operation interpolation point, the CPU 31 adds (t j / dt) the same values as the start point and the end point to the command interpolation point before and after the start point of the command interpolation point. calculate. The CPU 31 executes the error calculation process (S29).

図17〜図22を参照し、誤差計算処理を説明する。図18に示すように、誤差とは、指令点と動作補間点の距離が最小となるものであり、単一解で求められる。本計算処理で使用する記号の意味は次の通りである。
・posx,posy,posz:i番目のブロックとi+1番目のブロックの継ぎ目の指令点
・prx,pry,prz:動作補間点(mm)
・isp:探索点
・ε:探索点の1つ前の動作補間点と指令点の距離(mm)
・ε:探索点と指令点の距離(mm)
・ε:探索点の1つ後の動作補間点と指令点の距離(mm)
・ε:誤差(mm)
・ベクトルp:誤差が2番目に小さい動作補間点を、誤差最小の動作補間点から見たベクトル
・ベクトルε:指令点を誤差最小の動作補間点から見たベクトル
The error calculation process will be described with reference to FIGS. 17 to 22. As shown in FIG. 18, the error is the one that minimizes the distance between the command point and the motion interpolation point, and can be obtained by a single solution. The meanings of the symbols used in this calculation process are as follows.
· Posx i, posy i, posz i: i -th block and the (i + 1) -th command point · prx i seam block, pry i, prz i: operating interpolation point (mm)
・ Is sp : Search point ・ ε 1 : Distance between the motion interpolation point immediately before the search point and the command point (mm)
・ Ε 2 : Distance between search point and command point (mm)
・ Ε 3 : Distance between the motion interpolation point and the command point one after the search point (mm)
・ Ε: Error (mm)
-Vector p: Vector in which the motion interpolation point with the second smallest error is viewed from the motion interpolation point with the minimum error.-Vector ε 2 : Vector in which the command point is viewed from the motion interpolation point with the minimum error.

図17に示すように、CPU31は、動作補間点を探索点(図18参照)とし、探索点と着目指令点の誤差を、以下の[数2]で計算する(S71)。なお、初期探索点は、着目指令点に最も近い指令補間点に対応する動作補間点とする。

Figure 0006885350
As shown in FIG. 17, the CPU 31 uses the operation interpolation point as the search point (see FIG. 18), and calculates the error between the search point and the command point of interest by the following [Equation 2] (S71). The initial search point is an operation interpolation point corresponding to the command interpolation point closest to the command point of interest.
Figure 0006885350

CPU31は、探索点の前後の動作補間点と着目指令点の誤差を計算する(S72)。CPU31は、探索点の一つ前の動作補間点と着目指令点の誤差を、以下の[数3]で計算する。

Figure 0006885350

CPU31は、探索点の一つ後の動作補間点と着目指令点の誤差を、以下の[数4]で計算する。
Figure 0006885350
The CPU 31 calculates an error between the operation interpolation point before and after the search point and the command point of interest (S72). The CPU 31 calculates the error between the operation interpolation point immediately before the search point and the command point of interest by the following [Equation 3].
Figure 0006885350

The CPU 31 calculates the error between the operation interpolation point one after the search point and the command point of interest by the following [Equation 4].
Figure 0006885350

CPU31は、探索点と探索点の前後の動作補間点を比較し(S73)、探索点の誤差εが最小か判断する(S74)。探索点の誤差εが最小である場合(S74:YES)、即ち、ε≦ε且つε≦εである場合、後述するS78に処理を進める。探索点の誤差εが最小でない場合(S74:NO)、探索点の一つ前の動作補間点の誤差εが最小か判断する(S75)。誤差εが最小である場合(S75:YES)、即ち、ε<εである場合、CPU31はisp=isp−1とすることで、探索点を一つ前に移動し(S76)、S71に戻り処理を繰り返す。探索点の一つ後の動作補間点の誤差εが最小である場合(S75:NO)、即ち、ε<εである場合、CPU31はisp=isp+1とすることで、探索点を一つ後に移動し(S77)、S71に戻り処理を繰り返す。 The CPU 31 compares the search point with the operation interpolation points before and after the search point (S73), and determines whether the error ε 2 of the search point is the minimum (S74). When the error ε 2 of the search point is the minimum (S74: YES), that is, when ε 2 ≤ ε 1 and ε 2 ≤ ε 3 , the process proceeds to S78 described later. When the error ε 2 of the search point is not the minimum (S74: NO), it is determined whether the error ε 1 of the motion interpolation point immediately before the search point is the minimum (S75). When the error ε 1 is the minimum (S75: YES), that is, when ε 12 , the CPU 31 moves the search point forward by setting i sp = i sp -1 (S76). ), Return to S71 and repeat the process. When the error ε 3 of the operation interpolation point one after the search point is the minimum (S75: NO), that is, when ε 32 , the CPU 31 searches by setting is sp = i sp + 1. The point is moved one step later (S77), returned to S71, and the process is repeated.

探索点の誤差εが最小となった場合(S74:YES)、CPU31は、図19,図20に示すように、探索点の前後の動作補間点のうち誤差が2番目に小さい点と探索点を結んだ線分と、探索点と指令点を結んだ線分のベクトルを以下のように計算する(S78)。
・ε≦εである場合

Figure 0006885350

・ε<εである場合
Figure 0006885350
When the error ε 2 of the search point is minimized (S74: YES), the CPU 31 searches for the point with the second smallest error among the motion interpolation points before and after the search point, as shown in FIGS. 19 and 20. The vector of the line segment connecting the points and the line segment connecting the search point and the command point is calculated as follows (S78).
・ When ε 1 ≤ ε 3
Figure 0006885350

・ When ε 31
Figure 0006885350

CPU31は、計算で求めたベクトルのなす角が鋭角(内積が正)か否か判断する(S79)。図20に示すように、ベクトルのなす角が鋭角である場合(S79:YES)、図21に示すように、CPU31は三平方の定理に基づき、指令点からの最接近点を、以下の[数7]で計算する(S80)。CPU31は指令点と計算で求めた最接近点から誤差を計算する(S81)。このように内挿を行うことで、ベクトルのなす角が鋭角の場合でも最接近点をより高精度に求めることができる。

Figure 0006885350
The CPU 31 determines whether or not the angle formed by the calculated vector is an acute angle (inner product is positive) (S79). As shown in FIG. 20, when the angle formed by the vector is an acute angle (S79: YES), as shown in FIG. 21, the CPU 31 sets the closest approach point from the command point to the following [ Eq. 7] is used for calculation (S80). The CPU 31 calculates the error from the command point and the closest point obtained by calculation (S81). By performing interpolation in this way, the closest point can be obtained with higher accuracy even when the angle formed by the vector is an acute angle.
Figure 0006885350

図22に示すように、ベクトルのなす角が鈍角である場合(S79:NO)、探索点と誤差が2番目に小さい動作補間点とを結ぶ直線に対する垂線の足(最接近点)が外挿点となるので、誤差は理想値とかけ離れてしまう可能性がある。故にCPU31は、S74で求めた誤差εを誤差εに決定する(S82)。誤差εはRAM33に記憶する。CPU31は、誤差抑制処理を実行する(S30)。 As shown in FIG. 22, when the angle formed by the vector is an obtuse angle (S79: NO), the foot of the perpendicular line (closest approach point) to the straight line connecting the search point and the motion interpolation point having the second smallest error is extrapolated. Since it is a point, the error may be far from the ideal value. Therefore, the CPU 31 determines the error ε 2 obtained in S74 as the error ε (S82). The error ε is stored in the RAM 33. The CPU 31 executes an error suppression process (S30).

図23,図24を参照し、誤差抑制処理を説明する。本処理は、誤差と速度は1次の関係にあると仮定して、減速率を内挿処理によって計算し、減速率に応じて移動速度を調整することで、誤差と目標誤差を一致させる処理である。本実施形態は、着目指令点がi番目のブロックの終点のときのk回目の誤差抑制処理として説明する。本処理で使用する記号の意味は次の通りである。
・ε:誤差(mm)
・ε:k回再計算した着目指令点の誤差(mm)
・ε:目標誤差(mm)
・ε:誤差収束許容値(mm)
・R:k回再計算した減速率(−)
・Fik:k回再計算した速度(mm/分)
・i:誤差に影響を及ぼす最も早い指令(−)
・i:誤差に影響を及ぼす最も遅い指令(−)
・nblock:最大先読みブロック数(−)
The error suppression process will be described with reference to FIGS. 23 and 24. This process assumes that the error and speed have a first-order relationship, calculates the deceleration rate by interpolation processing, and adjusts the moving speed according to the deceleration rate to match the error with the target error. Is. This embodiment will be described as the kth error suppression process when the command point of interest is the end point of the i-th block. The meanings of the symbols used in this process are as follows.
・ Ε: Error (mm)
・ Ε k : Error of the command point of interest recalculated k times (mm)
・ Ε r : Target error (mm)
・ Ε t : Error convergence tolerance (mm)
・ R k : Deceleration rate recalculated k times (-)
・ F ik : Speed recalculated k times (mm / min)
Is : The earliest command that affects the error (-)
-Ie : The slowest command that affects the error (-)
-N block : Maximum number of look-ahead blocks (-)

図23に示すように、CPU31は、誤差計算処理で求めた誤差εは、目標誤差ε以下か否か判断する(S91)。誤差εが目標誤差ε以下の場合(S91:YES)、CPU31は本処理を終了し、図10の後述するS31に処理を進める。誤差εが目標誤差εよりも大きい場合(S91:NO)、CPU31は減速率Rを、以下の数式で計算する(S92)。
・R=ε/ε
As shown in FIG. 23, the CPU 31 determines whether or not the error ε obtained by the error calculation process is equal to or less than the target error ε r (S91). When the error ε is equal to or less than the target error ε r (S91: YES), the CPU 31 ends this process and proceeds to S31 described later in FIG. When the error ε is larger than the target error ε r (S91: NO), the CPU 31 calculates the deceleration rate R k by the following formula (S92).
・ R k = ε r / ε

CPU31は影響区間の速度を、以下の数式で計算する(S93)。
・Fik=F×R
但し、i≦i≦iである。
The CPU 31 calculates the speed of the affected section using the following formula (S93).
・ F ik = F i × R k
However, it is i sii e.

CPU31は求めた移動速度で、影響区間を再計算する(S94)。計算方法は、図14に示す影響区間計算処理における計算方法と同様である。CPU31は指令補間点を再計算する(S95)。CPU31は、再度指令補間点計算処理を実行する。CPU31は求めた指令補間点を用いて、動作補間点を再計算する(S96)。計算方法は、図10のS28のフィルタ処理における計算方法と同様である。CPU31は求めた動作補間点と指令点を用いて、誤差εを再計算する(S97)。計算方法は、図17の誤差計算処理における計算方法と同様である。 The CPU 31 recalculates the affected section at the obtained moving speed (S94). The calculation method is the same as the calculation method in the influence interval calculation process shown in FIG. The CPU 31 recalculates the command interpolation point (S95). The CPU 31 executes the command interpolation point calculation process again. The CPU 31 recalculates the operation interpolation point using the obtained command interpolation point (S96). The calculation method is the same as the calculation method in the filtering process of S28 in FIG. The CPU 31 recalculates the error ε k using the obtained motion interpolation points and command points (S97). The calculation method is the same as the calculation method in the error calculation process of FIG.

CPU31は、計算で求めた誤差が誤差条件を満たすか否か判断する(S98)。本実施形態の誤差条件は、目標誤差から誤差を引いた差分が0以上で、かつ誤差収束許容値以下(0≦ε−ε≦ε)を満たす条件である。誤差が誤差条件を満たす場合(S98:YES)、CPU31は、減速率、影響開始点、影響終了点をS92,S94で求めた値に夫々決定する(S99)。CPU31は、図10の流れ図に戻り、後述するS31に処理を進める。 The CPU 31 determines whether or not the error obtained by the calculation satisfies the error condition (S98). The error condition of the present embodiment is a condition in which the difference obtained by subtracting the error from the target error is 0 or more and satisfies the error convergence tolerance or less (0 ≦ ε r −ε k ≦ ε t). When the error satisfies the error condition (S98: YES), the CPU 31 determines the deceleration rate, the influence start point, and the influence end point to the values obtained in S92 and S94, respectively (S99). The CPU 31 returns to the flow chart of FIG. 10 and proceeds to the process of S31 described later.

誤差が誤差条件を満たさない場合(S98:NO)、例えば図24に示すように、誤差εは目標誤差εよりも大きいので、目標誤差εとなるように、CPU31は減速率を変更する必要がある。誤差εは目標誤差εよりは小さいが、目標誤差εから誤差εを引いた差分は、誤差収束許容値εよりも大きい。この場合、経路からの誤差は十分に小さいので加工品質は確保できるが、減速率が小さくなることから速度が遅くなって加工周期が延びてしまう。故に誤差εが誤差収束許容値ε内となるように、CPU31は減速率を変更する必要がある。CPU31は例えば線形補間により、誤差εが目標誤差εになるように、減速率を変更する(S100)。本実施形態は、誤差と減速率の関係が線形であると仮定する。例えば、減速率Rにおける誤差がεであり、再度減速処理を行って求めた減速率Rを適用したときの誤差がεで有る時、CPU31は、減速率Rk+1を、以下の[数8]で計算する。一般には誤差と減速率の関係は線形ではないが、複数回の試行を繰り返すことで、誤差収束許容値を満足する減速率を求めることが出来る。本実施形態は線形補間によって減速率を求める際に、目標とする誤差を目標誤差εから誤差収束許容値εの半分を引いた値とする。これは、誤差収束許容値を満足する減速率を効率よく求めるためである。

Figure 0006885350

但し、ε<εのとき、ε<εであれば、ε=ε、R=Rとする。一方、ε>εのとき、ε>εであれば、ε=εik、R=Rとする。CPU31は、S93に戻り、上記処理を繰り返すことによって、誤差を再計算する。なお、εの初期値は0、εの初期値はε、Rの初期値は0、Rの初期値は1とする。 If the error does not satisfy the error condition (S98: NO), for example, as shown in FIG. 24, since the error epsilon b is larger than the target error epsilon r, so that the target error epsilon r, CPU 31 changes the speed reduction ratio There is a need to. Although the error epsilon a is smaller than the target error epsilon r, the difference obtained by subtracting the error epsilon a from the target error epsilon r is greater than the error convergence tolerance epsilon t. In this case, since the error from the path is sufficiently small, the machining quality can be ensured, but since the deceleration rate becomes small, the speed becomes slow and the machining cycle is extended. Therefore, the CPU 31 needs to change the deceleration rate so that the error ε a is within the error convergence tolerance value ε t. The CPU 31 changes the deceleration rate so that the error ε k becomes the target error ε r by, for example, linear interpolation (S100). In this embodiment, it is assumed that the relationship between the error and the deceleration rate is linear. For example, when the error in the deceleration rate R b is ε b and the error when the deceleration rate R b obtained by performing the deceleration process is applied again is ε a , the CPU 31 sets the deceleration rate R k + 1 to the following. Calculate with [Equation 8]. Generally, the relationship between the error and the deceleration rate is not linear, but the deceleration rate satisfying the error convergence tolerance can be obtained by repeating a plurality of trials. In the present embodiment, when the deceleration rate is obtained by linear interpolation, the target error is a value obtained by subtracting half of the error convergence tolerance value ε t from the target error ε r. This is to efficiently obtain a deceleration rate that satisfies the error convergence tolerance.
Figure 0006885350

However, when ε kr , if ε ak , then ε a = ε k and R a = R k . On the other hand, when ε k > ε r and ε b > ε k , ε b = ε ik and R b = R k . The CPU 31 returns to S93 and repeats the above process to recalculate the error. The initial value of ε a is 0, the initial value of ε b is ε, the initial value of R a is 0, and the initial value of R b is 1.

再計算で求めた誤差が誤差条件を満たす場合(S98:YES)、CPU31は減速率、影響開始点、影響終了点を決定する(S99)。誤差は、目標誤差以下で、且つ誤差許容値の範囲内となるので、本実施形態は、加工品質を向上しつつ短い加工周期で加工を完了できる。CPU31は、速度プロファイル更新処理を実行する(S31)。 When the error obtained by the recalculation satisfies the error condition (S98: YES), the CPU 31 determines the deceleration rate, the influence start point, and the influence end point (S99). Since the error is less than or equal to the target error and within the range of the error tolerance, the present embodiment can complete the machining in a short machining cycle while improving the machining quality. The CPU 31 executes the speed profile update process (S31).

図25〜図33を参照し、速度プロファイル更新処理を説明する。本実施形態は、図26に示すプログラム経路の速度プロファイルを作成する場合を一例として説明する。図25に示すように、例えば指令点C3を着目指令点とする場合、CPU31は指令点C3が円弧中央指令点で、かつその円弧の移動時間が時定数の合計よりも短いか判断する(S101)。指令点C3はブロック終点であるので(S101:NO)、CPU131は影響区間を減速区間に設定する(S102)。減速区間とは、図23の誤差抑制処理で決定した減速率で減速させる区間である。CPU31は、誤差抑制処理で決定した指令点C3に対する影響開始点、影響終了点、及び減速率に基づき、対象ブロックの速度を決定し(S104)、速度プロファイルを生成する(S105)。 The speed profile update process will be described with reference to FIGS. 25 to 33. In this embodiment, the case of creating the speed profile of the program path shown in FIG. 26 will be described as an example. As shown in FIG. 25, for example, when the command point C3 is set as the command point of interest, the CPU 31 determines whether the command point C3 is the center command point of the arc and the movement time of the arc is shorter than the total time constant (S101). ). Since the command point C3 is the end point of the block (S101: NO), the CPU 131 sets the affected section as the deceleration section (S102). The deceleration section is a section for decelerating at the deceleration rate determined by the error suppression process of FIG. 23. The CPU 31 determines the speed of the target block based on the influence start point, the influence end point, and the deceleration rate on the command point C3 determined by the error suppression process (S104), and generates a speed profile (S105).

図27は、指令点C3を着目指令点とした速度プロファイルである。指令点C3の影響開始点は、C1〜C2の間のブロック長L2の途中に位置する。指令点C3の影響終了点は、C4〜C5のブロック長L5の途中に位置する。減速区間は、影響開始点から影響終了点までの影響区間である。ブロック長L1〜L6に対応するブロックの移動速度をFとし、誤差抑制処理で決定した減速率がRである場合、影響開始点から影響終了点までの移動速度は、F×Rとなる。生成した速度プロファイルはRAM33に記憶する。 FIG. 27 is a speed profile with the command point C3 as the command point of interest. The influence start point of the command point C3 is located in the middle of the block length L2 between C1 and C2. The influence end point of the command point C3 is located in the middle of the block length L5 of C4 to C5. The deceleration section is the influence section from the influence start point to the influence end point. The moving speed of the block corresponding to the block length L1~L6 and F, if the deceleration rate determined by the error suppression process is R 3, the moving speed of the impact start point to effect end point, the F × R 3 .. The generated speed profile is stored in the RAM 33.

指令点C3の速度プロファイルを生成した場合、CPU31は生成した速度プロファイルと、先に生成してRAM33に記憶する速度プロファイルとを統合して速度プロファイルを更新する(S106)。指令点C3の速度プロファイルの更新が完了すると、図28に示すように、CPU31は次の指令点C4を着目指令点に設定し、指令点C3と同様に速度プロファイルを作成する。図29は、指令点C4を着目指令点とした速度プロファイルである。指令点C4を着目指令点に設定した場合、指令点C4の影響開始点は、C2〜C3の間のブロック長L3の途中に位置する。指令点C4の影響終了点は、C5〜C6のブロック長L6の途中に位置する。減速区間は、影響開始点から影響終了点までの影響区間である。故にブロック長L1〜L6に対応する速度ブロックの速度をFとし、誤差抑制処理で決定した減速率がRである場合、影響開始点から影響終了点までの移動速度は、F×Rとなる。生成した速度プロファイルはRAM33に記憶する。 When the speed profile of the command point C3 is generated, the CPU 31 integrates the generated speed profile with the speed profile previously generated and stored in the RAM 33 to update the speed profile (S106). When the update of the speed profile of the command point C3 is completed, as shown in FIG. 28, the CPU 31 sets the next command point C4 as the command point of interest and creates a speed profile in the same manner as the command point C3. FIG. 29 is a speed profile with the command point C4 as the command point of interest. When the command point C4 is set as the command point of interest, the influence start point of the command point C4 is located in the middle of the block length L3 between C2 and C3. The influence end point of the command point C4 is located in the middle of the block length L6 of C5 to C6. The deceleration section is the influence section from the influence start point to the influence end point. Thus the speed of the speed block corresponding to the block length L1~L6 and F, if the deceleration rate determined by the error suppression process is R 4, the moving speed of the impact start point to effect end point, the F × R 4 Become. The generated speed profile is stored in the RAM 33.

図30は、指令点C3の速度プロファイルと、指令点C4の速度プロファイルとを重ね合わせたものである。これら二つの速度プロファイルによれば、移動速度が異なる重複区間が存在する。CPU31は重複区間においては、移動速度の小さい方を選択する(図30中濃いグレー部分を参照)。故に移動速度は、ブロック長L2の途中でFからF×Rに減速し、ブロック長L3の途中でF×RからF×Rにさらに減速する。その後、移動速度は、ブロック長L6の途中でF×RからFに加速する。このようにして、速度プロファイルは統合される。 FIG. 30 is a superposition of the speed profile of the command point C3 and the speed profile of the command point C4. According to these two velocity profiles, there are overlapping sections with different moving velocities. The CPU 31 selects the one having the smaller moving speed in the overlapping section (see the dark gray portion in FIG. 30). Therefore, the moving speed is decelerated from F to F × R 3 in the middle of the block length L2, and further decelerated from F × R 3 to F × R 4 in the middle of the block length L3. After that, the moving speed accelerates from F × R 4 to F in the middle of the block length L6. In this way, the speed profiles are integrated.

図31は、図30の統合結果の速度プロファイルデータである。速度プロファイルデータは、指令、ブロック長、速度、速度分割数、距離、減速率等を含み、これら各種データを互いに対応づけて記憶する。図26,図28に示すプログラム経路は、移動指令1〜6で指令するブロックB1〜B6で構成する。移動指令1に対してブロック長L1、移動指令2に対してブロック長L2、移動指令3に対してブロック長L3、移動指令4に対してブロック長L4、移動指令5に対してブロック長L5、移動指令6に対してブロック長L6を記憶する。移動速度は移動指令で指定する速度であり、移動指令1〜6においては何れも同じ移動速度Fである。 FIG. 31 is the velocity profile data of the integration result of FIG. 30. The speed profile data includes a command, a block length, a speed, a number of speed divisions, a distance, a deceleration rate, and the like, and stores these various data in association with each other. The program path shown in FIGS. 26 and 28 is composed of blocks B1 to B6 commanded by movement commands 1 to 6. Block length L1 for move command 1, block length L2 for move command 2, block length L3 for move command 3, block length L4 for move command 4, block length L5 for move command 5, The block length L6 is stored for the movement command 6. The movement speed is a speed specified by the movement command, and the movement speeds F are the same in the movement commands 1 to 6.

速度分割数は、各ブロックB1〜B6において移動速度を分割する数である。図30に示すように、移動速度はブロック長L2、L3、L6において分割する。故に速度分割数は、ブロック長L2、L3、L6において1となり、それ以外は分割しないので0となる。距離は、ブロックの始点から見た速度変化点までの距離である。例えばブロック長L2では、距離p2とL2を記憶する。減速率は速度を減速する割合である。例えば、ブロック長L2では、距離p2に対して減速率=1であり、距離L2に対して減速率=R3を記憶する。CPU31は速度プロファイルデータをRAM33に記憶し、図10の流れ図に戻り、S32に処理を進める。 The speed division number is a number that divides the movement speed in each block B1 to B6. As shown in FIG. 30, the moving speed is divided by the block lengths L2, L3, and L6. Therefore, the number of speed divisions is 1 for the block lengths L2, L3, and L6, and 0 because the other blocks are not divided. The distance is the distance from the starting point of the block to the speed change point as seen. For example, in the block length L2, the distances p2 and L2 are stored. The deceleration rate is the rate at which the speed is reduced. For example, in the block length L2, the deceleration rate = 1 with respect to the distance p2, and the deceleration rate = R3 is stored with respect to the distance L2. The CPU 31 stores the speed profile data in the RAM 33, returns to the flow chart of FIG. 10, and proceeds to the process in S32.

図25,図32,図33を参照し、円弧中央指令点の速度プロファイルを説明する。図32に示すプログラム経路は、二つの直線補間指令(G1指令)の間に円弧補間指令(G2指令)を挟む経路である。円弧補間の経路では、円弧の曲率に起因して誤差が生じることが問題である。故にCPU31は、上記の通り、円弧中央部に円弧中央指令点を追加する。図25に示すように、着目指令点は円弧中央指令点であり、かつその円弧の移動時間が時定数の合計以上の場合(S101:YES)、CPU31は円弧全域を減速区間に設定する(S103)。なお、円弧の移動時間が時定数の合計よりも短く、影響区間が円弧全域を超える場合、CPU31は原則通り、影響区間を減速区間に設定すればよい。 The velocity profile of the arc center command point will be described with reference to FIGS. 25, 32, and 33. The program path shown in FIG. 32 is a path in which an arc interpolation command (G2 command) is sandwiched between two linear interpolation commands (G1 command). The problem with the circular interpolation path is that an error occurs due to the curvature of the circular arc. Therefore, the CPU 31 adds the arc center command point to the arc center portion as described above. As shown in FIG. 25, when the command point of interest is the center command point of the arc and the movement time of the arc is equal to or longer than the total time constant (S101: YES), the CPU 31 sets the entire arc as the deceleration section (S103). ). If the movement time of the arc is shorter than the total time constant and the affected section exceeds the entire arc, the CPU 31 may set the affected section to the deceleration section as in principle.

図33は、図32に示す円弧中央指令点を着目指令点とした速度プロファイルである。G1、G2指令に対応するブロックの移動速度をFとし、誤差抑制処理で決定した減速率がRの場合、円弧全域であるG2指令に対応するブロックの移動速度はF×Rとなる。円弧補間では、円弧補間のブロックの端の指令点において発生する経路誤差の他に、円弧の曲率に起因する誤差が円弧の全域で生じる。即ち曲率に起因する経路誤差は、円弧補間のブロックの端の指令点から時定数の合計の半分以上離れたどの円弧位置でも同じなので、本実施形態では、代表点として例えば円弧中央指令点を追加し、その位置の誤差が目標誤差となるように円弧全域で減速する。故に本実施形態は、指令点の誤差のみならず、円弧補間の円弧部分の曲率に起因する誤差も考慮できる。 FIG. 33 is a velocity profile with the arc center command point shown in FIG. 32 as the command point of interest. When the moving speed of the block corresponding to the G1 and G2 commands is F and the deceleration rate determined by the error suppression process is R, the moving speed of the block corresponding to the G2 command over the entire arc is F × R. In arc interpolation, in addition to the path error that occurs at the command point at the end of the block of circular interpolation, an error due to the curvature of the arc occurs over the entire arc. That is, the path error due to the curvature is the same at any arc position separated from the command point at the end of the arc interpolation block by more than half of the total time constant. Therefore, in the present embodiment, for example, an arc center command point is added as a representative point. Then, the speed is reduced over the entire arc so that the error at that position becomes the target error. Therefore, in the present embodiment, not only the error of the command point but also the error due to the curvature of the arc portion of the circular interpolation can be considered.

速度プロファイル更新後(図25のS106)、CPU31は、着目指令点は円弧中央指令点か否か判断する(S32)。着目指令点が円弧中央指令点である場合(S32:YES)、CPU31は、円弧補間ブロックの終点を着目指令点とし(S25)、上記処理を繰り返す。着目指令点が円弧中央指令点ではなく、ブロック終点である場合(S32:NO)、CPU31は、誤差確認ブロック番号k=1として(S9)、ブロックB(k+3G)を読み込む(S10)。CPU31はブロックB(k+2G)の減速計算処理を実行する(S11)。CPU31は、ブロックB(k)に着目し、誤差確認処理を実行する(S12)。 After updating the speed profile (S106 in FIG. 25), the CPU 31 determines whether or not the command point of interest is the arc center command point (S32). When the command point of interest is the center command point of the arc (S32: YES), the CPU 31 sets the end point of the arc interpolation block as the command point of interest (S25), and repeats the above process. When the command point of interest is not the arc center command point but the block end point (S32: NO), the CPU 31 reads the block B (k + 3G) when the error confirmation block number k = 1 (S9). The CPU 31 executes the deceleration calculation process of the block B (k + 2G) (S11). The CPU 31 pays attention to the block B (k) and executes the error confirmation process (S12).

図34〜図36を参照し、誤差確認処理を説明する。図10に示す減速計算処理は、着目指令点の誤差を小さくする為に減速するアルゴリズムであり、着目指令点以外の誤差を考慮していない。図34(1)は、プログラム経路と、プログラム経路の各指令点を減速計算処理したものと、減速計算処理しないものとを比較した図表である。図34(2)は、図34(1)に示すW1領域の拡大図である。着目指令点の誤差を抑制する為に減速計算処理を実行した結果、他の指令点における誤差が目標誤差を超えてしまう場合がある。図中誤差pは、W2領域内の誤差を小さくする為に減速計算処理を実行したために、減速処理を行わなかったときよりも誤差が大きくなる場合の例である。これは、本アルゴリズムにおいては減速を行うと誤差が小さくなるという仮定に基づいているが、図34(2)に示すような移動方向(加速方向)が変化することで、プログラム経路と動作補間点を結んだ経路が交わるような軌跡においては、減速することで誤差が大きくなってしまう場合があるためである。この問題を解決する為、CPU31は誤差確認処理を実行する。誤差確認処理は、減速計算処理を実行したブロックに対し、再度減速計算処理と同様の処理を行うものである。 The error confirmation process will be described with reference to FIGS. 34 to 36. The deceleration calculation process shown in FIG. 10 is an algorithm for decelerating in order to reduce the error of the command point of interest, and does not consider the error other than the command point of interest. FIG. 34 (1) is a chart comparing the program path, the one in which the deceleration calculation processing is performed for each command point of the program path, and the one in which the deceleration calculation processing is not performed. FIG. 34 (2) is an enlarged view of the W1 region shown in FIG. 34 (1). As a result of executing the deceleration calculation process in order to suppress the error of the command point of interest, the error at another command point may exceed the target error. The error p in the figure is an example in which the error becomes larger than when the deceleration process is not performed because the deceleration calculation process is executed in order to reduce the error in the W2 region. This is based on the assumption that the error becomes smaller when deceleration is performed in this algorithm, but the program path and motion interpolation point are changed by changing the movement direction (acceleration direction) as shown in FIG. 34 (2). This is because deceleration may increase the error in the trajectory where the routes connecting the two intersect. In order to solve this problem, the CPU 31 executes an error confirmation process. In the error confirmation process, the same process as the deceleration calculation process is performed again on the block for which the deceleration calculation process has been executed.

図8に示す例において、誤差確認ブロック番号はk=3001である。図35に示すように、CPU31は着目したブロックについて、図10の減速計算処理と同様の処理を実行する(S111)。但し、速度プロファイル生成後のブロックは、減速計算処理前のブロックを速度分割数で分割しており、一つのブロックで移動速度が変化する。故にCPU31は減速計算処理で用いた上記数式をそのまま使用できない。本実施形態は速度プロファイル生成後のブロックを、移動速度が変わる継ぎ目毎に分割した仮想ブロックとし、仮想ブロックと仮想ブロックの継ぎ目の点を仮想指令点とする。CPU31は仮想ブロックと仮想指令点を、ブロックと指令点とすることにより、上記数式を使用できる。 In the example shown in FIG. 8, the error confirmation block number is k = 3001. As shown in FIG. 35, the CPU 31 executes the same process as the deceleration calculation process of FIG. 10 for the block of interest (S111). However, in the block after the speed profile is generated, the block before the deceleration calculation process is divided by the number of speed divisions, and the moving speed changes in one block. Therefore, the CPU 31 cannot use the above mathematical formula used in the deceleration calculation process as it is. In the present embodiment, the block after the speed profile is generated is a virtual block divided for each seam where the moving speed changes, and the joint point between the virtual block and the virtual block is used as a virtual command point. The CPU 31 can use the above formula by using the virtual block and the virtual command point as the block and the command point.

図36(1)に示すように、例えば二つのブロックB1とB2で構成される略L字状の移動経路を想定する。ブロックB1とB2の継ぎ目は、指令点Cである。ブロックB1のブロック長はL1、ブロックB2のブロック長はL2である。指令点Cnについて、減速計算処理(図10参照)を行った結果、図36(2)に示す速度プロファイルでは、ブロックB1はブロックB1−1とB1−2に2分割し、ブロックB2はブロックB2−1、B2−2に2分割する。移動速度は、ブロック長L1にて距離p11で減速した後、ブロック長L2にて距離p21で加速する。 As shown in FIG. 36 (1), for example, a substantially L-shaped movement path composed of two blocks B1 and B2 is assumed. Seam blocks B1 and B2 is a command point C n. The block length of block B1 is L1, and the block length of block B2 is L2. As a result of performing deceleration calculation processing (see FIG. 10) at the command point Cn, in the speed profile shown in FIG. 36 (2), block B1 is divided into blocks B1-1 and B1-2, and block B2 is divided into blocks B2. Divide into -1 and B2-2. The moving speed is decelerated at a distance p11 at the block length L1 and then accelerated at a distance p21 at the block length L2.

図36(3)に示すように、CPU31は、ブロック長L1とL2において、速度が変化する2つの継ぎ目を仮想指令点とする。ブロックB1−1、B1−2、B2−1、B2−2は、仮想ブロックとなる。生成した仮想ブロックと仮想指令点を、ブロックと指令点として処理することにより、CPU31は上記数式を使用できる。なお、仮想指令点は誤差を抑制したい指令点ではないので、計算量削減により、CPU31は、図35の誤差確認処理で行う減速計算処理中の誤差計算処理(図10のS29参照)は実行しなくてもよい。故にCPU31は減速計算処理(S111)を実行した結果、他の指令点の誤差が目標誤差より大きくなってしまった場合でも、誤差確認処理を行うことで、大きくなってしまった他の指令点の誤差を抑制し、速度プロファイルを再度更新できる。CPU31は置換処理を実行し(S112)、図9の流れ図に戻る。 As shown in FIG. 36 (3), the CPU 31 uses two seams where the speed changes in the block lengths L1 and L2 as virtual command points. Blocks B1-1, B1-2, B2-1, and B2-2 are virtual blocks. By processing the generated virtual block and virtual command point as the block and command point, the CPU 31 can use the above mathematical formula. Since the virtual command point is not a command point for which an error is desired to be suppressed, the CPU 31 executes the error calculation process (see S29 in FIG. 10) during the deceleration calculation process performed in the error confirmation process in FIG. 35 by reducing the calculation amount. It does not have to be. Therefore, even if the error of the other command point becomes larger than the target error as a result of executing the deceleration calculation process (S111), the CPU 31 performs the error confirmation process of the other command point that has become larger. The error can be suppressed and the speed profile can be updated again. The CPU 31 executes the replacement process (S112), and returns to the flow chart of FIG.

図37〜図40を参照し、置換処理の内容を説明する。上記の通り、誤差確認処理による速度プロファイルの更新は、仮想ブロック毎に行う。しかし、軸移動を制御する駆動回路51A、53A、54A(図1参照)に速度プロファイルデータを出力するのはブロック毎であり、仮想ブロック毎ではない。故にCPU31は仮想ブロックで計算した速度プロファイルデータについて、ブロックの速度分割数、距離、減速率に置換する必要がある。CPU31は置換処理を実行することで、ブロック毎の速度プロファイルデータに変換する。 The contents of the replacement process will be described with reference to FIGS. 37 to 40. As described above, the speed profile is updated by the error confirmation process for each virtual block. However, the speed profile data is output to the drive circuits 51A, 53A, and 54A (see FIG. 1) that control the axis movement for each block, not for each virtual block. Therefore, the CPU 31 needs to replace the speed profile data calculated by the virtual block with the number of speed divisions, the distance, and the deceleration rate of the block. The CPU 31 executes the replacement process to convert the speed profile data for each block.

本処理で用いるブロックの速度分割数、距離、減速率は、以下のように定義する。
・ブロックの速度分割数:(誤差確認処理時の仮想ブロック毎の速度分割数+1)の合計値−1
・ブロックの距離:ブロックの始点から見た速度変化点までの距離
なお、速度変化点は、ブロックの終点も含む。
・ブロックの減速率:減速計算処理で求めた減速率と、誤差確認処理で求めた減速率との積
The number of speed divisions, distance, and deceleration rate of the block used in this process are defined as follows.
-Number of block speed divisions: Total value of (number of speed divisions for each virtual block during error confirmation processing + 1) -1
-Block distance: The distance from the start point of the block to the speed change point. The speed change point also includes the end point of the block.
-Block deceleration rate: The product of the deceleration rate obtained by the deceleration calculation process and the deceleration rate obtained by the error confirmation process.

図37は、減速計算処理で求めた速度プロファイルの一例である。速度プロファイルは、4つのブロックB1〜B4で構成する経路のものである。ブロックB1のブロック長はL1、ブロックB2のブロック長はL2、ブロックB3のブロック長はL3、ブロックB4のブロック長はL4である。R3、R4は減速率である。移動速度は、ブロック長L2、L3、L4で夫々変化する。ブロック長L2の途中では、速度Fから速度F×R3に減速する。ブロック長L3の途中では、速度F×R3から速度F×R4にさらに減速する。ブロック長L4の途中では、速度F×R4から速度Fに加速する。ブロックB2は、ブロックB2−1とB2−2に2分割されている。ブロックB3も、ブロックB3−1とB3−2に2分割されている。ブロックB4も、ブロックB4−1とB4−2に2分割されている。ブロックB1は分割されていない。 FIG. 37 is an example of the speed profile obtained by the deceleration calculation process. The velocity profile is for a path composed of four blocks B1 to B4. The block length of block B1 is L1, the block length of block B2 is L2, the block length of block B3 is L3, and the block length of block B4 is L4. R3 and R4 are deceleration rates. The moving speed changes depending on the block lengths L2, L3, and L4, respectively. In the middle of the block length L2, the speed is decelerated from the speed F to the speed F × R3. In the middle of the block length L3, the speed is further reduced from the speed F × R3 to the speed F × R4. In the middle of the block length L4, the speed F × R4 is accelerated to the speed F. Block B2 is divided into blocks B2-1 and B2-2. Block B3 is also divided into blocks B3-1 and B3-2. Block B4 is also divided into blocks B4-1 and B4-2. Block B1 is not divided.

図38は、誤差確認処理で求めた速度プロファイルの一例であり、図37の速度プロファイル生成後のブロックに対し、上記のように、減速計算処理と同様の処理を再度行ったものである。この速度プロファイルでも、ブロック長L2、L3、L4で速度が夫々変化するが、ブロックB3−1とB3−2では、移動速度はさらに段階的に変化する。R3〜R7は減速率である。ブロックB3−1では、速度F×R3からF×R3×R5(=F×R4×R6)に減速し、ブロックB3−2では、速度F×R3×R5からF×R4×R7に加速する。 FIG. 38 is an example of the speed profile obtained by the error confirmation process, and the block after the speed profile is generated in FIG. 37 is subjected to the same process as the deceleration calculation process again as described above. Even in this speed profile, the speed changes depending on the block lengths L2, L3, and L4, respectively, but in the blocks B3-1 and B3-2, the moving speed changes in a stepwise manner. R3 to R7 are deceleration rates. In block B3-1, the speed is decelerated from F × R3 to F × R3 × R5 (= F × R4 × R6), and in block B3-2, the speed is accelerated from F × R3 × R5 to F × R4 × R7.

図39は、図37と図38の各速度プロファイルのデータを纏めたものである。減速計算処理で生成した速度プロファイルデータにおいて、ブロック番号1(B1)の速度分割数は0、距離はL1、減速率は1である。ブロック番号2(B2)の速度分割数は1である。距離はブロックB2の始点からブロックB2−1とB2−2までの各距離であるのでp2とL2である。ブロックB2−1の減速率は1、ブロックB2−2の減速率はR3である。ブロック番号3(B3)の速度分割数は1である。距離はブロックB3の始点からブロックB3−1とB3−2における各距離であるのでp3とL3である。ブロックB3−1の減速率はR3、ブロックB3−2の減速率はR4である。ブロック番号4(B4)の速度分割数は1である。距離はブロックB4の始点からブロックB4−1とB4−2における各距離であるのでp4とL4である。ブロックB4−1の減速率はR4、ブロックB4−2の減速率は1である。 FIG. 39 summarizes the data of each speed profile of FIGS. 37 and 38. In the speed profile data generated by the deceleration calculation process, the number of speed divisions of the block number 1 (B1) is 0, the distance is L1, and the deceleration rate is 1. The number of speed divisions of the block number 2 (B2) is 1. The distances are p2 and L2 because they are the respective distances from the start point of the block B2 to the blocks B2-1 and B2-2. The deceleration rate of block B2-1 is 1, and the deceleration rate of block B2-2 is R3. The number of speed divisions of the block number 3 (B3) is 1. The distances are p3 and L3 because they are the respective distances in blocks B3-1 and B3-2 from the start point of block B3. The deceleration rate of block B3-1 is R3, and the deceleration rate of block B3-2 is R4. The number of speed divisions of the block number 4 (B4) is 1. The distances are p4 and L4 because they are the respective distances in blocks B4-1 and B4-2 from the start point of block B4. The deceleration rate of block B4-1 is R4, and the deceleration rate of block B4-2 is 1.

誤差確認処理で生成した速度プロファイルデータにおいて、ブロック番号1(B1)の速度分割数は0、距離はL1、減速率は1である。ブロック番号2(B2)のうちブロックB2−1の速度分割数は0、距離はp2、減速率は1である。ブロックB2−2の速度分割数は0、距離はブロックB2の仮想指令点からの距離であるのでL2−p2、減速率は1である。ブロック番号3(B3)のうちブロックB3−1の速度分割数は1である。ブロックB3−1はさらに2分割しているので、ブロックB3−1の距離はブロックB3−1の始点から2つの速度変化点までの距離となるので、p31とp3となる。減速率は1とR5となる。ブロックB3−2の速度分割数は1である。ブロックB3−2はさらに2分割しているので、ブロックB3−2の距離はブロックB3−2の始点から2つの速度変化点までの距離となるので、p32とL3−p3となる。減速率はR6とR7となる。ブロック番号4(B4)のうちブロックB4−1の速度分割数は0、距離はp4、減速率は1である。ブロックB4−2の速度分割数は0、距離はブロックB4の仮想指令点からの距離であるのでL4−p4、減速率は1である。 In the speed profile data generated by the error confirmation process, the number of speed divisions of the block number 1 (B1) is 0, the distance is L1, and the deceleration rate is 1. Of the block numbers 2 (B2), the number of speed divisions of the block B2-1 is 0, the distance is p2, and the deceleration rate is 1. The number of speed divisions of the block B2-2 is 0, and the distance is the distance from the virtual command point of the block B2, so L2-p2 and the deceleration rate are 1. Of the block numbers 3 (B3), the number of speed divisions of the block B3-1 is 1. Since the block B3-1 is further divided into two, the distance of the block B3-1 is the distance from the start point of the block B3-1 to the two speed change points, so that it becomes p31 and p3. The deceleration rate is 1 and R5. The number of speed divisions of block B3-2 is 1. Since the block B3-2 is further divided into two, the distance of the block B3-2 is the distance from the start point of the block B3-2 to the two speed change points, so that it becomes p32 and L3-p3. The deceleration rates are R6 and R7. Of the block numbers 4 (B4), the number of speed divisions of the block B4-1 is 0, the distance is p4, and the deceleration rate is 1. Since the number of speed divisions of the block B4-2 is 0 and the distance is the distance from the virtual command point of the block B4, it is L4-p4 and the deceleration rate is 1.

CPU31は、誤差確認処理で生成した速度プロファイルデータについて、ブロックの速度分割数、距離、減速率に置換する。図40は、置換処理後の速度プロファイルデータである。置換処理後の減速率は、減速計算処理で求めた減速率と、誤差確認処理で求めた減速率の積である。ブロック番号2(B2)のうちブロックB2−2の距離は、距離L2−p2からブロックB2の始点からの距離L2に置換している。ブロック番号3(B3)のうちブロックB3−2の距離は、距離p32と距離L3−p3から、ブロックB3の始点からの距離p3+p32と距離L3に置換している。ブロック番号4(B4)のうちブロックB4−2の距離は、距離L4−p4からブロックB4の始点からの距離p4と距離L4に置換している。このようにして、仮想ブロック毎の速度プロファイルデータからブロック毎の速度プロファイルデータに変換される。置換処理した速度プロファイルデータは、RAM33に記憶する。 The CPU 31 replaces the speed profile data generated in the error confirmation process with the number of speed divisions of the block, the distance, and the deceleration rate. FIG. 40 is the velocity profile data after the replacement process. The deceleration rate after the replacement process is the product of the deceleration rate obtained in the deceleration calculation process and the deceleration rate obtained in the error confirmation process. Of the block number 2 (B2), the distance of the block B2-2 is replaced with the distance L2 from the distance L2-p2 to the start point of the block B2. Of the block number 3 (B3), the distance of the block B3-2 is replaced with the distance p3 + p32 and the distance L3 from the starting point of the block B3 from the distance p32 and the distance L3-p3. Of the block number 4 (B4), the distance of the block B4-2 is replaced with the distance p4 and the distance L4 from the starting point of the block B4 from the distance L4-p4. In this way, the speed profile data for each virtual block is converted into the speed profile data for each block. The speed profile data that has been replaced is stored in the RAM 33.

CPU31は、図9の流れ図に戻る。k>Gなら(S13:YES)、最初のブロックの誤差確認処理が完了しているのでブロックB(k−G)を実行する(S14)。k≦Gの時(S13:NO)、最初のブロックの誤差確認処理が完了していないのでブロックの実行は行わずに次の処理に進む。図8に示す例において、誤差確認ブロック番号k=3001の場合、実行ブロック番号はk−G=3001−3000=1である。CPU31は、RAM33に記憶する速度プロファイルデータを各軸の駆動回路51A、53A、54Aに出力し、実行ブロックの移動指令を実行する。なお、駆動回路51A、53A、54Aは、ブロック情報20の軸移動情報と速度プロファイルデータに基づき、補間後加減速を行うことで、軸移動を実行する。CPU31はkに1加算する(S15)。 The CPU 31 returns to the flow chart of FIG. If k> G (S13: YES), the error confirmation process of the first block is completed, so block B (k—G) is executed (S14). When k ≦ G (S13: NO), since the error confirmation process of the first block is not completed, the block is not executed and the process proceeds to the next process. In the example shown in FIG. 8, when the error confirmation block number k = 3001, the execution block number is k−G = 3001-3000 = 1. The CPU 31 outputs the speed profile data stored in the RAM 33 to the drive circuits 51A, 53A, 54A of each axis, and executes the movement command of the execution block. The drive circuits 51A, 53A, and 54A execute the axis movement by performing acceleration / deceleration after interpolation based on the axis movement information and the speed profile data of the block information 20. The CPU 31 adds 1 to k (S15).

CPU31はk+3Gが全ブロック数よりも大きいか否か判断する(S16)。k+3Gが全ブロック数以下の場合(S16:NO)、CPU31はS10に戻り、ブロックB(k+3G)を読込み、処理を繰り返す。k+3Gが全ブロック数よりも大きい場合(S16:YES)、CPU31はk+2Gが全ブロック数よりも大きいか否か判断する(S17)。k+2Gが全ブロック数以下の場合(S17:NO)、CPU31はS11に戻り、ブロックB(k+2G)の減速計算処理を実行し、処理を繰り返す。k+2Gが全ブロック数よりも大きい場合(S17:YES)、CPU31はkが全ブロック数よりも大きいか否か判断する(S18)。kが全ブロック数以下の場合(S18:NO)、CPU31はS12に戻り、ブロックB(k)の誤差確認処理を実行し、処理を繰り返す。kが全ブロック数よりも大きい場合(S18:YES)、CPU31はk−Gが全ブロック数よりも大きいか否か判断する(S19)。k−Gが全ブロック数以下の場合(S19:NO)、CPU31はS13に戻り、k>Gなら(S13:YES)、ブロックB(k−G)を実行し(S14)、処理を繰り返す。k−Gが全ブロック数よりも大きい場合(S19:YES)、先読みした全ブロックの実行が完了しているので、CPU31は図7の流れ図に戻り、メイン処理を終了する。 The CPU 31 determines whether or not k + 3G is larger than the total number of blocks (S16). When k + 3G is less than or equal to the total number of blocks (S16: NO), the CPU 31 returns to S10, reads block B (k + 3G), and repeats the process. When k + 3G is larger than the total number of blocks (S16: YES), the CPU 31 determines whether or not k + 2G is larger than the total number of blocks (S17). When k + 2G is less than or equal to the total number of blocks (S17: NO), the CPU 31 returns to S11, executes the deceleration calculation process of block B (k + 2G), and repeats the process. When k + 2G is larger than the total number of blocks (S17: YES), the CPU 31 determines whether or not k is larger than the total number of blocks (S18). When k is equal to or less than the total number of blocks (S18: NO), the CPU 31 returns to S12, executes an error confirmation process of block B (k), and repeats the process. When k is larger than the total number of blocks (S18: YES), the CPU 31 determines whether or not k—G is larger than the total number of blocks (S19). If k-G is less than or equal to the total number of blocks (S19: NO), the CPU 31 returns to S13, and if k> G (S13: YES), block B (k-G) is executed (S14), and the process is repeated. When k-G is larger than the total number of blocks (S19: YES), the pre-read execution of all the blocks is completed, so the CPU 31 returns to the flow chart of FIG. 7 and ends the main process.

図41〜図45を参照し、全自動減速処理のシミュレーション結果を説明する。本実施形態は、図41に示すプログラム経路について、全自動減速処理を実行した場合のシミュレーションを行い、その作用効果について検証した。図41に示すように、プログラム経路は、X軸方向に直線補間で移動するG1ブロックと、該G1ブロックの終点からY軸方向に大きく円弧状にカーブして移動するG1微小ブロックと、G1微小ブロックの終点からY軸方向に直線補間で移動するG1ブロックとで構成する。シミュレーション条件は以下の通りである。
・移動平均フィルタの時定数:25、22、13(msec)
・プログラム指令速度:F5000(mm/min)
・目標誤差:0.100(mm)
The simulation result of the fully automatic deceleration process will be described with reference to FIGS. 41 to 45. In this embodiment, the program path shown in FIG. 41 was simulated when the fully automatic deceleration process was executed, and its action and effect were verified. As shown in FIG. 41, the program path consists of a G1 block that moves in the X-axis direction by linear interpolation, a G1 minute block that moves in a large arc shape in the Y-axis direction from the end point of the G1 block, and a G1 minute block. It is composed of a G1 block that moves from the end point of the block in the Y-axis direction by linear interpolation. The simulation conditions are as follows.
-Time constant of moving average filter: 25, 22, 13 (msec)
-Program command speed: F5000 (mm / min)
-Target error: 0.100 (mm)

図42(1)は、全自動減速処理を行わないときの速度プロファイルであり、図42(2)は全自動減速処理を実行したときの速度プロファイルである。全自動減速処理を実行したことによって、複数の微小ブロックで繋がるカーブ部分を中心に、滑らかに減速していることがわかる。また、図43に示すように、移動速度の変化を見ても、未処理に比べて大きく滑らかに減速し、再び滑らかに加速していることがわかる。このように、全自動減速処理を実行することにより、減速と加速を繰り返すことが無いことに加え、速度変化を小さくすることができる。これにより、本実施形態の数値制御装置30は、工作機械1に負荷をかけず、軸移動を安定して行うことができる。 FIG. 42 (1) is a speed profile when the fully automatic deceleration process is not performed, and FIG. 42 (2) is a speed profile when the fully automatic deceleration process is executed. By executing the fully automatic deceleration process, it can be seen that the vehicle decelerates smoothly around the curved portion connected by a plurality of minute blocks. Further, as shown in FIG. 43, even when the change in the moving speed is observed, it can be seen that the deceleration is greatly and smoothly compared to the unprocessed, and the acceleration is smooth again. By executing the fully automatic deceleration process in this way, in addition to not repeating deceleration and acceleration, it is possible to reduce the speed change. As a result, the numerical control device 30 of the present embodiment can stably move the axis without imposing a load on the machine tool 1.

図44に示すように、プログラム経路におけるG1微小ブロックのカーブ部分について、全自動減速処理後の移動経路は、減速しない未処理に比べてプログラム経路側に大きくシフトしている。このことから、本実施形態は、誤差を大幅に抑制できることがわかった。図45は、プログラム経路のカーブ部分を形成する9つの指令点における誤差を調べたものである。未処理の移動経路では、約0.2〜0.3mm程度の大きな誤差を生じたが、全自動減速処理後の移動経路では、各指令点において誤差の最大値を目標誤差に抑制できた。故に本実施形態の数値制御装置30は、目標誤差をパラメータとして予め設定することにより、最適な移動速度を自動的に計算できる。そして、各指令点のコーナにおける誤差が大きくなり過ぎたり、逆に速度を落とし過ぎることが無くなるので、加工精度の向上と短い加工周期の両方を達成できることが実証された。 As shown in FIG. 44, with respect to the curved portion of the G1 microblock in the program path, the movement path after the fully automatic deceleration process is largely shifted to the program path side as compared with the unprocessed state in which the deceleration is not performed. From this, it was found that the present embodiment can significantly suppress the error. FIG. 45 examines the error at the nine command points forming the curved portion of the program path. In the unprocessed movement path, a large error of about 0.2 to 0.3 mm occurred, but in the movement path after the fully automatic deceleration processing, the maximum value of the error could be suppressed to the target error at each command point. Therefore, the numerical control device 30 of the present embodiment can automatically calculate the optimum moving speed by setting the target error as a parameter in advance. Then, it was proved that both the improvement of the machining accuracy and the short machining cycle can be achieved because the error at the corner of each command point does not become too large and the speed is not reduced too much.

図46〜図48を参照し、移動経路の1ブロックにおける速度分割数を説明する。図46は、移動距離の長い長ブロックの後に、移動距離の短い微小ブロックが連続で続く経路の一例である。微小ブロックが連続する部分は円弧状に曲がっている。長ブロックの後に微小ブロックが連続で続くと、微小ブロックの各指令点の影響区間の開始点が長ブロックに多数位置する場合がある。この場合、長ブロックの速度分割数は多くなる可能性がある。1ブロックの速度分割数が多くなると、駆動回路51A,53A,54Aに出力する速度プロファイルデータのデータ量が大きくなる。故にCPU31の処理速度が間に合わず、データを記憶するメモリ容量を大量に確保しなければならない等の問題が生じる可能性がある。本実施形態はこの問題を解消する為、1ブロックの最大速度分割数を、パラメータで予め設定する。本実施形態は、1ブロックの速度分割数が最大速度分割数を超える場合、速度分割数が最大分割数となるように、図47に示す速度分割数調整処理を実行し、速度プロファイルを調整してもよい。 The number of speed divisions in one block of the movement path will be described with reference to FIGS. 46 to 48. FIG. 46 is an example of a path in which a long block having a long moving distance is followed by a small block having a short moving distance. The part where the minute blocks are continuous is curved in an arc shape. If a long block is followed by a small block in succession, a large number of start points of the influence section of each command point of the small block may be located in the long block. In this case, the number of speed divisions of the long block may increase. As the number of speed divisions in one block increases, the amount of speed profile data output to the drive circuits 51A, 53A, and 54A increases. Therefore, the processing speed of the CPU 31 may not be in time, and problems such as having to secure a large amount of memory capacity for storing data may occur. In this embodiment, in order to solve this problem, the maximum number of speed divisions per block is set in advance by parameters. In the present embodiment, when the number of speed divisions in one block exceeds the maximum number of speed divisions, the speed division number adjustment process shown in FIG. 47 is executed so that the number of speed divisions becomes the maximum number of divisions, and the speed profile is adjusted. You may.

図47,図48を参照し、速度分割数調整処理を説明する。CPU31は例えば図25に示す速度プロファイル更新処理実行後、ROM32から速度分割数調整プログラムを読込み、本処理を実行してもよい。CPU31は、速度プロファイル更新処理で生成した速度プロファイルについて、1ブロックの速度分割数が最大速度分割数を超えるか否か判断する(S121)。最大速度分割数は記憶装置34に予め記憶する。1ブロックの速度分割数が最大速度分割数を超えない場合(S121:NO)、CPU31は本処理を終了する。 The speed division number adjustment process will be described with reference to FIGS. 47 and 48. For example, after executing the speed profile update process shown in FIG. 25, the CPU 31 may read the speed division number adjustment program from the ROM 32 and execute this process. The CPU 31 determines whether or not the number of speed divisions in one block exceeds the maximum number of speed divisions for the speed profile generated by the speed profile update process (S121). The maximum number of speed divisions is stored in the storage device 34 in advance. When the number of speed divisions in one block does not exceed the maximum number of speed divisions (S121: NO), the CPU 31 ends this process.

図48(1)は、プログラム経路中の長ブロックを含む速度プロファイルの一例である。A1区間は、長ブロックの前ブロックの影響を受けている区間である。故にA1区間は、多数のブロックに分割され、移動速度が繰り返し変化する。A3区間は、長ブロックの後ブロックの影響を受けている区間である。故にA3区間も、多数のブロックに分割され、移動速度が繰り返し変化する。A1区間とA3区間の間であるA2区間は、前後のブロックの影響を受けていない区間である。故にA2区間は分割されず、移動速度は一定である。A1とA3区間において多数に分割されているので、全体として速度分割数は多くなっている。 FIG. 48 (1) is an example of a velocity profile including a long block in the program path. The A1 section is a section affected by the previous block of the long block. Therefore, the A1 section is divided into a large number of blocks, and the moving speed changes repeatedly. The A3 section is a section affected by the rear block of the long block. Therefore, the A3 section is also divided into a large number of blocks, and the moving speed changes repeatedly. The A2 section, which is between the A1 section and the A3 section, is a section that is not affected by the blocks before and after. Therefore, the A2 section is not divided and the moving speed is constant. Since it is divided into a large number in the A1 and A3 sections, the number of speed divisions is large as a whole.

速度分割数が最大速度分割数を超える場合(S121:NO)、CPU31は1ブロック内にある影響区間を最大分割数で均等に分割する(S122)。但し、図48(1)に示す速度プロファイルのように、前後のブロックの影響を受けないA2区間がある場合、CPU31は、前後のブロックに影響を受けるA1とA3区間を、(最大速度分割数−1)÷2の数で均等に分割すればよい。そのため、最大速度分割数は奇数を設定するものとする。A2区間は分割しない。図48(2)に示すように、A1区間、A3区間は夫々4分割されている。 When the number of speed divisions exceeds the maximum number of speed divisions (S121: NO), the CPU 31 evenly divides the affected section in one block by the maximum number of divisions (S122). However, as in the speed profile shown in FIG. 48 (1), when there is an A2 section that is not affected by the front and rear blocks, the CPU 31 divides the A1 and A3 sections that are affected by the front and rear blocks (maximum speed division number). -1) It may be divided evenly by the number of ÷ 2. Therefore, the maximum number of speed divisions shall be set to an odd number. The A2 section is not divided. As shown in FIG. 48 (2), the A1 section and the A3 section are each divided into four sections.

CPU31は、分割した各区間で最も小さい移動速度を選択して速度プロファイルを生成する(S123)。図48(2)に示すように、各ブロックの速度は、グレーで示した部分のように調整される。図48(2)では分割前の区間の境界線と分割後の区間の境界線が一致しているが、境界線が一致していない場合も同様に新しい各区間で最も小さい移動速度を選択する。調整後の速度プロファイルでは、調整前の速度プロファイルに比較して速度分割数が減少している。故にCPU31は、駆動回路51A,53A,54Aに出力する速度プロファイルのデータ量を減らすことができる。また、調整前の速度プロファイルに比較して速度変化を小さくできるので、軸移動を安定して行うことができ、工作機械1にかかる負荷も小さくできる。CPU31は調整後の速度プロファイルをRAM33に記憶し、本処理を終了する。 The CPU 31 selects the smallest moving speed in each divided section to generate a speed profile (S123). As shown in FIG. 48 (2), the speed of each block is adjusted as shown in gray. In FIG. 48 (2), the boundary line of the section before division and the boundary line of the section after division match, but even if the boundary lines do not match, the smallest movement speed is selected in each new section as well. .. In the adjusted speed profile, the number of speed divisions is reduced as compared with the speed profile before adjustment. Therefore, the CPU 31 can reduce the amount of speed profile data output to the drive circuits 51A, 53A, and 54A. Further, since the speed change can be made smaller than that of the speed profile before adjustment, the axis movement can be performed stably, and the load applied to the machine tool 1 can be made small. The CPU 31 stores the adjusted speed profile in the RAM 33, and ends this process.

上記実施形態の円弧中央指令点は本発明の仮想指令点の一例である。目標誤差は本発明の規定値の一例である。CPU31は本発明の制御手段の一例である。図10のS24,S25の処理を実行するCPU31は本発明の指定手段の一例である。S26の処理を実行するCPU31は本発明の区間指定手段の一例である。S27の処理を実行するCPU31は本発明の分割手段の一例である。S28の処理を実行するCPU31は本発明の処理手段の一例である。S29の処理を実行するCPU31は本発明の誤差算出手段の一例である。図23のS91の処理を実行するCPU31は本発明の判断手段の一例である。S92の処理を実行するCPU31は本発明の算出手段の一例である。図10のS31の処理を実行するCPU31は本発明の更新手段の一例である。 The arc center command point of the above embodiment is an example of the virtual command point of the present invention. The target error is an example of the specified value of the present invention. The CPU 31 is an example of the control means of the present invention. The CPU 31 that executes the processes of S24 and S25 of FIG. 10 is an example of the designation means of the present invention. The CPU 31 that executes the process of S26 is an example of the section designation means of the present invention. The CPU 31 that executes the process of S27 is an example of the dividing means of the present invention. The CPU 31 that executes the process of S28 is an example of the processing means of the present invention. The CPU 31 that executes the process of S29 is an example of the error calculating means of the present invention. The CPU 31 that executes the process of S91 in FIG. 23 is an example of the determination means of the present invention. The CPU 31 that executes the process of S92 is an example of the calculation means of the present invention. The CPU 31 that executes the process of S31 in FIG. 10 is an example of the updating means of the present invention.

図23のS98の処理を実行するCPU31は本発明の誤差判断手段の一例である。S100の処理を実行するCPU31は本発明の変更手段の一例である。図10のS22の処理を実行するCPU31は本発明の補間判断手段の一例である。S23,S24の処理を実行するCPU31は本発明の追加手段の一例である。図25のS102の処理を実行するCPPU31は本発明の第一設定手段の一例である。S103の処理を実行するCPU31は本発明の第二設定手段の一例である。 The CPU 31 that executes the process of S98 in FIG. 23 is an example of the error determining means of the present invention. The CPU 31 that executes the process of S100 is an example of the changing means of the present invention. The CPU 31 that executes the process of S22 in FIG. 10 is an example of the interpolation determination means of the present invention. The CPU 31 that executes the processes of S23 and S24 is an example of the additional means of the present invention. The CPPU 31 that executes the process of S102 in FIG. 25 is an example of the first setting means of the present invention. The CPU 31 that executes the process of S103 is an example of the second setting means of the present invention.

図35のS111の減速計算処理の中で行う誤差計算処理(図10のS29参照)を実行するCPU31は本発明の再算出手段の一例である。S111の減速計算処理の中で行う誤差抑制処理のS91(図23参照)の処理を実行するCPU31は本発明の再判断手段の一例である。 The CPU 31 that executes the error calculation process (see S29 in FIG. 10) performed in the deceleration calculation process in S111 of FIG. 35 is an example of the recalculation means of the present invention. The CPU 31 that executes the process of S91 (see FIG. 23) of the error suppression process performed in the deceleration calculation process of S111 is an example of the redetermination means of the present invention.

以上説明したように、本実施形態の数値制御装置30のCPU31は、NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、速度プロファイルを作成する。速度プロファイルは、各指令点の間の距離と速度の情報を含む。CPU31は、速度プロファイルに対して加減速処理に用いる移動平均フィルタによる処理を行った結果に基づき、軸移動を制御する。CPU31は、プログラム経路中の指令点の中から注目指令点を計算する。CPU31は、計算した注目指令点の前後において、加減速処理に用いる移動平均フィルタの時定数に基づく影響区間を計算する。CPU31は、計算して求めた影響区間をサンプル時間で分割し、指令補間点を計算する。CPU31は計算で求めた指令補間点について加減速処理に用いる移動平均フィルタと同等の時定数を持つ移動平均フィルタで処理し、動作補間点を計算する。CPU31は、移動平均フィルタで処理した動作補間点におけるプログラム経路からの誤差を算出する。CPU31は動作補間点における誤差が目標誤差を超えるか否か判断する。誤差が目標誤差を超える場合、CPU31は目標誤差と誤差に基づく減速率を算出する。CPU31は計算で求めた影響区間と減速率に基づき、速度プロファイルを更新する。数値制御装置30は、指令点のみで減速するのではなく、指令点を含む影響区間で減速するので、仮に微小ブロックが連続するような経路においても頻繁に加減速を繰り返すことが無い。故に、被削材の加工面の品質を向上できる。経路中の各指令点について複数の注目指令点を順に指定することで、経路中の例えば屈曲するコーナ部分、円弧部分、曲線部分において加減速によって生じる誤差を総合的に抑制できる。 As described above, the CPU 31 of the numerical control device 30 of the present embodiment creates a speed profile along a path obtained by interpolating a plurality of command points commanded by the NC program. The velocity profile contains information on the distance and velocity between each command point. The CPU 31 controls the axis movement based on the result of processing the speed profile by the moving average filter used for the acceleration / deceleration processing. The CPU 31 calculates a command point of interest from the command points in the program path. The CPU 31 calculates an influence section based on the time constant of the moving average filter used for the acceleration / deceleration process before and after the calculated attention command point. The CPU 31 divides the calculated influence section by the sample time and calculates the command interpolation point. The CPU 31 processes the command interpolation point obtained by calculation with a moving average filter having a time constant equivalent to that of the moving average filter used for acceleration / deceleration processing, and calculates the operation interpolation point. The CPU 31 calculates an error from the program path at the motion interpolation point processed by the moving average filter. The CPU 31 determines whether or not the error at the operation interpolation point exceeds the target error. When the error exceeds the target error, the CPU 31 calculates the target error and the deceleration rate based on the error. The CPU 31 updates the speed profile based on the calculated influence section and deceleration rate. Since the numerical control device 30 does not decelerate only at the command point but decelerates in the affected section including the command point, acceleration / deceleration is not frequently repeated even in a path where minute blocks are continuous. Therefore, the quality of the machined surface of the work material can be improved. By designating a plurality of attention command points in order for each command point in the route, it is possible to comprehensively suppress errors caused by acceleration / deceleration in, for example, a bending corner portion, an arc portion, and a curved portion in the route.

上記実施形態の影響区間計算処理(図14参照)にて、影響区間は、注目指令点の前後において、少なくとも加減速処理に用いる移動平均フィルタの時定数の合計の半分の時間で移動する二つの小区間を含む。故に、指令点における誤差に影響する影響区間において、速度プロファイルを更新できるので、指令点における誤差を効果的に抑制できる。 In the influence section calculation process (see FIG. 14) of the above embodiment, the influence section moves before and after the attention command point in at least half the time of the total time constant of the moving average filter used for the acceleration / deceleration process. Including small sections. Therefore, since the speed profile can be updated in the influence section that affects the error at the command point, the error at the command point can be effectively suppressed.

上記実施形態の誤差抑制処理(図23参照)で最初に用いる減速率は、目標誤差を誤差で除して得られる割合であるので、減速率を容易に算出できる。 Since the deceleration rate first used in the error suppression process of the above embodiment (see FIG. 23) is a ratio obtained by dividing the target error by the error, the deceleration rate can be easily calculated.

上記実施形態の誤差抑制処理にて、CPU31は減速率で影響区間を移動したときの誤差と目標誤差の差が誤差収束許容値以下か判断し、誤差収束許容値を超えると判断した場合、誤差と目標誤差の差が誤差収束許容値以下となるように減速率を変更する。故に減速し過ぎることが無いので、短い加工周期で被削材の加工を完了できる。減速が不足することも無くなるので、誤差と目標誤差の差が誤差収束許容値を超えないことがより確かになる。 In the error suppression process of the above embodiment, the CPU 31 determines whether the difference between the error when moving the affected section at the deceleration rate and the target error is equal to or less than the error convergence tolerance value, and if it is determined to exceed the error convergence tolerance value, an error occurs. The deceleration rate is changed so that the difference between the error and the target error is less than or equal to the permissible error convergence value. Therefore, since the speed is not reduced too much, the machining of the work material can be completed in a short machining cycle. Since there is no shortage of deceleration, it is more certain that the difference between the error and the target error does not exceed the error convergence tolerance.

上記実施形態の減速計算処理(図10参照)にて、CPU31はプログラム経路中のブロックが直線補間であるか円弧補間であるかを判断する。ブロックが直線補間である場合、CPU31はブロックの終点を着目指令点に指定する。ブロックが円弧補間である場合、CPU31は円弧中央指令点を着目指令点に指定する。故に数値制御装置30は、円弧部分の曲率に起因する誤差を考慮できる。円弧補間の場合でも、円弧中央指令点における誤差、即ち円弧に対する誤差を規定値以下に抑制できる。故に数値制御装置30は円弧補間の部分においても、被削材の加工面の品質を向上できる。 In the deceleration calculation process (see FIG. 10) of the above embodiment, the CPU 31 determines whether the block in the program path is linear interpolation or circular interpolation. When the block is linear interpolation, the CPU 31 designates the end point of the block as the command point of interest. When the block is circular interpolation, the CPU 31 designates the arc center command point as the command point of interest. Therefore, the numerical control device 30 can consider the error caused by the curvature of the arc portion. Even in the case of circular interpolation, the error at the circular arc center command point, that is, the error with respect to the circular arc can be suppressed to a specified value or less. Therefore, the numerical control device 30 can improve the quality of the machined surface of the work material even in the arc interpolation portion.

上記実施形態の速度プロファイル更新手段(図25参照)にて、CPU31は、注目指令点がブロックの終点である場合、減速区間を影響区間に設定する。注目指令点が円弧中央指令点である場合、減速区間を円弧補間の全域に設定する。故に数値制御装置30は円弧部分の曲率に起因する誤差を考慮できる。 In the speed profile updating means (see FIG. 25) of the above embodiment, the CPU 31 sets the deceleration section as the affected section when the attention command point is the end point of the block. When the command point of interest is the center command point of the arc, the deceleration section is set over the entire area of the arc interpolation. Therefore, the numerical control device 30 can consider the error caused by the curvature of the arc portion.

上記実施形態では、減速計算処理(図9参照)で速度プロファイルを更新した後に、誤差確認処理を実行する。誤差確認処理では、CPU31は誤差を再度計算し、計算した誤差が目標誤差を超えるか再度判断する。誤差が目標誤差を超える場合、CPU31は減速率の再計算と速度プロファイルの更新を再度行う。故に数値制御装置30は誤差を目標誤差以下に抑制できる。 In the above embodiment, the error confirmation process is executed after updating the speed profile in the deceleration calculation process (see FIG. 9). In the error confirmation process, the CPU 31 recalculates the error and redetermines whether the calculated error exceeds the target error. If the error exceeds the target error, the CPU 31 recalculates the deceleration rate and updates the speed profile again. Therefore, the numerical control device 30 can suppress the error to the target error or less.

なお、上記実施形態では、誤差が目標誤差を超える場合、減速率の再計算と速度プロファイルの再更新を1回だけ行っているが、繰り返し複数回行ってもよく、例えば、誤差が目標誤差未満になるまで行ってもよい。 In the above embodiment, when the error exceeds the target error, the deceleration rate is recalculated and the speed profile is re-updated only once, but it may be repeated a plurality of times, for example, the error is less than the target error. You may go until

本発明は上記実施形態に限らず種々の変更が可能である。上記実施形態は、モータの時定数(加減速時定数)として移動平均フィルタの時定数を用いたが、時定数を持つその他フィルタについても適用可能である。例えば、ローパスフィルタ、バンドパスフィルタ等も適用可能である。また、重みづけのある移動平均フィルタ(一般的なFIRフィルタ)を使用することもできる。上記実施形態は、移動速度を3段の移動平均フィルタで処理するが、2段、若しくは4段以上の移動平均フィルタで処理してもよい。さらに、上記時定数による加減速処理を行った後、時定数を持つノッチフィルタ、インプットシェーピング法等による制振処理を行い、速度プロファイルから機械の固有振動成分を取り除く場合についても適用可能である。その場合、本発明におけるモータの時定数とは加減速の時定数と制振処理の時定数の合計となる。また、一定の時間で加減速を行う速度プロファイルを生成するその他の処理についてもフィルタと同様に用いることが出来る。 The present invention is not limited to the above embodiment, and various modifications can be made. In the above embodiment, the time constant of the moving average filter is used as the time constant (acceleration / deceleration time constant) of the motor, but other filters having a time constant can also be applied. For example, a low-pass filter, a band-pass filter, and the like can also be applied. It is also possible to use a weighted moving average filter (general FIR filter). In the above embodiment, the moving speed is processed by a three-stage moving average filter, but it may be processed by a two-stage or four-stage or more-stage moving average filter. Further, it is also applicable to the case where the acceleration / deceleration process based on the time constant is performed and then the vibration damping process is performed by a notch filter having a time constant, an input shaping method or the like to remove the natural vibration component of the machine from the speed profile. In that case, the time constant of the motor in the present invention is the sum of the time constant of acceleration / deceleration and the time constant of vibration damping processing. Further, other processes for generating a speed profile that accelerates / decelerates in a fixed time can be used in the same manner as the filter.

上記実施形態では、減速計算処理(図9のS8、S11)、誤差確認処理(図9のS12)に用いるサンプル時間はCPU処理周期と等しい値を用いるとしたが、計算処理を簡略化する目的で、サンプル時間としてCPU処理周期の整数倍の値を用いても良い。ただし、誤差計算の精度が低下し目標誤差を満たすことが出来ない場合がある。 In the above embodiment, the sample time used for the deceleration calculation process (S8, S11 in FIG. 9) and the error confirmation process (S12 in FIG. 9) is set to a value equal to the CPU processing cycle, but the purpose is to simplify the calculation process. Therefore, a value that is an integral multiple of the CPU processing cycle may be used as the sample time. However, the accuracy of error calculation may decrease and the target error may not be satisfied.

上記実施形態の全自動減速処理中の誤差確認処理(図9のS16)と、それに続く置換処理は計算処理を簡略化する目的で、省略してもよい。その場合、ブロックの移動指令を実行する際に先読みが必要なのは、時定数の合計時間後までに処理するブロックとなる。 The error confirmation process (S16 in FIG. 9) during the fully automatic deceleration process of the above embodiment and the subsequent replacement process may be omitted for the purpose of simplifying the calculation process. In that case, what needs to be read ahead when executing the block movement command is the block to be processed by the total time of the time constant.

上記実施形態の誤差抑制処理(図23参照)のうちS93〜S100の処理を省略してもよい。S98の誤差条件は、誤差が目標誤差以下(ε≧ε)、若しくは誤差と目標誤差の差が誤差収束許容値以下(0≦ε−ε≦ε)を満たすこととしているが、これ以外の誤差条件を設定してもよく、例えば、誤差が目標誤差以下(ε≧ε)のみにしたり、|ε−ε|≦εとしてもよい。但し、加工周期の短縮化を考慮すれば、誤差と目標誤差の差が誤差収束許容値以下という条件を付加するのが好ましい。 Of the error suppression processing (see FIG. 23) of the above embodiment, the processing of S93 to S100 may be omitted. The error condition of S98 is that the error is less than or equal to the target error (ε r ≧ ε k ), or the difference between the error and the target error is less than or equal to the error convergence tolerance (0 ≦ ε r −ε k ≦ ε t ). , Other error conditions may be set. For example, the error may be set to be less than or equal to the target error (ε r ≧ ε k ), or | ε r −ε k | ≦ ε t . However, in consideration of shortening the machining cycle, it is preferable to add a condition that the difference between the error and the target error is equal to or less than the error convergence tolerance value.

上記実施形態は指令点前後の影響区間を、時定数合計の半分の時間に相当する距離としているが、少なくとも時定数合計の半分の時間に相当する距離を含む区間であればよい。 In the above embodiment, the affected section before and after the command point is set to a distance corresponding to half the time of the total time constant, but any section may be included as long as it includes a distance corresponding to at least half the time of the total time constant.

上記実施形態の減速計算処理のS23,S24では、着目するブロックが円弧補間の場合において、円弧中央部に仮想指令点(円弧中央指令点)を作成したが、円弧の端点を除く部分であれば他の位置に仮想指令点を作成してもよい。また、仮想指令点は複数作成してもよい。CPU31は着目するブロックが直線補間か円弧補間かを判断せずに、一律にブロック終点を着目指令点として計算を進めてもよい。円弧を微小線分のブロックに分解して、それぞれのブロックについて直線補間指令として誤差の計算を行っても良い。 In S23 and S24 of the deceleration calculation process of the above embodiment, when the block of interest is circular interpolation, a virtual command point (circular center command point) is created at the center of the circle, but if it is a part excluding the end point of the circle. Virtual command points may be created at other positions. Further, a plurality of virtual command points may be created. The CPU 31 may uniformly proceed with the calculation with the block end point as the command point of interest without determining whether the block of interest is linear interpolation or circular interpolation. The arc may be decomposed into blocks of minute line segments, and the error may be calculated for each block as a linear interpolation command.

上記実施形態では、数値制御装置30が制御する工作機械の一例として、主軸の軸線が上下方向に延びる立型の工作機械1を説明したが、主軸の軸線が水平方向に延びる横型の工作機械でもよい。駆動回路51A〜55A(図1参照)は数値制御装置30に設けているが、工作機械1側に設けてもよい。 In the above embodiment, as an example of a machine tool controlled by the numerical control device 30, a vertical machine tool 1 in which the axis of the spindle extends in the vertical direction has been described, but a horizontal machine tool in which the axis of the spindle extends in the horizontal direction is also used. Good. Although the drive circuits 51A to 55A (see FIG. 1) are provided in the numerical control device 30, they may be provided on the machine tool 1 side.

また、工作機械の構成は、X軸、Y軸、Z軸以外に例えばA軸、B軸、C軸などの回転軸を備えたものでもよい。また、工作機械の構成は回転軸のみを備えたものでもよい。 Further, the machine tool may be configured to include rotation axes such as A-axis, B-axis, and C-axis in addition to the X-axis, Y-axis, and Z-axis. Further, the machine tool may be configured to include only a rotating shaft.

上記実施形態では、図7において数値制御装置30がメイン処理内で全自動減速処理を行う場合について説明を行っているが、数値制御装置30は、メイン処理に先立ち全自動減速処理を実施し、その結果をRAM33または記憶装置34に記憶し、この結果を用いて処理を行っても良い。また数値制御装置30以外の計算機によって事前にNCプログラムを処理して全自動減速処理を行い、その結果を数値制御装置30に入力することで同様の効果を得てもよい。 In the above embodiment, the case where the numerical control device 30 performs the fully automatic deceleration process in the main process is described in FIG. 7, but the numerical control device 30 executes the fully automatic deceleration process prior to the main process. The result may be stored in the RAM 33 or the storage device 34, and processing may be performed using this result. Further, the same effect may be obtained by processing the NC program in advance by a computer other than the numerical control device 30 to perform the fully automatic deceleration process, and inputting the result to the numerical control device 30.

1 工作機械
30 数値制御装置
31 CPU

1 Machine tool 30 Numerical control device 31 CPU

Claims (9)

NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、各指令点の間の距離と速度の情報を含む速度プロファイルを作成し、フィルタによる加減速処理を行った結果に基づき、工具又は被削材の移動を制御する制御手段を備える数値制御装置において、
前記制御手段は、
前記経路中の前記指令点の中から注目する指令点を注目指令点として指定する指定手段と、
前記指定手段が指定した前記注目指令点の前後において、前記フィルタの時定数に基づく時間の区間を指定する区間指定手段と、
前記区間指定手段が指定する前記区間を所定時間で分割し、指令補間点を計算する分割手段と、
前記指令補間点について、前記分割手段が分割した前記区間を前記フィルタと同等の時定数を持つフィルタで処理し、動作補間点を計算する処理手段と、
前記処理手段で処理した前記区間において、前記注目指令点における移動平均フィルタで処理した動作補間点におけるプログラム経路からの誤差を算出する誤差算出手段と、
前記誤差算出手段が算出した前記誤差が、予め設定した規定値を超えるか判断する判断手段と、
前記判断手段が、前記誤差は前記規定値を超えると判断した場合、前記規定値と前記誤差に基づく減速率を算出する算出手段と、
前記区間指定手段が指定した前記区間と、前記算出手段が算出した前記減速率とに基づき、前記速度プロファイルを更新する更新手段と
を備えたこと
を特徴とする数値制御装置。
A speed profile including information on the distance and speed between each command point is created along the path obtained by interpolating a plurality of command points commanded by the NC program, and based on the result of acceleration / deceleration processing by a filter. In a numerical control device provided with a control means for controlling the movement of a tool or a work material.
The control means
A designation means for designating a command point of interest from the command points in the path as a command point of interest, and
Before and after the attention command point designated by the designation means, a section designation means for designating a time interval based on the time constant of the filter, and a section designation means.
A division means for calculating a command interpolation point by dividing the section designated by the section designation means at a predetermined time, and
With respect to the command interpolation point, a processing means for calculating the operation interpolation point by processing the section divided by the division means with a filter having a time constant equivalent to that of the filter.
In the section processed by the processing means, an error calculating means for calculating an error from the program path at the motion interpolation point processed by the moving average filter at the attention command point, and
A determination means for determining whether the error calculated by the error calculation means exceeds a preset specified value, and
When the determination means determines that the error exceeds the specified value, the calculation means for calculating the specified value and the deceleration rate based on the error, and the calculation means.
A numerical control device comprising the section designated by the section designating means and the updating means for updating the speed profile based on the deceleration rate calculated by the calculating means.
前記区間は、前記注目指令点の前において、少なくとも前記フィルタの時定数の合計の半分の時間で移動する小区間を含み、前記注目指令点の後においても、同様の小区間を含むこと
を特徴とする請求項1に記載の数値制御装置。
The interval is characterized by including a subsection that moves in front of the attention command point in at least half the time of the total time constant of the filter, and also includes a similar subsection after the attention command point. The numerical control device according to claim 1.
前記算出手段は、
前記規定値を前記誤差で除して得られる割合を前記減速率として算出すること
を特徴とする請求項1又は2に記載の数値制御装置。
The calculation means is
The numerical control device according to claim 1 or 2, wherein a ratio obtained by dividing the specified value by the error is calculated as the deceleration rate.
前記算出手段が算出した前記減速率で前記区間を移動したときの前記誤差が前記規定値に対して許容範囲内か否か判断する誤差判断手段と、
前記誤差判断手段が、前記誤差は前記許容範囲外であると判断した場合、前記誤差が前記許容範囲内となるように前記減速率を変更する変更手段と
を備えたこと
を特徴とする請求項1から3の何れかに記載の数値制御装置。
An error determining means for determining whether or not the error when moving in the section at the deceleration rate calculated by the calculating means is within an allowable range with respect to the specified value.
The claim is characterized in that, when the error determining means determines that the error is out of the allowable range, the error determining means includes a changing means for changing the deceleration rate so that the error is within the allowable range. The numerical control device according to any one of 1 to 3.
前記経路中の各指令点間であるブロックが直線補間であるか円弧補間であるかを判断する補間判断手段と、
前記補間判断手段が、前記ブロックは前記円弧補間であると判断した場合、前記円弧補間の部分に仮想指令点を追加する追加手段と
を備え、
前記指定手段は、
前記補間判断手段が、前記ブロックは前記直線補間であると判断した場合、前記ブロックの終点を前記注目指令点として指定し、
前記補間判断手段が、前記ブロックは前記円弧補間であると判断した場合、前記追加手
段が追加した前記仮想指令点と、前記ブロックの終点とを前記注目指令点として夫々指定すること
を特徴とする請求項1から4の何れかに記載の数値制御装置。
Interpolation determination means for determining whether the block between each command point in the path is linear interpolation or circular interpolation, and
When the interpolation determining means determines that the block is the arc interpolation, the interpolation determining means includes an additional means for adding a virtual command point to the arc interpolation portion.
The designated means
When the interpolation determining means determines that the block is the linear interpolation, the end point of the block is designated as the attention command point.
When the interpolation determining means determines that the block is the arc interpolation, the virtual command point added by the additional means and the end point of the block are designated as the attention command points, respectively. The numerical control device according to any one of claims 1 to 4.
前記更新手段は、
前記注目指令点が前記ブロックの終点である場合、前記算出手段が算出した前記減速率で移動する減速区間を、前記区間に設定する第一設定手段と、
前記注目指令点が前記仮想指令点である場合、前記減速区間を、少なくとも前記円弧補間の全域に設定する第二設定手段と
を備えたこと
を特徴とする請求項5に記載の数値制御装置。
The update means
When the attention command point is the end point of the block, the first setting means for setting the deceleration section moving at the deceleration rate calculated by the calculation means in the section, and
The numerical control device according to claim 5, further comprising a second setting means for setting the deceleration section to at least the entire area of the arc interpolation when the attention command point is the virtual command point.
前記更新手段が前記速度プロファイルを更新した後、前記速度プロファイルに基づき移動した場合の前記誤差を再度算出する再算出手段と、
前記再算出手段が再度算出した前記誤差が前記規定値を超えるか再度判断する再判断手段と
を備え、
前記制御手段は、
前記再判断手段が、前記誤差は前記規定値を超えると判断した場合、前記算出手段、及び前記更新手段による各処理を再度実行すること
を特徴とする請求項1から6の何れかに記載の数値制御装置。
A recalculation means for recalculating the error when the updating means updates the speed profile and then moves based on the speed profile.
The recalculation means includes a re-judgment means for re-determining whether the error recalculated by the recalculation means exceeds the specified value.
The control means
The method according to any one of claims 1 to 6, wherein when the re-judgment means determines that the error exceeds the specified value, each process by the calculation means and the update means is executed again. Numerical control device.
前記更新手段が前記速度プロファイルを更新した後、前記速度プロファイルに基づき移動した場合の前記誤差を再度算出する再算出手段と、
前記再算出手段が再度算出した前記誤差が前記規定値を超えるか再度判断する再判断手段と
を備え、
前記制御手段は、
前記再判断手段が、前記誤差は前記規定値を超えると判断した場合、前記誤差が前記規定値以下となるまで、前記算出手段、及び前記更新手段による各処理を繰り返し実行すること
を特徴とする請求項1から6の何れかに記載の数値制御装置。
A recalculation means for recalculating the error when the updating means updates the speed profile and then moves based on the speed profile.
The recalculation means includes a re-judgment means for re-determining whether the error recalculated by the recalculation means exceeds the specified value.
The control means
When the re-judgment means determines that the error exceeds the specified value, each process by the calculating means and the updating means is repeatedly executed until the error becomes equal to or less than the specified value. The numerical control device according to any one of claims 1 to 6.
NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、各指令点の間の距離と速度の情報を含む速度プロファイルを作成し、フィルタによる加減速処理を行った結果に基づき、工具又は被削材の移動を制御する数値制御装置の制御方法において、
前記経路中の前記指令点の中から注目する指令点を注目指令点として指定する指定工程と、
前記指定工程で指定した前記注目指令点の前後において、前記フィルタの時定数に基づく時間の区間を指定する区間指定工程と、
前記区間指定工程で指定する前記区間を所定時間で分割し、指令補間点を計算する分割工程と、
前記指令補間点について、前記分割工程で分割した前記区間を前記フィルタと同等の時定数を持つフィルタで処理し、動作補間点を計算する処理工程と、
前記処理工程で処理した前記区間において、前記注目指令点における移動平均フィルタで処理した動作補間点におけるプログラム経路からの誤差を算出する誤差算出工程と、
前記誤差算出工程で算出した前記誤差が、予め設定した規定値を超えるか判断する判断工程と、
前記判断工程において、前記誤差は前記規定値を超えると判断した場合、前記規定値と前記誤差に基づく減速率を算出する算出工程と、
前記区間指定工程において指定した前記区間と、前記算出工程で算出した前記減速率と
に基づき、前記速度プロファイルを更新する更新工程と
を備えたこと
を特徴とする数値制御装置の制御方法。
A speed profile containing information on the distance and speed between each command point is created along the path obtained by interpolating multiple command points commanded by the NC program, and based on the result of acceleration / deceleration processing by a filter. In the control method of the numerical control device that controls the movement of the tool or work material,
A designated step of designating a command point of interest from the command points in the path as a command point of interest, and
A section designation step of designating a time interval based on the time constant of the filter before and after the attention command point designated in the designated step, and a section designation step.
A division step of dividing the section designated in the section designation step at a predetermined time and calculating a command interpolation point, and a division step of calculating the command interpolation point.
With respect to the command interpolation point, a processing step of processing the section divided in the division step with a filter having a time constant equivalent to that of the filter and calculating an operation interpolation point.
In the section processed in the processing step, an error calculation step of calculating an error from the program path at the motion interpolation point processed by the moving average filter at the attention command point, and
A determination step of determining whether the error calculated in the error calculation step exceeds a preset specified value, and
In the determination step, when it is determined that the error exceeds the specified value, the calculation step of calculating the specified value and the deceleration rate based on the error, and the calculation step.
A control method for a numerical control device, comprising: an update step of updating the speed profile based on the section designated in the section designation step and the deceleration rate calculated in the calculation step.
JP2018013342A 2017-01-31 2018-01-30 Numerical control device and control method Active JP6885350B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017015499 2017-01-31
JP2017015499 2017-01-31

Publications (2)

Publication Number Publication Date
JP2018124996A JP2018124996A (en) 2018-08-09
JP6885350B2 true JP6885350B2 (en) 2021-06-16

Family

ID=63016586

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018013342A Active JP6885350B2 (en) 2017-01-31 2018-01-30 Numerical control device and control method

Country Status (2)

Country Link
JP (1) JP6885350B2 (en)
CN (1) CN108375957B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7037457B2 (en) * 2018-09-05 2022-03-16 オークマ株式会社 Numerical control device and numerical control method
JP7226070B2 (en) * 2019-04-26 2023-02-21 ブラザー工業株式会社 Numerical controller
CN112828678B (en) * 2021-02-09 2022-03-18 蓝思智能机器人(长沙)有限公司 Speed compensation method and device and electronic equipment
WO2024042618A1 (en) * 2022-08-23 2024-02-29 ファナック株式会社 Control device and computer-readable recording medium
CN118081477A (en) * 2024-04-28 2024-05-28 通用技术集团机床工程研究院有限公司 Workpiece processing method and device

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4944806B2 (en) * 2007-10-09 2012-06-06 オークマ株式会社 Position control device
JP4467625B2 (en) * 2008-03-31 2010-05-26 三菱電機株式会社 Numerical control apparatus and numerical control method
CN101581927B (en) * 2008-05-15 2012-10-10 鸿富锦精密工业(深圳)有限公司 Computerized numerical control machine tool and acceleration-deceleration method thereof
JP5129064B2 (en) * 2008-08-26 2013-01-23 新日本工機株式会社 Numerical control device for machine tools
CN101556472B (en) * 2009-05-13 2010-08-25 中国科学院数学与***科学研究院 Small straight-line section interpolation method of numerical control system on basis of multicycle optimal corner
WO2011101915A1 (en) * 2010-02-19 2011-08-25 三菱電機株式会社 Command generation device
JP5149421B2 (en) * 2011-05-20 2013-02-20 ファナック株式会社 Numerical control device having machining time prediction unit and machining error prediction unit
JP5417392B2 (en) * 2011-07-29 2014-02-12 新日本工機株式会社 Numerical controller
DE112011105627T8 (en) * 2011-09-15 2014-11-06 Dmg Mori Seiki Co., Ltd. Machining program creating device, numerical control device, machining system, machining program creating method, numerical control method, and machining program
CN103901815B (en) * 2012-12-25 2017-02-08 安川电机(沈阳)有限公司 Value control apparatus and value control method
KR101688360B1 (en) * 2013-03-14 2016-12-20 미쓰비시덴키 가부시키가이샤 Servo control device
WO2015159390A1 (en) * 2014-04-16 2015-10-22 三菱電機株式会社 Command value generating device
JP5850996B1 (en) * 2014-08-05 2016-02-03 ファナック株式会社 Numerical control device with corner path generation function considering acceleration / deceleration after interpolation
JP6380119B2 (en) * 2015-01-20 2018-08-29 ブラザー工業株式会社 Numerical control device and control method
JP6435872B2 (en) * 2015-01-20 2018-12-12 ブラザー工業株式会社 Numerical control device and control method

Also Published As

Publication number Publication date
CN108375957A (en) 2018-08-07
JP2018124996A (en) 2018-08-09
CN108375957B (en) 2021-03-26

Similar Documents

Publication Publication Date Title
JP6885350B2 (en) Numerical control device and control method
EP1720085B1 (en) Curve interpolating method
JP6435872B2 (en) Numerical control device and control method
JP6450732B2 (en) Numerical controller
JP5417392B2 (en) Numerical controller
JP6426662B2 (en) Numerical control device for skiving control
JP5255108B2 (en) Numerical control device for speed control by command path speed condition
JP5431987B2 (en) Machine tool controller
CN102789194A (en) Numerical controller with machining time prediction unit and machining error prediction unit
JP2004078516A (en) Curve interpolation method
EP2049959A2 (en) System and method for surface finish management
JP6363642B2 (en) Numerical controller with corner path optimization function in tangential continuous corners
US7518329B2 (en) Method and device for cutting freeform surfaces by milling
CN107797514A (en) Possesses the numerical control device for the cutter back-off function for avoiding interference
JP2008046899A (en) Numerical control device
JP6396273B2 (en) Numerical control device for positioning to avoid interference with workpiece
WO2020178978A1 (en) Machining program conversion device, numerical control device, and machining program conversion method
JP2021002092A (en) Numerical controller
JP6487490B2 (en) Numerical controller
JP6380119B2 (en) Numerical control device and control method
JP6062971B2 (en) A numerical controller that controls machine tools based on skiving instructions
JP6408040B2 (en) Numerical controller
JP4982170B2 (en) Machining control device and machining control program
JP3902353B2 (en) Numerical controller
JP3065167B2 (en) Automatic programming device for numerical control

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210216

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20210224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210322

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210426

R150 Certificate of patent or registration of utility model

Ref document number: 6885350

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150