JP2004164485A - Object directional working simulation device - Google Patents
Object directional working simulation device Download PDFInfo
- Publication number
- JP2004164485A JP2004164485A JP2002331943A JP2002331943A JP2004164485A JP 2004164485 A JP2004164485 A JP 2004164485A JP 2002331943 A JP2002331943 A JP 2002331943A JP 2002331943 A JP2002331943 A JP 2002331943A JP 2004164485 A JP2004164485 A JP 2004164485A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- data
- type
- tool
- class
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Numerical Control (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
この発明は、パンチプレス等の板金加工機や、その他の加工機械を数値制御する手続き型言語のNCデータをシミュレーションするオブジェクト指向型加工シミュレーション装置に関する。
【0002】
【従来の技術】
従来より、加工機械を制御するNCデータを、実加工する前にシミュレーションし、加工状況や工具干渉等をチェックし、トラブルを未然に防ぐことが行われている。
従来のC言語を用いた一般的なシミュレーション方法は、NCデータ1行に対して文字列処理し、NC命令を検索した後、あらかじめ容易された関数へ処理を移行し、その関数内で命令特有の処理を行うのが一般的であった。
なお、オブジェクト指向型のソフトウェアをシミュレーションする方法としては、特許文献1に示すものがあるが、手続き型のNCデータをシミュレーションする方法ではない。
【0003】
【特許文献1】
特開平9−22359号公報
【0004】
【発明が解決しようとする課題】
しかし、上記従来のシミュレーション方法では、次のデメリットがある。
a)NC命令が膨大であると、NCデータの1行を検索し、該当する関数へ移行させる上位関数の判断・検索を行う処理が複雑になる。
b)上位関数の判断・検索が複雑になるため、新規のNC命令分岐を挿入するときにバグを誘発する。
c)NC命令は行では完結しないものがあり、複数行に渡る時の上位関数の処理が複雑になる。
d)NC命令同士で干渉し合うものがあり、上位関数の処理にNC命令の関係処理を記述する必要があって、上位関数が複雑になる。
e)NC命令を他社コードへ変換処理する場合も、上位関数による分岐・変換処理が必要となり、複雑になる。
これらの結果、特定の関数に処理が集中し、関数は単純処理のみとなり、効率の悪いプログラムとなる。また、新規NC命令の追加や削除・変更などの際に、他命令への影響を最大限に気をつける必要があり、デバッグとテスト工数に多大の時間を費やしてしまう。
【0005】
この発明の目的は、シミュレーションプログラムのメンテナンス性に優れ、NCデータに対応したNC命令の種別の追加,変更,削除の対応が容易に行える加工シミュレーション装置を提供することである。
この発明の他の目的は、種々の工具を持つパンチプレスに対するシミュレーションに対しても、メンテナンス性に優れたものとすることである。
この発明のさらに他の目的は、メンテナンス性に優れ、NCデータに対応したNC命令の種別の追加,変更,削除の対応が容易に行える加工シミュレーションプログラムを提供することである。
【0006】
【課題を解決するための手段】
この発明のオブジェクト指向型加工シミュレーション装置(1)は、加工機械を数値制御する手続き型言語のNCデータ(6)をシミュレーションする装置であって、NCデータ(6)の命令毎のオブジェクトである命令単位オブジェクト(23)を生成する命令単位オブジェクト生成手段(31)と、生成された命令単位オブジェクト(23)に実行指令を与える管理手段(32)とを備える。
上記命令単位オブジェクト(23)は、自己のNC命令種別のデータと、必要な特有属性データと、上記実行指令に応答して自己のNC命令種別および特有属性データに応じたシミュレーション処理を行う実行メソッドとを有するものである。上記特有属性データは、特にない場合には保有しなくても良い。
上記命令単位オブジェクト生成手段(31)は、NC命令の種別毎にクラス定義された命令種別クラス(33)を有する。これらの命令種別クラス(33)は、渡されたNC命令が自己のNC命令の種別に合致するか否かを判断し、合致する場合に自己のクラスのインスタンスとして上記命令単位オブジェクト(23)を生成するものとする。
なお、この明細書で言う「命令種別クラス」は実際の一つのクラスを示すのではなく、NC命令の種別毎にクラス定義された各クラスを総称して示すものである。
【0007】
この構成の加工シミュレーション装置(1)は、単独のNC命令を関数ではなく、命令単位のオブジェクト(23)として定義したため、性格や振る舞いなど、自分がどのような命令で、どのような処理が行えるかを知るソフトウェア部品として取り扱える。また、命令単位オブジェクト生成手段(31)は、NC命令の種別毎にクラス定義された命令種別クラス(33)を有し、自己のNC命令の種別に合致するか否かを判断して自己生成するものとしたため、膨大なNC命令の中から、自分自信の命令を探し出し、自分自身を生成し、上位オブジェクト(22)等へ自己ポインタを与えることができて、上位オブジェクト(22)が行う複雑な初期処理は不要であり、非常にすっきりとした独立性の高いプログラム構造となる。シミュレーションの実行時にも、管理手段(32)が命令単位オブジェクト(23)に対して「実行」を通知するだけで良い。その後は各命令単位オブジェクト(23)が、自分自身で判断し必要に応じて、例えば加工や,工具交換,移動等のシミュレーション処理を全て自立的に行う。
【0008】
このため、次の各利点が得られる。
a)入力データのNCデータファイルから自己生成型ロジックにより、各命令種別クラス(33)が自立的に自分自身を探し出し、動的メモリ空間に命令単位オブジェクト(23)として自分を作りだすため、プログラムのメンテナンス性が飛躍的に向上する。
b)シミュレーションプログラムの開発が、従来の処理手続き中心から、各命令単位オブジェクト(23)の命令種別クラス(33)の作成に専念できる。
c)独立性が高く、他のソースコードに影響することなく、命令種別クラス(33)の単位での追加・変更・削除が容易に行える。
d)他社形式へのNC命令の変換も、各命令種別クラス(33)の定義により容易に対処できる。
【0009】
この発明は、整理し直すと、オブジェクト指向を利用した自己生成型のシミュレーション装置であることを特徴とする。通常は、オブジェクト指向を用いても、上位オブジェクトが下位オブジェクトを生成して保有するのが一般的である。しかし、この発明の「自己生成型」では、下位の命令単位オブジェクト(正確には命令種別クラス)が自分自身の生成の可否を判断し、さらに必要となれば、自分自身を生成した後、上位オブジェクトへの保有依頼の旨を伝える手法であり、完全な独立手法となっている。
【0010】
この発明において、上記加工機械がパンチプレスである場合に、上記NCデータ(6)に属性データとして記述された工具についてのデータを上記NCデータ(6)から抽出する工具データ抽出手段(34)と、抽出された工具データにおける工具の種別毎のオブジェクトである工具種別オブジェクト(25)を生成する工具種別オブジェクト生成手段(35)とを設けても良い。
この工具種別オブジェクト生成手段(35)は、その工具種別の工具に関するデータとシミュレーション処理時にその工具を作画する作画メソッドとを有するものである。上記命令単位オブジェクト(23)のうち、工具命令の命令単位オブジェクト(23)は、実行メソッドにおけるシミュレーション処理に上記工具種別オブジェクト(25)の作画メソッドを用いるものとする。
パンチプレスでは、種々の工具を持つため、シミュレーション時の作画が煩雑なものとなるが、このような加工機械のミュレーション装置においても、メンテナンス性に優れたものとなる。
【0011】
この発明のオブジェクト指向型加工シミュレーションプログラムは、加工機械を数値制御する手続き型言語のNCデータをシミュレーションするプログラムであって、コンピュータで実行可能なものであり、次の各手順を含む。
すなわち、NCデータ(6)から、このNCデータ(6)の所定区分毎の文字列をデータとして持つ複数のNC1行オブジェクト(22)を生成する手順と、
これらのNC1行オブジェクト(22)の下位のオブジェクトとして、NC1行オブジェクト(22)の持つNCデータの命令毎のオブジェクトである命令単位オブジェクト(23)を生成する手順と、
生成された各命令単位オブジェクト(23)に順次実行指令を与える手順とを含む。
上記命令単位オブジェクト(23)は、自己のNC命令種別のデータと、必要な特有属性データと、上記実行指令に応答して自己のNC命令種別および特有属性データに応じたシミュレーション処理を行う実行メソッドとを有するものである。
上記命令単位オブジェクト(23)を生成する手順は、NC命令の種別毎にクラス定義された各々の命令種別クラス(33)により、上記NC1行オブジェクト(22)から渡されたNC命令が自己のNC命令の種別に合致するか否かを判断し、合致する場合に自己のクラスのインスタンスとして上記命令単位オブジェクト(23)を生成する手順とする。この自己生成の手順は、NC1行オブジェクト(22)の生成の過程で行うようにしても良く、また生成後に行うようにしても良い。
【0012】
【発明の実施の形態】
この発明の一実施形態を図面と共に説明する。図2に示すように、このオブェジェクト指向型の加工シミュレーション装置1は、NCデータ6をシミュレーションする装置であって、コンピュータ2のハードウェアおよびオペレーションシステム(図示せず)と、アプリケーションプログラムとなる加工シミュレーションプログラム3とで構成される。加工シミュレーションプログラム3は、オブェジェクト指向型のプログラムであり、例えばC++言語で記述される。コンピュータ2は、中央処理装置(CPU)等で構成される演算制御部4と、記憶手段5とを有し、記憶手段5の一部の記憶エリアに上記加工シミュレーションプログラム3が記憶される。記憶手段5の他の記憶エリアに、一つまたは複数のNCデータ6がファイル等として記憶される。
NCデータ6は、加工機械を数値制御する手続き型言語のプログラムであり、1行に1命令または複数の関連命令を記述した文字列として記述されている。各NC命令は所定形式のNCコードで記述されている。NCデータ6の制御対象となる加工機械は、パンチプレス,レーザ加工機等の板金加工機械や、旋盤等の工作機械である。
加工シミュレーションプログラム3は、NCデータ6から階層関係のオブジェクト群7を、記憶手段5の一部の記憶エリア5aに作成し、そのオブジェクト群7にシミュレーションの処理を実行させることで、NCデータ6のシミュレーション結果を画面表示装置8に表示させる。画面表示装置8は、液晶表示装置またはCRT等からなる。コンピュータ2には、キーボードや、マウス、その他の入力装置9が備えられている。なお、コンピュータ2は、1台として図示してあるが、ここで言うコンピュータ2は、ネットワークを構成する複数台のコンピュータの集まりであっても良い。
【0013】
図3は、画面表示装置8のシミュレーション時の画面表示例を示す。この例では、画面表示装置8の全体画面の中に、NCデータ画面10と、シミュレーション結果表示画面11と、各種情報画面12とが、別のウィンドウとして表示され、かつ各種のソフトウェアキー13が表示されている。NCデータ画面10にはNCデータ6が文字列で表示される。シミュレーション結果表示画面11にはシミュレーション結果として、加工完了状態または加工途中のワーク等の図が表示される。図示の例は、パンチプレスのNCデータ6のシミュレーション結果例であり、素材となる板金ワークWに、加工された各パンチ孔14の図が重ねて表示してある。パンチ孔14は、この例では連続したスリットを構成するが、1回のパンチ毎のパンチ孔14が示されている。また、パンチプレスにおけるワークWを把持するワークホルダ15の図も表示されている。ソフトウェアキー13は、各種情報画面12に表示させる情報種類の選択等を行う手段であり、加工情報、工具情報、NC情報、実績情報等の別に設けられている。各種情報画面12に表示される情報は、例えば加工情報としてはNCデータ6のプログラム番号,タレット番号、板厚などが表示される。工具情報としてはタレットの各タレット番号の該当箇所に配置された工具の工具番号,工具種類などが表示され、NC情報としては、NCデータ6のファイル更新日時などが表示される。実績情報としてはNCデータ6のシミュレーション回数等が表示される。
【0014】
図1は、このオブェジェクト指向型の加工シミュレーション装置1の概念構成と、この装置1で生成されたオブジェクト群7の階層関係を示す説明図である。まず、各オブジェクトにつき説明し、その後に加工シミュレーション装置1の構成を説明する。
オブジェクト群7の各オブジェクトは、それぞれデータと処理内容であるメソッドとを持つ。オブジェクト群7は、最上位の一つのNCデータオブジェクト21と、その下位の複数のNC1行オブジェクト22と、各NC1行オブジェクト22に対してその下位に一つまたは複数設けられた命令単位オブジェクト23とを有する。NCデータオブジェクト21は、NCデータ6のファイル6Aの全体のデータを有する。NC1行オブジェクト22は、NCデータ6の1行等の所定区分毎に設けられたオブジェクトである。上記所定の区分は原則的には1行であるが、NC命令の種類等により、複数行にわたるものとなっても良い。命令単位オブジェクト23は、各NC1行オブジェクト22の持つNC命令毎に設けられたオブジェクトであり、NC1行オブジェクト22が1つのNC命令のみを持つ場合は1個設けられ、複数の命令を持つ場合はそのNC命令個数だけ設けられる。なお、ここで言う命令単位オブジェクト23の個数には、後述の基底クラスは含めない。命令単位オブジェクト23は、シミュレーションの作画や座標変更等を行う実行メソッドを有するオブジェクトである。その上位のNC1行オブジェクト22およびNCデータオブジェクト21は、命令単位オブジェクト23の生成や管理上の都合で設けられるオブジェクトである。命令単位オブジェクト23は、後述のように自己生成型とされる。
【0015】
オブジェクト群7は、この他にNCデータオブジェクト21と同じ階層のオブジェクトとして、工具データオブジェクト24と、加工情報オブジェクト26とを有し、工具データオブジェクト24の下位に複数の工具種別オブジェクト25を有する。
工具データオブジェクト24は、NCデータ6に属性データとして記述された工具についてのデータをNCデータ6から抽出したものを、データとして持つオブジェクトである。NCデータ6の制御対象となる加工機械がタレット式のパンチプレスの場合、工具についてのデータとして、工具番号、工具自体の形状,サイズ等のデータと、タレット番号(タレットにおける工具の配置場所の番号)と、そのタレット番号の箇所に装備した工具の番号等が保持される。
工具種別オブジェクト25は、個々の工具毎に作成されたオブジェクトであって、個々の工具についての工具番号,形状,サイズ等のデータと、シミュレーション時に画面に表示させる工具作画データ等を持つ。工具データオブジェクト24および工具種別オブジェクト25は、工具を交換しない加工機械(例えばレーザ加工専用機)等の場合は不要である。また、工具交換する加工機械の場合にも、工具に関するデータは、必ずしもオブジェクトとして持つ必要はなく、単なるデータファイルとして持つようにしても良い。工具種別オブジェクト25は、後に命令単位オブジェクト23について説明すると同様に自己生成型とされる。
【0016】
加工情報オブジェクト26は、NCデータ6に属性データとして記述された加工条件等のデータを抽出して持つオブジェクトである。上記加工条件は、パンチプレスの場合、パンチ圧力,ニブリングピッチ等である。加工情報オブジェクト26も、必ずしも設ける必要はなく、単なるファイルとして加工条件等の加工情報を記憶させておいても良い。
なお、工具データオブジェクト24および加工情報オブジェクト26は、NCデータ6に含まれない他のファイル等の情報がシミュレーションに必要な場合、例えばNCデータ6とは別に設けられた工具マスタファイル(図示せず)や、NCデータ6を作成する自動プログラミング装置の持つデータを、それらのファイルや装置から得て保有するものとしても良い。
【0017】
図6は、NC1行オブジェクト22の構造の概念図である。NC1行オブジェクト22は、データとして、NCデータ6の所定区分の文字列(以下「NC1行文字列」と称す)と、下位の命令単位オブジェクト23の記憶場所を識別する情報となるオブジェクトポインタとを持つ。この他に、データとして、上記NC1行文字列の行ナンバーと、そのNC1行文字列の命令固有の情報を持つ。この固有の情報は、タレット型のパンチプレスである場合、タレット番号、ニブリングの有無、現在位置データ等である。レーザ・パンチ複合型のタレット式パンチプレスでは、パンチ加工とレーザ加工の区別のモード等の情報が含まれる。
NC1行オブジェクト22のメソッドには、上位のNCデータオブジェクト21から受けた実行指令を伝達する伝達メソッドが設けられる。この伝達メソッドは、下位の各命令単位オブジェクト23に実行指令を順次伝達し、各下位の命令単位オブジェクト23の実行の完了応答によって次のNC1行オブジェクト22に実行指令を伝達するものである。
【0018】
図7は、命令単位オブジェクト23の構造の概念図である。命令単位オブジェクト23は、NC命令毎に設けられたものであるため、NC命令の種別毎に若干違った内容のものとなる。命令単位オブジェクト23は、データとして、NC命令の種別と、そのNC命令の特有の属性と、上記のNC1行オブジェクト22のポインタとを持つ。NC命令は、NCコードの文字列として記述されており、パンチプレスの場合、工具指令であるTコードや、X軸方向の移動指令であるXコードや、回転割出するインデックスツールの回転角度の指令であるCコードや、同じ工具で直線的に複数箇所を順次打ち抜く命令であるRECコード等がある。上記のNC命令の特有の属性として、Tコードの場合はタレット51(図14(A))の工具配置位置であるタレット番号Tn、Cコードの場合はインデックスツール52(同図(C))の角度θがある。RECコードの場合は方向(前後左右),加工長L(同図(B)),工具長a,送りピッチp等のデータがあり、Xコードの場合は移動量x(同図(D))がある。命令単位オブジェクト23の持つデータとして、上記の他に、NCデータ6の形式を示すコードや、注意書き(例えば、相性の悪いNC命令等)がある。
命令単位オブジェクト23は、メソッドとしては、与えられた実行指令に応答して所定のシミュレーションの処理を実行メソッドを持つ。実行メソッドは、NC命令の種別によって異なり、例えばパンチ指令(RECコード等)の場合は作画の処理、移動指令(Xコード等)の場合は現在座標の変更、工具指令(Tコード)の場合はタレットの割出回転等の処理を行うメソッドである。
【0019】
図1のNCデータオブジェクト21は、図示を省略するが、上記のようにデータとしては、NCデータ6の全体を持ち、メソッドとしては、入力装置9(図2)等から与えられる実行指令の入力に応じて、各NC1行オブジェクト22に実行の指令を与えるメソッドを持つ。
【0020】
図1と共に、加工シミュレーション装置1の構成を説明する。この加工シミュレーション装置1は、NCデータ6の命令毎のオブジェクトである命令単位オブジェクト23を生成する命令単位オブジェクト生成手段31と、生成された命令単位オブジェクト23に実行指令を与える管理手段32とを備える。
命令単位オブジェクト生成手段31は、NC命令の種別毎にクラス定義された複数の命令種別クラス33を有する。これらの命令種別クラス33は、渡されたNC命令が自己のNC命令の種別に合致するか否かを判断し、合致する場合に自己のクラスのインスタンスとして上記命令単位オブジェクト23を生成するものである。インスタンスは、クラスに実体を持たせたものである。命令種別クラス33は、NC命令の種類の個数だけ設けられる。
【0021】
加工シミュレーション装置1は、この他に工具データ抽出手段34と、工具種別オブジェクト生成手段35と、加工情報オブジェクト生成手段36とを有する。工具データ抽出手段34は、NCデータ6に属性データとして記述された工具についてのデータを上記NCデータ6から抽出する手段であり、具体的には上記工具データオブジェクト24を生成するものとされる。工具種別オブジェクト生成手段35は、工具データ抽出手段34により抽出された工具データにおける工具の種別毎のオブジェクトである工具種別オブジェクト25を生成する手段である。工具種別オブジェクト生成手段35は、この例では、工具種別オブジェクト25を、命令単位オブジェクト23の生成手法と同様な手法で自己生成させるものとしてある。工具種別オブジェクト25は、その工具種別の工具に関するデータとシミュレーション処理時にその工具を作画する作画メソッドとを有するものである。上記命令単位オブジェクト23のうち、工具命令の命令単位オブジェクト23は、実行メソッドにおけるシミュレーション処理に工具種別オブジェクト25の作画メソッドを用いるものとしている。
【0022】
図4は、管理手段32および命令単位オブジェクト生成手段31の具体例を示す。管理手段32は、管理部37とNCデータオブジェクト生成部38を有し、NCデータオブジェクト生成部38は図1のNCデータオブジェクト21を生成する。管理手段32は、この他に、工具データオブジェクト24および加工情報オブジェクト26を生成する各最上位オブジェクト生成部(図示せず)を有する。管理部37は、オペレータの入力に対する処理等を行う手段であり、どのNCデータ6のシミュレーションを行うかの選択、およびオブジェクト作成開始の指令を受け、NCデータオブジェクト生成部38等に、選択されたNCデータ6のオブジェクト群7の作成を開始させる。また、作成されたオブジェクト群7に対して、シミュレーションの実行指令を伝える。この実行指令は、作成されたNCデータオブジェクト21から順次下位のオブジェクトに伝えられることになる。
【0023】
命令単位オブジェクト生成手段31は、NC1行オブジェクト22を生成するNC1行オブジェクト生成部39と、命令単位オブジェクト23を生成する命令単位オブジェクト生成部40とを有する。
【0024】
図5に示すように、NC1行オブジェクト生成部39は、クラス定義された一つのNC1行クラス41を有する。NC1行オブジェクト生成部39は、NC1行クラス41にNCデータ6の1行文字列等のデータを引数等として与え、NC1行クラス41のインスタンスとしてNC1行オブジェクト22(図1)を生成する手段である。NC1行オブジェクト生成部39は、上位の管理手段32(図4)の管理に従って、NC1行オブジェクト22の生成を行う。NC1行クラス41は、具体的には図10に流れ図で示す手順の処理を行うメソッドを有している。
【0025】
命令単位オブジェクト生成部40は、命令種別クラス33に属するクラスとして、基底クラスである命令種別基底クラス33aと、この命令種別基底クラス33aの派生クラスとして定義された複数の命令種別毎のクラス33bを有する。命令種別毎のクラス33bは、命令種別の数だけ設けられる。なお、この明細書で言う「命令種別クラス33」は、実際のクラスではなく、上記命令種別基底クラス33aと、その各派生クラスである命令種別毎のクラス33bとを総称したものを示す。
命令種別基底クラス33aは、各命令種別毎のクラス33bに共通のメンバを持つクラスであり、このクラス33aのインスタンスは生成しない。命令種別毎のクラス33bは、命令種別基底クラス33aとの差分となるデータおよびメソッドを定義したものであり、命令種別基底クラス33aのデータおよびメソッドの全てを承継し、これに差分となるデータおよびメソッドが追加された内容をもつものとなる。
【0026】
各命令種別毎のクラス33bは、データとして自己特徴のデータを有し、メソッドとして、自己識別関数と、自己生成メソッドと、実行メソッドとを有する。自己特徴のデータは、そのクラス33bがどのNC命令(例えば、Tコード、Xコード、Cコード、RECコード、…)であるかを示すデータである。
自己識別関数は、引数として渡されたデータが、自己特徴を示すデータに一致するか否かを判断する関数である。
自己生成メソッドは、自己識別関数により自己特徴と一致すると判断された場合に、その命令種別のクラス33bに対して、NCデータの内容を持つインスタンスとして命令単位オブジェクト23を生成するメソッドである。
実行メソッドは、命令単位オブジェクト23について説明した内容と同じであり、NC命令の種別によって異なる。説明が重複するが、実行メソッドは、例えばパンチ指令(RECコード等)のクラスの場合は作画の処理、移動指令(Xコード等)のクラスの場合は現在座標の変更、工具指令(Tコード)のクラスの場合はタレットの割出回転等の処理を行うメソッドとされる。
【0027】
図12に示すように、各命令種別毎のクラス33bの自己識別関数は、一つの自己識別関数テーブル42にその関数名が列挙される。関数名は、クラス名と関数名とを併記することで、各クラス特有の関数名とされる。自己識別関数テーブル42は、静的メソッド関数テーブルとされる。
【0028】
次に、上記構成の加工シミュレーション装置1によりオブジェクト群7を生成する過程、および作成されたオブジェクト群によりシミュレーションを実行する過程を、図8〜図11の流れ図に従って説明する。
図8は全体処理の流れを示す。オペレータの入力により、加工シミュレーションプログラム5を起動させると(ステップS1)、管理手段32(図1,図4)の処理により、NCデータ6のファイル6Aが選択可能な状態となる。この状態で、希望のNCデータ6のファイル6Aを選択し、オブジェクト作成の指令を入力すると(S2)、まずNCデータオブジェクト21が生成され(S3)、その後に各NC1行オブジェクト22が順次生成される(S4)。各NC1行オブジェクト22の生成の過程で、その下位に属する命令単位オブジェクト23が生成される。このようにして、階層構造のオブジェクト群7が生成される。なお、上記のオブジェクト作成の指令の入力により、図1の工具データオブジェクト24、工具種別オブジェクト25、および加工情報オブジェクト26も生成される。これらのオブジェクト25,26の生成は、NC1行オブジェクト22の生成の前後のいずれであっても、同時であっても良い。
このようにオブジェクト群7が生成されると、管理手段32がその生成完了を認識してシミュレーションの実行指令を与える。この実行指令は、管理手段32に対するオペレータの操作によって与えるようにしても良い。
【0029】
図9は、NC1行オブジェクト22の作成の過程を示す。図5のNC1行オブジェクト生成部39により、NCデータオブジェクト21のデータとして持つNCデータ6から、1行の文字列を抽出し、NC1行クラス41に引数として与える(ステップR1)。これにより、NC1行クラス41を、そのクラスのインスタンス、つまり実体のあるオブジェクトとしたNC1行オブジェクト22が生成される(R2)。このNC1行オブジェクト22の生成過程で、下位の命令単位毎のクラス33b(図5)に命令単位オブジェクト23を自己生成させ、その自己生成された命令単位オブジェクト23を、NC1行オブジェクト22の持つ配列要素に追加する。これにより一つのNC1行オブジェクト22が完成する。
ついで、NCデータ6の文字列の行ナンバーを示す行カウンタをデクリメントし(またはインクリメントし)(R3)、最終行か否かの判定を行う(R4)。最終行でなければ、NCデータ6の次の1行の文字列を抽出し、上記と同様にしてNC1行オブジェクト22を生成する。このような処理を繰り返し、NCデータ6の全ての行について、NC1行オブジェクト22を生成する。
【0030】
図10は、NC1行クラス41により、その生成過程で、下位クラス33b(図5)へ命令単位オブジェクト23の自己生成の指令を行い、配列要素へ追加する手順を示す。
概要を先に説明すると、自己生成は、自己識別関数テーブル42(図12)に列挙された自己識別関数を順に実行して該当クラスに自己識別させ、自己特徴と一致する場合に行われる。自己識別関数は、全ての命令種別のクラス33bについて個別に設けられた関数であり、引数と自己特徴を比較して自己識別する。
ステップ順に説明する。NC1行クラス41のメソッドは、自己識別関数テーブル42(図12)の配列値を初期化し(ステップQ1)、該当配列値の自己識別関数を読み込む(Q2)。配列値からテーブル終端か否かを判断し(Q3)、終端でなければ以下の処理Q4〜Q10を進める。次のステップQ4,Q5については詳細処理であるため、後に説明する。ステップQ6において、上記の読み込んだ自己識別関数をコールする。
【0031】
このコールにより、図11に示すように、その自己識別関数を持つ命令種別のクラス33bでは、自己識別関数を実行し、引数であるNC命令が自己特徴と一致するか否かを判断する(U2)。一致しない場合は、不一致の返答をNC1行クラス41に返し、オブジェクトの生成は行わない。一致する場合は、その命令種別のクラス33bのインスタンスとなる命令単位オブジェクト23を、そのクラス33bの持つ自己生成メソッドによって自己生成し、一致の返答をNC1行クラス41に返す。
具体例で説明すると、読み出された自己識別関数が、工具命令(Tコード)クラスの自己識別関数であったとする。この場合、工具命令のクラスがその自己識別関数を実行することになる。このとき、工具命令クラスには、NC1行の文字列が引数として渡されていて、その文字列の示す命令がX方向の移動指令(Xコード)であったとする。そうすると、自己識別関数を実行している工具命令のクラスは、自己特徴である工具命令と引数である移動指令とが一致しないため、不一致の返答を返し、インスタンスとなるオブジェクトを生成しない。引数が工具命令である場合は、自己特徴と一致するため、工具命令のクラスのインスタンスとなる命令単位オブジェクト23を生成し、一致の返答をNC1行クラス41に返す。
【0032】
図10のステップQ7では、命令種別のクラス33bから返される返答を判断し、自己特徴と不一致の返答の場合は、次の自己識別関数の読み込み(Q10,Q2)に進む。自己特徴と一致の返答の場合は、NC1行オブジェクト22の保有する配列要素に、その自己生成された命令単位オブジェクト23を追加し(Q8)、配列値を初期化した後に(Q9)、次の自己識別関数の読み込み(Q2)に進む。
【0033】
このような処理を、自己識別関数テーブル42の終端の自己識別関数まで繰り返す。したがって、NC1行オブジェクト22は、引数に該当する命令単位オブジェクト23を保有することになる。
具体例で説明すると、NC1行クラス41に引数として渡されたNC命令が工具命令であったとする。その場合、自己識別関数テーブル42に列挙された自己識別関数が順次コールされ、その自己識別関数に該当する命令種別のクラス33bで自己識別関数を実行することになるが、コールされた自己識別関数に対応する命令種別のクラス33bが移動命令のクラスであった場合は、自己特徴に一致しないため、不一致の返答がなされ、次の自己識別関数がコールされる。次の自己識別関数も工具命令以外のNC命令、例えばC軸命令であったとすると、不一致の返答がなされ、さらに次の自己識別関数がコールされる。このようにして自己識別関数テーブル42の自己識別関数が順次コールされ、工具命令の自己識別関数がコールされると、引数である工具命令が工具命令のクラス33bの自己特徴と一致することになり、その工具命令のクラス33bの命令単位オブジェクト23が自己生成される。また、その自己生成された命令単位オブジェクト23が、NC1行クラス41のインスタンスであるNC1行オブジェクト22に配列要素として保有されることになる。
【0034】
図10のステップQ4,Q5の処理は、引数とされたNC1行文字列が複数の命令を含む場合にも対処可能とするための処理を示す。図13の具体例と共に説明する。
引数のNC1行文字列が、NC命令として、「REC/100」の命令と、「T0」の命令と、「M0」の命令を含む「REC/100 T0 M0」であったとする。なお、ここでNCコードで示した「REC/100」等の命令は、仮に示したコードであり、その内容は何であっても良い。
ステップQ4では、自己識別関数テーブル42における一つ前の自己識別関数の読み出し時に、自己特徴と一致するとして命令単位オブジェクト23が自己生成された場合に、その自己生成された命令の文字列を引数から引く処理を行う。その結果、図13の例では、残された文字列は「T0 M0」となり、2つのNC命令が残ることになる。なお、1行文字列に複数のNC命令を含む場合、その1行中の最先のNC命令から自己識別,自己生成が行われる。
ステップQ5では、文字列が残っているか否かを判別し、残っていない場合はそのNC1行クラス41の処理を終了する。図13の例では、まだ文字列「T0M0」が残っているため、処理が続けられることになる。
ついで、文字列「T0」のNC命令の命令単位オブジェクト23が自己生成されると、その文字列「T0」が次の繰り返し過程のステップQ4で引かれ、「M0」が残る。文字列「M0」のNC命令の命令単位オブジェクト23が自己生成されると、文字列は0となるため、ステップQ5からNC1行クラス41の処理の終了となる。
このようにして、1行文字列が「REC/100 T0 M0」のNC1行オブジェクト22は、その配列要素として、「REC/100」の命令単位オブジェクト23と、「T0」の命令単位オブジェクト23と、「M0」の命令単位オブジェクト23との3つの命令単位オブジェクト23を保有することになる。
このように、1行文字列に含まれる命令個数にかかわらず、命令単位オブジェクト23の自己生成が行える。1行文字列に含まれるNC命令が一つである場合は、自己生成されると、次の繰り返し過程で文字列が0となるため、そこで処理が終了することになる。
【0035】
シミュレーションの実行、つまりオブジェクト群7の生成後のシミュレーションの実行は、オブジェクト群7の生成の完了が管理手段32が認識することで、または管理手段32にオペレータ等が実行の指令を与えることで、管理手段32が実行命令を与えることにより行われる。この実行命令は、NCデータオブジェクト21から、最初のNC1行オブジェクト22に伝えられ、その下位の最初の命令単位オブジェクト23に伝えられる。命令単位オブジェクト23は、実行完了をNC1行オブジェクト22に返し、NC1行オブジェクト22は次の命令単位オブジェクト23に実行命令を伝える。次の命令単位オブジェクト23がない場合は、次のNC1行オブジェクト22に実行命令が伝えられる。このようにして、命令単位オブジェクト23が生成された順に実行命令が伝えられる。
各命令単位オブジェクト23は、実行命令によって、その命令単位オブジェクト23の独自の実行メソッドを実行する。例えば、作画や、現在座標の移動、工具の交換(タレットの割出回転)等を行う。その結果、図3のように、NCデータ6の実行結果の図が画面表示装置8のシミュレーション結果画面11に表示される。オペレータは、この画面表示内容を見て、NCデータ6の不具合を発見することができる。
【0036】
なお、上記の説明では省略したが、より具体的には、例えば各NC1行オブジェクト22は、下位のオブジェクトとして、命令種別基底クラス33a(図5)であるオブジェクトと、その派生クラスとなるいずれかの命令種別のクラス33bをインスタンスとした一つまたは複数の命令単位オブジェクト23を持つものとされる。オブジェクト群の作成時に,命令種別基底クラス33a自体を明示的に作成することはしていないが、派生クラス33bには基底クラスから性質を受け継ぐことを宣言しているので、例えば派生クラスのインスタンスの生成により、基底クラス33aを持つことになる。実行過程では、例えば、まず命令種別基底クラス33a(図5)のオブジェクトに実行命令が伝えられるが、命令種別基底クラス33aは実行メソッドの具体的内容がなく、具体的なシミュレーションの処理は行わない。
【0037】
この加工シミュレーション装置1は、このように、オブジェクト指向を利用した自己生成型とし、命令単位オブジェクト23を自己生成するものとしたため、シミュレーションプログラム5のメンテナンス性に優れ、NCデータ5に対応したNC命令の種別の追加,変更,削除の対応が容易に行える。例えば、NC命令の追加,変更,削除に対応して、命令種別のクラス33bと自己識別関数テーブル42の自己識別関数を追加,変更,削除するだけで、他に影響を与えずに対処することができる。
【0038】
上記の説明は、加工シミュレーション装置1の観点から行ったが、この発明は加工シミュレーションプログラム5の発明としても捕らえることができる。
この加工シミュレーションプログラム5は、加工機械を数値制御する手続き型言語のNCデータ6をシミュレーションする、コンピュータで実行可能なプログラムであって、NCデータ6から、このNCデータ6の所定区分毎の文字列をデータとして持つ複数のNC1行オブジェクト22を生成する手順と、これらのNC1行オブジェクト22の下位のオブジェクトとして、NC1行オブジェクト22の持つNCデータの命令毎のオブジェクトである命令単位オブジェクト23を生成する手順と、生成された各命令単位オブジェクト23に順次実行指令を与える手順とを含む。
上記命令単位オブジェクト23は、自己のNC命令種別のデータと、必要な特有属性データと、上記実行指令に応答して自己のNC命令種別および特有属性データに応じたシミュレーション処理を行う実行メソッドとを有するものである。
命令単位オブジェクト23を生成する手順は、NC命令の種別毎にクラス定義された各々の命令種別クラス33により、上記NC1行オブジェクト22から渡されたNC命令が自己のNC命令の種別に合致するか否かを判断し、合致する場合に自己のクラスのインスタンスとして上記命令単位オブジェクト23を生成する手順とする。
命令単位オブジェクト23を生成する手順は、この実施形態では、NC1行オブジェクト22を生成する手順の途中で行われるが、NC1行オブジェクト22の生成の後に行うようにしても良い。
【0039】
【発明の効果】
この発明の加工シミュレーション装置は、オブジェクト指向を利用した自己生成型のシミュレーション装置とし、命令単位のオブジェクトを自己生成するものとしたため、シミュレーションプログラムのメンテナンス性に優れ、NCデータに対応したNC命令の種別の追加,変更,削除の対応が容易に行える。
パンチプレスのNCデータに対応するものとし、工具種別オブジェクト生成手段とを設けた場合は、種々の工具を持つパンチプレスに対するシミュレーションに対しても、メンテナンス性に優れたものとなる。
この発明の加工シミュレーションプログラムは、オブジェクト指向を利用した自己生成型のシミュレーションプログラムとし、命令単位のオブジェクトを自己生成するものとしたため、メンテナンス性に優れ、NCデータに対応したNC命令の種別の追加,変更,削除の対応が容易に行える。
【図面の簡単な説明】
【図1】この発明の一実施形態にかかるオブェジェクト指向型加工シミュレーション装置とその生成されたオブジェクト群の階層関係を示す概念構成図である。
【図2】同加工シミュレーション装置のハードウェア構成例の概略説明図である。
【図3】同加工シミュレーション装置における画面表示装置の画面例の説明図である。
【図4】同加工シミュレーション装置の管理手段と命令単位オブジェクト生成手段の概念構成のブロック図である。
【図5】同加工シミュレーション装置の命令単位オブジェクト生成手段の概念構成の詳細のブロック図である。
【図6】NC1行オブジェクトの概念構成の説明図である。
【図7】命令単位オブジェクトの概念構成の説明図である。
【図8】同加工シミュレーション装置の全体処理の概略を示す流れ図である。
【図9】そのNC1行オブジェクトの生成過程を示す流れ図である。
【図10】そのNC1行オブジェクトによる命令種別クラスへの自己生成の指令と、その形成されたオブジェクトの保有の処理を示す流れ図である。
【図11】命令種別クラスの自己生成過程の流れ図である。
【図12】自己識別関数テーブルの説明図である。
【図13】1行文字列から自己生成された文字列を引く処理の説明図である。
【図14】パンチプレスの各部の構成および動作の説明図である。
【符号の説明】
1…加工シミュレーション装置
2…コンピュータ
3…加工シミュレーションプログラム
6…NCデータ
7…オブジェクト群
8…画面表示装置
21…NCデータオブジェクト
22…NC1行オブジェクト
23…命令単位オブジェクト
24…工具データオブジェクト
25…工具種別オブジェクト
31…命令単位オブジェクト生成手段
32…管理手段
33…命令種別クラス
33a…命令種別基底クラス
33b…命令種別毎のクラス
34…工具データ抽出手段
35…工具種別オブジェクト生成手段
36…加工情報オブジェクト生成手段
41…NC1行クラス
42…自己識別関数テーブル[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an object-oriented processing simulation apparatus that simulates procedural language NC data for numerically controlling a sheet metal processing machine such as a punch press and other processing machines.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, NC data for controlling a processing machine is simulated before actual processing, a processing state, tool interference, and the like are checked to prevent a trouble before it occurs.
In a general simulation method using the conventional C language, a character string processing is performed on one line of NC data, and after searching for an NC instruction, the processing is shifted to a function that is facilitated in advance, and an instruction specific within the function is performed. Was generally performed.
As a method of simulating object-oriented software, there is a method disclosed in
[0003]
[Patent Document 1]
JP-A-9-22359
[0004]
[Problems to be solved by the invention]
However, the conventional simulation method has the following disadvantages.
a) If the number of NC instructions is enormous, the process of searching one line of NC data and determining and searching for a higher-level function to be shifted to the corresponding function becomes complicated.
b) A bug is induced when a new NC instruction branch is inserted, because the determination and search of the upper function becomes complicated.
c) Some NC instructions are not completed on a line, which complicates the processing of the upper-level function when the instruction extends over a plurality of lines.
d) Some NC instructions interfere with each other, and it is necessary to describe the processing related to the NC instructions in the processing of the upper function, which complicates the upper function.
e) When converting the NC instruction into another company's code, the branching / conversion processing by the upper-level function is required, which is complicated.
As a result, the processing is concentrated on a specific function, and the function becomes only a simple processing, resulting in an inefficient program. In addition, when adding, deleting, or changing a new NC instruction, it is necessary to pay maximum attention to the effect on other instructions, and a great deal of time is spent on debugging and test man-hours.
[0005]
An object of the present invention is to provide a machining simulation apparatus which is excellent in maintainability of a simulation program and can easily add, change, and delete types of NC commands corresponding to NC data.
Another object of the present invention is to provide an excellent maintainability even for a simulation of a punch press having various tools.
Still another object of the present invention is to provide a machining simulation program which is excellent in maintainability and can easily add, change, and delete types of NC commands corresponding to NC data.
[0006]
[Means for Solving the Problems]
An object-oriented machining simulation device (1) of the present invention is a device for simulating NC data (6) of a procedural language for numerically controlling a machining machine, and includes an instruction which is an object for each instruction of the NC data (6). An instruction unit object generating unit (31) for generating a unit object (23) and a managing unit (32) for giving an execution instruction to the generated instruction unit object (23) are provided.
The instruction unit object (23) is an execution method for performing a simulation process in accordance with its own NC instruction type and specific attribute data in response to the execution instruction in response to the execution command. And The specific attribute data need not be held unless otherwise specified.
The instruction unit object generating means (31) has an instruction type class (33) defined for each type of NC instruction. These instruction type classes (33) determine whether or not the passed NC instruction matches the type of the own NC instruction, and if they match, the instruction unit object (23) is used as an instance of the own class. Shall be generated.
It should be noted that the "instruction type class" referred to in this specification does not indicate one actual class, but generically indicates each class defined for each type of NC instruction.
[0007]
Since the machining simulation apparatus (1) having this configuration defines a single NC instruction as an object (23) in instruction units, not as a function, the processing simulation apparatus (1) can perform what kind of processing with what kind of instruction such as personality and behavior. It can be handled as a software component to know The instruction-based object generating means (31) has an instruction type class (33) defined for each type of NC instruction, and determines whether or not the instruction type matches its own NC instruction type. Therefore, it is possible to search for an instruction of its own from a huge number of NC instructions, generate its own, and give a self-pointer to an upper object (22) and the like, and perform complicated operations performed by the upper object (22). No initial processing is required, resulting in a very clean and highly independent program structure. At the time of executing the simulation, the management means (32) only needs to notify the "execution" to the instruction unit object (23). After that, each command unit object (23) judges by itself and performs all the simulation processing such as machining, tool change, movement, etc., as needed, independently.
[0008]
Therefore, the following advantages can be obtained.
a) Each instruction type class (33) autonomously searches for itself by the self-generated logic from the NC data file of the input data and creates itself as an instruction unit object (23) in the dynamic memory space. Dramatically improves maintainability.
b) The development of the simulation program can be concentrated on the creation of the instruction type class (33) of each instruction unit object (23) from the conventional processing procedure.
c) It is highly independent and can easily be added, changed, or deleted in units of the instruction type class (33) without affecting other source codes.
d) The conversion of the NC instruction to another company's format can be easily dealt with by defining each instruction type class (33).
[0009]
The present invention, when rearranged, is characterized in that it is a self-generated simulation device using object orientation. Normally, even when the object orientation is used, it is general that a higher-level object generates and holds a lower-level object. However, in the "self-generating type" of the present invention, a lower-order instruction unit object (more precisely, an instruction type class) determines whether or not it can generate itself, and if necessary, generates its own, This is a method of notifying a request to hold an object, and it is a completely independent method.
[0010]
In the present invention, when the processing machine is a punch press, tool data extracting means (34) for extracting data on the tool described as attribute data in the NC data (6) from the NC data (6); Tool type object generating means (35) for generating a tool type object (25) which is an object for each tool type in the extracted tool data.
The tool type object generating means (35) has data relating to the tool of the tool type and a drawing method for drawing the tool during the simulation processing. Among the command unit objects (23), the command unit object (23) of the tool command uses the drawing method of the tool type object (25) for the simulation processing in the execution method.
In a punch press, since various tools are used, drawing during simulation is complicated. However, even a simulation device of such a processing machine has excellent maintainability.
[0011]
An object-oriented machining simulation program according to the present invention is a program for simulating procedural language NC data for numerically controlling a machining machine, which can be executed by a computer, and includes the following procedures.
That is, from the NC data (6), a procedure for generating a plurality of NC1 line objects (22) having a character string for each predetermined section of the NC data (6) as data;
A procedure for generating an instruction unit object (23) which is an object for each instruction of the NC data possessed by the NC1 line object (22) as a lower object of the NC1 line object (22);
Sequentially giving an execution instruction to each generated instruction unit object (23).
The instruction unit object (23) is an execution method for performing a simulation process in accordance with its own NC instruction type and specific attribute data in response to the execution instruction in response to the execution command. And
The procedure for generating the instruction unit object (23) is as follows. According to each instruction type class (33) defined for each type of NC instruction, the NC instruction passed from the NC1 row object (22) is It is determined whether the instruction type matches the instruction type, and if the instruction type matches, the instruction unit object (23) is generated as an instance of its own class. This self-generation procedure may be performed in the process of generating the NC1 row object (22), or may be performed after the generation.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
An embodiment of the present invention will be described with reference to the drawings. As shown in FIG. 2, the object-oriented
The
The
[0013]
FIG. 3 shows a screen display example of the screen display device 8 at the time of simulation. In this example, an NC data screen 10, a simulation
[0014]
FIG. 1 is an explanatory diagram showing a conceptual configuration of the object-oriented
Each object of the
[0015]
The
The tool data object 24 is an object having, as data, data extracted from the
The tool type object 25 is an object created for each tool, and has data such as a tool number, a shape, and a size of each tool, and tool drawing data to be displayed on a screen during simulation. The tool data object 24 and the tool type object 25 are unnecessary in the case of a processing machine that does not change tools (for example, a laser processing machine). Also, in the case of a processing machine that exchanges tools, data relating to tools does not necessarily need to be stored as an object, but may be stored as a simple data file. The tool type object 25 is of a self-generated type, as will be described later for the
[0016]
The
The tool data object 24 and the machining information object 26 may be provided in a tool master file (not shown) provided separately from the
[0017]
FIG. 6 is a conceptual diagram of the structure of the
The method of the
[0018]
FIG. 7 is a conceptual diagram of the structure of the
The
[0019]
Although not shown, the NC data object 21 in FIG. 1 has the
[0020]
The configuration of the
The instruction unit object generation means 31 has a plurality of
[0021]
The
[0022]
FIG. 4 shows a specific example of the
[0023]
The instruction unit object generation means 31 has an NC1 line
[0024]
As shown in FIG. 5, the NC1 line
[0025]
The instruction unit
The instruction
[0026]
The
The self-identification function is a function for determining whether or not data passed as an argument matches data indicating self-characteristics.
The self-generated method is a method for generating the
The execution method is the same as that described for the
[0027]
As shown in FIG. 12, the self-identification functions of the
[0028]
Next, a process of generating the
FIG. 8 shows the flow of the entire process. When the
When the
[0029]
FIG. 9 shows a process of creating the
Next, the line counter indicating the line number of the character string of the
[0030]
FIG. 10 shows a procedure in which the
To explain the outline first, self-generation is performed when the self-identification functions listed in the self-identification function table 42 (FIG. 12) are executed in order to make the corresponding class self-identify and match the self-characteristics. The self-identification function is a function provided individually for all the instruction types of the
Description will be made in the order of steps. The method of the
[0031]
With this call, as shown in FIG. 11, in the
To explain with a specific example, it is assumed that the read self-identification function is a tool instruction (T code) class self-identification function. In this case, the class of the tool command will execute its self-identification function. At this time, it is assumed that the character string of NC1 line is passed as an argument to the tool instruction class, and the instruction indicated by the character string is a movement command (X code) in the X direction. Then, the class of the tool command executing the self-identification function returns a mismatch response because the tool command as the self-feature does not match the movement command as the argument, and does not generate an object as an instance. If the argument is a tool command, since it matches the self-feature, the
[0032]
In step Q7 of FIG. 10, the response returned from the
[0033]
Such processing is repeated up to the end self-identification function of the self-identification function table 42. Therefore, the
To explain with a specific example, it is assumed that the NC command passed as an argument to the
[0034]
The processing of steps Q4 and Q5 in FIG. 10 shows processing for coping with a case where the NC1 line character string used as an argument includes a plurality of instructions. This will be described together with the specific example of FIG.
The NC1 line character string of the argument is “REC / 100” including an instruction “REC / 100”, an instruction “T0”, and an instruction “M0” as NC instructions. T0 M0 ". Here, the instruction such as “REC / 100” indicated by the NC code is a tentative code, and its content may be any.
In step Q4, when reading the previous self-identification function in the self-identification function table 42, if the
In step Q5, it is determined whether or not a character string remains, and if not, the process of the
Next, when the
In this way, the one-line character string is “REC / 100 T0 The NC1 row object 22 of “M0” has three instruction units of an
In this way, the self-generation of the
[0035]
The execution of the simulation, that is, the execution of the simulation after the generation of the
Each
[0036]
Although not described in the above description, more specifically, for example, each
[0037]
Since the
[0038]
Although the above description has been made from the viewpoint of the
The
The
The procedure for generating the
In this embodiment, the procedure for generating the
[0039]
【The invention's effect】
The machining simulation apparatus according to the present invention is a self-generation type simulation apparatus using object orientation, and is configured to self-generate an instruction-based object. Therefore, the maintainability of a simulation program is excellent, and the type of NC instruction corresponding to NC data is excellent. Can be easily added, changed, and deleted.
When NC data of a punch press is used and a tool type object generation unit is provided, the maintenance performance is excellent even for a simulation of a punch press having various tools.
The machining simulation program according to the present invention is a self-generation type simulation program using object orientation, and is configured to self-generate an instruction unit object. Therefore, the machining simulation program is excellent in maintainability, and it is possible to add NC instruction types corresponding to NC data. Changes and deletions can be easily handled.
[Brief description of the drawings]
FIG. 1 is a conceptual configuration diagram showing a hierarchical relationship between an object-oriented machining simulation apparatus according to an embodiment of the present invention and a group of generated objects.
FIG. 2 is a schematic explanatory diagram of a hardware configuration example of the processing simulation apparatus.
FIG. 3 is an explanatory diagram of a screen example of a screen display device in the processing simulation device.
FIG. 4 is a block diagram of a conceptual configuration of a management unit and an instruction unit object generation unit of the processing simulation apparatus.
FIG. 5 is a detailed block diagram of a conceptual configuration of an instruction unit object generation unit of the processing simulation apparatus.
FIG. 6 is an explanatory diagram of a conceptual configuration of an NC1 line object.
FIG. 7 is an explanatory diagram of a conceptual configuration of an instruction unit object.
FIG. 8 is a flowchart showing an outline of the overall processing of the processing simulation apparatus.
FIG. 9 is a flowchart showing a generation process of the NC1 line object.
FIG. 10 is a flowchart showing a self-generation instruction to an instruction type class by the NC1 line object and a process of holding the formed object.
FIG. 11 is a flowchart of a self-generation process of an instruction type class.
FIG. 12 is an explanatory diagram of a self-identification function table.
FIG. 13 is an explanatory diagram of a process of subtracting a self-generated character string from a one-line character string.
FIG. 14 is an explanatory diagram of the configuration and operation of each part of the punch press.
[Explanation of symbols]
1. Processing simulation device
2. Computer
3. Machining simulation program
6 ... NC data
7… Object group
8 Screen display device
21: NC data object
22 NC1 line object
23 Instruction unit object
24 ... Tool data object
25 ... Tool type object
31 ... Instruction-based object generation means
32: Management means
33 ... Instruction type class
33a: Instruction type base class
33b: Class for each instruction type
34 ... Tool data extraction means
35 ... Tool type object generating means
36 Processing information object generating means
41… NC1 line class
42 self-identification function table
Claims (3)
NCデータの命令毎のオブジェクトである命令単位オブジェクトを生成する命令単位オブジェクト生成手段と、
生成された命令単位オブジェクトに実行指令を与える管理手段とを備え、
上記命令単位オブジェクトは、自己のNC命令種別のデータと、必要な特有属性データと、上記実行指令に応答して自己のNC命令種別および特有属性データに応じたシミュレーション処理を行う実行メソッドとを有するものであり、
上記命令単位オブジェクト生成手段は、NC命令の種別毎にクラス定義された命令種別クラスを有し、これらの命令種別クラスは、渡されたNC命令が自己のNC命令の種別に合致するか否かを判断し、合致する場合に自己のクラスのインスタンスとして上記命令単位オブジェクトを生成するものとした、
オブジェクト指向型加工シミュレーション装置。An apparatus for simulating procedural language NC data for numerically controlling a processing machine,
An instruction unit object generating means for generating an instruction unit object which is an object for each instruction of the NC data;
Management means for giving an execution instruction to the generated instruction unit object,
The instruction unit object has data of its own NC instruction type, necessary specific attribute data, and an execution method for performing a simulation process according to its own NC instruction type and specific attribute data in response to the execution instruction. Things,
The instruction unit object generation means has an instruction type class defined for each type of NC instruction, and these instruction type classes determine whether the passed NC instruction matches the type of its own NC instruction. Is determined, and if it matches, the instruction unit object is generated as an instance of its own class.
Object-oriented machining simulation device.
NCデータから、このNCデータの所定区分毎の文字列をデータとして持つ複数のNC1行オブジェクトを生成する手順と、
これらのNC1行オブジェクトの下位のオブジェクトとして、NC1行オブジェクトの持つNCデータの命令毎のオブジェクトである命令単位オブジェクトを生成する手順と、
生成された各命令単位オブジェクトに順次実行指令を与える手順とを含み、
上記命令単位オブジェクトは、自己のNC命令種別のデータと、必要な特有属性データと、上記実行指令に応答して自己のNC命令種別および特有属性データに応じたシミュレーション処理を行う実行メソッドとを有するものであり、
上記命令単位オブジェクトを生成する手順は、NC命令の種別毎にクラス定義された各々の命令種別クラスによって、上記NC1行オブジェクトから渡されたNC命令が自己のNC命令の種別に合致するか否かを判断し、合致する場合に自己のクラスのインスタンスとして上記命令単位オブジェクトを生成する手順とした、
オブジェクト指向型加工シミュレーションプログラム。A computer-executable program for simulating procedural language NC data for numerically controlling a processing machine, comprising:
A procedure for generating a plurality of NC1 line objects having a character string for each predetermined section of the NC data as data from the NC data;
A procedure of generating an instruction unit object which is an object for each instruction of the NC data of the NC1 line object as a lower object of the NC1 line object;
Giving a sequential execution instruction to each generated instruction unit object,
The instruction unit object has data of its own NC instruction type, necessary specific attribute data, and an execution method for performing a simulation process according to its own NC instruction type and specific attribute data in response to the execution instruction. Things,
The procedure for generating the instruction unit object is to determine whether the NC instruction passed from the NC1 row object matches the type of the own NC instruction according to each instruction type class defined for each type of the NC instruction. Was determined, and when the values matched, the procedure was such that the instruction unit object was generated as an instance of the own class.
Object-oriented machining simulation program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002331943A JP4085789B2 (en) | 2002-11-15 | 2002-11-15 | Object-oriented machining simulation apparatus and object-oriented machining simulation program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002331943A JP4085789B2 (en) | 2002-11-15 | 2002-11-15 | Object-oriented machining simulation apparatus and object-oriented machining simulation program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004164485A true JP2004164485A (en) | 2004-06-10 |
JP4085789B2 JP4085789B2 (en) | 2008-05-14 |
Family
ID=32809165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002331943A Expired - Fee Related JP4085789B2 (en) | 2002-11-15 | 2002-11-15 | Object-oriented machining simulation apparatus and object-oriented machining simulation program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4085789B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103302172A (en) * | 2013-06-21 | 2013-09-18 | 济南铸造锻压机械研究所有限公司 | Machining method and system of intelligent adapting mold for flat plate punching production line |
CN104339359A (en) * | 2013-08-09 | 2015-02-11 | 株式会社安川电机 | Robot control apparatus and method for controlling robot |
-
2002
- 2002-11-15 JP JP2002331943A patent/JP4085789B2/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103302172A (en) * | 2013-06-21 | 2013-09-18 | 济南铸造锻压机械研究所有限公司 | Machining method and system of intelligent adapting mold for flat plate punching production line |
CN104339359A (en) * | 2013-08-09 | 2015-02-11 | 株式会社安川电机 | Robot control apparatus and method for controlling robot |
JP2015033744A (en) * | 2013-08-09 | 2015-02-19 | 株式会社安川電機 | Robot control device and method |
Also Published As
Publication number | Publication date |
---|---|
JP4085789B2 (en) | 2008-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5850535A (en) | Roll-back during regeneration on a computer-aided design system | |
CN102269989B (en) | The method and device for data-driven interface of relation between Kernel-based methods abstract factory | |
EP0309374B1 (en) | Automated bill of material | |
US5388199A (en) | Interactive graphic input system | |
US7159209B1 (en) | Inter-application validation tool for use in enterprise architecture modeling | |
Kramer et al. | A feature-based inspection and machining system | |
JP2002082704A (en) | Nc processing simulation device | |
CN112560422A (en) | Chart processing method, device, equipment and medium | |
US20220180011A1 (en) | Systems and methods for modifying cad files | |
US6230315B1 (en) | Data processing method and apparatus | |
JP4085789B2 (en) | Object-oriented machining simulation apparatus and object-oriented machining simulation program | |
CN116644489A (en) | Method, system, device and storage medium for rapidly designing three-dimensional software combined hole | |
JP4088760B2 (en) | Design work support device | |
Kruth et al. | Methods to improve the response time of a CAPP system that generates non-linear process plans | |
AU760395B2 (en) | Program reproducing method and device, and medium on which program for program reproduction recording | |
Mäntylä et al. | Representation of process planning knowledge for part families | |
CN112764396B (en) | Configuration method and device | |
JP3115578B2 (en) | Program development equipment | |
JP2004310317A (en) | Business support device | |
CN116010015B (en) | Method, device, equipment and storage medium for generating right key menu of monitoring picture | |
JP4032306B2 (en) | Design work support device | |
CRAWFORD | Integrating 3D modelling and process planning by features: a case study | |
JP2907277B2 (en) | User interface system for supervisory control system | |
JPS63276608A (en) | Tool sequence changing method | |
Cederfeldt | Variant Design Automation: Strategy and Procedure for Storing Design Process Information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050818 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070816 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070828 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070925 |
|
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: 20080129 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080211 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110228 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110228 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120229 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130228 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140228 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |