JPH0726809B2 - Workpiece position coordinate correction method - Google Patents

Workpiece position coordinate correction method

Info

Publication number
JPH0726809B2
JPH0726809B2 JP62240448A JP24044887A JPH0726809B2 JP H0726809 B2 JPH0726809 B2 JP H0726809B2 JP 62240448 A JP62240448 A JP 62240448A JP 24044887 A JP24044887 A JP 24044887A JP H0726809 B2 JPH0726809 B2 JP H0726809B2
Authority
JP
Japan
Prior art keywords
workpiece
data
program
coordinate system
image
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 - Lifetime
Application number
JP62240448A
Other languages
Japanese (ja)
Other versions
JPS6483103A (en
Inventor
忠正 山田
Original Assignee
株式会社新潟鐵工所
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 株式会社新潟鐵工所 filed Critical 株式会社新潟鐵工所
Priority to JP62240448A priority Critical patent/JPH0726809B2/en
Publication of JPS6483103A publication Critical patent/JPS6483103A/en
Publication of JPH0726809B2 publication Critical patent/JPH0726809B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Machine Tool Sensing Apparatuses (AREA)

Description

【発明の詳細な説明】 「産業上の利用分野」 この発明は、NC(数値制御)工作機械において、工作物
の設置位置に応じた座標補正を自動的かつ正確に行える
ようにした工作物位置座標補正方法に関するものであ
る。
DETAILED DESCRIPTION OF THE INVENTION "Industrial application field" The present invention relates to an NC (numerical control) machine tool, which is capable of automatically and accurately performing coordinate correction according to the installation position of a workpiece. The present invention relates to a coordinate correction method.

「従来の技術」 立型マシニングセンターの使用方法の1つとして、テー
ブル上に工作物の置き、その工作物の座標系(ワーク座
標系)とNCプログラムで想定している座標系(基準座標
系)とを、工作物の位置を修正することにより一致させ
て加工する方法がある。この工作物位置を修正する作業
は時間がかかり煩わしいが、最近これを容易にするた
め、主軸に計測用接触プローブを挿着して工作物位置を
さぐり、座標系を移動する方法(以下、第1の方法とい
う)が開発されている(この技術については、特開昭58
−120109号公報参照)。
"Prior art" One of the methods of using a vertical machining center is to place a workpiece on a table, the workpiece coordinate system (work coordinate system), and the coordinate system assumed by the NC program (reference coordinate system). There is a method in which and are processed by matching the positions of the workpieces. This work of correcting the workpiece position is time consuming and cumbersome, but recently, in order to facilitate this, a method of inserting a contact probe for measurement on the spindle to search the workpiece position and moving the coordinate system (hereinafter, referred to as 1) has been developed (for this technique, see Japanese Patent Laid-Open No. 58
-120109 gazette).

上記第1の方法をさらに説明する。NC工作機械で加工す
る場合、工作物は、加工プログラムで想定した位置と姿
勢に置く必要がある。そのため、工作物をテーブル上に
載置し、その位置と姿勢を一致させる設定作業が加工前
の作業となる。しかし、この設定作業は精度を必要とす
ることから、極めて困難であり、長時間を必要とする。
この作業を簡便にし、加工プログラムの基準座標系と現
在載置された工作物のワーク座標系とを一致させる方法
がこの第1の方法である。
The first method will be further described. When machining with an NC machine tool, the workpiece must be placed in the position and orientation assumed in the machining program. Therefore, the setting work in which the workpiece is placed on the table and the position and the posture thereof are matched is the work before machining. However, this setting work is extremely difficult and requires a long time because it requires precision.
The first method is a method of simplifying this work and matching the reference coordinate system of the machining program with the workpiece coordinate system of the workpiece currently placed.

すなわち、第4図のごとく、テーブル1上に工作物2を
載置した後に、図示せぬ主軸に接触プローブ3を挿着
し、その先端を工作物2の各所に接触させ、その座標値
を検出する。この検出値に基づいて、加工プログラムの
基準座標系と一致させるために、ワーク座標系をシフト
したり、回転したりする補正を行う。たとえば、第4図
の場合、基準座標系の原点を点(x0,y0)までシフト
し、これを中心として、θ度だけ座標を回転したもの
が補正後のワーク座標系となる。
That is, as shown in FIG. 4, after the work piece 2 is placed on the table 1, the contact probe 3 is inserted into the spindle (not shown) and the tip thereof is brought into contact with various parts of the work piece 2, and the coordinate values thereof are To detect. Based on the detected value, the work coordinate system is corrected to be shifted or rotated in order to match the reference coordinate system of the machining program. For example, in the case of FIG. 4, the work coordinate system after correction is obtained by shifting the origin of the reference coordinate system to the point (x 0 , y 0 ) and rotating the coordinates by θ 1 degrees around this point.

上記第1の方法に対して、視覚装置を用いる第2の方法
がある。すなわち、視覚装置で工作物を撮像して、その
画像から工作物の位置を求める方法がロボットとの組合
わせで開発されている(特開昭60−79413号公報)。
In contrast to the above first method, there is a second method using a visual device. That is, a method of imaging a work with a visual device and obtaining the position of the work from the image has been developed in combination with a robot (JP-A-60-79413).

「発明が解決しようとする問題点」 ところで、上述した従来の方法には、次のような欠点が
あった。
"Problems to be Solved by the Invention" The conventional methods described above have the following drawbacks.

(1)第1の方法の欠点 第1の方法では、便利にはなったが、人手が介在するこ
とには相違なく、工作物の設置換え、複数個の工作物の
取付け等において、煩しい作業が発生していた。
(1) Disadvantages of the first method Although the first method is convenient, there is no doubt that human intervention is involved, and it is troublesome to replace a work piece or attach a plurality of work pieces. Work was occurring.

すなわち、この方法では工作物位置を探るため、接触プ
ローブ動作を手動操作にて実施しているため、人間が介
在しなければならない。つまり、同一の工作物を複数
個、個々に加工する場合、各工作物をテーブル上に載置
するたびに座標合わせの作業が発生する。また、テーブ
ル上に複数個の工作物を同時に載置して加工する場合
も、一個の加工が終了するたびに、心出し作業(座標を
合わせる作業)が必要になる。
That is, in this method, since the contact probe operation is performed manually in order to find the position of the workpiece, a human must be present. In other words, when a plurality of identical workpieces are machined individually, the work of coordinate adjustment occurs each time each workpiece is placed on the table. Further, when a plurality of workpieces are simultaneously placed on the table for machining, centering work (coordinate matching work) is required every time one machining is completed.

たとえば、第4図のごとく、端面を基準にする単純な形
状の工作物のみでなく、穴中心を基準にしたり、穴と穴
の中心座標を結ぶ線を基準にしたり、種々のワーク座標
系の設定が、工作物毎に必要になってくる。そのため、
加工プログラムの作成者はその意図を作業者に伝える必
要があるが、煩しい作業やオフセット量の計算等が発生
する場合もあり、期待通りにはいかないことがある。
For example, as shown in FIG. 4, not only a workpiece having a simple shape with an end face as a reference, but also a hole center as a reference, a line connecting the center coordinates of holes as a reference, and various work coordinate systems are used. Settings are required for each workpiece. for that reason,
The creator of the machining program needs to convey the intention to the operator, but it may not be as expected because complicated work or calculation of offset amount may occur.

さらに具体的に説明すると、第5図の工作Wの加工にお
いて、中心点がO1(x1,y1)の穴Aと、中心点がO2(x2,
y2)の穴Bの各中心点を結ぶ直線が、機械座標系のX軸
座標とθ度の角度を持ち、かつ穴Aの中心座標(x1,
y1)を原点とする座標系XW−YWを基準座標系とし、この
実線のように工作物がテーブル上に載置されていること
を前提にして、その外形を輪郭加工するように加工プロ
グラムがプログラムされていた場合、作業者は穴A,Bを
それぞれ接触プローブで探り、各穴A,Bの中心座標を求
め、その座標値から、それらの点を結ぶ直線のX軸に対
する角度と、原点のずれとを算出して、基準座標系とワ
ーク座標系との差異を補正しなければならない。
More specifically, in the machining of the work W shown in FIG. 5, the hole A having a center point of O 1 (x 1 , y 1 ) and the center point of O 2 (x 2 ,
The straight line connecting the center points of the hole B of y 2 ) has an angle of θ degrees with the X-axis coordinate of the machine coordinate system, and the center coordinate of the hole A (x 1 ,
Assuming that the workpiece is placed on the table as shown by this solid line, the outline of the coordinate system X W -Y W with the origin of y 1 ) is used as the reference coordinate system. When the machining program is programmed, the operator searches the holes A and B with contact probes, finds the center coordinates of the holes A and B, and from the coordinate values, the angle of the straight line connecting those points with respect to the X axis. And the deviation of the origin must be calculated to correct the difference between the reference coordinate system and the work coordinate system.

(2)第2の方法の欠点 第2の方法、すなわち視覚装置による位置認識では、カ
メラの分解能からくる制限のため、必要精度が得られな
い欠点がある。
(2) Disadvantages of the second method The second method, that is, position recognition by a visual device has a drawback that required accuracy cannot be obtained because of limitation due to the resolution of the camera.

本発明は、このような背景の下になされたもので、視覚
装置と接触プローブの併用により、工作物の位置に応じ
た高精度な座標補正を実現することのできる工作物位置
座標補正方法を提供することを目的とする。
The present invention has been made under such a background, and provides a workpiece position coordinate correction method capable of realizing highly accurate coordinate correction according to the position of a workpiece by using a visual device and a contact probe together. The purpose is to provide.

「問題点を解決するための手段」 上記問題点を解決するために、この発明は、数値制御工
作機械において、テーブル上に設置した工作物を視覚装
置にて撮像し、その画像データに基づいて、当該工作物
の特徴を算出し、その特徴と予め特徴テーブルに記憶さ
れている特徴群とを比較して、当該工作物についての座
標位置合わせの基準ポイントを示す基準ポイントデータ
および加工プログラム番号を割り出す第1の過程と、第
1の過程により割り出された基準ポイントデータが示す
基準ポイントの粗位置を前記画像データ上で算出してメ
モリに記憶する第2の過程と、予め記憶したプログラム
のうち前記加工プログラム番号に対応したものを選択す
るとともに、前記メモリに記憶された粗位置を実際のテ
ーブル上の粗位置に変換演算する第3の過程と、前記第
3の過程によって算出された粗位置を目標にして接触プ
ローブによる自動心出しを行い、これにより、得られた
精位置データに基づき、選択された加工プログラムの基
準座標系とテーブル上の工作物の座標系とが一致するよ
うに補正をする第4の過程とを有することを特徴とす
る。
[Means for Solving Problems] In order to solve the above problems, the present invention provides a numerically controlled machine tool that images a workpiece installed on a table with a visual device, and based on the image data. , The feature of the workpiece is calculated, the feature is compared with a feature group stored in advance in the feature table, and reference point data and a machining program number indicating a reference point for coordinate alignment of the workpiece are calculated. A first step of calculating, a second step of calculating the rough position of the reference point indicated by the reference point data calculated by the first step on the image data and storing it in the memory, and a pre-stored program Of the three, the one corresponding to the machining program number is selected, and the rough position stored in the memory is converted into the rough position on the actual table. Step, and the rough position calculated in the third step is used as a target to perform automatic centering by the contact probe, and based on the obtained precise position data, the reference coordinate system and table of the selected machining program are obtained. And a fourth step of performing correction so as to match the coordinate system of the workpiece above.

「作用」 上記方法によれば、視覚装置の画像データの特徴から加
工プログラム番号が指定され、これに対応する加工プロ
グラムが読み出される。すなわち、加工物の特徴に応じ
て加工プログラムが決定されるので、異なる加工物が順
次テーブルに載置される場合でも、各加工物に対応した
加工プログラムが自動的に選択される。しかも、選択さ
れた各加工プログラムに対し、座標等の修正がなされる
から、加工物の姿勢に適合した加工が自動的になされ
る。
[Operation] According to the above method, the processing program number is designated from the characteristics of the image data of the visual device, and the processing program corresponding to this is read. That is, since the machining program is determined according to the characteristics of the workpiece, even when different workpieces are sequentially placed on the table, the machining program corresponding to each workpiece is automatically selected. Moreover, since the coordinates and the like are corrected for each selected machining program, machining suitable for the posture of the workpiece is automatically performed.

この場合の座標等の修正は、画像データの特徴から決定
された基準ポイントの粗位置を、まず画像データ上で求
め、次に、この粗位置を実際のテーブル上の粗位置に変
換演算し、そして、この粗位置データを目標にして接触
プローブによる精位置測定を行い、この精位置に従って
座標等を修正するようにしている。
In this case, the correction of the coordinates and the like, the rough position of the reference point determined from the characteristics of the image data is first obtained on the image data, then this rough position is converted into a rough position on the actual table, Then, the precise position is measured by the contact probe with the rough position data as a target, and the coordinates and the like are corrected according to the precise position.

こうして、テーブルへの載置時に発生する工作物の位置
あるいは姿勢(座標回転等含む)のずれを、人手を介さ
ずに修正あるいは補正できるから、従来のような段取り
時の煩しさはなくなり、かつ複数個の工作物の連続加工
運転も可能になる。したがって、自動運転時間を長くで
きる。
In this way, the deviation of the position or orientation (including coordinate rotation) of the work piece that occurs when the work piece is placed on the table can be corrected or corrected without the need for manual labor, and thus the trouble of the conventional setup can be eliminated. It also enables continuous machining operation of multiple workpieces. Therefore, the automatic operation time can be lengthened.

「実施例」 以下、図面を参照して、この発明の一実施例を説明す
る。
[Embodiment] An embodiment of the present invention will be described below with reference to the drawings.

第1図は、この発明を適用したNC工作機械の要部の電気
的構成を示すブロック図である。
FIG. 1 is a block diagram showing an electrical configuration of a main part of an NC machine tool to which the present invention is applied.

図において、10は画像処理装置、20はNC装置である。In the figure, 10 is an image processing apparatus and 20 is an NC apparatus.

画像処理装置10は、工作物を撮像するために、工作機械
の主軸ヘッドに取り付けられたTV(テレビ)カメラ11
と、撮像された画像を記憶する画像メモリ12と、後述す
る特徴テーブル13a等を記憶するデータメモリ13と、工
作物認識プログラム等の制御用プログラムを実行して、
工作物の姿勢や位置を認識する制御部14と、CRT表示装
置とキーボードとが一体となった入出力装置15と、NC装
置20とのデータの授受を行うインターフェイス16とから
構成されている。
The image processing device 10 includes a TV (television) camera 11 mounted on a spindle head of a machine tool for capturing an image of a workpiece.
An image memory 12 for storing the captured image, a data memory 13 for storing a feature table 13a described later, and a control program such as a workpiece recognition program,
The control unit 14 recognizes the posture and position of the workpiece, an input / output device 15 in which a CRT display device and a keyboard are integrated, and an interface 16 for exchanging data with the NC device 20.

上記データメモリ13には、第2図に示す特徴テーブル13
aが格納されている。
The data memory 13 has a feature table 13 shown in FIG.
Stores a.

特徴テーブル13aは、工作物の特徴量である面積と、各
工作物に対応するプログラム番号と、座標合わせのため
のデータ番号とを格納するものである。
The feature table 13a stores the area which is the feature amount of the workpiece, the program number corresponding to each workpiece, and the data number for coordinate adjustment.

この座標合わせデータ番号は、たとえば第5図の穴A,B
の中心点のように、工作物の姿勢と位置を求めるのに必
要な位置データに対応して付されている。そして、この
座標合わせデータ番号より、座標を合わせるための内容
を知り、その内容に対応して、該当する位置データを算
出し、データメモリ13に記憶する。この位置データは、
画像メモリ12上の画像データを分析して、一定の演算を
施すことにより求められる。
This coordinate alignment data number is, for example, the holes A and B in FIG.
Like the center point of the, it is attached corresponding to the position data required to obtain the posture and position of the workpiece. Then, from the coordinate alignment data number, the content for coordinate alignment is known, and corresponding position data is calculated in accordance with the content and stored in the data memory 13. This position data is
It is obtained by analyzing the image data on the image memory 12 and performing a certain calculation.

一方、上記特徴量を設定するには、画像処理装置10を利
用する。すなわち、対象となる工作物を撮影して、画像
メモリ12上の面積を算出した後、作業者は、入出力装置
15を操作し、上記面積と加工プログラム番号とを対にし
て、特徴テーブル13aに登録する。
On the other hand, the image processing apparatus 10 is used to set the feature amount. That is, after photographing the target work piece and calculating the area on the image memory 12, the worker inputs the input / output device.
The area 15 and the machining program number are paired and registered in the feature table 13a by operating 15.

なお、上記面積は、画像メモリ12上の工作物にあたる部
分のビットを数えることで算出される。
The area is calculated by counting the bits of the portion corresponding to the workpiece on the image memory 12.

第3図は、面積の求め方を説明するための図である。こ
の図で、工作物Wの内部では、画素の値が“1"、外部で
は“0"となっており、面積としては、“1"の個数が数え
られる。このため、工作物の実際の面積ではなく、画像
メモリ12に占める量として面積が採取される。そして、
特徴テーブル13aを参照した結果、面積が一致している
プログラム番号が、インターフェイス16を通して、位置
データとともにNC装置20へ送られる。
FIG. 3 is a diagram for explaining how to determine the area. In this figure, the pixel value is "1" inside the workpiece W and "0" outside, and the number of "1" is counted as the area. Therefore, the area is sampled not as the actual area of the workpiece but as the amount occupied in the image memory 12. And
As a result of referring to the characteristic table 13a, the program numbers having the same area are sent to the NC device 20 through the interface 16 together with the position data.

次に、NC装置20の構成について説明する。Next, the configuration of the NC device 20 will be described.

NC装置20は、画像処理装置10内のインターフェイス16と
接続されて、これとデータの授受を行うインターフェイ
ス21と、工作物上の心出し位置の粗位置を記憶するデー
タメモリ22と、ワーク座標系のオフセット量を記憶する
座標系オフセットメモリ23と、制御用プログラムを記憶
し実行する制御部24と、接触プローブ3の出力信号を制
御部24へ供給するためのI/Oインターフェイス25と、X
軸およびY軸の現在位置をカウントする現在位置カウン
タ26とから構成されている。
The NC device 20 is connected to the interface 16 in the image processing device 10 to exchange data with the interface 16, a data memory 22 for storing the rough position of the centering position on the workpiece, and a work coordinate system. Coordinate system offset memory 23 for storing the offset amount of X, a control unit 24 for storing and executing a control program, an I / O interface 25 for supplying the output signal of the contact probe 3 to the control unit 24, an X
A current position counter 26 that counts the current positions of the axes and the Y-axis.

上記現在位置カウンタ26は、NC装置20からの駆動信号に
よって回転制御されるX軸およびY軸駆動モータM1,M2
に連結された、パルス発生器E1,E2からのパルス信号を
カウントし、テーブルの移動量を出力するものである。
The current position counter 26 is an X-axis and Y-axis drive motor M1, M2 whose rotation is controlled by a drive signal from the NC device 20.
It counts the pulse signals from the pulse generators E1 and E2, which are connected to, and outputs the movement amount of the table.

次に、この実施例の動作を説明する。Next, the operation of this embodiment will be described.

この実施例の主要動作は、次の通りである。The main operation of this embodiment is as follows.

(1)画像データから工作物の種別、位置および姿勢
(画像メモリ12上の粗位置)を割り出し、これに対応す
る加工プログラムを選択する。
(1) The type, position and orientation (rough position on the image memory 12) of the workpiece are calculated from the image data, and the machining program corresponding thereto is selected.

(2)選択された加工プログラムの先頭部にある工作物
位置補正プログラムの処理を開始する。
(2) The processing of the workpiece position correction program at the head of the selected machining program is started.

(3)画像メモリ12上の粗位置からテーブル上の工作物
の粗位置を算出した後、接触プローブ3の出力に基づい
て精位置を算出し、ワーク座標系の位置補正を実行す
る。
(3) After the rough position of the workpiece on the table is calculated from the rough position on the image memory 12, the precise position is calculated based on the output of the contact probe 3, and the position correction of the work coordinate system is executed.

(4)補正後のワーク座標系において、加工プログラム
を実行し、加工する。
(4) In the corrected work coordinate system, the machining program is executed and machining is performed.

(5)工作物をカメラ11の視界に一つずつ搬送し、上記
(1)〜(4)の動作を繰り返す。
(5) The workpieces are conveyed one by one to the field of view of the camera 11, and the operations (1) to (4) are repeated.

以下、これらの動作につき詳細に説明する。Hereinafter, these operations will be described in detail.

(1)工作物の種別、姿勢、位置と加工プログラムの割
り出し 作業者は、工作物をテーブル上に載置し、NC装置20の工
作物認識プログラム(カスタムマクロにて作成されてい
る)をスタートさせる。
(1) Index of workpiece type, posture, position and machining program The operator places the workpiece on the table and starts the workpiece recognition program (created by a custom macro) of the NC unit 20. Let

工作物認識プログラムは、画像処理装置10とのインター
フェイス21を通して、テーブル上の工作物の種別を問い
合わせる。
The workpiece recognition program inquires the type of the workpiece on the table through the interface 21 with the image processing apparatus 10.

NC装置20から工作物の種別の問い合わせがくると、画像
処理装置10はテーブル上の工作物を画像データとして取
込み、判別に必要な特徴、および座標合わせに必要な位
置データを算出し、その特徴が一致する項目を特徴テー
ブル13aにて捜す。すなわち、画像処理装置10は、カメ
ラ11でテーブル上を撮影し、画像データを入手し、この
画像の全体データから、個別の工作物を取り出し、その
特徴と位置データとを算出する。
When an inquiry about the type of workpiece is received from the NC device 20, the image processing device 10 takes in the workpiece on the table as image data, calculates the features required for discrimination, and the position data required for coordinate adjustment, and the features Are searched for in the feature table 13a. That is, the image processing apparatus 10 takes an image of a table with the camera 11, obtains image data, extracts individual workpieces from the entire data of this image, and calculates the characteristics and position data thereof.

通常、このような特徴としては対象物の面積、重心位
置、周囲長、表面の穴数、穴の面積等が利用される(計
測と制御VoL.22,No.3最近の画像計測技術)。算出され
た特徴から、特徴テーブル13aを参照して、一致する特
徴を捜し、一致したときの対応プログラム番号を選択す
る。
Generally, such features include the area of the object, the position of the center of gravity, the perimeter, the number of holes on the surface, the area of holes, etc. (Measurement and control VoL.22, No.3 recent image measurement technology). From the calculated features, the feature table 13a is referred to search for a matching feature, and the corresponding program number when the feature is matched is selected.

面積のみで判別可能な本実施例のような場合、特徴テー
ブル13aは、特徴量である面積と、プログラム番号と、
座標合わせデータで構成されることはすでに述べた。特
徴テーブル13aを参照した結果、面積が一致しているプ
ログラム番号をインターフェイス16を通してNC装置20へ
送る。なお、プログラム番号を送る際には、特徴テーブ
ル13aの座標合わせデータである番号と、その番号に対
応する各箇所の位置データ(画像メモリ12上のデータで
あり、画像から工作物特有の座標系、例えば、重心を原
点とした座標系、から決められる)を送る。
In the case of this embodiment that can be distinguished only by the area, the feature table 13a, the area which is the feature amount, the program number,
It has already been described that it is composed of coordinate alignment data. As a result of referring to the characteristic table 13a, the program numbers having the same area are sent to the NC device 20 through the interface 16. When sending the program number, the coordinate data of the feature table 13a and the position data of each location corresponding to the number (data on the image memory 12 and the coordinate system specific to the workpiece from the image) , For example, determined from the coordinate system with the center of gravity as the origin).

