JP5477247B2 - Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium - Google Patents

Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium Download PDF

Info

Publication number
JP5477247B2
JP5477247B2 JP2010220680A JP2010220680A JP5477247B2 JP 5477247 B2 JP5477247 B2 JP 5477247B2 JP 2010220680 A JP2010220680 A JP 2010220680A JP 2010220680 A JP2010220680 A JP 2010220680A JP 5477247 B2 JP5477247 B2 JP 5477247B2
Authority
JP
Japan
Prior art keywords
block
new
segment
predetermined length
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010220680A
Other languages
Japanese (ja)
Other versions
JP2012078891A (en
Inventor
崇 大高
智規 阿久澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2010220680A priority Critical patent/JP5477247B2/en
Publication of JP2012078891A publication Critical patent/JP2012078891A/en
Application granted granted Critical
Publication of JP5477247B2 publication Critical patent/JP5477247B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Numerical Control (AREA)

Description

本発明は、数値制御装置、移動経路修正方法、移動経路修正プログラム、及び記憶媒体に関する。   The present invention relates to a numerical controller, a movement path correction method, a movement path correction program, and a storage medium.

数値制御装置は、曲線を描く加工プログラムを生成する場合、CAM(computer aided manufacturing)を用いている。CAMは、曲線を複数のブロックに分割する。CAMは、演算誤差等により、前後のブロックと比較的大きな角度をなす微小のブロックを生成することがある。数値制御装置は、短い周期で指令速度に対応する分の移動量をサーボアンプに送出してモータを駆動する。微小ブロックが指令速度分の移動量に満たない場合、工具は急激に減速する。故に、加工面に工具跡が残ることがある。   The numerical control device uses CAM (computer aided manufacturing) when generating a machining program for drawing a curve. CAM divides a curve into a plurality of blocks. The CAM may generate a minute block having a relatively large angle with the preceding and succeeding blocks due to a calculation error or the like. The numerical controller drives the motor by sending a movement amount corresponding to the command speed to the servo amplifier in a short cycle. When the minute block is less than the movement amount for the command speed, the tool decelerates rapidly. Therefore, tool marks may remain on the machined surface.

特許文献1が開示する移動経路修正方法は、複数のセグメントで構成される移動経路において、連続する三つのセグメントデータに対して第1、第2、第3のセグメントS1、S2、S3がジグザグ状に接続しているかを第1の条件とし、第2のセグメントS2が設定された長さより短いかを第2の条件とし、前記第1の条件と前記第2の条件がともに成立する場合には、前記第2のセグメントS2の移動量を前記第1、前記第3のセグメントS1、S3の移動量に分配するように移動経路を修正する。   In the movement path correcting method disclosed in Patent Document 1, the first, second, and third segments S1, S2, and S3 are zigzag with respect to three consecutive segment data in a movement path constituted by a plurality of segments. If the first condition and the second condition are both satisfied, the first condition is whether the second segment S2 is shorter than the set length. The movement path is corrected so that the movement amount of the second segment S2 is distributed to the movement amounts of the first and third segments S1 and S3.

特許第3385247号公報Japanese Patent No. 3385247

しかしながら、特許文献1が開示する移動経路修正方法は、3つのセグメントがジグザグの経路を構成しなければ、移動経路を修正しない不具合を有する。故に、移動経路中に微小ブロックが残ってしまうので、良好な加工面を得ることができなかった。特許文献1の移動経路修正条件からジグザグの経路であることを除外すると、所定の長さより短いブロックが次々と削除されることになるため、工具の移動経路がプログラムで指令した経路から逸脱する場合がある。   However, the movement path correction method disclosed in Patent Document 1 has a problem that the movement path is not corrected unless the three segments form a zigzag path. Therefore, since a minute block remains in the movement path, a good processed surface could not be obtained. If the zigzag path is excluded from the movement path correction condition of Patent Document 1, blocks shorter than a predetermined length will be deleted one after another, so the movement path of the tool deviates from the path commanded by the program There is.

本発明は、上記課題を解決するためになされたものであり、工具の減速による影響のない良好な加工面を得ることができ、かつ工具の移動経路がプログラムで指令した経路から大きく逸脱しない数値制御装置、移動経路修正方法、移動経路修正プログラム、及び記憶媒体を提供することを目的とする。   The present invention has been made in order to solve the above-mentioned problems, and can provide a good machining surface that is not affected by the deceleration of the tool, and the numerical value that does not greatly deviate from the route commanded by the program. It is an object to provide a control device, a movement path correction method, a movement path correction program, and a storage medium.

本発明の第1態様に係る数値制御装置は、複数のブロックで構成される工作機械の移動経路を該複数のブロックの内連続する3つのブロックを移動開始側の開始ブロック、移動終了側の終了ブロック、該開始ブロックと該終了ブロックを繋ぐ中間ブロックとして選択し、前記3つのブロックに基づいて前記移動経路を順次修正する数値制御装置において、前記中間ブロックが第1所定長以下か否かを判断する第1判断手段と、前記中間ブロックが前記第1所定長より長いと前記第1判断手段が判断した場合、前記開始ブロックを前記工作機械の移動経路として確定する第1ブロック確定手段と、前記中間ブロックが前記第1所定長以下であると前記第1判断手段が判断した場合、前記開始ブロックの始点と前記中間ブロックの中点を接続するブロックを新たな開始ブロックとし、前記中間ブロックの中点と前記終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する修正手段と、前記修正手段によって修正した前記新たな開始ブロックが第2所定長より長いか否かを判断する第2判断手段と、前記新たな開始ブロックが前記第2所定長より長いと前記第2判断手段が判断した場合、該新たな開始ブロックを前記工作機械の移動経路として確定する第2ブロック確定手段と、前記第1ブロック確定手段が前記工作機械の移動経路を確定した場合、前記中間ブロックを前記開始ブロックとし、前記終了ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとし、前記第2ブロック確定手段が前記工作機械の移動経路を確定した場合、前記新たな中間ブロックを前記開始ブロックとし、前記終了ブロックに連続する2つのブロックを順に前記中間ブロック、前記終了ブロックとし、前記新たな開始ブロックが前記第2所定長以下であると前記第2判断手段が判断した場合、該新たな開始ブロックを前記開始ブロックとし、前記新たな中間ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとして前記3つのブロックを再設定するブロック再設定手段とを備えている。   In the numerical control device according to the first aspect of the present invention, a moving path of a machine tool composed of a plurality of blocks is moved through three consecutive blocks among the plurality of blocks. In a numerical controller that selects a block, an intermediate block that connects the start block and the end block, and sequentially corrects the movement path based on the three blocks, determines whether the intermediate block is equal to or less than a first predetermined length. First determining means for determining, when the first determining means determines that the intermediate block is longer than the first predetermined length, the first block determining means for determining the start block as a movement path of the machine tool, When the first determination means determines that the intermediate block is equal to or shorter than the first predetermined length, the start point of the start block is connected to the midpoint of the intermediate block. A correction means for correcting the lock as a new start block, a block connecting the midpoint of the intermediate block and the end point of the end block as a new intermediate block, and the new start block corrected by the correction means is a second block When the second determination means determines that the new start block is longer than the second predetermined length, the second determination means for determining whether the length is longer than the predetermined length, and when the second determination means determines that the new start block is longer than the second predetermined length, When the first block determination means determines the movement path of the machine tool, the intermediate block is the start block, the end block is the intermediate block, and the end is determined. The block next to the block is set as the end block, and the second block determining means determines the moving path of the machine tool. The new intermediate block is used as the start block, two blocks consecutive to the end block are set as the intermediate block and the end block in order, and the second start block is equal to or shorter than the second predetermined length. When the determination means determines, the new start block is the start block, the new intermediate block is the intermediate block, and the next block after the end block is the end block, and the three blocks are reset. Resetting means.

第1態様では、第1ブロック確定手段は、中間ブロックが第1所定長より長い場合、開始ブロックを経路として確定する。修正手段は、中間ブロックが第1所定長以下の場合、開始ブロックの始点と中間ブロックの中点を接続するブロックを新たな開始ブロックとし、中間ブロックの中点と終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する。第2ブロック確定手段は、新たな開始ブロックが第2所定長より長い場合、新たな開始ブロックを経路として確定する。ブロック再設定手段は、新たな開始ブロックが第2所定長以下である場合、新たな開始ブロックを開始ブロックとし、新たな中間ブロックを中間ブロックとし、終了ブロックの次のブロックを終了ブロックとして、3つのブロックを再設定する。第1態様は、中間ブロックが第1所定長より長ければ、開始ブロックを経路として確定する。故に、工作機械の移動経路は、途中に移動量の小さいブロックを含まない。また、新たな開始ブロックが第2所定長より長ければ、新たな開始ブロックを経路として確定する。故に、新たな開始ブロックは所定の長さよりも大きくなった時点で経路が確定するため、微小ブロックが連続するプログラムで、ブロックが次々と削除され、工具がプログラムで指令した経路から大きく逸脱することがない。よって、第1態様は、工具がプログラムで指令した経路から逸脱せず、工具の減速による影響のない良好な加工面を得ることができる。   In the first aspect, the first block determining means determines the start block as a route when the intermediate block is longer than the first predetermined length. When the intermediate block is less than or equal to the first predetermined length, the correction means uses the block connecting the start point of the start block and the intermediate point of the intermediate block as a new start block, and connects the intermediate point of the intermediate block and the end point of the end block Is modified as a new intermediate block. When the new start block is longer than the second predetermined length, the second block determination means determines the new start block as a route. When the new start block is not longer than the second predetermined length, the block resetting means sets the new start block as the start block, sets the new intermediate block as the intermediate block, sets the next block after the end block as the end block, 3 Reset one block. In the first aspect, if the intermediate block is longer than the first predetermined length, the start block is determined as a path. Therefore, the moving path of the machine tool does not include a block with a small moving amount on the way. If the new start block is longer than the second predetermined length, the new start block is determined as a route. Therefore, since the path is fixed when the new start block becomes larger than the predetermined length, the blocks are deleted one after another in the program in which micro blocks are continuous, and the tool greatly deviates from the path commanded by the program. There is no. Therefore, the 1st mode can obtain the good machined surface which does not deviate from the course which the tool commanded by the program, and is not influenced by the deceleration of the tool.

本発明の第2態様に係る移動経路修正方法は、複数のブロックで構成される工作機械の移動経路を該複数のブロックの内連続する3つのブロックを移動開始側の開始ブロック、移動終了側の終了ブロック、該開始ブロックと該終了ブロックを繋ぐ中間ブロックとして選択し、前記3つのブロックに基づいて前記移動経路を順次修正する数値制御装置によって行われる移動経路修正方法において、前記中間ブロックが第1所定長以下か否かを判断する第1判断ステップと、前記中間ブロックが前記第1所定長より長いと前記第1判断ステップにおいて判断した場合、前記開始ブロックを前記工作機械の移動経路として確定する第1ブロック確定ステップと、前記中間ブロックが前記第1所定長以下であると前記第1判断ステップにおいて判断した場合、前記開始ブロックの始点と前記中間ブロックの中点を接続するブロックを新たな開始ブロックとし、前記中間ブロックの中点と前記終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する修正ステップと、前記修正ステップにおいて修正した前記新たな開始ブロックが第2所定長より長いか否かを判断する第2判断ステップと、前記新たな開始ブロックが前記第2所定長より長いと前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記工作機械の移動経路として確定する第2ブロック確定ステップと、前記第1ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記中間ブロックを前記開始ブロックとし、前記終了ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとし、前記第2ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記新たな中間ブロックを前記開始ブロックとし、前記終了ブロックに連続する2つのブロックを順に前記中間ブロック、前記終了ブロックとし、前記新たな開始ブロックが前記第2所定長以下であると前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記開始ブロックとし、前記新たな中間ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとして前記3つのブロックを再設定するブロック再設定ステップとを備えている。   In the movement path correction method according to the second aspect of the present invention, the movement path of a machine tool configured by a plurality of blocks is divided into three consecutive blocks among the plurality of blocks, the start block on the movement start side, and the movement end side In the movement path correction method performed by a numerical controller that selects an end block, an intermediate block connecting the start block and the end block, and sequentially corrects the movement path based on the three blocks, the intermediate block is a first block When it is determined in the first determination step that determines whether or not the length is equal to or less than a predetermined length and in the first determination step that the intermediate block is longer than the first predetermined length, the start block is determined as a movement path of the machine tool. In the first block determining step, the first determining step determines that the intermediate block is not longer than the first predetermined length. The block connecting the start point of the start block and the midpoint of the intermediate block is a new start block, and the block connecting the midpoint of the intermediate block and the end point of the end block is corrected as a new intermediate block. A second determination step for determining whether the new start block corrected in the correction step is longer than a second predetermined length; and, if the new start block is longer than the second predetermined length, the second A second block determination step for determining the new start block as the movement path of the machine tool when determined in the determination step; and a step of determining the intermediate block when the movement path of the machine tool is determined in the first block determination step. Is the start block, the end block is the intermediate block, and the end block is When the next block is the end block, and the movement path of the machine tool is determined in the second block determination step, the new intermediate block is the start block, and the two blocks consecutive to the end block are sequentially When the second determination step determines that the new start block is equal to or shorter than the second predetermined length, the intermediate block and the end block are used as the start block, and the new intermediate block And a block resetting step for resetting the three blocks with the block next to the end block as the end block.

第2態様では、第1ブロック確定ステップは、中間ブロックが第1所定長より長い場合、開始ブロックを経路として確定する。修正ステップは、中間ブロックが第1所定長以下の場合、開始ブロックの始点と中間ブロックの中点を接続するブロックを新たな開始ブロックとし、中間ブロックの中点と終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する。第2ブロック確定ステップは、新たな開始ブロックが第2所定長より長い場合、新たな開始ブロックを経路として確定する。ブロック再設定ステップは、新たな開始ブロックが第2所定長以下である場合、新たな開始ブロックを開始ブロックとし、新たな中間ブロックを中間ブロックとし、終了ブロックの次のブロックを終了ブロックとして、3つのブロックを再設定する。よって、第2態様は、中間ブロックが第1所定長より長ければ、開始ブロックを経路として確定する。故に、工作機械の移動経路は、途中に移動量の小さいブロックを含まない。また、新たな開始ブロックが第2所定長より長ければ、新たな開始ブロックを経路として確定する。故に、微小ブロックが連続するプログラムで、ブロックが次々と削除され、工具がプログラムで指令した経路から逸脱することがない。第2態様は、工具がプログラムで指令した経路から逸脱せず、工具の減速による影響のない良好な加工面を得ることができる。   In the second aspect, the first block determination step determines the start block as a path when the intermediate block is longer than the first predetermined length. When the intermediate block is less than or equal to the first predetermined length, the block connecting the start point of the start block and the intermediate point of the intermediate block is a new start block, and the block connecting the intermediate point of the intermediate block and the end point of the end block Is modified as a new intermediate block. The second block determining step determines the new start block as a route when the new start block is longer than the second predetermined length. In the block resetting step, when the new start block is not longer than the second predetermined length, the new start block is set as the start block, the new intermediate block is set as the intermediate block, the block next to the end block is set as the end block, 3 Reset one block. Therefore, in the second mode, if the intermediate block is longer than the first predetermined length, the start block is determined as a route. Therefore, the moving path of the machine tool does not include a block with a small moving amount on the way. If the new start block is longer than the second predetermined length, the new start block is determined as a route. Therefore, in the program in which the minute blocks are continuous, the blocks are deleted one after another, and the tool does not deviate from the route specified by the program. According to the second aspect, it is possible to obtain a good machining surface that does not deviate from the route that the tool commands in the program and is not affected by the deceleration of the tool.

本発明の第3態様に係る移動経路修正プログラムは、複数のブロックで構成される工作機械の移動経路を該複数のブロックの内連続する3つのブロックを移動開始側の開始ブロック、移動終了側の終了ブロック、該開始ブロックと該終了ブロックを繋ぐ中間ブロックとして選択し、前記3つのブロックに基づいて前記移動経路を順次修正する数値制御装置の動作を制御する移動経路修正プログラムにおいて、コンピュータに、前記中間ブロックが第1所定長以下か否かを判断する第1判断ステップと、前記中間ブロックが前記第1所定長より長いと前記第1判断ステップにおいて判断した場合、前記開始ブロックを前記工作機械の移動経路として確定する第1ブロック確定ステップと、前記中間ブロックが前記第1所定長以下であると前記第1判断ステップにおいて判断した場合、前記開始ブロックの始点と前記中間ブロックの中点を接続するブロックを新たな開始ブロックとし、前記中間ブロックの中点と前記終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する修正ステップと、前記修正ステップにおいて修正した前記新たな開始ブロックが第2所定長より長いか否かを判断する第2判断ステップと、前記新たな開始ブロックが前記第2所定長より長いと前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記工作機械の移動経路として確定する第2ブロック確定ステップと、前記第1ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記中間ブロックを前記開始ブロックとし、前記終了ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとし、前記第2ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記新たな中間ブロックを前記開始ブロックとし、前記終了ブロックに連続する2つのブロックを順に前記中間ブロック、前記終了ブロックとし、前記新たな開始ブロックが前記第2所定長以下であると前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記開始ブロックとし、前記新たな中間ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとして前記3つのブロックを再設定するブロック再設定ステップとを実行させることを特徴とする。   The moving path correction program according to the third aspect of the present invention provides a moving path of a machine tool composed of a plurality of blocks, a continuous block of the plurality of blocks, a start block on the movement start side, and a movement end side An end block, an intermediate block that connects the start block and the end block, and a movement path correction program that controls the operation of the numerical controller that sequentially corrects the movement path based on the three blocks. When it is determined in the first determination step that determines whether or not the intermediate block is equal to or shorter than a first predetermined length, and in the first determination step that the intermediate block is longer than the first predetermined length, the start block is A first block determining step for determining as a movement path, and the intermediate block being equal to or shorter than the first predetermined length. If it is determined in the determining step, a block connecting the start point of the start block and the midpoint of the intermediate block is set as a new start block, and a block connecting the midpoint of the intermediate block and the end point of the end block is set as a new intermediate block. A correction step for correcting as a block; a second determination step for determining whether or not the new start block corrected in the correction step is longer than a second predetermined length; and the new start block from the second predetermined length. If it is determined in the second determining step that the length is long, the second block determining step for determining the new start block as the moving path of the machine tool, and the moving path of the machine tool is determined in the first block determining step. The intermediate block as the start block and the end block as the intermediate block If the block is a lock, the block next to the end block is the end block, and the movement path of the machine tool is determined in the second block determination step, the new intermediate block is the start block and continuous to the end block When the second determination step determines that the two starting blocks are sequentially the intermediate block and the end block, and the new start block is less than or equal to the second predetermined length, the new start block is the start block. And a block resetting step of resetting the three blocks with the new intermediate block as the intermediate block and the block next to the end block as the end block.

第3態様では、コンピュータは各種ステップを実行する。第1ブロック確定ステップは、中間ブロックが第1所定長より長い場合、開始ブロックを経路として確定する。修正ステップは、中間ブロックが第1所定長以下の場合、開始ブロックの始点と中間ブロックの中点を接続するブロックを新たな開始ブロックとし、中間ブロックの中点と終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する。第2ブロック確定ステップは、新たな開始ブロックが第2所定長より長い場合、新たな開始ブロックを経路として確定する。ブロック再設定ステップは、新たな開始ブロックが第2所定長以下である場合、新たな開始ブロックを開始ブロックとし、新たな中間ブロックを中間ブロックとし、終了ブロックの次のブロックを終了ブロックとして、3つのブロックを再設定する。第2態様は、中間ブロックが第1所定長より長ければ、開始ブロックを経路として確定する。故に、工作機械の移動経路は、途中に移動量の小さいブロックを含まない。また、新たな開始ブロックが第2所定長より長ければ、新たな開始ブロックを経路として確定する。故に、微小ブロックが連続するプログラムで、ブロックが次々と削除され、工具がプログラムで指令した経路から逸脱することがない。よって、第3態様は、工具がプログラムで指令した経路から逸脱せず、工具の減速による影響のない良好な加工面を得ることができる。   In the third aspect, the computer executes various steps. The first block determining step determines the start block as a path when the intermediate block is longer than the first predetermined length. When the intermediate block is less than or equal to the first predetermined length, the block connecting the start point of the start block and the intermediate point of the intermediate block is a new start block, and the block connecting the intermediate point of the intermediate block and the end point of the end block Is modified as a new intermediate block. The second block determining step determines the new start block as a route when the new start block is longer than the second predetermined length. In the block resetting step, when the new start block is not longer than the second predetermined length, the new start block is set as the start block, the new intermediate block is set as the intermediate block, the block next to the end block is set as the end block, 3 Reset one block. In the second mode, if the intermediate block is longer than the first predetermined length, the start block is determined as a path. Therefore, the moving path of the machine tool does not include a block with a small moving amount on the way. If the new start block is longer than the second predetermined length, the new start block is determined as a route. Therefore, in the program in which the minute blocks are continuous, the blocks are deleted one after another, and the tool does not deviate from the route specified by the program. Therefore, the 3rd mode can obtain the good machined surface which does not deviate from the course which the tool commanded by the program, and is not influenced by the deceleration of the tool.

本発明の第4態様に係る記憶媒体は、請求項3に記載の移動経路修正プログラムを記憶したことを特徴とする。   A storage medium according to a fourth aspect of the present invention stores the movement route correction program according to claim 3.

第4態様では、請求項3に記載の移動経路修正プログラムを記憶している。故に、コンピュータが実行することで、第3態様に記載の効果を得ることができる。   In the fourth aspect, the moving route correcting program according to claim 3 is stored. Therefore, the effects described in the third aspect can be obtained when the computer executes.

数値制御装置1の電気的構成を示すブロック図である。2 is a block diagram showing an electrical configuration of the numerical control device 1. FIG. セグメントバッファ231の内容を示す概念図である。5 is a conceptual diagram showing the contents of a segment buffer 231. FIG. CPU21が実行する移動経路修正処理のフローチャートである。It is a flowchart of the movement path | route correction process which CPU21 performs. 修正前の移動経路の第1段階の図である。It is a figure of the 1st step of the movement path | route before correction. 移動経路を修正した第2段階の図である。It is the figure of the 2nd step which corrected the movement path | route. 移動経路を修正した第3段階の図である。It is the figure of the 3rd stage which corrected the movement path | route. 移動経路を修正した第4段階の図である。It is the figure of the 4th step which corrected the movement path | route. セグメントバッファ231の修正対象のセグメントSiを示す図である。It is a figure which shows the segment Si of the correction object of the segment buffer. 図8の続きを示す図である。It is a figure which shows the continuation of FIG.

以下、本発明の一実施形態である数値制御装置1、移動経路修正方法、移動経路修正プログラム及び記憶媒体について、図面を参照して説明する。図1に示す数値制御装置1は、加工プログラムが指令する経路にしたがい、工作機械2の軸移動を制御する。工作機械2は、加工物と工具の相対移動により、加工物を切削する。   Hereinafter, a numerical controller 1, a movement path correction method, a movement path correction program, and a storage medium according to an embodiment of the present invention will be described with reference to the drawings. The numerical control device 1 shown in FIG. 1 controls the axial movement of the machine tool 2 according to a route commanded by the machining program. The machine tool 2 cuts the workpiece by relative movement of the workpiece and the tool.

数値制御装置1の電気的構成について、図1を参照して説明する。数値制御装置1は、CPU21、ROM22、RAM23、フラッシュメモリ24を有するマイクロコンピュータと、入力インタフェイス25と、入出力インタフェイス26とを備えている。入力インタフェイス25は、操作部12に接続している。   The electrical configuration of the numerical controller 1 will be described with reference to FIG. The numerical controller 1 includes a microcomputer having a CPU 21, ROM 22, RAM 23, and flash memory 24, an input interface 25, and an input / output interface 26. The input interface 25 is connected to the operation unit 12.

ROM22は、数値制御装置1のメインプログラムに加え、加工プログラムを1ブロックずつ読込んでセグメントデータを生成する「セグメント生成プログラム」、複数のセグメントで構成した移動経路を修正する本発明の「移動経路修正プログラム」等を記憶する。「移動経路修正プログラム」は、コンピュータで読み取り可能な記憶媒体としてのフラッシュメモリ24等に記憶してもよい。RAM23は、セグメントバッファ231を少なくとも備えている。セグメントバッファ231は、加工プログラムから生成したセグメントデータを記憶する。フラッシュメモリ24は、加工プログラムを記憶する加工プログラム記憶領域241を少なくとも備えている。   The ROM 22 reads the machining program one block at a time in addition to the main program of the numerical control device 1 and generates segment data, and the “movement path correction” of the present invention for correcting a movement path composed of a plurality of segments. Program "etc. are memorized. The “movement path correction program” may be stored in the flash memory 24 or the like as a computer-readable storage medium. The RAM 23 includes at least a segment buffer 231. The segment buffer 231 stores segment data generated from the machining program. The flash memory 24 includes at least a machining program storage area 241 for storing machining programs.

入出力インタフェイス26は、工作機械2のX軸モータ51を駆動する駆動回路41と、工作機械2のY軸モータ52を駆動する駆動回路42と、工作機械2のZ軸モータ53を駆動する駆動回路43と、工作機械2の主軸モータ54を駆動する駆動回路44等に接続している。X軸モータ51及びY軸モータ52の駆動は、工作機械2のテーブル(図示省略)をX軸方向及びY軸方向に移動する。Z軸モータ53の駆動は、工作機械の主軸ヘッド(図示省略)をZ軸方向に移動する。   The input / output interface 26 drives a drive circuit 41 that drives the X-axis motor 51 of the machine tool 2, a drive circuit 42 that drives the Y-axis motor 52 of the machine tool 2, and a Z-axis motor 53 of the machine tool 2. The drive circuit 43 and the drive circuit 44 that drives the spindle motor 54 of the machine tool 2 are connected. The driving of the X-axis motor 51 and the Y-axis motor 52 moves the table (not shown) of the machine tool 2 in the X-axis direction and the Y-axis direction. The drive of the Z-axis motor 53 moves the spindle head (not shown) of the machine tool in the Z-axis direction.

X軸モータ51、Y軸モータ52、Z軸モータ53、主軸モータ54は、各モータの位置を検出するエンコーダ(図示省略)を備えている。各エンコーダは、各駆動回路41、42、43、44に接続している。   The X-axis motor 51, the Y-axis motor 52, the Z-axis motor 53, and the main shaft motor 54 are provided with encoders (not shown) that detect the position of each motor. Each encoder is connected to each drive circuit 41, 42, 43, 44.

セグメントデータについて説明する。加工プログラムが指令する経路は、例えば、図4に示すように、A1、A2、…、A8からなる座標列である。作業者が操作部12を操作すると、CPU21は、A1〜A8の座標列を読み取って、各セグメントの各軸移動量Xi、Yi、Zi、セグメント長Li、指令速度FからなるセグメントデータSi(以下、単に「セグメントSi」と呼ぶ)を生成する。添え字iは、経路開始からのブロック番号を示している。図2に示すように、RAM23のセグメントバッファ231は、生成したセグメントS1、S2、S3を指令順に記憶する。   The segment data will be described. The path commanded by the machining program is, for example, a coordinate sequence composed of A1, A2,..., A8 as shown in FIG. When the operator operates the operation unit 12, the CPU 21 reads the coordinate sequence of A1 to A8 and segments data Si (hereinafter referred to as “segment data”) including the respective axis movement amounts Xi, Yi, Zi, the segment length Li, and the command speed F. , Simply referred to as “segment Si”). The subscript i indicates the block number from the start of the route. As shown in FIG. 2, the segment buffer 231 of the RAM 23 stores the generated segments S1, S2, and S3 in the order of commands.

CPU21は、セグメントバッファ231に順次蓄積したセグメントSiに基づき、主軸ヘッドの速度パターンを作成する。CPU21は、作成した速度パターンから各軸毎の補間指令(単位時間あたりの移動量)を算出する。CPU21は、算出した各軸の補間指令を、工作機械2のX軸モータ51、Y軸モータ52、Z軸モータ53の駆動回路41、42、43にそれぞれ出力する。   The CPU 21 creates a speed pattern of the spindle head based on the segments Si sequentially stored in the segment buffer 231. The CPU 21 calculates an interpolation command (movement amount per unit time) for each axis from the created speed pattern. The CPU 21 outputs the calculated interpolation command for each axis to the drive circuits 41, 42, and 43 of the X-axis motor 51, Y-axis motor 52, and Z-axis motor 53 of the machine tool 2, respectively.

図2に示すように、セグメントバッファ231は、加工プログラムを読み取ったブロック順に、セグメントSiを順次記憶する。CPU21は、セグメントバッファ231に蓄積するセグメントSiについて、連続する3つのブロックに基づいて移動経路を順次修正する。CPU21は、連続する3つのブロックを処理対象のセグメントとする。本実施形態は、3つのセグメントについて、移動開始側から移動終了側に向かって、第1のセグメント(本発明の「開始ブロック」に相当)、第2のセグメント(本発明の「中間ブロック」に相当)、第3のセグメント(本発明の「終了ブロック」に相当)と称する。   As shown in FIG. 2, the segment buffer 231 sequentially stores the segments Si in the block order in which the machining program is read. The CPU 21 sequentially corrects the movement path for the segment Si accumulated in the segment buffer 231 based on three consecutive blocks. The CPU 21 sets three consecutive blocks as processing target segments. In the present embodiment, for three segments, from the movement start side to the movement end side, the first segment (corresponding to the “start block” of the present invention) and the second segment (the “intermediate block” of the present invention) Equivalent) and the third segment (corresponding to the “end block” of the present invention).

