JP2012011492A - Tool arrangement computing device, tool arrangement computing program, and storage medium - Google Patents

Tool arrangement computing device, tool arrangement computing program, and storage medium Download PDF

Info

Publication number
JP2012011492A
JP2012011492A JP2010149542A JP2010149542A JP2012011492A JP 2012011492 A JP2012011492 A JP 2012011492A JP 2010149542 A JP2010149542 A JP 2010149542A JP 2010149542 A JP2010149542 A JP 2010149542A JP 2012011492 A JP2012011492 A JP 2012011492A
Authority
JP
Japan
Prior art keywords
tool
switching
tools
permutation
arrangement
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.)
Pending
Application number
JP2010149542A
Other languages
Japanese (ja)
Inventor
Takahiro Kawai
貴博 川合
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 JP2010149542A priority Critical patent/JP2012011492A/en
Priority to CN2011101925523A priority patent/CN102314160B/en
Publication of JP2012011492A publication Critical patent/JP2012011492A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a tool arrangement computing device capable of surely computing an arrangement of a tool with a minimum changeover frequency of a tool magazine, a control program for the tool arrangement computing device, and a storage medium.SOLUTION: A CPU of a numerical control device reads out a tool changeover instruction from an NC program and memorizes a usage order L of the tool T (S11, S12). In the using order L, a singly-used tool continuation spot Mi in which the singly-used tool continues in the usage order L of the tool T of the NC program is memorized (S15). The singly-used tool continuation spot Mi is assumed as a piece of a tool and all of combinations of permutations W are generated (S17). Each of the permutation W is converted into a tool arrangement Q and the changeover frequency R is calculated (S18, S19). Accordingly, throughput relating to the calculation of the changeover frequency R is drastically reduced so that an optimal tool arrangement with a smallest changeover frequency R is calculated with reliability.

Description

本発明は、タレット式の工具マガジンにおける工具の配置を算出できる工具配置算出装置、工具配置算出プログラムおよび記憶媒体に関する。   The present invention relates to a tool arrangement calculation device, a tool arrangement calculation program, and a storage medium that can calculate the arrangement of tools in a turret type tool magazine.

従来、工具交換装置はタレット式の工具マガジンを備えている。工具マガジンは、外周上に、工具を装着する複数のポットを備えている。NCプログラム中の工具交換指令は、特定のポット番号の工具への交換を指令する。特定のポット番号の工具は、工具マガジンの旋回により、所定の工具交換位置に位置する。工具交換装置は、工作機械の主軸に装着した現工具を、工具交換位置に位置する次工具に交換する。例えば、工具交換装置は、工具マガジンが14本のポットを備える場合、現在主軸に装着している現工具がポット番号1で、次工具がポット番号8であれば、工具マガジンを7回旋回して位置を切り替える。工具マガジンを旋回して位置を切り替えた後のポット番号8の工具は、工具交換位置に位置する。作業者は、ポットを切り替える回数(以下、切替回数と呼ぶ)が最小となるように、工具マガジンにおける工具配置を行う。それ故、工具交換時間は短縮する。   Conventionally, a tool changer has a turret type tool magazine. The tool magazine is provided with a plurality of pots for mounting tools on the outer periphery. The tool change command in the NC program instructs to change to a tool having a specific pot number. A tool with a specific pot number is positioned at a predetermined tool change position by turning the tool magazine. The tool changer replaces the current tool mounted on the spindle of the machine tool with the next tool located at the tool change position. For example, if the tool magazine has 14 pots, if the current tool currently mounted on the spindle is pot number 1 and the next tool is pot number 8, the tool magazine is swung seven times. Switch position. The tool of the pot number 8 after the tool magazine is turned and the position is switched is located at the tool change position. The operator arranges the tools in the tool magazine so that the number of times of pot switching (hereinafter referred to as the number of times of switching) is minimized. Therefore, the tool change time is shortened.

特許文献1が開示している方法は、NCプログラム中に指令される工具交換指令を読み取り、最も多い工具交換の組合せの工具を優先的に隣のポットに並べ、残りの工具をNCプログラム中の指令順に並べるものである。   The method disclosed in Patent Document 1 reads a tool change command instructed in the NC program, preferentially arranges tools with the most tool change combinations in the adjacent pot, and places the remaining tools in the NC program. They are arranged in order of command.

特開平5−269635号公報JP-A-5-269635

特許文献1に記載の算出方法は、工具配置の全パターンの全組合せを考慮していない。それ故、プログラム中の工具使用順序によっては、切替回数が最小となる工具配置を算出できない場合があった。   The calculation method described in Patent Document 1 does not consider all combinations of all patterns of tool arrangement. Therefore, depending on the order of tool use in the program, it may not be possible to calculate a tool arrangement that minimizes the number of times of switching.

本発明は、上記課題を解決するためになされたものであり、工具マガジンの切替回数が最小となる工具配置を確実に算出できる工具配置算出装置、工具配置算出装置の制御プログラムおよび記憶媒体を提供することを目的とする。   The present invention has been made to solve the above-described problems, and provides a tool placement calculation device, a tool placement calculation device control program, and a storage medium that can reliably calculate a tool placement that minimizes the number of times of switching between tool magazines. The purpose is to do.

本発明の第1態様に係る工具配置算出装置は、工作機械の工具交換装置に回転割り出し可能に設け、正転又は反転する略円盤状の工具マガジンの外周に設けた複数のポットに各々配置する複数の工具の配置を算出する工具配置算出装置であって、前記工作機械の加工プログラムから工具交換指令を読み込む工具交換指令読込手段と、当該工具交換指令読込手段が読み込んだ前記工具交換指令に基づき、前記加工プログラムで使用される使用工具の使用順を特定する使用順特定手段と、当該使用順特定手段が特定した前記使用順において、1回のみ使用する単発工具が連続して並ぶ配列箇所を抽出する配列箇所抽出手段と、前記配列箇所抽出手段が抽出した前記配列箇所を1本の工具とみなして、前記加工プログラムで使用される工具を一列に並べて得られる順列を生成する順列生成手段と、当該順列生成手段が算出した前記順列において、前記配列箇所を前記単発工具の配列に戻した状態で、前記使用順に工具を使用した場合に、前記ポットの切り替えに必要な切替回数を計数する切替回数計数手段と、当該切替回数計数手段によって前記順列毎に計数された複数の前記切替回数の中から、最も少ない切替回数である最小回数を特定する最小回数特定手段と、当該最小回数特定手段によって特定した前記最小回数に対応する前記順列に基づき、前記ポットに工具を並べた場合の工具配置の情報である配置情報を出力する配置情報出力手段とを備えている。   The tool arrangement calculation device according to the first aspect of the present invention is provided in a tool changer of a machine tool so as to be able to perform rotation indexing, and is arranged in each of a plurality of pots provided on the outer periphery of a substantially disk-shaped tool magazine that rotates forward or reverse. A tool arrangement calculation device for calculating the arrangement of a plurality of tools, based on a tool change command reading means for reading a tool change command from a machining program of the machine tool, and based on the tool change command read by the tool change command reading means. The use order specifying means for specifying the use order of the tools used in the machining program, and the arrangement locations in which the single tools used only once are continuously arranged in the use order specified by the use order specifying means. The arrangement location extracting means to be extracted and the arrangement location extracted by the arrangement location extraction means are regarded as one tool, and the tools used in the machining program are arranged in a line. In the permutation generating means for generating all the permutations obtained, and in the permutation calculated by the permutation generating means, when the tools are used in the order of use in the state where the array locations are returned to the single tool array, A switching number counting unit that counts the number of switchings necessary for pot switching, and a minimum number that is the smallest switching number among the plurality of switching times counted for each permutation by the switching number counting unit A minimum number of times specifying means; and an arrangement information output means for outputting arrangement information that is information of tool arrangement when tools are arranged in the pot based on the permutation corresponding to the minimum number of times specified by the minimum number of times specifying means; It has.

