[go: up one dir, main page]

JP2005111712A - Printer - Google Patents

Printer Download PDF

Info

Publication number
JP2005111712A
JP2005111712A JP2003345877A JP2003345877A JP2005111712A JP 2005111712 A JP2005111712 A JP 2005111712A JP 2003345877 A JP2003345877 A JP 2003345877A JP 2003345877 A JP2003345877 A JP 2003345877A JP 2005111712 A JP2005111712 A JP 2005111712A
Authority
JP
Japan
Prior art keywords
phase signal
count value
value
timer value
stored
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
JP2003345877A
Other languages
Japanese (ja)
Inventor
Tadashi Oyama
正 大山
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.)
Funai Electric Co Ltd
Original Assignee
Funai Electric 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 Funai Electric Co Ltd filed Critical Funai Electric Co Ltd
Priority to JP2003345877A priority Critical patent/JP2005111712A/en
Publication of JP2005111712A publication Critical patent/JP2005111712A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Spaces And Line Spaces In Printers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a printer which can reduce printing misregistration even if a phase shift larger than an original phase shift occurs due to an error between first and second phase signals from an encoder when a malfunction occurs in the encoder or its slit, which can reduce unevenness in movement of a carrier and rotation of a paper feeder, and which can enhance printing accuracy. <P>SOLUTION: This printer is equipped with a printing control part 10 which counts the number of pulses with a predetermined frequency between respective edges of the first and second phase signals, which stores a previous count value in a count value storage register 26, which sets the previous stored count value as this timer value in a timer-value setting register 27, which sets this timer value by using the stored count value before the occurrence of the error, when the error occurs in either of the first and second phase signals, and which controls a motor and a printhead in accordance with the timer value. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、印字ヘッドにより記録用紙に印字を行うプリンタに関する。   The present invention relates to a printer that performs printing on recording paper by a print head.

従来からプリンタにおいては、印字ヘッドのキャリアを駆動させるモータの回転速度を
検出するエンコーダから出力される位相信号に基づいて生成されたタイマ値に従ってモー
タおよび印字ヘッドを制御し、記録用紙に印字を行うように構成されている。エンコーダ
から出力される位相信号としては、基本位相信号としての第1の位相信号と、該第1の位
相信号に対して90度位相がずれた第2の位相信号とがある。これらの第1の位相信号と
第2の位相信号との立上りエッジおよび立下りエッジを検出して、4逓倍のエッジ信号を
出力し、4倍の分解能の印字タイミング信号を生成する。そして、この印字タイミング信
号は、第1の位相信号と第2の位相信号とにより得られるエッジ信号の一周期において、
所定周波数のパルス数をカウントしたカウント値に基づくタイマ値に従って一定周期にな
るように補正制御される。
Conventionally, in a printer, printing is performed on a recording sheet by controlling the motor and the print head according to a timer value generated based on a phase signal output from an encoder that detects the rotation speed of a motor that drives the carrier of the print head. It is configured as follows. The phase signal output from the encoder includes a first phase signal as a basic phase signal and a second phase signal that is 90 degrees out of phase with the first phase signal. A rising edge and a falling edge of the first phase signal and the second phase signal are detected, and a quadruple edge signal is output to generate a print timing signal having a quadruple resolution. And this printing timing signal is in one cycle of the edge signal obtained by the first phase signal and the second phase signal,
Correction control is performed so as to have a constant period according to a timer value based on a count value obtained by counting the number of pulses of a predetermined frequency.

図7は従来のプリンタに備えられる印字制御部の動作を説明するためのタイミングチャ
ートである。図7(1)において、P0,P1,P2,P3はキャリアの動作の状態を示
す。図7(2)は位相信号Aを示し、図7(3)は位相信号Bを示す。位相信号Bは位相
信号Aよりも90度位相がずれている。図7(4)は図7(2)に示す位相信号Aおよび
図7(3)に示す位相信号Bのエッジを検出して得られたエッジ信号を示す。図7(5)
はカウンタでカウントされたカウント値を示す。図7(5)において、例えば、数値10
0は位相信号Aの立下りエッジから位相信号Bの立下りエッジまでの間に所定周波数のパ
ルスをカウントして得られたカウント値である。図7(6)は前回のカウント値を今回の
タイマ値として設定された各タイマ値を示す。
FIG. 7 is a timing chart for explaining the operation of the print controller provided in the conventional printer. In FIG. 7 (1), P0, P1, P2, and P3 indicate carrier operating states. 7 (2) shows the phase signal A, and FIG. 7 (3) shows the phase signal B. The phase signal B is 90 degrees out of phase with the phase signal A. FIG. 7 (4) shows edge signals obtained by detecting edges of the phase signal A shown in FIG. 7 (2) and the phase signal B shown in FIG. 7 (3). FIG. 7 (5)
Indicates the count value counted by the counter. In FIG. 7 (5), for example, the numerical value 10
0 is a count value obtained by counting pulses of a predetermined frequency between the falling edge of the phase signal A and the falling edge of the phase signal B. FIG. 7 (6) shows each timer value set with the previous count value as the current timer value.

図7(7)は、位相信号Bにエラーが発生した場合のキャリアの動作の状態を示す。図
7(8)は位相信号Aを示し、図7(9)はエラーが発生している位相信号Bを示す。図
7(10)は図7(8)に示す位相信号Aおよび図7(9)に示す位相信号Bのエッジを
検出して得られたエッジ信号を示す。図7(11)は図7(10)に示す各エッジ間で所
定周波数のパルス数をカウントして得られた各カウント値を示す。図7(12)は図7(
11)の各カウント値に対応して設定される各タイマ値を示す。図7(13)は図7(1
2)に示すタイマ値に対応して得られる印字タイミング信号を示す。
FIG. 7 (7) shows the state of carrier operation when an error occurs in the phase signal B. FIG. FIG. 7 (8) shows the phase signal A, and FIG. 7 (9) shows the phase signal B in which an error has occurred. FIG. 7 (10) shows edge signals obtained by detecting edges of the phase signal A shown in FIG. 7 (8) and the phase signal B shown in FIG. 7 (9). FIG. 7 (11) shows each count value obtained by counting the number of pulses of a predetermined frequency between the edges shown in FIG. 7 (10). FIG. 7 (12) is similar to FIG.
11) Each timer value set corresponding to each count value. FIG. 7 (13) is similar to FIG.
The print timing signal obtained corresponding to the timer value shown in 2) is shown.

図8は従来のプリンタに備えられるキャリアの状態移行図である。この状態移行図につ
いて図7に示すタイミングチャートも参照して説明する。先ず、状態P0において位相信
号Aの立上りエッジが来ると、状態P1に移る。次に、状態P1において位相信号Bの立
上りエッジが来ると、状態P2に移る。更に、状態P2において位相信号Aの立下りエッ
ジが来ると、状態P3に移る。次に、状態P3において位相信号Bの立下りエッジが来る
と、状態P0に移る。このような順に状態が移るのはモータが正回転し、正方向の動作(
印字ヘッドの印字動作等)をしていることを示す。
FIG. 8 is a state transition diagram of a carrier provided in a conventional printer. This state transition diagram will be described with reference to the timing chart shown in FIG. First, when the rising edge of the phase signal A comes in the state P0, the state P1 is entered. Next, when the rising edge of the phase signal B comes in the state P1, the state P2 is entered. Further, when the falling edge of the phase signal A comes in the state P2, the state P3 is entered. Next, when the falling edge of the phase signal B comes in the state P3, the state P0 is entered. The state changes in this order because the motor rotates forward and moves in the positive direction (
Indicates that the print head is printing.

ここで、例えば、状態P1において、位相信号Aの立下りエッジが来ると、状態M0に
移り、この状態MOにおいて、位相信号Bの立上りエッジが来ると、状態M3に移る。次
に、状態M3において、位相信号Aの立上りエッジが来ると、状態M2に移り、この状態
M2において、位相信号Bの立下りエッジが来ると、状態M1に移る。このような順に状
態が移るのはモータが逆回転し、逆方向の動作(印字ヘッドの印字開始位置への戻り動作
等)をしていることを示す。
特開平5−24264号公報 特開2000−33739号公報
Here, for example, when the falling edge of the phase signal A comes in the state P1, the state moves to the state M0, and when the rising edge of the phase signal B comes in the state MO, the state moves to the state M3. Next, when the rising edge of the phase signal A comes in the state M3, the state moves to the state M2, and when the falling edge of the phase signal B comes in the state M2, the state moves to the state M1. The change of state in this order indicates that the motor rotates in the reverse direction and is operating in the reverse direction (such as returning the print head to the print start position).
Japanese Patent Laid-Open No. 5-24264 JP 2000-33739 A

従来のプリンタは、正方向または逆方向の動作しか対応しておらず、図7に示すタイミ
ングチャートおよび図8に示す状態移行図に示す動作に基づいてモータの回転および印字
ヘッドの印字タイミングを制御するように構成されているが、図7(9)に示すように位
相信号BにエラーE1が発生した場合、タイマ値は、図7(13)に示すように異常とな
る。即ち、その位相信号Bが立上りエッジb1で立ち上がった後、立下りエッジb2で立
ち下がると、図7(10)に示すようにエッジ信号は、立上りエッジb1によるパルスe
1と、これに続く立下りエッジb2によるパルスe2とが発生し、図7(11)に示すよ
うにカウント値が「101」から「38」に急激に変化する。これに伴って、タイマ値も
図7(12)に示すように「101」から「38」に急激に変化する。
Conventional printers only support forward or reverse operation, and control the rotation of the motor and the print timing of the print head based on the operations shown in the timing chart shown in FIG. 7 and the state transition diagram shown in FIG. However, when an error E1 occurs in the phase signal B as shown in FIG. 7 (9), the timer value becomes abnormal as shown in FIG. 7 (13). That is, when the phase signal B rises at the rising edge b1 and then falls at the falling edge b2, as shown in FIG. 7 (10), the edge signal becomes a pulse e generated by the rising edge b1.
1 and a subsequent pulse e2 by the falling edge b2 are generated, and the count value rapidly changes from “101” to “38” as shown in FIG. 7 (11). Along with this, the timer value also changes rapidly from “101” to “38” as shown in FIG.

また、その位相信号Bが立下りエッジb4で立ち下がった後、エラーE2が発生し、立
上りエッジb5で立ち上がると、図7(10)に示すようにエッジ信号は、立下りエッジ
b4によるパルスe4と、これに続く立上りエッジb5によるパルスe5とが発生し、図
7(11)に示すように、カウント値が「104」から「35」に急激に変化する。これ
に伴って、タイマ値も図7(12)に示すように「104」から「35」に急激に変化す
る。
When the error E2 occurs after the phase signal B falls at the falling edge b4 and rises at the rising edge b5, as shown in FIG. 7 (10), the edge signal becomes a pulse e4 by the falling edge b4. Then, the subsequent pulse e5 by the rising edge b5 is generated, and the count value rapidly changes from “104” to “35” as shown in FIG. 7 (11). Along with this, the timer value also changes rapidly from “104” to “35” as shown in FIG.

したがって、印字タイミング信号は、図7(13)に示すようなパルス発生周期が一定
しない信号となり、これにより、キャリアの移動速度および印字ヘッドの印字タイミング
が一瞬不安定になる。即ち、従来のプリンタでは、エンコーダからの位相信号Aと位相信
号B間に本来の位相ずれよりもエラーによる大きい位相ずれがあった場合、位相信号のエ
ラー検出および印字タイミング信号の補間ができないので、本来の位相ずれよりも大きな
位相ずれが生じると、印字タイミングがずれることによる印字ずれが起こり、印字精度が
低下するという課題があった。また、前記エラーによる大きな位相ずれにより、モータの
回転ムラが生じ、これにより、キャリアの移動ムラが生じ、印字精度を低下させる原因に
もなる。
Therefore, the print timing signal is a signal whose pulse generation cycle is not constant as shown in FIG. 7 (13), and the moving speed of the carrier and the print timing of the print head become unstable for a moment. That is, in the conventional printer, if there is a phase shift larger than the original phase shift due to an error between the phase signal A and the phase signal B from the encoder, the error detection of the phase signal and the interpolation of the print timing signal cannot be performed. When a phase shift larger than the original phase shift occurs, there is a problem in that a print shift occurs due to a shift in print timing, resulting in a decrease in print accuracy. In addition, a large phase shift due to the error causes uneven rotation of the motor, thereby causing uneven movement of the carrier and causing a decrease in printing accuracy.

なお、特許文献1の従来技術では、モータに直結された速度検出用のエンコーダからの
エンコーダ出力パルスの時間間隔について平均値からのずれを検出し、そのずれを補正し
て印字タイミングを生成しているが、エンコーダ出力パルスのエラーが発生した場合につ
いては対策が施されていないので、上記のような課題を解決できるものではない。
In the prior art of Patent Document 1, a deviation from an average value is detected for the time interval of encoder output pulses from a speed detection encoder directly connected to a motor, and the deviation is corrected to generate a print timing. However, since no countermeasure is taken when an encoder output pulse error occurs, the problem as described above cannot be solved.

また、特許文献2の従来技術では、エンコーダ出力における前回の周期の8分の1の周
期を有した記録タイミング信号を生成し、これに基づく記録処理を行う場合に、キャリッ
ジの速度変動等に起因したエンコーダ周期の変動により、実際の記録処理が次のエンコー
ダ周期にくい込んで実行されることを許容するとともに、このくい込んだ時間差に基づい
て、今回の記録開始トリガを補正し、また、記録タイミングの周期を補正するようにして
いるが、エンコーダ出力のエラーが発生した場合については対策が施されていないので、
上記のような課題を解決できるものではない。
Further, in the prior art of Patent Document 2, when a recording timing signal having a period that is 1/8 of the previous period in the encoder output is generated and recording processing based on this is performed, it is caused by a change in the carriage speed or the like. Due to the fluctuation of the encoder cycle, the actual recording process is allowed to be executed with less time for the next encoder cycle, and the current recording start trigger is corrected based on this added time difference. Although the period is corrected, no measures are taken when an encoder output error occurs.
The above problems cannot be solved.

本発明は、上記のような課題を解決するためになされたもので、エンコーダや、そのス
リットに不具合が発生し、エンコーダからの第1の位相信号と第2の位相信号との間に、
本来の位相ずれよりも、エラーによる大きい位相ずれがあった場合でも、印字ずれを軽減
でき、また、キャリアの移動ムラや、給紙フィーダの回転ムラも減少でき、これにより、
印字精度の向上を図れるプリンタを提供することを目的とする。
The present invention has been made to solve the above-described problems, and a problem occurs in the encoder and its slit, and between the first phase signal and the second phase signal from the encoder,
Even if there is a large phase shift due to an error than the original phase shift, the print shift can be reduced, and the uneven movement of the carrier and the uneven rotation of the paper feeder can also be reduced.
An object of the present invention is to provide a printer capable of improving printing accuracy.

上記目的を達成するために、請求項1の発明は、印字ヘッドのキャリアを駆動させる駆
動手段の速度を検出するエンコーダから出力される位相信号に基づいて生成されたタイマ
値に従って前記駆動手段および前記印字ヘッドを制御し、記録用紙に印字を行うプリンタ
において、前記位相信号としては第1の位相信号と該第1の位相信号に対して90度位相
がずれた第2の位相信号とがあり、前記エンコーダからの第1の位相信号および第2の位
相信号を検出する位相信号検出手段と、前記検出された第1の位相信号および第2の位相
信号のエッジを検出するエッジ検出手段と、前記検出された各エッジ間で所定周波数のパ
ルス数をカウントするカウント手段と、前記カウント手段でカウントされた前回のカウン
ト値を前記駆動手段および前記印字ヘッドを制御するための今回のタイマ値として設定す
るタイマ値設定手段と、前記カウント値を格納する格納手段と、前記カウント手段による
今回のカウント値と前記格納手段に格納された前回の格納カウント値とを比較し今回のカ
ウント値が前回の格納カウント値に比べ所定値以上異なる場合に補正信号を出力する比較
手段と、前記補正信号を入力したとき前記格納手段に格納されたエラー発生前の格納カウ
ント値を使用して今回のタイマ値を前記タイマ値設定手段に設定する補正制御手段とを有
する印字制御部を備えたことを特徴とするプリンタを提供する。
In order to achieve the above object, the invention of claim 1 is characterized in that the driving means and the driving means according to a timer value generated based on a phase signal output from an encoder for detecting the speed of the driving means for driving the carrier of the print head. In a printer that controls a print head and prints on recording paper, the phase signal includes a first phase signal and a second phase signal that is 90 degrees out of phase with the first phase signal. Phase signal detection means for detecting a first phase signal and a second phase signal from the encoder; edge detection means for detecting edges of the detected first phase signal and second phase signal; Count means for counting the number of pulses of a predetermined frequency between each detected edge, and the previous count value counted by the count means is the drive means and the Timer value setting means for setting the current timer value for controlling the character head, storage means for storing the count value, current count value by the count means and the previous stored count stored in the storage means A comparator that outputs a correction signal when the current count value differs by a predetermined value or more compared to the previous stored count value, and a pre-error occurrence stored in the storage means when the correction signal is input. There is provided a printer comprising a print control unit having correction control means for setting a current timer value in the timer value setting means using a stored count value.

この構成において、エンコーダからの第1の位相信号および第2の位相信号は位相信号
検出手段により検出され、前記検出された第1の位相信号および第2の位相信号のエッジ
はエッジ検出手段により検出される。前記検出された各エッジ間で所定周波数のパルス数
がカウント手段によりカウントされ、前記カウント値は駆動手段および印字ヘッドを制御
するためのタイマ値としてタイマ値設定手段に設定される。前記カウント値は格納手段に
格納される。前記カウント手段による今回のカウント値と前記格納手段に格納された前回
の格納カウント値とが比較手段により比較され、今回のカウント値が前回の格納カウント
値に比べ所定値以上異なる場合に補正信号が出力される。この補正信号を入力した補正制
御手段は、前記格納手段に格納されたエラー発生前の格納カウント値を今回のタイマ値と
して前記タイマ値設定手段に設定する。これにより、駆動手段および印字ヘッドは前記設
定された今回のタイマ値に従って制御される。
In this configuration, the first phase signal and the second phase signal from the encoder are detected by the phase signal detection means, and the edges of the detected first phase signal and second phase signal are detected by the edge detection means. Is done. The number of pulses of a predetermined frequency is counted by the counting means between the detected edges, and the count value is set in the timer value setting means as a timer value for controlling the driving means and the print head. The count value is stored in storage means. The current count value by the counting means and the previous stored count value stored in the storage means are compared by the comparing means, and the correction signal is output when the current count value differs from the previous stored count value by a predetermined value or more. Is output. The correction control means that has input this correction signal sets the stored count value before the error occurrence stored in the storage means in the timer value setting means as the current timer value. As a result, the driving means and the print head are controlled according to the set current timer value.

したがって、この構成によれば、エンコーダや、そのスリットに不具合が生じ、エンコ
ーダからの第1の位相信号と第2の位相信号との間に、本来の位相ずれよりも、エラーに
よる大きい位相ずれがあった場合でも、タイマ値を補正することによって、印字ヘッドの
印字タイミングが補正されて、印字ずれを軽減でき、また、キャリアの移動ムラや、給紙
フィーダの回転ムラも減少させることができ、したがって、印字精度の向上を図れる。
Therefore, according to this configuration, a problem occurs in the encoder and its slit, and there is a larger phase shift due to an error than the original phase shift between the first phase signal and the second phase signal from the encoder. Even if there is, by correcting the timer value, the print timing of the print head can be corrected to reduce the printing deviation, and the uneven movement of the carrier and the uneven rotation of the paper feeder can also be reduced. Therefore, the printing accuracy can be improved.

請求項2の発明は、印字ヘッドのキャリアを駆動させる駆動手段の速度を検出するエン
コーダから出力される位相信号に基づいて生成されたタイマ値に従って前記駆動手段およ
び前記印字ヘッドを制御し、記録用紙に印字を行うプリンタにおいて、前記位相信号とし
ては第1の位相信号と該第1の位相信号に対して所定角度位相がずれた第2の位相信号と
があり、前記第1の位相信号および前記第2の位相信号の各エッジ間で所定周波数のパル
ス数をカウントし、前回のカウント値を前記駆動手段および前記印字ヘッドを制御するた
めの今回のタイマ値とし、前記第1の位相信号および前記第2の位相信号の何れか一方に
エラーが発生したとき、エラー発生前のカウント値を使用して今回のタイマ値を設定し、
前記駆動手段および前記印字ヘッドを制御する印字制御部を備えたことを特徴とするプリ
ンタを提供する。
According to a second aspect of the present invention, the drive means and the print head are controlled according to a timer value generated based on a phase signal output from an encoder that detects the speed of the drive means for driving the carrier of the print head, and the recording paper In the printer that performs printing, the phase signal includes a first phase signal and a second phase signal whose phase is shifted by a predetermined angle with respect to the first phase signal. The number of pulses of a predetermined frequency is counted between each edge of the second phase signal, and the previous count value is set as the current timer value for controlling the driving means and the print head, and the first phase signal and the When an error occurs in one of the second phase signals, the current timer value is set using the count value before the error occurs,
Provided is a printer comprising a printing control unit for controlling the driving unit and the printing head.

この構成において、前記第1の位相信号および前記第2の位相信号の各エッジ間で所定
周波数のパルス数がカウントされ、前回のカウント値が前記駆動手段および前記印字ヘッ
ドを制御するための今回のタイマ値とされ、前記第1の位相信号および前記第2の位相信
号の何れか一方にエラーが発生したとき、エラー発生前のカウント値が使用されて今回の
タイマ値が設定され、この設定された今回のタイマ値に従って駆動手段および印字ヘッド
が制御される。
In this configuration, the number of pulses having a predetermined frequency is counted between the edges of the first phase signal and the second phase signal, and the previous count value is used to control the drive unit and the print head. When an error occurs in one of the first phase signal and the second phase signal, the count value before the error occurrence is used to set the current timer value. The driving means and the print head are controlled according to the current timer value.

したがって、この構成によれば、エンコーダや、そのスリットに不具合が生じ、エンコ
ーダからの第1の位相信号と第2の位相信号との間に、本来の位相ずれよりも、エラーに
よる大きい位相ずれがあった場合でも、タイマ値を補正することによって、印字ヘッドの
印字タイミングが補正されて、印字ずれを軽減でき、また、キャリアの移動ムラや、給紙
フィーダの回転ムラも減少させることができ、したがって、印字精度の向上を図れる。
Therefore, according to this configuration, a problem occurs in the encoder and its slit, and there is a larger phase shift due to an error than the original phase shift between the first phase signal and the second phase signal from the encoder. Even if there is, by correcting the timer value, the print timing of the print head can be corrected to reduce the printing deviation, and the uneven movement of the carrier and the uneven rotation of the paper feeder can also be reduced. Therefore, the printing accuracy can be improved.

請求項3の発明では、請求項2の発明において 印字制御部は、エンコーダからの第1
の位相信号および第2の位相信号を検出する位相信号検出手段と、前記検出された第1の
位相信号および第2の位相信号のエッジを検出するエッジ検出手段と、前記検出された各
エッジ間で所定周波数のパルス数をカウントするカウント手段と、前記カウント手段でカ
ウントされた前回のカウント値を前記駆動手段および前記印字ヘッドを制御するための今
回のタイマ値として設定するタイマ値設定手段と、前記カウント値を格納する格納手段と
、前記カウント手段による今回のカウント値と前記格納手段に格納された前回の格納カウ
ント値とを比較し今回のカウント値が前回の格納カウント値に比べ所定値以上異なる場合
に補正信号を出力する比較手段と、前記補正信号を入力したとき前記格納手段に格納され
たエラー発生前の格納カウント値を使用して今回のタイマ値を前記タイマ値設定手段に設
定する補正制御手段とを有するので、前記第1の位相信号および前記第2の位相信号の何
れか一方にエラーが発生したとき、エラー発生前のカウント値を使用して今回のタイマ値
を設定することができ、したがって、設定された今回のタイマ値に従って駆動手段および
印字ヘッドを制御することができる。
According to a third aspect of the present invention, in the second aspect of the present invention, the print control unit receives the first from the encoder.
A phase signal detecting means for detecting the phase signal and the second phase signal, an edge detecting means for detecting an edge of the detected first phase signal and the second phase signal, and between the detected edges Counting means for counting the number of pulses at a predetermined frequency, timer value setting means for setting the previous count value counted by the counting means as a current timer value for controlling the driving means and the print head, The storage means for storing the count value, the current count value by the count means and the previous stored count value stored in the storage means are compared, and the current count value is greater than or equal to a predetermined value compared to the previous stored count value Comparing means for outputting a correction signal when different, and a storage count before the occurrence of an error stored in the storage means when the correction signal is input Correction control means for setting the current timer value in the timer value setting means using the value, so that when an error occurs in one of the first phase signal and the second phase signal, The current timer value can be set using the count value before the occurrence of the error, and therefore the driving means and the print head can be controlled in accordance with the set current timer value.

以上のように本発明によれば、位相信号としては第1の位相信号と該第1の位相信号に
対して90度位相がずれた第2の位相信号とがあり、エンコーダからの第1の位相信号お
よび第2の位相信号を検出する位相信号検出手段と、前記検出された第1の位相信号およ
び第2の位相信号のエッジを検出するエッジ検出手段と、前記検出された各エッジ間で所
定周波数のパルス数をカウントするカウント手段と、前記カウント手段でカウントされた
前回のカウント値を前記駆動手段および前記印字ヘッドを制御するための今回のタイマ値
として設定するタイマ値設定手段と、前記カウント値を格納する格納手段と、前記カウン
ト手段による今回のカウント値と前記格納手段に格納された前回の格納カウント値とを比
較し今回のカウント値が前回の格納カウント値に比べ所定値以上異なる場合に補正信号を
出力する比較手段と、前記補正信号を入力したとき前記格納手段に格納されたエラー発生
前の格納カウント値を使用して今回のタイマ値を前記タイマ値設定手段に設定する補正制
御手段とを有する印字制御部を備えたので、エンコーダやそのスリットに不具合が生じ、
エンコーダからの第1の位相信号と第2の位相信号との間に、本来の位相ずれよりも、エ
ラーによる大きい位相ずれがあった場合でも、タイマ値を補正することによって、印字ヘ
ッドの印字タイミングが補正されて、印字ずれを軽減でき、また、キャリアの移動ムラや
、給紙フィーダの回転ムラも減少させることができ、したがって、印字精度の向上を図れ
る。
As described above, according to the present invention, the phase signal includes the first phase signal and the second phase signal that is 90 degrees out of phase with the first phase signal. A phase signal detection means for detecting a phase signal and a second phase signal; an edge detection means for detecting edges of the detected first phase signal and second phase signal; and between the detected edges Counting means for counting the number of pulses of a predetermined frequency; timer value setting means for setting a previous count value counted by the counting means as a current timer value for controlling the driving means and the print head; and The storage means for storing the count value, the current count value by the count means and the previous stored count value stored in the storage means are compared, and the current count value is The comparison means for outputting a correction signal when the difference differs from the delivery count value by a predetermined value or more, and the current timer value using the stored count value before the error occurrence stored in the storage means when the correction signal is inputted. Since it has a print control unit having a correction control means for setting the timer value setting means, a problem occurs in the encoder and its slit,
Even when there is a phase shift larger than the original phase shift between the first phase signal and the second phase signal from the encoder, the print timing of the print head is corrected by correcting the timer value. Is corrected, printing deviation can be reduced, carrier unevenness of movement and unevenness of rotation of the paper feed feeder can be reduced, and therefore the printing accuracy can be improved.

また、本発明によれば、位相信号としては第1の位相信号と該第1の位相信号に対して
所定角度位相がずれた第2の位相信号とがあり、前記第1の位相信号および前記第2の位
相信号の各エッジ間で所定周波数のパルス数をカウントし、前回のカウント値を前記駆動
手段および前記印字ヘッドを制御するための今回のタイマ値とし、前記第1の位相信号お
よび前記第2の位相信号の何れか一方にエラーが発生したとき、エラー発生前のカウント
値を使用して今回のタイマ値を設定し、前記駆動手段および前記印字ヘッドを制御する印
字制御部を備えたので、エンコーダやそのスリットに不具合が生じ、エンコーダからの第
1の位相信号と第2の位相信号との間に、本来の位相ずれよりも、エラーによる大きい位
相ずれがあった場合でも、タイマ値を補正することによって、印字ヘッドの印字タイミン
グが補正されて、印字ずれを軽減でき、また、キャリアの移動ムラや、給紙フィーダの回
転ムラも減少させることができ、したがって、印字精度の向上を図れる。
According to the present invention, the phase signal includes a first phase signal and a second phase signal whose phase is shifted by a predetermined angle with respect to the first phase signal. The number of pulses of a predetermined frequency is counted between each edge of the second phase signal, and the previous count value is set as the current timer value for controlling the driving means and the print head, and the first phase signal and the When an error occurs in any one of the second phase signals, a print control unit is provided that sets the current timer value using the count value before the error occurs, and controls the drive means and the print head. Therefore, even if there is a problem with the encoder or its slit and there is a phase shift between the first phase signal and the second phase signal from the encoder that is larger than the original phase shift, an error occurs. By correcting the value, the print timing of the print head can be corrected to reduce print misalignment, and the carrier movement unevenness and the rotation of the paper feed feeder can be reduced, thus improving the printing accuracy. Can be planned.

以下、添付図面を参照しつつ、本発明の実施の形態について説明する。図1は本発明の
一実施形態に係るプリンタの構成を示すブロック図である。図1において、1は駆動手段
としてのモータ、2はモータ1の回転速度を検出するエンコーダ、3および4はモータ軸
に結合されたプーリー、5はプーリー3,4間に設けられたベルト、6はベルト5により
左右に駆動されるキャリア、7はキャリア6に搭載された印字ヘッド、8はプラテン、9
は記録用紙、10は印字制御部、11はモータ1を駆動させるモータ駆動回路、12は印
字ヘッド7を駆動させる印字ヘッド駆動回路、13は出力すべきドットデータを一時的に
格納する印字バッファである。
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. FIG. 1 is a block diagram showing the configuration of a printer according to an embodiment of the present invention. In FIG. 1, 1 is a motor as drive means, 2 is an encoder for detecting the rotational speed of the motor 1, 3 and 4 are pulleys coupled to the motor shaft, 5 is a belt provided between the pulleys 3 and 4, 6 Is a carrier driven left and right by the belt 5, 7 is a print head mounted on the carrier 6, 8 is a platen, 9
Is a recording sheet, 10 is a print control unit, 11 is a motor drive circuit for driving the motor 1, 12 is a print head drive circuit for driving the print head 7, and 13 is a print buffer for temporarily storing dot data to be output. is there.

印字制御部10は、モータ駆動回路11を制御してモータ1を立上げ、プーリー3およ
びベルト5を介してキャリア6を定常状態に駆動し、印字バッファ13からドットデータ
を読み出して印字ヘッド駆動回路12に供給する。モータ1の軸にはエンコーダ2が直結
されており、エンコーダ2から出力される位相信号は印字ヘッド駆動回路12に供給され
、印字ヘッド7のドット駆動のタイミングに使用される。前記位相信号としては、位相信
号A(第1の位相信号)と該位相信号Aに対して90度位相がずれた位相信号B(第2の
位相信号)とがある。
The print control unit 10 controls the motor drive circuit 11 to start up the motor 1, drives the carrier 6 in a steady state via the pulley 3 and the belt 5, reads dot data from the print buffer 13, and print head drive circuit 12 is supplied. An encoder 2 is directly connected to the shaft of the motor 1, and a phase signal output from the encoder 2 is supplied to the print head drive circuit 12 and used for dot drive timing of the print head 7. The phase signal includes a phase signal A (first phase signal) and a phase signal B (second phase signal) that is 90 degrees out of phase with the phase signal A.

図2は図1中の印字制御部10の特徴とする構成を示すブロック図である。この印字制
御部10は、エンコーダ2からの位相信号Aおよび位相信号Bを検出する位相信号検出手
段としての位相信号検出回路21と、前記検出された位相信号Aおよび位相信号Bに基づ
いてモータ1(図1参照)が正回転状態であるか逆回転状態であるか検出する正逆検出回
路22と、前記検出された位相信号Aおよび位相信号Bのエッジを検出するエッジ検出手
段としてのエッジ検出回路23と、前記検出された各エッジ間で所定周波数のパルス数を
カウントするカウント手段としてのカウンタ25とを備えている。
FIG. 2 is a block diagram showing a characteristic configuration of the print control unit 10 in FIG. The print control unit 10 includes a phase signal detection circuit 21 as a phase signal detection unit that detects the phase signal A and the phase signal B from the encoder 2, and the motor 1 based on the detected phase signal A and phase signal B. A forward / reverse detection circuit 22 that detects whether (see FIG. 1) is a forward rotation state or a reverse rotation state, and edge detection as an edge detection means that detects edges of the detected phase signal A and phase signal B A circuit 23 and a counter 25 as counting means for counting the number of pulses having a predetermined frequency between the detected edges are provided.

また、この印字制御部10は、カウンタ25でカウントされた前回のカウント値をモー
タ1および印字ヘッド7を制御するための今回のタイマ値として設定するタイマ値設定手
段としてのタイマ値設定レジスタ27と、前記カウント値を格納する格納手段としてのカ
ウント値格納レジスタ26と、カウンタ25による今回のカウント値とカウント値格納レ
ジスタ26に格納された前回の格納カウント値とを比較し今回のカウント値が前回の格納
カウント値に比べ所定値以上異なる場合に補正信号を出力する比較手段としての比較回路
24と、前記補正信号を入力したときカウント値格納レジスタ26に格納されたエラー発
生前の格納カウント値を使用して今回のタイマ値をタイマ値設定レジスタ27に設定する
補正制御手段としての補正制御回路28とを備えている。
The print control unit 10 also includes a timer value setting register 27 as a timer value setting means for setting the previous count value counted by the counter 25 as the current timer value for controlling the motor 1 and the print head 7. The count value storage register 26 as the storage means for storing the count value, the current count value by the counter 25 and the previous stored count value stored in the count value storage register 26 are compared, and the current count value is A comparison circuit 24 serving as a comparison means for outputting a correction signal when the stored count value differs from the stored count value by a predetermined value or more, and a stored count value before occurrence of an error stored in the count value storage register 26 when the correction signal is input. Correction control as correction control means for using and setting the current timer value in the timer value setting register 27 And a road 28.

図3は前記印字制御部10の動作を説明するためのタイミングチャートである。図3(
1)において、P0,P1,P2,P3はキャリア6(図1参照)の動作の状態を示す。
図3(2)は位相信号Aを示し、図3(3)は位相信号Bを示す。位相信号Bは位相信号
Aよりも90度位相がずれている。図3(4)はカウンタ25でカウントされた各カウン
ト値を示す。図3(4)において、例えば、状態P3において数値100は位相信号Aの
立下りエッジから位相信号Bの立下りエッジまでの間に所定周波数のパルスをカウントし
て得たカウント値である。
FIG. 3 is a timing chart for explaining the operation of the print control unit 10. FIG.
In 1), P0, P1, P2, and P3 indicate the operating states of the carrier 6 (see FIG. 1).
3 (2) shows the phase signal A, and FIG. 3 (3) shows the phase signal B. The phase signal B is 90 degrees out of phase with the phase signal A. FIG. 3 (4) shows each count value counted by the counter 25. In FIG. 3 (4), for example, in the state P3, the numerical value 100 is a count value obtained by counting pulses of a predetermined frequency from the falling edge of the phase signal A to the falling edge of the phase signal B.

図3(5)は、位相信号Bにエラーが発生した場合のキャリア6の動作の状態を示す。
図3(6)は位相信号Aを示し、図3(7)はエラーが発生している位相信号Bを示す。
図3(8)は図3(6)に示す位相信号Aおよび図3(7)に示す位相信号Bのエッジを
検出して得られたエッジ信号を示す。図3(9)は図3(8)に示す各エッジ間で所定周
波数のパルス数がカウンタ25でカウントされた各カウント値を示す。図3(10)は一
部が補正されたカウント値を含む各カウント値を示す。図3(11)は図3(10)に示
すカウント値の前回の値にそれぞれ対応してカウンタ値格納レジスタ26に格納される各
格納カウント値を示す。図3(12)は図3(11)に示す各格納カウント値に対応して
タイマ値設定レジスタ27に格納される各タイマ値を示す。図3(13)は補正された印
字タイミング信号を示す。
FIG. 3 (5) shows the operation state of the carrier 6 when an error occurs in the phase signal B.
FIG. 3 (6) shows the phase signal A, and FIG. 3 (7) shows the phase signal B in which an error has occurred.
FIG. 3 (8) shows edge signals obtained by detecting edges of the phase signal A shown in FIG. 3 (6) and the phase signal B shown in FIG. 3 (7). FIG. 3 (9) shows the count values obtained by counting the number of pulses of a predetermined frequency between the edges shown in FIG. 3 (8) by the counter 25. FIG. 3 (10) shows each count value including a count value partially corrected. FIG. 3 (11) shows each stored count value stored in the counter value storage register 26 corresponding to the previous value of the count value shown in FIG. 3 (10). FIG. 3 (12) shows each timer value stored in the timer value setting register 27 corresponding to each stored count value shown in FIG. 3 (11). FIG. 3 (13) shows the corrected printing timing signal.

図4はキャリア6の状態移行図である。この状態移行図について図3に示すタイミング
チャートも参照して説明する。先ず、状態P0において位相信号Aの立上りエッジが来る
と、状態P1に移る。次に、状態P1において位相信号Bの立上りエッジが来ると、状態
P2に移る。更に、状態P2において位相信号Aの立下りエッジが来ると、状態P3に移
る。次に、状態P3において位相信号Bの立下りエッジが来ると、状態P0に移る。この
ような順に状態が移るのはモータ1が正回転していることを示し、キャリア6は印字ヘッ
ド7を印字する方向に移動させていることを示す。
FIG. 4 is a state transition diagram of the carrier 6. This state transition diagram will be described with reference to the timing chart shown in FIG. First, when the rising edge of the phase signal A comes in the state P0, the state P1 is entered. Next, when the rising edge of the phase signal B comes in the state P1, the state P2 is entered. Further, when the falling edge of the phase signal A comes in the state P2, the state P3 is entered. Next, when the falling edge of the phase signal B comes in the state P3, the state P0 is entered. The change of state in this order indicates that the motor 1 is rotating forward, and that the carrier 6 is moving the print head 7 in the printing direction.

ここで、例えば、状態P1において、位相信号Aの立下りエッジが来ると、状態M0に
移り、この状態MOにおいて、位相信号Bの立上りエッジが来ると、状態M3に移る。次
に、状態M3において、位相信号Aの立上りエッジが来ると、状態M2に移り、この状態
M2において、位相信号Bの立下りエッジが来ると、状態M1に移る。このような順に状
態が移るのはモータ1が逆回転していることを示し、また、キャリア6は印字ヘッド7を
印字開始位置に戻す方向に移動させていることを示す。
Here, for example, when the falling edge of the phase signal A comes in the state P1, the state moves to the state M0, and when the rising edge of the phase signal B comes in the state MO, the state moves to the state M3. Next, when the rising edge of the phase signal A comes in the state M3, the state moves to the state M2, and when the falling edge of the phase signal B comes in the state M2, the state moves to the state M1. The change of state in this order indicates that the motor 1 is rotating in the reverse direction, and that the carrier 6 is moving in a direction to return the print head 7 to the print start position.

