JP3545547B2 - NC automatic programming device - Google Patents

NC automatic programming device Download PDF

Info

Publication number
JP3545547B2
JP3545547B2 JP23577996A JP23577996A JP3545547B2 JP 3545547 B2 JP3545547 B2 JP 3545547B2 JP 23577996 A JP23577996 A JP 23577996A JP 23577996 A JP23577996 A JP 23577996A JP 3545547 B2 JP3545547 B2 JP 3545547B2
Authority
JP
Japan
Prior art keywords
elements
path
machining
processing
value
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.)
Expired - Fee Related
Application number
JP23577996A
Other languages
Japanese (ja)
Other versions
JPH1063326A (en
Inventor
隆史 竹ヶ原
成年 高木
康治 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FANUC Corp
Original Assignee
FANUC Corp
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 FANUC Corp filed Critical FANUC Corp
Priority to JP23577996A priority Critical patent/JP3545547B2/en
Publication of JPH1063326A publication Critical patent/JPH1063326A/en
Application granted granted Critical
Publication of JP3545547B2 publication Critical patent/JP3545547B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Numerical Control (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、NC自動プログラミング装置の改良に関する。
【0002】
【従来の技術】
上面の加工経路と下面の加工経路とが異なる加工物の形状データを作成もしくは読み込んで上下の加工経路の要素を対応させ、上下の加工経路を要素単位で補間しながら外周部の加工を行うNCデータを生成する機能を備えたNC自動プログラミング装置が既に公知であり、ワイヤ放電加工機または5軸以上の送り軸を備えた工作機械等のNCデータの作成に利用されている。
【0003】
この種のNC自動プログラミング装置におけるNCデータ生成機能のアルゴリズムは、概念的に、図1のフローチャートによって示すことができる。いま仮に図6に示すような上面側加工経路PT1と下面側加工経路PT2とを備えた加工物のCADデータがあったとする。
【0004】
この形状データに対して従来のNC自動プログラミング装置によりNCデータの生成処理を実行させたとすると、NC自動プログラミング装置は、まず、初期化された指標iの値に基いて上面側加工経路PT1と下面側加工経路PT2の加工開始点P0,Q0の座標値、つまり、各々の加工経路における最初の要素の始点の座標値を読み込んで始点記憶レジスタRPS,RQSに記憶し(ステップT1〜ステップT3)、更に、指標iの値を1インクリメントして、上面側加工経路PT1と下面側加工経路PT2における次の点P1,Q1の座標値、要するに、各々の加工経路における最初の要素の終点の座標値を読み込んで、終点記憶レジスタRPE,RQEに記憶する(ステップT4〜ステップT7)。
【0005】
ここで、NC自動プログラミング装置は上面側加工経路RPS〜RPE間の一要素分の移動量と下面側加工経路RQS〜RQE間の一要素分の移動量とを求め、ワイヤまたは工具が上面側加工経路PT1をRPSからRPEまで移動する間に該ワイヤまたは工具が下面側加工経路PT2をRQSからRQEまで移動するような移動指令を求め、この移動指令を加工プログラムの一部としてメモリに追加記憶する(ステップT8〜ステップT10)。そして、NC自動プログラミング装置は、現時点における終点記憶レジスタRPE,RQEの内容を上面側加工経路PT1と下面側加工経路PT2における次の要素の始点として始点記憶レジスタRPS,RQSに更新記憶し、次の一要素分の移動量の算出に備える(ステップT11)。
【0006】
以下、最後の要素の終点となる加工終了点に対する処理が完了するまでの間、指標iの値を次々と歩進して前記と同様の処理を繰り返して行く結果、最終的には、上面側加工経路PT1を構成する1つ1つの要素と下面側加工経路PT2を構成する1つ1つの要素とが、加工開始点を基準として、例えば、上面側加工経路PT1の第1要素と下面側加工経路PT2の第1要素、また、上面側加工経路PT1の第2要素と下面側加工経路PT2の第2要素・・・というように、逐次端から一対一の関係で対応づけられて行くことになる。
【0007】
従って、図6に示すように上面側加工経路PT1と下面側加工経路PT2とが単純なオフセット関係となっているような場合はよいが、例えば、図7に示すように、上面側加工経路の1つの要素に対応させて下面側加工経路の複数の要素を加工したいといった場合に問題が生じることになる。
【0008】
図7の例では上面側加工経路の1つの円弧要素Pi 〜Pi+1 に対して下面側加工経路の3つの直線要素Qi 〜Qi+1 ,Qi+1 〜Qi+2 ,Qi+2 〜Qi+3 を対応させて加工を行おうとする場合について示しており、当然、このような加工に際しては、下面側加工経路の複数の要素で形成される一連の輪郭、例えば、図7における3つの直線要素で形成される折れ線と上面側加工経路の1つの円弧要素との間を滑らかに補間して加工する必要があるが、このまま前述のアルゴリズムを適用してNC自動プログラミング装置にNCデータの生成処理を実行させると、図7に一点鎖線で示すように、上面側加工経路の1つの円弧要素Pi 〜Pi+1 と下面側加工経路の1つの直線要素Qi 〜Qi+1 とが一対一に対応してしまうので、設計者が意図したものとは全く異なる加工物が生成されてしまうことになる。
【0009】
これは、既に述べた通り、上面側加工経路を構成する1つ1つの要素と下面側加工経路を構成する1つ1つの要素とが、加工開始点を基準として端から順に一対一の関係で対応づけられて行くからである。
【0010】
更に、上面側加工経路のPi+1 点以降の要素と下面側加工経路のQi+1 点以降の要素との間で、上面側加工経路Pi 〜Pi+1 と共に加工すべきである直線要素Qi+1 〜Qi+2 ,Qi+2 〜Qi+3 に相当する2要素分の対応ずれが定常的に発生することになるので、図7に一点鎖線で示すようなコーナー部の加工異常にとどまらず、加工物全体がでたらめに切り刻まれるということにもなり兼ねない。
【0011】
そこでこのような問題を回避するためには、複数の要素に対応させるべき1つの要素の側、つまり、図7の例では上面側加工経路の円弧要素Pi 〜Pi+1 の側を、これに対応する下面側加工経路の要素の数に合わせて複数に分割することで、前述のような対応ずれを防止する必要がある。要するに、図7の例では2つの挿入点α,βを円弧要素Pi 〜Pi+1 の経路上に挿入して円弧要素Pi 〜Pi+1 を3つの区間に分割することで形状データを修正することになるのだが、この挿入点の位置を求めて形状データに修正を加えるための格別の手段といったものはこれまで提供されていず、全ての演算処理や修正作業はオペレータ自らが行わなければならず、作業に手間取るという問題があった。
【0012】
【発明が解決しようとする課題】
本発明の目的は、前記従来技術の欠点を解消し、上下の加工経路の要素を一対多に対応させて加工を行うような場合でも、面倒な演算処理や形状データの修正作業をオペレータ自らが行う必要がなく、輪郭加工のためのNCデータを簡単に生成することのできるNC自動プログラミング装置を提供することにある。
【0013】
【課題を解決するための手段】
本発明は、加工物の上面の加工経路と加工物の下面の加工経路とが異なる加工物の形状データを作成もしくは読み込んで上下の加工経路の要素を対応させ、上下の加工経路を要素単位で補間しながら加工を行うNCデータを生成する機能を備えたNC自動プログラミング装置において、上側または下側の加工経路の1要素を任意に選択すると共に前記1要素に対応させる他側の面の加工経路を複数の要素で選択する手段と、前記複数の要素における各要素の加工経路の長さに対応させて前記1要素を前記複数の要素の数で複数に分割する手段とを備えたことを特徴とする構成により前記目的を達成した。
【0014】
また、上側または下側の加工経路の1要素を任意に選択すると共に前記1要素に対応させる他側の面の加工経路を複数の要素で選択する手段と、前記1要素を前記複数の要素の数で複数に等分割する手段とを備えたことを特徴とする構成により同様の目的を達成した。
【0015】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態を説明する。図8は本発明を適用した一実施形態のNC自動プログラミング装置の要部を示すブロック図である。1はマイクロプロセッサ(以下、CPUという)、6は該NC自動プログラミング装置の起動プログラムを格納したROM、8は各種の制御プログラムやシステムプログラム等を保存したハードディスク、7は演算や表示処理の過程で利用されるデータ等を一時記憶するRAM、9はフロッピーディスク10に記憶された加工形状のデータおよび加工プログラム等の読み込みや新たなデータの書き込みに使用されるディスクドライブユニット、3はキーボード、2はグラフィックディスプレイ、4はカーソルの移動や要素選択操作等のためのマウスであり、これらの各要素はバス5を介してCPU1に接続されている。
【0016】
このNC自動プログラミング装置は、CAD/CAMに要求される各種の機能、例えば、キーボード3やマウス4を利用した入力操作によって加工形状の形状データを作成するための形状入力機能や、作成された加工形状や指定された工具および切削条件、更には、指定された加工順序等に従って一連の加工プログラムを自動作成するための自動プログラミング機能、また、加工プログラムを自動作成しながら、もしくは、作成済みの加工プログラムを走らせながらシミュレーションを行って、工具経路や工具位置を描画する描画機能等を従来のNC自動プログラミング装置と同様に備え、これを実現するためのシステムプログラムはハードディスク8に格納されている。これらの各種機能の選択は、マウス4でグラフィックディスプレイ2上のカーソルを移動させ、メニュー表示から対応するメニュー項目を選択することで行う。
【0017】
なお、図8では専らNC自動プログラミング装置に要求される各種の機能を実現するための構成要素について示しており、NC工作機械の駆動制御に関連する部分については記載を省略している。
【0018】
図2ないし図5はワイヤ放電加工機または5軸以上の送り軸を備えた工作機械等のために該NC自動プログラミング装置のCAD機能で作成された上下の加工経路の輪郭に対し、加工経路の要素を一対多で対応させて加工を行う場合の編集処理の概略を示すフローチャートである。
【0019】
以下、加工物の上下の加工経路の輪郭が従来と同様にして予めNC自動プログラミング装置のCAD機能により作成されているものとして、本実施形態に固有の編集処理について説明する。また、加工経路の輪郭の説明については図7の事例をそのまま流用するものとし、グラフィックディスプレイ2には既に図7に示すような上下の加工経路が表示されているものとする。
【0020】
この編集処理は、上下の加工経路の要素を一対多に対応させて加工を行うような場合にのみ利用するものであり、形状データの作成後、オペレータが編集処理の実行を選択しない場合、つまり、図2におけるステップS1の判別結果が偽となった場合には、この段階で作成されている形状データに対し、そのまま図1に示す従来処理が行われ、上面側加工経路を構成する1つ1つの要素と下面側加工経路を構成する1つ1つの要素とが加工開始点を基準として端から順に一対一の関係で対応づけられ、上下の加工経路を要素単位で補間しながら外周部の加工を行うNCデータが自動的に生成される。
【0021】
一方、上下の加工経路の要素を一対多に対応させて加工を行う必要がある場合、オペレータは、まず、編集実行キーを操作して、CPU1にステップS2以降の処理を実行させることになる。
【0022】
編集処理を開始したCPU1は、まず、1つの要素を選択する側の輪郭(本実施形態では上側輪郭とする)から1つの要素を選択する旨のメッセージをグラフィックディスプレイ2上に表示して(ステップS2)、オペレータによるマウスクリック操作を待つ待機状態に入る(ステップS3)。そして、オペレータがマウスクリックによる選択操作を実施して上側輪郭から1つの要素を選択すると、CPU1は、マウスクリックの実施された位置に最も近接する上側加工経路の一要素の始点(Uj,Vj)とその終点(Uj+1,Vj+1)を識別し(ステップS4)、各点の座標を始点記憶レジスタRPSおよび終点記憶レジスタRPEに記憶する(ステップS5)
図7の例では下側加工経路の複数の要素を対応させる上側加工経路の1つの要素としてPi〜Pi+1の要素が選択されるので、結果的に、始点記憶レジスタRPSには図7の(Ui,Vi)の座標値が、また、終点記憶レジスタRPEには図7の(Ui+1,Vi+1)の座標値が記憶されることになる。
【0023】
次いで、CPU1は、上面側加工経路RPS〜RPE間の一要素分の移動量(道程)を求め(ステップS6)、その値を移動量記憶レジスタSに保存し(ステップS7)、選択した輪郭(上側輪郭)の1つの要素に対応させるべき他方の輪郭(下側輪郭)の要素を複数選択する旨のメッセージをグラフィックディスプレイ2上に表示し(ステップS8)、指標mおよび積算値記憶レジスタΣSmの値を零に初期化して(ステップS9,ステップS10)、オペレータがマウスクリックによって下側輪郭の要素を選択するか(ステップS11)、または、オペレータが選択終了キーを操作するのを待つ待機状態に入る(ステップS12)。
【0024】
ここで、オペレータが前記と同様にマウスクリック操作を実施して下側輪郭の一要素を選択すると、CPU1は、指標mの値を1インクリメントして要素選択数の値を更新し(ステップS14)、マウスクリックの実施された位置に最も近接する下側加工経路の一要素の始点(Xk,Yk)とその終点(Xk+1,Yk+1)を識別し(ステップS15)、各点の座標を始点記憶レジスタRQS(m)および終点記憶レジスタRQE(m)に記憶して(ステップS16)、下面側加工経路RQS(m)〜RQE(m)間の一要素分の移動量を求め(ステップS17)、その値を移動量記憶レジスタS(m)に保存すると共に(ステップS18)、積算値記憶レジスタΣSmに移動量S(m)の値を加算記憶する(ステップS19)。
【0025】
以下、オペレータがマウスクリック操作を実施して下側輪郭の一要素を選択する度に前記と同様にしてステップS14〜ステップS19の処理が繰り返し実行される。
【0026】
図7の例では上側輪郭の1つの要素に対応させるべき下側輪郭の要素がQi 〜Qi+1 ,Qi+1 〜Qi+2 ,Qi+2 〜Qi+3 の3要素であるので、前述したステップS14〜ステップS19の処理は全部で3回実行されることになる。なお、加工開始点からの経路に沿ってQi 〜Qi+1 ,Qi+1 〜Qi+2 ,Qi+2 〜Qi+3 の順で要素を選択する必要はなく、例えば、Qi+1 〜Qi+2 ,Qi 〜Qi+1 ,Qi+2 〜Qi+3 の順でもQi+2 〜Qi+3 ,Qi 〜Qi+1 ,Qi+1 〜Qi+2 の順でもよく、これら3つの要素が選択される限り選択操作の順列は問わない。
【0027】
ここでは図7の事例を参考にして説明を進めているので、選択する要素数は3つということになるが、実際には、2つ以上であれば幾つの要素を選択してもよい。
【0028】
結果的に、移動量記憶レジスタS(m)には第m回目のクリック操作で選択された下側輪郭の一要素の移動量が記憶され、また、始点記憶レジスタRQS(m)および終点記憶レジスタRQE(m)には第m回目のクリック操作で選択された下側輪郭の一要素の始点と終点とが記憶されることになる。当然、積算値記憶レジスタΣSmに記憶される値は、第1回目に選択された一要素の移動量,第2回目に選択された一要素の移動量,・・・,第m回目に選択された一要素の移動量の総和が記憶される。
【0029】
そして、上側輪郭の1つの要素に対応させるべき下側輪郭の要素の選択操作を全て済ませたオペレータが選択終了キーを操作すると、CPU1は指標nの値を1に初期化し(ステップS13)、第n番目に選択された下側輪郭の一要素の始点の座標値を始点記憶レジスタRQS(n)から読み込むと共に(ステップS20)、指標rの値を1に初期化し(ステップS21)、第r番目に選択された下側輪郭の一要素の終点の座標値を終点記憶レジスタRQE(r)から読み込み(ステップS22)、両者が一致するか否かを判別する(ステップS23)。当然、同じ要素の始点と終点とは一致しないので、ステップS23における最初の判別結果(要するにn=r=1の場合)は必然的に偽となる。
【0030】
そこで、CPU1は指標rの値を1インクリメントし(ステップS24)、その値が要素選択数mの値を越えているか否かを判別する(ステップS25)。そして、rの値が要素選択数mを越えていなければ、CPU1は、更新された指標rの値に基いて再び第r番目に選択された下側輪郭の一要素の終点の座標値を終点記憶レジスタRQE(r)から読み込み(ステップS22)、その値が第n番目に選択された下側輪郭の一要素の始点の座標値RQS(n)と一致するか否かを判別する(ステップS23)。
【0031】
ここで、第n番目に選択された下側輪郭の一要素の始点の座標値RQS(n)が第r番目に選択された下側輪郭の一要素の終点の座標値RQE(r)と一致すれば、第n番目に選択された下側輪郭の一要素が加工開始点からの経路上で最も最初の位置に位置する選択要素ではないことが判明するので、CPU1は、指標nの値を1インクリメントし(ステップS26)、更新された指標nの値に基いて再び第n番目に選択された下側輪郭の一要素の始点の座標値RQS(n)を読み込み(ステップS20)、第n番目に選択された下側輪郭の一要素が加工開始点からの経路上で最も最初の位置に位置する選択要素となり得るかどうかを、前記と同様、ステップS21〜ステップS25のループ処理で判定する。
【0032】
結果的に、加工開始点からの経路上で最も最初の位置に位置する選択要素となる選択要素は、如何なる選択要素の終点座標とも一致しない始点座標を有する選択要素、つまり、ステップS25の判別結果が真となる選択要素である。当然、この選択要素は第n回目の選択操作で選ばれた選択要素でもある。
【0033】
図7の例では選択要素Qi 〜Qi+1 の終点がQi+1 、選択要素Qi+1 〜Qi+2 の終点がQi+2 、選択要素Qi+2 〜Qi+3 の終点がQi+3 であるから、これらの終点のいずれとも異なる始点を有する選択要素Qi 〜Qi+1 が加工開始点からの経路上で最も最初の位置に位置する選択要素である。
【0034】
このようにして加工開始点からの経路上で最も最初の位置に位置する選択要素を検出したCPU1は、指標wの値を1に初期化した後(ステップS27)、加工開始点からの経路上で第w番目の位置に位置する一選択要素、つまり、第n回目の選択操作で選ばれた選択要素に対応する移動量を移動量記憶レジスタS(n)から読み込み(ステップS28)、その選択要素の移動量S(n)が全ての選択要素の移動量の総和、つまり、積算値記憶レジスタΣSmの値に対して占める割合を求め、その割合をレジスタZ(w)に記憶する(ステップS29)。
【0035】
従って、図7の例では加工開始点からの経路上で第1番目の位置に位置する選択要素Qi 〜Qi+1 が下側輪郭における全ての選択要素の移動量の総和ΣSmの値に対して占める移動量の割合がレジスタZ(1)に記憶されることになる。
【0036】
次いで、CPU1は加工開始点からの経路上で第w番目の位置に位置する一選択要素、つまり、第n回目の選択操作で選ばれた選択要素に対応する終点の座標値を終点記憶レジスタRQE(n)から読み込むと共に(ステップS30)、指標rの値を再び1に初期化し(ステップS31)、第r番目に選択された下側輪郭の一要素に対応する始点の座標値を始点記憶レジスタRQS(r)から読み込んで(ステップS32)、両者が一致するか否かを判別する(ステップS33)。そして、両者が一致しない場合は指標rの値を1インクリメントし(ステップS34)、更新された指標rの値に基いて再び第r番目に選択された下側輪郭の一要素に対応する始点の座標値を始点記憶レジスタRQS(r)から読み込み(ステップS32)、その値が第n番目に選択された下側輪の一郭要素、つまり、加工開始点からの経路上で第w番目の位置に位置する下側輪郭の一要素の終点の座標値RQE(n)と一致するか否かを判別する(ステップS33)。
【0037】
下側輪郭の要素の選択数mが2以上である限り、加工開始点からの経路上で最も最初の位置に位置する一選択要素の終点の座標値と一致する始点を備えた選択要素は、選択されたm個の下側輪郭要素の中に必ず存在するので、少なくとも、w=1の場合においては、ステップS32〜ステップS34の処理を繰り返し実行する間に、ステップS33の判別結果が必ず真となる。
【0038】
そこで、加工開始点からの経路上で第w番目の位置に位置する選択要素、要するに、第n番目に選択された下側輪郭要素の終点の座標値と一致する始点RQS(r)を備えた下側輪郭要素を検出したCPU1は、指標wの値を1インクリメントし(ステップS35)、加工開始点からの経路上で第w番目の位置に位置する選択要素、要するに、第r回目の選択操作で選択された選択要素に対応する移動量を移動量記憶レジスタS(r)から読み込み(ステップS36)、その選択要素の移動量S(r)が下側輪郭における全ての選択要素の移動量の総和ΣSmの値に対して占める割合を求め、その割合をレジスタZ(w)に記憶する(ステップS37)。
【0039】
図7の例では加工開始点からの経路上で最も最初の位置に位置する選択要素、つまり、w=1の選択要素はQi 〜Qi+1 であり、その終点と一致する座標値Qi+1 を始点として備えた下側輪郭要素Qi+1 〜Qi+2がステップS32〜ステップS34の処理で検出される。その後、指標wの値が直ちに1インクリメントされるので、結果的に、選択要素Qi+1 〜Qi+2は加工開始点からの経路上で第2番目に位置する選択要素として認識され、レジスタZ(2)には、加工開始点からの経路上で第2番目の位置に位置する選択要素Qi+1 〜Qi+2の移動量が下側輪郭における全ての選択要素の移動量の総和ΣSmの値に対して占める割合が記憶されることになる。
【0040】
次いで、CPU1は指標wの値が要素選択数mの値に達しているか否か、要するに、m個の選択要素の各々に対し、その移動量が移動量の総和に対して占める割合を算出するための処理が全て行われているか否かを判別する(ステップS38)。そして、移動量の占める割合を求めていない選択要素がまだあって指標wの値がmの値に達していなければ、CPU1は、指標nに指標rの値を置換し(ステップS39)、第n回目の選択操作で選択された選択要素、要するに、加工開始点からの経路上で第w番目の位置に位置する一選択要素の終点に対応する座標値を終点記憶レジスタRQE(n)から読み込み(ステップS30)、以下、前記と同様の処理を繰り返し実行して、加工開始点からの経路上で前記第w番目の位置に位置する選択要素に続く加工経路下流側の次の一選択要素に対応する指標rの値を特定し(ステップS31〜ステップS34)、指標wの値を1インクリメントして(ステップS35)、加工開始点からの経路上で第w番目の位置に位置する次の一選択要素に対応する移動量を移動量記憶レジスタS(r)から読み込み(ステップS36)、その一選択要素の移動量S(r)が下側輪郭における全ての選択要素の移動量の総和ΣSmの値に対して占める割合を求め、その割合をレジスタZ(w)に記憶する(ステップS37)。
【0041】
図7の例では加工開始点からの経路上で第2番目の位置に位置する選択要素、つまり、w=2の選択要素はQi+1 〜Qi+2 であり、その終点と一致する座標値Qi+2 を始点として備えた下側輪郭要素Qi+2 〜Qi+3 がステップS32〜ステップS34の処理で検出され、その後、指標wの値が直ちに1インクリメントされるので、結果的に、選択要素Qi+2 〜Qi+3 は加工開始点からの経路上で第3番目の位置に位置する選択要素として認識され、レジスタZ(3)には、加工開始点からの経路上で第3番目の位置に位置する選択要素Qi+2 〜Qi+3 の移動量が下側輪郭における全ての選択要素の移動量の総和ΣSmの値に対して占める割合が記憶されることになる。
【0042】
ここでは選択要素が3つである図7の事例を参考にして説明を進めているのでw=3となった段階でステップS38の判別結果が偽となり、ステップS30〜ステップS38およびステップS39のループ処理が終了するが、既に述べた通り、実際には2つ以上であれば幾つの要素を選択しても良く、結果的に、選択要素の選択順序とは関わりなく、加工開始点からの経路上で上流側に位置する選択要素の側から順に、w=1,w=2,w=3,・・・の各w番目の位置に位置する一選択要素の移動量が下側輪郭における全ての選択要素の移動量の総和に対して占める割合が求められ、その値がレジスタZ(w)に順次格納されて行くことになる。当然、選択要素数mの値が4であれば3回,選択要素数mの値が5であれば4回,・・・と、前述したステップS30〜ステップS38およびステップS39のループ処理が繰り返される。
【0043】
従って、既に述べた通り、上側輪郭の1つの要素に対応させるべき下側輪郭の要素の各々をオペレータが予め加工経路に沿って順番に上流側からマウスクリックして選択するといった必要性は全くない。
【0044】
そして、最終的に、加工開始点からの経路上w=1〜m番目の全ての選択要素の各々が下側輪郭における全ての選択要素の移動量の総和に対して占める割合の各々が求められ、ステップS38の判別結果が偽となると、CPU1は指標rの値を再び1に初期化し(ステップS40)、割合積算値記憶レジスタΣZwの値を0に初期化して(ステップS41)、加工開始点からの経路上で第r番目の位置に位置する一選択要素に対応する割合の値Z(r)を読み込み(ステップS42)、割合積算値記憶レジスタΣZwに加算記憶し(ステップS43)、上面側の選択要素である加工経路RPS〜RPE間の移動軌跡上において、RPSを始点として、RPS〜RPE間の移動量に対する移動量の割合がΣZwとなる移動位置の座標〔U(r),V(r)〕を求め、その位置に一要素の終点および始点となる点のデータを挿入して、RPS〜RPE間の軌跡を分割する(ステップS44)。
【0045】
移動位置の座標〔U(r),V(r)〕はΣZwの値および加工経路RPS〜RPE間の移動量Sと軌跡の方程式により算出することができる。
【0046】
r=1の段階では割合積算値記憶レジスタΣZwの値が0に初期化されており、レジスタZ(r)には加工開始点からの経路上で第1番目の位置に位置する下面側の一選択要素Qi 〜Qi+1 の割合が記憶されているので、図7の例では、選択要素Qi 〜Qi+1 ,選択要素Qi+1 〜Qi+2 ,選択要素Qi+2 〜Qi+3 の経路長の総和に対して選択要素Qi 〜Qi+1 が占める割合に比例して、例えば、図7における点αの座標値〔U(1),V(1)〕が加工経路RPS〜RPE間の移動軌跡上の分割点として挿入されることになる。
【0047】
次いで、CPU1は指標rの値を1インクリメントし(ステップS45)、指標rの値が要素選択数mの値よりも小さいか否かを判別するが(ステップS46)、指標rの値が要素選択数mの値よりも小さければ、CPU1は、更新された指標rの値に基き、再び加工開始点からの経路上で第r番目の位置に位置する一選択要素に対応する割合の値Z(r)を読み込み(ステップS42)、割合積算値記憶レジスタΣZwに加算記憶し(ステップS43)、上面側の選択要素である加工経路RPS〜RPE間の移動軌跡上において、RPSを始点として、RPS〜RPE間の移動量に対する移動量の割合がΣZwとなる移動位置の座標〔U(r),V(r)〕を求め、その位置に一要素の終点および始点となる点のデータを挿入して、RPS〜RPE間の軌跡を更に分割する(ステップS44)。
【0048】
r=2の段階では選択要素Qi 〜Qi+1 が選択要素Qi 〜Qi+1 ,選択要素Qi+1 〜Qi+2 ,選択要素Qi+2 〜Qi+3 の経路長の総和に対して占める割合が積算値記憶レジスタΣZwに既に記憶されており、更に、この値にレジスタZ(r)に記憶されている加工開始点からの経路上で第2番目の位置に位置する下面側の一選択要素の割合が加算記憶されることになるので、図7の例では、選択要素Qi 〜Qi+1 ,選択要素Qi+1 〜Qi+2 ,選択要素Qi+2 〜Qi+3 の経路長の総和に対して選択要素Qi 〜Qi+1 とQi+1 〜Qi+2 の和が占める割合に比例して、例えば、図7における点βの座標値〔U(2),V(2)〕が加工経路RPS〜RPE間の移動軌跡上の分割点として新たに挿入されることになる。
【0049】
最終的に、r=mとなって下面側の選択要素の各々が占める割合が全て加算されれば、ΣZwの値は必然的に1となり、ステップS44の処理で算出される移動位置の座標〔U(m),V(m)〕の値が加工経路RPS〜RPEの終点座標RPEと一致することになるで、実際にステップS42〜ステップS44の処理を実施して〔U(m),V(m)〕の値を求める必要はない。この実施形態ではこの点を考慮し、ステップS46における判別基準をr<mとし、r=mの際の演算処理は非実行としている。
【0050】
以上の処理により、加工開始点からの経路上で第1番目に位置する下面側の選択要素が下面側選択要素の移動量の総和に対して占める割合,第2番目の位置に位置する下面側の選択要素が下面側選択要素の移動量の総和に対して占める割合,・・・,第m番目(最後)の位置に位置する下面側の選択要素が下面側選択要素の移動量の総和に対して占める割合の各々に比例して、上面側の選択要素RPS〜RPE間の移動軌跡が座標値〔U(1),V(1)〕,〔U(2),V(2)〕,・・・,〔U(m−1),V(m−1)〕によってZ(1):Z(2):・・・:Z(m)の比率で分割されることになる。
【0051】
以降の処理に関しては図1に示す従来例と全く同様であり、上面側加工経路を構成する1つ1つの要素と下面側加工経路を構成する1つ1つの要素とが加工開始点を基準として端から順に一対一の関係で対応づけられ、上下の加工経路を要素単位で補間しながら外周部の加工を行うNCデータが自動的に生成されてゆくことになるが、下面側の選択要素の選択個数に合わせて本来単一である上面側の選択要素の側を複数に分割するようにしているので、上下の加工経路の対応関係を各位置において常に適確な状態に保って上下の加工経路を補間しながら外周部の加工を行うNCデータを作成することができるようになる。
【0052】
つまり、図7における点α〔U(1),V(1)〕と点β〔U(2),V(2)〕は、図1の処理においては、加工開始点から数えてi+1 番目の座標値とi+2 番目の座標値として扱われ、編集処理前の上面側加工経路の選択要素の終点Pi+1 が第i+1+2 番目の座標値として扱われるということである。要するに、選択要素数がmであれば、編集処理前の上面側加工経路の選択要素の終点Pi+1 が第(m-1)+1 番目の座標値として扱われるわけで、図7の例では(m-1) の値が2になっているということである。
【0053】
以上、1つの実施形態として、上面側の加工経路の一要素に対応させる下面側の加工経路の要素の長さの割合に比例させて上面側の加工経路の要素を分割する場合について述べたが、ラフな加工のためのNCデータを生成するのであれば、必ずしも厳密な比例関係を保つ必要はなく、単に、上面側の加工経路の一要素を下面側の加工経路の要素の選択数で均等に分割してしまっても構わない。
【0054】
このような処理を行うのであれば、ステップS1〜ステップS9,ステップS11〜ステップS12,ステップS14,ステップS40〜ステップS41およびステップS43〜ステップS46の処理のみを実施すればよい。但し、この場合、ステップS42に変わる処理としてZ(r)←1/mの演算処理を行う必要がある。無論、同じ演算を繰り返す必要はないのでステップS46からの復帰先はZ(r)←1/mの演算処理とステップS43の処理との間でよい。
【0055】
要するに、下面側の加工経路の選択要素数mを把握して、上面側の選択要素RPS〜RPE間の移動軌跡上にS/mの移動量の刻み幅で〔m−1〕個の分割点を挿入するだけのことである。
【0056】
この場合は必ずしも円滑な加工が行われるとは限らないが、少なくとも上下面の加工要素の数だけは一致させることができるので、対応位置のずれによって図7に一点鎖線で示すような異常加工が行われることだけは確実に防止することができる。
【0057】
【発明の効果】
本発明によれば、上側または下側の加工経路の1要素を任意に選択し、これに対応させて加工を行うべき他側の面の加工経路の要素を複数選択するだけで、自動プログラミング装置が前記1要素を自動的に分割して上下の加工経路の対応関係を再定義するので、オペレータが面倒な演算処理や形状データの修正作業を行わなくても、上下の要素の対応関係が一対多となるような場合の外周輪郭加工のためのNCデータを簡単に生成させることができる。
【図面の簡単な説明】
【図1】NC自動プログラミング装置におけるNCデータ生成機能のアルゴリズムを概念的に示すフローチャートである。
【図2】本発明の一実施形態における編集処理の概略を示すフローチャートである。
【図3】編集処理の概略を示すフローチャートの続きである。
【図4】編集処理の概略を示すフローチャートの続きである。
【図5】編集処理の概略を示すフローチャートの続きである。
【図6】加工物の上面側加工経路の要素と下面側加工経路の要素とが単純な一対一の関係にある場合の要素間の対応づけを示す概念図である。
【図7】上面側加工経路の1つの要素に対応させて下面側加工経路の複数の要素を加工する必要がある場合の要素間の対応づけを示す概念図である。
【図8】本発明の一実施形態におけるNC自動プログラミング装置を示すブロック図である。
【符号の説明】
1 CPU
2 グラフィックディスプレイ
3 キーボード
4 マウス
5 バス
6 ROM
7 RAM
8 ハードディスク
9 ディスクドライブユニット
10 フロッピーディスク
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an improvement in an NC automatic programming device.
[0002]
[Prior art]
An NC that creates or reads the shape data of a workpiece in which the machining path on the upper surface and the machining path on the lower surface are different and associates the elements of the upper and lower machining paths with each other, and performs processing of the outer peripheral portion while interpolating the upper and lower machining paths in element units. An NC automatic programming device having a function of generating data is already known, and is used for generating NC data of a wire electric discharge machine or a machine tool having five or more feed axes.
[0003]
The algorithm of the NC data generation function in this type of NC automatic programming device can be conceptually shown by the flowchart of FIG. Now, it is assumed that there is CAD data of a workpiece having the upper surface side processing path PT1 and the lower surface side processing path PT2 as shown in FIG.
[0004]
Assuming that the NC data generation processing is performed on the shape data by the conventional NC automatic programming device, the NC automatic programming device first determines the upper surface side machining path PT1 and the lower surface machining path PT1 based on the initialized index i. The coordinate values of the machining start points P0 and Q0 of the side machining path PT2, that is, the coordinate values of the start point of the first element in each machining path are read and stored in the start point storage registers RPS and RQS (steps T1 to T3). Further, the value of the index i is incremented by one, and the coordinate values of the next points P1 and Q1 in the upper surface processing path PT1 and the lower surface processing path PT2, that is, the coordinate values of the end point of the first element in each processing path are calculated. It is read and stored in the end point storage registers RPE and RQE (steps T4 to T7).
[0005]
Here, the NC automatic programming device obtains the movement amount of one element between the upper surface processing paths RPS to RPE and the movement amount of one element between the lower surface processing paths RQS to RQE, and the wire or tool is used for the upper surface processing. While moving the path PT1 from the RPS to the RPE, a movement command is determined such that the wire or tool moves the lower surface processing path PT2 from the RQS to the RQE, and the movement command is additionally stored in the memory as a part of the processing program. (Step T8 to Step T10). Then, the NC automatic programming device updates and stores the contents of the end point storage registers RPE and RQE at the present time in the start point storage registers RPS and RQS as the start point of the next element in the upper surface processing path PT1 and the lower surface processing path PT2. Prepare for calculating the movement amount for one element (step T11).
[0006]
Hereinafter, until the processing for the machining end point, which is the end point of the last element, is completed, the value of the index i is successively increased, and the same processing as described above is repeated. Each element forming the processing path PT1 and each element forming the lower processing path PT2 are, for example, the first element of the upper processing path PT1 and the lower processing on the basis of the processing start point. The first element of the path PT2, the second element of the upper surface processing path PT1, the second element of the lower processing path PT2,... Become.
[0007]
Therefore, the upper surface side processing path PT1 and the lower side side processing path PT2 may have a simple offset relationship as shown in FIG. 6, but for example, as shown in FIG. A problem arises when it is desired to process a plurality of elements on the lower surface side processing path in correspondence with one element.
[0008]
In the example of FIG. 7, three linear elements Qi to Qi + 1, Qi + 1 to Qi + 2, and Qi + 2 to Qi of the lower processing path are compared with one arc element Pi to Pi + 1 of the upper processing path. FIG. 7 shows a case where machining is to be performed in correspondence with +3. Naturally, in such machining, a series of contours formed by a plurality of elements of the lower surface side machining path, for example, three straight lines in FIG. It is necessary to smoothly interpolate between the polygonal line formed by the elements and one arc element of the upper surface side processing path, but processing is performed as it is by applying the above-described algorithm to the NC automatic programming device to generate NC data. Is executed, one arc element Pi to Pi + 1 on the upper surface side machining path and one linear element Qi to Qi + 1 on the lower surface side machining path correspond one-to-one, as indicated by a chain line in FIG. Is completely different from what the designer intended. This results in the generation of a workpiece.
[0009]
This is because, as described above, each element constituting the upper surface side machining path and each element constituting the lower surface side machining path are in a one-to-one relationship in order from the end with respect to the machining start point. This is because they are associated.
[0010]
Further, a straight line element Qi to be machined together with the upper surface machining paths Pi to Pi + 1 between the element after the point Pi + 1 of the upper surface machining path and the element after the point Qi + 1 of the lower surface machining path. Correspondence deviations corresponding to two elements corresponding to +1 to Qi + 2 and Qi + 2 to Qi + 3 are constantly generated, so that not only abnormal corner processing as shown by a chain line in FIG. Instead, it can mean that the entire workpiece is randomly chopped.
[0011]
Therefore, in order to avoid such a problem, the side of one element that should correspond to a plurality of elements, that is, the side of the arc elements Pi to Pi + 1 of the upper surface side processing path in the example of FIG. It is necessary to prevent the above-described misalignment by dividing into a plurality according to the number of elements of the corresponding lower surface processing path. In short, in the example of FIG. 7, the shape data is corrected by inserting two insertion points α and β on the path of the arc elements Pi to Pi + 1 and dividing the arc elements Pi to Pi + 1 into three sections. However, no special means has been provided so far for correcting the shape data in order to determine the position of the insertion point, and all arithmetic processing and correction work must be performed by the operator himself. However, there was a problem that it took time to work.
[0012]
[Problems to be solved by the invention]
An object of the present invention is to solve the above-mentioned disadvantages of the prior art, and even when processing is performed by associating elements of upper and lower processing paths in a one-to-many manner, the operator himself / herself performs cumbersome arithmetic processing and shape data correction work. An object of the present invention is to provide an NC automatic programming device that can easily generate NC data for contour processing without any need.
[0013]
[Means for Solving the Problems]
The present invention Processed With the machining path on the top Processed Create or read the shape data of a workpiece with a machining path different from that of the lower surface, make the elements of the upper and lower machining paths correspond, and interpolate the upper and lower machining paths in element units. Raka In an NC automatic programming device having a function of generating NC data for performing machining, one element of an upper or lower machining path is arbitrarily selected and a plurality of machining paths of a surface on the other side corresponding to the one element are selected. Means for selecting by an element, and means for dividing the one element into a plurality of elements by the number of the plurality of elements in accordance with the length of a machining path of each element in the plurality of elements. Has achieved the above object.
[0014]
A means for arbitrarily selecting one element of the upper or lower processing path and selecting a processing path of the other surface corresponding to the one element by a plurality of elements; A similar feature is achieved by a configuration characterized by comprising means for equally dividing the number into a plurality.
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 8 is a block diagram showing a main part of an NC automatic programming device according to an embodiment to which the present invention is applied. 1 is a microprocessor (hereinafter referred to as a CPU), 6 is a ROM storing a start-up program of the NC automatic programming device, 8 is a hard disk storing various control programs and system programs, etc., and 7 is a process in a calculation and display process. A RAM for temporarily storing data to be used, a disk drive unit 9 for reading processing shape data and processing programs stored in the floppy disk 10 and writing new data, a keyboard 3, a keyboard 2, and a graphic 2 The display 4 is a mouse for moving a cursor, selecting an element, and the like. These elements are connected to the CPU 1 via a bus 5.
[0016]
This NC automatic programming device has various functions required for CAD / CAM, for example, a shape input function for creating shape data of a machining shape by an input operation using a keyboard 3 and a mouse 4, and a created machining process. Automatic programming function for automatically creating a series of machining programs according to the shape, designated tools and cutting conditions, and the designated machining order, etc. A drawing function for drawing a tool path and a tool position by performing a simulation while running the program is provided similarly to a conventional NC automatic programming device. A system program for realizing this is stored in the hard disk 8. Selection of these various functions is performed by moving the cursor on the graphic display 2 with the mouse 4 and selecting the corresponding menu item from the menu display.
[0017]
FIG. 8 only shows components for realizing various functions required of the NC automatic programming device, and omits the description related to the drive control of the NC machine tool.
[0018]
2 to 5 show the contours of the upper and lower machining paths created by the CAD function of the NC automatic programming device for a wire electric discharge machine or a machine tool having five or more feed axes. It is a flowchart which shows the outline of the edit processing in the case of performing processing by making an element correspond in one-to-many.
[0019]
Hereinafter, the editing process unique to the present embodiment will be described assuming that the contours of the upper and lower machining paths of the workpiece are created in advance by the CAD function of the NC automatic programming device in the same manner as in the related art. The outline of the processing path is assumed to be the same as that in FIG. 7, and the graphic display 2 has already displayed the upper and lower processing paths as shown in FIG. 7.
[0020]
This editing process is used only when processing is performed by making the elements of the upper and lower processing paths correspond one-to-many, and when the operator does not select the execution of the editing process after creating the shape data, If the determination result of step S1 in FIG. 2 is false, the conventional processing shown in FIG. 1 is performed on the shape data created at this stage without any change, and one by one constituting the upper surface side processing path is obtained. One element and one element constituting the lower surface side machining path are associated with each other in a one-to-one relationship from the end based on the machining start point, and machining of the outer peripheral portion is performed while interpolating the upper and lower machining paths in element units. Is automatically generated.
[0021]
On the other hand, when it is necessary to perform the processing by making the elements of the upper and lower processing paths correspond to one-to-many, first, the operator operates the edit execution key to cause the CPU 1 to execute the processing after step S2.
[0022]
First, the CPU 1 that has started the editing processing displays a message on the graphic display 2 to select one element from the outline on the side for selecting one element (in this embodiment, the upper outline) (step S1). S2), and enters a standby state waiting for a mouse click operation by the operator (step S3). Then, when the operator performs a selection operation by mouse click and selects one element from the upper contour, the CPU 1 determines the start point (Uj, Vj) of one element of the upper processing path closest to the position where the mouse click is performed. And its end point (Uj + 1, Vj + 1) are identified (step S4), and the coordinates of each point are stored in the start point storage register RPS and the end point storage register RPE (step S5).
In the example of FIG. 7, the elements Pi to Pi + 1 are selected as one element of the upper machining path corresponding to a plurality of elements of the lower machining path, and as a result, (Ui) of FIG. , Vi), and the coordinate value of (Ui + 1, Vi + 1) in FIG. 7 is stored in the end point storage register RPE.
[0023]
Next, the CPU 1 obtains the movement amount (stroke) for one element between the upper surface side processing paths RPS and RPE (step S6), stores the value in the movement amount storage register S (step S7), and selects the selected contour ( A message indicating that a plurality of elements of the other contour (lower contour) to be made to correspond to one element of the upper contour (lower contour) is displayed on the graphic display 2 (step S8), and the index m and the integrated value storage register $ Sm are displayed. The value is initialized to zero (steps S9 and S10), and the operator selects a lower contour element by mouse click (step S11) or enters a standby state waiting for the operator to operate a selection end key. Enter (step S12).
[0024]
Here, when the operator performs a mouse click operation as described above to select one element of the lower contour, the CPU 1 increments the value of the index m by one and updates the value of the element selection number (step S14). The start point (Xk, Yk) and the end point (Xk + 1, Yk + 1) of one element of the lower machining path closest to the position where the mouse click is performed are identified (step S15), and the coordinates of each point are stored in the start point storage register. RQS (m) and the end point storage register RQE (m) are stored (step S16), and the movement amount of one element between the lower surface side processing paths RQS (m) to RQE (m) is obtained (step S17). The value is stored in the movement amount storage register S (m) (step S18), and the value of the movement amount S (m) is added and stored in the integrated value storage register $ Sm (step S19).
[0025]
Thereafter, each time the operator performs a mouse click operation to select one element of the lower contour, the processes of steps S14 to S19 are repeatedly executed in the same manner as described above.
[0026]
In the example of FIG. 7, the elements of the lower contour that should correspond to one element of the upper contour are the three elements Qi to Qi + 1, Qi + 1 to Qi + 2, and Qi + 2 to Qi + 3. The processing of steps S14 to S19 is performed three times in total. It is not necessary to select the elements in the order of Qi to Qi + 1, Qi + 1 to Qi + 2, Qi + 2 to Qi + 3 along the path from the machining start point. For example, Qi + 1 to Qi +2, Qi to Qi + 1, Qi + 2 to Qi + 3, or Qi + 2 to Qi + 3, Qi to Qi + 1, Qi + 1 to Qi + 2, and these three elements are The order of the selection operation does not matter as long as it is selected.
[0027]
Here, since the description is being made with reference to the example of FIG. 7, the number of elements to be selected is three, but in practice, any number of elements may be selected as long as the number is two or more.
[0028]
As a result, the movement amount storage register S (m) stores the movement amount of one element of the lower contour selected by the m-th click operation, and the start point storage register RQS (m) and the end point storage register RQE (m) stores the start point and end point of one element of the lower contour selected by the m-th click operation. Naturally, the value stored in the integrated value storage register $ Sm is the moving amount of one element selected in the first time, the moving amount of one element selected in the second time,..., The m-th time. Further, the total sum of the movement amounts of one element is stored.
[0029]
Then, when the operator who has selected all the elements of the lower contour to be made to correspond to one element of the upper contour operates the selection end key, the CPU 1 initializes the value of the index n to 1 (step S13), The coordinate value of the start point of one element of the n-th lower contour is read from the start point storage register RQS (n) (step S20), the value of the index r is initialized to 1 (step S21), and the r-th index is set. Is read from the end point storage register RQE (r) (step S22), and it is determined whether or not they match (step S23). Naturally, since the start point and the end point of the same element do not match, the first determination result in step S23 (in short, when n = r = 1) is necessarily false.
[0030]
Therefore, the CPU 1 increments the value of the index r by one (step S24), and determines whether or not the value exceeds the value of the number m of element selections (step S25). If the value of r does not exceed the number m of element selections, the CPU 1 returns the coordinate value of the end point of one element of the r-th lower contour again based on the updated value of the index r to the end point. It is read from the storage register RQE (r) (step S22), and it is determined whether or not the value matches the coordinate value RQS (n) of the start point of one element of the n-th lower contour (step S23). ).
[0031]
Here, the coordinate value RQS (n) of the start point of one element of the n-th lower contour coincides with the coordinate value RQE (r) of the end point of one element of the r-th lower contour. Then, it is found that one element of the n-th selected lower contour is not the selected element located at the first position on the path from the machining start point, and the CPU 1 sets the value of the index n to The value is incremented by one (step S26), and the coordinate value RQS (n) of the start point of one element of the n-th lower contour selected again based on the updated value of the index n is read (step S20). Whether or not one element of the second lower contour selected can be the selected element located at the first position on the path from the machining start point is determined by the loop processing of steps S21 to S25 as described above. .
[0032]
As a result, the selected element that is the first selected element on the path from the machining start point is a selected element having start point coordinates that do not match any end point coordinates of any selected element, that is, the determination result of step S25. Is a true selection element. Naturally, this selection element is also the selection element selected in the n-th selection operation.
[0033]
In the example of FIG. 7, the end point of the selection elements Qi to Qi + 1 is Qi + 1, the end point of the selection elements Qi + 1 to Qi + 2 is Qi + 2, and the end point of the selection elements Qi + 2 to Qi + 3 is Qi + 3. Therefore, the selection elements Qi to Qi + 1 having start points different from any of these end points are the selection elements located at the first position on the path from the machining start point.
[0034]
After detecting the selected element located at the first position on the path from the processing start point in this way, the CPU 1 initializes the value of the index w to 1 (step S27), and then on the path from the processing start point. Then, the movement amount corresponding to one selected element located at the w-th position, that is, the movement amount corresponding to the selection element selected by the n-th selection operation is read from the movement amount storage register S (n) (step S28), and the selection is performed. The sum of the movement amounts of the elements S (n) with respect to the value of the integrated value storage register $ Sm is calculated, and the ratio is stored in the register Z (w) (step S29). ).
[0035]
Therefore, in the example of FIG. 7, the selected elements Qi to Qi + 1 located at the first position on the path from the machining start point are determined by the sum of the movement amounts ΣSm of all the selected elements in the lower contour. The ratio of the occupied moving amount is stored in the register Z (1).
[0036]
Next, the CPU 1 stores the coordinate value of one selected element located at the w-th position on the path from the processing start point, that is, the coordinate value of the end point corresponding to the selected element selected by the n-th selection operation in the end point storage register RQE. (N) (step S30), the value of the index r is initialized to 1 again (step S31), and the coordinate value of the start point corresponding to one element of the r-th selected lower contour is stored in the start point storage register. RQS (r) is read (step S32), and it is determined whether or not both match (step S33). If the two do not match, the value of the index r is incremented by 1 (step S34), and the start point corresponding to one element of the r-th lower contour is selected again based on the updated value of the index r. The coordinate values are read from the start point storage register RQS (r) (step S32), and the values are stored in one element of the n-th selected lower wheel, that is, the w-th position on the path from the machining start point. It is determined whether or not the coordinate value is equal to the coordinate value RQE (n) of the end point of one element of the lower contour located at (step S33).
[0037]
As long as the selected number m of the elements of the lower contour is 2 or more, the selected element having the start point that matches the coordinate value of the end point of one selected element located at the first position on the path from the processing start point is: Since w is always present in the selected m lower contour elements, at least in the case of w = 1, the determination result of step S33 is always true while the processing of steps S32 to S34 is repeatedly performed. It becomes.
[0038]
Therefore, a selection element positioned at the w-th position on the path from the machining start point, that is, a start point RQS (r) that matches the coordinate value of the end point of the n-th selected lower contour element is provided. Upon detecting the lower side contour element, the CPU 1 increments the value of the index w by 1 (step S35), and selects the selection element located at the w-th position on the path from the processing start point, that is, the r-th selection operation. Is read from the movement amount storage register S (r) (step S36), and the movement amount S (r) of the selected element is equal to the movement amount of all the selected elements in the lower contour. The ratio occupying the value of the sum ΣSm is obtained, and the ratio is stored in the register Z (w) (step S37).
[0039]
In the example of FIG. 7, the selected element located at the first position on the path from the machining start point, that is, the selected element with w = 1 is Qi to Qi + 1, and the coordinate value Qi + 1 coincides with the end point. Are detected as the starting points in the processes of steps S32 to S34. Thereafter, the value of the index w is immediately incremented by one. As a result, the selected elements Qi + 1 to Qi + 2 are recognized as the second selected elements on the path from the machining start point, and the register Z In (2), the moving amount of the selected elements Qi + 1 to Qi + 2 located at the second position on the path from the machining start point is the sum of the moving amounts ΣSm of the moving amounts of all the selected elements in the lower contour. The ratio to the value is stored.
[0040]
Next, the CPU 1 calculates whether or not the value of the index w has reached the value of the number m of element selections, in other words, for each of the m selected elements, calculates the ratio of the movement amount to the total movement amount. It is determined whether or not all of the processes for this have been performed (step S38). If there is still a selected element for which the ratio of the movement amount has not been determined and the value of the index w has not reached the value of m, the CPU 1 replaces the value of the index r with the value of the index n (step S39). From the end point storage register RQE (n), the coordinate value corresponding to the end point of the selected element selected by the n-th selection operation, that is, the end point of one selected element located at the w-th position on the path from the machining start point is read. (Step S30) Hereinafter, the same processing as described above is repeatedly executed to select the next selected element downstream of the machining path following the selected element located at the w-th position on the path from the machining start point. The value of the corresponding index r is specified (steps S31 to S34), the value of the index w is incremented by 1 (step S35), and the next one located at the w-th position on the path from the processing start point is determined. Select element The corresponding movement amount is read from the movement amount storage register S (r) (step S36), and the movement amount S (r) of one selected element is determined based on the sum of the movement amounts of all the selected elements in the lower contour ΣSm. Is obtained, and the obtained ratio is stored in the register Z (w) (step S37).
[0041]
In the example of FIG. 7, the selected element located at the second position on the path from the machining start point, that is, the selected elements with w = 2 are Qi + 1 to Qi + 2, and the coordinate values coincide with the end point thereof. The lower contour elements Qi + 2 to Qi + 3 having Qi + 2 as a starting point are detected in the processes of steps S32 to S34, and thereafter, the value of the index w is immediately incremented by one. The elements Qi + 2 to Qi + 3 are recognized as the selected elements located at the third position on the path from the machining start point, and the register Z (3) stores the third element on the path from the machining start point. The ratio of the amount of movement of the selected elements Qi + 2 to Qi + 3 located at the position of the sum of the amounts of movement of all the selected elements in the lower contour ΣSm is stored.
[0042]
Here, since the description is being made with reference to the case of FIG. 7 in which there are three selection elements, the determination result of step S38 becomes false when w = 3, and the loop of steps S30 to S38 and step S39 is performed. Although the process is completed, as described above, any number of elements may be selected as long as there are actually two or more elements. As a result, regardless of the selection order of the selected elements, the path from the machining start point is determined. The moving amount of one selected element located at the w-th position of w = 1, w = 2, w = 3,. Of the selected element with respect to the total amount of movement of the selected element is obtained, and the value is sequentially stored in the register Z (w). Naturally, if the value of the number m of selected elements is 4, three times, if the value of the number m of selected elements is 5, four times,... It is.
[0043]
Therefore, as described above, there is no necessity for the operator to select in advance the elements of the lower contour to be made to correspond to one element of the upper contour by clicking the mouse in order from the upstream side in advance along the machining path. .
[0044]
Finally, each of the ratios of all the w = 1 to m-th selected elements on the path from the machining start point to the sum of the movement amounts of all the selected elements in the lower contour is obtained. When the determination result of step S38 is false, the CPU 1 initializes the value of the index r to 1 again (step S40), initializes the value of the ratio integrated value storage register ΣZw to 0 (step S41), and sets the machining start point. The value Z (r) of the ratio corresponding to one selected element located at the r-th position on the route from is read (step S42), and added and stored in the ratio integrated value storage register ΣZw (step S43). On the movement path between the machining paths RPS and RPE, which is a selection element of, the coordinates of the movement position [U (r), where the ratio of the movement amount to the movement amount between RPS and RPE becomes ΣZw, starting from RPS. Seeking (r)], by inserting the data of the point where the end point and start point of an element in its position, divides the trajectory between RPS~RPE (step S44).
[0045]
The coordinates [U (r), V (r)] of the movement position can be calculated from the value of ΣZw, the movement amount S between the machining paths RPS to RPE, and the trajectory equation.
[0046]
At the stage of r = 1, the value of the ratio integrated value storage register ΣZw is initialized to 0, and the register Z (r) stores one of the lower surface side located at the first position on the path from the machining start point. Since the ratio of the selection elements Qi to Qi + 1 is stored, in the example of FIG. 7, the selection elements Qi to Qi + 1, the selection elements Qi + 1 to Qi + 2, and the selection elements Qi + 2 to Qi + 3 For example, the coordinate value [U (1), V (1)] of the point α in FIG. 7 is proportional to the ratio of the selection elements Qi to Qi + 1 to the sum of the path lengths, and is calculated between the processing paths RPS to RPE. Is inserted as a division point on the movement trajectory.
[0047]
Next, the CPU 1 increments the value of the index r by 1 (step S45) and determines whether or not the value of the index r is smaller than the value of the number m of element selections (step S46). If the value is smaller than the value of the number m, the CPU 1 again determines, based on the updated value of the index r, the value Z () of the ratio corresponding to one selected element located at the r-th position on the path from the machining start point. r) is read (step S42), added and stored in the ratio integrated value storage register ΣZw (step S43), and on the movement trajectory between the machining paths RPS and RPE, which are the selection elements on the upper surface side, the RPS is set as the starting point and the RPS and The coordinates [U (r), V (r)] of the movement position where the ratio of the movement amount to the movement amount between the RPEs is ΣZw are obtained, and data of the end point and the start point of one element are inserted into the position. , RPS ~ The trajectory between the RPEs is further divided (step S44).
[0048]
At the stage of r = 2, the selection elements Qi to Qi + 1 occupy the sum of the path lengths of the selection elements Qi to Qi + 1, the selection elements Qi + 1 to Qi + 2, and the selection elements Qi + 2 to Qi + 3. The ratio is already stored in the integrated value storage register $ Zw, and this value is further selected from the lower surface side located at the second position on the path from the machining start point stored in the register Z (r). Since the element ratios are added and stored, in the example of FIG. 7, the path lengths of the selected elements Qi to Qi + 1, the selected elements Qi + 1 to Qi + 2, and the selected elements Qi + 2 to Qi + 3 are determined. In proportion to the ratio of the sum of the selected elements Qi to Qi + 1 and Qi + 1 to Qi + 2 to the total sum, for example, the coordinate value [U (2), V (2)] of the point β in FIG. Is newly inserted as a division point on the movement trajectory between the processing paths RPS to RPE.
[0049]
Eventually, if r = m and all the proportions of the selected elements on the lower surface side are added, the value of ΣZw is necessarily 1 and the coordinates of the movement position calculated in the process of step S44 [ U (m), V (m)] coincides with the end point coordinates RPE of the machining paths RPS to RPE, so that the processing of steps S42 to S44 is actually performed and [U (m), V (M)]. In this embodiment, in consideration of this point, the determination criterion in step S46 is set to r <m, and the arithmetic processing when r = m is not executed.
[0050]
By the above-described processing, the ratio of the first lower-side selected element on the path from the machining start point to the total movement amount of the lower-side selected element, the lower-side side located at the second position Ratio of the selected element to the total movement amount of the lower-side selection element,..., The lower-side selection element located at the m-th (last) position is the sum of the movement amounts of the lower-side selection element. In proportion to each of the ratios occupied, the moving trajectory between the selection elements RPS to RPE on the upper surface side has coordinate values [U (1), V (1)], [U (2), V (2)], .., [U (m-1), V (m-1)], the data is divided at a ratio of Z (1): Z (2):...: Z (m).
[0051]
Subsequent processing is exactly the same as the conventional example shown in FIG. 1, in which each element constituting the upper surface processing path and each element constituting the lower surface processing path are based on the processing start point. NC data for machining the outer peripheral portion is automatically generated while interpolating the upper and lower machining paths in element units in order from the end in a one-to-one relationship. The upper side of the selection element, which is originally single, is divided into multiple parts according to the number of selections, so that the correspondence between the upper and lower processing paths is always kept in an appropriate state at each position and the upper and lower processing It becomes possible to create NC data for processing the outer peripheral portion while interpolating the path.
[0052]
That is, in the process of FIG. 1, the point α [U (1), V (1)] and the point β [U (2), V (2)] in FIG. Are treated as the i-th coordinate value and the (i + 2) -th coordinate value, and the end point Pi + 1 of the selected element of the upper surface side machining path before the editing process is treated as the (i + 1 + 2) -th coordinate value. . In short, if the number of selected elements is m, the end point Pi + 1 of the selected element on the upper surface side machining path before the editing process is treated as the (m-1) + 1-th coordinate value. Means that the value of (m-1) is 2.
[0053]
As described above, as one embodiment, a case has been described in which the elements of the upper processing path are divided in proportion to the length ratio of the elements of the lower processing path corresponding to one element of the upper processing path. However, if NC data for rough machining is to be generated, it is not always necessary to maintain a strict proportional relationship, and one element of the machining path on the upper surface is simply equalized by the number of elements selected for the machining path on the lower surface. It may be divided into.
[0054]
If such processing is performed, only the processing of steps S1 to S9, steps S11 to S12, step S14, steps S40 to S41, and steps S43 to S46 may be performed. However, in this case, it is necessary to perform an arithmetic process of Z (r) ← 1 / m as a process replacing step S42. Of course, it is not necessary to repeat the same operation, so the return destination from step S46 may be between the operation of Z (r) ← 1 / m and the process of step S43.
[0055]
In short, the number m of the selected elements of the machining path on the lower surface is grasped, and [m-1] division points on the locus of movement between the selected elements RPS to RPE on the upper surface with a step size of the moving amount of S / m. It just inserts.
[0056]
In this case, smooth machining is not always performed, but since at least the number of machining elements on the upper and lower surfaces can be matched, abnormal machining as indicated by a chain line in FIG. Only what is done can be reliably prevented.
[0057]
【The invention's effect】
ADVANTAGE OF THE INVENTION According to this invention, one element of the upper or lower machining path is arbitrarily selected, and the automatic programming device is selected only by selecting a plurality of elements of the machining path on the other surface to be machined in accordance with this. Automatically divides the one element and redefines the correspondence between the upper and lower machining paths, so that the correspondence between the upper and lower elements is one-to-many even if the operator does not have to perform cumbersome arithmetic processing or work to correct the shape data. In such a case, NC data for processing the outer peripheral contour can be easily generated.
[Brief description of the drawings]
FIG. 1 is a flowchart conceptually showing an algorithm of an NC data generation function in an NC automatic programming device.
FIG. 2 is a flowchart illustrating an outline of an editing process according to an embodiment of the present invention.
FIG. 3 is a continuation of a flowchart showing an outline of an editing process.
FIG. 4 is a continuation of a flowchart showing an outline of an editing process.
FIG. 5 is a continuation of the flowchart showing the outline of the editing process.
FIG. 6 is a conceptual diagram showing the correspondence between elements when the elements on the upper surface processing path and the elements on the lower surface processing path of the workpiece have a simple one-to-one relationship.
FIG. 7 is a conceptual diagram showing correspondence between elements when it is necessary to machine a plurality of elements on a lower surface processing path in correspondence with one element on an upper surface processing path.
FIG. 8 is a block diagram showing an NC automatic programming device according to an embodiment of the present invention.
[Explanation of symbols]
1 CPU
2 Graphic display
3 keyboard
4 mouse
5 bus
6 ROM
7 RAM
8 Hard disk
9 Disk drive unit
10 floppy disk