第1態様では、工具交換指令読込手段は、工作機械の加工プログラムから工具交換指令を読み込む。使用順特定手段は、工具交換指令読込手段が読み込んだ工具交換指令に基づき、加工プログラムで使用される使用工具の使用順を特定する。配列箇所抽出手段は、使用順特定手段が特定した使用順において、1回のみ使用する単発工具が連続して並ぶ配列箇所を抽出する。順列生成手段は、配列箇所抽出手段が抽出した配列箇所を1本の工具とみなして、加工プログラムで使用される工具を一列に並べて得られる順列を生成する。切替回数計数手段は、順列生成手段が算出した順列において、配列箇所を単発工具の配列に戻した状態で、使用順に工具を使用した場合に、ポットの切り替えに必要な切替回数を計数する。最小回数特定手段は、切替回数計数手段によって順列毎に計数された複数の切替回数の中から、最も少ない切替回数である最小回数を特定する。配置情報出力手段は、最小回数特定手段によって特定した最小回数に対応する順列に基づき、ポットに工具を並べた場合の工具配置の情報である配置情報を出力する。配列箇所抽出手段が抽出する抽出箇所は、加工プログラムの工具の使用順で単発工具が連続して並ぶ箇所である。抽出箇所では単発工具を使用順に並べれば、ポット切替回数は最小となる。それ故、抽出箇所を1本の工具とみなして、加工プログラムで使用する工具を一列に並べて得られる順列を生成する。全ての工具の順列を生成する場合に比べて順列の組合せを少なくできるので、算出量を軽減できる。順列毎に計数した複数の切替回数の中から最小回数を特定するので、工具マガジンの旋回回数が最小となる工具の配置を確実に算出できる。工具配置に関する配置情報を出力できるので、作業者は出力された配置情報を元に、工具の配置を行うことができる。   In the first aspect, the tool change command reading means reads the tool change command from the machining program of the machine tool. The use order specifying means specifies the use order of the used tools used in the machining program based on the tool change command read by the tool change command reading means. The arrangement location extracting means extracts arrangement locations where single tools that are used only once are continuously arranged in the order of use specified by the usage order specification means. The permutation generation means regards the arrangement location extracted by the arrangement location extraction means as one tool, and generates a permutation obtained by arranging the tools used in the machining program in a row. The switching number counting unit counts the number of switchings required for pot switching when the tools are used in the order of use in a state where the arrangement position is returned to the single tool arrangement in the permutation calculated by the permutation generation unit. The minimum number of times specifying means specifies the minimum number of times that is the smallest number of times of switching from among a plurality of times of switching counted for each permutation by the number of times of switching counting. The arrangement information output means outputs arrangement information, which is information on tool arrangement when tools are arranged in the pot, based on the permutation corresponding to the minimum number specified by the minimum number specifying means. The extraction location extracted by the array location extraction means is a location where single-shot tools are continuously arranged in the order of use of tools in the machining program. If the single tools are arranged in the order of use at the extraction location, the number of pot switching is minimized. Therefore, the extracted part is regarded as one tool, and a permutation obtained by arranging the tools used in the machining program in a line is generated. Since the number of combinations of permutations can be reduced as compared with the case of generating all permutations of tools, the amount of calculation can be reduced. Since the minimum number is specified from a plurality of switching times counted for each permutation, it is possible to reliably calculate the arrangement of the tools that minimizes the number of times the tool magazine turns. Since the arrangement information related to the tool arrangement can be output, the operator can arrange the tools based on the output arrangement information.

また、第1態様において、前記切替回数計数手段は、前記順列生成手段が算出した前記順列において、前記配列箇所を前記単発工具の使用順である元の配列に戻した状態で、前記使用順に工具を使用した場合に、前記ポットの切り替えに必要な切替回数を、前記順列毎に計数してもよい。それ故、ポットの切替回数の計算に係る処理量を最も少なくできる。   Further, in the first aspect, the switching number counting means is configured such that, in the permutation calculated by the permutation generation means, the arrangement locations are returned to the original arrangement that is the order of use of the single tool, and the tools are used in the order of use. May be used for each permutation, the number of times required for switching the pots may be counted. Therefore, the amount of processing related to the calculation of the number of pot switching can be minimized.

本発明の第2態様に係る工具配置算出プログラムは、工作機械の工具交換装置に回転割り出し可能に設け、正転又は反転する略円盤状の工具マガジンの外周に設けた複数のポットに各々配置する複数の工具の配置を算出する工具配置算出装置の動作を制御する工具配置算出プログラムであって、コンピュータに、前記工作機械の加工プログラムから工具交換指令を読み込む工具交換指令読込ステップと、当該工具交換指令読込ステップにおいて読み込んだ前記工具交換指令に基づき、前記加工プログラムで使用される使用工具の使用順を特定する使用順特定ステップと、当該使用順特定ステップにおいて特定した前記使用順において、1回のみ使用する単発工具が連続して並ぶ配列箇所を抽出する配列箇所抽出ステップと、前記配列箇所抽出ステップにおいて抽出した前記配列箇所を1本の工具とみなして、前記加工プログラムで使用される工具を一列に並べて得られる順列を生成する順列算出ステップと、当該順列算出ステップにおいて算出した前記順列において、前記配列箇所を前記単発工具の配列に戻した状態で、前記使用順に工具を使用した場合に、前記ポットの切り替えに必要な切替回数を計数する切替回数計数ステップと、当該切替回数計数ステップにおいて前記順列毎に計数された複数の前記切替回数の中から、最も少ない切替回数である最小回数を特定する最小回数特定ステップと、当該最小回数特定ステップにおいて特定した前記最小回数に対応する前記順列に基づき、前記ポットに工具を並べた場合の工具配置の情報である配置情報を出力する配置情報出力ステップとを実行させることを特徴とする。   The tool arrangement calculation program according to the second aspect of the present invention is provided in a tool changer of a machine tool so as to be able to perform rotation indexing, and is arranged in each of a plurality of pots provided on the outer periphery of a substantially disk-shaped tool magazine that rotates normally or reversely. A tool placement calculation program for controlling the operation of a tool placement calculation device that calculates the placement of a plurality of tools, a tool change command reading step for reading a tool change command from a machining program of the machine tool into a computer, and the tool change Based on the tool change command read in the command reading step, only once in the use order specifying step for specifying the use order of the tools used in the machining program and the use order specified in the use order specifying step. An array location extraction step for extracting the array locations where the single tools to be used are continuously arranged, and the array location extraction In the permutation calculating step for generating the permutation obtained by arranging the tools extracted in the step as one tool and arranging the tools used in the machining program in a row, and in the permutation calculated in the permutation calculating step, When the tools are used in the order of use in the state in which the arrangement location is returned to the single tool arrangement, the switching number counting step for counting the number of switching necessary for switching the pot, and the switching number counting step Based on the minimum number specifying step for specifying the minimum number of times that is the smallest number of times of switching among the plurality of switching times counted for each permutation, and the permutation corresponding to the minimum number of times specified in the minimum number of times specifying step. , An arrangement information output unit for outputting arrangement information which is information on arrangement of tools when tools are arranged in the pot. Characterized in that it is executed and-up.

第2態様は、コンピュータが実行する工具配置算出プログラムである。工具交換指令読込ステップにおいて、工作機械の加工プログラムから工具交換指令を読み込む。使用順特定ステップにおいて、工具交換指令読込ステップにおいて読み込んだ工具交換指令に基づき、加工プログラムで使用される使用工具の使用順を特定する。順列算出ステップにおいて、配列箇所抽出ステップにおいて抽出した配列箇所を1本の工具とみなして、加工プログラムで使用される工具を一列に並べて得られる順列を生成する。切替回数計数ステップにおいて、順列算出ステップにおいて算出した順列において、配列箇所を単発工具の配列に戻した状態で、使用順に工具を使用した場合に、ポットの切り替えに必要な切替回数を計数する。最小回数特定ステップにおいて、切替回数計数ステップにおいて順列毎に計数された複数の切替回数の中から、最も少ない切替回数である最小回数を特定する。配置情報出力ステップにおいて、最小回数特定ステップにおいて特定した最小回数に対応する順列に基づき、ポットに工具を並べた場合の工具配置の情報である配置情報を出力する。配列箇所抽出ステップにおいて抽出する抽出箇所は、加工プログラムの工具の使用順で単発工具が連続して並ぶ箇所である。抽出箇所では単発工具を使用順に並べれば、ポット切替回数は最小となる。それ故、抽出箇所を1本の工具とみなして、加工プログラムで使用する工具を一列に並べて得られる順列を生成する。全ての工具の順列を生成する場合に比べて順列の組合せを少なくできるので、算出量を軽減できる。順列毎に計数した複数の切替回数の中から最小回数を特定するので、工具マガジンの旋回回数が最小となる工具の配置を確実に算出できる。工具配置に関する配置情報を出力できるので、作業者は出力された配置情報を元に、工具の配置を行うことができる。   The second aspect is a tool arrangement calculation program executed by a computer. In the tool change command reading step, the tool change command is read from the machining program of the machine tool. In the use order specifying step, the use order of the tools used in the machining program is specified based on the tool change command read in the tool change command reading step. In the permutation calculation step, the arrangement location extracted in the arrangement location extraction step is regarded as one tool, and a permutation obtained by arranging the tools used in the machining program in a row is generated. In the switching number counting step, when the tools are used in the order of use in the state where the arrangement location is returned to the single tool arrangement in the permutation calculated in the permutation calculating step, the number of switching times required for pot switching is counted. In the minimum number specifying step, the minimum number, which is the smallest number of switching times, is specified from the plurality of switching times counted for each permutation in the switching number counting step. In the arrangement information output step, arrangement information, which is information on the arrangement of tools when the tools are arranged in the pot, is output based on the permutation corresponding to the minimum number specified in the minimum number specifying step. The extraction locations to be extracted in the array location extraction step are locations where single-shot tools are continuously arranged in the order of use of tools in the machining program. If the single tools are arranged in the order of use at the extraction location, the number of pot switching is minimized. Therefore, the extracted part is regarded as one tool, and a permutation obtained by arranging the tools used in the machining program in a line is generated. Since the number of combinations of permutations can be reduced as compared with the case of generating all permutations of tools, the amount of calculation can be reduced. Since the minimum number is specified from a plurality of switching times counted for each permutation, it is possible to reliably calculate the arrangement of the tools that minimizes the number of times the tool magazine turns. Since the arrangement information related to the tool arrangement can be output, the operator can arrange the tools based on the output arrangement information.