図5は位相信号Bにエラーが発生した場合の補正処理を説明するための状態移行図であ
る。この補正処理について図3のタイミングチャートも参照して説明する。
FIG. 5 is a state transition diagram for explaining a correction process when an error occurs in the phase signal B. This correction process will be described with reference to the timing chart of FIG.

位相信号Aの立上りエッジa1で状態P0から状態P1に移り、この状態P1において
位相信号Bの立上りエッジb1が来ると、状態P2に移る。この状態P2のとき位相信号
BにエラーE1が発生し、位相信号Bが本来の周期よりも早く立ち下がり、この立下りエ
ッジb2で状態n1に移る。この状態n1において、印字制御部10の比較回路24は、
カウント値が例えば「101」から「38」に急激に変化したのを検出し、「38」は「
101」の例えば、半分以下であるので、位相信号Bは異常であると判定し、今回のカウ
ント値としては「38」を用いずに、カウント値格納レジスタ26に格納された前回の格
納カウント値「101」をタイマ値としてモータ1およびキャリア6を制御するように、
時点t1まで、下記の状態n2から状態n3までの補正処理が補正制御回路28により行
われる。
At the rising edge a1 of the phase signal A, the state P0 is shifted to the state P1, and when the rising edge b1 of the phase signal B comes at the state P1, the state P2 is shifted to. In this state P2, an error E1 occurs in the phase signal B, the phase signal B falls earlier than the original period, and the state shifts to the state n1 at this falling edge b2. In this state n1, the comparison circuit 24 of the print control unit 10
For example, it is detected that the count value has suddenly changed from “101” to “38”.
For example, since it is less than half of “101”, it is determined that the phase signal B is abnormal, and the last stored count value stored in the count value storage register 26 is not used as the current count value. To control the motor 1 and the carrier 6 using “101” as a timer value,
The correction control circuit 28 performs correction processing from state n2 to state n3 described below until time t1.

即ち、状態P2から状態P0までは補正処理に関する状態n2と状態n3がバイパス経
路で接続されている。状態n2では、カウント値「38」に代わるカウント値は、カウン
ト値格納レジスタ26に格納されている前回の格納カウント値「101」に設定され、状
態n3では、カウント値「62」に代わるカウント値も、カウント値格納レジスタ26に
格納されている前回の格納カウント値「101」に設定される。これにより、タイマ値も
図3(12)に示すように「101」になり、モータ1およびキャリア6は位相信号Bの
エラーE1にもかかわらず、正常に制御されることになる。
That is, from the state P2 to the state P0, the state n2 and the state n3 related to the correction process are connected by a bypass path. In state n2, the count value replacing the count value “38” is set to the previous stored count value “101” stored in the count value storage register 26, and in state n3, the count value replacing the count value “62”. Also, the previous stored count value “101” stored in the count value storage register 26 is set. As a result, the timer value also becomes “101” as shown in FIG. 3 (12), and the motor 1 and the carrier 6 are normally controlled despite the error E1 of the phase signal B.

次のエラーE2に対しても同様な補正処理が行われる。位相信号Bの立下がりエッジb
4で状態P3から状態P0に移る。この状態P0のとき位相信号BにエラーE2が発生し
、位相信号Bが本来の周期よりも早く立ち上がった場合、この立上りエッジb5を検出す
ると、補正処理に移る。
A similar correction process is performed for the next error E2. Falling edge b of phase signal B
4 shifts from the state P3 to the state P0. In this state P0, when the error E2 occurs in the phase signal B and the phase signal B rises earlier than the original period, when the rising edge b5 is detected, the process proceeds to correction processing.

即ち、状態P0において、印字制御部10の比較回路24は、カウント値が、例えば「
104」から「35」に急激に変化したのを検出し、「35」は「104」の例えば、半
分以下であるので、位相信号Bは異常であると判定し、今回のカウント値としては「35
」を用いずに、カウント値格納レジスタ26に格納された前回の格納カウント値「104
」をタイマ値としてモータ1およびキャリア6を制御するように、時点t2まで、補正処
理が補正制御回路28により行われる。
That is, in the state P0, the comparison circuit 24 of the print control unit 10 determines that the count value is, for example, “
A sudden change from “104” to “35” is detected. Since “35” is, for example, half or less of “104”, it is determined that the phase signal B is abnormal, and the current count value is “ 35
”Without using the previous stored count value“ 104 ”stored in the count value storage register 26.
Is corrected by the correction control circuit 28 until time t2.

