JPS6191510A - Method and apparatus for detecting present position - Google Patents

Method and apparatus for detecting present position

Info

Publication number
JPS6191510A
JPS6191510A JP21357784A JP21357784A JPS6191510A JP S6191510 A JPS6191510 A JP S6191510A JP 21357784 A JP21357784 A JP 21357784A JP 21357784 A JP21357784 A JP 21357784A JP S6191510 A JPS6191510 A JP S6191510A
Authority
JP
Japan
Prior art keywords
signal
rotational position
current position
marker
pulses
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
JP21357784A
Other languages
Japanese (ja)
Inventor
Kaoru Kimura
木村 馥
Taketoshi Tazaki
田崎 武俊
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Manufacturing Co 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 Yaskawa Electric Manufacturing Co Ltd filed Critical Yaskawa Electric Manufacturing Co Ltd
Priority to JP21357784A priority Critical patent/JPS6191510A/en
Publication of JPS6191510A publication Critical patent/JPS6191510A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices With Unspecified Measuring Means (AREA)
  • Manipulator (AREA)

Abstract

PURPOSE:To make it possible to shorten the time required in the returning to the starting point to a large extent, by providing a stage for rotating a servo motor, a stage for counting the number of rotary position pulses, a transfer stage to memory and a stage for confirming a present position. CONSTITUTION:Main detector and a transmission mechanism having a servo motor shaft different in a variable speed ratio and a drive shaft are provided and an auxiliary detector outputting a pulse (second marker signal) Ps with the rotation of the follower shaft of a variable speed mechanism is attached and the output interval of the starting point pulse (first marker signal) Pi of the main detector and the second marker signal is calculated by counting the rotary position pulse of the main detector. The first marker signal based on the number of rotations of the main detector is discriminated by a microcom puter 7 constituted of a signal order discrimination block 70, a sub-block control block 71, an operation block 72 and memories 73, 74, 75, 76 to calculate a pres ent position by the max. two rotations of the main detector, even if the main detector is not returned to the starting point position, to complete starting point return operation. By this method, the time of the starting point return operation is shortened to a large extent.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はインクリメンタル式ロータリエンコーダを位置
検出器として使用した、産業用ロボット等の数値制御さ
れる機械の駆動軸の現在位置検出方法および装置に関す
る。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a method and device for detecting the current position of a drive shaft of a numerically controlled machine such as an industrial robot, using an incremental rotary encoder as a position detector. .

〔従来の技術〕[Conventional technology]

第7図は、この種の数値制御される機械の従来例を示す
図である。テーブル21はサーボモータ22により駆動
されるポールネジ22により図左右方向に移動し、その
位置はサーボモータ22の軸に直結されたパルスジェネ
レータ24により、その速度はタコジェネレータ25に
よりそれぞれ検出される。
FIG. 7 is a diagram showing a conventional example of this type of numerically controlled machine. The table 21 is moved in the horizontal direction in the drawing by a pole screw 22 driven by a servo motor 22, and its position is detected by a pulse generator 24 directly connected to the shaft of the servo motor 22, and its speed is detected by a tacho generator 25.

この場合、通電時(初期電源投入時や故障復旧後の再始
動時)の初期状態においてはテーブル21の位置とパル
スジェネレータ24の回転位置パルスをカウントするカ
ウンタの内容は一致していないため、これを一致させる
原点復帰動作(シンクロナイジング)が必要となる0通
電時にテーブル21が実線の位置にあるものとすると、
テーブル21を一定速度で無条件に図左方向に移動させ
、これが原点選択用リミットスイッチ26をオンした状
態(二点鎖線で示す)状態で、最初に出力されたパルス
ジェネレータ24の原点信号の位置でテーブル21を停
止させるとともに、カウンタの内容をリセット(Oにセ
ット)することにより、原点復帰動作が完了する。なお
、27.28はオーバーラン検出用リミットスイッチで
ある。
In this case, the position of the table 21 and the contents of the counter that counts the rotational position pulses of the pulse generator 24 do not match in the initial state when the power is turned on (when the power is initially turned on or when restarting after recovery from a failure). Assuming that the table 21 is at the position indicated by the solid line when 0 current is applied, which requires a return-to-origin operation (synchronizing) to match the
The table 21 is unconditionally moved to the left in the figure at a constant speed, and the origin selection limit switch 26 is turned on (indicated by the two-dot chain line), and the position of the origin signal of the pulse generator 24 that is first output is By stopping the table 21 and resetting the contents of the counter (setting it to O), the return-to-origin operation is completed. Note that 27 and 28 are limit switches for overrun detection.

ところで、一般に、ロボットの場合は制御軸数が多く、
また作業治工具が必らずその可動範囲内に存在するため
、(1)原点位置は、動作範囲のうちの最も邪魔になら
ない位置、すなわち可動範囲の端である必要がある。(
2)通電時各軸の初期状態が不明であるため全軸同時に
原点復帰動作を行なうことは危険であり、原則的には1
軸ずつ、かつ低速で原点復帰動作を行なう必要があると
いう制限がつき、その結果、原点復帰動作に時間がかか
り、機械の実働率が低下するという問題がある。
By the way, robots generally have a large number of control axes.
Furthermore, since the working tool is necessarily present within its movable range, (1) the origin position must be the least obstructive position within the movable range, that is, the end of the movable range. (
2) Since the initial state of each axis is unknown when energized, it is dangerous to perform home return operation on all axes at the same time.
There is a limitation in that the return-to-origin operation must be performed axis by axis at low speed, and as a result, the return-to-origin operation takes time and the actual operating rate of the machine decreases.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

このように、インクリメンタル式ロータリエンコーダを
位置検出器として使用した、産業用ロボット等の数値制
御される従来の機械では、原点復帰動作に時間がかかり
、機械の実働率が低下するという問題があった。
In this way, conventional numerically controlled machines such as industrial robots that use incremental rotary encoders as position detectors have the problem of taking time to return to the origin and reducing the actual operating rate of the machine. .

