Nothing Special   »   [go: up one dir, main page]

JP2834597B2 - Control method and control device for automatic gripping device using visual sense - Google Patents

Control method and control device for automatic gripping device using visual sense

Info

Publication number
JP2834597B2
JP2834597B2 JP3127173A JP12717391A JP2834597B2 JP 2834597 B2 JP2834597 B2 JP 2834597B2 JP 3127173 A JP3127173 A JP 3127173A JP 12717391 A JP12717391 A JP 12717391A JP 2834597 B2 JP2834597 B2 JP 2834597B2
Authority
JP
Japan
Prior art keywords
instruction
image processing
gripping
image
unit
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
JP3127173A
Other languages
Japanese (ja)
Other versions
JPH04352203A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP3127173A priority Critical patent/JP2834597B2/en
Publication of JPH04352203A publication Critical patent/JPH04352203A/en
Application granted granted Critical
Publication of JP2834597B2 publication Critical patent/JP2834597B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)
  • Manipulator (AREA)
  • Control Of Position Or Direction (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、把持対象のワークの画
像からそのワークの把持位置を認識し、その上で該ワー
クを把持する自動把持装置を制御するための制御方法及
び制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control method and a control device for recognizing a gripping position of a workpiece to be gripped from an image of the workpiece to be gripped, and controlling an automatic gripping device for gripping the workpiece.

【0002】[0002]

【従来の技術】自動組立装置の制御において手間がかか
る作業はワーク等の位置座標のテイーチングである。ロ
ボットはテイーチングされた位置にしかハンドやフィン
ガーを移動できないために、そのテイーチング位置が不
正確であったり、誤ったりしていると、組立動作を失敗
したり、ハンドやフィンガーを破壊してしまったりす
る。
2. Description of the Related Art A troublesome operation in controlling an automatic assembling apparatus is teaching of position coordinates of a work or the like. Since the robot can move the hand or finger only to the position where it was taught, if the teaching position is incorrect or incorrect, the assembly operation will fail or the hand or finger will be destroyed I do.

【0003】そこで、昨今、視覚センサ(例えば、CC
Dカメラ)を備えた自動組立装置が提案されている。こ
のような自動組立装置の例として、例えば、特開昭60
−56884号、特開昭60−123974号、特開昭
62−140724号等がある。また、本出願人からの
提案された技術として、特願平1−71895号、2−
55032号がある。これらは、視覚センサによりワー
クの画像を取り込み、この画像から画像処理によりワー
ク位置をロボット座標系に変換して、このロボット座標
系のワーク位置に基づいて組立作業を行なうものであ
る。
Therefore, recently, visual sensors (for example, CC
(D camera) has been proposed. As an example of such an automatic assembling apparatus, see, for example,
JP-A-56884, JP-A-60-123974 and JP-A-62-140724. Further, as a technique proposed by the present applicant, Japanese Patent Application No. 1-71895, 2-
No. 55032. In these methods, an image of a work is captured by a visual sensor, the work position is converted from the image into a robot coordinate system by image processing, and an assembling operation is performed based on the work position in the robot coordinate system.

【0004】このような従来の視覚センサを備えた自動
組立装置は、ロボツト・ハンド等の動作を制御するロボ
ツト制御装置と、CCDカメラの画像を入力し処理する
画像処理装置とを有し、さらに、これらを例えばRS2
32C等のケーブルで電気的に結合させ、各々の両方の
制御装置に通信可能とするインターフエース及び通信プ
ログラムを準備するのが普通である。
An automatic assembling apparatus having such a conventional visual sensor has a robot control device for controlling the operation of a robot hand and the like, and an image processing device for inputting and processing an image of a CCD camera. , For example, RS2
It is common to prepare an interface and a communication program that are electrically connected by a cable such as 32C and enable communication to both control devices.

【0005】そして、ロボツト制御装置内には、一連の
ロボツトの動作プログラムをあらかじめ入力する。この
プログラムには、前記インターフエース及びケーブルを
通して、画像処理装置に対して情報を送つたり受けたり
する命令を用いる。同様に、画像処理装置内にも、ワー
クの画像入力から、その画像から認識処理を行なう一連
のプログラムと、その一連のプログラム内に、上記のロ
ボット制御装置との間でその通信手段を通して情報の授
受を行なわせる命令を準備しておくように構成する。
[0005] A series of robot operation programs are input in advance to the robot controller. This program uses instructions for sending and receiving information to and from the image processing apparatus through the interface and the cable. Similarly, in the image processing apparatus, a series of programs for performing recognition processing from an image of a workpiece from an image input of the work, and information of information through the communication means between the robot control apparatus and the series of programs are included in the series of programs. It is configured to prepare an instruction for giving and receiving.

【0006】[0006]

【発明が解決しようとしている課題】しかしながら、上
記従来例では、上述したように、それぞれ独立で動作可
能な、画像処理装置とロボツトの制御装置とを準備し、
それぞれを通信手段で連結して連係させて、一連の組立
動作を行なわせるようにするため、次のような欠点があ
つた。 :画像処理装置とロボツト制御装置のそれぞれに、一
連の動作又は処理を行なわせる命令を解釈するためのコ
ンピユータ等の解釈実行手段と、それらのプログラムと
を別個に準備する必要があり、コストUPとなる。 :のように、CPUを別個に準備した場合、一連の
組付動作が約2秒で行なわれるのに、そのなかで画像処
理に必要な時間が0.3秒程度であり、画像処理装置内
のCPUは大部分の時間は何ら仕事を行なわないことに
なる。
However, in the above conventional example, as described above, an image processing device and a robot control device, which can operate independently, are prepared.
The following disadvantages have been encountered in connecting each of them by means of communication means so as to perform a series of assembling operations. : It is necessary to separately prepare an interpreting means such as a computer for interpreting a command for performing a series of operations or processes in the image processing device and the robot control device, and separately prepare those programs. Become. : When the CPU is separately prepared as in the above, a series of assembling operations are performed in about 2 seconds, but the time required for the image processing is about 0.3 seconds. CPU will not do any work most of the time.

【0007】:上記2つの制御装置をごく一般的なR
S232Cでつなぐと、通信に時間がかかり、組付時間
がなんら価値を生まない通信により伸びてしまう。 :2つの命令解釈のためのCPUが必要であるという
ことは、2つの動作命令解釈プログラムを準備しなけれ
ばならず、それらのプログラムメンテナンス等に時間が
かかる。 :2つの制御装置の各々に、キーボード,CRT等の
入出力手段を準備する必要があり、かつ、それぞれをサ
ポートするプログラム及びインターフエースを準備する
必要があり、コストUPとなる。 :画像処理装置側のCPUは、ロボツト制御装置から
来る処理の開始指令を常に待つ動作をさせておく必要が
ある。
[0007] The above two control devices are used in a very common R
If the connection is made in S232C, communication takes time, and the assembling time is extended by communication that does not generate any value. The fact that a CPU for interpreting two instructions is required means that two operation instruction interpreting programs must be prepared, and it takes time to maintain the programs. : It is necessary to prepare input / output means such as a keyboard and a CRT for each of the two control devices, and it is necessary to prepare a program and an interface for supporting each of them, resulting in an increase in cost. The CPU on the image processing apparatus side must always perform an operation of waiting for a processing start command from the robot control apparatus.

【0008】これらの問題は、全て、画像処理と把持と
いう異なる性質の制御プログラムを別々に実行している
からに他ならない。
[0008] All of these problems are due to the separate execution of control programs having different properties of image processing and gripping.

【0009】本発明は上記従来技術の問題点に鑑みて提
案されたものであり、その目的は、画像処理部に対する
処理命令とロボツト及びハンド等における把持動作命令
とを解釈し、これらの画像処理部及び把持部に命令を発
行する命令解釈手段を1つにすることにより、画像処理
プログラムと把持動作プログラムの解釈を一元化した自
動把持装置を制御するための制御方法及び制御装置を提
供するものである。
The present invention has been proposed in view of the above-mentioned problems of the prior art, and an object of the present invention is to interpret a processing instruction to an image processing unit and a gripping operation instruction in a robot, a hand, and the like, and to execute these image processing. The present invention provides a control method and a control device for controlling an automatic gripping device that unifies the interpretation of an image processing program and a gripping operation program by using a single command interpreting unit that issues a command to a unit and a gripping unit. is there.

【0010】[0010]

【課題を解決するための手段】上記課題を達成するため
の本発明の、ワークの画像を撮像し、この画像から前記
ワークの位置情報を算出する画像処理部と、前記ワーク
を前記位置情報に基づいて把持する把持部と、前記ワー
クの位置情報に応じて、この把持部をワークの置かれた
位置に移動させ、ワークを把持した把持部を組み付けス
テージに移動する移動手段と、この把持したワークを組
体に組立てる組立手段とを有する自動把持装置を制御す
る制御装置は、 前記ワークを撮像しそのワークの画像か
ら位置情報を算出する一連の画像処理命令とこのワーク
を前記位置情報に基づいて把持する一連の把持動作命令
と、前記移動手段と組立手段の動作を記述する動作制御
命令とを含むプログラムを記憶する記憶部と、 このプロ
グラム中の前記画像処理命令と把持動作命令と動作制御
命令とを識別して解釈すると共に、前記画像処理命令と
把持動作命令と動作制御命令とを夫々対応する中間命令
コードに変換し、変換された命令コードを夫々前記画像
処理部及び把持部に渡すための1つの解釈部とを具備し
たことを特徴とする。 また、請求項2に係る本発明の、
ワークの画像を撮像し、この画像から前記ワークの位置
情報を算出する画像処理部と、前記ワークを前記位置情
報に基づいて把持する把持部とからなる自動把持装置を
制御する制御装置は、 前記ワークを撮像しそのワークの
画像から位置情報を算出する一連の画像処理命令とこの
ワークを前記位置情報に基づいて把持する一連の把持動
作命令とを含むプログラムを記憶する記憶部と、 このプ
ログラム中の前記画像処理命令と把持動作命令とを識別
して解釈すると共に、前記画像処理命令と把持動作命令
とを夫々対応する中間命令コードに変換し、変換された
命令コードを夫々前記画像処理部及び把持部に渡すため
の1つの解釈部とを具備し、 前記解釈部は、1つの前記
画像処理命令または把持動作命令を解釈して命令コード
に変換した後に、次の前記画像処理命令または把持動作
命令を解釈することを特徴とする。 また、請求項3に係
る本発明の、ワークの画像を撮像し、この画像から前記
ワークの位置情報を算出する画像処理部と、前記ワーク
を前記位置情報に基づいて把持する把持部とからなる自
動把持装置を制御する制御装置は、 前記ワークを撮像し
そのワークの画像から位置情報を算出する一連の画像処
理命令とこのワークを前記位置情報に基づいて把持する
一連の把持動作命令とを含むプログラムを記憶する記憶
部と、 このプログラム中の前記画像処理命令と把持動作
命令とを識別して解釈すると共に、前記画像処理命令と
把持動作命令とを夫々対応する中間命令コードに変換
し、変換された命令コードを夫々前記画像処理部及び把
持部に渡すための1つの解釈部とを具備し、 前記画像処
理部は前記画像処理命令から変換された命令コードを解
釈実行する第1の実行手段を有し、 前記把持部は前記把
持動作命令から変換された命令コードを解釈実行する第
2の実行手段を有したことを特徴とする。
Means for Solving the Problems According to the present invention for achieving the above object, an image of a workpiece is taken, and the image is taken from the image.
An image processing unit for calculating position information of the work;
A gripper for gripping the workpiece based on the position information;
According to the position information of the workpiece,
Position, and attach the gripper holding the workpiece to the assembly
The moving means for moving to the stage
Controlling an automatic gripping device having assembly means for assembling the body.
The control device captures the work and determines whether the image of the work is
A series of image processing instructions for calculating position information from
A series of gripping operation commands for gripping the robot based on the position information
And operation control describing operations of the moving means and the assembling means.
A storage unit for storing a program including the instruction and the professional
The image processing command, the gripping command and the motion control in the program
And identifying and interpreting the image processing instruction.
Intermediate commands corresponding to the gripping command and the motion control command, respectively
Code, and convert the converted instruction codes to the respective images.
A processing unit and one interpreting unit for passing to the gripping unit.
It is characterized by having. Further, according to the second aspect of the present invention,
An image of the work is taken, and the position of the work is
An image processing unit for calculating information;
Automatic gripping device consisting of a gripper that grips based on information
The control device controls the imaging of the work, and
A series of image processing instructions for calculating position information from images and
A series of gripping movements for gripping the workpiece based on the position information
A storage unit for storing a program that includes a work instruction, this preference
Identify the image processing command and the gripping command in the program
The image processing instruction and the gripping operation instruction
Are converted to the corresponding intermediate instruction codes, and the converted
To pass command codes to the image processing unit and the gripping unit, respectively
And one interpretation unit, wherein the interpretation unit is one
Interpret image processing instructions or gripping operation instructions and issue instruction codes
After the conversion to the following image processing command or grip operation
It is characterized by interpreting instructions. Further, according to claim 3
Image of the work according to the present invention, and
An image processing unit for calculating position information of the work;
And a gripper for gripping the robot based on the position information.
A control device for controlling the moving gripping device captures an image of the work,
A series of image processing for calculating position information from the image of the work
And grasp the workpiece based on the position information
Storage for storing a program including a series of gripping operation instructions
Unit, the image processing instruction in this program and the gripping operation
And identifying and interpreting the image processing instruction.
Converts gripping operation instructions to corresponding intermediate instruction codes
And converts the converted instruction codes into the image processing unit and the
One interpretation unit for passing the image data to the holding unit.
The processing unit interprets the instruction code converted from the image processing instruction.
First executing means for executing the release, wherein
Interprets and executes the instruction code converted from the holding operation instruction.
2 is provided.

【0011】上記課題を達成するための請求項7に係る
本発明の、ワークの画像を撮像し、この画像から前記ワ
ークの位置情報を算出する画像処理部と、前記ワークを
前記位置情報に基づいて把持する把持部とからなる自動
把持装置を制御する制御方法は、 前記ワークを撮像しそ
のワークの画像から位置情報を算出する一連の画像処理
命令とこのワークを前記位置情報に基づいて把持する一
連の把持動作命令とを含むプログラムを、前記画像処理
命令と把持動作命令とを識別して解釈する解釈工程と、
前記画像処理命令と把持動作命令とを、夫々対応する中
間命令コードに変換する変換工程と、 変換された命令コ
ードを夫々前記画像処理部及び把持部に渡す工程とを具
備し、 1つの画像処理命令または把持動作命令が解釈さ
れて命令コードに変換されたた後に、前記解釈工程で、
次の画像処理命令または把持動作命令が解釈されること
を特徴とする。 また、請求項8に係る本発明の、ワーク
の画像を撮像し、この画像から前記ワークの位置情報を
算出する画像処理部と、前記ワークを前記位置情報に基
づいて把持する把持部とからなる自動把持装置を制御す
る制御方法は、 前記ワークを撮像しそのワークの画像か
ら位置情報を算出する一連の画像処理命令とこのワーク
を前記位置情報に基づいて把持する一連の把持動作命令
とを含むプログラムを、前記画像処理命令と把持動作命
令とを識別して解釈する解釈工程と、 前記画像処理命令
と把持動作命令とを、夫々対応する中間命令コードに変
換する変換工程と、 変換された命令コードを夫々前記画
像処理部及び把持部に渡す工程とを具備し、 前記画像処
理部においては、前記画像処理命令から変換された命令
コードを解釈実行し、 前記把持部においては、前記把持
動作命令から変換された命令コードを解釈実行すること
を特徴とする。
According to a seventh aspect of the present invention, there is provided the above-mentioned object.
According to the present invention, an image of a work is taken, and
An image processing unit for calculating position information of the workpiece;
Automatic comprising a gripper for gripping based on the position information
The control method for controlling the gripping device includes capturing an image of the workpiece,
Series of image processing to calculate position information from images of different workpieces
An instruction and a method for gripping the workpiece based on the position information
A program including a series of gripping operation instructions,
An interpretation step of identifying and interpreting the command and the gripping operation command;
The image processing instruction and the gripping operation instruction are
A conversion step of converting between instruction code converted instruction code
Passing the code to the image processing unit and the gripping unit, respectively.
And Bei, of one image processing instructions or gripping operation instruction interpreting
After being converted into an instruction code, in the interpretation step,
The next image processing instruction or gripping operation instruction is interpreted
It is characterized by. Further, according to claim 8 of the present invention,
Image of the workpiece, and from this image the position information of the workpiece is obtained.
An image processing unit for calculating, and the work based on the position information.
Controlling the automatic gripping device consisting of
The control method is to image the work and determine whether the image of the work is
A series of image processing instructions for calculating position information from
A series of gripping operation commands for gripping the robot based on the position information
And a program including the image processing instruction and the gripping operation command.
An interpreting step of identifying and interpreting the image processing instruction , and the image processing instruction
And the gripping operation command into corresponding intermediate command codes.
And converting the converted instruction code to the image
Comprising the step of passing the image processing unit and the holding unit, the image processing
In the control unit, the instruction converted from the image processing instruction
Interpret and execute the code, and in the gripper,
Interpret and execute instruction codes converted from operation instructions
It is characterized by.

【0012】[0012]

【実施例】以下添付図面を参照しながら本発明の実施例
を詳細に説明する。この実施例は、本発明を、所謂シャ
トル式の自動組立装置の制御装置に適用したものであ
る。 〈全体構成〉図1はこの実施例のロボット組立装置とそ
の制御装置からなるシステムの斜視図である。このシス
テムは、大きくは、部品供給装置11,12と、組立を
行なうシャトル式のロボット6と、自動組立制御装置1
7とからなる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In this embodiment, the present invention is applied to a control device of a so-called shuttle type automatic assembly device. <Overall Configuration> FIG. 1 is a perspective view of a system including a robot assembling apparatus and a control apparatus according to this embodiment. This system is roughly composed of component supply devices 11 and 12, a shuttle type robot 6 for performing assembly, and an automatic assembly control device 1
7

【0013】9はロボット6を搭載するシヤトルであ
る。シヤトル9はシヤトル移動用モータ6eにより、ガ
イド16a,16b上を一方向に移動可能となつてい
る。15はシヤトルベースであり、本実施例では床に固
定され、上面にガイドレール16a,16bが平行な状
態でボルト等にて取付けられている。
Reference numeral 9 denotes a shuttle on which the robot 6 is mounted. The shuttle 9 can be moved in one direction on the guides 16a and 16b by a shuttle moving motor 6e. Reference numeral 15 denotes a shuttle base, which is fixed to the floor in this embodiment, and has guide rails 16a and 16b mounted on the upper surface thereof in parallel with bolts or the like.

【0014】シヤトル9は制御装置17により、あらか
じめ教示された位置へ移動停止するように制御される。
また、シヤトルベース15には、パレツト等に収納され
た組立てる為の物品を供給する為の部品供給装置11,
12が取り付けられている。本実施例のシステムでは、
異なる2つの部品が供給可能な2つの第1の部品供給装
置11と第2の部品供給装置12が設けられている。そ
れぞれの供給装置は、複数のパレツト13a,13bを
収納可能であると共に、夫々の供給制御部14,21が
パレツト内の部品が空になるとその空のパレットを部品
を収納した新たなパレツトと交換するように供給装置1
1,12を制御する。
The shuttle 9 is controlled by the control device 17 so as to stop moving to the position taught in advance.
Further, the shuttle base 15 has a component supply device 11 for supplying articles to be assembled and stored in a pallet or the like.
12 are attached. In the system of the present embodiment,
Two first component supply devices 11 and second component supply devices 12 capable of supplying two different components are provided. Each supply device is capable of storing a plurality of pallets 13a and 13b, and each of the supply control units 14 and 21 replaces the empty pallet with a new pallet containing the components when the components in the pallet become empty. Supply device 1
1 and 12 are controlled.

【0015】組付用のロボツト6はシヤトル9上に固定
されているものの、部品供給装置11,12から部品を
取れるように、そのパレツト13a,13bの位置まで
16a,16bのガイドレールに沿つて移動する。
Although the mounting robot 6 is fixed on the shuttle 9, the robot 6 is moved along the guide rails 16a and 16b to the positions of the pallets 13a and 13b so that the components can be removed from the component supply devices 11 and 12. Moving.

【0016】本実施例のロボツトは、いわゆる水平多関
節の4自由度をもつたもので、モータ6a,6bにより
水平の2本のアームが駆動され、モータ6cによりアー
ム先端部が昇降し、モータ6dにより前記アーム先端部
が回転させられる。なお、ロボツト6の手首部にはハン
ド7が取りつけられており、3つのモータ22a,22
b,22cによりフィンガーが駆動され、部品を把持す
ることが可能である。なお、前記6a,6b,6c,6
d,6e,22a,22b,22cのモータは制御装置
17によりあらかじめ記憶されている動作に従つて動作
するものである。
The robot according to the present embodiment has a so-called horizontal articulated four-degree-of-freedom, and two horizontal arms are driven by motors 6a and 6b, and the tip of the arm is moved up and down by a motor 6c. The arm tip is rotated by 6d. A hand 7 is attached to the wrist of the robot 6, and three motors 22a, 22a are provided.
The finger is driven by b and 22c, and it is possible to grip the component. Note that 6a, 6b, 6c, 6
The motors d, 6e, 22a, 22b, and 22c operate according to the operation stored in advance by the control device 17.

【0017】図1におけるロボツト6の位置は部品供給
装置11上のパレツト13a上の部品をつかむことが可
能な位置にある。ハンドの脱着部7aは、制御装置17
の指令により不図示のクランパーを解放することにより
外れる。ハンドの保持台10は複数のハンドを保持して
おくためのものである。ロボツト6は、保持台10上の
任意のハンドを制御装置17の指令により自動で付ける
ことも可能であり、かつ、現在手首部に取り付いている
ハンドをハンド保持台10に外して乗せることも可能で
ある。また、組付ステージ8はロボツト6がつかんだ部
品を組立てる場所であって、必要に応じてガイド,補助
機能を付けることが可能である。この補助機能の動作が
必要な場合は、組付ステージ8上に駆動源を置き、この
駆動源を制御装置17とケーブルでつなぐことにより制
御可能となる。また、組付ステージ8はロボツト6と同
じくシヤトル9上に乗つているために、ロボツト6がパ
レツトより部品をつかんで、わずかに上昇した後は、シ
ヤトル9が移動を開始しても、ロボツトの組付動作を続
行することが可能である。
The position of the robot 6 in FIG. 1 is at a position where a component on the pallet 13a on the component supply device 11 can be grasped. The detachable part 7a of the hand is
Is released by releasing a clamper (not shown) in response to the command (1). The hand holding base 10 is for holding a plurality of hands. The robot 6 can automatically attach an arbitrary hand on the holding table 10 according to a command from the control device 17, and can also remove the hand currently attached to the wrist from the hand holding table 10 and put it on the hand holding table 10. It is. The assembling stage 8 is a place for assembling parts held by the robot 6, and can be provided with a guide and an auxiliary function as needed. When the operation of the auxiliary function is required, a drive source is placed on the assembly stage 8 and can be controlled by connecting the drive source to the controller 17 with a cable. Also, since the mounting stage 8 rides on the shuttle 9 similarly to the robot 6, after the robot 6 grabs a part from the pallet and rises slightly, even if the shuttle 9 starts moving, It is possible to continue the assembling operation.

【0018】5は視覚柱であり、その根元はシヤトル9
上に固定されている。先端部にはXYテーブル3が設け
られている。XYテーブル3の固定部にはレンズ1が取
り付けられている。CCDカメラ2は、XY2方向のス
テツピングモータ4a,4bにより移動可能となってい
る。即ち、レンズ1は1つのパレットの全領域を視野に
入れているが、CCDカメラ2を移動することにより、
パレットの任意の部分領域を高精度に画像情報として取
り込むことが可能である。つまり、13bのパレツト全
面をレンズ1を通して結像させた面内を結像面積より十
分小さなCCDに移動させ、13bのパレツトの入力さ
せたい場所のみの画像情報を取り込むようにしている。
Reference numeral 5 denotes a visual pillar, the root of which is shuttle 9
Fixed on top. An XY table 3 is provided at the tip. The lens 1 is attached to a fixed portion of the XY table 3. The CCD camera 2 can be moved by stepping motors 4a and 4b in the X and Y directions. That is, although the lens 1 has a view of the entire area of one pallet, by moving the CCD camera 2,
An arbitrary partial area of the pallet can be captured with high precision as image information. In other words, the entire surface of the pallet 13b formed through the lens 1 is moved to a CCD sufficiently smaller than the imaging area to capture image information only at the place where the pallet 13b is to be input.

【0019】視覚柱5はシヤトル9上に搭載されている
ために、組付けたい部品を収納した供給装置へシヤトル
と共に移動される。ピツクする部品を収納しているパレ
ットの画像は、その画像を入力可能な位置にCCDカメ
ラ2(即ちシャトル9)を移動させることで得ることが
でき、その画像を処理して、その処理結果に応じてロボ
ツトにより前記画像処理した部品を把持できる。
Since the visual column 5 is mounted on the shuttle 9, the visual column 5 is moved together with the shuttle to a supply device containing components to be assembled. An image of a pallet containing components to be picked can be obtained by moving the CCD camera 2 (that is, the shuttle 9) to a position where the image can be input, and the image is processed. Accordingly, the image-processed component can be gripped by the robot.

【0020】組立装置全体の制御をする自動組立制御装
置17はケーブル18にてロボツト6,シヤトル9,X
Yテーブル3,ハンド7等のアクチユエータの制御及び
不図示のセンサーの入力等が可能となつている。19は
CRTで、20はキーボードで入出力が可能となる。
An automatic assembling control device 17 for controlling the entire assembling device is connected to a robot 6, a robot 6, a shuttle 9,
It is possible to control actuators such as the Y table 3 and the hand 7 and to input sensors (not shown). Reference numeral 19 denotes a CRT, and reference numeral 20 denotes a keyboard which enables input / output.

【0021】〈実施例装置の特徴〉この実施例システム
に特有の機能は、主に、後述の制御装置17により実現
される。そのような機能とは: :組み付け対象(把持対象)の部品を、パレット内で
特定し認識するために、パレット内の部品の画像を取り
込んで、パターンマツチングを行なう。この認識によ
り、パレット内にどのように部品が収納されていても、
部品の認識が可能となる。 :パターンマツチングにより、目的とする部品の存在
がパレット内に認識できると、その部品の位置を視覚系
の座標系で認識し、更に、ロボット系の座標系に変換す
る。ロボットは、ロボット系の座標系での把持位置で目
的部品を把持することができる。
<Features of the embodiment apparatus> The functions specific to the embodiment system are mainly realized by a control unit 17 described later. Such functions are as follows: In order to identify and recognize a component to be assembled (a gripping target) in the pallet, an image of the component in the pallet is taken in and pattern matching is performed. With this recognition, no matter how the parts are stored in the pallet,
Recognition of parts becomes possible. When the presence of a target component can be recognized in the pallet by pattern matching, the position of the component is recognized in a visual coordinate system and further converted to a robot coordinate system. The robot can grip a target component at a gripping position in a robot-based coordinate system.

【0022】:目的の部品を認識する処理を記述する
画像処理プログラムと、認識された部品を把持し移動す
る制御を記述する組み付けプログラムとは、後述の命令
解釈部87内のRAM52に中間コードに変換されて記
憶されている。これらの2つのプログラムは、マルチタ
スク制御により実行される。 :画像処理プログラム(タスク)は、組み付けプログ
ラム内に含まれる特別なタスク起動命令により起動され
る。起動された画像処理プログラムは組み付けプログラ
ムと並列処理される。
An image processing program that describes processing for recognizing a target component and an assembly program that describes control for grasping and moving the recognized component are stored in the RAM 52 in the instruction interpreting unit 87 described below as intermediate codes. It is converted and stored. These two programs are executed by multitask control. : The image processing program (task) is activated by a special task activation instruction included in the imposition program. The activated image processing program is processed in parallel with the imposition program.

【0023】:中間コードにあらかじめ変換されてい
る画像処理プログラムと、組み付けプログラムは同じ命
令解釈部により解釈され、それらに含まれる種々の命令
は、命令コードに変換される。命令コードに変換するこ
とにより、画像処理プログラム中の命令と組み付けプロ
グラムのそれとの性質上の相違を吸収し、画像処理プロ
グラムと組み付けプログラムとの一元管理が容易にな
る。 :画像処理プログラムの命令コードは、後述のデユア
ルポートRAMに記憶される。また、組み付けプログラ
ムの命令コードは後述の共有メモリ60に記憶される。
デユアルポートRAMの使用により、画像処理部のマイ
クロコンピユータと動作制御部におけるマイクロコンピ
ユータとを夫々の目的に適したものから選択することが
可能となる。
The image processing program and the assembling program, which have been converted into intermediate codes in advance, are interpreted by the same instruction interpreting unit, and various instructions contained therein are converted into instruction codes. The conversion into the instruction code absorbs a difference in the property between the instruction in the image processing program and that of the assembling program, and facilitates unified management of the image processing program and the assembling program. : The instruction code of the image processing program is stored in a dual port RAM described later. The instruction code of the installation program is stored in a shared memory 60 described later.
By using the dual port RAM, it is possible to select a microcomputer of the image processing unit and a microcomputer of the operation control unit from those suitable for each purpose.

【0024】以下、制御装置17の構成及びそこにおけ
る動作について説明する。 〈制御装置17の構成〉図2は制御装置17の全体構成
図である。この制御装置17は、ロボット6の4軸のモ
ータ(6a乃至6d)とシャトル9のモータ6eを駆動
制御するロボット動作制御部62と、ハンド7の3軸の
モータ(22a乃至22c)を駆動制御するハンド動作
制御部63と、XYテーブルの駆動モータ4a,4bを
制御すると共にカメラ2を制御する画像処理部64と、
2つの供給装置11,12の制御部14,21とのイン
ターフェースを司どるインターフェース54と、ロボッ
トプログラムの命令の解釈実行を行なう命令解釈部87
と、上記ロボット動作制御部62,,ハンド動作制御部
63,画像処理部64,命令解釈部87間で共有される
共有メモリ60とを有する。これらの構成要素はシステ
ムバス59に接続されており、本実施例では、このバス
59はマルチバスである。
Hereinafter, the configuration of the control device 17 and the operation thereof will be described. <Structure of Control Device 17> FIG. The control device 17 drives and controls the four-axis motors (6 a to 6 d) of the robot 6 and the motor 6 e of the shuttle 9, and the three-axis motors (22 a to 22 c) of the hand 7. A hand operation control unit 63 for controlling the driving motors 4a and 4b of the XY table and an image processing unit 64 for controlling the camera 2;
An interface 54 for controlling an interface with the control units 14 and 21 of the two supply devices 11 and 12, and a command interpretation unit 87 for interpreting and executing a command of the robot program.
And a shared memory 60 shared among the robot operation control unit 62, the hand operation control unit 63, the image processing unit 64, and the command interpretation unit 87. These components are connected to a system bus 59. In this embodiment, the bus 59 is a multi-bus.

【0025】命令解釈部87 命令解釈部87について図2により説明する。50はC
PUで、51はROMである。このROM51内には、
図5に示すように、ロボット言語命令の解釈プログラム
と、この命令解釈プログラム中の視覚処理命令とロボツ
ト及びハンドの動作命令の夫々を必要に応じて解釈する
マルチタスク・オペレーテイング・システム(以下、
「OS」と略す)と、それらをサポートする種々のプロ
グラムがあらかじめ記憶されている。これらのプログラ
ムの詳細については後述する。
Command Interpreting Unit 87 The command interpreting unit 87 will be described with reference to FIG. 50 is C
A PU 51 is a ROM. In this ROM 51,
As shown in FIG. 5, a robot language command interpreting program, and a multitasking operating system (hereinafter, referred to as a "task") that interprets visual processing commands and robot and hand operation commands in the command interpreting program as necessary.
“OS”) and various programs supporting them are stored in advance. Details of these programs will be described later.

【0026】命令解釈部87のRAM52内にはキーボ
ード20により入力されたところの、画像処理プログラ
ム及びロボツト/ハンドのための動作プログラムが収納
されている。
In the RAM 52 of the command interpreting section 87, an image processing program and an operation program for robot / hand, which are input by the keyboard 20, are stored.

【0027】命令解釈部87内の各要素はローカルバス
86により接続されている。即ち、ローカルバス86に
はROM51とRAM52とインターフエースIF53
が結合されている。RAM52内のデータは、CRT1
9に表示することが可能であり、キーボード20により
入力することも削除等することも可能である。また、本
システムの実際の動作の指令はキーボード20により行
なう。
Each element in the instruction interpreting section 87 is connected by a local bus 86. That is, the local bus 86 includes the ROM 51, the RAM 52, and the interface IF 53.
Are combined. The data in the RAM 52 is CRT1
9 and can be input by the keyboard 20 or deleted. In addition, a command for an actual operation of the present system is issued from the keyboard 20.

【0028】62,63はロボツト及びハンドのための
動作制御部である。これらの制御部62,63は、共有
メモリ60内に、ロボツト動作及びハンド動作に対応す
る命令コードが書かれると、その命令コードに従つた動
作処理を行ない、各デバイスつまり各モータ6a〜6e
の回転・停止を行なう。前述したように、上記命令コー
ドは、命令解釈部87がこの共有メモリ60に書込む。
Reference numerals 62 and 63 denote operation controllers for the robot and the hand. When the instruction codes corresponding to the robot operation and the hand operation are written in the shared memory 60, these control units 62 and 63 perform the operation processing according to the instruction codes, and perform each device, that is, each motor 6a to 6e.
Rotate and stop. As described above, the instruction code is written into the shared memory 60 by the instruction interpreting unit 87.

【0029】画像処理部64は部品を認識するための画
像処理を行なう部分で、IF61に書き込まれた命令コ
ードにより処理を行なう。69は公知の磁気式の外部記
憶手段であり、たとえばフロツピーデイスクドライブ又
はハードデイスクドライブであり、IF53を通し、ロ
ボツト・ハンドの動作命令画像の処理命令をキーボード
20を操作することにより記憶させることが可能となつ
ている。
The image processing section 64 performs image processing for recognizing components, and performs processing in accordance with the instruction code written in the IF 61. Reference numeral 69 denotes a known magnetic external storage means, for example, a floppy disk drive or a hard disk drive, which can store a robot hand operation command image processing command through the IF 53 by operating the keyboard 20. It is possible.

【0030】また、外部のコンピユータ等で記憶させて
あるフロツピーデイスク又はすでに記憶してあるフロツ
ピーデイスクをもつて来ることにより、RAM52内に
処理命令,動作命令をそれぞれのきめられた領域に格納
することも可能である。
Further, by bringing the floppy disk stored by an external computer or the like or the floppy disk already stored, the processing command and the operation command are stored in the RAM 52 in the specified areas. It is also possible.

【0031】部品供給装置の制御部14,21は、光通
信回路56a,56bをもち、シヤトル9上の光通信回
路55a,55bと情報の授受が可能となつている。こ
れらの光通信回路はそれぞれ発光手段と受光手段を持
ち、それぞれ発光と受光が対向し、ロボツト6が所定の
供給装置の位置で停止したとき、通信可能となる。
The control units 14 and 21 of the component supply device have optical communication circuits 56a and 56b, and can exchange information with the optical communication circuits 55a and 55b on the shuttle 9. Each of these optical communication circuits has a light emitting unit and a light receiving unit. Light emission and light reception are opposed to each other, and communication becomes possible when the robot 6 stops at a predetermined supply device position.

【0032】インターフェースIF57は外部のコンピ
ユータ等との通信するためのインターフエースであり、
本組立装置内の情報を外部へ送つたり、外部からの情報
の入力を行なう。たとえば、無人倉庫を管理するコンピ
ユータと通信することで、パレツトの自動配送のタイミ
ングを算出することも可能である。59はCPU50と
62のロボツト動作部63ハンド動作部61のIF61
と共有メモリ60を結ぶコモンバスであって、本実施例
ではマルチバスである。
The interface IF 57 is an interface for communicating with an external computer or the like.
The information in the assembling apparatus is sent to the outside or the information is input from the outside. For example, by communicating with a computer that manages an unmanned warehouse, it is possible to calculate the timing of automatic delivery of pallets. Reference numeral 59 denotes a robot operation unit 63 of the CPUs 50 and 62, and an IF 61 of the hand operation unit 61.
And a common bus connecting the shared memory 60 and a multi-bus in this embodiment.

【0033】解釈部87のCPU50で解釈実行され生
成された命令コードは共有メモリ60にセツトされる。
これらの命令コードをロボツト動作制御部62又はハン
ド動作制御部63が受ける。制御部62,63において
実際の動作を行ない動作が終了すると、共有メモリ60
上へ前記制御部が動作の終了信号を書き込む。
The instruction code interpreted and executed by the CPU 50 of the interpreting section 87 is set in the shared memory 60.
These instruction codes are received by the robot operation control unit 62 or the hand operation control unit 63. When the control units 62 and 63 perform the actual operation and end the operation, the shared memory 60
The control unit writes an operation end signal upward.

【0034】また、CPU50で解釈実行された命令が
画像処理に関連する命令である場合、その命令コードは
IF61内に設けられたツー・ポートRAM(2-PORT-RA
M)内に書かれ、前述の組み付け動作命令と同様に、画像
処理が終了すると処理結果の通信が必要なときは、処理
結果と処理の終了信号を同じく、前記IF61内のツー
・ポートRAM上に書き込む。
When the instruction interpreted and executed by the CPU 50 is an instruction related to image processing, the instruction code is stored in a two-port RAM (2-PORT-RA) provided in the IF 61.
M), when the image processing is completed and the communication of the processing result is necessary, similarly to the above-described assembling operation instruction, when the processing result and the processing end signal are sent to the two-port RAM in the IF 61, Write to.

【0035】画像処理部64 図3は画像処理部64の詳細の構成図である。65は画
像処理部全体の制御を行なうCPUである。ツー・ポー
ト・RAM61では、制御装置17の他の要素とのデー
タのやりとりが可能なように、図2のバス59と図3の
バス72とが両方向から接続されて、その両方向から読
み書きが可能である。
Image Processing Unit 64 FIG. 3 is a detailed block diagram of the image processing unit 64. A CPU 65 controls the entire image processing unit. In the two-port RAM 61, the bus 59 of FIG. 2 and the bus 72 of FIG. 3 are connected from both directions so that data can be exchanged with other elements of the control device 17, and reading and writing can be performed from both directions. It is.

【0036】CPU50とCPU65のバス間にツー・
ポートRAM61を設けることにより、CPU50とC
PU65のCPUの種類を異ならせることが可能とな
る。尚、図2の共有メモリ60で通信可能であったよう
に、CPU65とCPU50の形式を同等にしても何ら
問題はない。また、図2のロボツト動作制御部62,ハ
ンド動作制御部63と命令解釈部87とのデータの授受
も、画像処理部64と同様にツー・ポート・RAM61
をインターフエースとして設けることにより通信を行な
わせても何ら問題はない。
Two buses are provided between the buses of the CPU 50 and the CPU 65.
By providing the port RAM 61, the CPU 50 and the C
It is possible to make the type of CPU of the PU 65 different. It should be noted that there is no problem even if the formats of the CPU 65 and the CPU 50 are made equal, as was possible with the shared memory 60 of FIG. The transfer of data between the robot operation control unit 62, the hand operation control unit 63 and the command interpretation unit 87 in FIG.
There is no problem even if the communication is performed by providing as an interface.

【0037】画像処理部64において、2は画像を取り
込むためのカメラで、本実施例においてはX−Yテーブ
ルにそのレンズが固定されている。XYテーブル3はC
CDを撮像面内で移動させることにより、パレツトの必
要な場所の画像情報を取り込むようにすることができ
る。カメラ2が取った画像信号は、A/D変換部73に
より明るさのレベルでデジタル化され、フレームメモリ
75内に記憶される。
In the image processing section 64, reference numeral 2 denotes a camera for taking in an image. In this embodiment, the lens is fixed to an XY table. XY table 3 is C
By moving the CD within the imaging plane, it is possible to capture image information of a place where a pallet is required. The image signal taken by the camera 2 is digitized at the brightness level by the A / D converter 73 and stored in the frame memory 75.

【0038】図4は部品供給装置における部品収納に用
いられるパレットの外観を示す。同図に示すように、パ
レット内では部品が分割されたセル内に納められてい
る。部品は、パレットのセル位置情報により特定され
る。本組立装置は、画像処理で部品の正確な位置を認識
するので、あらかじめ部品をパレット内に正確に固定す
る必要はない。また、パレットのセルも正確な寸法を有
する必要もない。必要とする部品を収納しているセルの
凡その位置が分れば十分である。即ち、必要とする部品
のセル位置がロボットプログラムにおいて特定されれ
ば、そのセル位置周辺の画像に対して画像処理を行な
い、そのセル内において、要求部品の正確な位置をパタ
ーン認識で求める。
FIG. 4 shows the appearance of a pallet used for storing components in the component supply device. As shown in the figure, components are stored in divided cells in the pallet. The part is specified by the cell position information of the pallet. Since the present assembling apparatus recognizes the exact position of the part by image processing, it is not necessary to fix the part accurately in the pallet in advance. Also, the cells of the pallet need not have the exact dimensions. It suffices to know the approximate position of the cell containing the required component. That is, if the cell position of the required component is specified in the robot program, image processing is performed on an image around the cell position, and the exact position of the required component is found in the cell by pattern recognition.

【0039】CCDカメラ2の視野をパレット全体をカ
バーするほどの大きさに設定したならば、コスト増加を
甘受してCCD素子を大きいものにするか、あるいは解
像度の劣化を甘受して小さなCCD素子によりパレット
全体を視野に入れるようにしなければならない。そこ
で、本実施例では、カメラ2を移動式にし、パレットの
画像の必要部分のみを取出すようにしている。そこで、
カメラ2にはXYテーブル駆動部76が設けられてい
る。この駆動部76は、XYテーブルの2つのステツピ
ングモータ4a,4bを回転駆動させ、カメラを所定の
位置へ移動させる。領域設定部74は、カメラ2で画像
を取り込む際に、CCDの全域の画像情報を取り込む必
要がないときに領域を限定する機能を有する。組立機に
おいて、組付部品の形状及び大きさは、あらかじめわか
つているため、1つの部品の画像情報のみを取り込みた
い場合には、画像の処理命令内に領域を限定する処理命
令をプログラムしておく。
If the field of view of the CCD camera 2 is set to be large enough to cover the entire pallet, the CCD element may be made larger by accepting an increase in cost, or the CCD element may be made smaller by accepting deterioration in resolution. , So that the entire pallet can be seen. Therefore, in the present embodiment, the camera 2 is made to be movable, and only a necessary portion of the pallet image is taken out. Therefore,
The camera 2 is provided with an XY table driving unit 76. The driving unit 76 drives the two stepping motors 4a and 4b of the XY table to rotate, and moves the camera to a predetermined position. The area setting unit 74 has a function of limiting an area when it is not necessary to capture image information of the entire area of the CCD when capturing an image with the camera 2. In the assembling machine, the shape and size of the assembled parts are known in advance, so when it is desired to capture only the image information of one part, a processing instruction for limiting the area is programmed in the image processing instruction. deep.

【0040】二値化部66は、フレームメモリ75に格
納されている画像情報を処理命令であらかじめ指定され
た明るさのレベルを基準にして、たとえば明るいものを
“1”、暗いものを“0”として二値化する。二値画像
は、再度、フレームメモリ75に格納する。
The binarizing section 66 converts the image information stored in the frame memory 75 into, for example, "1" for a bright one and "0" for a dark one based on a brightness level specified in advance by a processing command. "To binarize. The binary image is stored in the frame memory 75 again.

【0041】ラベリング部67はラベリングを行なう。
このラベリング処理は、二値化された画像情報中に、た
とえば、連結しているドットの塊グループ、つまり
“1”の塊のグループを見つけ、それぞれのグループに
各々異なつたラベルを付ける。
The labeling section 67 performs labeling.
In this labeling process, for example, a group of connected dots, that is, a group of “1” clusters is found in the binarized image information, and a different label is attached to each group.

【0042】ラベリングされた連結領域の各々に対し
て、たとえば重心位置面積,慣性主軸を算出するのが特
徴パラメータ算出部68である。算出部68で算出され
たあるワークの画像の特徴パラメータと、ツー・ポート
・RAM61内に格納されている基準特徴パラメータと
を比較することにより、その画像が指定された部品の画
像であるかどうかを判別する。その画像の部品が指定さ
れた部品であると判定された場合には、その部品の視覚
座標系における位置と傾きを求め、ツー・ポート・RA
M61内にあらかじめ格納されているロボツト座標系へ
の変換パラメータを用いて、ロボツト座標系へ変換し、
ツー・ポート・RAM61上へ位置データとして格納す
る。ロボツトの動作命令中、該位置データが必要なとき
は、位置データを読み、その結果で動作する動作命令を
実行することにより画像処理部が算出した位置情報でパ
レツト内の部品をつかみ、組付を行なえる。また、ツー
・ポート・RAM61内に格納されている特徴パラメー
タ及び座標変換のパラメータは、図2のRAM52のバ
ツテリーバツクUPされているところに記憶されてお
り、本制御装置の電源を入れると自動的にツー・ポート
・RAM61上にも記憶されるよう、構成されている。
The feature parameter calculator 68 calculates, for each of the labeled connection regions, for example, the center-of-gravity position area and the principal axis of inertia. By comparing the feature parameter of the image of a certain work calculated by the calculation unit 68 with the reference feature parameter stored in the two-port RAM 61, it is determined whether or not the image is an image of a specified component. Is determined. If it is determined that the part of the image is the specified part, the position and inclination of the part in the visual coordinate system are obtained, and the two-port RA
Using the conversion parameters for the robot coordinate system stored in advance in M61, the robot is converted to the robot coordinate system,
The position data is stored on the two-port RAM 61 as position data. If the position data is required during the robot operation instruction, the position data is read, and the operation instruction that operates according to the result is executed, thereby grasping the components in the pallet with the position information calculated by the image processing unit, and assembling. Can be performed. The feature parameters and coordinate conversion parameters stored in the two-port RAM 61 are stored in the battery backing up area of the RAM 52 in FIG. 2 and automatically turned on when the control device is turned on. Is also stored in the two-port RAM 61.

【0043】図3において、ROM71は、画像の一連
の処理を行なわせるプログラムをあらかじめ記憶してい
る。 〈プログラム構造〉図5は、図2に関連して説明した命
令解釈部87のローカルメモリ用ROM51に格納され
たプログラムの格納状況を示す。
In FIG. 3, a ROM 71 previously stores a program for performing a series of processing of an image. <Program Structure> FIG. 5 shows a storage state of a program stored in the local memory ROM 51 of the instruction interpreting section 87 described with reference to FIG.

【0044】ROM51には、電源立ち上げ時に先つ実
行される起動プログラム100と、複数のタスクの管理
・実行を行なうマルチタスクOS101と、プログラム
を作成するためのテキストエデイタ102と、作成され
たテキストプログラムを解釈可能な中間コードに変換す
るためのコンパイラ103と、コンパイラ103により
変換された中間コードを解釈し、下位の制御部(ロボッ
ト動作制御部62,ハンド動作制御部63,画像処理部
64)のための命令コード(図13〜図15)を発生す
る命令解釈プログラム104と、キーボード,CRT等
の入出力装置の入出力を制御するIFドライバプログラ
ム105と、ロボツトの動作状態、作成した組付動作プ
ログラム等のロボツトタスクの状態を表示するためのロ
ボツトタスク表示プログラム106と、画像処理部64
の動作状態、作成したビジヨン動作プログラム等のビジ
ヨンタスクの状態を表示するビジヨンタスク表示プログ
ラム107とが格納されている。
The ROM 51 includes a boot program 100 that is executed before power-on, a multitask OS 101 that manages and executes a plurality of tasks, a text editor 102 for creating a program, and a created text. A compiler 103 for converting a program into an intermediate code that can be interpreted, and an intermediate code converted by the compiler 103 are interpreted, and lower-level control units (robot operation control unit 62, hand operation control unit 63, image processing unit 64) Interpretation program 104 for generating instruction codes (FIGS. 13 to 15) for operation, an IF driver program 105 for controlling input / output of input / output devices such as a keyboard and a CRT, an operation state of a robot, and a prepared assembly Robot task display for displaying the status of robot tasks such as operation programs A program 106, the image processing unit 64
And a vision task display program 107 for displaying the status of the vision task such as the created vision operation program.

【0045】図6は命令解釈部87のローカルメモリ用
RAM52におけるデータの格納状況を示す図である。
このRAM52には、ロボツトの組付動作のための一連
の動作命令群からなる組付動作プログラム108(図
9,図10)と、画像処理部の処理動作のための一連の
処理動作命令群からなるビジヨン動作プログラム109
(図11)と、XYステージの目標位置データ110
と、シヤトルの目標位置データ111と、ロボツトを位
置決めするための目標位置データ112と、組付される
ワークの特徴を示す基準特徴パラメータ113と、座標
変換パラメータ114とが格納されている。このパラメ
ータ114はロボツト座標系からXYステージ座標系の
座標変換演算に用いる演算パラメータと、XYステージ
座標系からロボツト座標系への同様の演算パラメータで
ある。RAM52は揮発性であるが、それに格納されて
いるデータ類は重要であるので、後述するように、バツ
テリー・バツクアツプされている。
FIG. 6 is a diagram showing a data storage state in the local memory RAM 52 of the instruction interpreting section 87.
The RAM 52 includes an assembling operation program 108 (FIGS. 9 and 10) composed of a series of operation instructions for the robot assembling operation and a series of processing operation instructions for the processing operation of the image processing unit. Visual Operation Program 109
(FIG. 11) and target position data 110 of the XY stage
And target position data 111 of the shuttle, target position data 112 for positioning the robot, reference characteristic parameters 113 indicating the characteristics of the work to be assembled, and coordinate conversion parameters 114. The parameter 114 is an operation parameter used for a coordinate conversion operation from the robot coordinate system to the XY stage coordinate system, and a similar operation parameter from the XY stage coordinate system to the robot coordinate system. The RAM 52 is volatile, but the data stored therein is important, so that it is backed up as described later.

【0046】〈ロボットプログラム〉図7,図8は、図
1の組立システムにおける、部品供給部11,12から
2つの部品供給を受けてワークを組立てる組立動作の過
程を表わす図である。即ち、図7は、ロボット6が第1
の部品供給部11のパレツト13aに収納された部品A
をアクセス可能となるような位置に、シヤトル9が停止
した状態を示す。図8は、ロボット6が部品Aの組立に
続いて把持される部品B(この部品Bは部品供給部12
のパレツト13bに収納されている)をアクセス可能と
なるような位置に、シヤトル9が停止した状態を示して
いる。
<Robot Program> FIGS. 7 and 8 are diagrams showing the steps of an assembling operation for assembling a work by receiving two components from the component supply units 11 and 12 in the assembly system of FIG. That is, FIG. 7 shows that the robot 6
A stored in the pallet 13a of the component supply unit 11
Shows a state in which the shuttle 9 is stopped at a position at which the shuttle 9 can be accessed. FIG. 8 shows a part B (part B is a part supply unit 12) which is held by the robot 6 following the assembly of the part A.
The shuttle 9 is stopped at a position where the shuttle 9 can be accessed.

【0047】図7、特に図8を見ても分るように、ロボ
ット6が部品Aを組み付けている動作を行なっている最
中は、カメラ2がワークBを収納しているパレット13
bの上空にある限りは、部品Aの組み付け動作と部品B
の撮像動作とは並行で行なうことができる。この組み付
け動作処理と撮像動作(画像処理)の並列性故に、図6
で示したように、組み付け動作プログラムとビジョン動
作プログラムとをタスク化することの意義がある。
As can be seen from FIG. 7, especially FIG. 8, while the robot 6 is performing the operation of assembling the part A, the camera 2 is mounted on the pallet 13 in which the work B is stored.
b, the assembling operation of the part A and the part B
Can be performed in parallel with the imaging operation. Due to the parallelism of the assembling operation processing and the imaging operation (image processing), FIG.
As shown in the above, it is significant to make the assembly operation program and the vision operation program into tasks.

【0048】図9は部品Aを組立てる一連のロボツト動
作命令群(プログラム)であり、図10は部品Bを組立
てる一連のロボツト動作命令群(プログラム)であり、
図11は部品Bの画像を画像処理して位置情報を算出す
る一連の画像処理命令群(プログラム)である。
FIG. 9 shows a series of robot operation instructions (program) for assembling the part A, and FIG. 10 shows a series of robot operation instructions (program) for assembling the part B.
FIG. 11 shows a series of image processing instructions (programs) for calculating position information by performing image processing on the image of the component B.

【0049】尚、図9乃至図11には、部品Aの画像を
画像処理して位置情報を算出するためのプログラムは示
されていない。また、ワークを完成するために、更に、
例えば部品Cが必要であるものであるならば、その部品
Cの画像を画像処理して位置情報を算出する一連の画像
処理命令群(プログラム)と、部品Cを組立てる一連の
ロボツト動作命令群(プログラム)とが、図9乃至図1
1のプログラムに追加して必要となる。また、便宜上、
図9のプログラムをプログラム1と、図10のプログラ
ムをプログラム2と、図11のプログラムを画像のプロ
グラム2と呼ぶ。
9 to 11 do not show a program for performing image processing on the image of the component A to calculate position information. In addition, to complete the work,
For example, if the part C is necessary, a series of image processing instructions (programs) for image-processing the image of the part C to calculate position information and a series of robot operation instructions (parts) for assembling the part C ( 9 to 1
It becomes necessary in addition to one program. Also, for convenience,
The program in FIG. 9 is referred to as program 1, the program in FIG. 10 is referred to as program 2, and the program in FIG.

【0050】図9乃至図11のプログラムは図7,図8
の動作を記述している。部品Aを組立て、次に部品Bを
組み付ける組立動作を行なうには、先ず、プログラム1
(図9)が前もって起動されてている必要がある。プロ
グラム1が実行されていて、プログラム1自身がプログ
ラム2を起動する。プログラム1によるプログラム2の
起動は、行番390の CALL 2 で行なって、プログラム2をコールすることによりなさ
れる。また、部品Bの組立が終了して部品Cの組立動作
を起動するには、行番250の CALL 3 を実行して、プログラム3(不図示)をコールすること
によりなされる。部品Aの組立動作中に、部品Bの画像
の取得及びその画像処理が可能となったときは、行番3
60で、 START 3,2 を実行して、プログラム3(図11)をマルチタスク制
御の下でコールする。上記START指令において、最
初のオペランドは画像用のタスク番号であり、次のオペ
ランドは画像のプログラム番号である。即ち、プログラ
ム1とプログラム3とは並列動作する。部品Bの組立動
作中に、部品Cの画像の取得及びその画像処理が可能と
なったときは、行番220で、 START 3,3 を実行して、ロボットプログラム2と画像のプログラム
3とを並列動作させる。尚、並列処理の起動命令である
START指令において、最初のオペランドはタスク番
号(画像に対しては、3が与えられている)であり、次
のオペランドはプログラム番号である。プログラム3の
3番目のプロシジャ(プログラム)は不図示ではある
が、部品Cが特殊な形状を有するものではないために、
即ち、形状に即した特別な画像処理を要するものではな
いために、図11のプログラムと同じものを援用でき
る。
The programs shown in FIGS. 9 to 11 are shown in FIGS.
Is described. In order to assemble the part A and then assemble the part B, first, the program 1
(FIG. 9) must be activated beforehand. The program 1 is being executed, and the program 1 itself starts the program 2. The activation of the program 2 by the program 1 is performed by calling CALL 2 at the line number 390 and calling the program 2. To start the assembling operation of the part C after the completion of the assembly of the part B, the CALL 3 of the line number 250 is executed, and the program 3 (not shown) is called. During the assembling operation of the part A, when the acquisition of the image of the part B and the image processing thereof become possible, the line number 3
At 60, START 3,2 is executed to call program 3 (FIG. 11) under multitasking control. In the START command, the first operand is a task number for an image, and the second operand is a program number of the image. That is, the program 1 and the program 3 operate in parallel. During the assembling operation of the part B, when the acquisition of the image of the part C and the image processing thereof become possible, at line 220, START 3,3 is executed, and the robot program 2 and the image program 3 are connected. Operate in parallel. In the START instruction which is a parallel processing start instruction, the first operand is a task number (3 is given to an image), and the next operand is a program number. Although the third procedure (program) of the program 3 is not shown, since the part C does not have a special shape,
That is, since special image processing according to the shape is not required, the same one as the program in FIG. 11 can be used.

【0051】図9乃至図11のプログラム中における各
ステートメントの命令の意味は、後述する。 〈並列処理〉図7,図8に示すように、本実施例のロボ
ットシステムにおける、組立動作と画像処理とは並列動
作が可能である。また、図9乃至図11に示したよう
に、これらの動作を記述するプログラムも並列処理を意
識したものである。そこで、以下に、この並列処理を実
現するために、制御装置17の特徴ある制御について説
明する。これらの特徴とは、図12に示すように、 :所謂ロボットプログラム(図9乃至図11のプログ
ラム)を解釈するのは、命令解釈部87の命令解釈プロ
グラム104(図5)が行ない、 :上記プログラム104は、プログラム中の命令(ス
テートメント)を、組立動作に関するもの(ロボット動
作制御部62若しくはハンド動作制御部63)か、画像
処理に関連するもの(画像処理部64のためのもの)か
を判別し、夫々、対応する命令コードを生成する。
The meaning of the instruction of each statement in the programs of FIGS. 9 to 11 will be described later. <Parallel Processing> As shown in FIGS. 7 and 8, in the robot system of this embodiment, the assembling operation and the image processing can be performed in parallel. Also, as shown in FIGS. 9 to 11, the programs describing these operations are also conscious of parallel processing. Therefore, in order to realize this parallel processing, the characteristic control of the control device 17 will be described below. As shown in FIG. 12, these characteristics are as follows: The so-called robot program (the program in FIGS. 9 to 11) is interpreted by the instruction interpreting program 104 (FIG. 5) of the instruction interpreting section 87. The program 104 determines whether an instruction (statement) in the program relates to an assembling operation (the robot operation control unit 62 or the hand operation control unit 63) or an image processing (to the image processing unit 64). Judgment is made, and corresponding instruction codes are respectively generated.

【0052】:組立動作に関する命令から生成された
命令コードは共有メモリ60に書込まれ、画像処理に関
連する命令から生成された命令コードはツー・ポート・
RAM61に書込まれる。 :ロボット動作制御部62またはハンド動作制御部6
3は、共有メモリ60内に書込まれた命令コードを実行
する。また、画像処理部64のCPU65は、ツー・ポ
ート・RAM61に書込まれた命令コードを実行する。
図13乃至図15は、上記命令コードのメモリ格納形式
の一例を示す図である。
The instruction code generated from the instruction relating to the assembling operation is written in the shared memory 60, and the instruction code generated from the instruction relating to the image processing is a two-port instruction code.
It is written into the RAM 61. : Robot operation control unit 62 or hand operation control unit 6
3 executes the instruction code written in the shared memory 60. The CPU 65 of the image processing unit 64 executes the instruction code written in the two-port RAM 61.
FIG. 13 to FIG. 15 are diagrams illustrating an example of a memory storage format of the instruction code.

【0053】命令コード 図13は命令コードの一般的な格納形式を示す図であ
る。図13の格納形式は、次の命令が格納されているメ
モリ番地を示す「次命令格納番地ポインタ」200と、
命令の種類を示す「Pコード」201と、命令を補足す
るためのパラメータの型(例えば、直接の数字である
か、変数であるか、実数であるか、整数であるかの区
別)を示すデータタイプ202Aと、そのパラメータの
データ部分203Aと、データの終りを示すデリミツタ
204Aと、命令コードの終りを示すと共に内容の誤り
を検出するためのチエツクサム205、という順で格納
されている。
Instruction Code FIG. 13 is a diagram showing a general storage format of instruction codes. The storage format in FIG. 13 includes a “next instruction storage address pointer” 200 indicating a memory address where the next instruction is stored;
A “P code” 201 indicating the type of instruction and a parameter type (for example, whether it is a direct number, a variable, a real number, or an integer) for supplementing the instruction are shown. A data type 202A, a data portion 203A of the parameter, a delimiter 204A indicating the end of the data, and a checksum 205 indicating the end of the instruction code and detecting an error in the contents are stored in this order.

【0054】命令には、命令コード中にパラメータを必
要としないものもある。かかる命令の命令コードは、図
14に示す様に、Pコード201の後に、命令の終りを
示すチエツクサム205が格納されている。
Some instructions do not require parameters in the instruction code. As shown in FIG. 14, the instruction code of such an instruction has a P-code 201 followed by a checksum 205 indicating the end of the instruction.

【0055】また、命令コード中にパラメータが複数組
必要である命令の場合には、図15に示す様に、Pコー
ド201の後に、データタイプ202,データ203,
デリミツト204からなる組が必要な組数だけ格納され
た後に、チエツクサム205が格納されている。
In the case of an instruction requiring a plurality of sets of parameters in the instruction code, as shown in FIG. 15, a data type 202, data 203,
The checksum 205 is stored after the required number of sets of the delimiter 204 are stored.

【0056】この様に、命令ステートメントを、命令の
種類(Pコード201)とパラメータとからなる命令コ
ード(中間コード)に構成し直し、メモリ中に格納する
事により、組付動作プログラム108とビジヨン動作プ
ログラム109を同一形式で格納する事が可能である。
また、組付動作プログラム108とビジヨン動作プログ
ラム109との命令のいずれも同一形式の命令コードに
変換されるということは、それらを格納するためのメモ
リを共通化することができることを意味する。即ち、具
体的には、画像処理部64のための命令コードの格納用
メモリであるツー・ポート・RAM61の代りに、画像
処理部のための命令コードを共有メモリ60に格納する
ことも可能であることを意味する。本実施例で、共有メ
モリ60の他にツー・ポート・RAM61を用いた理由
は、メモリを一本化したことによるそのメモリへのアク
セス競合を避けることと、ツー・ポート・RAM61が
異なる2方向から同時にアクセスされることによる高速
度処理が可能なこと、そして、組み付け動作と画像処理
とが容易に並列処理化できること、更に、画像処理部6
4のCPUに、命令解釈部87のCPUとは異なるアー
キテクチャのCPUを使うことができることである。
As described above, the instruction statement is restructured into an instruction code (intermediate code) including the instruction type (P code 201) and the parameters, and is stored in the memory, so that the assembly operation program 108 and the vision The operation program 109 can be stored in the same format.
In addition, the fact that both instructions of the assembling operation program 108 and the vision operation program 109 are converted into instruction codes of the same format means that a memory for storing them can be shared. That is, specifically, the instruction code for the image processing unit can be stored in the shared memory 60 instead of the two-port RAM 61 which is a memory for storing the instruction code for the image processing unit 64. It means there is. In this embodiment, the reason why the two-port RAM 61 is used in addition to the shared memory 60 is to avoid contention for access to the memory due to the unification of the memory, and to use two different directions in the two-port RAM 61. , High-speed processing is possible by simultaneous access from, and the assembling operation and image processing can be easily parallelized.
4 is that a CPU having an architecture different from that of the CPU of the instruction interpretation unit 87 can be used.

【0057】〈並列処理のための制御〉図16は、本シ
ステムにおける並列処理を制御するためのプログラム間
の構造を説明する図である。組付動作プログラム108
を解釈する一連の手続きを「ロボツトタスク」と呼び、
組付動作プログラム108の解釈を開始する事を「ロボ
ツトタスクを起動する」と呼ぶ。同様に、ビジヨン動作
プログラム109を解釈する一連の手続きを「ビジヨン
タスク」と呼び、ビジヨン動作プログラム109の解釈
を開始する事を「ビジョンタスクを起動する」と呼ぶ。
ビジョンタスクを起動することは、前述のSTART指
令で行なわれる。本組立システムでは、組立工程の最中
に補助的に画像処理を行なうという手順を踏んでいるた
めに、組立プログラム中にビジョンタスクを起動するS
TARTステートメントが記述されることとなる。これ
により、ロボットタスクとビジョンタスクの競合調停が
容易になる。そして、更に、ロボットタスクの起動は、
制御装置17のキーボード20からのスタートキーの入
力があった時点でなされる。
<Control for Parallel Processing> FIG. 16 is a diagram for explaining the structure between programs for controlling parallel processing in the present system. Assembly operation program 108
Is called a "robot task".
Starting interpretation of the assembly operation program 108 is referred to as "starting a robot task". Similarly, a series of procedures for interpreting the vision operation program 109 is called a “vision task”, and starting interpretation of the vision operation program 109 is called “starting a vision task”.
Activating the vision task is performed by the aforementioned START command. In the present assembling system, since the image processing is assisted during the assembling process, a vision task is started during the assembling program.
A TART statement will be described. This facilitates conflict arbitration between the robot task and the vision task. And, furthermore, the activation of the robot task
This is performed when a start key is input from the keyboard 20 of the control device 17.

【0058】ロボットタスクにおいて解釈されたロボッ
ト命令は命令コード(図13乃至図15)に変換され
て、前述したように、共有メモリ60に格納される。ま
た、ビジョンタスクにおいて解釈された画像処理命令は
同じように命令コードに変換されてツー・ポート・RA
M61に格納される。共有メモリ60の命令コードは、
ロボット動作制御部62,ハンド動作制御部63により
フエツチされて実行される。ロボット動作制御部62,
ハンド動作制御部63は、不図示ではあるが、夫々専用
のマイクロプロセサと、図18,図19に示したプログ
ラムを格納するメモリと、サーボ制御回路やサーボアン
プ等を有している。
The robot command interpreted by the robot task is converted into a command code (FIGS. 13 to 15) and stored in the shared memory 60 as described above. Similarly, the image processing instruction interpreted in the vision task is converted into an instruction code in the same manner, and a two-port RA
It is stored in M61. The instruction code of the shared memory 60 is
The robot operation control unit 62 and the hand operation control unit 63 perform the operation after being fetched. Robot operation control unit 62,
Although not shown, the hand operation control unit 63 includes a dedicated microprocessor, a memory for storing the programs shown in FIGS. 18 and 19, a servo control circuit, a servo amplifier, and the like.

【0059】図16に示されるように、命令解釈プログ
ラムには3つのフラグ(MWF,TWF,PWF)が用
意されている。即ち、「動作完了待フラグ」(MWF)
は、ロボットタスクの命令の中の、その命令の実行終了
を待つことが必要な命令が現在ロボットタスクで実行中
であることを示す。動作完了待フラグMWFは、例え
ば、 MOV P(4) 等の命令の実行によりセットされる。これらの命令は、
ロボットの実際の移動等の動作が必要な命令であり、次
の命令の実行には、その命令の終了を待つ必要があるか
らである。IF … THEN …等の制御命令につい
ては、ロボットの実際の移動が伴なわないので、動作完
了待フラグMWFはセットされない。
As shown in FIG. 16, three flags (MWF, TWF, PWF) are prepared in the instruction interpretation program. That is, the “operation completion waiting flag” (MWF)
Indicates that among the instructions of the robot task, an instruction that needs to wait for the execution end of the instruction is currently being executed by the robot task. The operation completion waiting flag MWF is set by executing an instruction such as, for example, MOVP (4). These instructions are
This is a command that requires an operation such as actual movement of the robot, and the execution of the next command requires waiting for the completion of the command. As for the control commands such as IF... THEN..., The operation completion wait flag MWF is not set because the actual movement of the robot is not accompanied.

【0060】また、「処理終了待フラグ」(PWF)
は、ビジョンタスクの命令の中の、その命令の実行終了
を待つことが必要な命令が現在ビジョンタスクで実行中
であることを示す。これらのMWF,PWFは、ロボッ
トタスク若しくはビジョンタスクにおいて、2つ以上の
命令がオーバラツプされて実行されることを防ぐために
ある。
"Process end wait flag" (PWF)
Indicates that among the instructions of the vision task, an instruction that needs to wait for the execution end of the instruction is currently being executed by the vision task. These MWFs and PWFs are provided to prevent two or more instructions from being executed in an overlapping manner in a robot task or a vision task.

【0061】「タイミング待フラグ」TWFは次の理由
により本システムに導入された。即ち、マルチタスク制
御の下では、ロボットタスク中の命令とビジョンタスク
中の命令とが並行して実行される。そして、ロボットタ
スクのある1つの命令を開始するためには、ビジョンタ
スクのある1つの命令の終了を確認する、即ち、2つの
タスク間の調停をとることが必要な場合がある。例え
ば、CCDカメラ2で対象物の像を撮像している時に、
ロボツト6のアームがカメラ2の視野に入つたり、シヤ
トル9が移動する事などにより、撮像不能になる事をさ
ける必要があるからである。上述のMWF,PWFは、
あくまでも、同じタスク間の命令実行の調停をとるもの
である。そこで、一方のタスクが他方のタスクを一時中
断させるためのフラグとして「タイミング待フラグ」T
WFがある。
The "timing wait flag" TWF was introduced into the present system for the following reasons. That is, under the multitask control, the instructions in the robot task and the instructions in the vision task are executed in parallel. In order to start one instruction of the robot task, it may be necessary to confirm the end of one instruction of the vision task, that is, to arbitrate between the two tasks. For example, when capturing an image of an object with the CCD camera 2,
This is because it is necessary to prevent a situation in which an image cannot be captured due to the arm of the robot 6 entering the field of view of the camera 2 or the movement of the shuttle 9. The above MWF and PWF are:
To the last, arbitration of instruction execution between the same tasks is performed. Therefore, a "timing wait flag" T is used as a flag for one task to temporarily suspend the other task.
There is WF.

【0062】一方のタスクが他方のタスクを一時中断さ
せる命令として、本実施例のシステムでは、WAIT命
令が用意されている。このWAIT命令は、主にビジョ
ンタスクで用いられ、それが実行されると停止フラグS
F(suspended flag)がセットされる。フラグSFはツー
・ポート・RAM61内に設けられこのWAIT命令
は、プログラム内に明示的にそれらの命令を記述しなく
とも、システム(図5のコンパイラ103)が自動的に
付加するようにしている。即ち、図11の例では、CC
Dカメラ2で撮像するための撮像命令(GET)の後
や、パターン認識命令(MATCH)の後に、コンパイ
ラ103がWAIT命令を自動的に付加する。換言すれ
ば、GET命令やMATCH命令が実行されると、自動
的にWAIT命令が実行されて、フラグSFがセットさ
れる。このフラグSFのリセットは、上記特殊命令(G
ET命令やMATCH命令)の終了でなされる。従っ
て、ロボットタスク側では、このフラグSFのセット状
態を検査する命令、即ちタイミング確認命令(例えば、
CHECKF命令)をロボットタスク中に挿入して、ロ
ボットタスクとビジョンタスクとの協調を取っている。
In the system of this embodiment, a WAIT instruction is prepared as an instruction for one task to temporarily suspend the other task. This WAIT instruction is mainly used in the vision task, and when it is executed, the stop flag S
F (suspended flag) is set. The flag SF is provided in the two-port RAM 61, and the WAIT instruction is automatically added by the system (the compiler 103 in FIG. 5) without explicitly describing those instructions in the program. . That is, in the example of FIG.
The compiler 103 automatically adds a WAIT instruction after an imaging instruction (GET) for imaging with the D camera 2 or after a pattern recognition instruction (MATCH). In other words, when the GET instruction or the MATCH instruction is executed, the WAIT instruction is automatically executed, and the flag SF is set. The reset of the flag SF is performed by the special instruction (G
ET command or MATCH command). Therefore, on the robot task side, a command for checking the set state of the flag SF, that is, a timing confirmation command (for example,
CHECKF instruction) is inserted into the robot task to coordinate the robot task with the vision task.

【0063】また、命令解釈プログラムには、図16に
示すように、2つのカウンタ(RPCとIPC)とが用
意されている。カウンタRPCはロボットタスクの組立
動作プログラム108中の次の実行命令の行番を格納し
ている。例えば、ロボットタスクが次に実行すべき命令
が行番300のSSHUTL(図9)ならばカウンタR
PCには300が格納されている。また、カウンタIP
Cはビジョンタスクのビジョン動作プログラム109中
の次の実行命令の行番を格納している。例えば、ビジョ
ンタスクが次に実行すべき命令が行番20のBIN(図
11)ならばカウンタRPCには20が格納されてい
る。
As shown in FIG. 16, the instruction interpretation program has two counters (RPC and IPC). The counter RPC stores the line number of the next execution instruction in the assembly operation program 108 of the robot task. For example, if the instruction to be executed next by the robot task is SSHUTL at line 300 (FIG. 9), the counter R
300 is stored in the PC. Also, the counter IP
C stores the line number of the next execution instruction in the vision operation program 109 of the vision task. For example, if the instruction to be executed next by the vision task is the BIN of line number 20 (FIG. 11), 20 is stored in the counter RPC.

【0064】図17,図18,図19に従って、ロボッ
トタスクとビジョンタスクの並列実行制御について説明
する。ロボットタスクの制御 ステツプS200で、キーボード20から組立動作の開
始が指示されると、命令解釈部87はステツプS201
でロボットタスクを起動することにより、RAM52内
の組付動作プログラム108の解釈を開始する(ステツ
プS201)。
The parallel execution control of the robot task and the vision task will be described with reference to FIGS. In the control step S200 of the robot task, when the start of the assembling operation is instructed from the keyboard 20, the command interpreting section 87 executes the step S201.
By starting the robot task, the interpretation of the assembling operation program 108 in the RAM 52 is started (step S201).

【0065】ステツプ202ではロボットタスクが起動
されているかを調べる。ステツプS202でロボットタ
スクが起動されているか否かを調べるのは、ロボットプ
ログラム自体の中で、またはビジョンタスクのプログラ
ム自体の中に、ロボットタスクの停止を行なうステート
メントを記述することができるからである。従って、ロ
ボットタスクが停止されている場合は、ビジョンタスク
だけが実行され、ロボットタスクをプログラム的に再起
動するには、ビジョンタスク内でロボットタスクを起動
する命令を実行することが必要である。図9乃至図11
の例のプログラムが実行されている場合は、ロボットタ
スクがプログラム的に停止されないから、ステツプS2
03に進み、ここで動作完了待ち状態の判定を動作完了
待フラグMWFに基づいて行なう。前述したように、M
WFは移動命令等に対してセットされるものであるか
ら、前のサイクルでそのような命令が実行されていなけ
れば、あるいは、MWFのセットの不要な命令が実行さ
れていた場合には、MWF=0であるので、ステツプS
204に進む。
In step 202, it is checked whether the robot task has been started. The reason for checking whether or not the robot task is activated in step S202 is that a statement for stopping the robot task can be described in the robot program itself or in the vision task program itself. . Therefore, when the robot task is stopped, only the vision task is executed, and in order to restart the robot task programmatically, it is necessary to execute an instruction to start the robot task in the vision task. 9 to 11
Since the robot task is not stopped programmatically when the program of the example of FIG.
The process proceeds to step S03, where the determination of the operation completion waiting state is performed based on the operation completion waiting flag MWF. As described above, M
Since the WF is set for a move instruction or the like, if such an instruction has not been executed in the previous cycle, or if an unnecessary instruction for setting the MWF has been executed, the MWF is set. = 0, so step S
Proceed to 204.

【0066】MWF=0のときは、ステツプS204に
進んで、組付動作プログラム108から1つの命令を読
み、その命令の解釈を行う。1つの命令解釈がなされる
と、カウンタRPCは次の行番を示すように変更され
る。
If MWF = 0, the flow advances to step S204 to read one instruction from the assembly operation program 108 and interpret the instruction. When one instruction is interpreted, the counter RPC is changed to indicate the next line number.

【0067】ステツプS205では、その解釈した命令
の内容がビジヨンタスク起動命令(“START
3”)であるか否かの判定を行う。ビジヨンタスクの起
動命令である場合は、ステツプS220でビジヨンタス
クの起動処理を行なってからステツプS221に進む。
ビジヨンタスク起動命令以外の場合は、ステツプS20
6に進み、タイミング確認命令(前述のCHECKF
等)であるか否かの判定を行なう。
In step S205, the content of the interpreted command is stored in the vision task start command ("START").
3 ") is determined. If the instruction is a vision task activation instruction, the vision task activation processing is performed in step S220, and then the process proceeds to step S221.
In the case other than the vision task start instruction, step S20
6 and the timing confirmation instruction (the above-described CHECKF
Etc.) is determined.

【0068】ステツプS206で命令内容がタイミング
確認命令でないと判定した場合は、ロボツト動作部6
2,ハンド動作部63,画像処理部64に命令コードを
発行する必要のある命令(例えば、シヤトル9の移動命
令やハンド7の動作命令)か、命令コードの発行が不要
の命令(例えば、IF…THEN…等の制御命令)かの
判定をステツプS207で行う。
If it is determined in step S206 that the content of the instruction is not a timing confirmation instruction, the robot operation unit 6
2. An instruction that needs to issue an instruction code to the hand operation unit 63 and the image processing unit 64 (for example, a command to move the shuttle 9 or an operation instruction to the hand 7) or an instruction that does not need to issue an instruction code (for example, IF .. (The control command such as THEN) is determined in step S207.

【0069】命令コードの発行が必要な命令である場合
には、ステツプS208で、その命令がロボット動作に
関連する命令であるかハンド動作に関連する命令である
かに応じて、その命令コードが、ロボット動作制御部若
しくはハンド動作制御部により区別されて実行可能なよ
うに、共有メモリ60に格納される。ロボット動作制御
部若しくはハンド動作制御部は、図18若しくは図19
の制御手順に従って、共有メモリ60から対応する命令
コードをフエツチして実行する。そして、ステツプS2
09では、動作完了待フラグMWFをセットする。そし
てステツプS221に進む。
If it is necessary to issue an instruction code, the instruction code is determined in step S208 according to whether the instruction is an instruction relating to a robot operation or an instruction relating to a hand operation. Are stored in the shared memory 60 so that they can be executed separately by the robot operation control unit or the hand operation control unit. The robot operation control unit or the hand operation control unit is configured as shown in FIG.
According to the control procedure, the corresponding instruction code is retrieved from the shared memory 60 and executed. Then, step S2
At 09, the operation completion wait flag MWF is set. Then, the process proceeds to step S221.

【0070】動作制御部62,63に命令コードを発行
する必要のある命令は、シヤトル9の移動(MOV)や
ロボツト6の移動の様に、命令に対応した動作が完了す
るまでに時間がかかるものである。フラグMWFは移動
命令等が連続して発行されることを防止する意味でステ
ツプS209でセットされる。しかし、命令コードの発
行の不要な命令(例えば、IF…THEN…等の制御命
令)は連続して実行されるべきである。このような発行
不要命令を実行するものとステツプS207で判断され
た場合には、ステツプS207→ステツプS208と進
んで、MWFのセットを行なわずに、直接その命令の実
行を行なう。そしてステツプS221に進む。
An instruction that needs to issue an instruction code to the operation control units 62 and 63 takes time until the operation corresponding to the instruction is completed, such as the movement of the shuttle 9 (MOV) or the movement of the robot 6. Things. The flag MWF is set in step S209 in order to prevent a movement command or the like from being issued continuously. However, instructions that do not need to issue an instruction code (for example, control instructions such as IF... THEN...) Should be executed continuously. If it is determined in step S207 that such an issuance unnecessary instruction is to be executed, the process proceeds from step S207 to step S208, and the instruction is directly executed without setting the MWF. Then, the process proceeds to step S221.

【0071】ステツプS206で、命令内容がタイミン
グ確認命令であると判定された場合は、ステツプS21
0に進んで、ツー・ポート・RAM61内のフラグSF
のセット状態を調べる。このフラグSFは、前述したよ
うに、他のタスク(本実施例では、ビジョンタスク)で
ある特殊な命令(GETやMATCH)を実行した場合
にそのタスクによりセットされ、その命令の終了をもっ
てそのタスクがリセットする。また、フラグSFは、ツ
ー・ポート・RAM61内に置かれているために、画像
処理部64は勿論、命令解釈部87もアクセスが可能で
ある。従って、このフラグSFがセツトされているとス
テツプS210で判定された場合は、ロボットタスクに
おける命令の解釈/実行を中断させなくてはならないの
で、その旨を記憶するために、フラグTWFをステツプ
S212でセツトする。そして、ステツプS209でフ
ラグMWFをセットする。即ち、フラグMWFは、命令
コードの発行が必要な命令を解釈部87が解釈した場合
と、タイミング確認命令を解釈してTWFがセットされ
た場合との両方おいて、セットされる。
If it is determined in step S206 that the content of the command is a timing confirmation command, step S21
0, the flag SF in the two-port RAM 61
Check the set status of. As described above, this flag SF is set by a special task (GET or MATCH) which is another task (a vision task in this embodiment), and is set by the end of the command. Resets. Further, since the flag SF is placed in the two-port RAM 61, not only the image processing unit 64 but also the command interpreting unit 87 can be accessed. Therefore, if it is determined in step S210 that the flag SF is set, the interpretation / execution of the command in the robot task must be interrupted, and the flag TWF is set in step S212 to store the fact. Set with Then, in step S209, the flag MWF is set. That is, the flag MWF is set both when the interpreting unit 87 interprets an instruction that needs to issue an instruction code and when the TWF is set by interpreting the timing confirmation instruction.

【0072】ステツプS221では、ビジョンタスクが
起動されているか否かを調べ、起動されていない場合に
はステツプS202に戻る。あるロボットプログラムを
実行している場合に、命令コードを発行する必要のない
命令を実行している限りは、フラグMWFはセットされ
ないので、ステツプS202→ステツプS203→ステ
ツプS204と進んで、次の命令を解釈実行する。即
ち、ロボットプログラムの命令の実行は待たされること
なく連続的に行われる。
In step S221, it is determined whether or not the vision task has been activated. If the vision task has not been activated, the process returns to step S202. When a certain robot program is being executed, the flag MWF is not set as long as an instruction that does not need to issue an instruction code is executed. Therefore, the process proceeds from step S202 to step S203 to step S204, and the next instruction is executed. Interpret and execute. That is, the execution of the instructions of the robot program is performed continuously without waiting.

【0073】一方、図9のプログラムの行番300乃至
行番350におけるロボット動作命令はフラグMWFを
セットする。かかる場合は、制御は、ステツプS202
→ステツプS203と進み、更に、フラグMWFは既に
セットされているので、ステツプS214に進む。ステ
ツプS214では、フラグMWFのセットが、命令コー
ド発行の必要な命令に実行によるものか、あるいはタイ
ミング確認命令の実行によるものかを調べるために、フ
ラグTWFのセット状態を調べる。
On the other hand, the robot operation command in the line numbers 300 to 350 of the program in FIG. 9 sets the flag MWF. In such a case, control is passed to step S202
→ The process proceeds to step S203, and since the flag MWF has already been set, the process proceeds to step S214. In step S214, the setting state of the flag TWF is checked in order to check whether the setting of the flag MWF is due to execution of an instruction requiring an instruction code or execution of a timing confirmation instruction.

【0074】ステツプS214でTWFフラグがリセッ
トしている場合には、フラグMWFのセットは命令コー
ド発行の必要な命令に実行によるものであったのだか
ら、ステツプS215に進んでロボット動作の完了を調
べる。この動作完了のチェックは共有RAM60に命令
コードが残っているか否かにより分る。共有メモリ60
中に命令コードの格納は、命令解釈プログラムがステツ
プS208で行なう。また、共有メモリ60中の命令コ
ードのクリアはロボット動作制御部62,ハンド動作制
御部63によりなされる。
If the TWF flag has been reset in step S214, the flag MWF was set by execution of an instruction that requires the issuance of an instruction code, and the flow advances to step S215 to check the completion of the robot operation. . This operation completion check is determined by whether or not the instruction code remains in the shared RAM 60. Shared memory 60
The instruction code is stored in the instruction interpretation program in step S208. The instruction code in the shared memory 60 is cleared by the robot operation control unit 62 and the hand operation control unit 63.

【0075】図18はロボット動作制御部62,ハンド
動作制御部63における制御手順を示すフローチヤート
である。ロボット動作制御部62,ハンド動作制御部6
3は、夫々、ステツプS300において、共有メモリ6
0内をスキャンしながら、自分向けの命令コードがメモ
リ60に格納されたかをチェックしている。自分向けの
命令コードであるか否かの判定は、Pコード(図13乃
至図15)が示す命令の型で判断される。自分向けの命
令コードが発見されたならば、その命令コードをステツ
プS301で実行し、ステツプS302で、その終了
(例えば、アームの上昇または下降動作の終了)を待
つ。動作が終了すれば、ステツプS303で、当該命令
コードをクリアする。
FIG. 18 is a flowchart showing a control procedure in the robot operation control unit 62 and the hand operation control unit 63. Robot operation control unit 62, hand operation control unit 6
3 is the shared memory 6 in step S300.
While scanning inside 0, it is checked whether the instruction code for itself has been stored in the memory 60. The determination as to whether or not the instruction code is directed to the user is made based on the instruction type indicated by the P code (FIGS. 13 to 15). If an instruction code for the user is found, the instruction code is executed in step S301, and in step S302, the end (for example, the end of the arm raising or lowering operation) is waited. When the operation is completed, the instruction code is cleared in step S303.

【0076】図19の画像処理部64における命令コー
ドの処理の制御手順においても、命令コードのスキャン
/実行/クリアは図18のそれと同じである。図17の
フローチヤートに戻って、ステツプS215で、共有R
AMに格納した命令コードがクリアされたことが確認さ
れたならば、ステツプS216に進んで、フラグMWF
をリセットする。そして、ステツプS221に進み、ビ
ジョンタスクが起動されていなければ、ステツプS22
1→ステツプS202→ステツプS203→ステツプS
204と進んで、ロボットプログラム中の次の命令を実
行する。
In the control procedure of the processing of the instruction code in the image processing section 64 in FIG. 19, the scan / execution / clear of the instruction code is the same as that in FIG. Returning to the flowchart of FIG. 17, in step S215, the shared R
If it is confirmed that the instruction code stored in the AM has been cleared, the process proceeds to step S216, where the flag MWF is set.
Reset. Then, the process proceeds to step S221. If the vision task has not been activated, the process proceeds to step S22.
1 → Step S202 → Step S203 → Step S
Proceeding to 204, the next command in the robot program is executed.

【0077】ステツプS214の待ち理由の判別処理に
おいて、TWF=1と判定された場合は、フラグSFが
ビジョンタスクによりリセットされるのを待つために、
ステツプS217でフラグSFを調べる。このフラグS
Fがセットされている(SF=1)ということは、まだ
待たなければならないことを意味するから、ステツプS
221を介してステツプS202に戻る。
If it is determined that TWF = 1 in the process of determining the reason for waiting in step S214, to wait for the flag SF to be reset by the vision task,
In step S217, the flag SF is checked. This flag S
The fact that F is set (SF = 1) means that the user still has to wait, so step S
The process returns to step S202 via 221.

【0078】ステツプS217で、フラグSFがリセッ
トされたことが確認された場合には、ステツプS218
でフラグTWFをリセットして、待状態が解除されたこ
とを示す。さらに、ステツプS212→ステツプS20
9の過程でセットされたフラグMWFをステツプS21
6でリセットする。
If it is confirmed in step S217 that the flag SF has been reset, the flow advances to step S218.
Resets the flag TWF to indicate that the waiting state has been released. Further, step S212 → step S20
The flag MWF set in the process of step 9 is set in step S21.
Reset with 6.

【0079】ロボットタスクとビジョンタスクの並列実
以上のようにして、命令コードの発行の必要な命令の実
行、不要な命令の実行、更にはタイミング確認命令の実
行がなされる。次にビジョンタスクが起動された場合に
ついて更に詳細に説明する。
Parallel execution of robot task and vision task
As described above, the execution of the instruction requiring the issuance of the instruction code, the execution of the unnecessary instruction, and the execution of the timing confirmation instruction are performed. Next, the case where the vision task is activated will be described in more detail.

【0080】ステツプS205で、行番360の START 3 命令が実行されると、ステツプS220でビジョンタス
クを起動した後に、ステツプS221に進む。ステツプ
S221で、現在が、以前に実行されていたビジョンタ
スクの何等かの命令の処理の終了を待っている待状態に
あるかをフラグPWFに基づいて判定する。このフラグ
PWFはロボットタスクにおけるフラグMWFと同じ機
能を有する。以前に画像処理の命令を何等発行していな
い場合には、PWF=0であるので、ステツプS223
に進んで、1つの画像処理命令をカウンタIPCに従っ
て解釈する。ステツプS223,ステツプS224は、
ステツプS223で解釈した命令の種類を判断する。即
ち、その命令がEND命令(図11の行番50のステー
トメント)である場合には、ステツプS225でビジョ
ンタスクを停止する。また、END命令でない場合に
は、ステツプS226で当該命令が命令コードの発行が
必要なものであるか否かを調べる。命令コードの発行が
必要なものとは、画像処理部64において何等かの処理
が必要な命令であり、例えば、撮像命令(GET)、二
値化命令(BIN)、マツチング命令(MATCH)等
である。また、IF…THEN…等の制御命令や、前述
のWAIT命令はツー・ポート・RAM61にアクセス
するだけで足り、画像処理部64による処理は不要なの
で、命令コードの発行は不要である。
When the START 3 instruction of the line number 360 is executed in step S205, the vision task is activated in step S220, and then the process proceeds to step S221. In step S221, it is determined based on the flag PWF whether the current state is a waiting state waiting for the end of the processing of any instruction of the previously executed vision task. This flag PWF has the same function as the flag MWF in the robot task. If no image processing command has been issued before, since PWF = 0, step S223 is executed.
And interprets one image processing command according to the counter IPC. Step S223, step S224,
The type of instruction interpreted in step S223 is determined. That is, if the instruction is an END instruction (the statement at line number 50 in FIG. 11), the vision task is stopped in step S225. If the instruction is not the END instruction, it is checked in step S226 whether the instruction needs to issue an instruction code. The instruction code needs to be issued is an instruction requiring some processing in the image processing unit 64, for example, an imaging instruction (GET), a binarization instruction (BIN), a matching instruction (MATCH), or the like. is there. Further, control instructions such as IF... THEN and the above-described WAIT instruction need only access the two-port RAM 61, and processing by the image processing unit 64 is unnecessary, so that instruction code issuance is unnecessary.

【0081】命令コードの発行が必要な命令を実行する
場合には、ステツプS227で、ツー・ポート・RAM
61に当該命令コードを書込む。そして、ステツプS2
28で処理完了待フラグPWFをセットして、ステツプ
S202に戻る。
When executing an instruction which requires the issuance of an instruction code, in step S227, the two-port RAM is executed.
The instruction code is written in 61. Then, step S2
At 28, the process completion waiting flag PWF is set, and the process returns to step S202.

【0082】ビジョンタスクの命令の解釈に先立って、
以前に実行した命令が未だ処理が終了していない場合に
は、ステツプS222からステツプS230に進む。ス
テツプS230では、ツー・ポート・RAM61中に以
前発行した命令コードが画像処理部64によりクリアさ
れているかを調べる。この命令コードのクリアは図19
の制御手順に従って画像処理部64が行なう。
Prior to interpreting the instructions of the vision task,
If the previously executed instruction has not been processed yet, the process proceeds from step S222 to step S230. In step S230, it is checked whether the previously issued instruction code in the two-port RAM 61 has been cleared by the image processing unit 64. This instruction code is cleared as shown in FIG.
Is performed by the image processing unit 64 in accordance with the control procedure of

【0083】命令コードのクリアが既にされていたとス
テツプS222で判定された場合にはステツプS231
でフラグPWFをリセットする。以上のようにして、ロ
ボットタスクとビジョンタスクとの並列処理がなされ
る。
If it is determined in step S222 that the instruction code has already been cleared, the flow proceeds to step S231.
Resets the flag PWF. As described above, the parallel processing of the robot task and the vision task is performed.

【0084】尚、前述したように、解釈部87がビジョ
ンタスクの特殊な命令(GET,WATCH)を解釈実
行して、その命令コードをRAM61に格納した場合に
は、図19のフローチヤートに従って、画像処理部64
がその命令コードをRAM61からフエツチし、ステツ
プS312において実行する。そして、ステツプS31
1において、RAM61内にフラグSFがセットされ
る。また、そのような特殊命令の実行が終了した場合
は、ステツプS313において、当該命令コードをクリ
アする動作とフラグSFをリセットする動作を合せて行
なう。
As described above, when the interpreting section 87 interprets and executes a special instruction (GET, WATCH) of the vision task and stores the instruction code in the RAM 61, the interpretation section 87 follows the flowchart of FIG. Image processing unit 64
Fetches the instruction code from the RAM 61 and executes it in step S312. Then, step S31
At 1, the flag SF is set in the RAM 61. When the execution of such a special instruction is completed, the operation of clearing the instruction code and the operation of resetting the flag SF are performed in step S313.

【0085】図20は、図9,図10に示した具体的な
組付けプログラム並びに図11に示したビジョン動作プ
ログラムを、図17の命令解釈プログラムが解釈し、そ
れが生成した命令コードを動作制御部62,63並びに
画像処理部64が図18,図19の制御手順に従って実
行した場合において、ロボット部及び画像処理部64が
どのように動作するかをタイミングチヤートとして表わ
したものである。即ち、図20は、部品Aの組立て動作
の一部と、部品Bの組立て動作と、そして部品Cの組立
て動作の一部のタイムチヤートを表わしている。また図
20においては、説明の便宜上、本タイムチヤートのス
タート時に、ロボツト6は部品供給部11のパレツト1
3aより、ハンド7で部品Aを把持し、ロボツト6はパ
レツト13aの上空に退避した状態となつているものと
する。
FIG. 20 shows the specific assembling program shown in FIGS. 9 and 10 and the vision operation program shown in FIG. 11 interpreted by the instruction interpreting program shown in FIG. The timing chart shows how the robot unit and the image processing unit 64 operate when the control units 62 and 63 and the image processing unit 64 execute according to the control procedures of FIGS. 18 and 19. That is, FIG. 20 shows a time chart of a part of the assembling operation of the part A, the assembling operation of the part B, and the part of the assembling operation of the part C. In FIG. 20, for the sake of convenience, at the start of this time chart, the robot 6 is connected to the pallet 1 of the component supply unit 11.
It is assumed that the part A is gripped by the hand 7 from 3a, and the robot 6 is retracted above the pallet 13a.

【0086】以下、図20に基づいて本実施例の組立動
作順を説明する。期間T1 ,T2 ,T5 ,T6 ではロボ
ツト動作の制御のみが行なわれる。即ち、T5 期間で、
シヤトル9は、部品Bを組立る位置へ移動開始(行番3
00のSSHUTL命令)し、期間T6 で、X−Yテー
ブル3は次に組立てる部品Bのパレツト13bの視覚対
象位置に移動開始(行番310のCSET命令)する。
次に、ロボツト6は、T1 期間で、部品Aをハンド7に
把持したまま、組付ステージ8の上空点に移動し、さら
に、組付ステージ8と垂直方向に下降停止する(行番3
20,330のMOV命令)。
The order of the assembling operation of this embodiment will be described below with reference to FIG. In the periods T 1 , T 2 , T 5 and T 6 , only the control of the robot operation is performed. That is, in T 5 period,
The shuttle 9 starts moving to the position for assembling the part B (line 3
00 SSHUTL instruction), and the period T 6, CSET command X-Y table 3 is then assembled movement start the visual object position of the pallet 13b of the part B (row number 310) to.
Then, the robot 6, T in one period, while holding the part A in the hand 7 moves in the sky point of the assembly stage 8, further descends stop the assembling stage 8 in the vertical direction (row number 3
20, 330 MOV instructions).

【0087】T3 ,T4 ,T7 ,T8 ,T910では、
ロボツト制御及び画像処理制御が並行して行なわれる。
前記シヤトル9の移動及びXYステージ3の移動が終了
した事を確認(340,350行番のSCHECK,C
CHECK命令)し、画像処理制御が開始される(36
0行番のSTART命令)する。これによりロボットタ
スクとビジョンタスクとが並列して実行される。
In T 3 , T 4 , T 7 , T 8 , T 9 T 10 ,
Robot control and image processing control are performed in parallel.
Confirm that the movement of shuttle 9 and the movement of XY stage 3 have been completed (SCHECK, C of line 340, 350)
CHECK command), and the image processing control is started (36).
(The 0th line number START instruction). Thus, the robot task and the vision task are executed in parallel.

【0088】並列処理におけるロボツトタスクにおける
制御では、T3 期間に、ハンド7を動かし、部品Aを離
す(行番370のOUT命令)。そして、T4 期間で、
ロボツト6がハンド7を上昇・停止(行番380のMO
V命令)して、部品Aの組立を終了する。
In the control of the robot task in the parallel processing, the hand 7 is moved and the part A is released during the period T 3 (OUT command at line number 370). Then, in the period T 4,
Robot 6 raises and stops hand 7 (MO at line 380)
V command), and the assembly of the part A is completed.