(2)工作物位置補正プログラムの実行 NC装置20では、上記プログラム番号を受け、必要な加工
プログラムを選択し、この加工プログラムの実行を開始
する。加工プログラムの先頭には、工作物の粗位置を算
出するための工作物位置補正プログラムがサブプログラ
ムとして設けられている。
(2) Execution of workpiece position correction program The NC device 20 receives the above program number, selects a necessary machining program, and starts execution of this machining program. At the beginning of the machining program, a workpiece position correction program for calculating a rough position of the workpiece is provided as a subprogram.

この工作物位置補正プログラムは、画像処理装置10から
受け取った位置データ、つまり画像メモリ12上の粗位置
から、テーブル上における工作物の各箇所の大体の位
置、つまりテーブルの上の粗位置を算出する。すなわ
ち、画像処理装置10から画像メモリ12上の位置データ、
および座標合わせのための基準となるデータを受けと
り、座標合わせデータにおける位置データを、画像メモ
リ12と現物との縮尺を考慮し、実際の工作物の各箇所の
粗位置を算出する。この粗位置は、接触プローブ3を上
記各箇所に持っていくのに必要となるデータである。
This work position correction program calculates the approximate position of each position of the work on the table, that is, the rough position on the table from the position data received from the image processing device 10, that is, the rough position on the image memory 12. To do. That is, position data on the image memory 12 from the image processing device 10,
Also, the reference data for coordinate alignment is received, and the position data in the coordinate alignment data is calculated in consideration of the scale of the image memory 12 and the actual product, and the rough position of each location of the actual workpiece is calculated. This rough position is data required to bring the contact probe 3 to each of the above-mentioned locations.