Claims (2)

加工物の上面の加工経路と加工物の下面の加工経路とが異なる加工物の形状データを作成もしくは読み込んで上下の加工経路の要素を対応させ、上下の加工経路を要素単位で補間しながら加工を行うNCデータを生成する機能を備えたNC自動プログラミング装置において、
上側または下側の加工経路の1要素を任意に選択すると共に前記1要素に対応させる他側の面の加工経路を複数の要素で選択する手段と、
前記複数の要素における各要素の加工経路の長さに対応させて前記1要素を前記複数の要素の数で複数に分割する手段とを備えたことを特徴とするNC自動プログラミング装置。
Create or read the shape data of the workpiece where the machining path on the upper surface of the workpiece and the machining path on the lower surface of the workpiece are different, associate the elements of the upper and lower machining paths, and interpolate the upper and lower machining paths in element units. in NC automatic programming apparatus having a function of generating NC data for performing Luo pressurized Engineering,
Means for arbitrarily selecting one element of the upper or lower processing path and selecting the processing path of the other surface corresponding to the one element with a plurality of elements;
Means for dividing the one element into a plurality of parts by the number of the plurality of elements in accordance with the machining path length of each element in the plurality of elements.
加工物の上面の加工経路と加工物の下面の加工経路とが異なる加工物の形状データを作成もしくは読み込んで上下の加工経路の要素を対応させ、上下の加工経路を要素単位で補間しながら加工を行うNCデータを生成する機能を備えたNC自動プログラミング装置において、
上側または下側の加工経路の1要素を任意に選択すると共に前記1要素に対応させる他側の面の加工経路を複数の要素で選択する手段と、
前記1要素を前記複数の要素の数で複数に等分割する手段とを備えたことを特徴とするNC自動プログラミング装置。
Create or read the shape data of the workpiece where the machining path on the upper surface of the workpiece and the machining path on the lower surface of the workpiece are different, associate the elements of the upper and lower machining paths, and interpolate the upper and lower machining paths in element units. in NC automatic programming apparatus having a function of generating NC data for performing Luo pressurized Engineering,
Means for arbitrarily selecting one element of the upper or lower processing path and selecting the processing path of the other surface corresponding to the one element with a plurality of elements;
Means for equally dividing the one element into a plurality of elements by the number of the plurality of elements.
JP23577996A 1996-08-20 1996-08-20 NC automatic programming device Expired - Fee Related JP3545547B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23577996A JP3545547B2 (en) 1996-08-20 1996-08-20 NC automatic programming device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23577996A JP3545547B2 (en) 1996-08-20 1996-08-20 NC automatic programming device