【0089】前記ロボットタスクにおける制御と併行し
て行なわれる画像処理側の制御では、T7 期間に、視覚
対象の部品BのCCDカメラ2の画像を画像処理部64
に取り込み(行番10のGET命令)、T8 期間に、そ
の画像を画像処理部64にて2値化処理(行番20の命
令BIN)し、さらに、T9 期間で前記2値化された画
像の特徴抽出処理(行番30の命令SOP)を行ない、
10期間で視覚対象部品Bの位置検出処理(行番40の
命令MATCH)を行なう。
[0089] The in parallel to the image processing side of the control performed with the control in the robot task, the T 7 period, image the image processing unit 64 of the CCD camera 2 of the visual target component B
Uptake (GET instruction on line No. 10), the T 8 period, the image by the image processing unit 64 the binarization processing (instruction BIN row No. 20), further being the binarized at T 9 period Image feature extraction processing (instruction SOP at line number 30),
In T 10 period is performed the position detection processing of the visual target component B (instruction MATCH line number 40).

【0090】T4 期間が満了し、さらにT10期間が満了
した時点では、ハンド7は組み付けステージ8の上空に
あって部品供給部にある部品Bを把持可能であり、ま
た、画像処理部64は部品Bのパレット13bにおける
位置を検出している。
When the period T 4 has expired and the period T 10 has expired, the hand 7 can hold the component B located above the assembly stage 8 in the component supply unit, and the image processing unit 64. Detects the position of the part B on the pallet 13b.

【0091】行番380のMOV命令でハンド7がステ
ージ8の上空に退避すると、行番390で、プログラム
2(図10)をコールする。このプログラム2は部品B
を供給部12から受けその組み付けを行なう手順を記述
する。
When the hand 7 retreats to the sky above the stage 8 by the MOV instruction at the line number 380, the program 2 (FIG. 10) is called at the line number 390. This program 2 is a part B
Is described from the supply unit 12 for assembling.

【0092】プログラム2の行番100では、命令 CHECKF 3,2 を実行する。この命令はタスク3(即ち、ビジョンタス
クのプログラム2、即ち、部品Bの画像処理)の終了を
確認する命令である。この命令で部品Bの位置検出処理
が終了した事が確認されると、行番110以降の処理が
行なわれる。
At the line number 100 of the program 2, the instruction CHECKF 3,2 is executed. This instruction is an instruction for confirming the end of task 3 (that is, program 2 of the vision task, that is, image processing of part B). When it is confirmed that the position detection processing of the component B has been completed by this instruction, the processing of the line number 110 and thereafter is performed.

【0093】図20のT11〜T16,T19,T20では、ロ
ボツト制御のみが行なわれる。ロボツト制御では、行番
110で、ロボツト6の移動目標位置として、位置検出
結果を読み込む。
[0093] In T 11 ~T 16, T 19, T 20 in FIG. 20, only the robot control. In the robot control, the position detection result is read as the movement target position of the robot 6 at line number 110.

【0094】P(20)=VREAD(2) そして、部品Bを把持する為に、T11で、ロボツト6は
ハンド7をパレツト13bの上空点に移動(行番12
0)し、T12で、下降・停止(行番130)する。次
に、T13でハンド7は対象部品Bを把持(行番140の
OUT命令)し、T14でロボツト6は部品Bを把持した
ハンド7をパレツト13bの上空点に移動停止する(行
番150)。
[0094] P (20) = VREAD (2 ) Then, in order to grip the component B, and T 11, robot 6 moves the hand 7 high over point of palette 13b (line No. 12
0), in T 12, descend and stop (line No. 130). Next, the hand 7 T 13 is (OUT instruction on line No. 140) grips the target component B and, at T 14 robot 6 moves stops the hand 7 grips the component B high over point of palette 13b (line number 150).

【0095】T15,T16,T19,T20の部品Bについて
のロボツト制御の動作は、前記部品AについてのT1
2 ,T5 ,T6 と同様である。また、T17,T18,T
21〜T24の部品Bについてのロボツト制御と部品Cにつ
いての画像処理制御とが並行して行なわれる動作に関し
ても、T3 ,T4 ,T7 〜T10の動作と同様である。
[0095] Operation of the robot control for component B of the T 15, T 16, T 19 , T 20 is, T 1 for the component A,
Same as T 2 , T 5 , T 6 . T 17 , T 18 , T
Also with respect to the operation of the image processing control for the robot control and the component C are performed in parallel for part B of 21 through T 24, it is similar to the operation of the T 3, T 4, T 7 ~T 10.