この場合、テーブル全面を画像メモリ12に記憶できない
場合は、テーブルを自動的に動かして、対象工作物を画
像メモリ12に記憶する。このときの工作物位置は、X軸
現在位置カウンタおよびY軸現在位置カウンタ等の現在
位置カウンタ26のデータを参照して算出する。この算出
されたデータはNC装置20のデータメモリ22に記憶され
る。
In this case, if the entire surface of the table cannot be stored in the image memory 12, the table is automatically moved to store the target workpiece in the image memory 12. The workpiece position at this time is calculated by referring to the data of the current position counter 26 such as the X-axis current position counter and the Y-axis current position counter. The calculated data is stored in the data memory 22 of the NC device 20.

(3)ワーク座標系の補正プログラムの実行 工作位置補正プログラムの実行後、加工プログラム上に
サブプログラムとして設けられた本プログラムが実行さ
れる。本プログラムは、座標合わせのために必要な、心
出し位置の粗位置をデータメモリ22から呼び出し、接触
プローブ3を主軸に挿着して、いわゆる、自動心出し機
能を働かして、プローブ先端と工作物との接触点の位置
座標値を知り、その精位置を算出し、この工作物に必要
な座標位置の補正を行う。補正方法としては、NC装置20
の機能である座標系のオフセット機能を利用する。この
機能には、座標系のシフト、回転の機能がある。こうし
て計測したオフセット値は、座標系オフセットメモリ23
に格納される。
(3) Execution of work coordinate system correction program After execution of the work position correction program, this program provided as a sub-program on the machining program is executed. This program calls the rough position of the centering position, which is necessary for coordinate adjustment, from the data memory 22, inserts the contact probe 3 on the spindle, and activates the so-called automatic centering function to perform probe tip and machining. Knowing the position coordinate value of the point of contact with the object, calculating its precise position and correcting the coordinate position necessary for this workpiece. As a correction method, NC device 20
The offset function of the coordinate system, which is the function of, is used. This function has functions of shifting and rotating the coordinate system. The offset value thus measured is stored in the coordinate system offset memory 23
Stored in.