本発明の第3態様に係る記憶媒体は、コンピュータ読み取り可能であって、請求項3に記載の工具配置算出プログラムを記憶したことを特徴とする。   A storage medium according to a third aspect of the present invention is readable by a computer and stores the tool arrangement calculation program according to claim 3.

第3態様は、請求項3に記載の制御プログラムを記憶しているので、請求項3に記載の効果を得ることができる。   In the third aspect, since the control program according to claim 3 is stored, the effect according to claim 3 can be obtained.

工作機械1の正面図である。1 is a front view of a machine tool 1. スプラッシュカバー4を取り外した工作機械1の斜視図である。It is a perspective view of the machine tool 1 which removed the splash cover 4. FIG. 工具マガジン31を正面から見た略図である。2 is a schematic view of the tool magazine 31 as viewed from the front. 数値制御装置20の電気的構成を示したブロック図である。3 is a block diagram showing an electrical configuration of a numerical control device 20. FIG. NCプログラムの一例を示した図である。It is the figure which showed an example of NC program. 工具配置算出処理のメインのフローチャートである。It is a main flowchart of a tool arrangement | positioning calculation process. 切替回数算出処理のフローチャートである。It is a flowchart of switching frequency calculation processing. ディスプレイ11に表示した工具配置表50を示した図である。It is the figure which showed the tool arrangement | positioning table 50 displayed on the display.

以下、本発明に係る工具配置算出装置の一実施形態について、図面を参照して説明する。本実施形態の数値制御装置20(図4参照)は、NCプログラムに従い、工作機械1(図1参照)の動作を制御する。NCプログラムは、NCコマンドを配列した加工プログラムである。工作機械1は、ワークと工具の相対移動により、ワークを切削する機械である。   Hereinafter, an embodiment of a tool arrangement calculating device according to the present invention will be described with reference to the drawings. The numerical control device 20 (see FIG. 4) of the present embodiment controls the operation of the machine tool 1 (see FIG. 1) according to the NC program. The NC program is a machining program in which NC commands are arranged. The machine tool 1 is a machine that cuts a workpiece by relative movement of the workpiece and a tool.

工作機械1の構造について簡単に説明する。図1に示すように、工作機械1は、鉄製のベース2と、該ベース2の上部に位置し、ワークを切削する機械本体3(図2参照)と、該機械本体3の上部に位置し、機械本体3の主軸(図示省略)に装着する工具Tの交換を行う工具交換装置30(図2参照)と、前記機械本体3及び工具交換装置30の周囲を取り囲むスプラッシュカバー4とを備えている。   The structure of the machine tool 1 will be briefly described. As shown in FIG. 1, a machine tool 1 is located on an iron base 2, an upper part of the base 2, a machine main body 3 (see FIG. 2) for cutting a workpiece, and an upper part of the machine main body 3. A tool changer 30 (see FIG. 2) for exchanging a tool T mounted on a main shaft (not shown) of the machine body 3, and a splash cover 4 surrounding the machine body 3 and the tool changer 30. Yes.

スプラッシュカバー4は、正面に開口5を備えている。開口5は、開閉扉6を備えている。工作機械1を操作する操作パネル10は、開口5の右側に位置する。操作パネル10は、上部にディスプレイ11、下部にキーボード12を備えている。ディスプレイ11は、操作画面、設定画面、後述する工具配置表50(図8参照)等の各種画面を表示する。作業者は、ディスプレイ11に表示した画面を確認しつつ、キーボード12によって、各種入力、設定、作業等を行う。   The splash cover 4 has an opening 5 on the front surface. The opening 5 includes an opening / closing door 6. An operation panel 10 for operating the machine tool 1 is located on the right side of the opening 5. The operation panel 10 includes a display 11 at the top and a keyboard 12 at the bottom. The display 11 displays various screens such as an operation screen, a setting screen, and a tool arrangement table 50 (see FIG. 8) described later. The operator performs various inputs, settings, operations, and the like using the keyboard 12 while checking the screen displayed on the display 11.

機械本体3の構成について簡単に説明する。図2に示すように、機械本体3は、角柱状のコラム15と、主軸ヘッド(図示省略)と、主軸(図示省略)と、テーブル19とを備えている。コラム15は、ベース2の上部後方に立設する。主軸ヘッドは、コラム15の前面に沿って昇降する。主軸ヘッドは、Z軸モータ53(図4参照)の駆動により、Z軸方向に移動する。主軸は、主軸ヘッドの下部に設けてある。主軸は、工具Tを装着する装着穴(図示省略)を有し、主軸モータ54(図4参照)の駆動により回転する。テーブル19は、ベース2の上部中央に設けてある。テーブル19は、X軸モータ51(図4参照)、Y軸モータ52(図4参照)、ガイド機構(図示省略)によって、XY軸方向に移動する。X軸方向は、図1の左右方向である。Y軸方向は、図1の紙面に直行する方向である。Z軸方向は、図1の上下方向である。数値制御装置20は、コラム15の背面側に位置する制御箱(図示省略)に格納している。   The configuration of the machine body 3 will be briefly described. As shown in FIG. 2, the machine body 3 includes a prismatic column 15, a spindle head (not shown), a spindle (not shown), and a table 19. The column 15 is erected on the upper rear side of the base 2. The spindle head moves up and down along the front surface of the column 15. The spindle head moves in the Z-axis direction by driving a Z-axis motor 53 (see FIG. 4). The spindle is provided below the spindle head. The spindle has a mounting hole (not shown) for mounting the tool T, and rotates by driving the spindle motor 54 (see FIG. 4). The table 19 is provided in the upper center of the base 2. The table 19 is moved in the XY-axis direction by an X-axis motor 51 (see FIG. 4), a Y-axis motor 52 (see FIG. 4), and a guide mechanism (not shown). The X-axis direction is the left-right direction in FIG. The Y-axis direction is a direction perpendicular to the paper surface of FIG. The Z-axis direction is the vertical direction in FIG. The numerical controller 20 is stored in a control box (not shown) located on the back side of the column 15.

工具交換装置30の構成について説明する。図2、図3に示すように、工具交換装置30は、タレット式の工具マガジン31を備えている。工具マガジン31は円盤状である。工具マガジン31は、マガジンモータ55(図4参照)の駆動により、軸周りに旋回する。図3に示すように、工具マガジン31は、外周上に21個のポットP1〜P21を周方向(正面視時計回り)に備えている。作業者は、ポットP1〜P21に工具Tを着脱する。P1〜P21は、ポット番号を示している。工具マガジン31の最下部に位置するポットPの位置は、工作機械1の主軸との間で工具交換を行う「工具交換位置」に相当する。図3に示す例では、工具交換位置は、ポットP12の位置である。   The configuration of the tool changer 30 will be described. As shown in FIGS. 2 and 3, the tool changer 30 includes a turret type tool magazine 31. The tool magazine 31 has a disk shape. The tool magazine 31 is turned around its axis by driving a magazine motor 55 (see FIG. 4). As shown in FIG. 3, the tool magazine 31 includes 21 pots P <b> 1 to P <b> 21 on the outer periphery in the circumferential direction (clockwise in front view). An operator attaches / detaches the tool T to / from the pots P1 to P21. P1 to P21 indicate pot numbers. The position of the pot P located at the lowermost part of the tool magazine 31 corresponds to a “tool changing position” for exchanging the tool with the spindle of the machine tool 1. In the example shown in FIG. 3, the tool change position is the position of the pot P12.

工具マガジン31は、正転(正面視時計回り)、反転(正面視反時計回り)が可能である。正転、反転は、主軸に現在装着している現工具のポットPと、次に工具交換して主軸に装着する次工具のポットPとの相対的な位置関係で決まる。数値制御装置20は、工具マガジン31が、現工具のポットPから次工具のポットPまでの工具マガジン31の切替回数が少ない方に旋回するように制御する。   The tool magazine 31 can be rotated forward (clockwise in front view) and reversed (counterclockwise in front view). Forward rotation and reversal are determined by the relative positional relationship between the pot P of the current tool currently mounted on the spindle and the pot P of the next tool mounted on the spindle after the next tool change. The numerical control device 20 controls the tool magazine 31 to turn in the direction where the number of switching times of the tool magazine 31 from the current tool pot P to the next tool pot P is smaller.

工具マガジン31の旋回動作について簡単に説明する。数値制御装置20のCPU21(図4参照)は、NCプログラム中に工具交換指令のコマンド(M06指令)があった場合、交換対象である次工具TのポットPの位置を割り出す。現工具のポットPは、工具交換位置にある。CPU21は、次工具のポットPを現在位置から工具交換位置に搬送するまでに必要な工具マガジン31の切替回数を算出する。工具交換装置30は、現工具Tを主軸から取り外す。工具マガジン31は、マガジンモータ55の駆動によりCPU21が算出した切替回数だけ旋回する。ポットPに装着する次工具Tは工具交換位置に位置する。工具交換装置30は、次工具Tを主軸に装着する。   The turning operation of the tool magazine 31 will be briefly described. When there is a tool change command (M06 command) in the NC program, the CPU 21 (see FIG. 4) of the numerical controller 20 determines the position of the pot P of the next tool T to be changed. The pot P of the current tool is in the tool change position. The CPU 21 calculates the number of times of switching of the tool magazine 31 required until the pot P of the next tool is transported from the current position to the tool change position. The tool changer 30 removes the current tool T from the main shaft. The tool magazine 31 is rotated by the number of times of switching calculated by the CPU 21 when the magazine motor 55 is driven. The next tool T to be mounted on the pot P is located at the tool change position. The tool changer 30 mounts the next tool T on the main shaft.

切替回数の数え方は、工具マガジン31のポットPの位置を、隣のポットPの位置に切り替える回数(以下、「切替回数」という)を「1回」とする。例えば、図3において、ポットP1の工具Tを、ポットP4の工具Tに切り替える場合に必要な切替回数は「3回」である。   The number of times of switching is defined as the number of times that the position of the pot P of the tool magazine 31 is switched to the position of the adjacent pot P (hereinafter referred to as “number of times of switching”). For example, in FIG. 3, the number of times of switching required when the tool T in the pot P1 is switched to the tool T in the pot P4 is “3 times”.

作業者は、ポットP1〜P21の全てに工具Tを装着してもよいが、全ポット数に比べて工具数が少ない場合は、空のポットPを設けてもよい。ポットPの切替回数を少なくするには、工具Tと工具Tとの間は詰めた方が好ましい。   The operator may attach the tool T to all of the pots P1 to P21, but if the number of tools is smaller than the total number of pots, an empty pot P may be provided. In order to reduce the number of times the pot P is switched, it is preferable to close the space between the tool T and the tool T.

次に、数値制御装置20の電気的構成について、図4を参照して説明する。数値制御装置20は、CPU21、ROM22、RAM23及びフラッシュメモリ24を有するマイクロコンピュータと、入力インタフェイス25と、入出力インタフェイス26とを備えている。入力インタフェイス25は、操作パネル10のキーボード12に接続している。   Next, the electrical configuration of the numerical controller 20 will be described with reference to FIG. The numerical controller 20 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 keyboard 12 of the operation panel 10.

入出力インタフェイス26は、X軸モータ51を駆動する駆動回路41と、Y軸モータ52を駆動する駆動回路42と、Z軸モータ53を駆動する駆動回路43と、主軸モータ54を駆動する駆動回路44と、マガジンモータ55を駆動する駆動回路45と、操作パネル10のディスプレイ11を駆動する駆動回路46等に接続している。X軸モータ51及びY軸モータ52の駆動は、テーブル19をX軸方向及びY軸方向に移動する。Z軸モータ53の駆動は、主軸ヘッド(図示省略)をZ軸方向に移動する。   The input / output interface 26 is a drive circuit 41 that drives the X-axis motor 51, a drive circuit 42 that drives the Y-axis motor 52, a drive circuit 43 that drives the Z-axis motor 53, and a drive that drives the spindle motor 54. The circuit 44, a drive circuit 45 that drives the magazine motor 55, a drive circuit 46 that drives the display 11 of the operation panel 10, and the like are connected. Driving of the X-axis motor 51 and the Y-axis motor 52 moves the table 19 in the X-axis direction and the Y-axis direction. The drive of the Z-axis motor 53 moves a spindle head (not shown) in the Z-axis direction.

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

次に、CPU21による工具配置算出処理について、図6、図7のフローチャートを参照して説明する。本実施形態は、図5に示すNCプログラムを実行する場合に、工具マガジン31の切替回数が最も少ない最適工具配置(Qopt)を算出する。図5に示すNCプログラムは、21本の工具Tを29回のステップで順次交換するものである。図5に示すNCプログラムは、説明の便宜上、途中の切削加工のコマンドについては省略している。   Next, the tool placement calculation process by the CPU 21 will be described with reference to the flowcharts of FIGS. In the present embodiment, when the NC program shown in FIG. 5 is executed, the optimum tool arrangement (Qopt) with the smallest number of switching times of the tool magazine 31 is calculated. The NC program shown in FIG. 5 is one in which 21 tools T are sequentially replaced in 29 steps. The NC program shown in FIG. 5 omits intermediate cutting commands for convenience of explanation.

本処理は、作業者が、ディスプレイ11に表示した工具配置計算ボタン(図示省略)を選択すると、CPU21が、ROM22(図4参照)に記憶した工具配置算出プログラム(本発明の「工具配置算出プログラム」に相当)を読み込むことで開始する。   In this process, when the operator selects a tool placement calculation button (not shown) displayed on the display 11, the CPU 21 stores a tool placement calculation program stored in the ROM 22 (see FIG. 4) (“tool placement calculation program of the present invention”). ”).

CPU21は、フラッシュメモリ24に記憶したNCプログラム(図5参照)から工具交換指令を読み込む(S11)。工具交換指令は「M06」である。CPU21は、読み込んだ工具交換指令に基づき、NCプログラムで使用される使用工具の使用順番Lを特定し、RAM23に記憶する。(S12)。図5に示すNCプログラムの例では、工具交換指令のコマンドを含むブロックは29個である。それ故、使用順番Lの情報は、NCプログラムを構成する29のブロックで、21本の工具Tを使用する順番の情報である。   The CPU 21 reads a tool change command from the NC program (see FIG. 5) stored in the flash memory 24 (S11). The tool change command is “M06”. Based on the read tool change command, the CPU 21 specifies the use order L of the tools used in the NC program and stores it in the RAM 23. (S12). In the example of the NC program shown in FIG. 5, there are 29 blocks including a tool change command. Therefore, the information on the usage order L is information on the order in which 21 tools T are used in 29 blocks constituting the NC program.

CPU21は、使用順番Lにおいて、各工具Tの使用回数を計数し、RAM23(図4参照)に記憶する(S13)。図5に示すNCプログラムの例では、各工具Tの使用回数は以下の通りである。
・T1・・・2回
・T2・・・4回
・T5・・・3回
・T6・・・3回
・T3、T4、T7、T8、T9〜T21・・・1回
The CPU 21 counts the number of times each tool T is used in the usage order L and stores it in the RAM 23 (see FIG. 4) (S13). In the example of the NC program shown in FIG. 5, the number of times each tool T is used is as follows.
・ T1 ・ ・ ・ 2 times ・ T2 ・ ・ ・ 4 times ・ T5 ... 3 times ・ T6 ... 3 times ・ T3, T4, T7, T8, T9 to T21 ... 1 time

CPU21は、使用順番Lにおいて、1回のみ使用する「単発工具」が連続する箇所(以下、単発工具連続箇所Miと呼ぶ)を抽出し、記憶する(S15)。図5に示すNCプログラムの例では、単発工具連続箇所Miは、以下の4箇所である。iは、1〜Nの整数である。本実施形態では、N=4である。括弧内は工具番号を示す。
・箇所A{3,4}
・箇所B{7,8}
・箇所C{9,10,11,12,13,14,15,16}
・箇所D{17,18,19,20,21}
CPU21 extracts and memorize | stores the location (henceforth single tool continuous location Mi) where the "single tool" used only once in the order of use L continues (S15). In the example of the NC program shown in FIG. 5, the single tool continuous portion Mi is the following four locations. i is an integer of 1 to N. In this embodiment, N = 4. The tool number is shown in parentheses.
・ Location A {3,4}
・ Location B {7,8}
-Location C {9, 10, 11, 12, 13, 14, 15, 16}
・ Location D {17, 18, 19, 20, 21}

CPU21は、使用順番Lにおいて、単発工具連続箇所Miに含まれない工具Tjを抽出し、RAM23に記憶する(S16)。図5に示すNCプログラムの例では、T1,T2,T5,T6の4本である。jは、1〜Uの整数である。本実施形態では、U=4である。   The CPU 21 extracts a tool Tj that is not included in the single tool continuous portion Mi in the usage order L, and stores it in the RAM 23 (S16). In the example of the NC program shown in FIG. 5, there are four T1, T2, T5, and T6. j is an integer of 1 to U. In this embodiment, U = 4.

CPU21は、順列Wを生成する(S17)。順列Wは、単発工具連続箇所Miを1本の工具とみなして、NCプログラムで使用する工具を一列に並べて生成する。RAM23に記憶している単発工具連続箇所Miは、箇所A〜Dの4カ所である。本実施形態では、箇所A〜Dを仮想工具A〜Dとみなし、T1,T2,T5,T6を仮想工具E〜Hとみなす。CPU21は、8本の仮想工具A〜Hの順列Wの全組合せを生成する。   The CPU 21 generates a permutation W (S17). The permutation W is generated by arranging the tools used in the NC program in a line, considering the single tool continuous portion Mi as one tool. The single tool continuous locations Mi stored in the RAM 23 are four locations A to D. In this embodiment, locations A to D are regarded as virtual tools A to D, and T1, T2, T5, and T6 are regarded as virtual tools E to H. The CPU 21 generates all combinations of the permutations W of the eight virtual tools A to H.

8本の仮想工具の全組合せは、8!=40,320通りである。単発工具連続箇所Miを1本の工具とみなさずに計算した場合には、21本の工具の順列Wの全組合せを生成する必要がある。21本の工具の順列Wの全組合せは、21!≒5×1019通りである。21本の工具の順列Wの全組合せで後述する切替回数を計算する場合、処理量が膨大になるので、処理時間は長くなる。本実施形態は、単発工具連続箇所Miを1本の工具とみなして使用する工具Tの順列Wを生成し、各順列Wを工具配置Qに変換した状態で、切替回数を計算する。それ故、切替回数の計算に係る処理量は格段に減少する。 The total combination of 8 virtual tools is 8! = 40,320. When the single tool continuous portion Mi is calculated without considering it as one tool, it is necessary to generate all combinations of permutations W of 21 tools. All combinations of permutations W of 21 tools are 21! ≈5 × 10 19 ways. When the number of times of switching described later is calculated for all combinations of 21 tool permutations W, the processing amount becomes enormous and the processing time becomes long. In the present embodiment, the permutation W of the tool T used by regarding the single tool continuous portion Mi as one tool is generated, and the number of times of switching is calculated in a state where each permutation W is converted into the tool arrangement Q. Therefore, the amount of processing related to the calculation of the number of switching times is significantly reduced.

CPU21は、切替回数算出処理を実行する(S18)。切替回数算出処理は、生成した順列Wに従って工具Tを配置した場合において、各工具Tを使用順番Lで使用するときに必要なポットPの切替回数Rを算出する。   The CPU 21 executes a switching number calculation process (S18). In the switching frequency calculation process, when the tools T are arranged according to the generated permutation W, the switching frequency R of the pot P required when using each tool T in the usage order L is calculated.

切替回数算出処理について、図7のフローチャートを参照して説明する。CPU21は、順列Wを工具配置Qに変換する(S31)。CPU21は、順列Wにおいて1本の仮想工具とみなした単発配列箇所A〜Dを、単発工具の配列に戻す。単発配列箇所A〜Dにおける単発工具の順番は、RAM23に記憶した使用順番Lに従う。単発配列箇所A〜Dでは、単発工具が連続している。それ故、単発工具の配列は、使用順番Lに従えば、ポットPを隣りの位置に順次切り替えるだけであるので、切替回数を最小にできる。   The switching number calculation process will be described with reference to the flowchart of FIG. The CPU 21 converts the permutation W into the tool arrangement Q (S31). The CPU 21 returns the single arrangement locations A to D regarded as one virtual tool in the permutation W to the single tool arrangement. The order of the single tools in the single array locations A to D follows the order of use L stored in the RAM 23. Single-shot tools are continuous in single-shot arrangement locations A to D. Therefore, according to the order of use of the single-shot tool arrangement, the pot P is simply switched to the adjacent position sequentially, so that the number of switching can be minimized.

例えば、順列W1=ABCDEFGHの工具配置Q1は、以下のようになる。括弧内は工具番号を示す。
・Q1:{3,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,1,2,5,6}
For example, the tool arrangement Q1 of the permutation W1 = ABCDEFGH is as follows. The tool number is shown in parentheses.
Q1: {3,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,1,2,5,6}

CPU21は、最後に使用する工具Tのポット番号(以下、Pbefと呼ぶ)と、最初に使用する工具Tのポット番号(以下、Paftと呼ぶ)とを、RAM23にそれぞれ記憶する(S32)。図5に示すNCプログラムでは、最後に使用する工具Tの番号は21番である。上述の工具配置Q1では、21番の工具Tは、最初から17番目であるので、ポットPの番号は17番である。それ故、Pbefは、「17」となる。最初に使用する工具Tの番号は1番である。上述の工具配置Q1では、1番の工具Tは、最初から18番目であるので、ポットPの番号は18番である。それ故、Paftは、「18」となる。   The CPU 21 stores the pot number of the tool T to be used last (hereinafter referred to as Pbef) and the pot number of the tool T to be used first (hereinafter referred to as Paft) in the RAM 23 (S32). In the NC program shown in FIG. 5, the number of the tool T to be used last is 21. In the above-described tool arrangement Q1, the number 21 tool T is the 17th from the beginning, so the number of the pot P is the number 17. Therefore, Pbef is “17”. The number of the tool T to be used first is number 1. In the above-described tool arrangement Q1, since the first tool T is the 18th from the beginning, the number of the pot P is the 18th. Therefore, Paft is “18”.

CPU21は、PbefとPaftとの差の絶対値を算出し、切替回数CHGとして、RAM23に記憶する(S33)。Pbefは「17」、Paftは「18」であるので、17と18との差の絶対値は1である。それ故、切替回数CHGは1である。   CPU21 calculates the absolute value of the difference of Pbef and Paft, and memorize | stores it in RAM23 as switching frequency CHG (S33). Since Pbef is “17” and Paft is “18”, the absolute value of the difference between 17 and 18 is 1. Therefore, the number of switching times CHG is 1.

CPU21は、切替回数CHGが(全ポット数/2)+1以上であるか否かを判断する(S34)。工具マガジン31の全ポット数は21個である。本処理は、工具マガジン31の位置を切り替える場合に、工具マガジン31を正転するか、反転するかを決定する。工具マガジン31の全ポット数が21個である場合は、(全ポット数/2)+1≒11である。小数点以下は切り捨てる。切替回数CHGが1である場合は、11未満であるので(S34:NO)、CPU21は、算出した切替回数CHGを切替回数Rに設定し、Pbefのポット番号をPaftのポット番号に設定し直す(S36)。切替回数Rは1であり、Pbefは、「18」となる。CPU21は、切替回数R、PbefをRAM23に記憶する。   The CPU 21 determines whether or not the number of switching times CHG is (total number of pots / 2) +1 or more (S34). The total number of pots in the tool magazine 31 is 21. In this process, when the position of the tool magazine 31 is switched, it is determined whether the tool magazine 31 is rotated forward or reversed. When the total number of pots in the tool magazine 31 is 21, (total number of pots / 2) + 1≈11. Truncate after the decimal point. When the switching count CHG is 1, it is less than 11 (S34: NO), so the CPU 21 sets the calculated switching count CHG to the switching count R and resets the Pbef pot number to the Paft pot number. (S36). The number R of times of switching is 1, and Pbef is “18”. The CPU 21 stores the switching count R and Pbef in the RAM 23.

切替回数CHGが11以上であった場合は(S34:YES)、正転するよりも反転した方が切替回数CHGを少なくできる。それ故、反転した場合を考慮するために、CPU21は、全ポット数から切替回数CHGを差し引いた値を、切替回数CHGとして設定し直す(S35)。CPU21は、設定し直した切替回数CHGを切替回数Rに設定し、Pbefのポット番号をPaftのポット番号に設定し直す(S36)。CPU21は、切替回数R、PbefをRAM23に記憶する。   When the number of switching times CHG is 11 or more (S34: YES), the number of switching times CHG can be reduced by reverse rotation rather than forward rotation. Therefore, in order to consider the case of inversion, the CPU 21 resets the value obtained by subtracting the switching number CHG from the total number of pots as the switching number CHG (S35). The CPU 21 sets the reset switching number CHG to the switching number R, and resets the Pbef pot number to the Paft pot number (S36). The CPU 21 stores the switching count R and Pbef in the RAM 23.

CPU21は、RAM23に記憶した計算回数Sを1にする(S37)。CPU21は、計算回数Sが使用順番Lの要素数よりも小さいか否かを判断する(S38)。使用順番Lは、RAM23に記憶している。図5に示すNCプログラムの例では、使用順番Lにおいて、工具Tを29回切り替える。それ故、使用順番Lの要素数は29である。CPU21は、計算回数Sが使用順番Lの要素数に満たないので(S38:YES)、計算回数Sに1を加算する(S39)。計算回数Sは2となる。   The CPU 21 sets the number of calculations S stored in the RAM 23 to 1 (S37). The CPU 21 determines whether or not the number of calculations S is smaller than the number of elements in the usage order L (S38). The usage order L is stored in the RAM 23. In the example of the NC program shown in FIG. 5, the tool T is switched 29 times in the usage order L. Therefore, the number of elements in the usage order L is 29. The CPU 21 adds 1 to the number of calculations S (S39) because the number of calculations S is less than the number of elements in the usage order L (S38: YES). The number of calculations S is 2.