ポインタAは、加工プログラムの次のブロックから読み取った新しいセグメントSiを記憶する位置を示している。ポインタBは、経路がまだ確定していない最初のセグメントSiの位置を示している。故に、CPU21は、セグメントバッファ231に、3セグメント分のセグメントSiを蓄積するまでは、ポインタAをインクリメントし、かつポインタAに次のセグメントSiを記憶する。図2に示す例は、セグメントバッファ231に、3セグメント分のセグメントS1、S2、S3を蓄積していることを示している。   A pointer A indicates a position where a new segment Si read from the next block of the machining program is stored. Pointer B indicates the position of the first segment Si whose path has not yet been determined. Therefore, the CPU 21 increments the pointer A and stores the next segment Si in the pointer A until the segment Si for three segments is accumulated in the segment buffer 231. The example shown in FIG. 2 indicates that segments S1, S2, and S3 for three segments are accumulated in the segment buffer 231.

CPU21が実行する移動経路修正処理について、図3のフローチャート、図4〜図9を参照して説明する。本実施形態は、図4に示す移動経路を修正する場合について、第1段階から第4段階に分けて説明する。図4の移動経路は、A1〜A8の各点を直線で繋いだ移動経路である。A1〜A8の間は、各セグメントSiで繋いでいる。作業者が操作部12を操作すると、CPU21は、ROM221のプログラム記憶領域221(図1参照)に記憶した「移動経路修正プログラム」を読み込んで実行する。   The movement path correction process executed by the CPU 21 will be described with reference to the flowchart of FIG. 3 and FIGS. In the present embodiment, the case of correcting the movement route shown in FIG. 4 will be described in the first to fourth stages. The movement route in FIG. 4 is a movement route in which the points A1 to A8 are connected by straight lines. A1 to A8 are connected by each segment Si. When the operator operates the operation unit 12, the CPU 21 reads and executes the “movement path correction program” stored in the program storage area 221 (see FIG. 1) of the ROM 221.