なお、粗位置を上記(2)項で求める理由は、計測スピ
ードの向上が目的である。すなわち、端面位置を探るた
め、始めから低速度で接触プローブ3を動かし、端面を
捜しては時間がかかり過ぎる。また、穴中心座標のよう
な場合、穴がどこにあるか不明のため、事実上接触プロ
ーブ3では捜せない。
The reason for obtaining the rough position in the above item (2) is to improve the measurement speed. That is, it takes too much time to search the end face by moving the contact probe 3 at a low speed from the beginning to search the end face position. Further, in the case of the hole center coordinates, since it is unknown where the hole is, it cannot be practically searched by the contact probe 3.

逆に、画像データから工作物位置を正確に知ることは難
しい。画像による位置認識の精度は、画像を取込むカメ
ラ11の分解能に左右される。現状のカメラでは、512×5
12(たて×よこ)ビット程度であるため、テーブルの大
きさが400×1000mmであると、たて方向は約0.8mm、よこ
方向は約2mm程度となり、このままでは、位置補正には
使用できない。分割して撮影するなどの手法を使用して
も、1/2〜1/10程度であり、必要分解能1μmには達し
ない。このため、接触プローブ3との併用が現実的であ
る。
On the contrary, it is difficult to know the work position accurately from the image data. The accuracy of position recognition by an image depends on the resolution of the camera 11 that captures the image. 512 × 5 with the current camera
Since it is about 12 (vertical × horizontal) bits, if the table size is 400 × 1000 mm, the vertical direction is about 0.8 mm and the horizontal direction is about 2 mm, which cannot be used for position correction as it is. . Even if a technique such as dividing and photographing is used, the resolution is about 1/2 to 1/10, which is less than the required resolution of 1 μm. Therefore, it is practical to use the contact probe 3 together.

計測動作の結果得られた座標値、すなわち精位置を使用
して、工作物の現在位置、姿勢に合うようにワーク座標
系を補正し、加工プログラムに座標系と一致させる。
The coordinate value obtained as a result of the measuring operation, that is, the precise position is used to correct the work coordinate system so as to match the current position and orientation of the workpiece, and match the coordinate system with the machining program.

(4)切削プログラムの実行 座標系のオフセット後、その座標系において切削プログ
ラムを実行して、通常の切削が実行される。
(4) Execution of cutting program After the offset of the coordinate system, the cutting program is executed in the coordinate system to execute normal cutting.

以上の操作が自動で行われる故に、テーブル上の任意位
置に載置された工作について、手動操作による煩しい心
出し作業が不要になる。
Since the above operation is automatically performed, it is not necessary to manually perform a troublesome centering operation for a work placed on an arbitrary position on the table.

なお、テーブル上に複数個の工作物がある場合、テーブ
ルを移動させて、工作物が一つずつカメラ11の視界に入
るように、NC装置20のメインプログラム(工作物認識プ
ログラムを含むプログラム)に移動量を設定するが、こ
れは、作業者がテーブル上に載置した工作物に対応し
て、NC装置のCRT操作盤を通して設定する。すなわち、
メインプログラムは、次のような手順で処理を実行す
る。
When there are a plurality of workpieces on the table, the main program of the NC device 20 (a program including the workpiece recognition program) is used so that the workpieces can be moved one by one into the view of the camera 11 by moving the table. The amount of movement is set to, which is set through the CRT operation panel of the NC device corresponding to the workpiece placed on the table by the worker. That is,
The main program executes processing in the following procedure.