【0096】図21は、図9の行番330乃至390の
命令と、図10の行番100乃至120までの命令を順
に実行した過程での、命令解釈部87と、ロボツト動作
制御部62,ハンド動作制御部63,画像処理部64に
おける命令解釈実行の詳細タイムチヤートである。
FIG. 21 shows an instruction interpreting unit 87 and a robot operation control unit 62 in the process of sequentially executing the instructions of line numbers 330 to 390 in FIG. 9 and the instructions of line numbers 100 to 120 in FIG. 4 is a detailed time chart of instruction interpretation execution in the hand operation control unit 63 and the image processing unit 64.

【0097】まず、T100 で、図9の行番330のロボ
ツト動作命令を命令解釈部が解釈し、ロボツトの移動の
命令コードを発生して、ロボツト動作部62に命令コー
ドを受け渡す為の共有メモリ60に命令コードをセツト
する。
[0097] First, at T 100, interprets the instruction interpreting unit the robot operation instruction line number 330 in FIG. 9, to generate an instruction code of the movement of the robot, for transferring the instruction code to the robot operation unit 62 An instruction code is set in the shared memory 60.

【0098】T120 で、ロボツト動作制御部62は、共
有メモリ60を通して、受け取つた命令コードによりロ
ボツト6を駆動し、アームを指示された位置に停止させ
る。ロボツト動作制御部62は、その命令コードの実行
終了を、その命令コードのクリアにより、命令解釈部8
7に対して連絡する。T120 において、命令解釈部87
は、ロボツト動作制御部62からの命令コードの実行終
了を待ち状態となつている。
[0098] In T 120, robot operation control unit 62, through the shared memory 60, receive ivy by the instruction code to drive the robot 6 is stopped in the position indicated arm. The robot operation control unit 62 determines that the execution of the instruction code has been completed by clearing the instruction code.
Contact 7 At T120 , the instruction interpreting unit 87
Are in a waiting state until the execution of the instruction code from the robot operation control unit 62 is completed.

【0099】T101 で命令解釈部87は、図9の次の行
番340のロボツト動作命令を解釈し、シヤトル停止確
認(SCHECK)の命令コードを発生して、ロボツト
動作制御部62に、共有メモリを介して命令コードを送
る。ロボツト動作制御部62では、前記命令コードによ
りシヤトル停止状態を確認し、命令コード実行終了を命
令解釈部87に共有メモリ60を介して連絡する。続い
て、MWFのリセットの待ち状態となつていた命令解釈
部87は、次の動作命令の解釈を再開する。
[0099] command interpretation unit 87 in T 101 interprets the robot operation instruction at the line number 340 of FIG. 9, to generate an instruction code of the shuttle stop confirmation (Scheck), the robot operation control unit 62, the shared Send instruction code through memory. The robot operation control unit 62 confirms the shuttle stop state based on the instruction code, and notifies the instruction interpretation unit 87 of the end of execution of the instruction code via the shared memory 60. Subsequently, the instruction interpreting unit 87 that has been in the waiting state for resetting the MWF restarts interpretation of the next operation instruction.

【0100】T102 は命令解釈部87が行番350のロ
ボツト動作命令を解釈し、X−Yテーブル3の停止確認
の命令コードを発生し、ロボツト動作制御部62に対し
てT 101 と同様の手続きで命令コードの引渡し、命令コ
ード実行終了の引渡しを行なう。
T102 Indicates that the instruction interpreter 87
Interpret the bot operation command and confirm stop of XY table 3
And generates a command code of
T 101 Delivery of instruction code and instruction code
Delivery of the end of the code execution is performed.

【0101】T103 では、命令解釈部87が行番360
のロボツト動作命令(START)を解釈し、図11に
示した画像処理命令群(ビジョンタスク)の解釈実行を
開始する。T103 後は、ロボツト動作命令群と、画像処
理命令群を並列に解釈していく。
[0101] In the T 103, the instruction interpreting unit 87 is line number 360
The robot operation instruction (START) is interpreted, and the interpretation and execution of the image processing instruction group (vision task) shown in FIG. 11 is started. After T 103 includes a robot operation instructions, it will interpret the image processing instructions in parallel.

【0102】T110 では、命令解釈部87が図11の行
番10の画像処理命令を解釈し、CCDカメラの画像を
画像処理部に取り込む命令コードを発生し、画像処理部
64に対してツー・ポート・RAM61を介してその命
令コードを送る。
[0102] In T 110, command interpretation unit 87 interprets the image processing instruction line number 10 in FIG. 11, generates an instruction code for capturing an image of the CCD camera to an image processing unit, to-the image processing section 64 • Port • Send the instruction code via the RAM 61.

【0103】T130 では、前記画像取込命令コードをツ
ー・ポート・RAM61から受け取つた画像処理部64
が、CCDカメラ2の画像を画像処理部に取り込み、取
り込み完了後に、その命令コードの実行終了をツー・ポ
ート・RAM61を介して命令解釈部87に連絡する。
At T 130 , the image processing unit 64 receives the image capture instruction code from the two-port RAM 61.
Captures the image of the CCD camera 2 into the image processing unit, and after completion of the capture, notifies the instruction interpreting unit 87 of the end of the execution of the instruction code via the two-port RAM 61.

【0104】T104 では、命令解釈部87が、T110
画像処理命令の解釈及び命令コードのセツト終了後に、
図12の行番370のロボツト動作命令を解釈する。T
104では、ハンド7を動かす命令コードを発生し、共有
メモリ60に命令コードをセツトする。次の状態とし
て、命令解釈部87は、T110 で画像処理部に発行した
命令コードの実行終了を待っている状態で、かつロボツ
ト動作制御部62に発行した命令コードの実行終了の待
ち状態になつている。
[0104] In T 104, command interpretation unit 87, after the excisional completion of interpretation and instruction code of the image processing instruction T 110,
The robot operation command at line number 370 in FIG. 12 is interpreted. T
At 104 , an instruction code for moving the hand 7 is generated, and the instruction code is set in the shared memory 60. As the next state, the instruction interpreting unit 87, a state awaiting completion of execution of the instruction code issued to the image processing unit in T 110, and a wait state of completion of execution of the instruction code issued to the robot operation control unit 62 I'm sorry.

【0105】T111 では、画像処理部64からツー・ポ
ート・RAM61を介して命令コードの実行終了が連絡
される。さらにロボツト動作制御部62から実行終了が
連絡されていない状態では、命令解釈部87は図11の
行番20の画像処理命令を解釈し、前記取り込み画像の
2値化処理の命令コードを発生し、ツー・ポート・RA
M61上にセツトする。
At T 111 , the end of execution of the instruction code is notified from the image processing unit 64 via the two-port RAM 61. Further, in a state where the execution end is not notified from the robot operation control unit 62, the instruction interpreting unit 87 interprets the image processing instruction of the line number 20 in FIG. 11 and generates an instruction code of the binarization process of the captured image. , Two Port RA
Set on M61.

【0106】以下、同様にして、命令解釈部87は、ロ
ボツト動作命令及び画像処理命令を前記いずれかの命令
が実行終了した時点で、終了した命令群を解釈セツトす
る(T105 ,T112 ,T113 ,T106 )。
Similarly, the instruction interpreting section 87 interprets and sets the completed instruction group at the time when the robot operation instruction and the image processing instruction have been executed (T 105 , T 112 , T 112) . T113 , T106 ).

【0107】さらに、進んでT114 で命令解釈部87が
行番50の画像処理命令を解釈する。この行番50の命
令は解釈実行終了命令(END)であるので、命令解釈
部87はビジョンタスクを停止する。
Further, at T114 , the command interpreting section 87 interprets the image processing command of the line number 50. Since the instruction in line number 50 is the interpretation execution end instruction (END), the instruction interpretation unit 87 stops the vision task.

【0108】T107 以降は、解釈部87はロボツト動作
命令群のみ解釈命令セツトする。
[0108] T 107 and later, interpreting section 87 interprets the instruction excisional only robot operating instructions.

【0109】〈画像処理〉以下、画像処理部64で行な
われる画像処理について説明する。本システムにおける
画像処理の目的は、部品の認識と、更にパレット内にお
けるその部品の姿勢の検出及びその部品の重心座標の検
出である。
<Image Processing> The image processing performed by the image processing section 64 will be described below. The purpose of the image processing in the present system is to recognize a part, to detect the posture of the part in the pallet, and to detect the barycentric coordinates of the part.

【0110】特徴パラメータ 図22は本実施例に用いた一例としての部品Bの平面図
である。部品Bは平板で、3ケ所に大きさの異なる穴が
あいている。図23は部品Bの特徴パラメータの基準値
を表わしている。s1 は穴H1 の面積で、s2 は穴H2
の面積、s3 は穴H3 の面積である。
[0110] Features Parameters Figure 22 is a plan view of a component B which is an example used in this embodiment. Part B is a flat plate and has holes of different sizes at three locations. FIG. 23 shows the reference values of the characteristic parameters of the part B. s 1 is the area of the hole H 1 , s 2 is the area of the hole H 2
And s 3 is the area of the hole H 3 .

【0111】本実施例においては、穴H1 の中心の座標
(X1,Y1)を部品の原点とし、それを、ロボツト6が
部品の把持が可能となるように画像処理部64が部品位
置を算出するときの基準点とする。また、穴H2 の中心
(X2 ,Y2)と穴H1 の中心(X1 ,Y1)とを通り、穴
2 から穴H1 の方向へ向かうベクトルαを、部品Bの
傾きを表わすものと考える。この基準軸α(ベクトル
α)と、穴H1 の中心(X1 ,Y1)と穴H3 の中心(X
3 ,Y3)とを結ぶ線分のなす角度をβ3 とする。また、
穴H1 の中心(X1 ,Y1)と穴H2 の中心(X2 ,Y2)
との距離をl2 とし、 l2 ={(X1 −X2)2 +(Y1 −Y2)2}1/2 であらわす。また、穴H1 の中心(X1 ,Y1)と穴H3
の中心(X3 ,Y3)間の距離をl3 とし、 l3 ={(X2 −X3)2 +(Y2 −Y3)2}1/2 で表わす。図23に示されたs1 ,s2 ,s3 ,β3
2 ,l3 並びに、部品全体の面積Sを、部品Bの特徴
を表わす基準量とする。換言すれば、ある部品が目的の
部品Bであるか否かは、その部品の画像から、s1',s
2',s3',β3',l2',l3',S' を計算して、これら
を基準パラメータs1 ,s2 ,s3 ,β3,l2 ,l
3 ,Sと比較することにより判断する。これらの基準パ
ラメータは予め計算してRAM52内に記憶しておく。
基準パラメータが用いられるのは画像処理部64内であ
り、RAM52内の基準パラメータは制御装置17に電
源が投入された時点で画像処理部64のツー・ポート・
RAM61に転送される。
In this embodiment, the coordinates (X 1 , Y 1 ) of the center of the hole H 1 are set as the origin of the component, and the image processing unit 64 uses the coordinate so that the robot 6 can grip the component. It is used as a reference point when calculating the position. Also, as the center of the hole H 2 (X 2, Y 2 ) and the holes H 1 center (X 1, Y 1), the vector α directed from hole H 2 in the direction of the hole H 1, the inclination of the component B It is considered to represent This reference axis alpha (vector alpha), the center of the hole H 1 of the center (X 1, Y 1) and the hole H 3 (X
3 , Y 3 ) is defined as β 3 . Also,
The center of the hole H 1 (X 1, Y 1 ) and the center of the hole H 2 (X 2, Y 2 )
The distance between the l 2, represented by l 2 = {(X 1 -X 2) 2 + (Y 1 -Y 2) 2} 1/2. The center of the hole H 1 (X 1, Y 1 ) and the hole H 3
The distance between the centers (X 3 , Y 3 ) is represented by l 3, and represented by l 3 = {(X 2 −X 3 ) 2 + (Y 2 −Y 3 ) 2 } 1/2 . S 1 , s 2 , s 3 , β 3 ,
Let l 2 , l 3 and the area S of the entire part be reference amounts representing the features of the part B. In other words, whether or not a certain part is the target part B is determined from the image of the part by s 1 ′, s
2 ′, s 3 ′, β 3 ′, l 2 ′, l 3 ′, S ′ are calculated, and these are calculated as reference parameters s 1 , s 2 , s 3 , β 3 , l 2 , l
3. Judge by comparing with S. These reference parameters are calculated in advance and stored in the RAM 52.
The reference parameters are used in the image processing unit 64, and the reference parameters in the RAM 52 are stored in the two-port mode of the image processing unit 64 when the control device 17 is turned on.
The data is transferred to the RAM 61.

【0112】部品の認識 図24は、カメラ2により画像を取り込み、部品に形成
された穴の重心(中心)を計算する原理を説明する図で
ある。前述したように、部品はパレット内のセルに収納
されている。図3の領域設定部74は目的の部品が収納
されているパレットの1つのセル全体の画像を切り出す
機能を有する。
[0112] Recognition view 24 of the part takes an image by the camera 2 is a diagram for explaining the principle of calculating the centroid of the formed component hole (center). As described above, the parts are stored in cells in the pallet. The area setting unit 74 in FIG. 3 has a function of cutting out an image of an entire cell of a pallet in which a target component is stored.

【0113】図24の(a)は、カメラ2で部品の画像
を取り込み、その画像を明るさのレベルにより“1”と
“0”に2値化した結果がフレームメモリ75内に入っ
ていることを模式的に示した図である。(a)の各々の
セルはCCDの素子1ケ1ケに対応し、かつフレームメ
モリ75内のメモリの1ケ1ケに対応している。穴部分
が“1”と量子化されるか“0”と量子化されるかは微
妙であるが、本実施例では、最大輝度の50%以上のセ
ルは“0”と、50%未満のセルは“1”となつてい
る。
FIG. 24 (a) shows a result obtained by capturing an image of a part by the camera 2 and binarizing the image into "1" and "0" according to the brightness level in the frame memory 75. FIG. Each cell in (a) corresponds to one CCD element and one memory in the frame memory 75. Although it is delicate whether the hole portion is quantized to “1” or “0”, in the present embodiment, cells having 50% or more of the maximum luminance are set to “0” and less than 50%. The cell is "1".

【0114】次に、図22のH1,H2,H3が穴である
と判断するラベリング処理方式について説明する。セル
のはじから順に、セル毎に濃度の0/1を判断し、
“1”を見つけると、“1”を見つけたセルを中心にし
て3×3のセルからなるブロツク部分に既にラベルの付
けられているセルがあるかを判断する。見つけた“1”
のセルが、3×3のセルからなるブロック部分で始めて
の“1”であるセルの場合、その“1”のセルにまだ使
われていないラベルを付ける。又、既にラベルの付けら
れているセルがある場合には、そのセルと同じラベルを
付ける。同様の処理を、すべての処理すべきセルについ
て行なう。このようにすると、各々の閉領域に異なった
ラベルが付けられる。図22の部品Bを例にとつて述べ
ると、3つの穴にそれぞれ穴“H1 ”,穴“H2 ”,穴
“H3 ”としてラベルを付けることが可能となる。
Next, a description will be given of a labeling processing method for determining that H 1 , H 2 , and H 3 in FIG. 22 are holes. In order from the beginning of the cell, 0/1 of the density is determined for each cell,
When "1" is found, it is determined whether or not there is a cell already labeled in a block portion composed of 3 × 3 cells centering on the cell where "1" is found. "1" I found
Is a cell that is the first "1" in the block portion composed of 3 × 3 cells, a label that is not yet used is assigned to the cell of the “1”. If there is a cell already labeled, the same label as the cell is given. Similar processing is performed for all cells to be processed. In this way, each closed area is labeled differently. Taking the part B of FIG. 22 as an example, it is possible to label the three holes as “H 1 ”, “H 2 ”, and “H 3 ”, respectively.

【0115】次に、ラベル付けされた穴に関しての面積
1'〜s3'及び中心位置(重心位置)の求め方につい
て、図24にて説明する。まず、穴の面積はラベル付け
されたとじられた領域内の“1”のセルの個数をカウン
トし、その合計を面積とする。次に、穴の中心を求める
場合は、図24の(a)の画像のX,Yの各々の方向に
対して、“1”であるセルの個数のヒストグラムを作成
し、このヒストグラムの重心位置を、穴H1 の重心点
(X1',Y1')とする。
Next, a method of obtaining the areas s 1 ′ to s 3 ′ and the center position (centroid position) of the labeled holes will be described with reference to FIG. First, the area of the hole is counted by counting the number of "1" cells in the labeled and bound area, and the total is defined as the area. Next, when the center of the hole is obtained, a histogram of the number of cells “1” is created in each of the X and Y directions of the image of FIG. Is the center of gravity (X 1 ′, Y 1 ′) of the hole H 1 .

【0116】以上のような処理を、3つの穴の画像に対
して行なえば、把持しようとする部品の3つの穴の面積
1',s2',s3'及び3つの穴のCCD座標系における
中心の座標(X1',Y1'),(X2',Y2'),(X3',
3')を求めることができる。この求まつた値と,図2
3のようにあらかじめ記憶されていた特徴量の基準値と
を比較することにより、正しい部品であるかどうかが判
断が付く。
If the above processing is performed on the three hole images, the area s 1 ′, s 2 ′, s 3 ′ of the three holes of the part to be grasped and the CCD coordinates of the three holes Coordinates of the center in the system (X 1 ′, Y 1 ′), (X 2 ′, Y 2 ′), (X 3 ′,
Y 3 ′). Figure 2
By comparing with the reference value of the feature amount stored in advance as in 3, it can be determined whether or not the component is correct.

【0117】つまり特徴量の比較として、s1 ≒s1',
2 ≒s2',s3 ≒s3',l2≒l 2',l3 ≒l3',β3
=β3'を行なうことである。
That is, as a comparison of the feature values, s1 ≒ s1',
sTwo ≒ sTwo', SThree ≒ sThree', LTwo≒ l Two', LThree ≒ lThree', ΒThree
 = ΒThree'

【0118】座標変換 次に、画像処理の座標系とロボツトの座標の変換につい
て説明する。図25は、ロボツトの座標系のXRR
視覚の座標系XVV との関係を示す。ロボツトの座標
系での目標位置を、(PxR,PYR,1)とし、視覚の座
標系での目標位置を(PxV,PYV,1)とする。また、
ロボツトの座標系XRR の原点OR と、視覚の座標系
VVの原点OV のずれが(δx ,δY )であり、ロ
ボツト座標系XRr がθ度だけ回転しているとし、更
に、視覚系の分解能がkmm/画素とすると、
Coordinate Conversion Next, the conversion of the coordinate system of the image processing and the coordinates of the robot will be described. FIG. 25 shows the relationship between the robot coordinate system X R Y R and the visual coordinate system X V Y V. The target position in the robot coordinate system is (P xR , P YR , 1), and the target position in the visual coordinate system is (P xV , P YV , 1). Also,
And the origin O R of the coordinate system X R Y R of the robot, the deviation of the origin O V of the coordinate system X V Y V vision is the (δ x, δ Y), a robot coordinate system X R Y r is θ degrees by Assuming that the image is rotating and the resolution of the visual system is km / pixel,

【0119】[0119]

【数1】 の関係がある。(Equation 1) There is a relationship.

【0120】上記変換パラメータは図2のRAM52に
あらかじめ記憶されており、制御装置17の電源を入れ
ると、自動的にツー・ポート・RAM61にも書き込ま
れ、画像処理部64は座標変換する場合は、このパラメ
ータを用いて、部品の位置情報を、画像座標系よりロボ
ツト座標系へ、又はロボツト座標系より画像座標系へと
変換する。
The above-mentioned conversion parameters are stored in the RAM 52 in FIG. 2 in advance, and are automatically written into the two-port RAM 61 when the power of the control device 17 is turned on. Using this parameter, the position information of the part is converted from the image coordinate system to the robot coordinate system or from the robot coordinate system to the image coordinate system.

【0121】図26は、制御装置17に電源が入れら
れ、キーボード20により起動がかけられる状態になる
までの準備動作ルーチン(図5の起動プログラム10
0)のフローチヤート図である。
FIG. 26 shows a preparatory operation routine (the starting program 10 in FIG. 5) until the controller 17 is turned on and the keyboard 20 is activated.
It is a flow chart of 0).

【0122】まず、本制御装置17に電源がステツプS
400のステツプで入れられると、ステツプS401
で、特徴パラメータの基準値が部品毎に、命令解釈部8
7のRAM52の内部より、バス86,59を通して、
ツー・ポート・RAM61のあらかじめ指定された領域
に転送される。このとき、もちろんRAM52内のデー
タはそのまま残つているのは言うまでもない。
First, the power is supplied to the control device 17 in step S.
When inserted in step 400, step S401
The reference value of the characteristic parameter is set for each part by the instruction interpreting unit 8.
7 through the buses 86 and 59 from the inside of the RAM 52
The data is transferred to an area of the two-port RAM 61 designated in advance. At this time, needless to say, the data in the RAM 52 remains as it is.

【0123】次に、ステツプS402にて、座標変換の
演算に使われる上述の変換パラメータも、RAM52よ
りツー・ポート・RAM61へ転送する。次に、ステツ
プのステツプS403で、XYテーブル3の原点出しを
行なう。このテーブル3は視覚カメラ2とレンズ間を平
面的に移動させるためのものである。次にステツプS4
04とステツプS405で、ロボツト6とシヤトル9の
原点出しを行ない、ステツプS406で本装置が起動可
能な状態となる。
Next, in step S402, the above-mentioned conversion parameters used for the coordinate conversion calculation are also transferred from the RAM 52 to the two-port RAM 61. Next, in step S403, the origin of the XY table 3 is determined. The table 3 is for moving the visual camera 2 and the lens in a plane. Next, step S4
In step 04 and step S405, the origin of the robot 6 and shuttle 9 is determined, and in step S406, the apparatus is ready to start.

【0124】電源投入後、ステツプS406に行くまで
はキーボードの入力は受け付けない状態となることは言
うまでもない。
After the power is turned on, it goes without saying that keyboard input is not accepted until the process goes to step S406.

【0125】〈実施例の効果〉以上説明した実施例によ
れば、次のような効果が得られる。即ち、 :制御装置17では、1つの命令解釈部87が、組付
を行なうロボツト動作命令と画像処理を行なう画像処理
命令という2つの異なる系統の命令を解釈するようにし
ている。その一方で、ロボット動作の実際の実行を制御
するのは組み付け動作制御(即ち、ロボット動作制御部
62,ハンド動作制御部63)が行なうようにし、画像
処理は画像処理部64が実際に行なうようにしている。
即ち、ロボット動作と画像処理という2つの異質の処理
をモジュール化された2つのプログラムにより記述し、
それらのプログラムモジュールを1つの命令解釈部が行
ない、その一方で、ロボット動作の実行と画像処理の実
行は組み付け動作制御部(即ち、ロボット動作制御部6
2,ハンド動作制御部63)が行ない、画像処理は画像
処理部64が行なうという二本立てとなっている。
<Effects of Embodiment> According to the embodiment described above, the following effects can be obtained. That is, in the control device 17, one command interpreting unit 87 interprets two different types of commands, ie, a robot operation command for performing assembly and an image processing command for performing image processing. On the other hand, the actual execution of the robot operation is controlled by the assembly operation control (that is, the robot operation control unit 62 and the hand operation control unit 63), and the image processing is actually performed by the image processing unit 64. I have to.
That is, two different processes, robot operation and image processing, are described by two modularized programs,
One program interpreter executes these program modules, while execution of the robot operation and execution of the image processing are performed by the assembly operation controller (that is, the robot operation controller 6).
2, the hand operation control unit 63) performs image processing, and the image processing unit 64 performs image processing.

【0126】そのために、制御装置17の開発負荷を大
幅に削減できる効果がある。何故ならば、命令解釈を一
本化したことにより、並列動作を行なう2つのプログラ
ムモジュールの調停制御と同期化制御とを容易に行なう
ことができる。又、同一仕様の命令解釈部であることか
ら、工場導入後ユーザにとつても使いやすい装置にでき
る効果があるからである。さらに、命令解釈手段が同一
であることから、各々の装置間の通信用インターフエー
ス及び通信用プログラムも、各々の命令として簡素化さ
れ、装置も安価でユーザにとつてさらに使い安くできる
からである。また、ロボット動作の実行と画像処理の実
行とは二本立てで行なわれるために、組み付け動作制御
部における制御手順の開発は画像処理部64における制
御手順の開発と独立して行なうことができ効率的である
からである。
For this reason, there is an effect that the development load of the control device 17 can be greatly reduced. This is because arbitration control and synchronization control of two program modules that operate in parallel can be easily performed by unifying instruction interpretation. In addition, since the instruction interpreting units have the same specifications, there is an effect that the apparatus can be easily used by the user after the factory introduction. Further, since the command interpreting means is the same, the communication interface and the communication program between the respective devices are also simplified as the respective commands, and the devices are inexpensive and can be used more easily by the user. . In addition, since the execution of the robot operation and the execution of the image processing are performed in two steps, the development of the control procedure in the assembling operation control unit can be performed independently of the development of the control procedure in the image processing unit 64, which is efficient. Because there is.

【0127】具体的には、制御装置17では、1つの命
令解釈部87は、CPU50とメモリ(51,52)及
びキーボード20,CRT19からなる入出力手段から
なる。そして、それらは命令解釈部87内のみで通信可
能なローカルバス86で接続され、また、CPU50と
ロボツト動作制御部62とハンド動作制御部63と画像
処理部64とは前記ローカルバス86とは別個のコモン
バス59により接続されている。かつ、このコモンバス
59は一般的な規格でマルチバスとしてある。また、命
令解釈部87のメモリの1部であるROM51内に、命
令解釈プログラム及びこの命令解釈プログラムを適宜ロ
ボツトとハンドの動作命令と画像の処理命令とにより使
いわける、マルチタスクOSやプログラムの入出力をサ
ポートするプログラム等をあらかじめ記憶させてある。
そして、命令解釈部87のランダム・アクセス・メモリ
であるRAM52内に領域をあらかじめ区分してこれら
のプログラムを格納してある。更に、ロボツト及びハン
ドの動作命令と画像の処理命令は、別個にキーボード等
の入力手段で入力可能とされている。そして、本組立装
置がキーボード等の入力手段で起動させられると、本制
御装置は、まずロボツト及びハンドの動作命令を解釈
し、実行することから始め、ロボツトの動作命令中に画
像の処理を起動させる命令を見つけると、前記命令解釈
部のCPUが画像処理の命令をも順次解釈実行を開始
し、画像の処理命令内に処理を終了させる命令を見つけ
たことにより、前記CPUは画像の命令処理動作をや
め、ロボツトの命令解釈のみ行なう様にしたものであ
る。
More specifically, in the control device 17, one command interpreting section 87 comprises an input / output means comprising a CPU 50, memories (51, 52), a keyboard 20, and a CRT 19. These are connected by a local bus 86 that can communicate only within the command interpreter 87. The CPU 50, the robot operation controller 62, the hand operation controller 63, and the image processor 64 are separate from the local bus 86. Are connected by a common bus 59. The common bus 59 is a general standard and is a multi-bus. The ROM 51, which is a part of the memory of the instruction interpreting section 87, stores a command interpreting program and a multitasking OS or a program for appropriately using the command interpreting program by a robot, a hand operation instruction, and an image processing instruction. A program that supports output is stored in advance.
These programs are stored in the RAM 52, which is a random access memory of the instruction interpreting unit 87, by dividing the area in advance. Further, a robot and hand operation command and an image processing command can be separately input by input means such as a keyboard. Then, when the assembling apparatus is activated by input means such as a keyboard, the control apparatus first interprets and executes the robot and hand operation commands, and starts image processing during the robot operation commands. When the CPU of the command interpreting unit finds a command to perform the image processing command, the CPU of the command interpreting unit starts to sequentially interpret and execute the image processing command. The operation is stopped and only the robot command interpretation is performed.

【0128】そのために、例えば、ロボツトのアームが
カメラのエリアより逃げたタイミングで画像を取り込む
等の動作を容易に記述可能となつた。また、タイミング
を共有メモリ2−PORT−RAMを介して行なえるの
で、コンピユータのアクセス時間レベルの非常に高速で
調停を取ることが可能となつた。また、画像処理の不要
な場合は、命令解釈部のCPUはロボツトの動作の命令
解釈のみに専念でき、1つのCPUで複数の処理を行な
つているが、処理時間の遅れは問題にならなくなつた。
For this reason, for example, it is possible to easily describe an operation such as taking in an image at a timing when the robot arm escapes from the camera area. Further, since the timing can be controlled via the shared memory 2-PORT-RAM, arbitration can be performed at a very high access time level of the computer. When the image processing is unnecessary, the CPU of the instruction interpreting unit can concentrate on only the instruction interpretation of the operation of the robot, and one CPU performs a plurality of processes. Natsuta

【0129】又、同一仕様の命令解釈手段であることか
ら、工場導入後ユーザにとつても使いやすい装置にでき
る効果がある。さらに、命令解釈手段が同一であること
から、各々の装置間の通信用インターフエース及び通信
用プログラムも各々の命令として簡素化され、装置も安
価でユーザにとつてさらに使い安くできる効果がある。
Further, since the instruction interpreting means has the same specification, there is an effect that the apparatus can be easily used by the user after the factory introduction. Further, since the command interpreting means is the same, the communication interface and the communication program between the respective devices are simplified as the respective commands, and there is an effect that the devices can be inexpensive and the user can use the device more easily.

【0130】:動作制御部62,63用の命令や画像
処理部64の命令等は統一した形式の命令コード(図1
3〜図15)に変換され、メモリ60やRAM61に格
納される。即ち、上位の制御部(解釈部87)と下位の
制御部(動作制御部62,63)との間では、命令コー
ド及びメモリという媒体が存在し、上位の制御部(解釈
部87)におけるロボットタスクとビジョンタスクの命
令の相違を吸収している。
The instructions for the operation control units 62 and 63, the instructions for the image processing unit 64, and the like are composed of instruction codes in a unified format (FIG. 1).
3 to 15) and stored in the memory 60 or the RAM 61. That is, a medium called an instruction code and a memory exists between the upper control unit (interpretation unit 87) and the lower control unit (operation control units 62 and 63), and the robot in the upper control unit (interpretation unit 87). It absorbs the difference between instructions for tasks and vision tasks.

【0131】:主タスクであるロボットタスク内に、
子タスクであるビジョンタスクを起動する命令(STA
RT)を準備しているので、両タスク間の起動の調停が
容易となる。更に、タイミング確認指令等を用意してい
るので、タスク間の調歩が容易となる。
In the robot task which is the main task,
Instruction to start the vision task which is a child task (STA
RT), the arbitration of activation between the two tasks becomes easy. Further, since a timing confirmation command or the like is prepared, the start and stop between tasks becomes easy.

【0132】:座標変換パラメータや基準特徴パラメ
ータ等の種々のパラメータは、バッテリーバツクアツプ
されたRAMに記憶されており、電源投入時に、それら
のパラメータが必要とされるRAM61に転送されるよ
うになっているので、これらのパラメータの一元的な管
理が容易となる。具体的には: −1:キーボード,CRTフロツピーデイスクドライ
ブ等の入出力手段を1つだけ、かつロボツト等の動作命
令の入出力の必要な部分に設けることで、すべて行なえ
る。 −2:画像処理部のRAMをバツテリーバツクUPさ
せる必要がない。 −3:画像処理部を故障等で交換してもパラメータを
再度入力する必要がない。 −4:二重にパラメータを記憶しておく必要がないた
め、ずれ等による誤動作がない。
Various parameters such as coordinate conversion parameters and reference feature parameters are stored in a battery-backed RAM, and are transferred to the required RAM 61 when the power is turned on. As a result, centralized management of these parameters is facilitated. Specifically: -1: All operations can be performed by providing only one input / output means such as a keyboard, a CRT floppy disk drive, or the like, and a portion required for input / output of operation commands such as a robot. -2: There is no need to back up the RAM of the image processing unit. -3: There is no need to input parameters again even if the image processing unit is replaced due to a failure or the like. -4: There is no need to store parameters twice, so there is no malfunction due to deviation or the like.

【0133】〈変形例〉本発明はその主旨を逸脱しない
範囲で種々変形が可能である。 :例えば、上記実施例では、図4に示すように、マト
リツクス状にパレット内に配置されたワークについて説
明したが、パレット内のワークの配置は、これにかぎら
ず、たとえば、直線等の一列に並べても構わず、また、
パレット内にランダムに収納されていてもよい。要は、
パレット内におけるワークの位置が大体決まっていれば
よく、その各ワークの概略の位置をロボツトに教えこま
すことができることが重要である。
<Modifications> The present invention can be variously modified without departing from the gist thereof. For example, in the above embodiment, as shown in FIG. 4, the work arranged in a matrix in the pallet has been described. However, the arrangement of the work in the pallet is not limited to this. You can arrange them,
They may be randomly stored in a pallet. In short,
It is sufficient that the position of the work in the pallet is roughly determined, and it is important that the robot can be roughly informed of the position of each work.

【0134】:また、上記実施例では、セルの大きさ
は一定であり、ワークも1種類とした。本発明は、セル
の大きさが異なっていても、また、1つのパレット内で
異なるワークが存在する場合にも適用できる。この場合
は、セルの位置とそのセルの大きさとそのセル内のワー
クの種類との対応とを、制御装置17が画像処理部64
へ送ればよい。また、1つのセル内に複数のワークが存
在する場合にも本発明を適用できる。 :前記実施例では、座標変換は、視覚系で行なわれて
いたが、ロボツト制御装置側で行なってもよい。
In the above embodiment, the size of the cell is constant, and one type of work is used. The present invention can be applied to a case where different sizes of cells are different or different works exist in one pallet. In this case, the control device 17 determines the correspondence between the position of the cell, the size of the cell, and the type of work in the cell by the image processing unit 64.
Send it to Also, the present invention can be applied to a case where a plurality of works exist in one cell. In the above embodiment, the coordinate conversion is performed in the visual system, but may be performed in the robot controller.

【0135】:また、前記実施例では、穴A,Bの重
心位置は図24に説明したように、ヒストグラムの極大
値をとる位置を重心位置と定めたが、次のようにしても
よい。即ち、図24で、全ドットの数がn個の場合は、
頻度の累積がn/2 となる点を重心とする。この手法によ
れば、対象でない形状の穴等についても重心を演算でき
る。
In the above embodiment, the position of the center of gravity of the holes A and B is determined as the position of the maximum value of the histogram as the center of gravity, as described with reference to FIG. 24. That is, in FIG. 24, when the number of all dots is n,
The point at which the cumulative frequency is n / 2 is defined as the center of gravity. According to this method, the center of gravity can be calculated even for a hole having a shape that is not the target.

【0136】:前記実施例では、特徴パラメータと座
標変換パラメータを命令解釈部87のメモリ52に常時
格納しておき、電源打込後、画像処理部がアクセス可能
な2−PORT−RAM上に転送するようにしている。
本発明はこれに限定されず、例えば、画像が独自に用い
るパラメータ、たとえば画像取り込みの絶対的なスター
ト位置,カメラ2の入力のゲイン等を命令解釈部のメモ
リに格納しておき、前記と同様に転送してもよい。ま
た、ロボツト動作部,ハンド動作部に必要なパラメータ
も同等に命令解釈部のメモリより共有メモリに転送して
も良い。
In the above-described embodiment, the characteristic parameters and the coordinate conversion parameters are always stored in the memory 52 of the command interpreting section 87, and are transferred to a 2-PORT-RAM accessible by the image processing section after power-on. I am trying to do it.
The present invention is not limited to this. For example, parameters used independently by the image, for example, the absolute start position of image capture, the gain of the input of the camera 2 and the like are stored in the memory of the command interpretation unit, and May be forwarded to Also, parameters required for the robot operation unit and the hand operation unit may be transferred from the memory of the instruction interpretation unit to the shared memory.

【0137】:前記実施例は、まずロボツトの動作が
起動され、ロボツトの動作命令内に画像の処理を起動さ
せる様に説明してあるが、画像の処理の時間が長く、組
立装置を間欠的に動かす装置等に応用し場合、画像の処
理命令からロボツトの動作命令解釈を起動させ、かつロ
ボツトの動作命令中に停止する命令を入れ、CPUの処
理を行なわせない様に構成しても何ら問題はない。
In the above embodiment, the operation of the robot is started first, and the processing of the image is started within the operation command of the robot. However, the processing time of the image is long, and the assembling apparatus is intermittently operated. In the case of application to a device that moves the robot, the robot operation command interpretation is activated from the image processing command, and a stop command is inserted in the robot operation command, so that the CPU processing is not performed. No problem.

【0138】:前記実施例において、一連の動作及び
処理命令の中にロボツト動作部及び画像処理部への命令
コード以外のシーケンス制御命令(ジヤンプ命令,繰返
し命令,タイマー命令)が存在した場合には、命令解釈
手段で理解し、命令解釈部自体が実行することは、図9
の行番360のビジョンタスク開始命令の説明から容易
に考えられる。
In the above embodiment, if a sequence control command (jump command, repetition command, timer command) other than the command code to the robot operation unit and the image processing unit exists in the series of operation and processing commands, 9 that the instruction interpreting unit itself understands and executes by the instruction interpreting means.
Can be easily considered from the description of the vision task start instruction at line 360 in FIG.

【0139】:前記実施例において、画像処理部が命
令解釈部からの命令コードの授受を行なう手段を2PO
RT−RAM61としているが、前記実施例のロボツト
動作部と同じく共有メモリ60とする事も可能である。
In the above-described embodiment, the means for the image processing unit to transmit and receive the instruction code from the instruction interpreting unit is a 2PO
Although the RT-RAM 61 is used, the shared memory 60 may be used similarly to the robot operation unit of the above-described embodiment.

【0140】同様に、前記実施例において、ロボツト動
作部及びハンド動作部が命令解釈部からの命令コードの
授受を行なう手段を共有メモリ60としているが、前記
実施例の画像処理部と同じく2PORT−RAMとする
事も可能である。部に記憶され、必要に応じて、この記
憶部から、それが使われる把持部及び/又は画像処理部
に転送される。このために、パラメータを記憶するとこ
ろは1つで済み、従って、その管理も一元化できる。
Similarly, in the above-described embodiment, the means for the robot operation unit and the hand operation unit to transmit and receive the instruction code from the instruction interpretation unit is the shared memory 60. However, as in the image processing unit of the above-described embodiment, the shared memory 60 is used. It is also possible to use a RAM. It is stored in the storage unit and, if necessary, transferred from this storage unit to the gripping unit and / or the image processing unit where it is used. For this reason, only one parameter needs to be stored, and the management thereof can be unified.

【0141】[0141]

【発明の効果】以上説明したように、本発明によれば、
組付を行なう把持動作命令と画像動作処理命令と移動と
組立動作を記述する動作制御命令とを解釈する解釈手段
を1つとし、各々に対応した命令コードにより把持動作
部又は画像処理部または移動手段における動作又は処理
を行なうようにすることにより、制御装置の開発負荷を
大幅に削減できる効果がある。即ち、各命令は、一旦、
命令コードにブレークダウンされるので、この命令コー
ドを統一したフォーマツトにすることにより、画像処理
部及び把持部及び移動手段におけるプログラム開発が見
通しのよいものになる。
As described above, according to the present invention,
Grip operation command, image operation processing command, and movement
The control device includes a single interpreting means for interpreting an operation control command describing an assembling operation, and performs an operation or a process in the gripping operation unit, the image processing unit, or the moving unit according to the corresponding instruction code. This has the effect of significantly reducing the development load. That is, each instruction is
Since the instruction code is broken down, the development of the program in the image processing unit, the gripping unit, and the moving means can be easily performed by unifying the instruction code into a uniform format.

【0142】他の構成になる本発明の制御装置によれ
、この自動把持装置は、把持動作だけではなく、把持
部をワークの置かれた位置に移動させ、ワークを把持し
た把持部を組み付けステージに移動し、把持したワーク
を組体に組立てる機能を有するものであって、上記の制
御装置の開発負荷を大幅に削減できる効果を発揮する。
他の構成になる本発明の制御装置によれば、解釈部は、
1つの画像処理命令または把持動作命令を解釈して命令
コードに変換した後に、次の画像処理命令または把持動
作命令を解釈することにより、上記の制御装置の開発負
荷を大幅に削減できる効果を発揮する。本発明の好適な
1態様によれば、画像処理部及び把持部においては、夫
々、命令コードを解釈実行する実行手段を有する。
According to the control device of the present invention having another configuration,
For example , this automatic gripping device has a function of not only gripping operation but also moving a gripping part to a position where a work is placed, moving a gripping part gripping a work to an assembling stage, and assembling the gripped work into an assembly. The above-mentioned system
It has the effect of greatly reducing the development load of control equipment.
According to the control device of the present invention having another configuration , the interpretation unit includes:
After interpreting one image processing instruction or gripping operation instruction and converting it into an instruction code, the next image processing instruction or gripping operation instruction is interpreted to develop the control device.
It has the effect of greatly reducing the load . According to a preferred aspect of the present invention, each of the image processing unit and the holding unit includes an execution unit that interprets and executes the instruction code.