CPU21は、フラッシュメモリ24の加工プログラム記憶領域241(図1参照)に記憶した加工プログラムに基づき、次に修正すべきセグメントSiが有るか否かを判断する(S11)。CPU21は、今から修正を開始する為、次に修正すべきセグメントSiがあると判断し(S11:YES)、ポインタAの位置に次のセグメントSiをセットする(S13)。   The CPU 21 determines whether or not there is a segment Si to be corrected next based on the machining program stored in the machining program storage area 241 (see FIG. 1) of the flash memory 24 (S11). In order to start correction from now on, the CPU 21 determines that there is a segment Si to be corrected next (S11: YES), and sets the next segment Si at the position of the pointer A (S13).

CPU21は、ポインタBから3セグメント生成したか否かを判断する(S14)。故に、CPU21は、セグメントバッファ231上に、3セグメント分のセグメントSiを蓄積するまでは(S14:NO)、ポインタAをインクリメントし(S22)、次のセグメントがあれば(S11:YES)、ポインタAに次のセグメントを記憶する(S13)。図8の第1段階に示すように、セグメントバッファ231は、ポインタBから3セグメント分のセグメントS1、S2、S3を蓄積している。   The CPU 21 determines whether three segments have been generated from the pointer B (S14). Therefore, the CPU 21 increments the pointer A (S22) until three segments of segment Si are accumulated on the segment buffer 231 (S14: NO), and if there is a next segment (S11: YES), the pointer The next segment is stored in A (S13). As shown in the first stage of FIG. 8, the segment buffer 231 stores segments S1, S2, and S3 for three segments from the pointer B.

CPU21は、ポインタBから3セグメント生成したと判断した場合(S14:YES)、現時点で「第2のセグメント」であるセグメントS2のセグメント長は、第1設定値以下か否かを判断する(S15)。CPU21は、セグメントS2のセグメント長が第1設定値以下と判断した場合(S15:YES)、現時点で「第1のセグメント」であるセグメントS1と、第2のセグメントであるS2とを修正し、現時点で「第3のセグメント」であるセグメントS3を消去して、新たな経路を作成する(S16)。   When the CPU 21 determines that three segments have been generated from the pointer B (S14: YES), it determines whether the segment length of the segment S2, which is currently the “second segment”, is equal to or smaller than the first set value (S15). ). When the CPU 21 determines that the segment length of the segment S2 is equal to or smaller than the first set value (S15: YES), the CPU 21 corrects the segment S1 that is the “first segment” and the second segment S2 at this time, The segment S3 which is the “third segment” at this time is deleted, and a new route is created (S16).

S16のセグメントSiの経路接続の修正方法について具体的に説明する。図5に示すように、CPU21は、「第2のセグメント」であるセグメントS2の中点T1の座標を、セグメントS2の始点の座標と終点の座標とから算出する。CPU21は、セグメントS1の始点(A1)とセグメントS2の中点T1とを、新たなセグメントS1Rで接続する。CPU21は、セグメントS2の中点T1とセグメントS3の終点(A4)とを、新たなセグメントS2Rで接続する。本実施形態では、「R」は修正回数1回、「RR」は修正回数2回、「RRR」は修正回数3回を意味する。CPU21は、残ったセグメントS3を消去する。故に、図5に示すように、A1と中点T1とA4とを、新たなセグメントS1RとS2Rで繋いだ新たな経路が生成する(第2段階)。   The method for correcting the route connection of the segment Si in S16 will be specifically described. As shown in FIG. 5, the CPU 21 calculates the coordinates of the midpoint T1 of the segment S2, which is the “second segment”, from the coordinates of the start point and the end point of the segment S2. The CPU 21 connects the start point (A1) of the segment S1 and the midpoint T1 of the segment S2 with a new segment S1R. The CPU 21 connects the midpoint T1 of the segment S2 and the end point (A4) of the segment S3 with a new segment S2R. In the present embodiment, “R” means the number of times of correction, “RR” means the number of times of correction, and “RRR” means the number of times of correction. The CPU 21 erases the remaining segment S3. Therefore, as shown in FIG. 5, a new path connecting A1, midpoints T1, and A4 with new segments S1R and S2R is generated (second stage).

CPU21は、図5に示す新たな経路において、現時点で「第1のセグメント」であるセグメントS1Rのセグメント長が第2設定値より長いか否かを判断する(S17)。   The CPU 21 determines whether or not the segment length of the segment S1R, which is the “first segment” at the present time, is longer than the second set value in the new route shown in FIG. 5 (S17).

CPU21は、セグメントS1Rのセグメント長が第2設定値以下と判断した場合(S17:NO)、S11に戻り、次のセグメントが有るか否かを判断する。図8の第2段階に示すように、ポインタAの位置は空の状態である。CPU21は、加工プログラムに基づき、次のセグメントSiが有ると判断した場合(S11:YES)、図8の「セグメント再設定」に示すように、空のポインタAの位置に、次のセグメントS4をセットする(S13)。   When the CPU 21 determines that the segment length of the segment S1R is equal to or smaller than the second set value (S17: NO), the CPU 21 returns to S11 and determines whether there is a next segment. As shown in the second stage of FIG. 8, the position of the pointer A is empty. When the CPU 21 determines that the next segment Si exists based on the machining program (S11: YES), the CPU 21 sets the next segment S4 at the position of the empty pointer A as shown in “segment reset” in FIG. Set (S13).

セグメントバッファ231は、ポインタBの位置からポインタAの位置までに、セグメントS1R、S2R、S4の3つのセグメントを蓄積している(図8の「セグメント再設定」参照)。故に、CPU21は、ポインタBから3セグメント生成したと判断し(S14:YES)、現時点で「第2のセグメント」であるセグメントS2Rのセグメント長が第1設定値以下か否かを判断する(S15)。CPU21は、図5に示すセグメントS2Rのセグメント長が第1設定値以下と判断した場合(S15:YES)、再度、経路を修正する(S16)。   The segment buffer 231 accumulates three segments S1R, S2R, and S4 from the position of the pointer B to the position of the pointer A (see “segment reset” in FIG. 8). Therefore, the CPU 21 determines that three segments have been generated from the pointer B (S14: YES), and determines whether the segment length of the segment S2R, which is the “second segment” at this time, is equal to or smaller than the first set value (S15). ). When the CPU 21 determines that the segment length of the segment S2R shown in FIG. 5 is equal to or smaller than the first set value (S15: YES), the CPU 21 corrects the route again (S16).

図6に示すように、CPU21は、「第2のセグメント」であるセグメントS2Rの中点T2の座標を、セグメントS2Rの始点の座標と終点の座標とから算出する。CPU21は、セグメントS1Rの始点(A1)とセグメントS2Rの中点T2とを、新たなセグメントS1RRで接続する。CPU21は、セグメントS2Rの中点T2とセグメントS4の終点(A5)とを、新たなセグメントS2RRで接続する。CPU21は、残ったセグメントS4を消去する。故に、図6に示すように、A1と中点T2とA5とを、新たなセグメントS1RRとS2RRで繋いだ新たな経路が生成する(第3段階)。   As illustrated in FIG. 6, the CPU 21 calculates the coordinates of the midpoint T2 of the segment S2R that is the “second segment” from the coordinates of the start point and the end point of the segment S2R. The CPU 21 connects the start point (A1) of the segment S1R and the midpoint T2 of the segment S2R with a new segment S1RR. The CPU 21 connects the midpoint T2 of the segment S2R and the end point (A5) of the segment S4 with a new segment S2RR. The CPU 21 erases the remaining segment S4. Therefore, as shown in FIG. 6, a new path connecting A1, midpoints T2 and A5 with new segments S1RR and S2RR is generated (third stage).

CPU21は、図6に示す新たな経路において、現時点で「第1のセグメント」であるセグメントS1RRのセグメント長が第2設定値より長いか否かを判断する(S17)。   The CPU 21 determines whether or not the segment length of the segment S1RR which is the “first segment” at the present time is longer than the second set value in the new route shown in FIG. 6 (S17).

CPU21は、セグメントS1RRのセグメント長が第2設定値以下と判断した場合(S17:NO)、S11に戻り、加工プログラムに基づき、次のセグメントSiが有るか否かを判断する。図8の第3段階に示すように、ポインタAの位置は空の状態である。CPU21は、次のセグメントSiが有ると判断した場合(S11:YES)、空のポインタAの位置に、図9の上段の「セグメント再設定」に示すように、次のセグメントS5をセットする(S13)。   When the CPU 21 determines that the segment length of the segment S1RR is equal to or smaller than the second set value (S17: NO), the CPU 21 returns to S11 and determines whether or not there is a next segment Si based on the machining program. As shown in the third stage of FIG. 8, the position of the pointer A is empty. When the CPU 21 determines that the next segment Si is present (S11: YES), the CPU 21 sets the next segment S5 at the position of the empty pointer A as shown in “segment reset” in the upper part of FIG. S13).

セグメントバッファ231は、ポインタBの位置からポインタAの位置まで、セグメントS1RR、S2RR、S5の3つのセグメントSiを蓄積している(図9の上段の「セグメント再設定」参照)。故に、CPU21は、ポインタBから3セグメント生成したと判断し(S14:YES)、現時点の第2のセグメントであるセグメントS2RRのセグメント長が第1設定値以下か否かを判断する(S15)。CPU21は、図6に示すセグメントS2RRのセグメント長が第1設定値以下と判断した場合(S15:YES)、再度、経路を修正する(S16)。   The segment buffer 231 accumulates three segments Si of segments S1RR, S2RR, and S5 from the position of the pointer B to the position of the pointer A (see “segment reset” in the upper part of FIG. 9). Therefore, the CPU 21 determines that three segments have been generated from the pointer B (S14: YES), and determines whether the segment length of the segment S2RR, which is the current second segment, is less than or equal to the first set value (S15). When the CPU 21 determines that the segment length of the segment S2RR shown in FIG. 6 is equal to or smaller than the first set value (S15: YES), the CPU 21 corrects the route again (S16).

図7に示すように、CPU21は、セグメントS2RRの中点T3の座標を、セグメントS2RRの始点と終点とから算出する。CPU21は、セグメントS1RRの始点とセグメントS2RRの中点T3とを、新たなセグメントS1RRRで接続する。CPU21は、セグメントS2RRの中点T3とセグメントS5の終点(A6)とを、新たなセグメントS2RRRで接続する。CPU21は、残ったセグメントS5を消去する。故に、図7に示すように、A1と中点T3とA6とを、新たなセグメントS1RRRとS2RRRで繋いだ新たな経路が生成する(第4段階)。   As shown in FIG. 7, the CPU 21 calculates the coordinates of the midpoint T3 of the segment S2RR from the start point and end point of the segment S2RR. The CPU 21 connects the start point of the segment S1RR and the midpoint T3 of the segment S2RR with a new segment S1RRR. The CPU 21 connects the midpoint T3 of the segment S2RR and the end point (A6) of the segment S5 with a new segment S2RRR. The CPU 21 erases the remaining segment S5. Therefore, as shown in FIG. 7, a new path connecting A1, midpoints T3, and A6 with new segments S1RRR and S2RRR is generated (fourth stage).

CPU21は、図7に示す新たな経路において、現時点で「第1のセグメント」であるセグメントS1RRのセグメント長が第2設定値より長いか否かを判断する(S17)。セグメントS1RRは、図4の第1段階に比べて長い。CPU21は、セグメントS1RRRのセグメント長が第2設定値より長いと判断した場合(S17:YES)、セグメントS1RRRについて経路を確定する(S18)。セグメントS1RRRは、A1〜T3を繋ぐ経路である。   The CPU 21 determines whether or not the segment length of the segment S1RR which is the “first segment” at the present time is longer than the second set value in the new route shown in FIG. 7 (S17). The segment S1RR is longer than the first stage in FIG. When the CPU 21 determines that the segment length of the segment S1RRR is longer than the second set value (S17: YES), the CPU 21 determines a route for the segment S1RRR (S18). The segment S1RRR is a path connecting A1 to T3.

CPU21は、「第1のセグメント」について経路が確定すると、図9の「経路確定」に示すように、ポインタBをインクリメントし(S19)、S11に戻る。経路が確定した状態では、ポインタAの位置は空の状態である。CPU21は、加工プログラムに基づき、次のセグメントが有ると判断した場合(S11:YES)、空のポインタAの位置に、次のセグメントS6をセットする(S13)。   When the path is determined for the “first segment”, the CPU 21 increments the pointer B as shown in “path determination” in FIG. 9 (S19), and returns to S11. In the state where the route is fixed, the position of the pointer A is empty. If the CPU 21 determines that there is a next segment based on the machining program (S11: YES), it sets the next segment S6 at the position of the empty pointer A (S13).

CPU21は、ポインタBから3セグメント生成したか否かを判断する(S14)。CPU21は、S11において、ポインタBをインクリメントしている。ポインタBとポインタAの間は、2つのセグメントSiのみである。故に、CPU21は、ポインタBから3セグメント生成していないと判断し(S14:NO)、ポインタAをインクリメントする(S22)。CPU21は、次のセグメントSiが有ると判断した場合(S11:YES)、空のポインタAの位置に、図9の下段の「セグメント再設定」に示すように、次のセグメントS7をセットする(S13)。CPU21は、ポインタBから3セグメント生成したと判断し(S14:YES)、上記同様に経路の最後まで、処理を繰り返す。   The CPU 21 determines whether three segments have been generated from the pointer B (S14). The CPU 21 increments the pointer B in S11. Between the pointer B and the pointer A, there are only two segments Si. Therefore, the CPU 21 determines that three segments are not generated from the pointer B (S14: NO), and increments the pointer A (S22). When the CPU 21 determines that the next segment Si is present (S11: YES), the CPU 21 sets the next segment S7 at the position of the empty pointer A as shown in “segment reset” in the lower part of FIG. 9 ( S13). The CPU 21 determines that three segments have been generated from the pointer B (S14: YES), and repeats the process until the end of the path as described above.

CPU21は、次のセグメントSiがないと判断した場合(S11:NO)、セグメントバッファ231において、ポインタAはポインタBと同位置であるか否かを判断する(S23)。CPU21は、ポインタAがポインタBと同位置でないと判断した場合(S23:NO)、ポインタBの位置のセグメントを確定し(S24)、ポインタBをインクリメントする(S25)。CPU21は、S23に戻り、ポインタAはポインタBと同位置であるか否かを再度判断する。CPU21は、ポインタAがポインタBと同位置であると判断した場合(S23:YES)、移動経路修正処理を終了する。   When the CPU 21 determines that there is no next segment Si (S11: NO), the CPU 21 determines whether or not the pointer A is in the same position as the pointer B in the segment buffer 231 (S23). When the CPU 21 determines that the pointer A is not at the same position as the pointer B (S23: NO), the CPU 21 determines the segment at the position of the pointer B (S24) and increments the pointer B (S25). The CPU 21 returns to S23 and determines again whether or not the pointer A is at the same position as the pointer B. When the CPU 21 determines that the pointer A is at the same position as the pointer B (S23: YES), the movement path correction process is terminated.

CPU21は、経路修正の途中で、第2のセグメントのセグメント長が第1設定値より長いと判断した場合(S15:NO)、第1のセグメントSiを確定する(S20)。CPU21は、ポインタBをインクリメントし(S21)、ポインタAをインクリメントし(S22)、S11に戻って処理を繰り返す。   If the CPU 21 determines that the segment length of the second segment is longer than the first set value during path correction (S15: NO), the CPU 21 determines the first segment Si (S20). The CPU 21 increments the pointer B (S21), increments the pointer A (S22), returns to S11, and repeats the process.

即ち、CPU21は、第2のセグメントのセグメント長が第1設定値より長いと判断した場合(S15:NO)、第1のセグメントについて経路を確定する(S20)。故に、修正後の移動経路は、微小ブロックを含まないので、工具が急激に減速することがなく、良好な加工面を得ることができる。また、経路修正後の第1のセグメントのセグメント長が第2設定値より長いと判断した場合(S17:YES)、第1のセグメントについて経路を確定する(S18)。故に、第1セグメントが所定の長さより大きくなった時点で、第1セグメントの経路が確定するため、微小ブロックが連続するプログラムで、移動経路が次々と修正されて、工具の移動経路がプログラムで指令した経路から大きく逸脱することがない。   That is, when the CPU 21 determines that the segment length of the second segment is longer than the first set value (S15: NO), the CPU 21 determines the path for the first segment (S20). Therefore, since the corrected movement path does not include a minute block, the tool does not decelerate rapidly and a good machining surface can be obtained. If it is determined that the segment length of the first segment after the route correction is longer than the second set value (S17: YES), the route is determined for the first segment (S18). Therefore, when the first segment becomes larger than the predetermined length, the path of the first segment is determined. Therefore, the movement path is corrected one after another by a program in which minute blocks are continuous, and the movement path of the tool is programmed. There is no significant departure from the commanded route.

以上説明したように、本実施形態の数値制御装置1では、CPU21は、加工プログラムを読み取ったブロック順に、軸の移動経路を構成するセグメントSiを生成し、セグメントバッファ231に順次記憶する。CPU21は、セグメントバッファ231に蓄積するセグメントSiについて、連続する3つのブロックを処理対象のセグメントとして、移動経路を順次修正する。CPU21は、最初に、セグメントS1、S2、S3を処理対象セグメントとする。CPU21は、セグメントS2が第1設定値より長いと判断した場合、セグメント1の経路を確定する。CPU21は、第2のセグメント長が第1設定値以下であると判断した場合、セグメントS1と、セグメントS2とを修正し、セグメントS3を消去して、新たな経路を作成する。   As described above, in the numerical control device 1 of the present embodiment, the CPU 21 generates the segment Si constituting the axis movement path in the block order read from the machining program, and sequentially stores it in the segment buffer 231. The CPU 21 sequentially corrects the movement path of the segment Si accumulated in the segment buffer 231 by using three consecutive blocks as the segment to be processed. First, the CPU 21 sets the segments S1, S2, and S3 as processing target segments. When the CPU 21 determines that the segment S2 is longer than the first set value, the CPU 21 determines the path of the segment 1. When the CPU 21 determines that the second segment length is equal to or shorter than the first set value, the CPU 21 corrects the segment S1 and the segment S2, deletes the segment S3, and creates a new path.

