JP2007120970A - Apparatus and method for position measurement - Google Patents
Apparatus and method for position measurement Download PDFInfo
- Publication number
- JP2007120970A JP2007120970A JP2005309746A JP2005309746A JP2007120970A JP 2007120970 A JP2007120970 A JP 2007120970A JP 2005309746 A JP2005309746 A JP 2005309746A JP 2005309746 A JP2005309746 A JP 2005309746A JP 2007120970 A JP2007120970 A JP 2007120970A
- Authority
- JP
- Japan
- Prior art keywords
- signal
- count value
- bit counter
- phase signal
- level
- 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.)
- Granted
Links
Images
Landscapes
- Ink Jet (AREA)
- Handling Of Cut Paper (AREA)
- Character Spaces And Line Spaces In Printers (AREA)
- Optical Transform (AREA)
- Controlling Sheets Or Webs (AREA)
Abstract
Description
本発明は、位置計測装置及び位置計測方法に関する。 The present invention relates to a position measuring device and a position measuring method.
従来、制御対象の制御量を検出するために、例えば、リニアエンコーダ又はロータリーエンコーダ等が用いられている。 Conventionally, for example, a linear encoder or a rotary encoder is used in order to detect a control amount to be controlled.
このようなエンコーダのうち、例えば、ロータリーエンコーダの分解能を向上させる方法としては、特許文献1に示すような技術が開示されている。
制御対象の動作速度が速くなると、エンコーダから出力される信号に基づいて正しくカウントを行うことができなくなるおそれがある。また、カウントが行えなくなる事態が重なると、検出誤差が累積するおそれもある。 If the operation speed of the control target is increased, there is a possibility that the count cannot be performed correctly based on the signal output from the encoder. In addition, if the situation in which counting cannot be performed overlaps, detection errors may accumulate.
そこで、本発明は、制御対象の動作速度が速くなっても、エンコーダの出力に基づいて正しくカウント可能な位置計測装置を提供することを目的とする。 Accordingly, an object of the present invention is to provide a position measuring apparatus that can correctly count based on the output of an encoder even when the operation speed of a control target increases.
上記目的を達成するための主たる発明は、(1)スリットと検出器とを有し、第1信号、第2信号、第3信号及び第4信号を、前記検出器に対する前記スリットの位置に応じてそれぞれ出力するエンコーダと、(2)前記第1信号及び前記第3信号に基づいて第1カウント値をインクリメント又はデクリメントして出力する第1カウンタと、(3)前記第1カウント値が更新されたときに、前記第1カウンタから出力される前記第1カウント値に基づいて第1情報が設定され、前記エンコーダから出力される第1信号、第2信号、第3信号及び第4信号に基づいて前記スリットと前記検出器との位置関係に応じた第2情報が設定され、設定された前記第1情報及び前記第2情報からなる第2カウント値を、前記第2信号及び前記第4信号に基づいてインクリメント又はデクリメントして出力する
第2カウンタと、を備えることを特徴とする。
The main invention for achieving the above object is (1) having a slit and a detector, wherein the first signal, the second signal, the third signal, and the fourth signal are set according to the position of the slit with respect to the detector. (2) a first counter that increments or decrements a first count value based on the first signal and the third signal, and (3) the first count value is updated. First information is set based on the first count value output from the first counter, and based on the first signal, the second signal, the third signal, and the fourth signal output from the encoder. Second information corresponding to the positional relationship between the slit and the detector is set, and the second count value including the set first information and the second information is set as the second signal and the fourth signal. Based on There characterized in that it comprises a second counter and outputting the incremented or decremented, the by.
本発明の他の特徴については、本明細書及び添付図面の記載により明らかにする。 Other features of the present invention will become apparent from the description of the present specification and the accompanying drawings.
本明細書及び添付図面の記載により、少なくとも、以下の事項が明らかとなる。 At least the following matters will become clear from the description of the present specification and the accompanying drawings.
(1)スリットと検出器とを有し、第1信号、第2信号、第3信号及び第4信号を、前記検出器に対する前記スリットの位置に応じてそれぞれ出力するエンコーダと、
(2)前記第1信号及び前記第3信号に基づいて第1カウント値をインクリメント又はデクリメントして出力する第1カウンタと、
(3)前記第1カウント値が更新されたときに、前記第1カウンタから出力される前記第1カウント値に基づいて第1情報が設定され、前記エンコーダから出力される第1信号、第2信号、第3信号及び第4信号に基づいて前記スリットと前記検出器との位置関係に応じた第2情報が設定され、
設定された前記第1情報及び前記第2情報からなる第2カウント値を、前記第2信号及び前記第4信号に基づいてインクリメント又はデクリメントして出力する
第2カウンタと、
を備える位置計測装置。
(1) an encoder that has a slit and a detector, and outputs a first signal, a second signal, a third signal, and a fourth signal according to the position of the slit with respect to the detector;
(2) a first counter that increments or decrements and outputs a first count value based on the first signal and the third signal;
(3) When the first count value is updated, first information is set based on the first count value output from the first counter, and the first signal output from the encoder, second Second information corresponding to the positional relationship between the slit and the detector is set based on the signal, the third signal, and the fourth signal,
A second counter that increments or decrements and outputs a second count value composed of the set first information and the second information based on the second signal and the fourth signal;
A position measuring device comprising:
このような位置計測装置によれば、正しいカウント値を出力できる。 According to such a position measuring apparatus, a correct count value can be output.
また、前記第1信号、前記第2信号、前記第3信号、前記第4信号の順に、位相がずれていることが望ましい。これにより、第1カウンタのカウント値を正しい値に保つことができる。 In addition, it is desirable that the phases are shifted in order of the first signal, the second signal, the third signal, and the fourth signal. Thereby, the count value of the first counter can be kept at a correct value.
また、前記第1情報に基づいて、前記第2カウント値の上位の桁の値が決定され、前記第2情報に基づいて、前記第2カウント値の下位の桁の値が決定されることが望ましい。これにより、第2カウント値の整合性を保つことができる。前記第2情報に基づいて、前記第2カウント値の最下位ビットが決定されることが望ましい。これにより、制御対象が双方向のいずれの方向に相対位置変化しても、第2カウント値の整合性を保つことができる。 Further, the value of the upper digit of the second count value is determined based on the first information, and the value of the lower digit of the second count value is determined based on the second information. desirable. Thereby, the consistency of the second count value can be maintained. Preferably, the least significant bit of the second count value is determined based on the second information. As a result, the consistency of the second count value can be maintained even if the relative position of the controlled object changes in either direction.
また、前記第1カウンタの前記第1カウント値は、任意の値に設定可能であることが望ましい。また、前記スリットと前記検出器との相対的な位置が変化していないときに、前記第1カウンタの前記第1カウント値が任意の値に設定されることが好ましい。これにより、制御対象が停止中であっても、第2カウント値を設定できる。 Further, it is desirable that the first count value of the first counter can be set to an arbitrary value. Moreover, it is preferable that the first count value of the first counter is set to an arbitrary value when the relative position between the slit and the detector is not changed. Thereby, even if the controlled object is stopped, the second count value can be set.
また、前記エンコーダは、ロータリー式であることが望ましい。これにより、回転運動を行う制御対象の位置変化量を正確に検出できる。また、前記エンコーダは、リニア式であることが望ましい。これにより、直線運動を行う制御対象の位置変化量を正確に検出できる。 The encoder is preferably a rotary type. Accordingly, it is possible to accurately detect the position change amount of the control object that performs the rotational motion. The encoder is preferably a linear type. This makes it possible to accurately detect the amount of change in position of the control target that performs linear motion.
(1)スリットと検出器とを用いて、第1信号、第2信号、第3信号及び第4信号を、前記検出器に対する前記スリットの位置に応じてそれぞれ出力するステップと、
(2)前記第1信号及び前記第3信号に基づいて第1カウント値をインクリメント又はデクリメントして出力するステップと、
(3)前記第1カウント値が更新されたときに、前記第1カウント値に基づいて第1情報を設定し、前記第1信号、第2信号、第3信号及び第4信号に基づいて前記スリットと前記検出器との位置関係に応じた第2情報を設定し
設定された前記第1情報及び前記第2情報からなる第2カウント値を、前記第2信号及び前記第4信号に基づいてインクリメント又はデクリメントして出力するステップと、
を有する位置計測方法。
(1) Using the slit and the detector, outputting each of the first signal, the second signal, the third signal, and the fourth signal according to the position of the slit with respect to the detector;
(2) a step of incrementing or decrementing a first count value based on the first signal and the third signal and outputting the first count value;
(3) When the first count value is updated, first information is set based on the first count value, and based on the first signal, the second signal, the third signal, and the fourth signal, Based on the second signal and the fourth signal, the second information is set according to the positional relationship between the slit and the detector, and the set second count value including the first information and the second information is set. Incrementing or decrementing and outputting;
A position measurement method.
このような位置計測装置によれば、正しいカウント値を出力できる。 According to such a position measuring apparatus, a correct count value can be output.
===印刷システムの構成===
まず、位置計測装置であるエンコーダの説明を行なう前に、エンコーダを備えるプリンタとコンピュータとを有する印刷システムについて、図面を参照しながら説明する。なお、以下の実施形態の記載には、コンピュータプログラム、及び、コンピュータプログラムを記録した記録媒体等に関する実施形態も含まれている。
=== Configuration of Printing System ===
First, before describing an encoder that is a position measuring device, a printing system including a printer including a encoder and a computer will be described with reference to the drawings. Note that the description of the following embodiments includes embodiments relating to a computer program and a recording medium on which the computer program is recorded.
図1は、印刷システムの外観構成を示した説明図である。この印刷システム100は、プリンタ1と、コンピュータ110と、表示装置120と、入力装置130と、記録再生装置140とを備えている。プリンタ1は、紙、布、フィルム等の媒体に画像を印刷する印刷装置である。コンピュータ110は、プリンタ1と通信可能に接続されており、プリンタ1に画像を印刷させるため、印刷させる画像に応じた印刷データをプリンタ1に出力する。
FIG. 1 is an explanatory diagram showing an external configuration of a printing system. The
コンピュータ110にはプリンタドライバがインストールされている。プリンタドライバは、表示装置120にユーザインタフェースを表示させ、アプリケーションプログラムから出力された画像データを印刷データに変換させるためのプログラムである。このプリンタドライバは、フレキシブルディスクFDやCD−ROMなどの記録媒体(コンピュータ読み取り可能な記録媒体)に記録されている。または、このプリンタドライバは、インターネットを介してコンピュータ110にダウンロードすることも可能である。なお、このプログラムは、各種の機能を実現するためのコードから構成されている。
A printer driver is installed in the
なお、「印刷装置」とは、媒体に画像を印刷する装置を意味し、例えばプリンタ1が該当する。また、「印刷制御装置」とは、印刷装置を制御する装置を意味し、例えば、プリンタドライバをインストールしたコンピュータが該当する。また、「印刷システム」とは、少なくとも印刷装置及び印刷制御装置を含むシステムを意味する。
The “printing apparatus” means an apparatus that prints an image on a medium, and corresponds to the
===プリンタの構成===
<インクジェットプリンタの構成について>
図2は、プリンタ1の全体構成のブロック図である。また、図3Aは、プリンタ1の全体構成の概略図である。また、図3Bは、プリンタ1の全体構成の横断面図である。以下、本実施形態のプリンタの基本的な構成について説明する。
=== Configuration of Printer ===
<Inkjet printer configuration>
FIG. 2 is a block diagram of the overall configuration of the
本実施形態のプリンタ1は、搬送ユニット20、キャリッジユニット30、ヘッドユニット40、検出器群50、及びコントローラ60を有する。外部装置であるコンピュータ110から印刷データを受信したプリンタ1は、コントローラ60によって各ユニット(搬送ユニット20、キャリッジユニット30、ヘッドユニット40)を制御する。コントローラ60は、コンピュータ110から受信した印刷データに基づいて、各ユニットを制御し、紙に画像を印刷する。プリンタ1内の状況は検出器群50によって監視されており、検出器群50は、検出結果をコントローラ60に出力する。コントローラ60は、検出器群50から出力された検出結果に基づいて、各ユニットを制御する。
The
搬送ユニット20は、媒体(例えば、紙Sなど)を所定の方向(以下、搬送方向という)に搬送させるためのものである。この搬送ユニット20は、給紙ローラ21と、搬送モータ22(PFモータとも言う)と、搬送ローラ23と、プラテン24と、排紙ローラ25とを有する。給紙ローラ21は、紙挿入口に挿入された紙をプリンタ内に給紙するためのローラである。搬送ローラ23は、給紙ローラ21によって給紙された紙Sを印刷可能な領域まで搬送するローラであり、搬送モータ22によって駆動される。プラテン24は、印刷中の紙Sを支持する。排紙ローラ25は、紙Sをプリンタの外部に排出するローラであり、印刷可能な領域に対して搬送方向下流側に設けられている。
The
キャリッジユニット30は、ヘッドを所定の方向(以下、移動方向という)に移動(「走査」とも呼ばれる)させるためのものである。キャリッジユニット30は、キャリッジ31と、キャリッジモータ32(CRモータとも言う)とを有する。キャリッジ31は、移動方向に往復移動可能であり、キャリッジモータ32によって駆動される。また、キャリッジ31は、インクを収容するインクカートリッジを着脱可能に保持している。
The
ヘッドユニット40は、紙にインクを吐出するためのものである。ヘッドユニット40は、複数のノズルを有するヘッド41を備える。このヘッド41はキャリッジ31に設けられているため、キャリッジ31が移動方向に移動すると、ヘッド41も移動方向に移動する。そして、ヘッド41が移動方向に移動中にインクを断続的に吐出することによって、移動方向に沿ったドットライン(ラスタライン)が紙に形成される。
The
検出器群50には、リニアエンコーダ51、ロータリーエンコーダ52、紙検出センサ53、および光学センサ54等が含まれる。リニアエンコーダ51は、キャリッジ31の移動方向の位置を検出する。ロータリーエンコーダ52は、搬送ローラ23の回転量を検出する。紙検出センサ53は、給紙中の紙の先端の位置を検出する。光学センサ54は、キャリッジ31に取付けられている発光部と受光部により、紙の有無を検出する。そして、光学センサ54は、キャリッジ31によって移動しながら紙の端部の位置を検出し、紙の幅を検出することができる。また、光学センサ54は、状況に応じて、紙の先端(搬送方向下流側の端部であり、上端ともいう)・後端(搬送方向上流側の端部であり、下端ともいう)も検出できる。
The
コントローラ60は、プリンタの制御を行うための制御ユニット(制御部)である。コントローラ60は、インターフェース部61と、CPU62と、メモリ63と、ユニット制御回路64とを有する。インターフェース部61は、外部装置であるコンピュータ110とプリンタ1との間でデータの送受信を行う。CPU62は、プリンタ全体の制御を行うための演算処理装置である。メモリ63は、CPU62のプログラムを格納する領域や作業領域等を確保するためのものであり、RAM、EEPROM等の記憶素子を有する。CPU62は、メモリ63に格納されているプログラムに従って、ユニット制御回路64を介して各ユニットを制御する。例えば、CPU62は、目標搬送量をユニット制御回路64へ指令し、この指令に基づいてユニット制御回路64は搬送ユニット20の搬送モータ22を駆動する。
The
印刷を行うとき、プリンタ1は、移動方向に沿って移動するヘッドからインクを断続的に吐出させ、紙上にドットを形成するドット形成処理と、紙を搬送方向に搬送する搬送処理と、を交互に繰り返す。
When performing printing, the
<搬送ユニットの構成について>
図4は、搬送ユニット20の構成の説明図である。
<Conveyor unit configuration>
FIG. 4 is an explanatory diagram of the configuration of the
搬送ユニット20は、コントローラ60からの搬送指令に基づいて、所定の駆動量にて搬送モータ22を駆動させる。搬送モータ22は、指令された駆動量に応じて回転方向の駆動力を発生する。搬送モータ22は、この駆動力を用いて搬送ローラ23を回転させる。つまり、搬送モータ22が所定の駆動量を発生すると、搬送ローラ23は所定の回転量にて回転する。搬送ローラ23が所定の回転量にて回転すると、紙は所定の搬送量にて搬送される。
The
紙の搬送量は、搬送ローラ23の回転量に応じて定まる。本実施形態では、搬送ローラ23が1回転すると、紙が1インチ搬送されるものとする。このため、搬送ローラ23が1/4回転すると、紙は1/4インチ搬送されることになる。
The carry amount of the paper is determined according to the rotation amount of the
したがって、搬送ローラ23の回転量が検出できれば、紙の搬送量も検出可能である。そこで、搬送ローラ23の回転量を検出するため、ロータリーエンコーダ52が設けられている。
Therefore, if the rotation amount of the
===ロータリーエンコーダ===
<2相ロータリーエンコーダと位置計測について(参考例)>
図5は、2相ロータリーエンコーダの構成の説明図である。ロータリーエンコーダ52は、スケール521と検出部522とを有する。
=== Rotary encoder ===
<About 2-phase rotary encoder and position measurement (reference example)>
FIG. 5 is an explanatory diagram of the configuration of the two-phase rotary encoder. The
スケール521は、所定の間隔毎に設けられた多数のスリットを有する。このスケール521は、搬送ローラ23に設けられている。つまり、スケール521は、搬送ローラ23が回転すると、一緒に回転する。そして、搬送ローラ23が回転すると、スケール521の各スリットが検出部522を順次通過する。
The
検出部522は、スケール521と対向して設けられており、プリンタ本体側に固定されている。検出部522は、発光ダイオード522Aと、コリメータレンズ522Bと、検出処理部522Cとを有しており、検出処理部522Cは、複数(例えば、4個)のフォトダイオード522Dと、信号処理回路522Eと、2個のコンパレータ522Fa、522Fbとを備えている。
The
発光ダイオード522Aは、両端の抵抗を介して電圧Vccが印加されると光を発し、この光はコリメータレンズに入射される。コリメータレンズ522Bは、発光ダイオード522Aから発せられた光を平行光とし、スケール521に平行光を照射する。スケールに設けられたスリットを通過した平行光は、固定スリット(不図示)を通過して、各フォトダイオード522Dに入射する。フォトダイオード522Dは、入射した光を電気信号に変換する。各フォトダイオードから出力される電気信号は、コンパレータ522Fa、522Fbにおいて比較され、比較結果がパルスとして出力される。そして、コンパレータ522Faから出力されるA相信号(パルスENC−A)、及びコンパレータ522Fbから出力される及びB相信号(パルスENC−B)が、ロータリーエンコーダ52の出力となる。
The
図6Aは、搬送モータ22が正転しているときの出力信号の波形のタイミングチャートである。図6Bは、搬送モータ22が反転しているときの出力信号の波形のタイミングチャートである。
FIG. 6A is a timing chart of the waveform of the output signal when the
A相信号及びB相信号は、搬送モータ22の回転に応じて、L(ロー)レベル又はH(ハイ)レベルの信号に切り替わる。搬送モータ22の正転時及び反転時のいずれの場合であっても、A相信号がLレベルからHレベルに変化してから、次にA相信号がLレベルからHレベルに変化するまでの間に、スリット1つ分だけ搬送ローラ23が回転する。ここでは、A相信号がLレベルからHレベルに変化してから、次にA相信号がLレベルからHレベルに変化するまでの間に、搬送ローラ23が1/180回転し、紙が1/180インチ搬送されることになる。また、搬送モータ22の正転時及び反転時のいずれの場合であっても、A相信号がHレベルからLレベルに変化してから、次にA相信号がHレベルからLレベルに変化するまでの間に、スリット1つ分だけ搬送ローラ23が回転する。B相信号もA相信号と同様である。
The A phase signal and the B phase signal are switched to an L (low) level signal or an H (high) level signal according to the rotation of the
図に示された通り、搬送モータ22の正転時及び反転時のいずれの場合であっても、A相信号とB相信号は、位相がほぼ90度ずれている。搬送モータ22が正転しているとき、すなわち、紙Sが搬送方向に搬送されているときは、A相信号は、B相信号よりもほぼ90度だけ位相が進んでいる。一方、搬送モータ22が反転しているとき、すなわち、紙Sが搬送方向とは逆方向に搬送されているときは、A相信号は、B相信号よりもほぼ90度だけ位相が遅れている。
As shown in the figure, the phase of the A-phase signal and the B-phase signal are shifted by approximately 90 degrees regardless of whether the
なお、同じ信号の同じ変化点間(例えばA相信号がLレベルからHレベルに変化してから、次にA相信号がLレベルからHレベルに変化するまでの間)では、スリット1つ分だけ搬送ローラ23が回転していることが保障されている。しかし、異なる信号の変化点間(例えばA相信号がLレベルからHレベルに変化してから、次にB相信号がLレベルからHレベルに変化するまでの間)では、搬送ローラ23の回転量は厳密には保障されていない。つまり、A相信号とB相信号の位相のずれは、正確な90度に保障されているわけではない(若干の誤差があるかも知れない)。
Note that between the same change points of the same signal (for example, after the A-phase signal changes from the L level to the H level and then the A-phase signal changes from the L level to the H level), it corresponds to one slit. It is guaranteed that the conveying
A相信号及びB相信号に基づいて、搬送ローラ23が正転しているのか、反転しているのかが判別可能である。
Based on the A-phase signal and the B-phase signal, it can be determined whether the
図7は、正転及び反転の判別の説明図である。判別の基準時は、A相信号又はB相信号が変化したときである。 FIG. 7 is an explanatory diagram of forward rotation and inversion discrimination. The reference time is when the A phase signal or the B phase signal changes.
例えば、(1)A相信号がL(ロー)レベルからH(ハイ)レベルに変化したときに、B相信号がLレベルの場合、(2)B相信号がLレベルからHレベルに変化したときに、A相信号がHレベルの場合、(3)A相信号がHレベルからLレベルに変化したときに、B相信号がHレベルの場合、(4)B相信号がHレベルからLレベルに変化したときに、A相信号がLレベルの場合、いずれの場合も搬送ローラ23が正転していると判別される。
For example, (1) when the A phase signal changes from L (low) level to H (high) level and the B phase signal is L level, (2) the B phase signal changes from L level to H level When the A phase signal is at the H level, (3) When the A phase signal changes from the H level to the L level, and when the B phase signal is at the H level, (4) the B phase signal is changed from the H level to the L level. If the A-phase signal is at the L level when the level is changed, it is determined that the
また、例えば、(5)B相信号がLレベルからHレベルに変化したときに、A相信号がLレベルの場合、(6)A相信号がLレベルからHレベルに変化したときに、B相信号がHレベルの場合、(7)B相信号がHレベルからLレベルに変化したときに、A相信号がHレベルの場合、(8)A相信号がHレベルからLレベルに変化したときに、B相信号がLレベルの場合、いずれの場合も搬送ローラ23が反転していると判別される。
Also, for example, (5) when the B phase signal changes from L level to H level, and when the A phase signal is L level, (6) when the A phase signal changes from L level to H level, When the phase signal is H level, (7) When the B phase signal changes from H level to L level, when the A phase signal is H level, (8) The A phase signal changes from H level to L level When the B phase signal is at the L level, it is determined that the
そこで、A相信号又はB相信号が変化したときに、上記(1)〜(4)に対応する場合にはカウンタのカウント値をインクリメントし、上記(5)〜(8)に対応する場合にはカウンタのカウント値をデクリメントすれば、コントローラ60は、カウント値に基づいて、搬送ローラ23の回転位置を検出できる。
Therefore, when the A-phase signal or the B-phase signal changes, the count value of the counter is incremented when corresponding to the above (1) to (4), and when corresponding to the above (5) to (8). If the counter value is decremented, the
図8は、カウント値の説明図である。 FIG. 8 is an explanatory diagram of the count value.
カウント値が0の状態においてA相信号がLレベルからHレベルに変化したとき、B相信号はLレベルなので上記(1)の通り正転していると判別され、カウント値が0から1にインクリメントされる。次に、カウント値が1の状態においてB相信号がLレベルからHレベルに変化したとき、A相信号はHレベルなので上記(2)の通り正転していると判別され、カウント値が1から2にインクリメントされる。このように、上記(1)〜(4)に対応する場合にはカウント値がインクリメントされて、図中ではカウント値が5までインクリメントされている。 When the A phase signal changes from the L level to the H level in the state where the count value is 0, the B phase signal is at the L level, so that it is determined as normal rotation as in (1) above, and the count value is changed from 0 to 1 Incremented. Next, when the B phase signal changes from the L level to the H level in the state where the count value is 1, since the A phase signal is at the H level, it is determined that the rotation is normal as in (2) above, and the count value is 1. Is incremented from 2. Thus, the count value is incremented in cases corresponding to the above (1) to (4), and the count value is incremented to 5 in the figure.
また、カウント値が5の状態においてA相信号がHレベルからLレベルに変化したとき、B相信号はLレベルなので上記(8)の通り反転していると判別され、カウント値が5から4にデクリメントされる。次に、カウント値が4の状態においてB相信号がLレベルからHレベルに変化したとき、A相信号はLレベルなので上記(5)の通り反転していると判別され、カウント値が4から3にデクリメントされる。このように、上記(5)〜(8)に対応する場合にはカウント値がデクリメントされて、図中ではカウント値が2までデクリメントされている。 Further, when the A-phase signal changes from the H level to the L level in the state where the count value is 5, since the B-phase signal is at the L level, it is determined that the signal is inverted as described in (8) above. Will be decremented. Next, when the B-phase signal changes from the L level to the H level in the state where the count value is 4, since the A-phase signal is at the L level, it is determined that the signal is inverted as described in (5) above. Decremented to 3. Thus, the count value is decremented when it corresponds to the above (5) to (8), and the count value is decremented to 2 in the figure.
このように、A相信号又はB相信号が変化したときに、上記(1)〜(4)に対応する場合にはカウンタのカウント値をインクリメントし、上記(5)〜(8)に対応する場合にはカウンタのカウント値をデクリメントすれば、カウンタのカウント値は搬送ローラ23の回転位置を示す値になる。
As described above, when the A-phase signal or the B-phase signal is changed, the count value of the counter is incremented in the case of corresponding to the above (1) to (4), and corresponding to the above (5) to (8). In this case, if the count value of the counter is decremented, the count value of the counter becomes a value indicating the rotational position of the
<4相ロータリーエンコーダについて>
図9は、4相ロータリーエンコーダの構成の説明図である。前述の2相ロータリーエンコーダと同様に、4相ロータリーエンコーダはスケール521と検出部522を有する。ここでは検出部522の構成の説明は省略するが、検出部522からはA相信号、B相信号、C相信号及びD相信号が出力される。
<About the 4-phase rotary encoder>
FIG. 9 is an explanatory diagram of a configuration of a four-phase rotary encoder. Similar to the above-described two-phase rotary encoder, the four-phase rotary encoder includes a
図10は、正転時のA相信号〜D相信号と、カウンタのカウント値のタイミングチャートである。正転時において、A相信号はB相信号よりも45度だけ位相が進んでおり、B相信号はC相信号よりも45度だけ位相が進んでおり、C相信号はD相信号よりも45度だけ位相が進んでおり、D相信号はA相信号よりも45度だけ位相が進んでいる。このようなA相信号〜D相信号を4相ロータリーエンコーダは出力する。 FIG. 10 is a timing chart of the A-phase signal to D-phase signal and the count value of the counter during normal rotation. During forward rotation, the phase of the A phase signal is 45 degrees ahead of the phase B signal, the phase of the B phase signal is 45 degrees ahead of the phase C signal, and the phase C signal is ahead of the phase D signal. The phase is advanced by 45 degrees, and the phase of the D phase signal is advanced by 45 degrees relative to the phase A signal. The 4-phase rotary encoder outputs such A-phase signal to D-phase signal.
<4相ロータリーエンコーダによる参考例の位置計測について>
参考例では、カウンタは、2相の場合とほぼ同様な方法により、A相信号〜D相信号のいずれかの信号が変化するタイミングで単にカウント値をインクリメントする。すなわち、(1)A相信号がLレベルからHレベルに変化したときに、B相信号(又はC相信号やD相信号)がLレベルの場合、(2)B相信号がLレベルからHレベルに変化したときに、A相信号がHレベル(又はC相信号やD相信号がLレベル)の場合、(3)C相信号がLレベルからHレベルに変化したときに、D相信号がLレベル(又はA相信号やB相信号がHレベル)の場合、(4)D相信号がLレベルからHレベルに変化したときに、C相信号(又はA相信号やB相信号)がHレベルの場合、(5)A相信号がHレベルからLレベルに変化したときに、B相信号(又はC相信号やD相信号)がHレベルの場合、(6)B相信号がHレベルからLレベルに変化したときに、A相信号がLレベル(又はC相信号やD相信号がHレベル)の場合、(7)C相信号がHレベルからLレベルに変化したときに、D相信号がHレベル(又はA相信号やB相信号がLレベル)の場合、(8)D相信号がLレベルからHレベルに変化したときに、C相信号(又はA相信号やB相信号)がLレベルの場合、いずれかの場合にカウンタはカウント値をインクリメントする。
<Regarding the position measurement of a reference example using a 4-phase rotary encoder>
In the reference example, the counter simply increments the count value at the timing when any one of the A-phase signal to the D-phase signal is changed by the same method as in the case of two phases. That is, (1) when the B phase signal (or C phase signal or D phase signal) is at the L level when the A phase signal changes from the L level to the H level, (2) the B phase signal is changed from the L level to the H level. If the A phase signal is at the H level (or the C phase signal or the D phase signal is at the L level) when the level is changed, (3) the D phase signal is changed when the C phase signal is changed from the L level to the H level. Is L level (or A phase signal or B phase signal is H level), (4) C phase signal (or A phase signal or B phase signal) when D phase signal changes from L level to H level (5) When the A phase signal changes from the H level to the L level and the B phase signal (or C phase signal or D phase signal) is at the H level, (6) The B phase signal is When changing from H level to L level, A phase signal is L level (or C phase signal and D phase signal are H level. In the case of (7) when the C phase signal changes from H level to L level and the D phase signal is H level (or the A phase signal or B phase signal is L level), (8) the D phase signal is When the C-phase signal (or the A-phase signal or the B-phase signal) is at the L level when changing from the L level to the H level, the counter increments the count value in either case.
なお、説明は省略するが、参考例のカウンタは、2相の場合とほぼ同様な方法により、A相信号〜D相信号のいずれかの信号が変化するタイミングで単にカウント値をデクリメントもする。
このようなカウンタのカウント値でも搬送ローラ23の回転位置を示す値になる。
Although the description is omitted, the counter of the reference example simply decrements the count value at the timing when any one of the A-phase signal to the D-phase signal is changed by a method almost the same as in the case of two phases.
Even the count value of such a counter is a value indicating the rotational position of the
<参考例の位置計測の問題点>
2相ロータリーエンコーダは、4相ロータリーエンコーダと比べて、分解能が低くなるという問題がある。一方、参考例のカウンタでは、以下の問題がある。
<Problems of position measurement in the reference example>
The two-phase rotary encoder has a problem that the resolution is lower than that of the four-phase rotary encoder. On the other hand, the counter of the reference example has the following problems.
各相信号が変化する部分(各相信号のLレベルからHレベルへの立ち上がり部分及びHレベルからLレベルへの立ち下がり部分、(以下、「エッジ」とも称する))は、搬送ローラ23の回転速度が速くなると、各相信号のエッジが近接する。そして、エッジが近接しすぎると、A相信号に対するB相信号の遅延や、回路の遅延などによって、カウント値を正しくインクリメント又はデクリメントできないことがある。例えば、搬送ローラ23の回転速度が速い場合、A相信号がLレベルからHレベルに変化した直後にB相信号がLレベルからHレベルに変化するため、B相信号の変化をカウンタが検出できなくなるおそれがある。さらに、カウント値のインクリメント又はデクリメントができない事態が重なると、検出誤差が累積してしまうという問題が生じる。
The portion where each phase signal changes (the rising portion of each phase signal from L level to H level and the falling portion from H level to L level (hereinafter also referred to as “edge”)) is the rotation of the
===第1実施形態の位置計測===
<位置計測部の構成について>
図11は、第1実施形態の位置計測部70の構成の説明図である。この位置計測部70は、コントローラ60のユニット制御回路64(図2参照)に設けられている。この位置計測部70は、ロータリーエンコーダ52のA相信号〜D相信号に基づいて、搬送ローラ23の回転位置を示すカウント値を出力するものである。なお、位置計測部70の出力するカウント値はユニット制御回路64の搬送モータドライバ(不図示)に出力され、搬送モータドライバは位置計測部70のカウント値に応じて搬送モータ22を制御する。この位置計測部70は、第一回転方向判定回路71と、第二回転方向判定回路72と、スリット位置判定回路73と、32ビットカウンタ74と、33ビットカウンタ75とを有する。
=== Position Measurement in First Embodiment ===
<About the configuration of the position measurement unit>
FIG. 11 is an explanatory diagram of a configuration of the
第一回転方向判定回路71は、ロータリーエンコーダ52のA相信号とC相信号とに基づいて、搬送ローラ23が正転しているのか、反転しているのかを判別し、正転していればパルス信号であるACU信号を出力し、反転していればパルス信号であるACD信号を出力する。なお、以下に説明する通り、第一回転方向判定回路71は、A相信号又はC相信号が変化するタイミングでACU信号又はACD信号を出力する。
図12は、第一回転方向判定回路71の判定結果と出力信号の説明図である。(1)A相信号がL(ロー)レベルからH(ハイ)レベルに変化したときに、C相信号がLレベルの場合、(2)C相信号がLレベルからHレベルに変化したときに、A相信号がHレベルの場合、(3)A相信号がHレベルからLレベルに変化したときに、C相信号がHレベルの場合、(4)C相信号がHレベルからLレベルに変化したときに、A相信号がLレベルの場合、いずれの場合も搬送ローラ23が正転していると判別される。このため、第一回転方向判定回路71は、このような場合にパルス信号であるACU信号を出力する。
また、(5)C相信号がLレベルからHレベルに変化したときに、A相信号がLレベルの場合、(6)A相信号がLレベルからHレベルに変化したときに、C相信号がHレベルの場合、(7)C相信号がHレベルからLレベルに変化したときに、A相信号がHレベルの場合、(8)A相信号がHレベルからLレベルに変化したときに、C相信号がLレベルの場合、いずれの場合も搬送ローラ23が反転していると判別される。このため、第一回転方向判定回路71は、このような場合にパルス信号であるACD信号を出力する。
Based on the A phase signal and the C phase signal of the
FIG. 12 is an explanatory diagram of determination results and output signals of the first rotation
Further, (5) when the C phase signal changes from L level to H level, when the A phase signal is L level, (6) when the A phase signal changes from L level to H level, Is H level, (7) when the C phase signal is changed from H level to L level, and when the A phase signal is H level, (8) when the A phase signal is changed from H level to L level. When the C-phase signal is at the L level, it is determined that the
第二回転方向判定回路72は、ロータリーエンコーダ52のB相信号とD相信号とに基づいて、搬送ローラ23が正転しているのか、反転しているのかを判別し、正転していればパルス信号であるBDU信号を出力し、反転していればパルス信号であるBDD信号を出力する。
図13は、第二回転方向判定回路72の判定結果と出力信号の説明図である。前述の第一回転方向判定回路とほぼ同様なので説明を省略するが、第二回転方向判定回路72は、このようにBDU信号とBDD信号を出力する。第二回転方向判定回路72は、B相信号又はD相信号が変化するタイミングでBDU信号又はBDD信号を出力する。
Based on the B-phase signal and D-phase signal of the
FIG. 13 is an explanatory diagram of the determination result of the second rotation
スリット位置判定回路73は、ロータリーエンコーダ52のA相信号〜D相信号に基づいて、検出部522に対するスケール521のスリットの位置を判別し、OE信号を出力する。
The slit
図14は、スリット位置判定回路73の判定結果とOE信号の説明図である。以下、図10も参照しながら説明を行なう。
あるスリットが検出部522に対して特定位置にあるときにA相信号〜D相信号が全てLレベルだとすると、隣のスリットが検出部522に対して特定位置になりA相信号〜D相信号が全てLレベルになるまでの間(スリット1つ分だけ搬送ローラ23が回転する間)に、A相信号〜D相信号は8通りに変化する。言い換えると、A相信号〜D相信号は、検出部522に対するスケール521のスリットの位置を8段階で示している。
FIG. 14 is an explanatory diagram of the determination result of the slit
If the A phase signal to the D phase signal are all at the L level when a certain slit is at a specific position with respect to the
そして、図10のカウント値が理想的な値を示していると仮定するならば、A相信号とB相信号が同じレベルで且つC相信号とD相信号が同じレベルのとき、正転時・反転時に関わらず、カウント値は奇数であるべきである。逆に言えば、カウント値が奇数であるべきならば、正転時・反転時に関わらず、A相信号とB相信号が同じレベルで且つC相信号とD相信号が同じレベルのはずである。同様に、図10のカウント値が理想的な値を示していると仮定するならば、A相信号とB相信号が異なるレベル又はC相信号とD相信号が異なるレベルのとき、正転時・反転時に関わらず、カウント値は偶数であるべきである。逆に言えば、カウント値が偶数であるべきならば、正転時・反転時に関わらず、A相信号とB相信号が異なるレベル又はC相信号とD相信号が異なるレベルのはずである。 If it is assumed that the count value in FIG. 10 shows an ideal value, when the A phase signal and the B phase signal are at the same level and the C phase signal and the D phase signal are at the same level, • The count value should be odd regardless of the inversion. In other words, if the count value should be an odd number, the A phase signal and the B phase signal should be at the same level and the C phase signal and the D phase signal should be at the same level regardless of whether it is forward rotation or inversion. . Similarly, assuming that the count value in FIG. 10 shows an ideal value, when the A phase signal and the B phase signal are at different levels or when the C phase signal and the D phase signal are at different levels, during forward rotation • The count value should be even, regardless of the inversion. Conversely, if the count value should be an even number, the A-phase signal and the B-phase signal should be at different levels or the C-phase signal and the D-phase signal should be at different levels regardless of whether the count value is normal or inverted.
そこで、スリット位置判定回路73は、図14に示すように、8通りのA相信号〜D相信号の組み合わせに応じて、検出部522に対してスリットが偶数位置にあるか奇数位置にあるかを示すOE信号を出力する。例えば、A相信号〜D相信号のすべてがLレベルのときのように検出部522に対してスリットが奇数位置にある場合、スリット位置判定回路73はHレベルのOE信号を出力する。一方、A相信号だけHレベルでB相信号〜D相信号がLレベルのときのように検出部522に対してスリットが偶数位置にある場合、スリット位置判定回路73はLレベルのOE信号を出力する。なお、後述するが、OE信号がLレベルならば位置計測部70のカウント値(33ビットカウンタ75のカウンタ値)は偶数になり、OE信号がHレベルならば位置計測部70のカウント値は奇数になる。
Therefore, as shown in FIG. 14, the slit
32ビットカウンタ74は、ACU信号が入力されたときにカウント値をインクリメントし、ACD信号が入力されたときにカウント値をデクリメントするカウンタである。これにより、32ビットカウンタ74のカウント値は、前述の2相ロータリーエンコーダのカウンタのカウント値と同様になる。
The 32-
また、32ビットカウンタ74のカウント値は、CPU62により任意の値に書き換えることができる。この場合、CPU62は、CE信号及びアドレス信号によって32ビットカウンタ74を選択し、WR信号によって書き込みを指示しながらデータ信号を供給し、32ビットカウンタ74のカウント値を書き換える。
Further, the count value of the 32-
そして、32ビットカウンタ74は、32ビットのカウント値を出力する。また、32ビットカウンタ74は、カウント値が更新されたとき、すなわちACU信号又はACD信号が入力されたときやCPU62からWR信号が入力されたとき、33ビットカウンタへWR信号を出力する。
The 32-
33ビットカウンタ75は、33ビットのカウント値を出力するカウンタである。この33ビットカウンタ75には、32ビットカウンタ74から32ビットのカウント値とWR信号が入力され、第二回転方向判定回路72からBDU信号とBDD信号が入力され、スリット位置判定回路73からOE信号が入力される。そして、33ビットカウンタ75は、BDU信号が入力されたとき33ビットのカウント値をインクリメントし、BDD信号が入力されたとき33ビットのカウント値をデクリメントする。また、33ビットカウンタ75は、32ビットカウンタ74からWR信号が入力されたとき、32ビットのカウント値とOE信号とに基づいて33ビットのカウント値を更新する。
The 33-
図15は、WR信号が入力されたときの33ビットのカウント値の更新の説明図である。図中の四角印は、カウント値を示すためのレジスタである。
33ビットカウンタ75にWR信号が入力されたとき、33ビットのカウンタ値の上位32ビットを示すレジスタに、32ビットカウンタ74からの32ビットのカウント値が設定される。言い換えると、WR信号が入力されたとき、32ビットカウンタ74の32ビットのカウント値が、1ビットだけ桁をシフトして、33ビットカウンタ75のレジスタに格納される。
FIG. 15 is an explanatory diagram of updating the 33-bit count value when the WR signal is input. The square marks in the figure are registers for indicating count values.
When the WR signal is input to the 33-
また、33ビットカウンタ75にWR信号が入力されたとき、33ビットのカウンタ値の最下位ビットを示すレジスタに、OE信号に応じた値が設定される。OE信号がLレベルの場合、このレジスタに0が設定され、OE信号がHレベルの場合、このレジスタに1が設定される。
When the WR signal is input to the 33-
つまり、OE信号がLレベルのときに33ビットカウンタ75にWR信号が入力すると、32ビットカウンタ74のカウント値の2倍の値が、33ビットカウンタ75のカウント値になる。また、OE信号がHレベルのときに33ビットカウンタ75にWR信号が入力すると、32ビットカウンタ74のカウント値の2倍の値に1を加算した値が、33ビットカウンタ75のカウント値になる。
That is, when the WR signal is input to the 33-
<位置計測部の動作1>
図16は、位置計測部の各信号のタイミングチャートである。以下、図11も参照しながら説明を行なう。なお、ここではCPU62が32ビットカウンタ74に初期値として0を設定したとき、A相信号〜D相信号はいずれもLレベルであるものとする。
<
FIG. 16 is a timing chart of each signal of the position measurement unit. Hereinafter, description will be made with reference to FIG. Here, it is assumed that when the
まず、CPU62が32ビットカウンタのカウント値に0を書き込むと、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力される。これにより、33ビットカウンタのカウント値の上位32ビットは全て0に設定される。一方、このときのA相信号〜D相信号はいずれもLレベルなので、スリット位置判定回路73から33ビットカウンタへHレベルのOE信号が出力される。これにより、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力されたとき、すなわち33ビットカウンタのカウント値の上位32ビットが設定されたとき、33ビットカウンタ75のカウント値の最下位ビットが1に設定される。この結果、33ビットカウンタ75のカウント値は1になる。
First, when the
なお、CPU62が32ビットカウンタのカウント値に0を書き込んだとき、搬送ローラ23が停止中であっても、搬送ローラ23が正転中又は反転中であっても、速やかに33ビットカウンタ75のカウント値が1に設定される。すなわち、CPU62が32ビットカウンタのカウント値に0を書き込んだ後、A相信号〜D相信号が変化しなくても、33ビットカウンタ75のカウント値が1に設定される。
When the
搬送ローラ23が正転すると、まずA相信号がLレベルからHレベルに変化する。これにより、第一回転方向判定回路71から32ビットカウンタ74へACU信号が出力され、32ビットカウンタ74のカウント値が1にインクリメントされる。32ビットカウンタ74のカウント値がインクリメントされると、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力され、32ビットカウンタ74のカウント値が1桁シフトして33ビットカウンタ75のレジスタに格納される。一方、このときA相信号だけがHレベルでB相信号〜D相信号はLレベルなので、スリット位置判定回路73から33ビットカウンタ75へLレベルのOE信号が出力される。これにより、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力されたとき、33ビットカウンタ75の最下位ビットが0に設定される。この結果、33ビットカウンタ75のカウント値は2になる。
When the
さらに搬送ローラ23が正転すると、B相信号がLレベルからHレベルに変化する。これにより、第二回転方向判定回路72から33ビットカウンタ75へBDU信号が出力され、33ビットカウンタ75のカウント値がインクリメントされる。この結果、33ビットカウンタ75のカウント値は3になる。
When the
さらに搬送ローラ23の正転が続くと、C相信号がLレベルからHレベルに変化する。これにより、第一回転方向判定回路71から32ビットカウンタ74へACU信号が出力され、32ビットカウンタ74のカウント値が2にインクリメントされる。32ビットカウンタ74のカウント値がインクリメントされると、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力され、32ビットカウンタ74のカウント値が1桁シフトして33ビットカウンタ75のレジスタに格納される。一方、このときD相信号だけがLレベルでA相信号〜C相信号はHレベルなので、スリット位置判定回路73から33ビットカウンタ75へLレベルのOE信号が出力される。これにより、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力されたとき、33ビットカウンタ75の最下位ビットが0に設定される。この結果、33ビットカウンタ75のカウント値は4になる。
When the forward rotation of the
以上のような動作によって、搬送ローラ23が正転を続けたときの33ビットカウンタ75のカウント値が設定される。
By the operation as described above, the count value of the 33-
次に、搬送ローラ23が途中で反転したときについて説明する。ここでは、33ビットカウンタのカウント値が17のとき(図中の時刻T1のとき)、搬送ローラ23が正転から反転に回転方向を変化させているものとする。なお、このときのA相信号〜D相信号はいずれもLレベルであり、32ビットカウンタのカウント値は8である。
Next, the case where the
反転後、まずD相信号がLレベルからHレベルに変化する。これにより、第二回転方向判定回路72から32ビットカウンタ74へBDD信号が出力され、33ビットカウンタ75のカウント値がデクリメントされる。この結果、33ビットカウンタ75のカウント値は16になる。
After inversion, the D-phase signal first changes from L level to H level. As a result, the BDD signal is output from the second rotation
さらに搬送ローラ23の反転が続くと、C相信号がLレベルからHレベルに変化する。これにより、第一回転方向反転回路71から32ビットカウンタ74へACD信号が出力され、32ビットカウンタ74のカウント値が7にデクリメントされる。32ビットカウンタ74のカウント値がデクリメントされると、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力され、32ビットカウンタ74のカウント値が1桁シフトして33ビットカウンタ75のレジスタに格納される。一方、このときA相信号及びB相信号はLレベルでありC相信号とD相信号はHレベルなので、スリット位置判定回路73から33ビットカウンタ75へHレベルのOE信号が出力される。これにより、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力されたとき、33ビットカウンタ75の最下位ビットが1に設定される。この結果、33ビットカウンタ75のカウント値は15になる。
When the
このような動作によって、搬送ローラ23が反転を続けたときの33ビットカウンタ75のカウント値が設定される。
By such an operation, the count value of the 33-
次に、搬送ローラ23が反転から正転に戻ったときについて説明する。ここでは、33ビットカウンタのカウント値が13のとき(図中の時刻T2のとき)、搬送ローラ23が反転から正転に回転方向を変化させているものとする。なお、このときのA相信号〜D相信号はいずれもHレベルであり、32ビットカウンタのカウント値は6である。
Next, the case where the
搬送ローラ23の回転方向が正転に戻った後、まずA相信号がHレベルからLレベルに変化する。これにより、第一回転方向判定回路71から32ビットカウンタ74へACU信号が出力され、32ビットカウンタ74のカウント値が7にインクリメントされる。32ビットカウンタ74のカウント値がインクリメントされると、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力され、32ビットカウンタ74のカウント値が1桁シフトして33ビットカウンタ75のレジスタに格納される。一方、このときA相信号だけがLレベルでB相信号〜D相信号はHレベルなので、スリット位置判定回路73から33ビットカウンタ75へLレベルのOE信号が出力される。これにより、32ビットカウンタ74から33ビットカウンタ75へWR信号が出力されたとき、33ビットカウンタ75の最下位ビットが0に設定される。この結果、33ビットカウンタ75のカウント値は14になる。
After the rotation direction of the
さらに搬送ローラ23が正転すると、B相信号がHレベルからLレベルに変化する。これにより、第二回転方向判定回路72から33ビットカウンタ75へBDU信号が出力され、33ビットカウンタ75のカウント値がインクリメントされる。この結果、33ビットカウンタ75のカウント値は15になる。
When the
このような動作によって、搬送ローラ23が反転から正転に戻った後の33ビットカウンタ75のカウント値が設定される。
By such an operation, the count value of the 33-
<位置計測部の動作2>
次に、エッジが近接して33ビットカウンタ75のカウント値がインクリメント又はデクリメントできない場合について説明する。
<
Next, a case where the edge is close and the count value of the 33-
図17は、位置計測部の各信号のタイミングチャートである。以下、図11も参照しながら説明を行なう。なお、前述の図16の場合と同様に、ここではCPU62が32ビットカウンタ74に初期値として0を設定したとき、A相信号〜D相信号はいずれもLレベルであるものとする。
FIG. 17 is a timing chart of each signal of the position measurement unit. Hereinafter, description will be made with reference to FIG. As in the case of FIG. 16 described above, when the
33ビットカウンタ75のカウント値が9になるまでの間、搬送ローラ23は一定の回転速度で正転を続けている。この間の33ビットカウンタ75のカウント値の設定は既に説明した通りである。このため、33ビットカウンタ75のカウント値が9になるまでの説明は省略し、その後の動作について説明する。
Until the count value of the 33-
33ビットカウンタ75のカウント値が9になった後、搬送ローラ23の回転速度が徐々に速くなっている。この結果、各相信号のエッジが近接してくる。例えば、D相信号がHレベルからLレベルに変化してからA相信号がLレベルからHレベルに変化するまでの時間が近接している。なお、特にB相信号がLレベルからHレベルに変化してからC相信号がLレベルからHレベルに変化するまでの時間が近接している(図17のB相信号とC相信号の矢印の付されたエッジを参照)。
After the count value of the 33-
このように各相信号のエッジが近接してくると、ACU信号の出力のタイミングと、BDU信号の出力のタイミングとが近接してくる。特に、図17のB相信号とC相信号の矢印の付されたエッジが近接しているため、このときのBDU信号の出力のタイミングとACU信号の出力のタイミングとが近接している。そして、もしA相信号に対するB相信号の遅延や、第二回転方向判定回路72などの回路の遅延などがあると、BDU信号の出力のタイミングと、ACU信号に基づく32ビットカウンタのWR信号の出力のタイミングとがほぼ同時になるおそれがある。
When the edges of the respective phase signals come close to each other in this way, the output timing of the ACU signal and the output timing of the BDU signal come close to each other. In particular, since the edges of the B-phase signal and the C-phase signal indicated by arrows in FIG. 17 are close to each other, the output timing of the BDU signal and the output timing of the ACU signal are close to each other. If there is a delay of the B phase signal with respect to the A phase signal, a delay of the circuit such as the second rotation
ところで、ACU信号が出力されると、これに応じて32ビットカウンタ74のカウント値がインクリメントされて、33ビットカウンタ75にWR信号が入力されて、32ビットカウンタのカウント値に応じたカウント値が33ビットカウンタ75に設定される。また、BDU信号が出力されると、これに応じて33ビットカウンタ75のカウント値がインクリメントされる。
By the way, when the ACU signal is output, the count value of the 32-
このため、ACU信号の出力のタイミングと、BDU信号の出力のタイミングとが近接してくると、33ビットカウンタの更新のタイミングが速くなる。つまり、搬送ローラ23の回転速度が速くなると、32ビットカウンタのカウント値に基づく33ビットカウンタ75のカウント値の設定から、BDU信号に基づく33ビットカウンタ75のカウント値のインクリメントまでの時間が短くなる。そして、回路の遅延があると、32ビットカウンタ74のカウント値に基づく33ビットカウンタ75のカウント値の設定から、BDU信号に基づく33ビットカウンタ75のカウント値のインクリメントまでの時間がほとんどなくなる。このような事態になると、33ビットカウンタ75のカウント値をインクリメント又はデクリメントできなるおそれがある。例えば、図17の33ビットのカウント値の矢印の付された部分において、33ビットカウンタ75のカウント値が正しく11にならないおそれがある。
For this reason, when the output timing of the ACU signal comes close to the output timing of the BDU signal, the update timing of the 33-bit counter is accelerated. That is, when the rotation speed of the
但し、本実施形態において、32ビットカウンタ74は、位相が90度ずれているA相信号及びC相信号に基づくACU信号によって、カウント値をインクリメントしている。すなわち、32ビットカウンタ74は、45度よりも大きく位相のずれた信号に基づいて、カウント値をインクリメントしている。このため、たとえ搬送ローラ23の回転速度が速くなったとしても、32ビットカウンタ74は正確に動作する。つまり、32ビットカウンタのカウント値は、分解能が低いものの、搬送ローラ23の回転位置を正確に示す値になっている。
However, in this embodiment, the 32-
このため、図17の33ビットのカウント値の矢印の付された部分において、たとえ33ビットカウンタ75のカウント値が11にならなかったとしても、32ビットカウンタ74のカウント値は正しい値になっている。このため、32ビットカウンタ74のカウント値が6にインクリメントされると、このカウント値が1桁シフトして33ビットカウンタ75のレジスタに格納されるとともに、LレベルのOE信号に応じて33ビットカウンタ75の最下位ビットが0に設定され、この結果、33ビットカウンタ75のカウント値は再び正確な値である12を示すことになる。つまり、このとき33ビットカウンタ75のカウント値が正しい値に復活する。
Therefore, even if the count value of the 33-
===第2実施形態の位置計測===
前述の実施形態では、ロータリーエンコーダ52は4相信号を出力している。しかし、これに限られるものではない。例えば、ロータリーエンコーダ52が8相信号を出力しても良い。
=== Position Measurement in Second Embodiment ===
In the above-described embodiment, the
<8相ロータリーエンコーダについて>
図18は、正転時のA相信号〜H相信号のタイミングチャートである。正転時において、例えばA相信号はB相信号よりも22.5度だけ位相が進んでいる。このように22.5度ずつ位相のずれたA相信号〜H相信号をロータリーエンコーダ52は出力している。
<About 8-phase rotary encoder>
FIG. 18 is a timing chart of the A-phase signal to the H-phase signal during normal rotation. At the time of forward rotation, for example, the phase of the A phase signal is advanced by 22.5 degrees relative to the B phase signal. Thus, the
<位置計測部の構成について>
図19は、第2実施形態の位置計測部170の構成の説明図である。この位置計測部170は、第一回転方向判定回路171と、第二回転方向判定回路172と、第一スリット位置判定回路173と、32ビットカウンタ174と、33ビットカウンタ175と、第三回転方向判定回路176と、第二スリット位置判定回路177と、34ビットカウンタ178とを有する。
<About the configuration of the position measurement unit>
FIG. 19 is an explanatory diagram of a configuration of the
第2実施形態の第一回転方向判定回路171、第二回転方向判定回路172、第一スリット位置判定回路173、32ビットカウンタ174及び33ビットカウンタ175は、第1実施形態の第一回転方向判定回路71、第二回転方向判定回路72、スリット位置判定回路73、32ビットカウンタ74及び33ビットカウンタ75と同様の構成及び接続関係である。このため、これらの説明は省略する。なお、33ビットカウンタ175は、33ビットのカウント値を34ビットカウンタ178へ出力する。また、33ビットカウンタ175は、カウント値が更新されたとき、すなわちCGU信号又はCGD信号が入力されたときや32ビットカウンタ174からWR信号が入力されたとき、34ビットカウンタへWR信号を出力する。
The first rotation
第三回転方向判定回路176は、ロータリーエンコーダ52のB相信号、D相信号、F相信号及びH相信号に基づいて、搬送ローラ23が正転しているのか、反転しているのかを判別し、正転していればパルス信号であるBDFHU信号を出力し、反転していればパルス信号であるBDFHD信号を出力する。第三回転方向判定回路176による正転及び反転の判別方法については説明を省略するが、第三回転方向判定回路176は、B相信号、D相信号、F相信号及びH相信号のいずれかの信号が変化するたびにBDFHU信号又はBDFHD信号を出力する。このため、第三回転方向判定回路176の出力は、第一回転方向判定回路171や第二回転方向判定回路172の出力よりも2倍の分解能になる。
The third rotation
第二スリット位置判定回路177は、ロータリーエンコーダ52のA相信号〜H相信号に基づいて、検出部522に対するスケール521のスリットの位置を判別し、OE2信号を出力する。この第二スリット位置判定回路177は、16通りのA相信号〜H相信号の組み合わせに応じて、検出部522に対してスリットが偶数位置にあるか奇数位置にあるかを示すOE2信号を出力する。
The second slit
34ビットカウンタ178は、34ビットのカウント値を出力するカウンタである。この34ビットカウンタ178には、33ビットカウンタ175から33ビットのカウント値とWR信号が入力され、第三回転方向判定回路176からBDFHU信号とBDFHD信号が入力され、第二スリット位置判定回路177からOE2信号が入力される。そして、34ビットカウンタ178は、BDFHU信号が入力されたときに34ビットのカウント値をインクリメントし、BDFHD信号が入力されたときに34ビットのカウント値をデクリメントする。また、34ビットカウンタ178は、33ビットカウンタ175からWR信号が入力されたときに33ビットのカウント値とOE信号とに基づいて33ビットのカウント値を更新する。
The 34-
34ビットカウンタ178にWR信号が入力されたとき、34ビットのカウンタ値の上位33ビットを示すレジスタに、33ビットカウンタ175からの33ビットのカウント値が設定される。言い換えると、WR信号が入力されたとき、33ビットカウンタ175の33ビットのカウント値が、1ビットだけ桁をシフトして、34ビットカウンタ178のレジスタに格納される。
When the WR signal is input to the 34-
また、34ビットカウンタ178にWR信号が入力されたとき、34ビットのカウンタ値の最下位ビットを示すレジスタに、OE2信号に応じた値が設定される。OE2信号がLレベルの場合、このレジスタに0が設定され、OE2信号がHレベルの場合、このレジスタに1が設定される。
When the WR signal is input to the 34-
つまり、OE2信号がLレベルのときに34ビットカウンタ178にWR信号が入力すると、33ビットカウンタ175のカウント値の2倍の値が、34ビットカウンタ178のカウント値になる。また、OE2信号がHレベルのときに34ビットカウンタ178にWR信号が入力すると、33ビットカウンタ175のカウント値の2倍の値に1を加算した値が、34ビットカウンタ178のカウント値になる。
That is, when the WR signal is input to the 34-
この位置計測部170の動作については説明を省略するが、前述の第1実施形態と同様の効果を当然奏することができる。
Although description of the operation of the
===第3実施形態の位置計測===
前述の第1実施形態では、スリット位置判定回路73は、1ビットのデータを示すOE信号を出力する。また、前述の第2実施形態の第一スリット位置判定回路173や第二スリット位置判定回路177も、1ビットのデータを示すOE1信号やOE2信号を出力する。つまり、前述のスリット位置判定回路は、1ビット信号を出力している。そして、この1ビット信号に基づいて、カウンタ(33ビットカウンタ75、33ビットカウンタ175、34ビットカウンタ178)の最下位ビットが決定されている。しかし、これに限られるものではない。例えば、スリット位置判定回路から2ビット信号が出力され、この2ビット信号に基づいてカウンタの下位2ビットが決定されても良い。
=== Position Measurement of Third Embodiment ===
In the first embodiment described above, the slit
図20は、第3実施形態の位置計測部270の構成の説明図である。この位置計測部270は、第一回転方向判定回路271と、第二回転方向判定回路272と、スリット位置判定回路273と、32ビットカウンタ274と、34ビットカウンタ278とを有する。
FIG. 20 is an explanatory diagram of a configuration of the position measurement unit 270 of the third embodiment. The position measurement unit 270 includes a first rotation
第3実施形態の第一回転方向判定回路271及び32ビットカウンタ274は、第1実施形態の第一回転方向判定回路71及び32ビットカウンタ74と同様の構成及び接続関係である。このため、これらの説明は省略する。
The first rotation
第二回転方向判定回路272は、ロータリーエンコーダ52のB相信号〜D相信号及びF相信号〜H相信号に基づいて、搬送ローラ23が正転しているのか、反転しているのかを判別し、正転していればパルス信号であるBCDFGHU信号を出力し、反転していればパルス信号であるBCDFGHD信号を出力する。第二回転方向判定回路272による正転及び反転の判別方法については説明を省略するが、第二回転方向判定回路272は、B相信号〜D相信号及びF相信号〜H相信号のいずれかの信号が変化するたびにBCDFGHU信号又はBCDFGHD信号を出力する。
The second rotation
スリット位置判定回路273は、ロータリーエンコーダ52のA相信号〜H相信号に基づいて、検出部522に対するスケール521のスリットの位置を判別し、2ビット信号を出力する。このスリット位置判定回路273は、16通りのA相信号〜H相信号の組み合わせに応じて、検出部522に対してスリットが第1位置〜第4位置のいずれの位置にあるかを示す2ビット信号を出力する。
The slit
34ビットカウンタ278は、34ビットのカウント値を出力するカウンタである。この34ビットカウンタ278には、32ビットカウンタ274から32ビットのカウント値とWR信号が入力され、第二回転方向判定回路272からBCDFGHU信号とBCDFGHD信号が入力され、スリット位置判定回路273から2ビット信号が入力される。そして、34ビットカウンタ278は、BCDFGHU信号が入力されたときに34ビットのカウント値をインクリメントし、BCDFGHD信号が入力されたときに34ビットのカウント値をデクリメントする。また、34ビットカウンタ278は、32ビットカウンタ274からWR信号が入力されたときに32ビットのカウント値と2ビット信号とに基づいて34ビットのカウント値を更新する。
The 34-
図21は、WR信号が入力されたときの34ビットのカウント値の更新の説明図である。図中の四角印は、カウント値を示すためのレジスタである。
34ビットカウンタ278にWR信号が入力されたとき、34ビットのカウンタ値の上位32ビットを示すレジスタに、32ビットカウンタ274からの32ビットのカウント値が設定される。言い換えると、WR信号が入力されたとき、32ビットカウンタ274の32ビットのカウント値が、2ビットだけ桁をシフトして、34ビットカウンタ278のレジスタに格納される。
FIG. 21 is an explanatory diagram of updating the 34-bit count value when the WR signal is input. The square marks in the figure are registers for indicating count values.
When the WR signal is input to the 34-
また、34ビットカウンタ278にWR信号が入力されたとき、34ビットのカウンタ値の下位2ビットを示す2個のレジスタに、2ビット信号に応じた値が設定される。2ビット信号が00の場合このレジスタに00が設定され、2ビット信号が01の場合このレジスタに01が設定され、2ビット信号が10の場合このレジスタに10が設定され、2ビット信号が11の場合このレジスタに11が設定される。
When the WR signal is input to the 34-
つまり、34ビットカウンタ278にWR信号が入力すると、32ビットカウンタ274のカウント値の4倍の値に2ビット信号の値を加算した値が、34ビットカウンタ278のカウント値になる。
That is, when the WR signal is input to the 34-
この位置計測部270の動作については説明を省略するが、前述の第1実施形態及び第2実施形態と同様の効果を当然奏することができる。 Although description of the operation of the position measurement unit 270 is omitted, the same effects as those of the first embodiment and the second embodiment described above can be naturally obtained.
===第4実施形態の位置計測===
前述の実施形態では、ロータリーエンコーダ52の出力に基づく位置計測(搬送ローラ23の回転位置計測)について説明している。しかし、これに限られるものではない。
=== Measurement of Position of Fourth Embodiment ===
In the above-described embodiment, position measurement based on the output of the rotary encoder 52 (rotational position measurement of the transport roller 23) has been described. However, it is not limited to this.
リニアエンコーダ51は、プリンタ本体側に固定されたリニアスケールと、キャリッジ31に設けられた検出部とによって構成されている。このようなリニアエンコーダ51の出力に基づいてキャリッジ31の位置を計測するための位置計測部を、前述の実施形態と同様に構成しても良い。この場合、位置計測部の出力するカウント値はユニット制御回路64のキャリッジモータドライバ(不図示)に出力され、キャリッジモータドライバは位置計測部のカウント値に応じてキャリッジモータ32を制御する。
The
===その他の実施の形態===
上記の実施形態では、一実施形態としてのプリンタ等を説明したが、上記の実施形態は本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれることは言うまでもない。
=== Other Embodiments ===
In the above embodiment, a printer or the like as one embodiment has been described. However, the above embodiment is intended to facilitate understanding of the present invention, and is not intended to limit the present invention. . The present invention can be changed and improved without departing from the gist thereof, and it is needless to say that the present invention includes equivalents thereof.
===まとめ===
(1−1)前述の第1実施形態の位置計測部70は、ロータリーエンコーダ52と、32ビットカウンタ74と、33ビットカウンタ75とを備えている。ロータリーエンコーダ52は、A相信号、B相信号、C相信号及びD相信号を、検出部522に対するスリットの位置に応じて出力する。32ビットカウンタ74は、A相信号及びC相信号に基づくACU信号及びACD信号に応じて、32ビットのカウント値をインクリメント又はデクリメントして出力する。
=== Summary ===
(1-1) The
32ビットカウンタ74のカウント値が更新されたとき、32ビットカウンタ74は33ビットカウンタ75へWR信号を出力する。33ビットカウンタ75にWR信号が入力されると、33ビットのカウンタ値の上位32ビットを示すレジスタに、32ビットカウンタ74からの32ビットのカウント値が設定される。また、33ビットカウンタ75にWR信号が入力されると、33ビットのカウンタ値の最下位ビットを示すレジスタに、OE信号に応じた値が設定される。なお、このOE信号は、A相信号〜D相信号に基づいてスリットと検出部522との位置関係に応じた位置情報を示す信号である。
When the count value of the 32-
そして、33ビットカウンタ75は、このように設定された33ビットのカウント値を、B相信号及びD相信号に基づくBDU信号及びBDD信号に応じて、インクリメント又はデクリメントして出力する。
The 33-
このような構成により、33ビットカウンタ75のカウント値に検出誤差を累積させずに済む。また、たとえ33ビットカウンタ75のカウント値に検出誤差が発生しても、32ビットカウンタ74のカウント値が正しければ、33ビットカウンタ75のカウント値が正しい値を示すように復活させることができる。
With this configuration, it is not necessary to accumulate detection errors in the count value of the 33-
(1−2)また、前述の第2実施形態の位置計測部170は、ロータリーエンコーダ52と、32ビットカウンタ174と、33ビットカウンタ175とを備えている。ロータリーエンコーダ52は、A相信号、C相信号、E相信号及びG相信号を、検出部522に対するスリットの位置に応じて出力する。32ビットカウンタ174は、A相信号及びE相信号に基づくAEU信号及びAED信号に応じて、32ビットのカウント値をインクリメント又はデクリメントして出力する。
(1-2) The
32ビットカウンタ174のカウント値が更新されたとき、32ビットカウンタ174は33ビットカウンタ175へWR信号を出力する。33ビットカウンタ175にWR信号が入力されると、33ビットのカウンタ値の上位32ビットを示すレジスタに、32ビットカウンタ174からの32ビットのカウント値が設定される。また、33ビットカウンタ175にWR信号が入力されると、33ビットのカウンタ値の最下位ビットを示すレジスタに、OE1信号に応じた値が設定される。なお、このOE1信号は、A相信号、C相信号、E相信号及びG相信号に基づいてスリットと検出部522との位置関係に応じた位置情報を示す信号である。
When the count value of the 32-
そして、33ビットカウンタ175は、このように設定された33ビットのカウント値を、C相信号及びG相信号に基づくCGU信号及びCGD信号に応じて、インクリメント又はデクリメントして出力する。
Then, the 33-
このような構成により、33ビットカウンタ175のカウント値に検出誤差を累積させずに済む。また、たとえ33ビットカウンタ175のカウント値に検出誤差が発生しても、32ビットカウンタ174のカウント値が正しければ、33ビットカウンタ175のカウント値が正しい値を示すように復活させることができる。
With this configuration, it is not necessary to accumulate detection errors in the count value of the 33-
(1−3)前述の第2実施形態の位置計測部170は、ロータリーエンコーダ52と、33ビットカウンタ175と、34ビットカウンタ178とを備えている。ロータリーエンコーダ52は、A相信号、C相信号、E相信号及びG相信号を、検出部522に対するスリットの位置に応じて出力する。33ビットカウンタ175は、A相信号及びE相信号に基づいて、33ビットのカウント値をインクリメント又はデクリメントして出力する。
(1-3) The
33ビットカウンタ175のカウント値が更新されたとき、33ビットカウンタ175は34ビットカウンタ178へWR信号を出力する。34ビットカウンタ178にWR信号が入力されると、34ビットのカウンタ値の上位33ビットを示すレジスタに、33ビットカウンタ175からの33ビットのカウント値が設定される。また、34ビットカウンタ178にWR信号が入力されると、34ビットのカウンタ値の最下位ビットを示すレジスタに、OE2信号に応じた値が設定される。なお、このOE2信号は、A相信号、C相信号、E相信号及びG相信号を含むA相信号〜H相信号に基づいてスリットと検出部522との位置関係に応じた位置情報を示す信号である。
When the count value of the 33-
そして、34ビットカウンタ178は、このように設定された34ビットのカウント値を、C相信号及びG相信号に基づくBDFHU信号及びBDFHD信号に応じて、インクリメント又はデクリメントして出力する。
Then, the 34-
このような構成により、34ビットカウンタ178のカウント値に検出誤差を累積させずに済む。また、たとえ34ビットカウンタ178のカウント値に検出誤差が発生しても、33ビットカウンタ175のカウント値が正しければ、34ビットカウンタ178のカウント値が正しい値を示すように復活させることができる。なお、前述の第2実施形態によれば、33ビットカウンタ175のカウント値に検出誤差が生じても、32ビットカウンタ174のカウント値が正しければ、33ビットカウンタ175のカウント値が正しい値を示すように復活できるので、34ビットカウンタ178のカウント値も正しい値を示すように復活させることができる。
With this configuration, it is not necessary to accumulate detection errors in the count value of the 34-
(1−4)前述の第3実施形態の位置計測部270は、ロータリーエンコーダ52と、32ビットカウンタ274と、34ビットカウンタ278とを備えている。ロータリーエンコーダ52は、A相信号、C相信号、E相信号及びG相信号を、検出部522に対するスリットの位置に応じて出力する。32ビットカウンタ274は、A相信号及びE相信号に基づくAEU信号及びAED信号に応じて、32ビットのカウント値をインクリメント又はデクリメントして出力する。
(1-4) The position measurement unit 270 of the third embodiment described above includes the
32ビットカウンタ274のカウント値が更新されたとき、32ビットカウンタ274は34ビットカウンタ278へWR信号を出力する。34ビットカウンタ278にWR信号が入力されると、34ビットのカウンタ値の上位32ビットを示すレジスタに、32ビットカウンタ274からの32ビットのカウント値が設定される。また、34ビットカウンタ278にWR信号が入力されると、34ビットのカウンタ値の下位2ビットを示すレジスタに、2ビット信号に応じた値が設定される。なお、この2ビット信号は、A相信号、C相信号、E相信号及びG相信号を含むA相信号〜H相信号に基づいてスリットと検出部522との位置関係に応じた位置情報を示す信号である。
When the count value of the 32-
そして、34ビットカウンタ278は、このように設定された34ビットのカウント値を、B相信号及びD相信号に基づくBCDFGHU信号及びBCDFGHD信号に応じて、インクリメント又はデクリメントして出力する。
Then, the 34-
このような構成により、34ビットカウンタ278のカウント値に検出誤差を累積させずに済む。また、たとえ34ビットカウンタ278のカウント値に検出誤差が発生しても、32ビットカウンタ274のカウント値が正しければ、34ビットカウンタ278のカウント値が正しい値を示すように復活させることができる。
With this configuration, it is not necessary to accumulate detection errors in the count value of the 34-
(2)前述の第1実施形態では、A相信号、B相信号、C相信号、D相信号の順に、位相がずれている。つまり、A相信号のエッジとC相信号のエッジとの間隔は、A相信号のエッジとB相信号のエッジとの間隔よりも、離れている。このため、搬送ローラ23の回転速度が速くなっても、32ビットカウンタ74のカウント値を正しい値に保つことができる。
(2) In the first embodiment described above, the phases are shifted in the order of the A phase signal, the B phase signal, the C phase signal, and the D phase signal. That is, the interval between the edge of the A phase signal and the edge of the C phase signal is farther than the interval between the edge of the A phase signal and the edge of the B phase signal. For this reason, even if the rotation speed of the
また、前述の第2実施形態及び第3実施形態では、A相信号、C相信号、E相信号及びG相信号の順に、位相がずれている。そして、搬送ローラ23の回転速度が速くなっても、32ビットカウンタ174や32ビットカウンタ274のカウント値を正しい値に保つことができる。
In the second and third embodiments described above, the phases are shifted in the order of the A phase signal, the C phase signal, the E phase signal, and the G phase signal. Even when the rotation speed of the
(3)前述の第1実施形態では、32ビットのカウント値に基づいて33ビットのカウント値の上位32ビットの値が決定され、OE信号に基づいて33ビットのカウント値の最下位ビットの値が決定される。 (3) In the first embodiment described above, the value of the upper 32 bits of the 33-bit count value is determined based on the 32-bit count value, and the value of the least significant bit of the 33-bit count value is determined based on the OE signal. Is determined.
また、前述の第3実施形態では、32ビットのカウント値に基づいて34ビットのカウント値の上位32ビットの値が決定され、2ビット信号に基づいて34ビットのカウント値の下位2ビットの値が決定される。 In the third embodiment, the upper 32 bits of the 34-bit count value is determined based on the 32-bit count value, and the lower 2-bit value of the 34-bit count value is determined based on the 2-bit signal. Is determined.
(4)なお、前述の第1実施形態では、正転時に32ビットカウンタ74のカウント値が更新されれば、このときのOE信号はLレベルなので、33ビットカウンタ75のカウント値は、32ビットカウンタ74のカウント値の2倍の値になる。また、反転時に32ビットカウンタ74のカウント値が更新されれば、このときのOE信号はHレベルなので、33ビットカウンタ75のカウント値は、32ビットカウンタ74のカウント値の2倍の値に1を加算した値になる。これにより、正転及び反転を繰り返した場合であっても、33ビットカウンタ75のカウント値の整合性を保つことができる。
(4) In the first embodiment described above, if the count value of the 32-
つまり、OE信号は1ビット信号で足り、OE信号に基づいて33ビットカウンタ75のカウント値の最下位ビットを決定すれば、33ビットカウンタ75のカウント値の整合性を保つことができる。
In other words, a 1-bit signal is sufficient for the OE signal, and if the least significant bit of the count value of the 33-
(5)ロータリーエンコーダ52は、スリットと検出部522との相対的な位置の変化量を検出するものである。このため、カウント値が初期値からどれくらい変化したかが重要なのであり、カウント値がスリットと検出部522との位置関係を直接示すわけではない。
(5) The
このため、前述の実施形態では、32ビットカウンタのカウント値をCPU62が任意の初期値に設定することができるようになっている。
For this reason, in the above-described embodiment, the
なお、前述の実施形態では、CPU62は32ビットカウンタ74に初期値として0を設定している。しかし、32ビットカウンタ74のカウント値が0の状態で搬送ローラ23が反転すると、32ビットカウンタ74のカウント値が最大値を示すおそれがあり、搬送ローラ23の回転量を検出できないおそれがある。このため、本来であれば、初期値は0ではない方が良い。
In the above-described embodiment, the
(6)前述の実施形態では、スリットと検出部522との相対的な位置が変化していないときに、すなわち搬送ローラ23が停止中のときに、CPU62が32ビットカウンタ74に初期値を設定しても、33ビットカウンタ75に33ビットのカウント値が設定される。つまり、CPU62が32ビットカウンタ74に初期値を設定した後、A相信号〜D相信号が変化しなくても、搬送ローラ23の回転位置に応じた33ビットのカウント値が33ビットカウンタ75に設定される。
(6) In the above-described embodiment, the
(7)前述の第1実施形態〜第3実施形態では、ロータリーエンコーダ52の出力に基づく位置計測(搬送ローラ23の回転位置計測)について説明している。 (7) In the first to third embodiments described above, position measurement based on the output of the rotary encoder 52 (rotational position measurement of the transport roller 23) has been described.
(8)しかし、ロータリーエンコーダ52に限られるものではなく、リニアエンコーダ51による位置計測の際に、前述の第1実施形態〜第3実施形態の構成を適用しても良い。
(8) However, the configuration is not limited to the
(9)前述の実施形態の構成の全てを含む位置計測部であれば、上記に記載した全ての効果を奏することができるので望ましい。但し、カウント値を正しくするという効果を得る際に、必ずしも前述の全ての構成が必要なわけではない。 (9) A position measurement unit that includes all of the configurations of the above-described embodiments is desirable because all the effects described above can be achieved. However, in order to obtain the effect of making the count value correct, all the above-described configurations are not necessarily required.
(10)なお、前述の実施形態には、位置計測部を含むプリンタの開示があるだけでなく、位置計測方法に関する開示が含まれている。 (10) The above-described embodiment includes disclosure of a position measurement method as well as disclosure of a printer including a position measurement unit.
1 プリンタ、
20 搬送ユニット、21 給紙ローラ、22 搬送モータ(PFモータ)、
23 搬送ローラ、24 プラテン、25 排紙ローラ、
30 キャリッジユニット、31 キャリッジ、
32 キャリッジモータ(CRモータ)、
40 ヘッドユニット、41 ヘッド、
50 検出器群、51 リニアエンコーダ、52 ロータリーエンコーダ、
521 スケール、 522 検出部、
53 紙検出センサ、54 光学センサ、
60 コントローラ、61 インターフェース部、62 CPU、
63 メモリ、64 ユニット制御回路
70 位置計測部、71 第一回転方向判定回路、72 第二回転方向判定回路、
73 スリット位置判定回路、74 32ビットカウンタ、
75 33ビットカウンタ、
170 位置計測部、
171 第一回転方向判定回路、172 第二回転方向判定回路、
173 第一スリット位置判定回路、174 32ビットカウンタ、
175 33ビットカウンタ、176 第三回転方向判定回路、
177 第二スリット位置判定回路、178 34ビットカウンタ、
270 位置計測部、
271 第一回転方向判定回路、272 第二回転方向判定回路、
273 スリット位置判定回路、274 32ビットカウンタ、
278 34ビットカウンタ、
100 印刷システム、
110 コンピュータ、120 表示装置、130 入力装置、140 記録再生装置
1 printer,
20 transport unit, 21 paper feed roller, 22 transport motor (PF motor),
23 transport roller, 24 platen, 25 discharge roller,
30 Carriage unit, 31 Carriage,
32 Carriage motor (CR motor),
40 head units, 41 heads,
50 detector groups, 51 linear encoder, 52 rotary encoder,
521 scale, 522 detector,
53 Paper detection sensor, 54 Optical sensor,
60 controller, 61 interface unit, 62 CPU,
63 memory, 64
73 Slit position determination circuit, 74 32-bit counter,
75 33-bit counter,
170 position measurement unit,
171 First rotation direction determination circuit, 172 Second rotation direction determination circuit,
173 First slit position determination circuit, 174 32-bit counter,
175 33-bit counter, 176 third rotation direction determination circuit,
177 Second slit position determination circuit, 178 34 bit counter,
270 position measurement unit,
271 First rotation direction determination circuit, 272 Second rotation direction determination circuit,
273 Slit position determination circuit, 274 32-bit counter,
278 34-bit counter,
100 printing system,
110 computer, 120 display device, 130 input device, 140 recording / reproducing device
Claims (10)
(2)前記第1信号及び前記第3信号に基づいて第1カウント値をインクリメント又はデクリメントして出力する第1カウンタと、
(3)前記第1カウント値が更新されたときに、前記第1カウンタから出力される前記第1カウント値に基づいて第1情報が設定され、前記エンコーダから出力される第1信号、第2信号、第3信号及び第4信号に基づいて前記スリットと前記検出器との位置関係に応じた第2情報が設定され、
設定された前記第1情報及び前記第2情報からなる第2カウント値を、前記第2信号及び前記第4信号に基づいてインクリメント又はデクリメントして出力する
第2カウンタと、
を備える位置計測装置。 (1) an encoder that has a slit and a detector, and outputs a first signal, a second signal, a third signal, and a fourth signal according to the position of the slit with respect to the detector;
(2) a first counter that increments or decrements and outputs a first count value based on the first signal and the third signal;
(3) When the first count value is updated, first information is set based on the first count value output from the first counter, and the first signal output from the encoder, second Second information corresponding to the positional relationship between the slit and the detector is set based on the signal, the third signal, and the fourth signal,
A second counter that increments or decrements and outputs a second count value composed of the set first information and the second information based on the second signal and the fourth signal;
A position measuring device comprising:
前記第1信号、前記第2信号、前記第3信号、前記第4信号の順に、位相がずれていることを特徴とする位置計測装置。 The position measuring device according to claim 1,
The position measuring device, wherein the phase is shifted in the order of the first signal, the second signal, the third signal, and the fourth signal.
前記第1情報に基づいて、前記第2カウント値の上位の桁の値が決定され、
前記第2情報に基づいて、前記第2カウント値の下位の桁の値が決定される
ことを特徴とする位置計測装置。 The position measuring device according to claim 1 or 2,
Based on the first information, an upper digit value of the second count value is determined,
A position measurement apparatus, wherein a lower digit value of the second count value is determined based on the second information.
前記第2情報に基づいて、前記第2カウント値の最下位ビットが決定されることを特徴とする位置計測装置。 The position measuring device according to claim 3,
The position measuring apparatus, wherein the least significant bit of the second count value is determined based on the second information.
前記第1カウンタの前記第1カウント値は、任意の値に設定可能であることを特徴とする位置計測装置。 The position measuring device according to any one of claims 1 to 4,
The position measurement device according to claim 1, wherein the first count value of the first counter can be set to an arbitrary value.
前記スリットと前記検出器との相対的な位置が変化していないときに、前記第1カウンタの前記第1カウント値が任意の値に設定されることを特徴とする位置計測装置。 The position measuring device according to claim 5,
The position measuring device, wherein the first count value of the first counter is set to an arbitrary value when the relative position between the slit and the detector is not changed.
前記エンコーダは、ロータリー式であることを特徴とする位置計測装置。 The position measuring device according to claim 1,
The position measuring device is characterized in that the encoder is a rotary type.
前記エンコーダは、リニア式であることを特徴とする位置計測装置。 The position measuring device according to claim 1,
The position measuring device is characterized in that the encoder is of a linear type.
(A)前記位置計測装置は、
(1)スリットと検出器とを有し、第1信号、第2信号、第3信号及び第4信号を、前記検出器に対する前記スリットの位置に応じてそれぞれ出力するエンコーダと、
(2)前記第1信号及び前記第3信号に基づいて第1カウント値をインクリメント又はデクリメントして出力する第1カウンタと、
(3)前記第1カウント値が更新されたときに、前記第1カウンタから出力される前記第1カウント値に基づいて第1情報が設定され、前記エンコーダから出力される第1信号、第2信号、第3信号及び第4信号に基づいて前記スリットと前記検出器との位置関係に応じた第2情報が設定され、
設定された前記第1情報及び前記第2情報からなる第2カウント値を、前記第2信号及び前記第4信号に基づいてインクリメント又はデクリメントして出力する
第2カウンタと、
を備え、
(B)前記第1信号、前記第2信号、前記第3信号、前記第4信号の順に、位相がずれており、
(C)前記第1情報に基づいて、前記第2カウント値の上位の桁の値が決定され、前記第2情報に基づいて、前記第2カウント値の下位の桁の値が決定され、
(D)前記第2情報に基づいて、前記第2カウント値の最下位ビットが決定され、
(E)前記第1カウンタの前記第1カウント値は、任意の値に設定可能であり、
(F)前記スリットと前記検出器との相対的な位置が変化していないときに、前記第1カウンタの前記第1カウント値が任意の値に設定され、
(G)前記エンコーダは、ロータリー式である
ことを特徴とする印刷装置。 A printing apparatus including a position measuring device,
(A) The position measuring device includes:
(1) an encoder that has a slit and a detector, and outputs a first signal, a second signal, a third signal, and a fourth signal according to the position of the slit with respect to the detector;
(2) a first counter that increments or decrements and outputs a first count value based on the first signal and the third signal;
(3) When the first count value is updated, first information is set based on the first count value output from the first counter, and the first signal output from the encoder, second Second information corresponding to the positional relationship between the slit and the detector is set based on the signal, the third signal, and the fourth signal,
A second counter that increments or decrements and outputs a second count value composed of the set first information and the second information based on the second signal and the fourth signal;
With
(B) The phase is shifted in the order of the first signal, the second signal, the third signal, and the fourth signal,
(C) The value of the upper digit of the second count value is determined based on the first information, the value of the lower digit of the second count value is determined based on the second information,
(D) Based on the second information, the least significant bit of the second count value is determined,
(E) The first count value of the first counter can be set to an arbitrary value,
(F) When the relative position between the slit and the detector has not changed, the first count value of the first counter is set to an arbitrary value,
(G) The printing apparatus is characterized in that the encoder is a rotary type.
(2)前記第1信号及び前記第3信号に基づいて第1カウント値をインクリメント又はデクリメントして出力するステップと、
(3)前記第1カウント値が更新されたときに、前記第1カウント値に基づいて第1情報を設定し、前記第1信号、第2信号、第3信号及び第4信号に基づいて前記スリットと前記検出器との位置関係に応じた第2情報を設定し
設定された前記第1情報及び前記第2情報からなる第2カウント値を、前記第2信号及び前記第4信号に基づいてインクリメント又はデクリメントして出力するステップと、
を有する位置計測方法。
(1) Using the slit and the detector, outputting each of the first signal, the second signal, the third signal, and the fourth signal according to the position of the slit with respect to the detector;
(2) a step of incrementing or decrementing a first count value based on the first signal and the third signal and outputting the first count value;
(3) When the first count value is updated, first information is set based on the first count value, and based on the first signal, the second signal, the third signal, and the fourth signal, Based on the second signal and the fourth signal, the second information is set according to the positional relationship between the slit and the detector, and the set second count value including the first information and the second information is set. Incrementing or decrementing and outputting;
A position measurement method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005309746A JP4742808B2 (en) | 2005-10-25 | 2005-10-25 | Position measuring apparatus and position measuring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005309746A JP4742808B2 (en) | 2005-10-25 | 2005-10-25 | Position measuring apparatus and position measuring method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007120970A true JP2007120970A (en) | 2007-05-17 |
JP4742808B2 JP4742808B2 (en) | 2011-08-10 |
Family
ID=38144990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005309746A Expired - Fee Related JP4742808B2 (en) | 2005-10-25 | 2005-10-25 | Position measuring apparatus and position measuring method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4742808B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014044216A (en) * | 2008-08-26 | 2014-03-13 | Nikon Corp | Encoder system and signal processing method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03115921A (en) * | 1989-09-29 | 1991-05-16 | Canon Inc | Signal interpolating circuit and displacement measuring instrument equipped with the same |
JPH06313719A (en) * | 1993-04-19 | 1994-11-08 | Topcon Corp | Rotary encoder |
JP2002090183A (en) * | 2000-09-14 | 2002-03-27 | Samutaku Kk | Multi-rotation type absolute value encoder |
JP2007057453A (en) * | 2005-08-26 | 2007-03-08 | Seiko Epson Corp | Positional information generation system, printer, and positional information generation method |
-
2005
- 2005-10-25 JP JP2005309746A patent/JP4742808B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03115921A (en) * | 1989-09-29 | 1991-05-16 | Canon Inc | Signal interpolating circuit and displacement measuring instrument equipped with the same |
JPH06313719A (en) * | 1993-04-19 | 1994-11-08 | Topcon Corp | Rotary encoder |
JP2002090183A (en) * | 2000-09-14 | 2002-03-27 | Samutaku Kk | Multi-rotation type absolute value encoder |
JP2007057453A (en) * | 2005-08-26 | 2007-03-08 | Seiko Epson Corp | Positional information generation system, printer, and positional information generation method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014044216A (en) * | 2008-08-26 | 2014-03-13 | Nikon Corp | Encoder system and signal processing method |
US9020774B2 (en) | 2008-08-26 | 2015-04-28 | Nikon Corporation | Encoder system, signal processing method, and transmission signal generation and output device |
US9823091B2 (en) | 2008-08-26 | 2017-11-21 | Nikon Corporation | Encoder system, signal processing method, and transmission signal generation and output device |
Also Published As
Publication number | Publication date |
---|---|
JP4742808B2 (en) | 2011-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7221114B2 (en) | Conveyance control apparatus and image forming apparatus | |
US7086714B2 (en) | Method for finding recording-start position | |
JP2008105347A (en) | Inkjet recording device and control method thereof | |
JP4859391B2 (en) | Encoder runout error correction circuit | |
JP4742808B2 (en) | Position measuring apparatus and position measuring method | |
US20180104951A1 (en) | Printing apparatus and printing method | |
JP2007021933A (en) | Printing device | |
JP2009234267A (en) | Printing apparatus, printing method, program, and computer system | |
JP3951877B2 (en) | Conveying apparatus, printing apparatus, conveying method, program, and computer system | |
JP5741645B2 (en) | Image processing apparatus, image forming apparatus, and image processing program | |
JP4720103B2 (en) | Printing apparatus and test pattern manufacturing method | |
JP4440673B2 (en) | Control device for printer device | |
JP3937910B2 (en) | Printing apparatus, program, and computer system | |
JP2005298114A (en) | Printing device, medium detecting device, medium detecting method, measuring method, program, and printing system | |
JP2006338367A (en) | Electronic equipment and control method for motor | |
JP4572579B2 (en) | Printing apparatus, test pattern manufacturing method, and printing system | |
JP2007057453A (en) | Positional information generation system, printer, and positional information generation method | |
JP4515734B2 (en) | Control device for printer device | |
JP4788347B2 (en) | Speed detection device and speed detection method | |
JP2004202963A (en) | Inkjet printer | |
JP2004009686A (en) | Printing device, program, and computer system | |
JP2007045625A (en) | Carrying device and image forming device | |
JP2006218756A (en) | Recorder | |
JP2008070127A (en) | Speed measuring apparatus and method, and printer | |
JP2005059425A (en) | Ink jet recorder |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080710 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110304 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110412 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110425 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140520 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4742808 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |