JP2004164485A - Object directional working simulation device - Google Patents

Object directional working simulation device Download PDF

Info

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
Application number
JP2002331943A
Other languages
Japanese (ja)
Other versions
JP4085789B2 (en
Inventor
Masaki Aso
正樹 麻生
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.)
Murata Machinery Ltd
Original Assignee
Murata Machinery 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 Murata Machinery Ltd filed Critical Murata Machinery Ltd
Priority to JP2002331943A priority Critical patent/JP4085789B2/en
Publication of JP2004164485A publication Critical patent/JP2004164485A/en
Application granted granted Critical
Publication of JP4085789B2 publication Critical patent/JP4085789B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Numerical Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To attain an excellent maintaiability in a simulation program and to facilitate the correspondence among addition, alteration and deletion in the sorts of NC instructions corresponding to NC data in a device for simulating the NC data of a procedure type language. <P>SOLUTION: The simulation device is provided with an instruction unit object generation means 31 and a management means 32. The instruction unit object generation means 31 generates an instruction unit object 23 which is an object in each instruction of the NC data 6 by itself. The management means 32 provides an execution command to the generated instruction unit object 23. The instruction unit object 23 has the data of its own NC instruction sort, necessary specific attribute data and an execution method for performing simulation processing corresponding to its own NC instruction sort or the like in response to the execution command. <P>COPYRIGHT: (C)2004,JPO

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 Patent Document 1, but this is not a method of simulating procedural NC data.
[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 machining simulation device 1 is a device for simulating NC data 6, and includes a hardware and operation system (not shown) of a computer 2 and a machining simulation serving as an application program. Program 3 The machining simulation program 3 is an object-oriented program, and is described in, for example, the C ++ language. The computer 2 includes an arithmetic control unit 4 including a central processing unit (CPU) and a storage unit 5, and the processing simulation program 3 is stored in a partial storage area of the storage unit 5. One or more NC data 6 is stored as a file or the like in another storage area of the storage means 5.
The NC data 6 is a procedural language program for numerically controlling a processing machine, and is described as a character string in which one command or a plurality of related commands are described in one line. Each NC instruction is described in an NC code of a predetermined format. The processing machine to be controlled by the NC data 6 is a sheet metal working machine such as a punch press or a laser machine, or a machine tool such as a lathe.
The machining simulation program 3 creates a hierarchically related object group 7 from the NC data 6 in a part of the storage area 5a of the storage means 5 and causes the object group 7 to execute a simulation process. The simulation result is displayed on the screen display device 8. The screen display device 8 includes a liquid crystal display device or a CRT. The computer 2 includes a keyboard, a mouse, and other input devices 9. Although the computer 2 is illustrated as a single computer, the computer 2 may be a group of a plurality of computers constituting a network.
[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 result display screen 11, and various information screens 12 are displayed as separate windows in the entire screen of the screen display device 8, and various software keys 13 are displayed. Have been. The NC data screen 10 displays the NC data 6 as a character string. On the simulation result display screen 11, a diagram such as a work completed state or a work being processed is displayed as a simulation result. The illustrated example is a simulation result example of the NC data 6 of the punch press, in which a diagram of each of the processed punch holes 14 is superimposed on a sheet metal work W as a material. The punch holes 14 form a continuous slit in this example, but the punch holes 14 are shown for each single punch. Further, a diagram of the work holder 15 that holds the work W in the punch press is also displayed. The software key 13 is a means for selecting an information type to be displayed on the various information screens 12, and is provided separately for machining information, tool information, NC information, performance information, and the like. The information displayed on the various information screen 12 includes, for example, a program number, a turret number, and a plate thickness of the NC data 6 as processing information. As the tool information, a tool number, a tool type, and the like of a tool arranged at a position corresponding to each turret number of the turret are displayed. As the NC information, a file update date and time of the NC data 6 is displayed. As the performance information, the number of simulations of the NC data 6 and the like are displayed.
[0014]
FIG. 1 is an explanatory diagram showing a conceptual configuration of the object-oriented machining simulation apparatus 1 and a hierarchical relationship between an object group 7 generated by the apparatus 1. First, each object will be described, and then the configuration of the processing simulation apparatus 1 will be described.
Each object of the object group 7 has data and a method that is a processing content. The object group 7 includes one uppermost NC data object 21, a plurality of NC1 row objects 22 under the NC data object 21, and one or a plurality of instruction unit objects 23 provided below each NC1 row object 22. Having. The NC data object 21 has the entire data of the file 6A of the NC data 6. The NC1 line object 22 is an object provided for each predetermined section such as one line of the NC data 6. The above-mentioned predetermined division is basically one line, but may be a plurality of lines depending on the type of the NC instruction. The instruction unit object 23 is an object provided for each NC instruction of each NC1 line object 22. When the NC1 line object 22 has only one NC instruction, one is provided. The same number of NC instructions are provided. The number of instruction unit objects 23 does not include a base class described later. The instruction unit object 23 is an object having an execution method for drawing a simulation, changing coordinates, and the like. The upper NC1 line object 22 and the NC data object 21 are objects provided for the purpose of generating and managing the instruction unit object 23. The instruction unit object 23 is of a self-generated type as described later.
[0015]
The object group 7 also has a tool data object 24 and a machining information object 26 as objects of the same hierarchy as the NC data object 21, and has a plurality of tool type objects 25 below the tool data object 24.
The tool data object 24 is an object having, as data, data extracted from the NC data 6 about the tool described as attribute data in the NC data 6. When the processing machine to be controlled by the NC data 6 is a turret-type punch press, as the data on the tool, data such as the tool number, the shape and size of the tool itself, and the turret number (the number of the location of the tool in the turret) ) And the number of the tool provided at the turret number.
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 command unit object 23.
[0016]
The processing information object 26 is an object that has extracted data such as processing conditions described as attribute data in the NC data 6. In the case of a punch press, the processing conditions include a punch pressure, a nibbling pitch, and the like. The processing information object 26 does not necessarily need to be provided, and processing information such as processing conditions may be stored as a simple file.
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 NC data 6 when information such as other files not included in the NC data 6 is required for the simulation. ) Or the data of the automatic programming device that creates the NC data 6 may be obtained from those files or devices and held.
[0017]
FIG. 6 is a conceptual diagram of the structure of the NC1 line object 22. The NC1 line object 22 includes, as data, a character string of a predetermined section of the NC data 6 (hereinafter referred to as “NC1 line character string”) and an object pointer serving as information for identifying a storage location of the lower instruction unit object 23. Have. In addition, the data includes the line number of the NC1 line character string and information unique to the instruction of the NC1 line character string. In the case of a turret-type punch press, the unique information includes a turret number, the presence or absence of nibbling, and current position data. The turret type punch press of the combined laser / punch type includes information such as a mode for distinguishing between punching and laser processing.
The method of the NC1 line object 22 is provided with a transmission method for transmitting an execution command received from the upper NC data object 21. In this transmission method, an execution instruction is sequentially transmitted to each lower-order instruction unit object 23, and an execution instruction is transmitted to the next NC1 row object 22 by a completion response of the execution of each lower-order instruction unit object 23.
[0018]
FIG. 7 is a conceptual diagram of the structure of the instruction unit object 23. The instruction unit object 23 is provided for each NC instruction, and therefore has slightly different contents for each type of NC instruction. The instruction unit object 23 has, as data, the type of the NC instruction, a unique attribute of the NC instruction, and the pointer of the NC1 line object 22 described above. The NC command is described as a character string of an NC code, and in the case of a punch press, a T code as a tool command, an X code as a movement command in the X-axis direction, and a rotation angle of an index tool for rotation indexing. There are a C code which is a command, a REC code which is a command for sequentially punching a plurality of portions in a straight line with the same tool, and the like. As the specific attributes of the NC command, the turret number Tn which is the tool arrangement position of the turret 51 (FIG. 14A) for the T code, and the index tool 52 (FIG. 14C) for the C code. There is an angle θ. In the case of the REC code, there are data such as the direction (front, rear, left and right), the processing length L (FIG. (B)), the tool length a, the feed pitch p, and in the case of the X code, the movement amount x (FIG. There is. In addition to the data described above, the instruction unit object 23 has a code indicating the format of the NC data 6 and a precautionary note (for example, an incompatible NC instruction).
The instruction unit object 23 has a method for executing a predetermined simulation process in response to a given execution command. The execution method differs depending on the type of the NC command. For example, in the case of a punch command (such as a REC code), a drawing process is performed; in the case of a movement command (such as an X code), the current coordinate is changed; It is a method that performs processing such as turret index rotation.
[0019]
Although not shown, the NC data object 21 in FIG. 1 has the entire NC data 6 as the data as described above, and the method is an input of an execution command given from the input device 9 (FIG. 2) or the like. Has a method of giving an execution instruction to each NC1 line object 22 in accordance with.
[0020]
The configuration of the processing simulation apparatus 1 will be described with reference to FIG. The machining simulation apparatus 1 includes an instruction unit object generation unit 31 that generates an instruction unit object 23 that is an object for each instruction of the NC data 6, and a management unit 32 that gives an execution instruction to the generated instruction unit object 23. .
The instruction unit object generation means 31 has a plurality of instruction type classes 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 when they match, generate the instruction unit object 23 as an instance of the own class. is there. An instance is a class that has an entity. The instruction type classes 33 are provided by the number of types of NC instructions.
[0021]
The processing simulation device 1 further includes a tool data extracting unit 34, a tool type object generating unit 35, and a processing information object generating unit 36. The tool data extracting means 34 is means for extracting data on a tool described as attribute data in the NC data 6 from the NC data 6, and specifically, generates the tool data object 24. The tool type object generating unit 35 is a unit that generates the tool type object 25 that is an object for each tool type in the tool data extracted by the tool data extracting unit 34. In this example, the tool type object generating means 35 generates the tool type object 25 by the same method as the method of generating the command unit object 23. The tool type object 25 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.
[0022]
FIG. 4 shows a specific example of the management unit 32 and the instruction unit object generation unit 31. The management unit 32 has a management unit 37 and an NC data object generation unit 38, and the NC data object generation unit 38 generates the NC data object 21 in FIG. In addition, the management unit 32 has a top-level object generation unit (not shown) that generates the tool data object 24 and the processing information object 26. The management unit 37 is a unit that performs processing or the like in response to an operator's input. The management unit 37 selects which NC data 6 to simulate, receives an instruction to start object creation, and is selected by the NC data object generation unit 38 and the like. The creation of the object group 7 of the NC data 6 is started. Further, a simulation execution command is transmitted to the created object group 7. This execution command is sequentially transmitted from the created NC data object 21 to lower-order objects.
[0023]
The instruction unit object generation means 31 has an NC1 line object generation unit 39 for generating the NC1 line object 22 and an instruction unit object generation unit 40 for generating the instruction unit object 23.
[0024]
As shown in FIG. 5, the NC1 line object generation unit 39 has one NC1 line class 41 in which a class is defined. The NC1 line object generation unit 39 gives data such as a one-line character string of the NC data 6 to the NC1 line class 41 as an argument or the like, and generates the NC1 line object 22 (FIG. 1) as an instance of the NC1 line class 41. is there. The NC1 line object generation unit 39 generates the NC1 line object 22 according to the management of the upper management unit 32 (FIG. 4). The NC1 line class 41 specifically has a method for performing the processing of the procedure shown in the flowchart in FIG.
[0025]
The instruction unit object generation unit 40 includes, as classes belonging to the instruction type class 33, an instruction type base class 33a which is a base class, and a class 33b for each of a plurality of instruction types defined as a derivative class of the instruction type base class 33a. Have. The classes 33b for each instruction type are provided by the number of instruction types. The "instruction type class 33" referred to in this specification is not an actual class, but a generic name of the instruction type base class 33a and its derivative classes 33b for each instruction type.
The instruction type base class 33a is a class having members common to the class 33b for each instruction type, and does not generate an instance of this class 33a. The class 33b for each instruction type defines data and methods that are different from the instruction type base class 33a, inherits all the data and methods of the instruction type base class 33a, and sets The method will have the added content.
[0026]
The class 33b for each instruction type has self-characteristic data as data, and has a self-identification function, a self-generated method, and an execution method as methods. The self-characteristic data is data indicating which NC instruction (for example, T code, X code, C code, REC code,...) Of the class 33b.
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 instruction unit object 23 as an instance having the content of NC data for the class 33b of the instruction type when it is determined by the self-identification function that the self-feature matches.
The execution method is the same as that described for the instruction unit object 23, and differs depending on the type of the NC instruction. Although the description will be duplicated, the execution method is, for example, drawing processing in the case of a class of a punch command (REC code or the like), change of current coordinates in the case of a class of a movement command (X code or the like), tool command (T code) In the case of class, it is a method that performs processing such as turret index rotation.
[0027]
As shown in FIG. 12, the self-identification functions of the class 33b for each instruction type are listed in one self-identification function table 42. The function name is a function name unique to each class by describing the class name and the function name together. The self-identification function table 42 is a static method function table.
[0028]
Next, a process of generating the object group 7 by the machining simulation apparatus 1 having the above configuration and a process of executing a simulation by the created object group will be described with reference to flowcharts of FIGS.
FIG. 8 shows the flow of the entire process. When the machining simulation program 5 is started by an operator's input (step S1), the file of the NC data 6 can be selected by the processing of the management means 32 (FIGS. 1 and 4). In this state, a file 6A of the desired NC data 6 is selected and an object creation command is input (S2). First, an NC data object 21 is generated (S3), and then each NC1 line object 22 is sequentially generated. (S4). In the process of generating each NC1 row object 22, an instruction unit object 23 belonging to a lower order is generated. In this way, a hierarchically structured object group 7 is generated. Note that the tool data object 24, the tool type object 25, and the machining information object 26 shown in FIG. The generation of these objects 25 and 26 may be performed before or after the generation of the NC1 line object 22, or may be performed simultaneously.
When the object group 7 is generated in this manner, the management unit 32 recognizes the completion of the generation and gives a simulation execution instruction. This execution command may be given by an operator's operation on the management means 32.
[0029]
FIG. 9 shows a process of creating the NC1 line object 22. The one-line character string is extracted from the NC data 6 held as the data of the NC data object 21 by the NC1 line object generation unit 39 in FIG. 5 and given as an argument to the NC1 line class 41 (step R1). As a result, an NC1 line object 22 is generated in which the NC1 line class 41 is an instance of the class, that is, a substantial object (R2). In the process of generating the NC1 line object 22, the instruction unit object 23 is self-generated by the lower-order instruction unit class 33b (FIG. 5), and the self-generated instruction unit object 23 is stored in the array of the NC1 line object 22. Add to element. Thereby, one NC1 line object 22 is completed.
Next, the line counter indicating the line number of the character string of the NC data 6 is decremented (or incremented) (R3), and it is determined whether or not the line is the last line (R4). If it is not the last line, the character string of the next one line of the NC data 6 is extracted, and the NC one-line object 22 is generated in the same manner as described above. By repeating such processing, the NC1 line object 22 is generated for all the lines of the NC data 6.
[0030]
FIG. 10 shows a procedure in which the NC1 row class 41 instructs the lower class 33b (FIG. 5) to self-generate the instruction unit object 23 in the generation process, and adds it to the array element.
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 classes 33b. The self-identification function compares arguments and self-characteristics and identifies itself.
Description will be made in the order of steps. The method of the NC1 row class 41 initializes the array value of the self-identification function table 42 (FIG. 12) (step Q1), and reads the self-identification function of the corresponding array value (Q2). It is determined from the array value whether or not the table is at the end (Q3). If not at the end, the following processes Q4 to Q10 are performed. The following steps Q4 and Q5 are detailed processes, and will be described later. In step Q6, the read self-identification function is called.
[0031]
With this call, as shown in FIG. 11, in the instruction type class 33b having the self-identification function, the self-identification function is executed, and it is determined whether the NC instruction as an argument matches the self-characteristic (U2). ). If they do not match, a non-matching response is returned to the NC1 row class 41, and no object is generated. If they match, the instruction unit object 23 which is an instance of the class 33b of the instruction type is self-generated by the self-generating method of the class 33b, and a response of the match is returned to the NC1 row class 41.
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 command unit object 23 which is an instance of the class of the tool command is generated, and a reply of the match is returned to the NC1 row class 41.
[0032]
In step Q7 of FIG. 10, the response returned from the instruction type class 33b is determined. If the response does not match the self-characteristic, the process proceeds to the next reading of the self-identification function (Q10, Q2). In the case of a response that matches the self-characteristic, the self-generated instruction unit object 23 is added to the array element held by the NC1 line object 22 (Q8), and the array value is initialized (Q9). Proceed to reading the self-identification function (Q2).
[0033]
Such processing is repeated up to the end self-identification function of the self-identification function table 42. Therefore, the NC1 line object 22 has the instruction unit object 23 corresponding to the argument.
To explain with a specific example, it is assumed that the NC command passed as an argument to the NC1 row class 41 is a tool command. In this case, the self-identification functions listed in the self-identification function table 42 are sequentially called, and the self-identification function is executed by the class 33b of the instruction type corresponding to the self-identification function. When the class 33b of the command type corresponding to is the class of the movement command, since it does not match the self-characteristic, a reply of mismatch is made and the next self-identification function is called. Assuming that the next self-identification function is also an NC command other than the tool command, for example, a C-axis command, a non-coincidence reply is made and the next self-identification function is called. In this manner, the self-identification functions of the self-identification function table 42 are sequentially called, and when the self-identification function of the tool instruction is called, the tool instruction as an argument matches the self-characteristic of the class 33b of the tool instruction. Then, the command unit object 23 of the class 33b of the tool command is self-generated. Further, the self-generated instruction unit object 23 is held as an array element in the NC1 row object 22 which is an instance of the NC1 row class 41.
[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 instruction unit object 23 is self-generated as matching the self-feature, the character string of the self-generated instruction is used as an argument. Perform processing to subtract from As a result, in the example of FIG. 13, the remaining character string is “T0 M0 ", and two NC instructions remain. When one line of character string includes a plurality of NC instructions, self-identification and self-generation are performed from the earliest NC instruction in one line.
In step Q5, it is determined whether or not a character string remains, and if not, the process of the NC1 line class 41 is ended. In the example of FIG. 13, since the character string “T0M0” still remains, the processing is continued.
Next, when the instruction unit object 23 of the NC instruction of the character string "T0" is self-generated, the character string "T0" is subtracted in step Q4 of the next repetition process, and "M0" remains. When the instruction unit object 23 of the NC instruction of the character string “M0” is self-generated, the character string becomes 0, and the process of the NC1 line class 41 ends from step Q5.
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 instruction unit object 23 of “REC / 100”, an instruction unit object 23 of “T0”, and an instruction unit object 23 of “M0” as its array elements. The object 23 will be retained.
In this way, the self-generation of the instruction unit object 23 can be performed regardless of the number of instructions included in the one-line character string. When one NC character is included in one line of character string, the character string becomes 0 in the next repetition process when it is self-generated, and the processing ends there.
[0035]
The execution of the simulation, that is, the execution of the simulation after the generation of the object group 7 is performed when the completion of the generation of the object group 7 is recognized by the management unit 32 or when an operator or the like gives an execution command to the management unit 32. This is performed by the management means 32 giving an execution instruction. This execution instruction is transmitted from the NC data object 21 to the first NC1 row object 22 and transmitted to the first lower instruction unit object 23. The instruction unit object 23 returns the execution completion to the NC1 line object 22, and the NC1 line object 22 transmits the execution instruction to the next instruction unit object 23. If there is no next instruction unit object 23, an execution instruction is transmitted to the next NC1 line object 22. In this manner, the execution instructions are transmitted in the order in which the instruction unit objects 23 are generated.
Each instruction unit object 23 executes a unique execution method of the instruction unit object 23 according to an execution instruction. For example, drawing, movement of current coordinates, exchange of tools (index rotation of a turret), and the like are performed. As a result, a diagram of the execution result of the NC data 6 is displayed on the simulation result screen 11 of the screen display device 8 as shown in FIG. The operator can find a defect in the NC data 6 by looking at the contents displayed on the screen.
[0036]
Although not described in the above description, more specifically, for example, each NC1 line object 22 is, as a lower object, an object that is the instruction type base class 33a (FIG. 5) and one of its derivatives. Has one or more instruction unit objects 23 having instances of the instruction type class 33b as instances. When creating the object group, the instruction type base class 33a itself is not explicitly created, but the derived class 33b is declared to inherit properties from the base class. By the generation, it has the base class 33a. In the execution process, for example, first, an execution instruction is transmitted to the object of the instruction type base class 33a (FIG. 5), but the instruction type base class 33a has no specific contents of the execution method and does not perform a specific simulation process. .
[0037]
Since the machining simulation apparatus 1 is of a self-generating type using the object orientation and self-generates the instruction unit object 23, the machining simulation apparatus 1 is excellent in the maintainability of the simulation program 5 and has the NC instruction corresponding to the NC data 5. It is possible to easily add, change, and delete the types. For example, in response to the addition, change, or deletion of the NC instruction, only by adding, changing, or deleting the instruction type class 33b and the self-identification function of the self-identification function table 42, without taking any other effect. Can be.
[0038]
Although the above description has been made from the viewpoint of the processing simulation apparatus 1, the present invention can be regarded as the invention of the processing simulation program 5.
The machining simulation program 5 is a computer-executable program that simulates NC data 6 in a procedural language for numerically controlling a machining machine. And generating a plurality of NC1 line objects 22 having data as an instruction, and an instruction unit object 23 which is an object for each instruction of the NC data of the NC1 line object 22 as a lower object of these NC1 line objects 22. It includes a procedure and a procedure of sequentially giving an execution instruction to each generated instruction unit object 23.
The instruction unit object 23 includes 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 command. Have
The procedure for generating the instruction unit object 23 is to determine whether the NC instruction passed from the NC1 row object 22 matches the type of the own NC instruction by each instruction type class 33 defined for each type of the NC instruction. It is determined whether or not the instruction unit object 23 is generated as an instance of the own class if the two match.
In this embodiment, the procedure for generating the instruction unit object 23 is performed in the middle of the procedure for generating the NC1 row object 22, but may be performed after the generation of the NC1 row object 22.
[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命令が自己の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データから抽出する工具データ抽出手段と、抽出された工具データにおける工具の種別毎のオブジェクトである工具種別オブジェクトを生成する工具種別オブジェクト生成手段とを設け、この工具種別オブジェクト生成手段は、その工具種別の工具に関するデータとシミュレーション処理時にその工具を作画する作画メソッドとを有するものであり、上記命令単位オブジェクトのうち、工具命令の命令単位オブジェクトは、実行メソッドにおけるシミュレーション処理に上記工具種別オブジェクトの作画メソッドを用いるものとした請求項1記載のオブジェクト指向型加工シミュレーション装置。The processing machine is a punch press, a tool data extraction unit for extracting data on a tool described as attribute data in the NC data from the NC data, and an object for each tool type in the extracted tool data. A tool type object generating means for generating a tool type object, the tool type object generating means having data relating to the tool of the tool type and a drawing method for drawing the tool at the time of simulation processing; 2. The object-oriented machining simulation apparatus according to claim 1, wherein, among the unit objects, the instruction unit object of the tool instruction uses the drawing method of the tool type object for the simulation processing in the execution method. 加工機械を数値制御する手続き型言語のNCデータをシミュレーションする、コンピュータで実行可能なプログラムであって、
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.
JP2002331943A 2002-11-15 2002-11-15 Object-oriented machining simulation apparatus and object-oriented machining simulation program Expired - Fee Related JP4085789B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (3)

* Cited by examiner, † Cited by third party
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