具体的には、CPU21は、セグメントS1の始点とセグメントS2の中点T1とを、新たなセグメントS1Rで接続し、セグメントS2の中点T1とセグメントS3の終点とを、新たなセグメントS2Rで接続する。CPU21は、セグメントS1Rが第2設定値より長いと判断した場合、セグメントS1Rを確定する。CPU21は、セグメントS1Rが第2設定値以下と判断した場合、処理対象セグメントに次のセグメントを追加する。CPU21は、処理対象セグメントを追加した連続する3つのセグメントSiについて、再度、経路を修正しつつ第1のセグメントを順次確定する。故に、修正後の移動経路は、微小のセグメントを含まないので、工具が急激に減速することがなく、良好な加工面を得ることができ、且つ工具の移動経路がプログラムで指令した経路から大きく逸脱することがない。   Specifically, the CPU 21 connects the start point of the segment S1 and the midpoint T1 of the segment S2 with the new segment S1R, and connects the midpoint T1 of the segment S2 and the end point of the segment S3 with the new segment S2R. To do. When the CPU 21 determines that the segment S1R is longer than the second set value, the CPU 21 determines the segment S1R. When the CPU 21 determines that the segment S1R is equal to or smaller than the second set value, the CPU 21 adds the next segment to the process target segment. The CPU 21 sequentially determines the first segment while correcting the path again for the three consecutive segments Si to which the processing target segment is added. Therefore, the corrected moving path does not include a minute segment, so that the tool does not decelerate rapidly, a good machining surface can be obtained, and the moving path of the tool is larger than the path commanded by the program. There is no departure.

以上説明において、S15の処理を実行するCPU21が本発明の「第1判断手段」に相当し、S20の処理を実行するCPU21が本発明の「第1ブロック確定手段」に相当し、S16の処理を実行するCPU21が本発明の「修正手段」に相当し、S17の処理を実行するCPU21が本発明の「第2判断手段」に相当し、S18の処理を実行するCPU21が本発明の「第2ブロック確定手段」に相当し、S19、S21、S22の処理を実行するCPU21が本発明の「ブロック再設定手段」に相当する。   In the above description, the CPU 21 that executes the process of S15 corresponds to the “first determination unit” of the present invention, the CPU 21 that executes the process of S20 corresponds to the “first block determination unit” of the present invention, and the process of S16 The CPU 21 that executes the process corresponds to the “correction unit” of the present invention, the CPU 21 that executes the process of S17 corresponds to the “second determination unit” of the present invention, and the CPU 21 that executes the process of S18 The CPU 21 that executes the processes of S19, S21, and S22 corresponds to the “block re-setting unit” of the present invention.

なお、本発明の数値制御装置、移動経路修正方法、移動経路修正プログラム及び記憶媒体は、上記実施形態に限らず、各種の変形が可能なことはいうまでもない。   Needless to say, the numerical control device, the movement path correction method, the movement path correction program, and the storage medium of the present invention are not limited to the above-described embodiment, and various modifications are possible.

1 数値制御装置
2 工作機械
21 CPU
22 ROM
23 RAM
24 フラッシュメモリ
231 セグメントバッファ
1 Numerical control device 2 Machine tool 21 CPU
22 ROM
23 RAM
24 Flash memory 231 Segment buffer

Claims (4)

複数のブロックで構成される工作機械の移動経路を該複数のブロックの内連続する3つのブロックを移動開始側の開始ブロック、移動終了側の終了ブロック、該開始ブロックと該終了ブロックを繋ぐ中間ブロックとして選択し、前記3つのブロックに基づいて前記移動経路を順次修正する数値制御装置において、
前記中間ブロックが第1所定長以下か否かを判断する第1判断手段と、
前記中間ブロックが前記第1所定長より長いと前記第1判断手段が判断した場合、前記開始ブロックを前記工作機械の移動経路として確定する第1ブロック確定手段と、
前記中間ブロックが前記第1所定長以下であると前記第1判断手段が判断した場合、前記開始ブロックの始点と前記中間ブロックの中点を接続するブロックを新たな開始ブロックとし、前記中間ブロックの中点と前記終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する修正手段と、
前記修正手段によって修正した前記新たな開始ブロックが第2所定長より長いか否かを判断する第2判断手段と、
前記新たな開始ブロックが前記第2所定長より長いと前記第2判断手段が判断した場合、該新たな開始ブロックを前記工作機械の移動経路として確定する第2ブロック確定手段と、
前記第1ブロック確定手段が前記工作機械の移動経路を確定した場合、前記中間ブロックを前記開始ブロックとし、前記終了ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとし、
前記第2ブロック確定手段が前記工作機械の移動経路を確定した場合、前記新たな中間ブロックを前記開始ブロックとし、前記終了ブロックに連続する2つのブロックを順に前記中間ブロック、前記終了ブロックとし、
前記新たな開始ブロックが前記第2所定長以下であると前記第2判断手段が判断した場合、該新たな開始ブロックを前記開始ブロックとし、前記新たな中間ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとして前記3つのブロックを再設定するブロック再設定手段と
を備えたことを特徴とする数値制御装置。
A movement path of a machine tool composed of a plurality of blocks, three consecutive blocks among the plurality of blocks are moved to a movement start side start block, a movement end side end block, and an intermediate block connecting the start block and the end block In the numerical controller that sequentially corrects the movement path based on the three blocks,
First determination means for determining whether the intermediate block is equal to or shorter than a first predetermined length;
First block determination means for determining the start block as a movement path of the machine tool when the first determination means determines that the intermediate block is longer than the first predetermined length;
When the first determination means determines that the intermediate block is equal to or shorter than the first predetermined length, a block connecting the start point of the start block and the midpoint of the intermediate block is set as a new start block, and the intermediate block Correction means for correcting a block connecting the middle point and the end point of the end block as a new intermediate block;
Second determination means for determining whether or not the new start block corrected by the correction means is longer than a second predetermined length;
Second block determination means for determining the new start block as a movement path of the machine tool when the second determination means determines that the new start block is longer than the second predetermined length;
When the first block determining means determines the moving path of the machine tool, the intermediate block is the start block, the end block is the intermediate block, the block next to the end block is the end block,
When the second block determination means determines the movement path of the machine tool, the new intermediate block is the start block, two blocks that are continuous to the end block are sequentially the intermediate block, the end block,
When the second determination means determines that the new start block is equal to or shorter than the second predetermined length, the new start block is the start block, the new intermediate block is the intermediate block, and the end block is And a block resetting means for resetting the three blocks with the next block as the end block.
複数のブロックで構成される工作機械の移動経路を該複数のブロックの内連続する3つのブロックを移動開始側の開始ブロック、移動終了側の終了ブロック、該開始ブロックと該終了ブロックを繋ぐ中間ブロックとして選択し、前記3つのブロックに基づいて前記移動経路を順次修正する数値制御装置によって行われる移動経路修正方法において、
前記中間ブロックが第1所定長以下か否かを判断する第1判断ステップと、
前記中間ブロックが前記第1所定長より長いと前記第1判断ステップにおいて判断した場合、前記開始ブロックを前記工作機械の移動経路として確定する第1ブロック確定ステップと、
前記中間ブロックが前記第1所定長以下であると前記第1判断ステップにおいて判断した場合、前記開始ブロックの始点と前記中間ブロックの中点を接続するブロックを新たな開始ブロックとし、前記中間ブロックの中点と前記終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する修正ステップと、
前記修正ステップにおいて修正した前記新たな開始ブロックが第2所定長より長いか否かを判断する第2判断ステップと、
前記新たな開始ブロックが前記第2所定長より長いと前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記工作機械の移動経路として確定する第2ブロック確定ステップと、
前記第1ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記中間ブロックを前記開始ブロックとし、前記終了ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとし、
前記第2ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記新たな中間ブロックを前記開始ブロックとし、前記終了ブロックに連続する2つのブロックを順に前記中間ブロック、前記終了ブロックとし、
前記新たな開始ブロックが前記第2所定長以下であると前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記開始ブロックとし、前記新たな中間ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとして前記3つのブロックを再設定するブロック再設定ステップと
を備えたことを特徴とする移動経路修正方法。
A movement path of a machine tool composed of a plurality of blocks, three consecutive blocks among the plurality of blocks are moved to a movement start side start block, a movement end side end block, and an intermediate block connecting the start block and the end block In the movement route correction method performed by the numerical controller that sequentially corrects the movement route based on the three blocks,
A first determination step of determining whether the intermediate block is equal to or shorter than a first predetermined length;
A first block determination step for determining the start block as a movement path of the machine tool when it is determined in the first determination step that the intermediate block is longer than the first predetermined length;
When it is determined in the first determination step that the intermediate block is equal to or shorter than the first predetermined length, a block connecting the start point of the start block and the midpoint of the intermediate block is set as a new start block, and the intermediate block A correction step of correcting a block connecting the midpoint and the end point of the end block as a new intermediate block;
A second determination step of determining whether or not the new start block corrected in the correction step is longer than a second predetermined length;
A second block determination step for determining the new start block as a movement path of the machine tool when it is determined in the second determination step that the new start block is longer than the second predetermined length;
When the movement path of the machine tool is determined in the first block determining step, the intermediate block is the start block, the end block is the intermediate block, the block next to the end block is the end block,
When the movement path of the machine tool is determined in the second block determination step, the new intermediate block is set as the start block, and two blocks subsequent to the end block are sequentially set as the intermediate block and the end block,
When it is determined in the second determination step that the new start block is equal to or shorter than the second predetermined length, the new start block is the start block, the new intermediate block is the intermediate block, and the end block is And a block resetting step for resetting the three blocks with the next block as the end block.
複数のブロックで構成される工作機械の移動経路を該複数のブロックの内連続する3つのブロックを移動開始側の開始ブロック、移動終了側の終了ブロック、該開始ブロックと該終了ブロックを繋ぐ中間ブロックとして選択し、前記3つのブロックに基づいて前記移動経路を順次修正する数値制御装置の動作を制御する移動経路修正プログラムにおいて、
コンピュータに、
前記中間ブロックが第1所定長以下か否かを判断する第1判断ステップと、
前記中間ブロックが前記第1所定長より長いと前記第1判断ステップにおいて判断した場合、前記開始ブロックを前記工作機械の移動経路として確定する第1ブロック確定ステップと、
前記中間ブロックが前記第1所定長以下であると前記第1判断ステップにおいて判断した場合、前記開始ブロックの始点と前記中間ブロックの中点を接続するブロックを新たな開始ブロックとし、前記中間ブロックの中点と前記終了ブロックの終点を接続するブロックを新たな中間ブロックとして修正する修正ステップと、
前記修正ステップにおいて修正した前記新たな開始ブロックが第2所定長より長いか否かを判断する第2判断ステップと、
前記新たな開始ブロックが前記第2所定長より長いと前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記工作機械の移動経路として確定する第2ブロック確定ステップと、
前記第1ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記中間ブロックを前記開始ブロックとし、前記終了ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとし、
前記第2ブロック確定ステップにおいて前記工作機械の移動経路を確定した場合、前記新たな中間ブロックを前記開始ブロックとし、前記終了ブロックに連続する2つのブロックを順に前記中間ブロック、前記終了ブロックとし、
前記新たな開始ブロックが前記第2所定長以下であると前記第2判断ステップにおいて判断した場合、該新たな開始ブロックを前記開始ブロックとし、前記新たな中間ブロックを前記中間ブロックとし、前記終了ブロックの次のブロックを前記終了ブロックとして前記3つのブロックを再設定するブロック再設定ステップと
を実行させることを特徴とする移動経路修正プログラム。
A movement path of a machine tool composed of a plurality of blocks, three consecutive blocks among the plurality of blocks are moved to a movement start side start block, a movement end side end block, and an intermediate block connecting the start block and the end block In the movement path correction program for controlling the operation of the numerical controller that sequentially corrects the movement path based on the three blocks,
On the computer,
A first determination step of determining whether the intermediate block is equal to or shorter than a first predetermined length;
A first block determination step for determining the start block as a movement path of the machine tool when it is determined in the first determination step that the intermediate block is longer than the first predetermined length;
When it is determined in the first determination step that the intermediate block is equal to or shorter than the first predetermined length, a block connecting the start point of the start block and the midpoint of the intermediate block is set as a new start block, and the intermediate block A correction step of correcting a block connecting the midpoint and the end point of the end block as a new intermediate block;
A second determination step of determining whether or not the new start block corrected in the correction step is longer than a second predetermined length;
A second block determination step for determining the new start block as a movement path of the machine tool when it is determined in the second determination step that the new start block is longer than the second predetermined length;
When the movement path of the machine tool is determined in the first block determining step, the intermediate block is the start block, the end block is the intermediate block, the block next to the end block is the end block,
When the movement path of the machine tool is determined in the second block determination step, the new intermediate block is set as the start block, and two blocks subsequent to the end block are sequentially set as the intermediate block and the end block,
When it is determined in the second determination step that the new start block is equal to or shorter than the second predetermined length, the new start block is the start block, the new intermediate block is the intermediate block, and the end block is And a block resetting step of resetting the three blocks with the next block as the end block.
請求項3に記載の移動経路修正プログラムを記憶したことを特徴とする記憶媒体。   A storage medium storing the movement route correcting program according to claim 3.
JP2010220680A 2010-09-30 2010-09-30 Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium Active JP5477247B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010220680A JP5477247B2 (en) 2010-09-30 2010-09-30 Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010220680A JP5477247B2 (en) 2010-09-30 2010-09-30 Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium

Publications (2)

Publication Number Publication Date
JP2012078891A JP2012078891A (en) 2012-04-19
JP5477247B2 true JP5477247B2 (en) 2014-04-23

Family

ID=46239115

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010220680A Active JP5477247B2 (en) 2010-09-30 2010-09-30 Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium

Country Status (1)

Country Link
JP (1) JP5477247B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5659666B2 (en) * 2010-09-30 2015-01-28 ブラザー工業株式会社 Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium
JP6281315B2 (en) * 2014-02-26 2018-02-21 ブラザー工業株式会社 Numerical control device and moving path correction method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0711762B2 (en) * 1986-09-05 1995-02-08 オークマ株式会社 NC data correction device
JP4102521B2 (en) * 1999-07-26 2008-06-18 三菱電機株式会社 Trajectory control device
JP3513100B2 (en) * 2000-10-26 2004-03-31 ファナック株式会社 Control device

Also Published As

Publication number Publication date
JP2012078891A (en) 2012-04-19

Similar Documents

Publication Publication Date Title
TWI512417B (en) Apparatus for creating processing program, numerical control apparatus, processing system, method for creating processing program, and numerical control method
US9851709B2 (en) Numerical control device
JP5562430B2 (en) Tool path generation method and generation apparatus
JP5009010B2 (en) Numerical controller
US8560112B2 (en) Numerical controller with function to correct movement path of machining program
JP6450732B2 (en) Numerical controller
JP6646027B2 (en) Post-processor device, machining program generation method, CNC machining system, and machining program generation program
WO2013179366A1 (en) Numerical control device
JP2005301440A (en) Machining time calculating device
JP2001125613A (en) Numerical control simulation device
JP4637197B2 (en) Numerical controller
JP4802170B2 (en) Machining time calculation device and program thereof
JP2008117032A (en) Working control device and its program
CN101729000A (en) Servo motor controlling device
JP5477247B2 (en) Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium
JP6038331B2 (en) Tool path generation method and tool path generation apparatus
JP2007304714A (en) Numerical control device
JP5573664B2 (en) Numerical control apparatus, movement control method, movement control program, and storage medium
JP5659666B2 (en) Numerical control apparatus, moving path correcting method, moving path correcting program, and storage medium
JP5875740B1 (en) Numerical controller
JP5143661B2 (en) NC lathe control method and control device
JP4982170B2 (en) Machining control device and machining control program
JP6281315B2 (en) Numerical control device and moving path correction method
JP5512050B1 (en) Numerical controller
CN116635800A (en) Numerical controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131226

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140127

R150 Certificate of patent or registration of utility model

Ref document number: 5477247

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150