JPH01276009A - Position detecting method for movable mechanism - Google Patents

Position detecting method for movable mechanism

Info

Publication number
JPH01276009A
JPH01276009A JP10601388A JP10601388A JPH01276009A JP H01276009 A JPH01276009 A JP H01276009A JP 10601388 A JP10601388 A JP 10601388A JP 10601388 A JP10601388 A JP 10601388A JP H01276009 A JPH01276009 A JP H01276009A
Authority
JP
Japan
Prior art keywords
origin
counter
encoder
movable mechanism
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10601388A
Other languages
Japanese (ja)
Inventor
Kazumasa Yoshima
一雅 吉間
Hirotoshi Watanabe
渡辺 浩年
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.)
Shinmaywa Industries Ltd
Original Assignee
Shin Meiva Industry Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shin Meiva Industry Ltd filed Critical Shin Meiva Industry Ltd
Priority to JP10601388A priority Critical patent/JPH01276009A/en
Publication of JPH01276009A publication Critical patent/JPH01276009A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To easily execute an origin adjustment by correcting a count value, based on an origin correction value being a difference between a count value of a counter in an origin target position of an encoder and a counter value of a counter in a mechanical origin position of a movable mechanism. CONSTITUTION:An encoder 5 rotates through a transfer mechanism by following up a motor (not shown in the figure). The encoder 5 outputs an A phase signal (a) and a B phase signal (b) which have been shifted by 90 deg. from each other by one piece each, respectively, whenever it rotates by a prescribed angle being smaller enough than one rotation, and outputs one Z phase signal (z), whenever it makes one rotation, and connected to a position counter 11 of the next stage. The counter 11 inputs the A and the B phase signals (a), (b) from the encoder 5 and detects the rotation direction and the rotation quantity from its phase relation, and obtains a count value N by counting its pulse. This value N is given to an adder 14, becomes a correction count Nc by adding an origin correction value DELTAN which has been stored in an origin correction value memory 15, and this value is given to a position data converter 12, converted to an absolute position theta of a movable mechanism and given to a controller 13.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明は、ロボットアームなどの可動機構の絶対位置
を検出する可動機構の位置検出装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a position detection device for a movable mechanism such as a robot arm, which detects the absolute position of a movable mechanism.

(従来の技術) ロボットアームなどの可動機構においては、予め設定さ
れた機械的原点を基準とした位置、つまり絶対位置に応
じて各種の指令が可動機構に与えられる構成となってい
る。上記絶対位置を割り出す方式として、アブソリュー
ト型エンコーダを用いる方式とインクリメンタル型エン
コーダを用いる方式とがある。アブソリュート型エンコ
ーダを用いる方式では、可動機構のそれぞれの絶対位置
に応じた信号が直接エンコーダより出力されるのに対し
、インクリメンタル型エン」−ダを用いる方式では、可
動機構の変位に応じてエン]・−ダより出力される信号
をカウンタでカウントして、そのカウント値から絶対位
置が割り出される。そこで、インクリメンタル型エンコ
ーダを用いる方式の場合、電源が−Uオフになるとカウ
ンタのカウント値が不定となるため、再度電源がAンに
されたときに、可動機構を機械的原点に戻して、このと
きのカウンタのカウント値を例えば零などの予め定めで
ある原点値に設定するといった原点合わせ動作が必要に
なる。
(Prior Art) In a movable mechanism such as a robot arm, various commands are given to the movable mechanism according to a position based on a preset mechanical origin, that is, an absolute position. As methods for determining the above-mentioned absolute position, there are a method using an absolute encoder and a method using an incremental encoder. In a method using an absolute encoder, a signal corresponding to the absolute position of each movable mechanism is directly output from the encoder, whereas in a method using an incremental encoder, the signal is output directly according to the displacement of the movable mechanism. - The signal output from the -da is counted by a counter, and the absolute position is determined from the count value. Therefore, in the case of a method using an incremental encoder, the count value of the counter becomes unstable when the power is turned off to -U, so when the power is turned to A again, the movable mechanism is returned to the mechanical origin and this An origin adjustment operation is required, such as setting the count value of a counter at a time to a predetermined origin value such as zero.

また、特にロボットの組立・調整時などにおいては、可
動機構の機械的原点位置と、エンコーダの原点信号発生
位置とを合致させるための原点調整が必要になる。
In addition, especially when assembling and adjusting a robot, it is necessary to adjust the origin to match the mechanical origin position of the movable mechanism and the origin signal generation position of the encoder.

第3図は、インクリメンタル型エンコーダを用いて可動
機構の絶対位置を検出する装置の従来例を示す概略構成
図である。図において、駆動源であるモータ1の回転は
、伝達機構2を介してロボットアームなどの可動機JI
43に伝達される。モータ1の回転は別の伝達機構4を
介してインクリメンタル型のロータリ・エンコーダ5に
も伝達され、このロータリ・エンコーダ5からはそれが
1回転より十分小さい一定角度回転するごとに相互の位
相が90度ずれた2つの基準信号a、b(以下、これら
をΔ相信号、B相信号と呼ぶ)が出力されるとともに、
そのロータリ・エンコーダ5が1回転するごとに1つの
基準信号Z(以下、7相信号と呼ぶ)が出力される。さ
らに、モータ1の回転は別の伝達機構6を介して原点目
標位置検出器7に伝達される。この原点目標位置検出器
7は、予め設定された可動機構3の橢械的原魚に捗く近
い所定の原点目標位置に可動機構3が到達()たことを
検出するためのものであり、モータ1に追従して回転す
る遮光板8a付きの円板8と、この遮光板8aの表裏に
またがるように配置されたフォトセンサなどからなるセ
ンサ9とによって構成され、センサ9からは検出信号1
−(Pが出力される。
FIG. 3 is a schematic configuration diagram showing a conventional example of a device for detecting the absolute position of a movable mechanism using an incremental encoder. In the figure, the rotation of a motor 1, which is a drive source, is transmitted to a movable machine such as a robot arm via a transmission mechanism 2.
43. The rotation of the motor 1 is also transmitted to an incremental rotary encoder 5 via another transmission mechanism 4, and the rotary encoder 5 changes the mutual phase by 90 degrees every time the rotary encoder 5 rotates by a certain angle that is sufficiently smaller than one revolution. Two reference signals a and b (hereinafter referred to as Δ phase signal and B phase signal) which are shifted by a degree are output, and
One reference signal Z (hereinafter referred to as a 7-phase signal) is output every time the rotary encoder 5 rotates once. Furthermore, the rotation of the motor 1 is transmitted to the origin target position detector 7 via another transmission mechanism 6. This origin target position detector 7 is for detecting that the movable mechanism 3 has reached a predetermined origin target position that is close to the preset mechanical origin of the movable mechanism 3, It is composed of a disk 8 with a light shielding plate 8a that rotates following the motor 1, and a sensor 9 consisting of a photosensor or the like arranged so as to straddle the front and back sides of this light shielding plate 8a.
-(P is output.

第4図は、第3図に示す可動機構の位置検出装置の電気
的構成を示′?l概略ブロック図である。図において、
エンコーダ5からはA相信号aとB相信号すとがそれぞ
れカウンタ11に与えられ、カウンタ11はこれらの信
号に基づいて力Cクント値Nを加減篩ツーる。また、カ
ウンタ11のカウント値Nは位置f−タ変換器12に与
えられて、可仙偲構の座標位置θに変換される。制御装
置13は、位置検出装置全体の制御や必要なデータの記
憶などを行なう装置ぐあって、位置データ変換器12で
変換された座標位置〇が与えられるほか、原点目標位置
検出器7からの検出信号)−I P 、エンコーダ5か
らの/相信号/、カウンタ11からのカウンi−値Nな
どが与えられる。また、カウンタ11には、後述J゛る
原点合わせ動作において原点値N7が制t!lN装置1
3から入力される。
FIG. 4 shows the electrical configuration of the position detection device of the movable mechanism shown in FIG. 3. FIG. 1 is a schematic block diagram. In the figure,
The encoder 5 supplies the A-phase signal a and the B-phase signal S to the counter 11, and the counter 11 adjusts the force C count value N based on these signals. Further, the count value N of the counter 11 is given to a position f-ta converter 12, and is converted into a coordinate position θ of the Kasenkai structure. The control device 13 is a device that controls the entire position detection device and stores necessary data, and in addition to being given the coordinate position 〇 converted by the position data converter 12, A signal)-I P , a /phase signal/ from the encoder 5, a count i-value N from the counter 11, etc. are given. In addition, the counter 11 shows the origin value N7 in the origin adjustment operation described below! IN device 1
It is input from 3.

第5図は、第3図の可動機構の一例としての[Jボット
アームを丞す概略構成図である。図において、可動機構
3は、アームへ1でムiいに連結された支点31及び回
動軸32と、回動軸32まわりのθ方向に回動自在に連
結されたアームへ2と、アームA2の先端に設けられた
エンドTフエクタ33とから構成されている。なお、図
示していないが、回動軸32には、アームA2を駆動す
るための[−夕1とエンコーダ5.及び原点目標位置検
出器7が設けられている〈第3図参照)。
FIG. 5 is a schematic configuration diagram showing a J-bot arm as an example of the movable mechanism shown in FIG. In the figure, the movable mechanism 3 includes a fulcrum 31 and a rotation shaft 32 which are freely connected to the arm at 1, an arm 2 which is connected to the arm so as to be rotatable in the θ direction around the rotation axis 32, and an arm. It is composed of an end T effector 33 provided at the tip of A2. Although not shown, the rotary shaft 32 includes an encoder 5 and an encoder 5 for driving the arm A2. and an origin target position detector 7 (see FIG. 3).

第6図は、第4図に示すアームA2の絶対位置としての
回動角θと、ト述の各信号HP、z、a。
FIG. 6 shows the rotation angle θ as the absolute position of the arm A2 shown in FIG. 4, and the aforementioned signals HP, z, and a.

b、Nとの関係を示すタイミングヂャー1〜である。The timing diagrams 1 to 1 show the relationship between b and N.

図に示すように、アームへ2の回転範囲θmin〜θ 
 の−点に、機械的原点位置θ。が定められ1Ila× でいる。機械的原点位置θ。は可動機構の構造から定め
られ、例えば第5図の例で【よ7−ムΔ2の回動角θが
90”となる位置に設定されている。
As shown in the figure, the rotation range of 2 to the arm θmin ~ θ
- point is the mechanical origin position θ. is determined and is 1Ila×. Mechanical origin position θ. is determined from the structure of the movable mechanism; for example, in the example shown in FIG.

第6図(1)及び(4)に示すように、通常は機械的I
京点位置θ0にJ5いてエンコーダ5の/相信号の一つ
がらようと発生するように調整されており、これはZ相
原点信号2゜と呼ばれる。
As shown in Figures 6 (1) and (4), mechanical I
It is adjusted so that one of the /phase signals of the encoder 5 is generated when J5 is at the zero point position θ0, and this is called the Z-phase origin signal 2°.

また、機械的原点位置θ。の近くの回動角θが小ざい方
向に、原点目標位置θHPが設けられている。原点目標
位置θ14.は、検出信号I Pが” ト+ ’”レベ
ルとなる一方のエツジの発生位置と対応づ(Jられてい
る。なお、検出信号HPが゛H”レベルとなるのは、第
3図に示す原点目標位置検出器7において、遮光板8a
がフォトセンサ9位置にある状態に対応している。
Also, the mechanical origin position θ. The origin target position θHP is provided in the direction in which the rotation angle θ is smaller near . Origin target position θ14. corresponds to the generation position of one edge where the detection signal I P goes to the "T + '" level (J). Note that the detection signal HP goes to the "H" level at the point shown in Fig. 3. In the origin target position detector 7, the light shielding plate 8a
corresponds to the state where the photo sensor is at the 9 position.

第7図は、この位置検出装置による従来のエンコーダの
原点合わせ及び原点調整の手順を示すフローチャートで
ある。まず、ステップS1で電源を投入した後、ステッ
プ82〜S4の原点合わせ動作を行なう。原点合わせ動
作ではステップS3において、原点目標位置θ11.を
サーチする。具体的には、モータにより第5図のアーム
Δ2を駆動し、第6図(3)の検出信号HPが゛H″レ
ベルとなる位置を探し出すことに対応する。次に、ステ
ップS4において、原点目標位置θ□、と所定の位置関
係にあるZ粗原点信号Z。をサーチする。第6図の例で
はZ柏原点信号2゜は、原点目標位置θ1.の右方にあ
る最初のZ相信号である。
FIG. 7 is a flowchart showing the procedure of origin alignment and origin adjustment of a conventional encoder using this position detection device. First, after turning on the power in step S1, the origin alignment operation in steps 82 to S4 is performed. In the origin alignment operation, in step S3, the origin target position θ11. Search for. Specifically, this corresponds to driving the arm Δ2 in FIG. 5 by the motor and searching for the position where the detection signal HP in FIG. Search for the Z rough origin signal Z that has a predetermined positional relationship with the target position θ□.In the example of FIG. It's a signal.

Z柏原点信号2 は、本来アームA2の機械的原点位置
θ。と一致するように設定されているはずである。しか
し、ロボットの組立て時等において、これらの関係がず
れている場合がある。第6図(2)には、例えばアーム
A2の位置座標θが全体としてΔθずれてθ′となって
いる例が示されている。ここで座標θとθ′とはアーム
A2の機構上は同じ位置を示すが、他の信号HP、Z、
a。
Z Kashiwa origin signal 2 is originally the mechanical origin position θ of arm A2. It should be set to match. However, when assembling a robot, these relationships may deviate. FIG. 6(2) shows an example in which, for example, the position coordinate θ of arm A2 is shifted by Δθ as a whole and becomes θ'. Here, coordinates θ and θ' indicate the same mechanical position of arm A2, but other signals HP, Z,
a.

b、Nとの関係においてずれているものである。There is a deviation in the relationship between b and N.

すなわち、実際にはアームA2の絶対位置θ(−θ′)
に対して信号)−1p、z、a、bがずれているのであ
るが、図示上の便宜から位置座標θをθ′にずらせてい
るのである。このような場合には、ステップS5からス
テップS6に至り、機械的原点位置θ。と2柏原点信号
Z。の発生位置とを合致させるための原点調整を行なう
必要がある。
That is, actually the absolute position θ(-θ') of arm A2
The signals) -1p, z, a, and b are shifted from each other, but for convenience of illustration, the position coordinate θ is shifted to θ'. In such a case, the process proceeds from step S5 to step S6, and the mechanical origin position θ is determined. and 2 Kashiwa origin signal Z. It is necessary to adjust the origin to match the position of occurrence.

いまステップS4までの原点合わせによって、アームA
 はZ粗原点信号Z。が発生している位置θ′ にある
。ここでθ′ 千〇′0+Δθである。このときのアー
ム△2の状態を第5図に破線で示す。従来の原点調整方
法では、まずアームA2を手動で機械的原点位置θ。に
合せる。その後、エンコーダ5の取付は位置若しくは原
点目標位置検出器7のフォトセンサ9と遮光板8aとの
位置関係、又はその両者を調整し、Z粗原点信号Z の
発生位置とアームA2の機械的原点位置θ0を一致させ
るようにする。これによって第6図の位置座標θ′が正
しい位置座標θにほぼ修正される。そして、その後ステ
ップS2に戻り、再度原点合わせ動作を行ない、ステッ
プS5において、Z粗原点信号Z。の検出位置とアーム
A2の原点位置θ。とが正確に一致するまでステップS
2からステップS6の手順を繰返す。そして、ステップ
S5において、Z粗原点信号Z。で停止させた位置とア
ームA2の機械的原点位置θ。とが一致した場合には、
ステップS7において、原点値NZをカウンター1に書
込み、原点合わせ及び原点調整を終了する。
Now, by adjusting the origin up to step S4, arm A
is the Z coarse origin signal Z. It is located at the position θ' where . Here, θ′ 100′0+Δθ. The state of arm Δ2 at this time is shown by the broken line in FIG. In the conventional origin adjustment method, first, arm A2 is manually adjusted to the mechanical origin position θ. Match. After that, the encoder 5 is installed by adjusting the position or the positional relationship between the photosensor 9 of the origin target position detector 7 and the light shielding plate 8a, or both, and adjusting the position where the Z rough origin signal Z is generated and the mechanical origin of the arm A2. The positions θ0 are made to match. As a result, the position coordinate θ' in FIG. 6 is almost corrected to the correct position coordinate θ. After that, the process returns to step S2, and the origin alignment operation is performed again, and in step S5, the Z rough origin signal Z is output. detection position and the origin position θ of arm A2. Step S until exactly match
2 to repeat the procedure from step S6. Then, in step S5, the Z coarse origin signal Z is generated. The stopped position and the mechanical origin position θ of arm A2. If it matches,
In step S7, the origin value NZ is written into the counter 1, and the origin alignment and origin adjustment are completed.

(発明が解決しようとする課題) 従来は、以上で述べたようにエンコーダの原点信号発生
位置と可動機構の機械的原点とが一致していないときに
、エンコーダや原点目標位置検出器の機械的取付けを調
整する原点調整を行なわねばならず、また原点調整と原
点合わせ動作を繰返して行なう必要もあったので、その
調整に手間と時間を要するという問題があった。
(Problems to be Solved by the Invention) Conventionally, as described above, when the origin signal generation position of the encoder and the mechanical origin of the movable mechanism do not match, the mechanical It was necessary to perform origin adjustment to adjust the attachment, and it was also necessary to repeat the origin adjustment and origin alignment operations, so there was a problem that the adjustment required time and effort.

また、モータとエンコーダとが一体となっているような
場合には、上述のようなエンコーダの取付は位置の調整
が困難であるため、このようなモータを使用した場合に
も原点調整を容易に行なえるような位置検出装置の開発
が望まれていた。
In addition, if the motor and encoder are integrated, it is difficult to adjust the position when installing the encoder as described above, so it is necessary to easily adjust the origin when using such a motor. There has been a desire to develop a position detection device that can do this.

(発明の目的) この発明は上記のような従来技術の問題点を解決するた
めになされたものであり、エンコーダの原点信号発生位
置と可動機構の機械的原点位置が対応していない場合に
、容易にその原点調整を行なうことのできる可動機構の
位置検出装置を提供することを目的とする。
(Object of the Invention) This invention was made to solve the problems of the prior art as described above, and when the origin signal generation position of the encoder and the mechanical origin position of the movable mechanism do not correspond, It is an object of the present invention to provide a position detection device for a movable mechanism that can easily adjust its origin.

(目的を達成するための手段) 上述の目的を達成するため、この発明では、可動機構が
単位変位量動作するごとに第1のパルスを出力するとと
もに、前記可動機構が単位変位量よりも細かな変位量だ
け動作するごとに第2のパルスを出力するエン」−ダと
、前記エンコーダが出力する第2のパルスをカウントす
るカウンタと、前記可動機構の所定の機械的原点位置に
おける前記カウンタのカウント値と、前記機械的原点位
置の近傍に設定されて前記第1のパルスの発生をもたら
す原点目標位nにおける前記カウンタのカウント値との
差分である原点補正値を記憶する記憶手段と、前記可動
機構が任意の位置にあるときの前記カウンタのカウント
値を前記原点補正値で補正することにより、前記可動機
構が前記機械的原点位置にあるときに所定の原点カウン
ト値と等しくなるという条件に適合する補正カウント値
を求める演算手段と、前記補正カウント値を前記可動機
構の位置データに変換する位置データ変換手段とを備え
る。
(Means for Achieving the Object) In order to achieve the above-mentioned object, the present invention outputs a first pulse every time the movable mechanism operates by a unit displacement amount, and the movable mechanism an encoder that outputs a second pulse every time the encoder operates by an amount of displacement; a counter that counts the second pulse that the encoder outputs; and a counter that counts the second pulse outputted by the encoder; storage means for storing an origin correction value that is a difference between a count value and a count value of the counter at an origin target position n that is set near the mechanical origin position and causes the generation of the first pulse; By correcting the count value of the counter when the movable mechanism is at an arbitrary position with the origin correction value, the condition is established that when the movable mechanism is at the mechanical origin position, the count value of the counter becomes equal to the predetermined origin count value. The apparatus includes a calculation means for determining a suitable correction count value, and a position data conversion means for converting the correction count value into position data of the movable mechanism.

なお、この明細Sにおいては、「位置」及び「変位」は
角度を含む広い意味で使用される。
Note that in this Specification S, "position" and "displacement" are used in a broad sense including angles.

(作用) エンコーダの原点目標位置と機械的原点位置とがずれて
いる場合には、これらの位置の差に対応するカウント値
が原点補正値として記憶手段に記憶される。そして、こ
の原点補正値とカウンタのカウント値とに基づいて、演
目手段によって求められた補正カウント値は、可動機構
が機械的原点にあるときに原点カウント値と等しくなる
ので、実質的に原点調整がされたと同じカウント値にな
っており、この補正カウント値が位置データ変換手段に
与えられることによって可動機構の位置が正しく検出さ
れる。
(Function) When the encoder origin target position and the mechanical origin position deviate from each other, a count value corresponding to the difference between these positions is stored in the storage means as an origin correction value. Then, based on this origin correction value and the count value of the counter, the correction count value obtained by the performance means is equal to the origin count value when the movable mechanism is at the mechanical origin, so it is essentially the origin adjustment. The corrected count value is given to the position data conversion means, so that the position of the movable mechanism can be detected correctly.

(実施例) 第1図はこの発明の一実施例である可f/1機構の位置
検出装置の構成を示す概略ブロック図である。
(Embodiment) FIG. 1 is a schematic block diagram showing the configuration of a position detection device with a variable f/1 mechanism, which is an embodiment of the present invention.

図において、エンコーダ5は、図示しない可動機構の駆
動源であるモータに追従して回転するように、そのモー
タに伝達機構を介して連係させである。このエンコーダ
5はそれが1回転より−1−9小さい一定角度回転する
ごとに相互の位相が5)0度ずれたA相信号a13よび
BK1信号すをそれぞれ1つずつ出力するとともに、1
回転するごとに1つの7相信号2を出力する機能を有し
、次段の位置カウンタ11に接続されている。この位置
カウンタ11はエンコーダ5から出力されるA相信Q 
aおよびB相信号すを入力して、その位相関係から回転
方向と回転量(位nパルス)を検出し、そのパルスをカ
ウントすることによりカウントWXNを得るためのもの
である。位置カウンタ11のカウント値Nは加口器14
に与えられ、原点補正値メモリ15に記憶された原点補
正値ΔNと足し合わされて補正カランl−(ii’I 
N oとなる。そして、この補正カウント値N。は位置
データ変換器12に与えられ、可動機構の絶対位置θに
変換される。このようにして得られた可動機構の絶対位
置θは制tlI15A置13に与えられる。原点目標位
置検出器7は、予め設定された可動機構の機械的原点に
極く近い所定の原点目標位置に可動機構が到達したこと
を検出するためのものであり、その具体的構成は前記し
た従来例の場合と同じであるため、ここでは説明を省略
する。制OIl装置13は、この借置検出装買全体のi
ll 50を行なうとともに必要なデータの記憶などを
行なう装置であり、エンコーダ5からの7相信号Z、位
置カウンター1からのカラン1へ(直N、位置データ変
換器12からの絶対位置θ、及び原点目標位置検出器7
からの検出信号[−1Pが入力されるとともに、原点合
わせの際には(装置カウンター1に原点!1flN7を
設定する働きをする。
In the figure, the encoder 5 is linked to a motor that is a drive source of a movable mechanism (not shown) via a transmission mechanism so as to follow and rotate the motor. This encoder 5 outputs one A-phase signal a13 and one BK1 signal each having a mutual phase shift of 5)0 degrees each time it rotates by a certain angle smaller than one rotation by -1-9.
It has a function of outputting one seven-phase signal 2 every time it rotates, and is connected to the position counter 11 at the next stage. This position counter 11 is the A phase signal Q output from the encoder 5.
This is to input the a and B phase signals, detect the rotation direction and rotation amount (position n pulses) from their phase relationship, and obtain a count WXN by counting the pulses. The count value N of the position counter 11 is the
is added to the origin correction value ΔN stored in the origin correction value memory 15 to obtain a correction value l-(ii'I
It becomes No. Then, this corrected count value N. is given to the position data converter 12 and converted into the absolute position θ of the movable mechanism. The absolute position θ of the movable mechanism thus obtained is given to the control tlI15A position 13. The origin target position detector 7 is for detecting that the movable mechanism has reached a predetermined origin target position very close to the preset mechanical origin of the movable mechanism, and its specific configuration is as described above. Since this is the same as in the conventional example, the explanation will be omitted here. The control oil control device 13 is the i
It is a device that performs 7-phase signal Z from encoder 5, input signal Z from position counter 1 to run 1 (direct N, absolute position θ from position data converter 12, and stores necessary data. Origin target position detector 7
The detection signal [-1P is input from the machine, and when the origin is adjusted, it serves to set the origin !1flN7 on the device counter 1.

次に、上記の位置検出装置の原点合わせ及び原点調整の
動作手順を、第2図に示すフローチャートに沿って説明
する。なお、以下の説明においで、第4図に示す可動機
構の構成例及び第5図に示すエンコーダ5の出力信号a
、b、zないし原点目標位置検出器7の出力信号1−(
Pとアーム装置θとの関係は従来と同様であるので、こ
れらの図(X)参照しつつ説明する。
Next, the operating procedure of origin alignment and origin adjustment of the above-mentioned position detection device will be explained along the flowchart shown in FIG. In the following explanation, the configuration example of the movable mechanism shown in FIG. 4 and the output signal a of the encoder 5 shown in FIG.
, b, z or the output signal 1-( of the origin target position detector 7
Since the relationship between P and the arm device θ is the same as the conventional one, it will be explained with reference to these figures (X).

まず、ステップS11において電源投入後、ステップS
12〜814において、原点合わぜを行なう。これらの
ステップ812〜814は、第6図に示す従来の原点合
わせのステップ82〜S4と同様である。すなわち、ス
テップS13において7−ムA を駆動し、原点目標位
置θ1.をサーチし、次にステップ814においてZ柏
原点信号2 を検出する動作を行なう。Z柏原点信号2
゜が検出される位置は、従来と同様に、例えば第6図に
おける位置θ′1である。
First, in step S11, after turning on the power, in step S11,
In steps 12 to 814, origin alignment is performed. These steps 812 to 814 are similar to steps 82 to S4 of the conventional origin alignment shown in FIG. That is, in step S13, the 7-mm A is driven and the origin target position θ1. Then, in step 814, an operation is performed to detect the Z Kashiwa origin signal 2. Z Kashiwa origin signal 2
The position where ° is detected is, for example, position θ'1 in FIG. 6, as in the conventional case.

そして、ステップS15ではZ柏原点信号z。Then, in step S15, the Z Kashiwa origin signal z is output.

の検出位置θ′1において、制御装置13から位置カウ
ンター1に原点値N2を書込む。これによって、以後ア
ームA2を動かしたとしても、2柏原点信号Z の検出
位置〇′、でのカウント値は常に原点値N2になる。そ
して、この位置を基準として、位置カウンター1がエン
コーダのA相信号a及びB相信号すから構成される装置
パルスをアップカウント又はダウンカウントする。
At the detected position θ'1, the origin value N2 is written from the control device 13 to the position counter 1. As a result, even if the arm A2 is moved thereafter, the count value at the detection position 〇' of the second origin signal Z will always be the origin value N2. Then, with this position as a reference, the position counter 1 counts up or down the device pulses made up of the A-phase signal a and the B-phase signal S of the encoder.

次に、ステップ816では前記位置θ′1と機械的原点
位置θ。との偏差Δθを測定する。すなわち、Z柏原点
信号2゜の検出位置θ′1が第5図に示す破線の位置に
あるときに、アームA2の機械的原点(θ。=90°)
との偏差Δθを測定する。この測定は、オペレータによ
り所定の定規等を用いて行なわれる。
Next, in step 816, the position θ'1 and the mechanical origin position θ are determined. Measure the deviation Δθ from That is, when the detection position θ'1 of the Z-axis origin signal 2° is at the position indicated by the broken line in FIG. 5, the mechanical origin (θ.=90°) of arm A2 is detected.
Measure the deviation Δθ from This measurement is performed by an operator using a predetermined ruler or the like.

ステップ817では、偏差Δθに対応した・原点補正値
ΔNを次式によって算出する。
In step 817, an origin correction value ΔN corresponding to the deviation Δθ is calculated using the following equation.

ΔN = Δθ・n        ・・・(1)ここ
で、nは単位アーム角度差に対するカウント値である。
ΔN = Δθ·n (1) Here, n is a count value for a unit arm angle difference.

このようにして得られた原点補正値ΔNは、図示しない
外部操作盤等から第1図の原点補正値メモリ15に入力
される。以上の簡単な動作で原点合わせと原点調整が終
了する。
The origin correction value ΔN obtained in this manner is input to the origin correction value memory 15 shown in FIG. 1 from an external operation panel (not shown) or the like. The above simple operations complete the origin alignment and origin adjustment.

以上のように原点合わせと原点調整がされた結果、第6
図のアーム位置θ′と信号HP、z、a。
As a result of the origin alignment and origin adjustment as described above, the 6th
The arm position θ' and the signals HP, z, and a in the figure.

b、Nとの関係は保持されたままである。一方、第1図
において、位置カウンタ11のカウント値Nと原点補正
値ΔNとが加算器14で加算され、補正カウント値N。
The relationship between b and N remains maintained. On the other hand, in FIG. 1, the count value N of the position counter 11 and the origin correction value ΔN are added by an adder 14 to obtain a correction count value N.

とじて位置データ変換器12に与えられる。この結果と
して、以下に示すように第6図のアーム位置θ′が実効
的に正しいアーム位置θに調整されていることになる。
The position data is then given to the position data converter 12. As a result, the arm position θ' in FIG. 6 is effectively adjusted to the correct arm position θ, as shown below.

すなわち、アームA2が位置θ′0にあるときには、第
6図(7)のカウント値Nは(N2−ΔN)である。従
つて、このときの補正カウント値N はN2となる。ま
た、アームA が位置θ′1にあるときには、カウント
値NはN2である。従ってこのときの補正カウントIN
  は(N2+ΔN)となる。
That is, when arm A2 is at position θ'0, count value N in FIG. 6(7) is (N2-ΔN). Therefore, the corrected count value N at this time becomes N2. Further, when arm A is at position θ'1, count value N is N2. Therefore, the correction count IN at this time
becomes (N2+ΔN).

一方、前述のように、第6図のアーム位置θとθ′とは
アームA2の機構上は同一の位置を示す。
On the other hand, as described above, the arm positions θ and θ' in FIG. 6 indicate the same mechanical position of the arm A2.

従って、補正カウント値N。は、アームA2の機械的原
点位置θ。においで原点値N2となるように補正されて
いることになる。この結果、補正カウント値N。を位置
データ変換器12によって変換して得られた絶対位置θ
は、アームA2の位置θを正確に示す値となっているの
である。
Therefore, the corrected count value N. is the mechanical origin position θ of arm A2. This means that the odor has been corrected to the origin value N2. As a result, the corrected count value N. The absolute position θ obtained by converting by the position data converter 12
is a value that accurately indicates the position θ of arm A2.

なお、この発明は上記実施例に限らず、例えば次のよう
な変形も可能である。
Note that the present invention is not limited to the above-mentioned embodiments, and for example, the following modifications are also possible.

■ 第2図のステップ816及びステップS17におけ
るカウンタ補正値ΔNの算出は、オペレータが所定の定
規兼用の治具等を用いてアームA2の角度の偏差Δθを
測定し、その偏差Δθから計算することとしていた。し
かし、これに限らず、例えばZ柏原点信号の発生位置で
カウンター1に原点1i6N  を設定した後、アーム
角度を原点位置θ。になるように動かして、その位置に
おける位置カウンター1のカウント値N。を読取り、そ
のカウント値N。と原点値NZとの差分をカウンタ補正
値ΔNとして求めてもよい。
■ The counter correction value ΔN in step 816 and step S17 in FIG. 2 is calculated by the operator measuring the angle deviation Δθ of arm A2 using a predetermined jig that also doubles as a ruler, and calculating from the deviation Δθ. It was. However, the invention is not limited to this, for example, after setting the origin 1i6N on the counter 1 at the generation position of the Z Kashiwa origin signal, the arm angle is set to the origin position θ. The count value N of position counter 1 at that position. Read the count value N. The difference between the origin value NZ and the origin value NZ may be determined as the counter correction value ΔN.

■ 第1図に示す原点補正値メモリー5として不揮発性
メモリを使用すれば、原点調整を一度行なうだけでよく
、その後の電源再投入時に原゛点調整を行なう必要がな
くなるという利点がある。同様の趣旨から、原点補正値
メモリー5としては、電源が投入されていなくても原点
補正値ΔNを記憶しておくことのできるスイッチ等であ
ってもよい。なお、この場合にも、電源再投入時には原
点合わせ動作は必要である。
(2) If a nonvolatile memory is used as the origin correction value memory 5 shown in FIG. 1, there is an advantage that the origin adjustment only needs to be performed once, and there is no need to perform the origin adjustment when the power is turned on again. From the same point of view, the origin correction value memory 5 may be a switch or the like that can store the origin correction value ΔN even when the power is not turned on. In this case as well, the origin alignment operation is necessary when the power is turned on again.

■ エンコーダは、インクリメンタル型のものであれば
よく、リニアエンコーダを用いたものに対しても本発明
が適用可能である。
(2) The encoder may be of an incremental type, and the present invention is also applicable to an encoder using a linear encoder.

〈発明の効果) 以上のように、この発明によれば、エンコーダなどの取
付位置を調整する必要がなく、エンコ−ダの原点目標位
置におけるカウンタのカウント(直と、可動1構の機械
的原点位置におけるカウンタのカウント値との差分であ
る原点補正値に基づいてカウント値が補正され、原点調
整が行なわれるように構成したので、エンコーダの原点
信号発生位置と可動機構の原点位置とが一致していない
場合にも、容易にその原点調整が行なえるという効果が
ある。
<Effects of the Invention> As described above, according to the present invention, there is no need to adjust the mounting position of the encoder, etc., and the counting of the counter at the origin target position of the encoder (direct and mechanical origin of one movable structure) The count value is corrected based on the origin correction value, which is the difference between the count value of the counter at the position, and the origin adjustment is performed, so that the origin signal generation position of the encoder and the origin position of the movable mechanism match. This has the effect that even if the origin is not adjusted, the origin can be easily adjusted.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例である可動機構の位置検出
装置を示すブロック図、 第2図はその原点合わせと原点調整の動作手順を示す7
0−ヂヤート、 第3図は可動機構の位置検出H置の構成例をホブ概略図
、 第4図は従来の可動機構の位置検出装置を示ずブロック
図、 第5図は可動機構の構成例を示す概略図、第6図は可動
i構の位置と各信号との関係を示すタイミングチャート
、 第7図は従来の可動機構の位置検出装置の動作手順を示
すフローチャートである。 5・・・エンコーダ、     11・・・位置カウン
タ、12・・・位置データ変換器、 15・・・原点補正値メモリ、N・・・カウント値、N
 ・・・補正カラン1−値、 N7・・・原点値、ΔN
・・・原点補正(直
Fig. 1 is a block diagram showing a position detection device for a movable mechanism which is an embodiment of the present invention, and Fig. 2 shows the operating procedure of origin alignment and origin adjustment.
Figure 3 is a schematic diagram of a hob showing a configuration example of the position detection H position of the movable mechanism, Figure 4 is a block diagram without showing the conventional position detection device of the movable mechanism, and Figure 5 is a configuration example of the movable mechanism. FIG. 6 is a timing chart showing the relationship between the position of the movable i-structure and each signal, and FIG. 7 is a flowchart showing the operating procedure of a conventional position detection device for a movable mechanism. 5... Encoder, 11... Position counter, 12... Position data converter, 15... Origin correction value memory, N... Count value, N
...Corrected Curran 1-value, N7...Origin value, ΔN
...Origin correction (direct

Claims (1)

【特許請求の範囲】[Claims] (1)可動機構が単位変位量動作するごとに第1のパル
スを出力するとともに、前記可動機構が単位変位量より
も細かな変位量だけ動作するごとに第2のパルスを出力
するエンコーダと、 前記エンコーダが出力する第2のパルスをカウントする
カウンタと、 前記可動機構の所定の機械的原点位置における前記カウ
ンタのカウント値と、前記機械的原点位置の近傍に設定
されて前記第1のパルスの発生をもたらす原点目標位置
における前記カウンタのカウント値との差分である原点
補正値を記憶する記憶手段と、 前記可動機構が任意の位置にあるときの前記カウンタの
カウント値を前記原点補正値で補正することにより、前
記可動機構が前記機械的原点位置にあるときに所定の原
点カウント値と等しくなるという条件に適合する補正カ
ウント値を求める演算手段と、 前記補正カウント値を前記可動機構の位置データに変換
する位置データ変換手段とを備えることを特徴とする可
動機構の位置検出装置。
(1) an encoder that outputs a first pulse each time the movable mechanism moves by a unit displacement amount, and outputs a second pulse every time the movable mechanism moves by a smaller displacement amount than the unit displacement amount; a counter that counts the second pulse output by the encoder; a count value of the counter at a predetermined mechanical origin position of the movable mechanism; and a counter that is set near the mechanical origin position and counts the first pulse. storage means for storing an origin correction value that is a difference between the count value of the counter at the origin target position that causes the generation; calculating means for calculating a correction count value that satisfies a condition that the movable mechanism is equal to a predetermined origin count value when the movable mechanism is at the mechanical origin position; 1. A position detection device for a movable mechanism, comprising: position data conversion means for converting position data into a position data.
JP10601388A 1988-04-27 1988-04-27 Position detecting method for movable mechanism Pending JPH01276009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10601388A JPH01276009A (en) 1988-04-27 1988-04-27 Position detecting method for movable mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10601388A JPH01276009A (en) 1988-04-27 1988-04-27 Position detecting method for movable mechanism

Publications (1)

Publication Number Publication Date
JPH01276009A true JPH01276009A (en) 1989-11-06

Family

ID=14422780

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10601388A Pending JPH01276009A (en) 1988-04-27 1988-04-27 Position detecting method for movable mechanism

Country Status (1)

Country Link
JP (1) JPH01276009A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013137204A (en) * 2011-12-28 2013-07-11 Fuji Electric Co Ltd Encoder and position correction device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013137204A (en) * 2011-12-28 2013-07-11 Fuji Electric Co Ltd Encoder and position correction device

Similar Documents

Publication Publication Date Title
US5525885A (en) Position detecting apparatus and position compensating method therefor
US6320344B1 (en) Position control device
US10899013B2 (en) Eccentricity error correction method for angle detector and robot system
NO842324L (en) AUTOMATIC, DYNAMIC ERROR COMPENSATOR
KR100222940B1 (en) Calibration method utilizing a sensor and its system
CN111521212A (en) Magnetic encoder correction system and method, control terminal and readable storage medium
US4795955A (en) Position control apparatus
JP4014719B2 (en) NC machine tool control apparatus and positioning control method
JP5803173B2 (en) Robot control apparatus and calibration method
JPH01276009A (en) Position detecting method for movable mechanism
JP3365063B2 (en) Rotation angle detection method
JP2001336951A (en) Rotational position detecting apparatus and method
JPH07198417A (en) Method and equipment to determine position of object
TWM577495U (en) A rotary encoder eccentricity correction apparatus
JP2577713B2 (en) Control device for robot
JPS616705A (en) Method for correcting pitch error of feed screw in numerically controlled machine tool
JP3010107B2 (en) Encoder system
JPH0549165B2 (en)
JPH05111827A (en) Positioning method of rotational position
WO2024009514A1 (en) Position detection system, actuator, and position detection method
JPH01270784A (en) Controller for motor
JPH01276010A (en) Diagnostic method for position detecting device
JP2002048595A (en) Calibration method for sensor
JPH0542601B2 (en)
JP2547395B2 (en) Absolute position detection method