a) 工作物認識プログラム実行 b) 移動指令 c) 工作物認識プログラム実行 d) 移動指令 ・ ・ ・ 終りコード また、工作物をカメラ11の視界に入れるのに必要な移動
量を知る手段としては、手動操作でテーブルを動かし、
画像を表示するCRT表示装置に目的の工作物が表示され
たときの移動量を参考にする方法等がある。
a) Execution of the work piece recognition program b) Movement command c) Execution of the work piece recognition program d) Movement command ... End code Also, as means for knowing the movement amount required to bring the work piece into the field of view of the camera 11, Move the table manually,
There is a method of referring to the movement amount when the target workpiece is displayed on the CRT display device that displays an image.

次に、第5図を参照して、さらに具体的に実施例の動作
を説明する。図において、実線で示す工作物Wの位置が
プログラムで想定した工作物の位置であり、点線で示す
工作物W′が実際にテーブル上に載置された位置である
とする。
Next, the operation of the embodiment will be described more specifically with reference to FIG. In the figure, it is assumed that the position of the work W shown by the solid line is the position of the work assumed by the program, and the work W'shown by the dotted line is the position actually placed on the table.

作業者が工作物認識プログラムをスタートさせると、点
線で示した工作物W′が画像メモリ12に取り込まれる。
この工作物W′の面積を、画像メモリ12上のドット数を
数えることにより算出する。今の場合、ドット数が262
であったとすると、この工作物W′は、特徴テーブル13
aから、O1034のプログラム番号の工作物と認識される。
When the worker starts the workpiece recognition program, the workpiece W'shown by the dotted line is taken into the image memory 12.
The area of the workpiece W'is calculated by counting the number of dots on the image memory 12. In this case, the number of dots is 262
, The workpiece W'is
From a, it is recognized as a work piece with a program number of O1034.

同時に、座標合わせたデータ番号2に対応する穴A′,
B′の、画像メモリ12上における粗位置が求められ、こ
れらがデータメモリ13に記憶される。求められた粗位置
データは、インターフェイス16を通して、NC装置20に送
られ、NC装置20内のデータメモリ22に記憶される。
At the same time, the hole A ′ corresponding to the coordinated data number 2
Coarse positions of B'on the image memory 12 are obtained and stored in the data memory 13. The obtained rough position data is sent to the NC device 20 through the interface 16 and stored in the data memory 22 in the NC device 20.

上記各データを受け取ると、NC装置20内の制御部24は、
O1034プログラムをスタートさせる。このプログラムの
先頭には工作物位置補正プログラムが設けられている。
Upon receiving each of the above data, the control unit 24 in the NC device 20
O1034 Start the program. A work position correction program is provided at the head of this program.

この工作物位置補正プログラムは、データメモリ22に格
納されている、画像メモリ12上における穴A′,B′の粗
位置から、縮尺を考慮し、テーブル上での穴A′の中心
点O1′(X1′,Y1′)、および穴B′の中心点O2
(X2′,Y2′)の近傍点を算出する。
This workpiece position correction program is based on the rough positions of the holes A'and B'on the image memory 12 stored in the data memory 22 and considering the scale, the center point O 1 of the hole A'on the table. ′ (X 1 ′, Y 1 ′) and the center point O 2 ′ of hole B ′
Calculate the neighbor points of (X 2 ′, Y 2 ′).

次いで、接触プローブ3を主軸に挿着し、その先端を、
算出された穴A′の中心位置に位置決めし、穴A′の正
確な中心位置を求めるため、X軸方向、Y軸方向と動作
させ、先端部が接触したときの現在位置カウンタ26のカ
ウント値から、より正確な精位置O1′(X1′,Y1′)を
求める。同様に、穴B′についても精位置O2′(X2′,Y
2′)を求める。そして、この2点O1′とO2′とから、
X軸に対する傾き(α+θ)を算出する。
Next, the contact probe 3 is inserted into the main shaft and its tip is
The current position counter 26 counts when the tip is brought into contact with the calculated center position of the hole A ′ and is operated in the X-axis direction and the Y-axis direction to obtain the accurate center position of the hole A ′. From this, a more accurate precise position O 1 ′ (X 1 ′, Y 1 ′) is obtained. Similarly, 'fine position O 2 also' hole B (X 2 ', Y
2 ′) And from these two points O 1 ′ and O 2 ′,
The inclination (α + θ) with respect to the X axis is calculated.

以上のデータから、ワーク座標系のオフセット量
(x1′,y1′)を座標系オフセットメモリ23に記憶し、
且つ座標回転機能にα度を設定する。
From the above data, the offset amount (x 1 ′, y 1 ′) of the work coordinate system is stored in the coordinate system offset memory 23,
And set α degree to the coordinate rotation function.

この結果、点線の工作物W′を加工するワーク座標系と
して、点(x1′,y1′)を原点とし、傾きがαの、新ら
たな座標系XW′−YW′がワーク座標系として設定され
る。そして、このワーク座標系にて、点P1′の位置から
加工が開始され、実線と同じ加工プログラムにて、加工
が可能となる。
As a result, a new coordinate system X W ′ −Y W ′ having a point (x 1 ′, y 1 ′) as an origin and an inclination α is used as a work coordinate system for machining a dotted workpiece W ′. It is set as the work coordinate system. Then, in this work coordinate system, the machining is started from the position of the point P 1 ′, and the machining can be performed by the same machining program as the solid line.

「発明の効果」 以上説明したように、この発明は、工作物の画像データ
から粗位置を求め、その後接触プローブにて精位置を求
めて、ワーク座標系の位置補正を自動的に行うようにし
たから、次の効果を得ることができる。
[Advantages of the Invention] As described above, according to the present invention, the rough position is obtained from the image data of the workpiece, and then the precise position is obtained by the contact probe to automatically perform the position correction of the work coordinate system. Therefore, the following effects can be obtained.

(1)テーブルのような広い測定範囲であっても、基準
ポイントの精位置を検出するまで全て自動的に行うこと
ができる。
(1) Even in a wide measurement range such as a table, it can be automatically performed until the precise position of the reference point is detected.

(2)工作物に応じた加工プログラムをその工作物の姿
勢に応じた座標系で補正して動作させることができる。
したがって、複数種の工作物が順次テーブル上に異なる
姿勢で載置される場合であっても、人手を全く介さずに
自動運転を継続することができる。
(2) The machining program corresponding to the workpiece can be corrected and operated in the coordinate system according to the posture of the workpiece.
Therefore, even when a plurality of types of workpieces are sequentially placed on the table in different postures, the automatic operation can be continued without manpower.

【図面の簡単な説明】[Brief description of drawings]

第1図はこの発明の一実施例を適用したNC工作機械の要
部の構成を示すブロック図、第2図は特徴テーブル13a
の構成を示す概念図、第3図は画像メモリ12上の工作物
の画像を示す図、第4図は従来のNC工作機械の位置補正
方法を説明するための平面図、第5図は工作物の載置状
態と座標補正を行う方法を平面図である。 3……接触プローブ、10……画像処理装置、11……カメ
ラ(視覚装置)、12……画像メモリ、13……データメモ
リ、13a……特徴テーブル、20……NC装置。
FIG. 1 is a block diagram showing the configuration of the essential parts of an NC machine tool to which an embodiment of the present invention is applied, and FIG. 2 is a characteristic table 13a.
Fig. 3 is a conceptual diagram showing the structure of Fig. 3, Fig. 3 is a diagram showing an image of a workpiece on the image memory 12, Fig. 4 is a plan view for explaining a conventional position correcting method for an NC machine tool, and Fig. 5 is a workpiece. FIG. 7 is a plan view showing a method of performing a coordinate correction on a placed state of an object. 3 ... Contact probe, 10 ... Image processing device, 11 ... Camera (visual device), 12 ... Image memory, 13 ... Data memory, 13a ... Feature table, 20 ... NC device.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】数値制御工作機械において、テーブル上に
設置した工作物を視覚装置にて撮像し、その画像データ
に基づいて、当該工作物の特徴を算出し、その特徴と予
め特徴テーブルに記憶されている特徴群とを比較して、
当該工作物についての座標位置合わせの基準ポイントを
示す基準ポイントデータおよび加工プログラム番号を割
り出す第1の過程と、 第1の過程により割り出された基準ポイントデータが示
す基準ポイントの粗位置を前記画像データ上で算出して
メモリに記憶する第2の過程と、 予め記憶したプログラムのうち前記加工プログラム番号
に対応したものを選択するとともに、前記メモリに記憶
された粗位置を実際のテーブル上の粗位置に変換演算す
る第3の過程と、 前記第3の過程によって算出された粗位置を目標にして
接触プローブによる自動心出しを行い、これにより、得
られた精位置データに基づき、選択された加工プログラ
ムの基準座標系とテーブル上の工作物の座標系とが一致
するように補正する第4の過程と を有することを特徴とする工作物位置座標補正方法。
1. In a numerically controlled machine tool, a visual device captures an image of a workpiece installed on a table, the characteristic of the workpiece is calculated based on the image data, and the characteristic and the characteristic table are stored in advance in a characteristic table. Compared with the feature groups that are
The first step of determining the reference point data indicating the reference point for coordinate position adjustment and the machining program number for the workpiece, and the rough position of the reference point indicated by the reference point data determined in the first step are shown in the image. The second process of calculating on the data and storing it in the memory, and selecting the program corresponding to the machining program number from the programs stored in advance, and the rough position stored in the memory A third process of converting into a position, and an automatic centering by a contact probe targeting the rough position calculated by the third process, thereby selecting based on the obtained accurate position data And a fourth step of correcting so that the reference coordinate system of the machining program and the coordinate system of the workpiece on the table match. Workpiece position coordinate correction method.
JP62240448A 1987-09-25 1987-09-25 Workpiece position coordinate correction method Expired - Lifetime JPH0726809B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62240448A JPH0726809B2 (en) 1987-09-25 1987-09-25 Workpiece position coordinate correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62240448A JPH0726809B2 (en) 1987-09-25 1987-09-25 Workpiece position coordinate correction method

Publications (2)

Publication Number Publication Date
JPS6483103A JPS6483103A (en) 1989-03-28
JPH0726809B2 true JPH0726809B2 (en) 1995-03-29

Family

ID=17059650

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62240448A Expired - Lifetime JPH0726809B2 (en) 1987-09-25 1987-09-25 Workpiece position coordinate correction method

Country Status (1)

Country Link
JP (1) JPH0726809B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160115073A (en) * 2015-03-25 2016-10-06 건솔루션(주) Apparatus and method for setting position of workpiece

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03184747A (en) * 1989-12-13 1991-08-12 Osaka Kiko Co Ltd Automatic check-recognition device for workpiece in machine tool
US5578979A (en) * 1993-01-06 1996-11-26 Eaton Corporation Electromagnetic apparatus
JP4053642B2 (en) * 1998-01-12 2008-02-27 株式会社ミツトヨ Coordinate system setting method and image measuring apparatus
JP6231826B2 (en) * 2013-09-11 2017-11-15 株式会社アマダマシンツール Grinding machine and method thereof
CN104914375B (en) * 2015-05-11 2017-08-25 南京协辰电子科技有限公司 The deviation correction method of flying probe tester
JP6767843B2 (en) * 2016-11-02 2020-10-14 株式会社キーエンス Image measuring device
CN109238142B (en) * 2018-09-27 2024-01-19 浙江图元智能装备科技有限公司 Visual identification device for graphite hole positioning of self-lubricating bearing shaft sleeve workpiece
CN114119570A (en) * 2021-11-30 2022-03-01 广东利元亨智能装备股份有限公司 Automatic model changing method, device, controller and storage medium
CN116834024B (en) * 2023-08-31 2024-01-26 北京集度科技有限公司 Calibration method, calibration device and medium for robot user coordinate system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6024403A (en) * 1983-07-20 1985-02-07 Tokico Ltd Position detecting device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6024403A (en) * 1983-07-20 1985-02-07 Tokico Ltd Position detecting device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160115073A (en) * 2015-03-25 2016-10-06 건솔루션(주) Apparatus and method for setting position of workpiece

Also Published As

Publication number Publication date
JPS6483103A (en) 1989-03-28

Similar Documents

Publication Publication Date Title
EP1607194B1 (en) Robot system comprising a plurality of robots provided with means for calibrating their relative position
US5255199A (en) Cutting tool form compensaton system and method
US4825394A (en) Vision metrology system
JP5725796B2 (en) Tool measuring method and measuring device, and machine tool
JPH08210816A (en) Coordinate system connection method for determining relationship between sensor coordinate system and robot tip part in robot-visual sensor system
CN109556510B (en) Position detection device and computer-readable storage medium
EP3689540B1 (en) On-machine measuring method and control device of machine tool
TWI704028B (en) Tool path location compensation system based on offset of fixture
JPH0726809B2 (en) Workpiece position coordinate correction method
JPH0852638A (en) Interference check method, machining program check method and machining suitability check method
JP3433710B2 (en) V-groove shape measuring method and apparatus
US4937766A (en) Acquiring dimensions of a large object
JP3215193B2 (en) Method and apparatus for measuring blade shape of rotary tool
JPH09253979A (en) Tool edge position measuring device
JPH0762869B2 (en) Position and shape measurement method by pattern projection
JP3126327B2 (en) Method and apparatus for measuring shape and size of work in machine tool
JP3880030B2 (en) V-groove shape measuring method and apparatus
CN114918723B (en) Workpiece positioning control system and method based on surface detection
JPH04256550A (en) Detection device for tip of cutting tool
JPH0195889A (en) Laser beam machine and laser beam machining method
JP2004268220A (en) Electric discharge machine
KR0141061B1 (en) Panel measuring equipment
JP7188481B2 (en) Position detection device and program
CN112809037B (en) Method for drilling on curved surface structure
JPH03277449A (en) Numerical control device with measurement function