したがって1本発明の目的は、原点復帰動作に要する時
間を大幅に短縮して機械の実(@率の向上を図った現在
位置検出方法および装置を提供することにある。
Therefore, an object of the present invention is to provide a method and device for detecting the current position, which greatly reduces the time required for the return-to-origin operation and improves the efficiency of the machine.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は主検出器(パルスジェネレータ)と変速化が異
なり、サーボモータ軸を駆動軸とする変速機構を設け、
この変速機構の従動軸の回転に伴ないパルス(以下、第
2のマーカ信号という)を出力する副検出器を取付け、
主検出器の原点パルス(以下、第1のマーカ信号という
)と第2のマーカ信号の出力間隔を主検出器の回転位置
パルスをカウントすることにより求めて当該第1のマー
カ信号が主検出器の何回転目の第1のマーカ信号かを判
別して、従来のように原点位置に戻らずども、主検出器
の最大2回転で現在位置を求め、原点復帰動作が完了す
るようにしたものである。
The present invention differs in speed change from the main detector (pulse generator), and is equipped with a speed change mechanism using a servo motor shaft as the drive shaft.
Install a sub-detector that outputs pulses (hereinafter referred to as second marker signals) as the driven shaft of this transmission mechanism rotates,
The output interval between the origin pulse of the main detector (hereinafter referred to as the first marker signal) and the second marker signal is determined by counting the rotational position pulses of the main detector, and the first marker signal is detected as the main detector. Instead of returning to the home position as in the conventional method, the current position is determined by determining the rotation number of the first marker signal, and the current position is determined in a maximum of two revolutions of the main detector, and the home return operation is completed. It is.

第6図は本発明の原理を示す図である。原点0において
第1のマーカ信号と第2のマーカ信号は同時に出力され
ている。Slのマーカ信号が出力されてから第2のマー
カ信号が出力されるまでハ の主検出器の回転位置パルス数は、主検出器が1回転す
る毎にΔP□ 、ΔP2+・・・、ΔPnと変化してい
き、そして、これら回転位置パルス数ΔP工 、ΔP2
 、・・・、ΔPnは主検出器の回転数に比例している
。すなわち、主検出器の回転数がiのときの回転位置パ
ルス数をΔPiとするとΔPi=i・ΔP□となる。そ
こで、本発明は、主検出器の変速比と主検出器の1回転
当りの回転位置パルス数PPRと単位変分パルス数工 
(主検出器と変速機構の変速比によって決まり、第1の
マーカ信号と第2のマーカ信号の位相差に相当する回転
位置パルス数で、第6図でΔP工である)と両マーカ信
号間の回転位置パルス数から、そして第1、第2のいず
れのマーカ信号の周期が大きいか、現在位置検出動作開
始後、第1、第2のいずれのマーカ信号が先に発生した
かを考慮して、現在位置P (=原点からの総回転位置
パルス数/主検出器の変速比)を演算により求める。
FIG. 6 is a diagram showing the principle of the present invention. At origin 0, the first marker signal and the second marker signal are output simultaneously. From when the marker signal of Sl is output to when the second marker signal is output, the number of rotational position pulses of the main detector of C is ΔP□, ΔP2+..., ΔPn every time the main detector rotates once. Then, these rotational position pulse numbers ΔP, ΔP2
, . . . , ΔPn is proportional to the rotation speed of the main detector. That is, if the number of rotational position pulses when the rotation speed of the main detector is i is ΔPi, then ΔPi=i·ΔP□. Therefore, the present invention has the following advantages: the speed ratio of the main detector, the number of rotational position pulses PPR per rotation of the main detector, and the number of unit variation pulses.
(Determined by the gear ratio of the main detector and transmission mechanism, the number of rotational position pulses corresponds to the phase difference between the first marker signal and the second marker signal, which is ΔP in Fig. 6) and between both marker signals. From the number of rotational position pulses in Then, the current position P (=total number of rotational position pulses from the origin/speed ratio of the main detector) is calculated.

さらに、本発明は、サーボモータが高速回転で駆動され
ている場合に、現在位置Pの演算中の現在位置の行き過
ぎ量を求めてこれを補償する。
Further, in the present invention, when the servo motor is driven at high speed rotation, the amount of overshoot of the current position during calculation of the current position P is determined and compensated for.

以上まとめると、本発明の第1の現在位置検出方法は、
現在位置検出開始指令によってサーボモータを一定方向
に回転させる段階と、一方のマーカ信号が発生してから
他方のマーカ信号が発生するまでの間、サーボモータの
回転に応じた回転位置パルス数をカウンタがカウントす
る段階と、カウントされた回転位置パルス数をカウンタ
からメモリへ転送する段階と、主検出器の1回転当りの
回転位置パルスの総数、単位変分パルス数、主変速器の
変速比、前記のメモリに格納されどいる回転位置パルス
数、最初に発生したマーカ信号の種別モして両マーカ信
号の位相差により現在位置を演算する段階とからなる。
In summary, the first current position detection method of the present invention is as follows:
The number of rotational position pulses corresponding to the rotation of the servo motor is counted during the stage where the servo motor is rotated in a fixed direction by the current position detection start command and from the generation of one marker signal until the generation of the other marker signal. a step of counting, a step of transferring the counted number of rotational position pulses from the counter to a memory, a total number of rotational position pulses per one rotation of the main detector, the number of unit variation pulses, a gear ratio of the main transmission, It consists of the step of calculating the current position based on the number of rotational position pulses stored in the memory, the type of the first generated marker signal, and the phase difference between both marker signals.

本発明の第2の現在位置検出方法は、前記第1の現在位
置検出方法における、カウントされた回転位置パルスを
メモリへ転送する段階と、現在位置を演算する段階と並
行して行なわれ、カウンタをリセットし前記の現在位置
の演算が終了するまでの間、回転位置パルス数をカウン
トし、このカウントされた補正用回転位置パルス数を第
2のメモリへ転送する段階と、現在位置の演IH終了後
、この現在位置のデータに前記補正用回転位置パルス数
を加算または減算して現在位置のデータを補正する段階
とからなる。
The second current position detection method of the present invention is performed in parallel with the step of transferring the counted rotational position pulses to the memory and the step of calculating the current position in the first current position detection method. The number of rotational position pulses is counted until the calculation of the current position is completed, and the counted number of rotational position pulses for correction is transferred to the second memory, and the calculation of the current position is performed. After completion, the present position data is corrected by adding or subtracting the number of correction rotational position pulses to the current position data.

本発明の現在位置検出装置は、サーボモータ軸に直結さ
れて、第1のマーカ信号を発生し、回転位置パルスをイ
ンクリメンタルに発生する手段と、サーボモータ軸を駆
動軸とする変速機構と、前記変換機構の従動側の回転に
伴なって第2のマーカ信号を発生する手段と、前記回転
位置パルス数をカウントするカウンタと、前記カウンタ
のカウント結果である回転位置パルス数が格納されるメ
モリと、前記第1のマーカ信号または第2のマーカ信号
が発生したときに第1の制御信号を出力し、後続する前
記第2のマーカ信号または第1のマーカ信号が発生した
ときに第2の制御信号を出力する信号指令判別ブロック
と、前記第1のマーカ信号を発生する手段911回転当
の前記回転位置パルスの総数、前記第1および第2のマ
ーカ信号の位相差に相当する回転位置パルス数である単
位変分パルス、前記メモリに格納されている回転位置パ
ルス数、および最初に発生したマーカ信号の種別を示す
キャラクタ信号により現在位置を演算する演算手段と、
前記信号指令判別ブロックから出力された第1の制御信
号によって前記カウンタにカウント動作を開始させ、前
記第2の制御信号によって前記カウンタのカウント動作
を停止させるカウンタ制御信号、前記カウンタのカウン
ト結果を前記メモリに転送する転送指令信号、前記転送
指令信号の出力に続いて前記演算手段に演算を開始させ
るための演算開始指令信号、前記キャラクタ信号を出力
し、前記演算手段の演算が終了したときに前記演算手段
から演算終了信号を入力する制御手段とを有する。
The current position detection device of the present invention includes means that is directly connected to a servo motor shaft to generate a first marker signal and incrementally generate rotational position pulses, a speed change mechanism that uses the servo motor shaft as a drive shaft, and means for generating a second marker signal in accordance with the rotation of the driven side of the conversion mechanism; a counter for counting the number of rotational position pulses; and a memory for storing the number of rotational position pulses as a count result of the counter. , a first control signal is output when the first marker signal or the second marker signal is generated, and a second control signal is output when the subsequent second marker signal or the first marker signal is generated. a signal command discrimination block that outputs a signal; and a means for generating the first marker signal; a total number of the rotational position pulses per 11 rotations; a number of rotational position pulses corresponding to the phase difference between the first and second marker signals; calculation means for calculating the current position using a unit variational pulse, the number of rotational position pulses stored in the memory, and a character signal indicating the type of the first generated marker signal;
A counter control signal that causes the counter to start a counting operation according to a first control signal output from the signal command determination block and stops the counting operation of the counter according to the second control signal; A transfer command signal to be transferred to the memory, a calculation start command signal for causing the calculation means to start calculation following the output of the transfer command signal, and the character signal are output, and when the calculation of the calculation means is completed, the and control means for inputting a computation end signal from the computation means.

〔実施例〕 本発明の実施例について図面を参照しながら説明する。〔Example〕 Embodiments of the present invention will be described with reference to the drawings.

第1図は本発明による現在位置検出装置の一実施例を示
すブロック図である。
FIG. 1 is a block diagram showing one embodiment of a current position detection device according to the present invention.

サーボモータ1の軸にはマーカ信号Pi(第1のマーカ
信号)と回転位置パルスΔPiまたはPad(演算した
現在位置の補正用)を発生するパルスジェネレータ3が
直結されている。また、サーボモータlとパルスジェネ
レータ3の間には第2図に示すように変速装置2(変速
比はlに極めて近く、しかもlでない)が介装されてお
り、その駆動側歯車2aと噛合する従動側歯車2bにス
リット2cが1側設けられ、ケース2dに取付けられた
非接触式リミットスイッチ4(本実施例で磁気式)によ
ってマーカ信号Ps(第2のマーカ信号)を発生するよ
うになっている。なお、マーカ信号Pi とPsは制御
原点位置にて同時に発生するように調整されている。カ
ウンタ6はパルスジェネレータ3から出力される回転パ
ルスΔPiまたはPadをカウントする。制御器9はサ
ーボモータlを制御する。
A pulse generator 3 that generates a marker signal Pi (first marker signal) and a rotational position pulse ΔPi or Pad (for correcting the calculated current position) is directly connected to the shaft of the servo motor 1. Furthermore, as shown in FIG. 2, a transmission 2 (the transmission ratio is very close to 1, but not 1) is interposed between the servo motor 1 and the pulse generator 3, and meshes with the drive side gear 2a. A slit 2c is provided on one side of the driven gear 2b, and a marker signal Ps (second marker signal) is generated by a non-contact limit switch 4 (magnetic type in this embodiment) attached to the case 2d. It has become. Note that the marker signals Pi and Ps are adjusted so that they are generated simultaneously at the control origin position. A counter 6 counts rotation pulses ΔPi or Pad output from the pulse generator 3. A controller 9 controls a servo motor l.

信号指令判別ブロン70、サブプログラム制御ブロック
71、演算ブロック72、メモリ73,74,75.7
8はマイクロコンピュータ7として構成されている。
Signal command discrimination block 70, subprogram control block 71, calculation block 72, memories 73, 74, 75.7
8 is configured as a microcomputer 7.

信号指令判別ブロック5はそれぞれパルスジェネレータ
3および非接触式リミットスイッチ4から出力されたマ
ーカ信号Pi、Psを入力するようになっており、開始
/終了信号Stと最初に入力したで一カ信号の種別を示
すキャラクタ信号Schを出力する。メモリ73.74
にはカウンタ6でカウントされた回転位置パルス数ΔP
iとPadがテータバス8を通じてそれぞれ格納される
The signal command discrimination block 5 receives the marker signals Pi and Ps output from the pulse generator 3 and the non-contact limit switch 4, respectively, and receives the start/end signal St and the first input signal. A character signal Sch indicating the type is output. Memory 73.74
is the number of rotational position pulses ΔP counted by the counter 6.
i and Pad are respectively stored through the data bus 8.

演算ブロック72は下記の演算式にしたがって現在位置
P(制御原点Oから現在位置までのパルス数)を演算す
る(第6図参照)。
The calculation block 72 calculates the current position P (the number of pulses from the control origin O to the current position) according to the following calculation formula (see FIG. 6).

ここで、PPR:サーボモータ1の1回転当りパルスジ
ェネレータ3の発する回転装 置パルスの総数 ΔPi:2つのマーカ信号Pi、Psの出現間隔にカウ
ントされた回転位置パ ルス数 ■ :変速機W2の変速比により生じる単位変分パルス
数(設定値で位置 検出精度±1パルス以内にするた めには3以上が望ましい) 演算ブロック72は、サーボモータ1が高速回転で駆動
され、現在位置Pが極く短時間で検出された場合には、
式(1)で求めた現在位IPをメモリ74に格納されて
いるカウンタ6がリセットされてから現在位置Pの演算
が終了する間の行き過ぎ量を示す回転位置パルス数Pa
dで次式により補正する。
Here, PPR: Total number of rotating device pulses generated by the pulse generator 3 per rotation of the servo motor 1 ΔPi: Number of rotational position pulses counted during the appearance interval of the two marker signals Pi and Ps■: Gear ratio of the transmission W2 The number of unit variation pulses generated by If detected in time,
The number of rotational position pulses Pa indicating the amount of overshoot from when the counter 6 stored in the memory 74 is reset to when the calculation of the current position P is completed, based on the current position IP calculated by equation (1).
d is corrected using the following formula.

Pr =P±P ad        −(2)メモリ
75はNVRAMで構成され、上記演算における定数P
PP、Iの値が格納されている。
Pr = P±P ad - (2) The memory 75 is composed of NVRAM, and the constant P in the above calculation is
The values of PP and I are stored.

このようにして求められた現在位置□PまたはPrはメ
モリ76に格納された後、不図示の主プログラムブロッ
ク(ロボットの全体を制御)に出力される。
The current position □P or Pr obtained in this manner is stored in the memory 76 and then output to a main program block (not shown) (which controls the entire robot).

サブプログラム制御ブロック71は前記主プログラムプ
ロ・ンクから制御信号5proによって制御され、また
信号指令判別ブロック70から開始/停止信号Stおよ
びキャラクタ信号Schが入力するようになっている。
The sub-program control block 71 is controlled by the control signal 5pro from the main program pro-nk, and the start/stop signal St and character signal Sch are input from the signal command discrimination block 70.

サブプログラム制御ブロック71は、最初の開始/停止
信号St、すなわちマーカ信号Pi またはPsによっ
てカウンタ6に回転位置パルスΔPiまたはPadのカ
ウントを開始させるスタート信号Csを出力し1次の開
始/停止信号St、すなわち他方のマーカ信号Psまた
はPiによってカウンタ6に回転位置パルスΔPiまた
はPadのカウントを停止させるストップ信号Sc、回
転位装置パルス数Padのカウントの際にカウンタ6の
内容をリセットするリセット信号Rtおよびカウント結
果である回転位置パルス数ΔPiまたはPadをメモリ
73.74にそれぞれ転送するための転送指令信号Ro
を出力する。この転送指令信号Roを出力した後、サブ
プログラム制御ブロック71は演算ブロック72に現在
位置Pの演算を行なわせるために演算開始信号Scdを
演算ブロック72に出力し、またこの現在値Pの演算が
終了して、演算結果がメモリ78に書込まれると演算終
了信号Scdが演算ブロック72から入力される。これ
によって、制御が前記主プログラムブロックに戻される
The subprogram control block 71 outputs a start signal Cs that causes the counter 6 to start counting the rotational position pulses ΔPi or Pad according to the first start/stop signal St, that is, the marker signal Pi or Ps, and outputs a start signal Cs that causes the counter 6 to start counting the rotational position pulse ΔPi or Pad. , that is, a stop signal Sc that causes the counter 6 to stop counting the rotational position pulse ΔPi or Pad according to the other marker signal Ps or Pi, a reset signal Rt that resets the contents of the counter 6 when counting the rotational position device pulse number Pad, and Transfer command signal Ro for transferring the number of rotational position pulses ΔPi or Pad, which is the count result, to the memories 73 and 74, respectively.
Output. After outputting this transfer command signal Ro, the subprogram control block 71 outputs a calculation start signal Scd to the calculation block 72 in order to have the calculation block 72 calculate the current position P, and the calculation of the current position P is also performed. When the calculation is completed and the calculation result is written into the memory 78, a calculation completion signal Scd is input from the calculation block 72. This returns control to the main program block.

現在位置検出動作の開始指令はマイクロコンピュータ7
の不図示の回路に与えられ、サーボモータlを駆動する
制御器9への回路指令パルスがこの回路から出力される
The command to start the current position detection operation is issued by the microcomputer 7.
A circuit command pulse to the controller 9 for driving the servo motor 1 is output from this circuit.

次に1本実施例の動作を第3図のフローチャートを参照
しながら説明する。
Next, the operation of this embodiment will be explained with reference to the flowchart shown in FIG.

(処理100) 操作者または他のCPUから動作開始指令がマイクロコ
ンピュータ7の不図示の回路に与えられると、回転指令
パルスが制御器9に発せられると同時に主プログラムブ
ロックからサブプログラム制御ブロック71に待機指令
5proが発生される。制御器9はこの回路指令パルス
に応じてサーボモータ1へ電力を供給する。これによっ
てサーボモータlは一定方向へ回転する。
(Process 100) When an operation start command is given to a circuit (not shown) of the microcomputer 7 from an operator or another CPU, a rotation command pulse is issued to the controller 9, and at the same time, the main program block is sent to the subprogram control block 71. A standby command 5pro is generated. The controller 9 supplies power to the servo motor 1 in response to this circuit command pulse. This causes the servo motor l to rotate in a fixed direction.

(処理110) サーボモータ1の軸に直結されたパルスジェネレータ3
からマーカ信号Pi、またはサーボモータ1の軸に連結
された変速機構2の従動側に設けた非接触式リミットス
イッチ4からマーカ信号Psが出力されたかを確認する
。サーボモータ1はこれらマーカ信号PiまたはPsが
出力されるまで一定方向へ回転し続ける。
(Process 110) Pulse generator 3 directly connected to the axis of servo motor 1
Check whether the marker signal Pi or the marker signal Ps is output from the non-contact limit switch 4 provided on the driven side of the transmission mechanism 2 connected to the shaft of the servo motor 1. The servo motor 1 continues to rotate in a fixed direction until these marker signals Pi or Ps are output.

(処理120) マーカ信号PiまたはPsの一方が出力されると、信号
指令判別ブロック70に入力され、開始/浮上信号St
をサブプログラム制御ブロック71ニ出力する。サブプ
ログラム制御ブロック71はこの開始/停止信号Stに
応答してカウント開始信号Csをカウンタ6に出力する
。カウント開始信号Csを受けたカウンタ6はパルスジ
ェネレータ3の発する回転位置パルスΔPiのカウント
を開始する。
(Processing 120) When one of the marker signals Pi or Ps is output, it is input to the signal command determination block 70, and the start/levitation signal St
is output to the subprogram control block 71. The subprogram control block 71 outputs a count start signal Cs to the counter 6 in response to this start/stop signal St. Upon receiving the count start signal Cs, the counter 6 starts counting the rotational position pulse ΔPi generated by the pulse generator 3.

(処理130) 他方のマーカ信号PiまたはPsが出力されたかを確認
する。
(Process 130) Check whether the other marker signal Pi or Ps is output.

(処理140) 他方のマーカ信号PiまたはPsが出力されると、この
信号は信号指令判別ブロック70に入力し、開始/停止
信号Stとキャラクタ信号Schがサブプログラム制御
ブロック71に入力される。サブプログラム制御プロ・
ンク71はマーカ信号PiおよびPsの両方が入力され
たことを確認し、カウンタ6ヘ力ウント停止信号Csと
転送指令信号ROを出力するとともに、演算ブロック7
2へ演算開始信号Scdおよびキャラクタ信号Schを
出力する。転送指令信号Roを受けるとカウント結果で
ある回転位置パルス数ΔP1の値がデータバス8を通じ
てメモリ73へ転送される。
(Process 140) When the other marker signal Pi or Ps is output, this signal is input to the signal command determination block 70, and the start/stop signal St and character signal Sch are input to the subprogram control block 71. Subprogram control pro/
The link 71 confirms that both the marker signals Pi and Ps are input, and outputs the count stop signal Cs and the transfer command signal RO to the counter 6, and also outputs the count stop signal Cs and the transfer command signal RO to the counter 6.
The calculation start signal Scd and character signal Sch are output to the input signal 2. Upon receiving the transfer command signal Ro, the value of the rotational position pulse number ΔP1, which is the count result, is transferred to the memory 73 via the data bus 8.

(処理150) 演算ブロック72はメモリ73から回転位置パルス数Δ
Pl、メモリ76から定数PPR,Iの値を読出し、サ
ブプログラム制御ブロック71からのキャラクタ信号S
chに応じて、式1(1)を演算して、現在位:rLF
を求める。
(Processing 150) The calculation block 72 calculates the rotational position pulse number Δ from the memory 73.
Pl, reads the value of the constant PPR,I from the memory 76, and reads the character signal S from the subprogram control block 71.
According to the channel, calculate the equation 1 (1) and calculate the current position: rLF
seek.

(処理160) 演算結果Pはメモリ7Bへ書込まれるとともに、書込み
終了を示す演算終了信号Scdがサブプログラム制御ブ
ロック71へ出力されて現在位置検出動作が終了し、制
御が主プログラムブロックに戻される。
(Process 160) The calculation result P is written to the memory 7B, and a calculation end signal Scd indicating the end of writing is output to the subprogram control block 71, the current position detection operation is completed, and control is returned to the main program block. .

第5図は、第1図においてサーボモータlを高速回転で
駆動し、極〈短時間で現在位置を検出するときに、カウ
ンタ停止信号Csが出力されてから現在位置Pの演算が
終了するまでの間の行き過ぎ量を補償する、本発明の他
の実施例の動作を示すフローチャートである。
Figure 5 shows the period from when the counter stop signal Cs is output until the calculation of the current position P is completed when the servo motor l is driven at high speed rotation in Figure 1 to detect the current position in a very short time. 3 is a flowchart illustrating the operation of another embodiment of the present invention to compensate for overshoots between.

処理100から150は第4図と同じであるので説明を
省略する。
Processes 100 to 150 are the same as those in FIG. 4, so their explanation will be omitted.

(処理170) サブブムグラム制御ブロック71はカウント停止信号C
3、転送指令信号Roに続いてリセット信号Rtを出力
してカウンタ6をリセットする。
(Processing 170) The subbumgram control block 71 outputs the count stop signal C.
3. Following the transfer command signal Ro, a reset signal Rt is output to reset the counter 6.

(処理180) サブプログラム制御ブロック71は再びカウント開始信
号C8をカウンタ6に出力し、カウンタ6は回転位置パ
ルスPadをカウントする。
(Process 180) The subprogram control block 71 again outputs the count start signal C8 to the counter 6, and the counter 6 counts the rotational position pulse Pad.

(処理180) 演算ブロック72から演算終了信号5calがサブプロ
グラム制御ブロック71に出力されたかが確認される。
(Process 180) It is checked whether the calculation end signal 5cal has been output from the calculation block 72 to the subprogram control block 71.

処理170におけるカウンタ6のカウント動作はこの演
算終了信号Scdが出力されるまで行なわれる。
The counting operation of the counter 6 in process 170 is performed until this computation end signal Scd is output.

(処理200) 演算終了信号5canが出力されると、サブプログラム
制御ブロック71はカウンタ6にカウント停止信号Cs
を、次に転送指令信号ROを出力する。
(Process 200) When the calculation end signal 5can is output, the subprogram control block 71 sends a count stop signal Cs to the counter 6.
, and then outputs a transfer command signal RO.

この結果、カウンタ6によってカウントされた回転位置
パルス数Padがデータバス8を通してマイクロコンピ
ュータ7のメモリ74に転送される。
As a result, the number of rotational position pulses Pad counted by the counter 6 is transferred to the memory 74 of the microcomputer 7 through the data bus 8.

(処理21O) 処理150で求めた現在位置Pの補正が処理200で求
めた回転位置パルス数Padによって1式(2)に従っ
て演算ブロック72で行なわれる。
(Process 21O) The current position P obtained in process 150 is corrected by the rotational position pulse number Pad obtained in process 200 in accordance with equation 1 (2) in calculation block 72.

(処理220) 補正された現在位置の値Prがメモリ76へ書込まれる
(Process 220) The corrected current position value Pr is written to the memory 76.

第3図は変速機構2が送りネジ5のサーボモータ1とは
反対側の端部に設けられた実施例で、既存の装置の改造
に便利である。
FIG. 3 shows an embodiment in which the transmission mechanism 2 is provided at the end of the feed screw 5 on the opposite side from the servo motor 1, which is convenient for remodeling an existing device.

本実施例の変速機構2は歯車で構成されているが、径の
異なるローラや、ベルト(タイミングベルト)とプーリ
で構成してもよい。また、マーカ信号Piの発生手段と
しては、静電式や光学式のリミットスイッチでもよく、
さらに変速機構の従動軸にパルスジェネレータを取付け
て、これら原点パルスを第2のマーカ信号として利用し
てもよい。
Although the transmission mechanism 2 of this embodiment is composed of gears, it may also be composed of rollers with different diameters, a belt (timing belt), and pulleys. Furthermore, as the means for generating the marker signal Pi, an electrostatic or optical limit switch may be used.
Furthermore, a pulse generator may be attached to the driven shaft of the transmission mechanism, and these origin pulses may be used as the second marker signal.

本実施例の変速機構は変速比は1に近く、1ではないが
、これは、例えば変速比が3に近く、3ではないもので
も、スリットを3個にする等して従動軸の1回転につき
3個、等間隔にパルス信号が出力されるようにしても同
じである。
In the transmission mechanism of this embodiment, the transmission ratio is close to 1, but not 1, but even if the transmission ratio is close to 3, but not 3, it is possible to make one revolution of the driven shaft by using three slits, etc. The same result can be obtained even if three pulse signals are outputted at equal intervals.

〔発明の効果〕〔Effect of the invention〕

本発明は以上説明したように、主検出器(パルスジェネ
レータ)と変速比が異なりサーポモータ軸を駆動軸とす
る変速機構を設け、この変速機構の従動軸に伴ない(第
2のマーカ信号)を出力する副検出器を取付は主検出器
の原点パルス(第1のマーカ信号)と第2のマーカ信号
の出力間隔を主検出器の回転位置パルスをカウントする
ことにより求めて当該第1のマーカ信号が主検出器の何
回転口の第1のマーカ信号かを判別して、主検出器の最
大2回転で現在位置を求め、原点復帰動作が完了するよ
うにしたものであるので、原点復帰動作の時間が大幅に
短縮されて機械の実働率が向上し、かつ大きな原点復帰
動作がないので作業の安定性が確保される。
As explained above, the present invention provides a speed change mechanism with a different speed ratio from the main detector (pulse generator) and uses the servo motor shaft as the drive shaft, and a (second marker signal) is provided along with the driven shaft of this speed change mechanism. To install the output sub-detector, calculate the output interval between the main detector's origin pulse (first marker signal) and the second marker signal by counting the rotational position pulses of the main detector, and then attach the output to the first marker. The system determines which rotation of the main detector the signal is the first marker signal, determines the current position after a maximum of two rotations of the main detector, and completes the return-to-origin operation. The operation time is significantly shortened, improving the actual operating rate of the machine, and since there is no large return-to-origin operation, work stability is ensured.

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

第1図は本発明による現在位ご検出装置の一実施例を示
すブロック図、第2図、第3図は第1図のサーボモータ
1、パルスジェネレータ3、変速機構2.非接触式リミ
ー7トスイッチ4を一部断面で示す図、第4図、第5図
は第1図の現在位置検出装置における現在位置検出の流
れを示すフローチャート、第6図は回転位置パルス、第
1.第2のマーカ信号の関係を示すタイムチャート、第
7図は数値制御される機械の従来例を示す図である。 1:サーボモータ、   2:変速機構。 3:パルスジェネレータ、 4:非接触式リミットスイッチ、 6:カウンタ 7:マイクロコンピュータ、 8:データバス、   9:制御器、 70:信号指令判別ブロック。 71;サブプログラム制御ブロック、 72:演算ブロック、 73.74,75.76  :メモリ、Pi、Ps  
:マーカ信号、 ΔPi :回転位置パルス、 St :開始/停止信号、 C3:カウント開始/停止信号、 Rt :リセット信号、 Ro:転送指令信号、5ca
f:演算開始/終了信号、 Sch:キャラクタ信号。 第3図 第4図 第5図 第6図 第7図
FIG. 1 is a block diagram showing an embodiment of the current position detecting device according to the present invention, and FIGS. 2 and 3 show the servo motor 1, pulse generator 3, transmission mechanism 2, and the like shown in FIG. A partial cross-sectional view of the non-contact limit switch 4, FIGS. 4 and 5 are flowcharts showing the flow of current position detection in the current position detection device of FIG. 1, and FIG. 1st. FIG. 7 is a time chart showing the relationship between the second marker signals, and is a diagram showing a conventional example of a numerically controlled machine. 1: Servo motor, 2: Speed change mechanism. 3: Pulse generator, 4: Non-contact limit switch, 6: Counter 7: Microcomputer, 8: Data bus, 9: Controller, 70: Signal command discrimination block. 71; Subprogram control block, 72: Arithmetic block, 73.74, 75.76: Memory, Pi, Ps
: marker signal, ΔPi : rotational position pulse, St : start/stop signal, C3: count start/stop signal, Rt : reset signal, Ro: transfer command signal, 5ca
f: calculation start/end signal, Sch: character signal. Figure 3 Figure 4 Figure 5 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】 1)数値制御される機械の駆動軸の現在位置検出方法で
あって、 現在位置検出開始指令によってサーボモータを一定方向
に回転させる段階と、 一方のマーカ信号が発生してから他方のマーカ信号が発
生するまでの間、サーボモータの回転に応じた回転位置
パルス数をカウンタがカウントする段階と、 カウントされた回転位置パルス数をカウンタからメモリ
へ転送する段階と、 主検出器の1回転当りの回転位置パルスの総数、両マー
カ信号の位相差に相当する回転位置パルス数である単位
変分パルス数、主検出器の変速比、前記メモリに格納さ
れている回転位置パルス数、最初に発生したマーカ信号
の種別そして両マーカ信号の位相差により現在位置を演
算する段階とからなることを特徴とする現在位置検出方
法。 2)数値制御される機械の駆動軸の現在位置を検出する
方法であって、 現在位置検出開始指令によってサーボモータを一定方向
に回転させる段階と、 一方のマーカ信号が発生してから他方のマーカ信号が発
生するまでの間、サーボモータの回転に応じた回転位置
パルス数をカウンタがカウントする段階と、 カウントされた回転位置パルス数をカウンタから第1の
メモリへ転送する段階と、 主検出器の1回転当りの回転位置パルスの総数、両マー
カ信号の位相差に相当する回転位置パルス数である単位
変分パルス数、主検出器の変速比、第1のメモリに格納
されている回転位置パルス数、最初に発生したマーカ信
号の種別そして両マーカ信号の位相差により現在位置を
演算する段階と、 カウントされた回転位置パルスを第1のメモリへ転送す
る段階と現在位置を演算する段階と並行して行なわれ、
カウンタをリセットし前記の現在位置の演算が終了する
までの間、回転位置パルス数をカウントし、このカウン
トされた補正用回転位置パルス数を第2のメモリへ転送
する段階と、現在位置の演算終了後、この現在位置のデ
ータに前記補正用回転位置パルス数を加算または減算し
て現在位置のデータを補正する段階とからなることを特
徴とする現在位置検出方法。 3)数値制御される機械の駆動軸の現在位置を検出する
ための現在位置検出装置であって、 サーボモータ軸に連結されて、第1のマーカ信号を発生
し、回転位置パルスをインクリメンタルに発生する手段
と、 サーボモータ軸を駆動軸とする変速機構と、前記変速機
構の従動軸の回転に伴なって第2のマーカ信号を発生す
る手段と、 前記回転位置パルス数をカウントするカウンタと、 前記カウンタのカウント結果である回転位置パルス数が
格納される第1のメモリと、 前記第1のマーカ信号または第2のマーカ信号が発生し
たときに第1の制御信号を出力し、後続する前記第2の
マーカ信号または第1のマーカ信号が発生したときに第
2の制御信号を出力する信号指令判別ブロックと、 前記第一のマーカ信号を発生する手段の1回転当りの前
記回転位置パルスの総数、前記第1および第2のマーカ
信号の位相差に相当する回転位置パルス数である単位変
分パルス、前記第1のメモリに格納されている回転位置
パルス数、最初に発生したマーカ信号の種別を示すキャ
ラクタ信号および第1、第2のマーカ信号の位相差によ
り現在位置を演算する演算手段と、 前記信号指令判別ブロックから力された前記第1の制御
信号によって前記カウンタにカウント動作を開始させ、
前記第2の制御信号によって前記カウンタのカウント動
作を停止させるカウンタ制御信号、前記カウンタのカウ
ント結果を前記第1のメモリに転送する転送指令信号、
前記転送指令信号の出力に続いて前記演算手段に演算を
開始させるための演算開始指令信号および前記キャラク
タ信号を出力し、前記演算手段の演算が終了したときに
前記演算手段から演算終了信号を入力する制御手段とを
有することを特徴とする現在位置検出装置。
[Claims] 1) A method for detecting the current position of a drive shaft of a numerically controlled machine, which comprises: rotating a servo motor in a fixed direction in response to a current position detection start command; and generating one marker signal. to the generation of the other marker signal, a stage in which the counter counts the number of rotational position pulses according to the rotation of the servo motor, a stage in which the counted number of rotational position pulses is transferred from the counter to the memory, and a stage in which the main detection The total number of rotational position pulses per one rotation of the device, the unit variation pulse number which is the number of rotational position pulses corresponding to the phase difference between both marker signals, the gear ratio of the main detector, and the rotational position pulses stored in the memory. 1. A method for detecting a current position, comprising the step of calculating the current position based on the number, the type of marker signal generated first, and the phase difference between both marker signals. 2) A method for detecting the current position of a drive shaft of a numerically controlled machine, which includes the steps of rotating a servo motor in a fixed direction in response to a current position detection start command, and the steps of rotating a servo motor in a fixed direction after one marker signal is generated and then detecting the other marker signal. Until the signal is generated, the counter counts the number of rotational position pulses according to the rotation of the servo motor, the stage of transferring the counted number of rotational position pulses from the counter to the first memory, and the main detector. The total number of rotational position pulses per rotation of , the unit variational pulse number which is the number of rotational position pulses corresponding to the phase difference between both marker signals, the gear ratio of the main detector, and the rotational position stored in the first memory. A step of calculating the current position based on the number of pulses, the type of marker signal generated first, and the phase difference between both marker signals, a step of transferring the counted rotational position pulses to the first memory, and a step of calculating the current position. carried out in parallel,
A step of counting the number of rotational position pulses until the counter is reset and the calculation of the current position is completed, and transferring the counted number of rotational position pulses for correction to a second memory, and a step of calculating the current position. A current position detection method comprising the step of correcting the current position data by adding or subtracting the number of rotational position pulses for correction to the current position data after completion of the process. 3) A current position detection device for detecting the current position of a drive shaft of a numerically controlled machine, which is connected to a servo motor shaft and generates a first marker signal and incrementally generates rotational position pulses. a transmission mechanism having a servo motor shaft as a driving shaft; means for generating a second marker signal in accordance with rotation of a driven shaft of the transmission mechanism; a counter for counting the number of rotational position pulses; a first memory in which a number of rotational position pulses, which is a count result of the counter, is stored; and a first memory that outputs a first control signal when the first marker signal or the second marker signal is generated; a signal command discrimination block that outputs a second control signal when a second marker signal or a first marker signal is generated; the total number, the unit variation pulse which is the number of rotational position pulses corresponding to the phase difference between the first and second marker signals, the number of rotational position pulses stored in the first memory, and the number of first generated marker signals. a calculation means for calculating the current position based on a character signal indicating the type and a phase difference between the first and second marker signals; and a calculation means for starting a counting operation in the counter based on the first control signal inputted from the signal command discrimination block. let me,
a counter control signal that causes the counter to stop counting according to the second control signal; a transfer command signal that transfers the count result of the counter to the first memory;
Following the output of the transfer command signal, outputting a calculation start command signal and the character signal for causing the calculation means to start calculation, and inputting a calculation end signal from the calculation means when the calculation of the calculation means is completed. What is claimed is: 1. A current position detection device comprising: a control means for controlling a current position;
JP21357784A 1984-10-12 1984-10-12 Method and apparatus for detecting present position Pending JPS6191510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21357784A JPS6191510A (en) 1984-10-12 1984-10-12 Method and apparatus for detecting present position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21357784A JPS6191510A (en) 1984-10-12 1984-10-12 Method and apparatus for detecting present position

Publications (1)

Publication Number Publication Date
JPS6191510A true JPS6191510A (en) 1986-05-09

Family

ID=16641505

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21357784A Pending JPS6191510A (en) 1984-10-12 1984-10-12 Method and apparatus for detecting present position

Country Status (1)

Country Link
JP (1) JPS6191510A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63286705A (en) * 1987-05-20 1988-11-24 Mitsubishi Heavy Ind Ltd Position detecting method for robot
WO2014007039A1 (en) * 2012-07-03 2014-01-09 トヨタ車体株式会社 Rotational position detection device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63286705A (en) * 1987-05-20 1988-11-24 Mitsubishi Heavy Ind Ltd Position detecting method for robot
WO2014007039A1 (en) * 2012-07-03 2014-01-09 トヨタ車体株式会社 Rotational position detection device

Similar Documents

Publication Publication Date Title
JPH11129176A (en) Calibration method using sensor
US4580085A (en) Feed control system with a safety device
JPS6191510A (en) Method and apparatus for detecting present position
JPH08339212A (en) Method for return to absolute origin in industrial controller
US4266170A (en) Safety arrangement for NC systems
JP4280051B2 (en) Origin return method and control program in positioning system
KR940000366B1 (en) Detecting method of robot location
JP2703096B2 (en) Teaching method of robot system with conveyor
JP2819411B2 (en) Fixed position stop control device
JPH0639066B2 (en) Control method for industrial robot
JPS5866121A (en) Deviation phase modulator for numerical controlling device
JP3433817B2 (en) Feed control device
JPS61224005A (en) Numerically controlled machine tool
JPS6294245A (en) Device for returning to starting point for numerically controlled machine tool
JPS61224004A (en) Numerically controlled machine tool
JP2579172B2 (en) Motor stop control method for sewing machine
JPH02237743A (en) Main spindle control system of numerical controller
KR820002167B1 (en) Spindle control system
JP3013998B2 (en) Rotary axis zero return method in numerical controller
JPH0436807A (en) Numerical controller containing backlash correcting function
JPS61221802A (en) Searching system for original point of robot arm
JPS63132724A (en) Straightening method for rack part by automatic bend straightening press device of rack shaft
JPS6171947A (en) Positioning control device
JPS6290705A (en) Controlling system for numerical controller
JPH0675004U (en) Numerical control device with double check function of machine origin