図6は本実施形態のプリンタに備えられる印字制御部10のタイマ値を設定するための
動作を説明するためのフローチャートである。このフローチャートを参照して印字制御部
10のタイマ値を設定する動作について説明する。
FIG. 6 is a flowchart for explaining the operation for setting the timer value of the print control unit 10 provided in the printer of this embodiment. The operation of setting the timer value of the print control unit 10 will be described with reference to this flowchart.

印字制御部10において、位相信号検出回路21はエンコーダ2からの位相信号Aおよ
び位相信号Bを検出し(ステップS1)、次に、正逆検出回路22では位相信号Aの立下
りを検出して、そのときのカウント値は正しか否かを判定する(ステップS2)。そのカ
ウント値が正しければ、モータ1は、正回転していると判定される(ステップS3)。こ
の場合、キャリア6は印字ヘッド7を印字する方向に移動させていることになる。ステッ
プS3において、モータ1は正回転していると判定した後、ステップS1に戻る。
In the print controller 10, the phase signal detection circuit 21 detects the phase signal A and the phase signal B from the encoder 2 (step S1), and then the forward / reverse detection circuit 22 detects the falling edge of the phase signal A. Then, it is determined whether or not the count value at that time is positive (step S2). If the count value is correct, it is determined that the motor 1 is rotating forward (step S3). In this case, the carrier 6 has moved the print head 7 in the printing direction. In step S3, after determining that the motor 1 is rotating forward, the process returns to step S1.

一方、前記カウント値が正しくなければ(ステップS2)、比較回路24では、前記カ
ウント値はカウント値格納レジスタ26に格納されている格納カウント値の例えば、2分
の1以下か否かを判定し(ステップS4)、前記カウント値が前記格納カウント値の2分
の1以下でない場合は、正逆検出回路22は、位相信号Bの立下がりを検出して、モータ
1は逆回転していると判定し(ステップS5)、ステップS1に戻るが、前記カウント値
が前記格納カウント値の2分の1以下であれば、タイマ値を補正する処理が行われる(ス
テップS6)。
On the other hand, if the count value is not correct (step S2), the comparison circuit 24 determines whether or not the count value is, for example, half or less of the stored count value stored in the count value storage register 26. (Step S4), if the count value is not less than half of the stored count value, the forward / reverse detection circuit 22 detects the fall of the phase signal B, and the motor 1 is rotating in the reverse direction. A determination is made (step S5), and the process returns to step S1, but if the count value is half or less of the stored count value, a process for correcting the timer value is performed (step S6).

即ち、ステップS6では、例えば図3(7)に示すように位相信号BにエラーE1が発
生したとき、図3(9)に示すようにカウント値「38」「62」の代わりに、カウント
値格納レジスタ26に格納された前回の格納カウント値「101」を用い、図3(12)
に示すようなタイマ値「101」に補正して(ステップS7,S8)、そのタイマ値「1
01」をタイマ値設定レジスタ27に設定する。この後、ステップS1に戻り、同様な処
理が行われる。
That is, in step S6, for example, when an error E1 occurs in the phase signal B as shown in FIG. 3 (7), instead of the count values “38” and “62” as shown in FIG. Using the previous stored count value “101” stored in the storage register 26, FIG.
Is corrected to the timer value “101” as shown in (Steps S7 and S8), and the timer value “1” is corrected.
01 ”is set in the timer value setting register 27. Thereafter, the process returns to step S1 and the same processing is performed.

このような処理を行えば、エンコーダ2や、そのスリットに不具合が発生しても、その
時の異常なカウント値は無視し、タイマ値としてはエラー発生前の格納カウント値を用い
ることができ、これにより、エラー時の印字タイミング信号の補間ができ、印字タイミン
グ信号を正しく出力することができるようになる。
If such a process is performed, even if a malfunction occurs in the encoder 2 or its slit, the abnormal count value at that time can be ignored, and the stored count value before the error can be used as the timer value. Thus, the printing timing signal at the time of error can be interpolated, and the printing timing signal can be output correctly.

以上説明したように上記実施形態によれば、エンコーダ2や、そのスリットに不具合が
生じ、エンコーダ2からの位相信号Aと位相信号Bとの間に、本来の位相ずれよりも、エ
ラーによる大きい位相ずれがあった場合でも、タイマ値を補正することによって、印字ヘ
ッド7の印字タイミングが補正されて、印字ずれを軽減でき、また、キャリアの移動ムラ
や、給紙フィーダの回転ムラも減少させることができ、したがって、印字精度の向上を図
れる。
As described above, according to the above-described embodiment, a problem occurs in the encoder 2 and its slit, and the phase between the phase signal A and the phase signal B from the encoder 2 is larger than the original phase shift due to an error. Even if there is a deviation, by correcting the timer value, the printing timing of the print head 7 can be corrected, the printing deviation can be reduced, and uneven movement of the carrier and uneven rotation of the paper feeder can be reduced. Therefore, the printing accuracy can be improved.

本発明の一実施形態に係るプリンタの構成を示すブロック図である。1 is a block diagram illustrating a configuration of a printer according to an embodiment of the present invention. 図1中の印字制御部の特徴とする構成を示すブロック図である。FIG. 2 is a block diagram illustrating a characteristic configuration of a print control unit in FIG. 1. 前記印字制御部の動作を説明するためのタイミングチャートである。6 is a timing chart for explaining an operation of the print control unit. 前記実施形態のプリンタに備えられるキャリアの状態移行図である。It is a state transition diagram of a carrier provided in the printer of the embodiment. 前記実施形態のプリンタにおいて位相信号Bにエラーが発生した場合の補正処理を説明するための状態移行図である。FIG. 6 is a state transition diagram for explaining correction processing when an error occurs in the phase signal B in the printer of the embodiment. 前記印字制御部のタイマ値を設定するための動作を説明するためのフローチャートである。6 is a flowchart for explaining an operation for setting a timer value of the print control unit. 従来のプリンタに備えられる印字制御部の動作を説明するためのタイミングチャートである。It is a timing chart for demonstrating operation | movement of the printing control part with which the conventional printer is equipped. 従来のプリンタに備えられるキャリアの状態移行図である。It is a state transition diagram of a carrier provided in a conventional printer.

符号の説明Explanation of symbols

1 モータ(駆動手段)
2 エンコーダ
6 キャリア
7 印字ヘッド
10 印字制御部
21 位相信号検出回路(位相信号検出手段)
23 エッジ検出回路(エッジ検出手段)
24 比較回路(比較手段)
25 カウンタ(カウント手段)
26 カウント値格納レジスタ(格納手段)
27 タイマ値設定レジスタ(タイマ値設定手段)
28 補正制御回路(補正制御手段)
1 Motor (drive means)
2 Encoder 6 Carrier 7 Print Head 10 Print Control Unit 21 Phase Signal Detection Circuit (Phase Signal Detection Means)
23 Edge detection circuit (edge detection means)
24 Comparison circuit (comparison means)
25 Counter (Counting means)
26 Count value storage register (storage means)
27 Timer value setting register (timer value setting means)
28 Correction control circuit (correction control means)

Claims (3)