【0143】本発明の好適な1態様によれば、画像処理
命令から変換された前記命令コードが格納されるメモリ
はデユアル・ポートRAMであることを特徴とする。一
般に、画像処理には画像処理に適したマイクロコンピユ
ータが存在し、また、把持部には把持制御に適したマイ
クロコンピユータが存在する。デユアル・ポートRAM
は、これらの異なるバス・アーキテクチャをもつマイク
ロコンピユータの使用を可能にする。
According to a preferred aspect of the present invention, the memory storing the instruction code converted from the image processing instruction is a dual port RAM. Generally, a micro computer suitable for image processing exists in image processing, and a micro computer suitable for grip control exists in a gripping unit. Dual Port RAM
Enables the use of microcomputers with these different bus architectures.

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

【図1】本発明が適用された好適な実施例に係るロボッ
ト組立システムの斜視図。
FIG. 1 is a perspective view of a robot assembly system according to a preferred embodiment to which the present invention is applied.

【図2】第1図システムの制御装置17の構成を示すブ
ロツク図。
FIG. 2 is a block diagram showing a configuration of a control device 17 of the FIG. 1 system.

【図3】制御装置17の画像処理部64のブロツク図。FIG. 3 is a block diagram of an image processing unit 64 of the control device 17;

【図4】第1図システムに利用されるパレットの構造を
示す平面図。
FIG. 4 is a plan view showing the structure of a pallet used in the system shown in FIG. 1;

【図5】解釈部87のROM51のデータ構成を示す
図。
FIG. 5 is a diagram showing a data configuration of a ROM 51 of an interpretation unit 87.

【図6】解釈部87のROM52のデータ構成を示す
図。
FIG. 6 is a diagram showing a data configuration of a ROM 52 of an interpretation unit 87.

【図7】,FIG.

【図8】第1図システムのシャトル及びロボットの動作
を具体的に示す図。
FIG. 8 is a diagram specifically showing the operation of the shuttle and the robot of the system shown in FIG. 1;

【図9】,FIG.

【図10】一例としての、ロボットタスクを記述するプ
ログラムのフローチヤート。
FIG. 10 is a flow chart of a program for describing a robot task as an example.

【図11】一例としての、ビジョンタスクを記述するプ
ログラムのフローチヤート。
FIG. 11 is a flowchart of a program for describing a vision task as an example.

【図12】ロボットプログラムが解釈部87により命令
コードに変換され、その命令コードが実行される様子を
模式的に示した図。
FIG. 12 is a diagram schematically showing a state where a robot program is converted into an instruction code by an interpretation unit 87 and the instruction code is executed.

【図13】,FIG.

【図14】,FIG.

【図15】命令コードのフォーマツトを示す図。FIG. 15 is a diagram showing a format of an instruction code.

【図16】解釈プログラムと各タスク間の関係を示すと
共に、そこにおける解釈の制御に必要なフラグを示す
図。
FIG. 16 is a view showing a relationship between an interpretation program and each task, and showing flags necessary for controlling interpretation in the task.

【図17A】、FIG. 17A,

【図17B】解釈部87の解釈手順を示すフローチヤー
ト。
17B is a flowchart showing the interpretation procedure of the interpretation unit 87. FIG.

【図18】ロボット/ハンド動作制御部における制御手
順を示すフローチヤート。
FIG. 18 is a flowchart showing a control procedure in a robot / hand operation control unit.

【図19】画像処理部64の制御手順を示すフローチヤ
ート。
FIG. 19 is a flowchart showing a control procedure of the image processing unit 64.

【図20】,FIG.

【図21】第9図乃至第11図のプログラムを実行した
ときの各部の動きを示すタイミングチヤート。
FIG. 21 is a timing chart showing the operation of each unit when the program shown in FIGS. 9 to 11 is executed.

【図22】,FIG.

【図23】部品認識における特徴パラメータの定義を説
明する図。
FIG. 23 is a view for explaining the definition of characteristic parameters in component recognition.

【図24】部品認識に必要な重心位置の検出の原理を説
明する図。
FIG. 24 is a view for explaining the principle of detecting the position of the center of gravity necessary for component recognition.

【図25】視覚座標系とロボット座標系との関係を示す
図。
FIG. 25 is a diagram showing a relationship between a visual coordinate system and a robot coordinate system.

【図26】起動プログラム100の制御手順を示すフロ
ーチヤート。
FIG. 26 is a flowchart showing a control procedure of the activation program 100.

【符号の説明】[Explanation of symbols]

2 CCDカメラ 3 XYテーブル 6 ロボット 7 ハンド 8 組み付けステージ 9 シャトル 11,12 部品供給部 13a,13bパレット 17 制御部 18 ケーブル 19 CRT 50 CPU 51 ROM 52 RAM 60 共有メモリ 61 ツー・ポート・RAM 62 ロボット動作制御部 63 ハンド動作制御部 64 画像処理部 87 命令解釈部 2 CCD camera 3 XY table 6 Robot 7 Hand 8 Assembly stage 9 Shuttle 11, 12 Parts supply unit 13a, 13b Pallet 17 Control unit 18 Cable 19 CRT 50 CPU 51 ROM 52 RAM 60 Shared memory 61 Two-port RAM 62 Robot operation Control unit 63 Hand operation control unit 64 Image processing unit 87 Command interpretation unit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 FI G05B 19/414 G05D 3/12 K G05D 3/12 G05B 19/18 N (72)発明者 柴田 優 東京都大田区下丸子3丁目30番2号 キ ヤノン株式会社内 (56)参考文献 特開 平2−56004(JP,A) (58)調査した分野(Int.Cl.6,DB名) G05B 19/4155 B25J 9/10 B25J 9/16 B25J 13/08 G05B 19/19 G05B 19/414 G05D 3/12──────────────────────────────────────────────────の Continued on the front page (51) Int.Cl. 6 Identification symbol FI G05B 19/414 G05D 3/12 K G05D 3/12 G05B 19/18 N (72) Inventor Yu Shibata 3-chome Shimomaruko, Ota-ku, Tokyo No. 30-2 Canon Inc. (56) References JP-A-2-56004 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G05B 19/4155 B25J 9/10 B25J 9/16 B25J 13/08 G05B 19/19 G05B 19/414 G05D 3/12

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ワークの画像を撮像し、この画像から前
記ワークの位置情報を算出する画像処理部と、前記ワー
クを前記位置情報に基づいて把持する把持部と、前記ワ
ークの位置情報に応じて、この把持部をワークの置かれ
た位置に移動させ、ワークを把持した把持部を組み付け
ステージに移動する移動手段と、この把持したワークを
組体に組立てる組立手段とを有する自動把持装置を制御
する制御装置であって、 前記ワークを撮像しそのワークの画像から位置情報を算
出する一連の画像処理命令とこのワークを前記位置情報
に基づいて把持する一連の把持動作命令と、前記移動手
段と組立手段の動作を記述する動作制御命令とを含むプ
ログラムを記憶する記憶部と、 このプログラム中の前記画像処理命令と把持動作命令
動作制御命令とを識別して解釈すると共に、前記画像処
理命令と把持動作命令と動作制御命令とを夫々対応する
中間命令コードに変換し、変換された命令コードを夫々
前記画像処理部及び把持部に渡すための1つの解釈部と
を具備したことを特徴とする視覚を用いた自動把持装置
の制御装置。
1. A captures an image of the workpiece, an image processing unit for calculating the position information of the workpiece from the image, and a grip portion for gripping the basis of the work on the position information, the word
This gripper can be placed on the workpiece according to the workpiece position information.
To the right position and assemble the gripper holding the work
The moving means to move to the stage, and this gripped work
A control device for controlling an automatic gripping device having assembling means for assembling into an assembly , comprising: a series of image processing instructions for imaging the work and calculating position information from an image of the work; a series of gripping operation instruction for gripping Te, the mobile hands
A storage unit for storing a program including an operation control instructions describing the operation of the stage and the assembly means, and gripping operation instruction and the image processing instruction in the program
In addition to identifying and interpreting the operation control instruction , the image processing instruction, the gripping operation instruction, and the operation control instruction are converted into corresponding intermediate instruction codes, and the converted instruction codes are respectively converted into the image processing unit and the gripping unit. A control device for an automatic grasping device using a sight, comprising: one interpreting unit for passing the information to the automatic grasping device.
【請求項2】 ワークの画像を撮像し、この画像から前
記ワークの位置情報を算出する画像処理部と、前記ワー
クを前記位置情報に基づいて把持する把持部とからなる
自動把持装置を制御する制御装置であって、 前記ワークを撮像しそのワークの画像から位置情報を算
出する一連の画像処理命令とこのワークを前記位置情報
に基づいて把持する一連の把持動作命令とを含むプログ
ラムを記憶する記憶部と、 このプログラム中の前記画像処理命令と把持動作命令と
を識別して解釈すると共に、前記画像処理命令と把持動
作命令とを夫々対応する中間命令コードに変換し、変換
された命令コードを夫々前記画像処理部及び把持部に渡
すための1つの解釈部とを具備し、 前記解釈部は、1つの前記画像処理命令または把持動作
命令を解釈して命令コードに変換した後に、次の前記画
像処理命令または把持動作命令を解釈することを特徴と
する視覚を用いた自動把持装置の制御装置。
2. An image of a work is taken, and a preceding image is taken from this image.
An image processing unit for calculating position information of the workpiece;
And a gripper for gripping the hook based on the position information.
A control device for controlling an automatic gripping device, which images the work and calculates position information from an image of the work.
A series of image processing commands to be issued and the work
And a series of gripping operation commands for gripping based on the
A storage unit for storing a ram, the image processing instruction and the gripping operation instruction in the program,
And interprets the image processing instruction and the gripping motion.
Operation instructions are converted to the corresponding intermediate instruction codes and converted.
The obtained instruction code is passed to the image processing unit and the gripping unit, respectively.
For interpreting the one image processing instruction or gripping operation instruction and converting it into a command code, and then interpreting the next image processing instruction or gripping operation instruction. A control device for an automatic gripping device using vision.
【請求項3】 ワークの画像を撮像し、この画像から前
記ワークの位置情報を算出する画像処理部と、前記ワー
クを前記位置情報に基づいて把持する把持部とからなる
自動把持装置を制御する制御装置であって、 前記ワークを撮像しそのワークの画像から位置情報を算
出する一連の画像処理命令とこのワークを前記位置情報
に基づいて把持する一連の把持動作命令とを含むプログ
ラムを記憶する記憶部と、 このプログラム中の前記画像処理命令と把持動作命令と
を識別して解釈すると共に、前記画像処理命令と把持動
作命令とを夫々対応する中間命令コードに変換し、変換
された命令コードを夫々前記画像処理部及び把持部に渡
すための1つの解釈部とを具備し、 前記画像処理部は前記画像処理命令から変換された命令
コードを解釈実行する第1の実行手段を有し、 前記把持部は前記把持動作命令から変換された命令コー
ドを解釈実行する第2の実行手段を有したことを特徴と
する視覚を用いた自動把持装置の制御装置。
3. An image of a workpiece is taken, and a preceding image is taken from this image.
An image processing unit for calculating position information of the workpiece;
And a gripper for gripping the hook based on the position information.
A control device for controlling an automatic gripping device, which images the work and calculates position information from an image of the work.
A series of image processing commands to be issued and the work
And a series of gripping operation commands for gripping based on the
A storage unit for storing a ram, the image processing instruction and the gripping operation instruction in the program,
And interprets the image processing instruction and the gripping motion.
Operation instructions are converted to the corresponding intermediate instruction codes and converted.
The obtained instruction code is passed to the image processing unit and the gripping unit, respectively.
The image processing unit has first execution means for interpreting and executing an instruction code converted from the image processing instruction, and the gripping unit converts the instruction code from the gripping operation instruction. A control device for an automatic grasping device using a visual sense, comprising a second execution means for interpreting and executing the instruction code.
【請求項4】 前記解釈部は1つのCPUを有し、 前記画像処理命令から変換された命令コードと前記把持
動作命令から変換された命令コードとは、前記CPUが
アクセス可能な異なる2つの第1と第2のメモリ回路に
夫々格納されることを特徴とする請求項1乃至3のいず
れかに記載の視覚を用いた自動把持装置の制御装置。
4. The interpreting unit has one CPU, and an instruction code converted from the image processing instruction and an instruction code converted from the gripping operation instruction are two different first codes accessible by the CPU. 4. The method according to claim 1, wherein the data is stored in each of the first and second memory circuits.
A control device for an automatic gripping device using a visual sense according to any one of the claims.
【請求項5】 前記画像処理命令から変換された前記命
令コードが格納される第2のメモリはデユアル・ポート
RAMであることを特徴とする請求項に記載の視覚を
用いた自動把持装置の制御装置。
5. The automatic visual gripping device according to claim 4 , wherein the second memory storing the instruction code converted from the image processing instruction is a dual port RAM. Control device.
【請求項6】 この自動把持装置は、 前記ワークの位置情報に応じて、この把持部をワークの
置かれた位置に移動させ、ワークを把持した把持部を組
み付けステージに移動する移動手段と、 把持したワークを組体に組立てる組立手段とを更に具備
し、 前記プログラムは、前記移動手段と組立手段の動作を記
述する命令を含み、この命令も前記解釈部に解釈され、 前記移動手段による前記把持部の移動動作を記述する命
令に対応する命令コードと前記把持動作命令に対応する
命令コードとは共に、前記第2のメモリ回路に記憶され
ることを特徴とする請求項4に記載の視覚を用いた自動
把持装置の制御装置。
6. An automatic gripping device, comprising: moving means for moving the gripping portion to a position where a workpiece is placed according to the position information of the workpiece, and moving the gripping portion gripping the workpiece to an assembling stage; Further comprising assembling means for assembling the gripped work into an assembly, wherein the program includes an instruction for describing an operation of the moving means and the assembling means, and the instruction is also interpreted by the interpreting unit; The visual code according to claim 4, wherein both an instruction code corresponding to an instruction describing a movement operation of the gripper and an instruction code corresponding to the gripping operation instruction are stored in the second memory circuit. Control device of automatic gripping device using
【請求項7】 ワークの画像を撮像し、この画像から前
記ワークの位置情報を算出する画像処理部と、前記ワー
クを前記位置情報に基づいて把持する把持部とからなる
自動把持装置を制御する制御方法であって、 前記ワークを撮像しそのワークの画像から位置情報を算
出する一連の画像処理命令とこのワークを前記位置情報
に基づいて把持する一連の把持動作命令とを含むプログ
ラムを、前記画像処理命令と把持動作命令とを識別して
解釈する解釈工程と、 前記画像処理命令と把持動作命令とを、夫々対応する中
間命令コードに変換する変換工程と、 変換された命令コードを夫々前記画像処理部及び把持部
に渡す工程とを具備し、 1つの画像処理命令または把持動作命令が解釈されて命
令コードに変換されたた後に、前記解釈工程で、次の画
像処理命令または把持動作命令が解釈される ことを特徴
とする視覚を用いた自動把持装置の制御方法。
7. An automatic gripping device, comprising: an image processing unit that captures an image of a work and calculates position information of the work from the image; and a gripping unit that grips the work based on the position information. A control method, comprising: a program including a series of image processing instructions for imaging the work and calculating position information from an image of the work, and a series of gripping operation instructions for gripping the work based on the position information. An interpretation step of identifying and interpreting the image processing instruction and the gripping operation instruction; a conversion step of converting the image processing instruction and the gripping operation instruction into corresponding intermediate instruction codes, respectively; comprising the step of passing the image processing unit and the holding unit, one image processing instructions or grasping operation instruction is interpreted life
After being converted to the instruction code,
A method for controlling an automatic gripping device using vision, wherein an image processing instruction or a gripping operation instruction is interpreted .
【請求項8】 ワークの画像を撮像し、この画像から前
記ワークの位置情報を算出する画像処理部と、前記ワー
クを前記位置情報に基づいて把持する把持部とからなる
自動把持装置を制御する制御方法であって、 前記ワークを撮像しそのワークの画像から位置情報を算
出する一連の画像処理命令とこのワークを前記位置情報
に基づいて把持する一連の把持動作命令とを含むプログ
ラムを、前記画像処理命令と把持動作命令とを識別して
解釈する解釈工程と、 前記画像処理命令と把持動作命令とを、夫々対応する中
間命令コードに変換する変換工程と、 変換された命令コードを夫々前記画像処理部及び把持部
に渡す工程とを具備し、 前記画像処理部においては、前記画像処理命令から変換
された命令コードを解釈実行し、 前記把持部においては、前記把持動作命令から変換され
た命令コードを解釈実行することを特徴とする視覚を用
いた自動把持装置の制御方法。
8. An image of a workpiece is taken, and a preceding image is taken from this image.
An image processing unit for calculating position information of the workpiece;
And a gripper for gripping the hook based on the position information.
A control method for controlling an automatic gripping device, wherein an image of the work is taken and position information is calculated from an image of the work.
A series of image processing commands to be issued and the work
And a series of gripping operation commands for gripping based on the
Ram, by identifying the image processing command and the gripping operation command
The interpreting step and the image processing instruction and the gripping operation instruction
A conversion step of converting the converted instruction code into the image processing unit and the gripping unit, respectively.
The image processing unit interprets and executes the instruction code converted from the image processing instruction, and the gripping unit interprets and executes the instruction code converted from the gripping operation instruction. A method for controlling an automatic gripping device using vision.
JP3127173A 1991-05-30 1991-05-30 Control method and control device for automatic gripping device using visual sense Expired - Fee Related JP2834597B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3127173A JP2834597B2 (en) 1991-05-30 1991-05-30 Control method and control device for automatic gripping device using visual sense

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3127173A JP2834597B2 (en) 1991-05-30 1991-05-30 Control method and control device for automatic gripping device using visual sense

Publications (2)

Publication Number Publication Date
JPH04352203A JPH04352203A (en) 1992-12-07
JP2834597B2 true JP2834597B2 (en) 1998-12-09

Family

ID=14953476

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3127173A Expired - Fee Related JP2834597B2 (en) 1991-05-30 1991-05-30 Control method and control device for automatic gripping device using visual sense

Country Status (1)

Country Link
JP (1) JP2834597B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4878460B2 (en) * 2005-09-01 2012-02-15 株式会社安川電機 Work machine control device and work machine control system
JP4981472B2 (en) 2007-02-14 2012-07-18 キヤノン株式会社 Optical fringe generating member control apparatus and method
JP2010094787A (en) * 2008-10-17 2010-04-30 Yamaha Motor Co Ltd Robot with electric gripper and electric gripper control method

Also Published As

Publication number Publication date
JPH04352203A (en) 1992-12-07

Similar Documents

Publication Publication Date Title
CN110958425B (en) Information processing apparatus, information processing method, and system
JP6880982B2 (en) Control device and robot system
US20070093940A1 (en) Extensible task engine framework for humanoid robots
US20220024037A1 (en) Robot control apparatus and method for learning task skill of the robot
CN108214486A (en) control device, robot and robot system
CN108214488A (en) control device, robot and robot system
CN111993423A (en) A modular intelligent assembly system
CN112621765B (en) Automatic equipment assembly control method and device based on manipulator
JP2834597B2 (en) Control method and control device for automatic gripping device using visual sense
JP2834598B2 (en) Control device for automatic gripping device using vision
JPH05228866A (en) Controller of automatic holding device in use of visual sense
JP6660962B2 (en) Teaching device and control information generation method
CN113021336A (en) File taking and placing system and method based on master-slave mobile operation robot
JPH012882A (en) Robot control method
CN112578152A (en) Method, system and assembly for improving wire plugging and unplugging efficiency of signal wire
JPH04352204A (en) Method for controlling automatic gripping device using visual sensations
CN113119103B (en) Method and computer device for determining depth standard value of marker
US20230158667A1 (en) Machine learning method and robot system
CN112276508A (en) Memory card assembling equipment and assembling method
US20070260339A1 (en) Automated programming system employing non-text user interface
CN114140523A (en) Swab placing method and device, electronic equipment and storage medium
CN112775955A (en) Mechanical arm coordinate determination method and computer device
Erkkilä iCIM–Integration of Mitsubishi RV-6S Industrial Robot and Machine Vision System
CN213519245U (en) Railway signal recognition device
Sun et al. Direct virtual-hand interface in robot assembly programming

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980825

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

Free format text: PAYMENT UNTIL: 20081002

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091002

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20091002

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20101002

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees