JP2018124996A - Numerical control device and control method - Google Patents

Numerical control device and control method Download PDF

Info

Publication number
JP2018124996A
JP2018124996A JP2018013342A JP2018013342A JP2018124996A JP 2018124996 A JP2018124996 A JP 2018124996A JP 2018013342 A JP2018013342 A JP 2018013342A JP 2018013342 A JP2018013342 A JP 2018013342A JP 2018124996 A JP2018124996 A JP 2018124996A
Authority
JP
Japan
Prior art keywords
error
point
command
block
deceleration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018013342A
Other languages
Japanese (ja)
Other versions
JP6885350B2 (en
Inventor
弦 寺田
Gen Terada
弦 寺田
小島 輝久
Teruhisa Kojima
輝久 小島
友哉 石川
Tomoya Ishikawa
友哉 石川
基希 金田
Motoki Kaneda
基希 金田
英二 社本
Eiji Shamoto
英二 社本
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

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

Abstract

PROBLEM TO BE SOLVED: To provide a numerical control device and a control method capable of improving processing quality even with a traveling route in which small blocks continue.SOLUTION: A numerical control device creates a speed profile along a route obtained by interpolating command points commanded by an NC program. The numerical control device specifies the focused command point from among the command points and calculates an influenced section before and after the focused command point (S26). The numerical control device divides the influenced section and calculates a command interpolation point (S27). The numerical control device processes the command interpolation point with a travel average filter (S28) and calculates an operation interpolation point. The numerical control device calculates, as an error, a distance between the focused command point and the closest operation interpolation point (S29). When the error exceeds a target error, the numerical control device calculates a deceleration rate and updates the speed profile based on the influenced section and the deceleration rate. The numerical control device decelerates at the influenced section including the command point, and thus acceleration and deceleration are not frequently repeated even with a route in which small blocks continue.SELECTED DRAWING: Figure 10

Description

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

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

特開2016−133988号公報Japanese Patent Laying-Open No. 2006-133888

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

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

請求項2に係る数値制御装置の前記区間は、前記注目指令点の前において、少なくとも前記フィルタの時定数の合計の半分の時間で移動する小区間を含み、前記注目指令点の後においても、同様の小区間を含むとよい。故に数値制御装置は、指令点における誤差に影響する区間において速度プロファイルを更新できるので、指令点における誤差を効果的に抑制できる。   The section of the numerical control device according to claim 2 includes a small section that moves at least half the total time constant of the filter before the target command point, and after the target command point, It is good to include the same small section. Therefore, since the numerical control apparatus 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 a 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, wherein the error determination means for determining whether or not the error when moving in the section at the deceleration rate calculated by the calculation means is within an allowable range with respect to the specified value; When the error determining unit determines that the error is outside the allowable range, the error determining unit may include a changing unit that changes the deceleration rate so that the error is within the allowable range. Since the numerical control device changes the deceleration rate so that the error falls within the allowable range, it does not decelerate 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 allowable range.

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

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

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

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

本発明の請求項9に係る制御方法は、NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、各指令点の間の距離と速度の情報を含む速度プロファイルを作成し、フィルタによる加減速処理を行った結果に基づき、工具又は被削材の移動を制御する数値制御装置の減速制御方法において、前記経路中の前記指令点の中から注目する指令点を注目指令点として指定する指定工程と、前記指定工程で指定した前記注目指令点の前後において、前記フィルタの時定数に基づく時間の区間を指定する区間指定工程と、前記区間指定工程で指定する前記区間を所定時間で分割する分割工程と、前記分割工程で分割した前記区間を前記フィルタと同等の時定数を持つフィルタで処理する処理工程と、前記処理工程で処理した前記区間において、前記注目指令点における前記経路からの誤差を算出する誤差算出工程と、前記誤差算出工程で算出した前記誤差が、予め設定した規定値を超えるか判断する判断工程と、前記判断工程において、前記誤差は前記規定値を超えると判断した場合、前記規定値と前記誤差に基づく減速率を算出する算出工程と、前記区間指定工程において指定した前記区間と、前記算出工程で算出した前記減速率とに基づき、前記速度プロファイルを更新する更新工程とを備えたことを特徴とする。故に数値制御装置は上記各工程を実行することで、請求項1の効果を得ることができる。   A control method according to claim 9 of the present invention creates a speed profile including information on distance and speed between each command point along a path obtained by interpolating a plurality of command points commanded by the NC program. In the deceleration control method of the numerical control device for controlling 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 noticed is selected from the command points in the path. A designation step that designates a time interval based on a time constant of the filter before and after the target command point designated in the designation step, and a predetermined interval that is designated in the interval designation step. A division step of dividing by time, a processing step of processing the section divided by the division step with a filter having a time constant equivalent to the filter, and the section processed in the processing step. In the error calculating step of calculating an error from the route at the attention command point, the determining step of determining whether the error calculated in the error calculating step exceeds a preset specified value, and the determining step, When it is determined that the error exceeds the specified value, a calculation step of calculating a deceleration rate based on the specified value and the error, the interval specified in the interval specifying step, and the deceleration rate calculated in the calculating step And an update step for updating the speed profile. Therefore, the numerical control device can obtain the effect of claim 1 by executing the above steps.

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

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

図1を参照し、工作機械1の構成を説明する。工作機械1は、例えばテーブル上面に保持した被削材に対し、主軸に装着した工具を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 a vertical machine tool that performs cutting by moving a tool mounted on a spindle in the X-axis direction, the Y-axis direction, and the Z-axis direction with respect to a work material held on a table upper surface, for example. The machine tool 1 includes a spindle mechanism, a spindle movement mechanism, a tool changer, and the like (not shown). The spindle mechanism includes a spindle motor 52, and rotates the spindle on which a tool is mounted. The spindle moving mechanism includes a Z-axis motor 51, an X-axis motor 53, and a Y-axis motor 54, and moves the spindle relative to the work material supported on the upper surface of a table (not shown) in each of the XYZ axial directions. . The tool changer includes a magazine motor 55, drives a tool magazine (not shown) that stores a plurality of tools, and exchanges the tool mounted on the spindle with another tool. The machine tool 1 further includes an operation panel 10. The operation panel 10 includes an input unit 24 and a display unit 25. The input unit 24 is a device for performing various inputs, instructions, settings, and the like. The display unit 25 is a device that displays various screens. The operation panel 10 is connected to the input / output unit 35 of the numerical controller 30. The Z-axis motor 51 includes an encoder 51B. The spindle motor 52 includes an encoder 52B. The X-axis motor 53 includes an encoder 53B. The Y-axis motor 54 includes an encoder 54B. The magazine motor 55 includes an encoder 55B. The encoders 51B to 55B are connected to drive circuits 51A to 55A, which will be described later, of the numerical control device 30, respectively.

図1を参照し、数値制御装置30の電気的構成を説明する。数値制御装置30は、CPU31、ROM32、RAM33、記憶装置34、入出力部35、駆動回路51A〜55A等を備える。CPU31は数値制御装置30を統括制御する。ROM32は、メインプログラム等の各種プログラムを記憶する。RAM33は各種処理実行中の各種データを記憶する。記憶装置34は不揮発性メモリである。入出力部35は操作盤10に接続する。駆動回路51A〜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 performs overall control of the numerical control device 30. The ROM 32 stores various programs such as a main program. The RAM 33 stores various data during execution of various processes. The storage device 34 is a nonvolatile memory. The input / output unit 35 is connected to the operation panel 10. The drive 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 drive signals described later from the CPU 31, and output drive currents (pulses) to the corresponding motors 51 to 55, respectively. The drive circuits 51A to 55A receive feedback signals from the encoders 51B to 55B and perform position and speed feedback control. The drive circuits 51A to 55A may be, for example, FPGA circuits.

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

図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 that the moving average filter averages. For example, when the sampling 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 ten commands including the current interpolation command as the current output. The time constant of the moving average filter of the first stage (FIR1) t 1, the time constant of the moving average filter of the second stage (FIR2) and t 2.

移動速度を二段の移動平均フィルタ(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 value, so the tool slowly increases the speed by t 1 + t 2 and reaches the maximum speed, and then , T 1 + t 2 , and slowly stop 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, thereby suppressing the vibration of the machine tool 1 and the maximum torque required for the 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)で処理した図である。   With reference to FIG. 3 and FIG. 4, an inward error occurring at a corner in the movement path will be described. The path R1 shown in FIG. 3 is formed by two linear interpolation commands (G1 command), and the linear interpolation block B2 is connected at the command point P next to the linear interpolation block B1. Block B1 is linear interpolation in the X-axis direction, and block B2 is linear interpolation in the Y-axis direction. The inter-block angle β is 90 °. 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 route R1 in FIG. 3 are processed by a two-stage moving average filter (FIR1, 2). It 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 begins to decelerate from the maximum speed, speed 2 begins to accelerate. In the portion where the speed 1 and the speed 2 overlap, the tool moves inward around the command point P that is a corner of the path R1 (see the path R2). When speed 1 starts decelerating from the maximum speed, the tool is located at A1. A2 is the point where the command point P and the route R2 are closest. The distance from the command point P to A2 is an inward error (hereinafter referred to as an error). When speed 1 decelerates from maximum speed to 0, the tool is located at A3. A2 is a position where the error is maximum with respect to the route R1. A3 is a position where the error is eliminated. Time to A1~A3 until the error is eliminated occurs when corresponds to the sum of the constants t 1 and t 2. As an example of a method for suppressing an error occurring in a corner to a target error, there is a method of decelerating before the corner. By decelerating before the corner, the overlap time of the speed 1 and the 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 FIG. 5 and FIG. 6, the outline of the present invention and an inner loop error that occurs in a path in which minute blocks are continuous will be described. A route R3 shown in FIG. 5 (1) is a program route based on the NC program. The path R3 includes a plurality of micro blocks (G1 blocks) B1 to B6 having a short block length. Block and block seams are command points. Micro block B1 is between command points C0 and C1, micro block B2 is between command points C1 and C2, micro block B3 is between command points C2 and C3, micro block B4 is between command points C3 and C4, micro block B5 is between command points C4 and C5, and micro block 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 route R3 in FIG. 5 (1) with a two-stage moving average filter. The speed profile is a set distance and speed (cutting feed speed) of each block. The moving speed after the filtering process gradually increases to reach the maximum speed, and the micro blocks B1 to B6 move at the maximum speed, and then slowly decrease and stop. A route R4 shown in FIG. 5 (1) is a route after filtering that has moved at the moving speed shown in FIG. 6 (1). In the portion where the micro blocks B1 to B6 are continuous, the axis is greatly moved inward. For example, since there is the next command point C2 immediately after the command point C1, the next command point C2 is passed without the error occurring at the command point C1 being eliminated. Then, since the command points C3, C4,... Sequentially pass, the route R4 moves largely inward with respect to the route R3. The separation distance between the command points C0 to C6 and the route R4 corresponds to an error. In order to suppress such an error to the target error, as described above, when the method of decelerating at the joint part of the block is adopted, in the path where the minute block continues, the block joint part is decelerated and the next block is accelerated. Will be repeated frequently. If frequent acceleration / deceleration is performed, machine vibration may occur and the quality of the machined surface may deteriorate. Further, since the cutting traces (tool marks and cutter marks) on the processed surface change depending on the feed speed, if acceleration / deceleration is repeated, streaks due to the cutting traces are generated and the quality of the processed surface is deteriorated.

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

図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 obtained by performing a fully automatic deceleration process on the speed profile shown in FIG. 6 (1). The movement speed after the fully automatic deceleration process is different from the movement speed obtained by only the filter process, and each of the command points C0 to C6 is changed during the movement of the minute blocks B1 to B6 after increasing the speed to reach the maximum speed. Slow down slowly according to the affected section. That is, in the portion where the micro 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, and then decelerates and stops. A route R5 illustrated in FIG. 5B is a movement route after the fully automatic deceleration process. The route R5 has a smaller error from the route R3 than the route R4. Therefore, this embodiment can 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. When the operator designates an NC program on the operation panel 10 and inputs an execution operation, the CPU 31 calls the main program from the ROM 32 and executes this processing. The CPU 31 calls and interprets the designated NC program from the storage device 34 (S1). The CPU 31 generates a plurality of movement commands based on the interpretation of the NC program (S2). The movement command specifies the position (coordinate value) for moving the axis. An example of the movement command is a linear interpolation command and a circular interpolation command. The position specified by the movement command is the command point. There is a block between the command points. The path connecting each command point is a program path.

CPU31は生成した複数の移動指令に基づきブロック情報20を作成する(S3)。図8に示すように、ブロック情報20は、ブロック番号と軸移動情報を備える。ブロック番号は、プログラム経路を構成するブロックの順番である。軸移動情報は、各ブロックにおける軸移動に関する情報であり、例えば移動ベクトル、ブロック長、移動速度、移動時間等の各種情報を含む。ブロック情報20はRAM33に記憶する。移動ベクトルは、ブロックの方向ベクトルである。   The CPU 31 creates block information 20 based on the generated plurality of 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 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 a 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 movement path error is automatically adjusted to be equal to or less than a preset target error by decelerating in the affected section of each command point. The fully automatic deceleration mode can be set, for example, with the input unit 24 of the operation panel 10. When the fully automatic deceleration mode is on (S4: YES), the CPU 31 executes a fully automatic deceleration process (see FIG. 9) (S5). After the fully automatic deceleration process is executed, 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 process, the moving speed is filtered based on the block information 20 stored in the RAM 33, and the 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. In the present embodiment, it is necessary to determine a speed profile before executing a movement command for a certain block. In order to determine the speed profile, it is necessary to execute a later-described deceleration calculation process (S11) and an error confirmation process (S12) of the fully automatic deceleration process shown in FIG. Therefore, the CPU 31 needs to prefetch the block information 20 when executing the block movement command. Prefetching is to read in advance a block to be executed in the future. In the deceleration calculation process, each command point has a past influence block before the command point and a future influence block after the command point 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 is a block within the range that affects the error of each command point. As will be described later, the influence block exists in the range of half the time constant before and after the command point, respectively. It is a block. In the error confirmation process, it is confirmed that the path error at each command point is within the target range for the speed profile updated by the deceleration calculation process. If the path error is not within the target range, the speed is checked again. Update the profile. In the deceleration calculation process, as described above, the speed of each command point and the block within the range of influence before and after the command point are updated. Therefore, the error check process is a command point that performs the deceleration calculation process to prevent mutual influence. This must be done for blocks outside the range of effects. That is, in the deceleration calculation process and the error check process, the speeds of the past influence block and the future influence block are changed. Therefore, when executing the block movement command, at least after the time constant doubled. It is necessary to read ahead for the blocks to be processed up to.

先読みには、定数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 prefetching. S is the number of prefetched blocks, and G is the number of affected blocks. Since the number of influence 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 having a variable time constant. As the worst condition, for example, a case where the total time constant is 6000 msec (maximum set value) is considered. In addition, when the processing cycle (sample time) of the CPU 31 is 1 msec, the shortest block that can be processed by the CPU 31 is a block that completes moving in 1 msec. When all the blocks are blocks that have been moved in a sample time of 1 msec, G takes the maximum value. When the time constant is 6000 msec which is the maximum setting value, G is 6000/2 = 3000 blocks. As described above, since the number of blocks required for prefetching is the number of blocks that are processed before the time constant is doubled, the CPU 31 needs to prefetch 4 × 3000 = 12000 blocks. As shown in FIG. 8, when k is an error check block number, the deceleration calculation block number is k + 2G, the prefetch block number is k + 3G, and the execution block number is k−G. The deceleration calculation block number is a block number for executing a deceleration calculation process. The error check block number is a block number for executing error check processing. The execution block number is a 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 process flow 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 in this embodiment is 3000. Therefore, the CPU 31 reads block B (1) to block B (9000). The CPU 31 executes the deceleration calculation process for the read blocks B (1) to B (2G) (S8). The CPU 31 sets 1 to the error check 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 a circular interpolation command (G2 command) (S22). When the command is a linear interpolation command (S22: linear interpolation), the CPU 31 sets the end point of the block B (6001) as a target command point (S25). If the command is an arc interpolation command (S22: arc interpolation), the CPU 31 executes an 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. In the fully automatic deceleration process, an error at the target command point is calculated, and a moving speed that makes the error equal to or less than the target error is obtained. However, for example, as shown in FIG. 11, in the circular interpolation command for interpolating between the points A and B with a circular arc, only the error at the command point at the arc start point and the error at the command point at the arc end point is 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 arc center portion, and errors due to the curvature of the arc can be suppressed by suppressing errors in the arc center command points. . The arc center command point is a point at which the movement distance when the command point of the arc end point is circularly interpolated from the command point of 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 affected section calculation process will be described with reference to FIGS. In the program path shown in FIG. 13, the command point of interest is the i-th command point pos i . The meanings of symbols used in this calculation process are as follows.
L i : i-th block length (mm)
F i : i-th block speed (mm / min)
Nc i : Number of command interpolation points (real number) of i-th block (number)
・ N block : Maximum number of prefetched commands (pieces)
Dt: Sample time (msec)
・ T: Total time constant (msec)
Posx i , posy i , posz i : command point of i-th and i + 1-th joint posx is , posy is , posz is : the earliest command point that affects the error (mm)
· Posx ie, posy ie, posz ie: the slowest command point impact on the error (mm)
• i s : earliest command number that affects error • i e : latest command number that affects error • posx sti , posy sti , posz sti : influence start point for i-th command point (mm)
Posx eni , posy eni , posz eni : Influence end point for the i-th command point (mm)
Note that the sample time dt corresponds to a processing cycle.

図14に示すように、CPU31は、ブロック毎に移動距離と移動速度から指令補間点数を実数で求める(S51)。CPU31は、例えばi番目のブロックの指令補間点数(実数)を、以下の数式で計算する。
・nc=(L×60×1000/F)/dt
As shown in FIG. 14, the CPU 31 obtains a command interpolation point by a real number from the moving distance and the moving speed for each block (S51). The CPU 31 calculates, for example, the command interpolation point (real number) 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 target command point (S52). The earliest command point that affects the target command point is the command point with the lowest command number among the command points existing in the range from the target command point to the time point that is half the time constant total. is there.

次いで、CPU31は、着目指令点に影響を及ぼす最も遅い指令点の指令番号を求める(S53)。着目指令点に影響を及ぼす最も遅い指令点とは、着目指令点から時定数合計の半分の時間だけ経過した時点までの範囲の外に存在する指令点のうち、もっとも指令番号の小さい指令点である。   Next, the CPU 31 obtains the command number of the slowest command point that affects the target command point (S53). The slowest command point that affects the target command point is the command point with the smallest command number among the command points that exist outside the range from the target command point to the point when half the 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 target block. 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 target block. 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. CPU31 complete | finishes this process and advances a process to S27 of FIG. The CPU 31 executes a command interpolation point calculation process (S27). The command interpolation point calculation process is a process for obtaining a command interpolation point between the influence start point and the influence end point. The command interpolation point is obtained by dividing each block for each sample time, and can be calculated from the moving speed of each block and the sample time.

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

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

Note that j = 1 to 3. The CPU 31 adds the same value as the start point and the end point to the command interpolation point by (t j / dt) before and after the start point of the command interpolation point in order to make the start point and end point of the command interpolation point and the motion interpolation point coincide. calculate. The CPU 31 executes error calculation processing (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. As shown in FIG. 18, the error is the one that minimizes the distance between the command point and the motion interpolation point, and is obtained as a single solution. The meanings of 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)
I sp : search point ε 1 : distance (mm) between the motion interpolation point immediately before the search point and the command point
・ Ε 2 : Distance between search point and command point (mm)
· Epsilon 3: distance command point and operating interpolation point after one of the search points (mm)
・ Ε: Error (mm)
-Vector p: Vector in which the motion interpolation point with the second smallest error is seen from the motion interpolation point with the smallest error-Vector ε 2 : Vector in which the command point is seen from the motion interpolation point with the smallest error

図17に示すように、CPU31は、動作補間点を探索点(図18参照)とし、探索点と着目指令点の誤差を、以下の[数2]で計算する(S71)。なお、初期探索点は、着目指令点に最も近い指令補間点に対応する動作補間点とする。
As shown in FIG. 17, the CPU 31 uses the motion interpolation point as a search point (see FIG. 18), and calculates the error between the search point and the target command point using the following [Equation 2] (S71). Note that the initial search point is an operation interpolation point corresponding to the command interpolation point closest to the target command point.

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

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

The CPU 31 calculates the error between the motion interpolation point immediately after the search point and the target command point by the following [Equation 4].

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に戻り処理を繰り返す。 CPU31 compares the operating interpolation points before and after the search point and search point (S73), the error epsilon 2 is minimal or determine the search point (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. If the error search point epsilon 2 is not the minimum (S74: NO), the error epsilon 1 of operating interpolation point before a search point to minimize or determined (S75). When the error ε 1 is the smallest (S75: YES), that is, when ε 12 , the CPU 31 moves the search point to the previous position by setting i sp = i sp −1 (S76). ) And return to S71 to repeat the process. When the error ε 3 of the motion interpolation point immediately after the search point is the smallest (S75: NO), that is, when ε 32 , the CPU 31 searches by setting i sp = i sp +1. The point is moved back by one (S77), and the process returns to S71 to repeat the process.

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

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

・ When ε 31

CPU31は、計算で求めたベクトルのなす角が鋭角(内積が正)か否か判断する(S79)。図20に示すように、ベクトルのなす角が鋭角である場合(S79:YES)、図21に示すように、CPU31は三平方の定理に基づき、指令点からの最接近点を、以下の[数7]で計算する(S80)。CPU31は指令点と計算で求めた最接近点から誤差を計算する(S81)。このように内挿を行うことで、ベクトルのなす角が鋭角の場合でも最接近点をより高精度に求めることができる。
The CPU 31 determines whether or not the angle formed by the calculated vector is an acute angle (the 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 determines the closest point from the command point based on the three-square theorem as follows: Calculation is performed using Equation 7] (S80). The CPU 31 calculates an error from the command point and the closest approach 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.

図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 perpendicular foot (the closest point) to the straight line connecting the search point and the motion interpolation point with the second smallest error is extrapolated Since it becomes a point, the error may be far from the ideal value. Thus CPU31 determines the error epsilon 2 obtained in S74 to the error epsilon (S82). The error ε is stored in the RAM 33. CPU31 performs 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 processing will be described with reference to FIGS. This process assumes that the error and speed are in a linear relationship, calculates the deceleration rate by interpolation processing, and adjusts the moving speed according to the deceleration rate, thereby matching the error with the target error. It is. This embodiment will be described as the k-th error suppression process when the target command point is the end point of the i-th block. The meanings of symbols used in this processing are as follows.
・ Ε: Error (mm)
・ Ε k : Error of the target command point recalculated k times (mm)
Ε r : target error (mm)
Ε t : Error convergence tolerance (mm)
Rk : Deceleration rate recalculated k times (-)
Fik : Speed recalculated k times (mm / min)
I s : earliest command that affects error (-)
I e : Slowest command (−) that affects error
N block : Maximum number of read-ahead blocks (-)

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

CPU31は影響区間の速度を、以下の数式で計算する(S93)。
・Fik=F×R
但し、i≦i≦iである。
CPU31 calculates the speed of an influence area with the following numerical formula (S93).
・ F ik = F i × R k
However, i s ≦ i ≦ i e .

CPU31は求めた移動速度で、影響区間を再計算する(S94)。計算方法は、図14に示す影響区間計算処理における計算方法と同様である。CPU31は指令補間点を再計算する(S95)。CPU31は、再度指令補間点計算処理を実行する。CPU31は求めた指令補間点を用いて、動作補間点を再計算する(S96)。計算方法は、図10のS28のフィルタ処理における計算方法と同様である。CPU31は求めた動作補間点と指令点を用いて、誤差εを再計算する(S97)。計算方法は、図17の誤差計算処理における計算方法と同様である。 The CPU 31 recalculates the affected section at the determined 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 motion interpolation point using the obtained command interpolation point (S96). The calculation method is the same as the calculation method in the filter processing of S28 of FIG. The CPU 31 recalculates the error ε k by using the obtained motion interpolation point and command point (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 this 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 (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 flowchart of FIG. 10 and advances the process to S31 described later.

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

但し、ε<εのとき、ε<εであれば、ε=ε、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. Thus, as the error epsilon a is the error convergence within tolerance epsilon t, CPU 31 is required to change the deceleration rate. The CPU 31 changes the deceleration rate so that the error ε k becomes the target error ε r by, for example, linear interpolation (S100). In the present 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 again is ε a , the CPU 31 sets the deceleration rate R k + 1 as follows: Calculate with [Equation 8]. In general, the relationship between the error and the deceleration rate is not linear, but the deceleration rate that satisfies 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 allowable value ε t from the target error ε r . This is for efficiently obtaining a deceleration rate that satisfies the error convergence tolerance.

However, when ε kr and ε ak , ε 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 processing to recalculate the error. The initial value of epsilon a is 0, the initial value of epsilon b is epsilon, the initial value of R a is 0, the initial value of R b is 1.

再計算で求めた誤差が誤差条件を満たす場合(S98:YES)、CPU31は減速率、影響開始点、影響終了点を決定する(S99)。誤差は、目標誤差以下で、且つ誤差許容値の範囲内となるので、本実施形態は、加工品質を向上しつつ短い加工周期で加工を完了できる。CPU31は、速度プロファイル更新処理を実行する(S31)。   When the error calculated 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 equal to or less than the target error and within the range of the allowable error value, this embodiment can complete the machining in a short machining cycle while improving the machining quality. The CPU 31 executes a 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. In the present embodiment, a case where the speed profile of the program path shown in FIG. 26 is created will be described as an example. As shown in FIG. 25, for example, when the command point C3 is set as the target command point, the CPU 31 determines whether the command point C3 is an arc center command point and the moving time of the arc is shorter than the total time constant (S101). ). Since the command point C3 is the block end point (S101: NO), the CPU 131 sets the affected zone as the deceleration zone (S102). The deceleration zone is a zone where the vehicle is decelerated at the deceleration rate determined by the error suppression process of FIG. The CPU 31 determines the speed of the target block based on the influence start point, the influence end point, and the deceleration rate for the command point C3 determined in 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 shows a speed profile with the command point C3 as the target command point. 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 an 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 updates the speed profile by integrating the generated speed profile and the speed profile previously generated and stored in the RAM 33 (S106). When the update of the speed profile at the command point C3 is completed, as shown in FIG. 28, the CPU 31 sets the next command point C4 as the target command point, and creates a speed profile in the same manner as the command point C3. FIG. 29 shows a speed profile with the command point C4 as the target command point. When the command point C4 is set as the target command point, 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 an 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 shows a superposition of the speed profile at the command point C3 and the speed profile at the command point C4. According to these two speed profiles, there are overlapping sections with different moving speeds. In the overlapping section, the CPU 31 selects the one with the lower moving speed (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. Thereafter, the moving speed is accelerated 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 speed profile data of the integration result of FIG. The speed profile data includes commands, block lengths, speeds, speed division numbers, distances, deceleration rates, and the like, and these various data are stored in association with each other. The program paths shown in FIGS. 26 and 28 are configured by blocks B1 to B6 that are 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 designated by the movement command, and the movement speeds 1 to 6 are all the same movement speed F.

速度分割数は、各ブロック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 for dividing the movement speed in each of the blocks B1 to B6. As shown in FIG. 30, the moving speed is divided at block lengths L2, L3, and L6. Therefore, the speed division number is 1 in the block lengths L2, L3, and L6, and is 0 because the other divisions are not performed. The distance is the distance from the start point of the block to the speed change point as seen. For example, for 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 for the distance p2, and the deceleration rate = R3 is stored for the distance L2. The CPU 31 stores the speed profile data in the RAM 33, returns to the flowchart of FIG. 10, and advances the process to 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. The program path shown in FIG. 32 is a path in which a circular interpolation command (G2 command) is sandwiched between two linear interpolation commands (G1 command). In the path of circular interpolation, there is a problem 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 as described above. As shown in FIG. 25, when the command point of interest is an arc center command point and the movement time of the arc is equal to or greater than the total of the time constants (S101: YES), the CPU 31 sets the entire arc as a deceleration zone (S103). ). If the moving time of the arc is shorter than the sum of the time constants and the affected section exceeds the entire arc, the CPU 31 may set the affected section as a deceleration section as a rule.

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

速度プロファイル更新後(図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 an arc center command point (S32). When the target command point is the arc center command point (S32: YES), the CPU 31 sets the end point of the circular interpolation block as the target command point (S25) and repeats the above processing. When the command point of interest is not the arc center command point but the block end point (S32: NO), the CPU 31 sets the error check block number k = 1 (S9) and reads the block B (k + 3G) (S10). CPU31 performs the deceleration calculation process of block B (k + 2G) (S11). The CPU 31 pays attention to the block B (k) and executes an error confirmation process (S12).

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

図8に示す例において、誤差確認ブロック番号はk=3001である。図35に示すように、CPU31は着目したブロックについて、図10の減速計算処理と同様の処理を実行する(S111)。但し、速度プロファイル生成後のブロックは、減速計算処理前のブロックを速度分割数で分割しており、一つのブロックで移動速度が変化する。故にCPU31は減速計算処理で用いた上記数式をそのまま使用できない。本実施形態は速度プロファイル生成後のブロックを、移動速度が変わる継ぎ目毎に分割した仮想ブロックとし、仮想ブロックと仮想ブロックの継ぎ目の点を仮想指令点とする。CPU31は仮想ブロックと仮想指令点を、ブロックと指令点とすることにより、上記数式を使用できる。 In the example shown in FIG. 8, the error check block number is k = 3001. As shown in FIG. 35, the CPU 31 executes a process similar to the deceleration calculation process of FIG. 10 for the focused block (S111). However, the block after the speed profile is generated is obtained by dividing the block before the deceleration calculation process by the number of speed divisions, and the movement 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 that is divided for each joint where the moving speed changes, and the point between the virtual block and the joint of the virtual block is a virtual command point. The CPU 31 can use the above formula by setting 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 moving 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 the block B1 is L1, and the block length of the block B2 is L2. As a result of the deceleration calculation process (see FIG. 10) for the command point Cn, in the speed profile shown in FIG. 36 (2), the block B1 is divided into two blocks B1-1 and B1-2, and the block B2 is divided into the block B2 -1 and B2-2. The moving speed is decelerated at the distance p11 at the block length L1, and then accelerated at the 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 sets two joints whose speeds change 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 a block and command point, the CPU 31 can use the above formula. Since the virtual command point is not the command point at which the error is 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 check process in FIG. It does not have to be. Therefore, the CPU 31 executes the deceleration calculation process (S111). As a result, even if the error at the other command point becomes larger than the target error, the error check process is performed to obtain another command point that has become larger. The error can be suppressed and the speed profile can be updated again. The CPU 31 executes a replacement process (S112) and returns to the flowchart of FIG.

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

本処理で用いるブロックの速度分割数、距離、減速率は、以下のように定義する。
・ブロックの速度分割数:(誤差確認処理時の仮想ブロック毎の速度分割数+1)の合計値−1
・ブロックの距離:ブロックの始点から見た速度変化点までの距離
なお、速度変化点は、ブロックの終点も含む。
・ブロックの減速率:減速計算処理で求めた減速率と、誤差確認処理で求めた減速率との積
The speed division number, distance, and deceleration rate of the block used in this process are defined as follows.
Number of speed divisions of block: Total value of (number of speed divisions for each virtual block at the time of error check process + 1) −1
Block distance: Distance from the start point of the block to the speed change point seen from the block Note that the speed change point includes the end point of the block.
Block deceleration rate: product of the deceleration rate obtained by the deceleration calculation process and the deceleration rate obtained by the error check 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 a speed profile obtained by the deceleration calculation process. The speed profile is for a path composed of four blocks B1 to B4. The block length of the block B1 is L1, the block length of the block B2 is L2, the block length of the block B3 is L3, and the block length of the block B4 is L4. R3 and R4 are deceleration rates. The moving speed varies with the block lengths L2, L3, and L4. In the middle of the block length L2, the speed is reduced 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 is accelerated from the speed F × R4 to the speed F. The block B2 is divided into two blocks B2-1 and B2-2. The block B3 is also divided into two blocks B3-1 and B3-2. The block B4 is also divided into two 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 shows an example of the speed profile obtained by the error check process, and the same process as the deceleration calculation process is performed again on the block after the speed profile generation of FIG. 37 as described above. Even in this speed profile, the speed changes with the block lengths L2, L3, and L4, respectively, but the movement speed further changes in stages in the blocks B3-1 and B3-2. R3 to R7 are deceleration rates. In block B3-1, the speed is reduced 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 FIG. 37 and FIG. In the speed profile data generated by the deceleration calculation process, the speed division number of block number 1 (B1) is 0, the distance is L1, and the deceleration rate is 1. The number of speed divisions of block number 2 (B2) is 1. Since the distances are the distances from the start point of the block B2 to the blocks B2-1 and B2-2, they are p2 and L2. 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 block number 3 (B3) is 1. The distances are p3 and L3 because they are the distances from the start point of the block B3 to the blocks B3-1 and B3-2. 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 block number 4 (B4) is 1. Since the distances are the respective distances from the start point of the block B4 to the blocks B4-1 and B4-2, they are p4 and L4. 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 check process, the speed division number of block number 1 (B1) is 0, the distance is L1, and the deceleration rate is 1. Of the block number 2 (B2), the speed division number of the block B2-1 is 0, the distance is p2, and the deceleration rate is 1. Since the speed division number of the block B2-2 is 0 and the distance is the distance from the virtual command point of the block B2, L2-p2 and the deceleration rate are 1. Of the block number 3 (B3), the speed division number 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 starting point of the block B3-1 to the two speed change points, and therefore, p31 and p3. The deceleration rate is 1 and R5. The number of speed divisions in the 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 starting point of the block B3-2 to the two speed change points, and therefore p32 and L3-p3. The deceleration rate is R6 and R7. Of the block number 4 (B4), the speed division number of the block B4-1 is 0, the distance is p4, and the deceleration rate is 1. Since the speed division number of the block B4-2 is 0 and the distance is the distance from the virtual command point of the block B4, 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 by the error confirmation process with the speed division number, distance, and deceleration rate of the block. FIG. 40 shows speed profile data after the replacement process. The deceleration rate after the replacement process is the product of the deceleration rate obtained by the deceleration calculation process and the deceleration rate obtained by 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 start point of the block B2 from the distance L2-p2. 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 by 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 speed profile data for each block. The replaced speed profile data 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 flowchart of FIG. If k> G (S13: YES), the error check process for the first block has been completed, so block B (k-G) is executed (S14). When k ≦ G (S13: NO), the error check process for the first block is not completed, so the block is not executed and the process proceeds to the next process. In the example illustrated in FIG. 8, when the error check 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 for each axis, and executes the movement command for 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 k + 3G is larger than the total number of blocks (S16). If k + 3G is equal to or less than 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 k + 2G is larger than the total number of blocks (S17). When k + 2G is equal to or less than the total number of blocks (S17: NO), the CPU 31 returns to S11, executes the deceleration calculation process for 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 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 the error check process of the block B (k), and repeats the process. When k is larger than the total number of blocks (S18: YES), the CPU 31 determines whether k-G is larger than the total number of blocks (S19). If k-G is equal to or less than the total number of blocks (S19: NO), the CPU 31 returns to S13, and if k> G (S13: YES), executes block B (k-G) (S14) and repeats the process. When k-G is larger than the total number of blocks (S19: YES), since execution of all the prefetched blocks has been completed, the CPU 31 returns to the flowchart 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. In the present embodiment, a simulation when the fully automatic deceleration process is executed is performed on the program path shown in FIG. As shown in FIG. 41, the program path includes a G1 block that moves by linear interpolation in the X-axis direction, a G1 minute block that moves by curving in a large arc shape in the Y-axis direction from the end point of the G1 block, and a G1 minute The G1 block moves by linear interpolation in the Y-axis direction from the end point of the block. 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) shows a speed profile when the fully automatic deceleration process is not performed, and FIG. 42 (2) shows a speed profile when the fully automatic deceleration process is executed. It can be seen that by executing the fully automatic deceleration process, the vehicle is smoothly decelerating around the curved portion connected by a plurality of minute blocks. Also, as shown in FIG. 43, it can be seen that even when the change in the moving speed is seen, the vehicle decelerates much more smoothly than the unprocessed state and accelerates smoothly again. Thus, by executing the fully automatic deceleration process, the speed change can be reduced in addition to the repetition of the deceleration and the acceleration. Thereby, the numerical control apparatus 30 of this embodiment can perform an axial movement stably, without applying a load to the machine tool 1. FIG.

図44に示すように、プログラム経路におけるG1微小ブロックのカーブ部分について、全自動減速処理後の移動経路は、減速しない未処理に比べてプログラム経路側に大きくシフトしている。このことから、本実施形態は、誤差を大幅に抑制できることがわかった。図45は、プログラム経路のカーブ部分を形成する9つの指令点における誤差を調べたものである。未処理の移動経路では、約0.2〜0.3mm程度の大きな誤差を生じたが、全自動減速処理後の移動経路では、各指令点において誤差の最大値を目標誤差に抑制できた。故に本実施形態の数値制御装置30は、目標誤差をパラメータとして予め設定することにより、最適な移動速度を自動的に計算できる。そして、各指令点のコーナにおける誤差が大きくなり過ぎたり、逆に速度を落とし過ぎることが無くなるので、加工精度の向上と短い加工周期の両方を達成できることが実証された。   As shown in FIG. 44, with respect to the curve portion of the G1 minute block in the program path, the movement path after the fully automatic deceleration process is largely shifted toward the program path side compared to the unprocessed area that does not decelerate. From this, it was found that the present embodiment can greatly suppress the error. FIG. 45 shows the error at nine command points forming the curve portion of the program path. In the unprocessed movement path, a large error of about 0.2 to 0.3 mm was generated, but in the movement path after the fully automatic deceleration process, the maximum error value 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. And it was proved that both the improvement of the machining accuracy and the short machining cycle can be achieved because the error at the corners 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. FIG. 46 is an example of a route in which a long block having a long moving distance is followed by a minute block having a short moving distance. The portion where the minute blocks are continuous is bent in an arc shape. If a minute block continues after a long block, there may be a large number of start points of the affected section of each command point of the minute block in the long block. In this case, the speed division number 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, there is a possibility that the processing speed of the CPU 31 is not in time, and that a large amount of memory capacity for storing data must be secured. In the present embodiment, in order to solve this problem, the maximum speed division number of one block is set in advance using parameters. In the present embodiment, when the speed division number of one block exceeds the maximum speed division number, the speed division number adjustment process shown in FIG. 47 is executed to adjust the speed profile so that the speed division number becomes the maximum division number. May be.

図47,図48を参照し、速度分割数調整処理を説明する。CPU31は例えば図25に示す速度プロファイル更新処理実行後、ROM32から速度分割数調整プログラムを読込み、本処理を実行してもよい。CPU31は、速度プロファイル更新処理で生成した速度プロファイルについて、1ブロックの速度分割数が最大速度分割数を超えるか否か判断する(S121)。最大速度分割数は記憶装置34に予め記憶する。1ブロックの速度分割数が最大速度分割数を超えない場合(S121:NO)、CPU31は本処理を終了する。   With reference to FIGS. 47 and 48, the speed division number adjustment processing will be described. 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 speed division number of one block exceeds the maximum speed division number for the speed profile generated by the speed profile update process (S121). The maximum speed division number is stored in the storage device 34 in advance. When the number of speed divisions for 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 that is affected by the previous block of the long block. Therefore, A1 section is divided | segmented into many blocks, and a moving speed changes repeatedly. The A3 section is a section that is affected by the subsequent 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 preceding and following blocks. Therefore, the A2 section is not divided and the moving speed is constant. Since it is divided into a large number in the sections A1 and A3, the number of speed divisions as a whole is large.

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

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 and generates a speed profile (S123). As shown in FIG. 48 (2), the speed of each block is adjusted as in the portion shown in gray. In FIG. 48 (2), the boundary line of the section before the division and the boundary line of the section after the division match, but even when the boundary line does not match, the smallest moving speed is selected in each new section similarly. . In the speed profile after adjustment, the number of speed divisions is reduced as compared with the speed profile before adjustment. Therefore, the CPU 31 can reduce the data amount of the speed profile output to the drive circuits 51A, 53A, 54A. Further, since the speed change can be reduced compared to the speed profile before adjustment, the shaft movement can be performed stably and the load applied to the machine tool 1 can also be reduced. 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 a 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 in FIG. 10 is an example of the specifying means of the present invention. The CPU 31 that executes the process of S26 is an example of the section specifying means of the present invention. The CPU 31 that executes the process of S27 is an example of a dividing unit 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 calculation means of the present invention. The CPU 31 that executes the process of S91 in FIG. 23 is an example of a determination unit of the present invention. The CPU 31 that executes the process of S92 is an example of the calculating means of the present invention. The CPU 31 that executes the process of S31 in FIG. 10 is an example of the updating unit 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 determination means of the present invention. The CPU 31 that executes the process of S100 is an example of a changing unit of the present invention. The CPU 31 that executes the process of S22 of FIG. 10 is an example of the interpolation determining means of the present invention. The CPU 31 that executes the processes of S23 and S24 is an example of the adding means of the present invention. The CPPU 31 that executes the process of S102 of FIG. 25 is an example of a first setting unit of the present invention. The CPU 31 that executes the process of S103 is an example of a second setting unit of the present invention.

図35のS111の減速計算処理の中で行う誤差計算処理(図10のS29参照)を実行するCPU31は本発明の再算出手段の一例である。S111の減速計算処理の中で行う誤差抑制処理のS91(図23参照)の処理を実行するCPU31は本発明の再判断手段の一例である。   The CPU 31 that executes an error calculation process (see S29 in FIG. 10) performed in the deceleration calculation process in S111 in FIG. 35 is an example of a recalculation unit 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 a redetermination unit 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 controller 30 according to the present embodiment creates a speed profile along a path obtained by interpolating a plurality of command points commanded by the NC program. The speed profile includes distance and speed information between the command points. The CPU 31 controls the axis movement based on the result of performing the process with the moving average filter used for the acceleration / deceleration process on the speed profile. The CPU 31 calculates a target command point from command points in the program path. CPU31 calculates the influence area based on the time constant of the moving average filter used for acceleration / deceleration processing before and after the calculated attention command point. The CPU 31 divides the calculated influence interval by the sample time and calculates a 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 an 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 motion interpolation point exceeds the target error. When the error exceeds the target error, the CPU 31 calculates the target error and a deceleration rate based on the error. The CPU 31 updates the speed profile based on the affected section and the deceleration rate obtained by calculation. Since the numerical control device 30 does not decelerate only at the command point, but decelerates in the affected section including the command point, the acceleration / deceleration is not repeated frequently even in a path where micro blocks continue. Therefore, the quality of the processed surface of the work material can be improved. By sequentially specifying a plurality of command points for each command point in the route, errors caused by acceleration / deceleration in, for example, a bent corner portion, arc portion, and curved portion in the route can be comprehensively suppressed.

上記実施形態の影響区間計算処理(図14参照)にて、影響区間は、注目指令点の前後において、少なくとも加減速処理に用いる移動平均フィルタの時定数の合計の半分の時間で移動する二つの小区間を含む。故に、指令点における誤差に影響する影響区間において、速度プロファイルを更新できるので、指令点における誤差を効果的に抑制できる。   In the influence interval calculation process (see FIG. 14) of the above-described embodiment, the influence interval is at least two times before and after the target command point. Includes 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 used first in the error suppression process (see FIG. 23) of the above embodiment 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 and the target error when the affected area is moved by the deceleration rate is equal to or less than the error convergence allowable value. The deceleration rate is changed so that the difference between the target error and the target error is less than the error convergence tolerance. Therefore, since it does not decelerate 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 a target command point. When the block is circular interpolation, the CPU 31 designates the circular arc center command point as the target command point. Therefore, the numerical control device 30 can consider an 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 predetermined value or less. Therefore, the numerical controller 30 can improve the quality of the work surface of the work material even in the circular interpolation portion.

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

上記実施形態では、減速計算処理(図9参照)で速度プロファイルを更新した後に、誤差確認処理を実行する。誤差確認処理では、CPU31は誤差を再度計算し、計算した誤差が目標誤差を超えるか再度判断する。誤差が目標誤差を超える場合、CPU31は減速率の再計算と速度プロファイルの更新を再度行う。故に数値制御装置30は誤差を目標誤差以下に抑制できる。   In the above embodiment, the error check process is executed after the speed profile is updated by the deceleration calculation process (see FIG. 9). In the error check process, the CPU 31 calculates the error again, and determines again 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 controller 30 can suppress the error below the target error.

なお、上記実施形態では、誤差が目標誤差を超える場合、減速率の再計算と速度プロファイルの再更新を1回だけ行っているが、繰り返し複数回行ってもよく、例えば、誤差が目標誤差未満になるまで行ってもよい。   In the above embodiment, when the error exceeds the target error, the deceleration rate is recalculated and the speed profile is renewed only once. However, the error may be repeatedly performed several 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 the present invention can also be applied to other filters having a time constant. For example, a low-pass filter, a band-pass filter, or the like can be applied. Also, a weighted moving average filter (general FIR filter) can be used. 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 or more-stage moving average filter. Furthermore, after acceleration / deceleration processing using the time constant is performed, vibration suppression processing using a notch filter having a time constant, an input shaping method, or the like is performed to remove the natural vibration component of the machine from the speed profile. In this case, the motor time constant in the present invention is the sum of the acceleration / deceleration time constant and the vibration control time constant. Further, other processes for generating a speed profile for acceleration / deceleration in a certain 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 the same value as the CPU processing period. However, the purpose is to simplify the calculation process. Thus, 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 is reduced and the target error may not be satisfied.

上記実施形態の全自動減速処理中の誤差確認処理(図9のS16)と、それに続く置換処理は計算処理を簡略化する目的で、省略してもよい。その場合、ブロックの移動指令を実行する際に先読みが必要なのは、時定数の合計時間後までに処理するブロックとなる。 The error confirmation process (S16 in FIG. 9) and the subsequent replacement process during the fully automatic deceleration process of the above embodiment may be omitted for the purpose of simplifying the calculation process. In that case, when executing the block movement command, pre-reading is necessary for the block to be processed before 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 satisfies the error convergence tolerance or less (0 ≦ ε r −ε k ≦ ε t ). Other error conditions may be set. For example, the error may be set to be equal to or smaller than 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.

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

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

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

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

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

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

1 Machine tool 30 Numerical control device 31 CPU

Claims (9)

NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、各指令点の間の距離と速度の情報を含む速度プロファイルを作成し、フィルタによる加減速処理を行った結果に基づき、工具又は被削材の移動を制御する制御手段を備える数値制御装置において、
前記制御手段は、
前記経路中の前記指令点の中から注目する指令点を注目指令点として指定する指定手段と、
前記指定手段が指定した前記注目指令点の前後において、前記フィルタの時定数に基づく時間の区間を指定する区間指定手段と、
前記区間指定手段が指定する前記区間を所定時間で分割する分割手段と、
前記分割手段が分割した前記区間を前記フィルタと同等の時定数を持つフィルタで処理する処理手段と、
前記処理手段で処理した前記区間において、前記注目指令点における前記経路からの誤差を算出する誤差算出手段と、
前記誤差算出手段が算出した前記誤差が、予め設定した規定値を超えるか判断する判断手段と、
前記判断手段が、前記誤差は前記規定値を超えると判断した場合、前記規定値と前記誤差に基づく減速率を算出する算出手段と、
前記区間指定手段が指定した前記区間と、前記算出手段が算出した前記減速率とに基づき、前記速度プロファイルを更新する更新手段と
を備えたこと
を特徴とする数値制御装置。
Based on the result of acceleration / deceleration processing using a filter, creating a speed profile that includes distance and speed information between each command point along the path obtained by interpolating multiple command points commanded by the NC program In a numerical control device comprising a control means for controlling the movement of a tool or work material,
The control means includes
A designation means for designating a command point of interest as a target command point from the command points in the route;
Section specifying means for specifying a time section based on the time constant of the filter before and after the target command point specified by the specifying means;
Dividing means for dividing the section designated by the section designating means at a predetermined time;
Processing means for processing the section divided by the dividing means with a filter having a time constant equivalent to the filter;
Error calculating means for calculating an error from the route at the target command point in the section processed by the processing means;
A determination means for determining whether the error calculated by the error calculation means exceeds a preset specified value;
A calculating means for calculating a deceleration rate based on the specified value and the error when the determining means determines that the error exceeds the specified value;
A numerical control apparatus comprising: an updating unit that updates the speed profile based on the section specified by the section specifying unit and the deceleration rate calculated by the calculating unit.
前記区間は、前記注目指令点の前において、少なくとも前記フィルタの時定数の合計の半分の時間で移動する小区間を含み、前記注目指令点の後においても、同様の小区間を含むこと
を特徴とする請求項1に記載の数値制御装置。
The section includes a small section that moves at least half the total time constant of the filter before the target command point, and includes a similar small section after the target command point. The numerical control apparatus according to claim 1.
前記算出手段は、
前記規定値を前記誤差で除して得られる割合を前記減速率として算出すること
を特徴とする請求項1又は2に記載の数値制御装置。
The calculating means includes
The numerical control apparatus according to claim 1, wherein a ratio obtained by dividing the specified value by the error is calculated as the deceleration rate.
前記算出手段が算出した前記減速率で前記区間を移動したときの前記誤差が前記規定値に対して許容範囲内か否か判断する誤差判断手段と、
前記誤差判断手段が、前記誤差は前記許容範囲外であると判断した場合、前記誤差が前記許容範囲内となるように前記減速率を変更する変更手段と
を備えたこと
を特徴とする請求項1から3の何れかに記載の数値制御装置。
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 said error determination means is provided with the change means which changes the said deceleration rate so that the said error may be in the said allowable range, when it determines that the said error is outside the said allowable range. The numerical controller according to any one of 1 to 3.
前記経路中の各指令点間であるブロックが直線補間であるか円弧補間であるかを判断する補間判断手段と、
前記補間判断手段が、前記ブロックは前記円弧補間であると判断した場合、前記円弧補間の部分に仮想指令点を追加する追加手段と
を備え、
前記指定手段は、
前記補間判断手段が、前記ブロックは前記直線補間であると判断した場合、前記ブロックの終点を前記注目指令点として指定し、
前記補間判断手段が、前記ブロックは前記円弧補間であると判断した場合、前記追加手段が追加した前記仮想指令点と、前記ブロックの終点とを前記注目指令点として夫々指定すること
を特徴とする請求項1から4の何れかに記載の数値制御装置。
Interpolation determining means for determining whether a block between each command point in the path is linear interpolation or circular interpolation;
When the interpolation determining means determines that the block is the circular interpolation, the interpolation determining means includes an additional means for adding a virtual command point to the circular interpolation portion,
The designation means is:
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 unit determines that the block is the circular interpolation, the virtual command point added by the adding unit and the end point of the block are respectively designated as the target command points. The numerical control device according to claim 1.
前記更新手段は、
前記注目指令点が前記ブロックの終点である場合、前記算出手段が算出した前記減速率で移動する減速区間を、前記区間に設定する第一設定手段と、
前記注目指令点が前記仮想指令点である場合、前記減速区間を、少なくとも前記円弧補間の全域に設定する第二設定手段と
を備えたこと
を特徴とする請求項5に記載の数値制御装置。
The updating means includes
When the attention command point is the end point of the block, a first setting unit that sets a deceleration section that moves at the deceleration rate calculated by the calculation unit to the section;
The numerical control apparatus according to claim 5, further comprising: a second setting unit that sets the deceleration section to at least the entire area of the circular interpolation when the attention command point is the virtual command point.
前記更新手段が前記速度プロファイルを更新した後、前記速度プロファイルに基づき移動した場合の前記誤差を再度算出する再算出手段と、
前記再算出手段が再度算出した前記誤差が前記規定値を超えるか再度判断する再判断手段と
を備え、
前記制御手段は、
前記再判断手段が、前記誤差は前記規定値を超えると判断した場合、前記算出手段、及び前記更新手段による各処理を再度実行すること
を特徴とする請求項1から6の何れかに記載の数値制御装置。
Re-calculating means for recalculating the error when moving based on the speed profile after the updating means has updated the speed profile;
Re-determination means for re-determining whether the error calculated again by the re-calculation means exceeds the specified value,
The control means includes
The said re-determination means performs again each process by the said calculation means and the said update means, when it judges that the said error exceeds the said regulation value, The one in any one of Claim 1 to 6 characterized by the above-mentioned. Numerical control unit.
前記更新手段が前記速度プロファイルを更新した後、前記速度プロファイルに基づき移動した場合の前記誤差を再度算出する再算出手段と、
前記再算出手段が再度算出した前記誤差が前記規定値を超えるか再度判断する再判断手段と
を備え、
前記制御手段は、
前記再判断手段が、前記誤差は前記規定値を超えると判断した場合、前記誤差が前記規定値以下となるまで、前記算出手段、及び前記更新手段による各処理を繰り返し実行すること
を特徴とする請求項1から6の何れかに記載の数値制御装置。
Re-calculating means for recalculating the error when moving based on the speed profile after the updating means has updated the speed profile;
Re-determination means for re-determining whether the error calculated again by the re-calculation means exceeds the specified value,
The control means includes
When the re-determination unit determines that the error exceeds the specified value, the processing by the calculating unit and the updating unit is repeatedly executed until the error becomes equal to or less than the specified value. The numerical control device according to claim 1.
NCプログラムが指令する複数の指令点を補間して得られる経路に沿って、各指令点の間の距離と速度の情報を含む速度プロファイルを作成し、フィルタによる加減速処理を行った結果に基づき、工具又は被削材の移動を制御する数値制御装置の制御方法において、
前記経路中の前記指令点の中から注目する指令点を注目指令点として指定する指定工程と、
前記指定工程で指定した前記注目指令点の前後において、前記フィルタの時定数に基づく時間の区間を指定する区間指定工程と、
前記区間指定工程で指定する前記区間を所定時間で分割する分割工程と、
前記分割工程で分割した前記区間を前記フィルタと同等の時定数を持つフィルタで処理する処理工程と、
前記処理工程で処理した前記区間において、前記注目指令点における前記経路からの誤差を算出する誤差算出工程と、
前記誤差算出工程で算出した前記誤差が、予め設定した規定値を超えるか判断する判断工程と、
前記判断工程において、前記誤差は前記規定値を超えると判断した場合、前記規定値と前記誤差に基づく減速率を算出する算出工程と、
前記区間指定工程において指定した前記区間と、前記算出工程で算出した前記減速率とに基づき、前記速度プロファイルを更新する更新工程と
を備えたこと
を特徴とする数値制御装置の制御方法。

Based on the result of acceleration / deceleration processing using a filter, creating a speed profile that includes distance and speed information between each command point along the path obtained by interpolating multiple command points commanded by the NC program In the control method of the numerical control device for controlling the movement of the tool or the work material,
A designating step of designating a command point of interest from among the command points in the path as a command point of interest;
An interval designating step for designating an interval of time based on the time constant of the filter before and after the attention command point specified in the specifying step;
A dividing step of dividing the section specified in the section specifying step by a predetermined time;
A processing step of processing the section divided in the dividing step with a filter having a time constant equivalent to the filter;
In the section processed in the processing step, an error calculating step of calculating an error from the route at the attention command point;
A determination step of determining whether the error calculated in the error calculation step exceeds a preset specified value;
In the determining step, when it is determined that the error exceeds the specified value, a calculating step for calculating a deceleration rate based on the specified value and the error;
A control method for a numerical controller, comprising: an update step of updating the speed profile based on the interval specified in the interval specifying 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 true JP2018124996A (en) 2018-08-09
JP6885350B2 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879572A (en) * 2018-09-05 2020-03-13 大隈株式会社 Numerical control device and numerical control method
JP7355952B1 (en) 2022-08-23 2023-10-03 ファナック株式会社 Control device and computer readable recording medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112828678B (en) * 2021-02-09 2022-03-18 蓝思智能机器人(长沙)有限公司 Speed compensation method and device and electronic equipment

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
JP5208325B1 (en) * 2011-09-15 2013-06-12 三菱電機株式会社 Numerical control apparatus, machining system, and numerical control method
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
US10139803B2 (en) * 2014-04-16 2018-11-27 Mitsubishi Electric Corporation Instruction value generation 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

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879572A (en) * 2018-09-05 2020-03-13 大隈株式会社 Numerical control device and numerical control method
CN110879572B (en) * 2018-09-05 2024-02-13 大隈株式会社 Numerical control device and numerical control method
JP7355952B1 (en) 2022-08-23 2023-10-03 ファナック株式会社 Control device and computer readable recording medium
WO2024042618A1 (en) * 2022-08-23 2024-02-29 ファナック株式会社 Control device and computer-readable recording medium

Also Published As

Publication number Publication date
CN108375957A (en) 2018-08-07
JP6885350B2 (en) 2021-06-16
CN108375957B (en) 2021-03-26

Similar Documents

Publication Publication Date Title
JP6435872B2 (en) Numerical control device and control method
EP1720085B1 (en) Curve interpolating method
JP6450732B2 (en) Numerical controller
JP2018124996A (en) Numerical control device and control method
JP6426662B2 (en) Numerical control device for skiving control
US20080033591A1 (en) System and method for surface finish management
JP4199103B2 (en) Numerical control apparatus and numerical control method
JP5079165B2 (en) Numerical control apparatus and numerical control method
JP2004078516A (en) Curve interpolation method
JP5323280B1 (en) Numerical controller
JP6740483B1 (en) Numerical control device and numerical control method
JP2016087755A (en) Device and method for revising program of industrial robot
WO2020178978A1 (en) Machining program conversion device, numerical control device, and machining program conversion method
JP6396273B2 (en) Numerical control device for positioning to avoid interference with workpiece
JP6380119B2 (en) Numerical control device and control method
JP6062971B2 (en) A numerical controller that controls machine tools based on skiving instructions
JP3945507B2 (en) Numerical controller
JP2014041499A (en) Numerical control device and control method
WO2016051555A1 (en) Numerical control device
JP3902353B2 (en) Numerical controller
JP7444588B2 (en) Trajectory generation device, automatic position control device, and trajectory generation method
JP2007164228A (en) Numerical controller having feed shaft acceleration/deceleration function with consideration of direction of surface to be worked
JP2015022640A (en) Numerical control device and numerical control method
JPH05233047A (en) Automatic programming device for numerical control
JPS63271505A (en) Position interpolating method for numerical controller

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