CPU21は、Paftに、使用順番Lの先頭からS番目の工具番号のポット番号を設定し、RAM23に記憶する(S40)。Pbefは、S36で更新している。上述と同様に、CPU21は、PbefとPaftの差の絶対値を算出し、切替回数CHGとしてRAM23に記憶する(S41)。Pbefは「18」である。計算回数Sは2であり、使用順番Lの先頭から2番目の工具番号は2番である。S31で変換した工具配置Q1を参照すると、工具番号2番のポット番号は19番である。PbefとPaftとの差の絶対値は、18と19との差の絶対値である。PbefとPaftとの差の絶対値は1である。CPU21は、切替回数CHGを1として、RAM23に記憶する。   CPU21 sets the pot number of the S-th tool number from the head of the use order L to Paft, and memorize | stores it in RAM23 (S40). Pbef is updated in S36. Similarly to the above, the CPU 21 calculates the absolute value of the difference between Pbef and Paft and stores it in the RAM 23 as the number of switching times CHG (S41). Pbef is “18”. The number of calculations S is 2, and the second tool number from the top of the usage order L is 2. Referring to the tool arrangement Q1 converted in S31, the pot number of the tool number 2 is 19th. The absolute value of the difference between Pbef and Paft is the absolute value of the difference between 18 and 19. The absolute value of the difference between Pbef and Paft is 1. The CPU 21 stores the number of switching times CHG in the RAM 23 as 1.

CPU21は、切替回数CHGが(全ポット数/2)+1以上であるか否かを判断する(S42)。工具マガジン31の全ポット数は21個である。切替回数CHGが1である場合は、(全ポット数/2)+1未満であるので(S42:NO)、CPU21は、RAM23に記憶した切替回数Rに切替回数CHGを加算し、Pbefのポット番号をPaftのポット番号に設定し直す(S44)。それ故、切替回数Rは2となる。Pbefは「19」となる。CPU21は、切替回数R、PbefをRAM23に記憶する。   The CPU 21 determines whether or not the number of switching times CHG is (total number of pots / 2) +1 or more (S42). The total number of pots in the tool magazine 31 is 21. When the switching count CHG is 1, it is less than (total number of pots / 2) +1 (S42: NO), so the CPU 21 adds the switching count CHG to the switching count R stored in the RAM 23, and the Pbef pot number Is reset to the Pot number of Paft (S44). Therefore, the switching count R is 2. Pbef is “19”. The CPU 21 stores the switching count R and Pbef in the RAM 23.

切替回数CHGが、(全ポット数/2)+1以上であった場合は(S42:YES)、正転するよりも反転した方が切替回数CHGを少なくできる。それ故、反転した場合を考慮するために、CPU21は、全ポット数から切替回数CHGを差し引いた値を、切替回数CHGとして設定し直す(S43)。CPU21は、RAM23に記憶した切替回数Rに切替回数CHGを加算し、Pbefのポット番号をPaftのポット番号に設定し直す(S44)。   When the number of switching times CHG is equal to or greater than (total number of pots / 2) +1 (S42: YES), the number of switching times CHG can be reduced by reverse rotation rather than normal rotation. Therefore, in order to consider the case of inversion, the CPU 21 resets the value obtained by subtracting the switching number CHG from the total number of pots as the switching number CHG (S43). The CPU 21 adds the switching count CHG to the switching count R stored in the RAM 23, and resets the Pbef pot number to the Paft pot number (S44).

CPU21は、処理をS38に戻し、計算回数Sが使用順番Lの要素数よりも小さいか否かを判断する(S38)。計算回数Sが使用順番Lの要素数よりも小さい場合は(S38:YES)、上述と同じように、CPU21は、S39〜S44の処理を繰り返す。計算回数Sが使用順番Lの要素数に達した場合は(S38:NO)、RAM23に記憶した切替回数Rが、工具配置Q1の切替回数Rとなる。CPU21は、図6のS18の処理を終了する。   The CPU 21 returns the process to S38, and determines whether or not the number of calculations S is smaller than the number of elements in the usage order L (S38). When the number of calculations S is smaller than the number of elements in the usage order L (S38: YES), the CPU 21 repeats the processes of S39 to S44 as described above. When the calculation count S reaches the number of elements in the usage order L (S38: NO), the switching count R stored in the RAM 23 becomes the switching count R of the tool arrangement Q1. CPU21 complete | finishes the process of S18 of FIG.

図6のS18の処理を終了すると、CPU21は、現時点での工具配置Q1をQoptとして、RAM23に記憶する。CPU21は、工具配置Q1の切替回数RをRoptとして、RAM23に記憶する。CPU21は、工具配置Qについて切替回数Rの計算回数(以下、NUMと呼ぶ)として、RAM23に1を記憶する(S19)。   When the process of S18 in FIG. 6 is finished, the CPU 21 stores the current tool arrangement Q1 as Qopt in the RAM 23. The CPU 21 stores the number of times R of switching the tool arrangement Q1 as Ropt in the RAM 23. CPU21 memorize | stores 1 in RAM23 as the calculation frequency (henceforth NUM) of the switching frequency R about the tool arrangement | positioning Q (S19).

CPU21は、RAM23に記憶したNUMが(N+U)の階乗と異なるか否かを判断する(S20)。本実施形態では、上述したように、Nは、単発工具連続箇所Miの数である。Uは、単発工具連続箇所Miに含まれない工具Tjの本数である。それ故、N=4、U=4である。(N+U)の階乗は、8!であり、40,320である。S20の判断は、40,320通りの工具配置Qの全組合せについて、切替回数Rを計算したか否かについて確認する目的である。   The CPU 21 determines whether or not the NUM stored in the RAM 23 is different from the (N + U) factorial (S20). In the present embodiment, as described above, N is the number of single-shot tool continuous locations Mi. U is the number of tools Tj that are not included in the single tool continuous portion Mi. Therefore, N = 4 and U = 4. The factorial of (N + U) is 8! 40,320. The determination in S20 is to confirm whether or not the number of times of switching R has been calculated for all 40,320 combinations of tool arrangements Q.

RAM23に記憶したNUMが8の階乗に達していない場合(S20:YES)、CPU21は、RAM23に記憶したNUMの値に1を加算する(S21)。CPU21は、次の順列Wを生成する(S22)。CPU21は、生成した次の順列Wの工具配置Q2について上述と同じように切替回数算出処理を実行する(S23)。   When the NUM stored in the RAM 23 has not reached the factorial of 8 (S20: YES), the CPU 21 adds 1 to the value of the NUM stored in the RAM 23 (S21). The CPU 21 generates the next permutation W (S22). The CPU 21 executes the switching number calculation process in the same manner as described above for the generated tool arrangement Q2 of the next permutation W (S23).

S23の切替回数算出処理が終了すると、CPU21は、RAM23に記憶した工具配置Q2についての切替回数Rが、RAM23に記憶した現時点でのRoptよりも小さいか否かを判断する(S24)。工具配置Q2についての切替回数Rが、現時点でのRoptよりも小さい場合(S24:YES)、CPU21は、工具配置Q2をQoptとし、工具配置Q2の切替回数RをRoptとして、RAM23の記憶内容を更新する(S25)。RAM23の記憶内容を更新した後、CPU21は、処理をS20に戻す。工具配置Q2についての切替回数Rが、現時点でのRoptよりも大きい場合(S24:NO)、現時点でのQoptが、切替回数Rの最も少ない最適な工具配置であるので、そのまま何もせず、CPU21は、処理をS20に戻す。   When the switching count calculation process in S23 is completed, the CPU 21 determines whether or not the switching count R for the tool arrangement Q2 stored in the RAM 23 is smaller than the current Ropt stored in the RAM 23 (S24). When the switching count R for the tool placement Q2 is smaller than the current Ropt (S24: YES), the CPU 21 sets the tool placement Q2 as Qopt, sets the switching count R of the tool placement Q2 as Ropt, and stores the contents stored in the RAM 23. Update (S25). After updating the stored contents of the RAM 23, the CPU 21 returns the process to S20. When the switching number R for the tool placement Q2 is larger than the current Ropt (S24: NO), the current Qopt is the optimal tool placement with the smallest number of switching times R. Returns the process to S20.

RAM23に記憶したNUMが8の階乗に達した場合は(S20:NO)、40,320通りの工具配置Qの全組合せについて、切替回数Rを計算したことになる。それ故、RAM23に最終的に記憶したQopt、Roptは、図5に示すNCプログラムを実行する場合の最適な工具配置Qoptであり、最適切替回数Roptである。CPU21は、RAM23に記憶したQopt、Roptの結果を、ディスプレイ11に表示する(S26)。   When the NUM stored in the RAM 23 reaches the factorial of 8 (S20: NO), the number of switching times R is calculated for all combinations of 40,320 tool arrangements Q. Therefore, Qopt and Ropt finally stored in the RAM 23 are the optimum tool arrangement Qopt when the NC program shown in FIG. 5 is executed, and the optimum switching frequency Ropt. The CPU 21 displays the results of Qopt and Ropt stored in the RAM 23 on the display 11 (S26).

図8に示すように、ディスプレイ11は、CPU21の表示指令に基づき、工具配置表50を表示する。工具配置表50は、ポット番号と、該ポット番号に対応する工具番号とを対応付けて示す。本実施形態は、21個のポットPに対して、21本の工具を各々装着する。それ故、工具配置表50は、ポットP1〜21に対して、工具T1〜21を対応して表示する。図5に示す工具配置表50は、本実施形態におけるQoptの結果である。   As shown in FIG. 8, the display 11 displays a tool arrangement table 50 based on a display command from the CPU 21. The tool arrangement table 50 shows a pot number and a tool number corresponding to the pot number in association with each other. In the present embodiment, 21 tools are mounted on 21 pots P, respectively. Therefore, the tool arrangement table 50 displays the tools T1 to 21 corresponding to the pots P1 to P21. A tool arrangement table 50 shown in FIG. 5 is a result of Qopt in the present embodiment.

Qoptでは、ポットP1〜21に対して、工具Tを以下のように配置する。
・Qopt:{2,5,6,7,8,9,10,11,12,13,14,15,16,1,17,18,19,20,21,3,4}
In Qopt, the tool T is arranged as follows with respect to the pots P1 to P21.
Qopt: {2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 17, 18, 19, 20, 21, 3, 4}

工具配置表50の下にはRoptを表示する。本実施形態のRoptは51回である。なお、ポットP1〜21に対して、工具T1〜21を連続して配置した場合、切替回数Rは59回である。   Below the tool arrangement table 50, Ropt is displayed. The Ropt of this embodiment is 51 times. In addition, when the tools T1 to T21 are continuously arranged for the pots P1 to P21, the switching frequency R is 59 times.

作業者は、ディスプレイ11に表示する工具配置表50に従って、工具マガジン31の各ポットPに対して、21本の工具を装着する。それ故、工作機械1は、工具交換に要する時間が最短になるので、切削加工を短時間で行うことができる。   The operator installs 21 tools in each pot P of the tool magazine 31 according to the tool arrangement table 50 displayed on the display 11. Therefore, the machine tool 1 can perform the cutting process in a short time because the time required for the tool change is minimized.

以上の説明において、図6に示すS11の処理を実行するCPU21は本発明の「工具交換指令読込手段」に相当する。S12の処理を実行するCPU21は本発明の「使用順特定手段」に相当する。S15の処理を実行するCPU21は本発明の「配列箇所抽出手段」に相当する。S17,S22の処理を実行するCPU21は本発明の「順列生成手段」に相当する。S18,S23の処理を実行するCPU21は本発明の「切替回数計数手段」に相当する。S24,S25の処理を実行するCPU21は本発明の「最小回数特定手段」に相当する。S26の処理を実行するCPU21は本発明の「配置情報出力手段」に相当する。   In the above description, the CPU 21 that executes the process of S11 shown in FIG. 6 corresponds to the “tool change command reading means” of the present invention. The CPU 21 that executes the process of S12 corresponds to the “use order specifying unit” of the present invention. The CPU 21 that executes the process of S15 corresponds to the “array location extracting means” of the present invention. The CPU 21 that executes the processes of S17 and S22 corresponds to the “permutation generation unit” of the present invention. The CPU 21 that executes the processes of S18 and S23 corresponds to the “switching number counting means” of the present invention. The CPU 21 that executes the processes of S24 and S25 corresponds to the “minimum number specifying means” of the present invention. The CPU 21 that executes the process of S26 corresponds to “arrangement information output means” of the present invention.

以上説明したように、本実施形態の数値制御装置20は、工具交換装置30の工具マガジン31における工具配置について、ポットPの切替回数を最も少なくできる最適工具配置を算出できる。CPU21は、NCプログラムから工具交換指令を読み込み、工具Tの使用順番Lを記憶する。CPU21は、使用順番Lにおいて、NCプログラムの工具の使用順で単発工具が連続する単発工具連続箇所Miを記憶する。CPU21は、単発工具連続箇所Miを1本の仮想工具とみなして、順列Wの全ての組合せを生成する。CPU21は、各順列Wを工具配置Qに変換し、切替回数Rをそれぞれ算出する。即ち、CPU21は、NCプログラムで使用する工具Tの配置の全組合せについて、切替回数Rを算出するのではなく、単発工具連続箇所Miを1本の仮想工具とみなして生成する順列Wの全ての組合せについて、工具配置Qに変換した状態で切替回数Rを算出する。それ故、CPU21は、切替回数Rの計算に係る処理量を格段に減らすことができるので、算出結果を速やかに出力できる。最も少ない切替回数Rの工具配置Qは、工具交換を最も短時間で行うことができる最適工具配置Qoptである。作業者が最適工具配置Qoptに従って工具マガジン31の工具配置を行うことで、工作機械1は、切削加工を短時間で行うことができる。   As described above, the numerical controller 20 according to the present embodiment can calculate the optimum tool arrangement that can minimize the number of times of switching the pot P with respect to the tool arrangement in the tool magazine 31 of the tool changer 30. The CPU 21 reads a tool change command from the NC program and stores the usage order L of the tools T. In the usage order L, the CPU 21 stores a single tool continuous portion Mi where the single tools are continuous in the order of use of the tools of the NC program. The CPU 21 regards the single tool continuous portion Mi as one virtual tool and generates all combinations of the permutations W. CPU21 converts each permutation W into the tool arrangement | positioning Q, and calculates the frequency | count R of switching, respectively. That is, the CPU 21 does not calculate the number of times of switching R for all combinations of the arrangement of the tools T used in the NC program, but considers all the permutations W that are generated by regarding the single tool continuous portion Mi as one virtual tool. For the combination, the number of switching times R is calculated in the state converted into the tool arrangement Q. Therefore, the CPU 21 can remarkably reduce the processing amount related to the calculation of the number of times of switching R, so that the calculation result can be output quickly. The tool placement Q with the smallest number of switching times R is the optimum tool placement Qopt that can perform the tool change in the shortest time. When the operator places the tools in the tool magazine 31 according to the optimum tool placement Qopt, the machine tool 1 can perform cutting in a short time.

なお、本発明の工具配置算出装置は、上記実施形態に限らず、各種の変形が可能なことはいうまでもない。上記実施形態では、数値制御装置20を工具配置算出装置として説明したが、例えば、一般的なPC(パーソナルコンピュータ)であってもよい。作業者は、PCのCPUで算出された最適工具配置Qoptについて、工具配置表50をプリンタで印刷し、印刷された工具配置表を確認しながら、工具マガジン31に工具Tを装着できる。   Needless to say, the tool arrangement calculating apparatus of the present invention is not limited to the above-described embodiment, and various modifications are possible. In the above embodiment, the numerical control device 20 has been described as a tool arrangement calculation device. However, for example, a general PC (personal computer) may be used. The operator can mount the tool T on the tool magazine 31 while printing the tool arrangement table 50 with the printer for the optimum tool arrangement Qopt calculated by the CPU of the PC and checking the printed tool arrangement table.

上記実施形態では、工具マガジン31は21個のポットPを有するものであるが、ポット数については、21個に限定しない。   In the above embodiment, the tool magazine 31 has 21 pots P, but the number of pots is not limited to 21.

上記実施形態では、工具Tの配置は、工具マガジン31を正面から見た場合に、時計回りに配置するが、反時計周りに配置してもよい。反時計周りに配置する場合、図7の切替回数算出処理において、S34のYES、NOと、S42のYES、NOとはそれぞれ逆になる。   In the embodiment described above, the tool T is arranged clockwise when the tool magazine 31 is viewed from the front, but may be arranged counterclockwise. In the case of arranging counterclockwise, in the switching number calculation process of FIG. 7, YES and NO in S34 and YES and NO in S42 are reversed.

1 工作機械
11 ディスプレイ
12 キーボード
20 数値制御装置
21 CPU
23 RAM
30 工具交換装置
31 工具マガジン
P ポット
T 工具
DESCRIPTION OF SYMBOLS 1 Machine tool 11 Display 12 Keyboard 20 Numerical control apparatus 21 CPU
23 RAM
30 Tool changer 31 Tool magazine P Pot T Tool

Claims (4)

工作機械の工具交換装置に回転割り出し可能に設け、正転又は反転する略円盤状の工具マガジンの外周に設けた複数のポットに各々配置する複数の工具の配置を算出する工具配置算出装置であって、
前記工作機械の加工プログラムから工具交換指令を読み込む工具交換指令読込手段と、
当該工具交換指令読込手段が読み込んだ前記工具交換指令に基づき、前記加工プログラムで使用される使用工具の使用順を特定する使用順特定手段と、
当該使用順特定手段が特定した前記使用順において、1回のみ使用する単発工具が連続して並ぶ配列箇所を抽出する配列箇所抽出手段と、
前記配列箇所抽出手段が抽出した前記配列箇所を1本の工具とみなして、前記加工プログラムで使用される工具を一列に並べて得られる順列を生成する順列生成手段と、
当該順列生成手段が算出した前記順列において、前記配列箇所を前記単発工具の配列に戻した状態で、前記使用順に工具を使用した場合に、前記ポットの切り替えに必要な切替回数を計数する切替回数計数手段と、
当該切替回数計数手段によって前記順列毎に計数された複数の前記切替回数の中から、最も少ない切替回数である最小回数を特定する最小回数特定手段と、
当該最小回数特定手段によって特定した前記最小回数に対応する前記順列に基づき、前記ポットに工具を並べた場合の工具配置の情報である配置情報を出力する配置情報出力手段と
を備えたことを特徴とする工具配置算出装置。
A tool placement calculation device that is provided in a tool changer of a machine tool so as to be able to perform rotation indexing and calculates the placement of a plurality of tools that are respectively placed in a plurality of pots provided on the outer periphery of a substantially disk-shaped tool magazine that rotates forward or reverse. And
Tool change command reading means for reading a tool change command from the machining program of the machine tool;
Based on the tool change command read by the tool change command reading means, use order specifying means for specifying the use order of the tools used in the machining program;
In the use order specified by the use order specifying means, array location extracting means for extracting the array locations where single tools that are used only once are continuously arranged; and
A permutation generating means for generating the permutation obtained by arranging the tools used in the machining program in a line, considering the array locations extracted by the array location extracting means as one tool;
In the permutation calculated by the permutation generation means, when the tools are used in the order of use in a state in which the array location is returned to the single tool array, the number of times of switching that counts the number of times of switching required to switch the pot. Counting means;
A minimum number specifying means for specifying a minimum number of switching times among a plurality of the switching times counted for each permutation by the switching number counting means;
And arrangement information output means for outputting arrangement information, which is information of tool arrangement when tools are arranged in the pot, based on the permutation corresponding to the minimum number specified by the minimum number specifying means. A tool placement calculation device.
前記切替回数計数手段は、
前記順列生成手段が算出した前記順列において、前記配列箇所を前記単発工具の使用順である元の配列に戻した状態で、前記使用順に工具を使用した場合に、前記ポットの切り替えに必要な切替回数を、前記順列毎に計数することを特徴とする請求項1に記載の工具配置算出装置。
The switching number counting means includes
In the permutation calculated by the permutation generation means, when the tools are used in the order of use in a state in which the array locations are returned to the original array that is the order of use of the single tool, switching necessary for switching the pot The tool arrangement calculating device according to claim 1, wherein the number of times is counted for each permutation.
工作機械の工具交換装置に回転割り出し可能に設け、正転又は反転する略円盤状の工具マガジンの外周に設けた複数のポットに各々配置する複数の工具の配置を算出する工具配置算出装置の動作を制御する工具配置算出プログラムであって、
コンピュータに、
前記工作機械の加工プログラムから工具交換指令を読み込む工具交換指令読込ステップと、
当該工具交換指令読込ステップにおいて読み込んだ前記工具交換指令に基づき、前記加工プログラムで使用される使用工具の使用順を特定する使用順特定ステップと、
当該使用順特定ステップにおいて特定した前記使用順において、1回のみ使用する単発工具が連続して並ぶ配列箇所を抽出する配列箇所抽出ステップと、
前記配列箇所抽出ステップにおいて抽出した前記配列箇所を1本の工具とみなして、前記加工プログラムで使用される工具を一列に並べて得られる順列を生成する順列算出ステップと、
当該順列算出ステップにおいて算出した前記順列において、前記配列箇所を前記単発工具の配列に戻した状態で、前記使用順に工具を使用した場合に、前記ポットの切り替えに必要な切替回数を計数する切替回数計数ステップと、
当該切替回数計数ステップにおいて前記順列毎に計数された複数の前記切替回数の中から、最も少ない切替回数である最小回数を特定する最小回数特定ステップと、
当該最小回数特定ステップにおいて特定した前記最小回数に対応する前記順列に基づき、前記ポットに工具を並べた場合の工具配置の情報である配置情報を出力する配置情報出力ステップと
を実行させることを特徴とする工具配置算出プログラム。
Operation of the tool placement calculation device for calculating the placement of a plurality of tools respectively arranged in a plurality of pots provided on the outer periphery of a substantially disk-shaped tool magazine that is provided on a tool changer of a machine tool so that it can be rotated and indexed or reversed. A tool placement calculation program for controlling
On the computer,
A tool change command reading step for reading a tool change command from the machining program of the machine tool;
Based on the tool change command read in the tool change command reading step, a use order specifying step for specifying the use order of tools used in the machining program,
In the use order specified in the use order specifying step, an array location extraction step for extracting an array location where single tools that are used only once are continuously arranged; and
A permutation calculation step for generating a permutation obtained by arranging the tools used in the machining program in a row, considering the array locations extracted in the array location extraction step as one tool;
In the permutation calculated in the permutation calculation step, when the tools are used in the order of use in a state where the array location is returned to the single tool array, the number of times of switching that counts the number of times of switching necessary for the pot switching. Counting step;
Among the plurality of switching times counted for each permutation in the switching number counting step, a minimum number specifying step for specifying a minimum number that is the smallest number of switching times;
An arrangement information output step of outputting arrangement information, which is information of tool arrangement when tools are arranged in the pot, based on the permutation corresponding to the minimum number specified in the minimum number specifying step. A tool placement calculation program.
請求項3に記載の工具配置算出プログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium storing the tool arrangement calculation program according to claim 3.
JP2010149542A 2010-06-30 2010-06-30 Tool arrangement computing device, tool arrangement computing program, and storage medium Pending JP2012011492A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2010149542A JP2012011492A (en) 2010-06-30 2010-06-30 Tool arrangement computing device, tool arrangement computing program, and storage medium
CN2011101925523A CN102314160B (en) 2010-06-30 2011-06-29 Tool configuration calculating device and tool configuration calculating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010149542A JP2012011492A (en) 2010-06-30 2010-06-30 Tool arrangement computing device, tool arrangement computing program, and storage medium

Publications (1)

Publication Number Publication Date
JP2012011492A true JP2012011492A (en) 2012-01-19

Family

ID=45427399

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010149542A Pending JP2012011492A (en) 2010-06-30 2010-06-30 Tool arrangement computing device, tool arrangement computing program, and storage medium

Country Status (2)

Country Link
JP (1) JP2012011492A (en)
CN (1) CN102314160B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108297289A (en) * 2018-01-31 2018-07-20 江西博大精机科技有限公司 Graphite machine hilted broadsword pawl passes in and out circular tool magazine and its control method

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016074072A (en) * 2014-10-08 2016-05-12 ファナック株式会社 Control device of machine tool including automatic tool changer
CN113714843A (en) * 2021-09-22 2021-11-30 宜春职业技术学院(宜春市技术工人学校) Manipulator device for hole turning of numerical control tool magazine machine tool

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0623640A (en) * 1992-07-08 1994-02-01 Mitsubishi Materials Corp Method and device for exchanging tool for numerically controlled machine tool
JP2000084774A (en) * 1998-09-07 2000-03-28 Toyoda Mach Works Ltd Machine tool equipped with automatic tool exchanger
JPWO2008010264A1 (en) * 2006-07-18 2009-12-10 三菱電機株式会社 Numerical controller
JP5313557B2 (en) * 2008-06-17 2013-10-09 株式会社森精機製作所 Tool arrangement changing method and apparatus in tool magazine apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108297289A (en) * 2018-01-31 2018-07-20 江西博大精机科技有限公司 Graphite machine hilted broadsword pawl passes in and out circular tool magazine and its control method

Also Published As

Publication number Publication date
CN102314160B (en) 2013-11-27
CN102314160A (en) 2012-01-11

Similar Documents

Publication Publication Date Title
JP5556656B2 (en) Numerical control machine tool, control program, and storage medium
JP6299527B2 (en) Numerical control device and control method
JP5143316B1 (en) Numerical controller
JP2014048761A (en) Numerical control device
JP4706445B2 (en) Machine tool and its tool change method
JP2012011492A (en) Tool arrangement computing device, tool arrangement computing program, and storage medium
WO2015056339A1 (en) Processing machine line
JP2012030294A (en) Tool arrangement calculation device, tool arrangement calculation method, control program, and storage medium
JP5327082B2 (en) Tool arrangement calculation device, control program for tool arrangement calculation device, and storage medium
JPWO2019069426A1 (en) Machine Tools
JP6665645B2 (en) Numerical control device and control method
JP6584593B2 (en) Machine Tools
JP5110021B2 (en) Numerical control device for machine tools
JP2013071203A (en) Numerical control device and control method
JP2017019040A (en) Cutting machine and machining tool determination method
JP2010234449A (en) Tool changer
JP2001018136A (en) Automatic tool changing type machine tool
JP6028573B2 (en) Control system, machine tool, servo motor control device, and position information transmission / reception method
JP6424517B2 (en) Machine Tools
JP5381870B2 (en) Numerical controller
JP6879256B2 (en) Machine tools, control methods and computer programs
JP2021053763A (en) Control device, control method and control program
JPH06126474A (en) Controller in laser beam composite machine
JP2006095627A (en) Machine tool and method of exchanging tool of machine tool
JPH0596433A (en) Manual tool exchange method in machining center