印字ヘッドのキャリアを駆動させる駆動手段の速度を検出するエンコーダから出力され
る位相信号に基づいて生成されたタイマ値に従って前記駆動手段および前記印字ヘッドを
制御し、記録用紙に印字を行うプリンタにおいて、前記位相信号としては第1の位相信号
と該第1の位相信号に対して90度位相がずれた第2の位相信号とがあり、前記エンコー
ダからの第1の位相信号および第2の位相信号を検出する位相信号検出手段と、前記検出
された第1の位相信号および第2の位相信号のエッジを検出するエッジ検出手段と、前記
検出された各エッジ間で所定周波数のパルス数をカウントするカウント手段と、前記カウ
ント手段でカウントされた前回のカウント値を前記駆動手段および前記印字ヘッドを制御
するための今回のタイマ値として設定するタイマ値設定手段と、前記カウント値を格納す
る格納手段と、前記カウント手段による今回のカウント値と前記格納手段に格納された前
回の格納カウント値とを比較し今回のカウント値が前回の格納カウント値に比べ所定値以
上異なる場合に補正信号を出力する比較手段と、前記補正信号を入力したとき前記格納手
段に格納されたエラー発生前の格納カウント値を使用して今回のタイマ値を前記タイマ値
設定手段に設定する補正制御手段とを有する印字制御部を備えたことを特徴とするプリン
タ。
In a printer that controls the drive means and the print head according to a timer value generated based on a phase signal output from an encoder that detects the speed of the drive means for driving the carrier of the print head, and prints on a recording sheet. The phase signal includes a first phase signal and a second phase signal that is 90 degrees out of phase with the first phase signal. The first phase signal and the second phase signal from the encoder A phase signal detecting means for detecting the edge, an edge detecting means for detecting edges of the detected first phase signal and the second phase signal, and counting the number of pulses of a predetermined frequency between the detected edges. Counting means, and the previous count value counted by the counting means as the current timer value for controlling the driving means and the print head The timer value setting means to set, the storage means for storing the count value, the current count value by the count means and the previous stored count value stored in the storage means are compared, and the current count value is A comparison unit that outputs a correction signal when the stored count value differs by a predetermined value or more, and a current timer value by using a stored count value stored in the storage unit before an error occurs when the correction signal is input. A printer comprising a print control unit having correction control means for setting the timer value setting means.
印字ヘッドのキャリアを駆動させる駆動手段の速度を検出するエンコーダから出力され
る位相信号に基づいて生成されたタイマ値に従って前記駆動手段および前記印字ヘッドを
制御し、記録用紙に印字を行うプリンタにおいて、前記位相信号としては第1の位相信号
と該第1の位相信号に対して所定角度位相がずれた第2の位相信号とがあり、前記第1の
位相信号および前記第2の位相信号の各エッジ間で所定周波数のパルス数をカウントし、
前回のカウント値を前記駆動手段および前記印字ヘッドを制御するための今回のタイマ値
とし、前記第1の位相信号および前記第2の位相信号の何れか一方にエラーが発生したと
き、エラー発生前のカウント値を使用して今回のタイマ値を設定し、前記駆動手段および
前記印字ヘッドを制御する印字制御部を備えたことを特徴とするプリンタ。
In a printer that controls the drive means and the print head according to a timer value generated based on a phase signal output from an encoder that detects the speed of the drive means for driving the carrier of the print head, and prints on a recording sheet. The phase signal includes a first phase signal and a second phase signal whose phase is shifted by a predetermined angle with respect to the first phase signal, and each of the first phase signal and the second phase signal. Count the number of pulses of a predetermined frequency between edges,
If the previous count value is the current timer value for controlling the drive means and the print head, and an error occurs in either the first phase signal or the second phase signal, the error is not detected. A printer comprising a print control unit that sets a current timer value using the count value of the control unit and controls the drive means and the print head.
前記印字制御部は、前記エンコーダからの第1の位相信号および第2の位相信号を検出
する位相信号検出手段と、前記検出された第1の位相信号および第2の位相信号のエッジ
を検出するエッジ検出手段と、前記検出された各エッジ間で所定周波数のパルス数をカウ
ントするカウント手段と、前記カウント手段でカウントされた前回のカウント値を前記駆
動手段および前記印字ヘッドを制御するための今回のタイマ値として設定するタイマ値設
定手段と、前記カウント値を格納する格納手段と、前記カウント手段による今回のカウン
ト値と前記格納手段に格納された前回の格納カウント値とを比較し今回のカウント値が前
回の格納カウント値に比べ所定値以上異なる場合に補正信号を出力する比較手段と、前記
補正信号を入力したとき前記格納手段に格納されたエラー発生前の格納カウント値を使用
して今回のタイマ値を前記タイマ値設定手段に設定する補正制御手段とを有することを特
徴とする請求項2に記載のプリンタ。
The print control unit detects phase signal detection means for detecting a first phase signal and a second phase signal from the encoder, and detects edges of the detected first phase signal and second phase signal. Edge detection means, count means for counting the number of pulses of a predetermined frequency between the detected edges, and a previous count value counted by the count means for controlling the drive means and the print head Timer value setting means for setting the timer value, storage means for storing the count value, and comparing the current count value by the count means with the previous stored count value stored in the storage means. A comparison means for outputting a correction signal when the value differs by a predetermined value or more compared to the previous stored count value, and the case when the correction signal is input. The printer according to claim 2, characterized in that it comprises a correction control means for setting the current timer value to the timer value setting means using the stored count value prior to the occurrence of the error stored in the unit.
JP2003345877A 2003-10-03 2003-10-03 Printer Pending JP2005111712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003345877A JP2005111712A (en) 2003-10-03 2003-10-03 Printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003345877A JP2005111712A (en) 2003-10-03 2003-10-03 Printer

Publications (1)

Publication Number Publication Date
JP2005111712A true JP2005111712A (en) 2005-04-28

Family

ID=34539014

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003345877A Pending JP2005111712A (en) 2003-10-03 2003-10-03 Printer

Country Status (1)

Country Link
JP (1) JP2005111712A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014039770A (en) * 2012-08-24 2014-03-06 Olympia:Kk Game machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014039770A (en) * 2012-08-24 2014-03-06 Olympia:Kk Game machine

Similar Documents

Publication Publication Date Title
US7208902B2 (en) Digital speed controlling apparatus, digital motor controlling apparatus, paper conveying apparatus, digital speed control method, program for making computer execute this method, computer-readable recording medium, and imaging forming apparatus
JP2008049537A (en) Carrying apparatus, and its controlling method
JP4093191B2 (en) Motor control device and printer
JP7327026B2 (en) drive system
JPH0820138A (en) Image making apparatus
JP4595682B2 (en) Linear drive
JPS63112182A (en) Printer device
JP2005111712A (en) Printer
US7135831B2 (en) Method and device for controlling motor
JP2009220346A (en) Image forming apparatus and program
JP2005178334A (en) Inkjet recording device
JP2005297253A (en) Image forming apparatus
JP2004250133A (en) Sheet transport device, image forming apparatus, and positioning method
EP3431300A1 (en) Printer
US20230347643A1 (en) Pulse generator
JP2006224380A (en) Inkjet recording apparatus
JP3945362B2 (en) Printing apparatus having a DC motor
JPH1127986A (en) Motor controller
JP2006224559A (en) Ink jet printer
KR100205750B1 (en) Automatic compensation of bidirectional print position error in serial printers
JP2836061B2 (en) Serial dot printer
JP2580398B2 (en) Printer print position correction processing method
JP2012218360A (en) Inkjet recording apparatus
JP2007210688A (en) Drive mechanism control device, ink jet recording device, image forming device, control method for motor and computer-readable recording medium storing program for performing the method
JP3458889B2 (en) Printing apparatus and control method thereof

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060426

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060508

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061005

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061108

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20061208

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20070112