Publications (2)

Publication Number Publication Date
JPH1063326A JPH1063326A (en) 1998-03-06
JP3545547B2 true JP3545547B2 (en) 2004-07-21

Family

ID=16991124

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23577996A Expired - Fee Related JP3545547B2 (en) 1996-08-20 1996-08-20 NC automatic programming device

Country Status (1)

Country Link
JP (1) JP3545547B2 (en)

Also Published As

Publication number Publication date
JPH1063326A (en) 1998-03-06

Similar Documents

Publication Publication Date Title
JPH02293903A (en) Cad/cam device
JPH05134734A (en) Numerical controller and control method therefor
JPH064118A (en) Cad/cam system for automatically generating cutter path
JP3545547B2 (en) NC automatic programming device
JPH02109657A (en) Automatic selection of tool
WO1993001535A1 (en) Method for specifying position where fillet curved surface is located
WO1988000367A1 (en) Method of forming cutting path of composite curved plane
JP2584356B2 (en) Method of generating machining program in CAD / CAM device
JP2000039909A (en) Numerical control information creating device
JP2798549B2 (en) Automatic determination of internal machining tools
US5270940A (en) Contour configuration machining method
JPS59196145A (en) Numerical controller having automatic tool decision function
JP2853435B2 (en) CAD / CAM equipment for electric discharge machining
JPH03174604A (en) Producing device for numerical control information
JP2733925B2 (en) Production ratio control method and apparatus based on production results
JPH06102918A (en) Method for generating cutting route
WO1990006209A1 (en) Profile-shape machining system
JP3000987B2 (en) Numerical control unit
JP2001318708A (en) Numerical controller
JPH10161724A (en) Numerical controller
JPH06105411B2 (en) Batch input method of repeating groove shape
JPH0455909A (en) Producing device for numerically controlling information
JPH0883112A (en) Display method for graphic
JPH04291397A (en) Character preparing device
JPH0822315A (en) Method for correcting plate material machining graphic data

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20031216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040127

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040408

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

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100416

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees