JP4748135B2 - Image reading device - Google Patents

Image reading device Download PDF

Info

Publication number
JP4748135B2
JP4748135B2 JP2007257831A JP2007257831A JP4748135B2 JP 4748135 B2 JP4748135 B2 JP 4748135B2 JP 2007257831 A JP2007257831 A JP 2007257831A JP 2007257831 A JP2007257831 A JP 2007257831A JP 4748135 B2 JP4748135 B2 JP 4748135B2
Authority
JP
Japan
Prior art keywords
reading
time
unit
input
restart
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007257831A
Other languages
Japanese (ja)
Other versions
JP2009089160A (en
Inventor
充宏 野▲崎▼
浩史 山口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2007257831A priority Critical patent/JP4748135B2/en
Publication of JP2009089160A publication Critical patent/JP2009089160A/en
Application granted granted Critical
Publication of JP4748135B2 publication Critical patent/JP4748135B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Facsimile Scanning Arrangements (AREA)
  • Storing Facsimile Image Data (AREA)

Description

本発明は、読取ユニットと読取対象との相対位置を変化させてライン毎に画像を読み取る画像読取装置に関する。   The present invention relates to an image reading apparatus that reads an image line by line by changing a relative position between a reading unit and a reading target.

従来、画像読取装置としては、読取対象(原稿)を静止させた状態で、読取ユニットを、読取対象上に搬送し、この間に、読取ユニットに読取動作を実行させることにより、読取対象の画像情報を読み取るフラットベッド型の画像読取装置や、読取ユニットを固定した状態で、読取対象としての原稿を、読取ユニット上に搬送することにより、読取対象の画像情報を読み取るADF(オートドキュメントフィーダ)型の画像読取装置が知られている。   2. Description of the Related Art Conventionally, as an image reading device, a reading unit is transported onto a reading target while the reading target (original) is stationary, and during this time, the reading unit performs a reading operation to thereby read image information on the reading target. An ADF (automatic document feeder) type that reads image information of a reading target by conveying a document as a reading target onto the reading unit in a state where the reading unit is fixed and a reading unit is fixed. An image reading apparatus is known.

この他、読取ユニットや読取対象を搬送するための駆動源としては、パルスモータやDCモータが知られている。パルスモータは、位置制御の容易さ・制御システムの構成の利便性から広く利用されているが、パルスモータには、DCモータよりも駆動時の騒音や消費電力が大きいといった欠点や、DCモータよりも走査の高速性が劣るといった欠点がある。このため、近年では、駆動時の騒音低減・消費電力の低減・高速性の向上を目的とし、駆動源としてDCモータを採用した画像読取装置の開発が活発に行われている。   In addition, pulse motors and DC motors are known as drive sources for conveying the reading unit and the reading target. Pulse motors are widely used due to the ease of position control and the convenience of control system configuration. However, pulse motors have the disadvantages of greater noise and power consumption during driving than DC motors, and However, there is a drawback that the high-speed scanning is inferior. For this reason, in recent years, image reading apparatuses employing a DC motor as a drive source have been actively developed for the purpose of reducing noise during driving, reducing power consumption, and improving high speed.

また、画像読取装置としては、ライン方向に沿って複数個受光素子(フォトダイオード)が配列されたCCDラインセンサを、読取ユニットとして備えたものが知られている。この画像読取装置では、各受光素子に蓄積された電荷に応じた画素データを生成し、一ライン分の画素データを配列してなるライン画像データを生成する。そして、このようなライン毎の動作を繰返し実行することにより、読取対象に対応した画像データを生成する。   As an image reading apparatus, an image reading apparatus including a CCD line sensor in which a plurality of light receiving elements (photodiodes) are arranged along the line direction is known as a reading unit. In this image reading apparatus, pixel data corresponding to the electric charge accumulated in each light receiving element is generated, and line image data formed by arranging pixel data for one line is generated. Then, the image data corresponding to the reading target is generated by repeatedly executing such an operation for each line.

具体的には、ライン画像の読取開始タイミングを指定するラインスタート信号を、一定周期で読取ユニットに入力すると共に、読取ユニット又は読取対象の原稿を搬送対象とし、搬送対象を一定速度で移動させて、読取ユニットに各ラインのライン画像データを生成させ、複数ライン分のライン画像データを結合して、読取対象に対応した画像データを生成する。尚、読取ユニットでは、ラインスタート信号が入力される度に読取動作を実行して、ライン画像データを生成する(例えば、特許文献1参照)。
特開平8−228267号公報
Specifically, a line start signal that specifies the reading start timing of the line image is input to the reading unit at a fixed period, the reading unit or the document to be read is set as a transfer target, and the transfer target is moved at a constant speed. Then, the line image data of each line is generated by the reading unit, and the line image data for a plurality of lines are combined to generate image data corresponding to the reading target. Note that the reading unit executes a reading operation each time a line start signal is input to generate line image data (see, for example, Patent Document 1).
JP-A-8-228267

ところで、近年の読取解像度の高い画像読取装置では、画像読取速度よりも、外部機器へのデータ転送速度や、ガンマ補正などの読取後の画像処理速度のほうが低速になる場合がある。   By the way, in an image reading apparatus having a high reading resolution in recent years, a data transfer speed to an external device or an image processing speed after reading such as gamma correction may be slower than an image reading speed.

この場合には、読取ユニットから出力される画像データを蓄積しておくためのバッファが、原稿一枚分の画像読取動作を完了するまでに、一杯になるため、従来の画像読取装置では、バッファの空き容量が閾値未満となった時点で、一時読取動作を停止し、バッファの空き容量がある程度確保できた時点で、読取動作を再開させている。   In this case, since the buffer for storing the image data output from the reading unit is full before the image reading operation for one original is completed, the conventional image reading apparatus uses a buffer. The temporary reading operation is stopped when the free space becomes less than the threshold, and the reading operation is resumed when the free space of the buffer can be secured to some extent.

しかしながら、読取動作を一旦停止して、これを再開する場合には、読取中断位置と読取再開位置とのズレにより、画像データの画質が悪化してしまう場合がある。
周知のように、搬送対象の位置検出では、搬送対象を搬送するモータが所定量δ回転する度にパルス信号を出力するロータリーエンコーダや、読取ユニットが所定量δ移動する度にパルス信号を出力するリニアエンコーダなどが用いられるが、エンコーダを用いた位置検出では、エンコーダの分解能以上の位置情報を得ることはできない。即ち、上記所定量δに対応する距離の精度でしか、搬送対象の位置を検出することができない。
However, when the reading operation is temporarily stopped and restarted, the image quality of the image data may deteriorate due to a deviation between the reading interruption position and the reading restart position.
As is well known, in detecting the position of a conveyance target, a rotary encoder that outputs a pulse signal every time the motor that conveys the conveyance target rotates a predetermined amount δ, or a pulse signal is output every time the reading unit moves a predetermined amount δ. Although a linear encoder or the like is used, position information that exceeds the resolution of the encoder cannot be obtained by position detection using the encoder. That is, the position of the conveyance target can be detected only with the accuracy of the distance corresponding to the predetermined amount δ.

また、駆動源としてDCモータを用いる場合には、搬送対象の位置制御を高精度に実現できないため、ラインスタート信号の入力と、搬送対象の移動とは、非同期である。即ち、駆動源としてDCモータを用いる場合には、駆動源としてパルスモータを用いる場合のように、ラインスタート信号の入力に同期させて、モータを回転させることができない。   In addition, when a DC motor is used as the drive source, the position control of the conveyance target cannot be realized with high accuracy, and therefore, the input of the line start signal and the movement of the conveyance target are asynchronous. That is, when a DC motor is used as the drive source, the motor cannot be rotated in synchronization with the input of the line start signal, unlike when a pulse motor is used as the drive source.

このため、一旦、読取が中断すると、読取が中断したラインに対応するラインスタート信号の入力時に搬送対象がいた地点、即ち、読取中断位置について、所定量δに対応する精度でしか正しい位置がわからなくなる。よって、読取中断位置と、読取再開位置と、にズレが生じて、従来技術では、読取対象に対し、画像データが表す画像が、間延びしたり潰れた画像になってしまい、画質が悪化してしまうのである。   For this reason, once the reading is interrupted, the correct position can be known only with the accuracy corresponding to the predetermined amount δ with respect to the point where the conveyance target is present when the line start signal corresponding to the line where the reading is interrupted is input. Disappear. Therefore, a deviation occurs between the reading interruption position and the reading resumption position, and in the conventional technique, the image represented by the image data becomes a stretched or crushed image with respect to the reading target, and the image quality deteriorates. It ends up.

本発明は、こうした問題に鑑みなされたものであり、読取中断位置と読取再開位置とのズレを抑えて、読取対象に対応した高画質な画像データを生成することが可能な画像読取装置を提供することを目的とする。   The present invention has been made in view of these problems, and provides an image reading apparatus capable of generating high-quality image data corresponding to a reading target while suppressing a deviation between a reading interruption position and a reading restart position. The purpose is to do.

かかる目的を達成するためになされた本発明の画像読取装置(請求項1)は、読取対象の画像情報を読み取る読取ユニットと、DCモータの駆動力により、読取ユニット及び読取対象のいずれか一方を搬送対象として搬送する搬送機構と、搬送機構を通じて、搬送対象の移動速度を制御し、搬送対象を、画像読取方向に定速で移動させると共に、ラインスタート信号を、読取ユニットに周期的に入力することにより、読取ユニットに、ライン画像の読取開始タイミングを指定して、ライン毎に読取動作を行わせ、各ラインの読取画像データを、読取ユニットに生成させ、生成された読取画像データを、バッファに書き込む処理を実行する読取制御手段と、を備える。   In order to achieve the above object, an image reading apparatus according to the present invention (Claim 1) includes a reading unit that reads image information to be read, and either a reading unit or a reading object by a driving force of a DC motor. Through the transport mechanism that transports as a transport target, the transport speed of the transport target is controlled through the transport mechanism, the transport target is moved at a constant speed in the image reading direction, and a line start signal is periodically input to the reading unit. Thus, the reading unit designates the reading start timing of the line image, performs the reading operation for each line, causes the reading unit to generate the read image data of each line, and stores the generated read image data in the buffer. Read control means for executing a process of writing data into the data.

この画像読取装置は、更に、中断判定手段と、停止制御手段と、事象発生信号出力手段と、位置検出手段と、再開位置設定手段と、後退制御手段と、再開判定手段と、を備え、中断判定手段により、読取制御手段による処理の中断要否を判定する。そして、中断が必要であると判定すると、停止制御手段にて、読取制御手段による処理を中断させる。尚、中断判定手段は、バッファの空き容量に基づき、読取制御手段による処理の中断要否を判定する構成にすることができる(請求項6)。   The image reading apparatus further includes an interruption determination unit, a stop control unit, an event occurrence signal output unit, a position detection unit, a restart position setting unit, a reverse control unit, and a restart determination unit. The determination unit determines whether or not the processing by the reading control unit is interrupted. When it is determined that the interruption is necessary, the stop control unit interrupts the processing by the reading control unit. The interruption determination means can be configured to determine whether or not it is necessary to interrupt the processing by the reading control means based on the free capacity of the buffer.

また、この画像読取装置において、事象発生信号出力手段は、搬送対象が所定量移動する度、事象発生信号を出力し、位置検出手段は、事象発生信号出力手段から入力される事象発生信号に基づき、搬送対象の現在位置を検出する。事象発生信号出力手段としては、上述したエンコーダを挙げることができる。   Further, in this image reading apparatus, the event occurrence signal output means outputs an event occurrence signal every time the conveyance target moves by a predetermined amount, and the position detection means is based on the event occurrence signal input from the event occurrence signal output means. The current position of the conveyance target is detected. As the event generation signal output means, the encoder described above can be used.

また、再開位置設定手段は、「停止制御手段の動作によって読取制御手段による処理が中断されたラインに対応するラインスタート信号が読取ユニットに入力された」時点TSと、時点TSより過去において、事象発生信号出力手段から最後に事象発生信号が入力された時点TP(但し、ここで言う時点TPは、時点TSを含んでもよいし、含まなくてもよい。)と、時点TPの経過後、最初に前記事象発生信号が入力された時点TFと、の時間的な関係に基づき、時点TPで位置検出手段により検出された位置XP、及び、時点TFで位置検出手段により検出された位置XFのいずれか一方を選択的に、読取再開位置に設定する。   In addition, the restart position setting means is configured such that the event TS has a point in time before “the line start signal corresponding to the line for which the processing by the reading control means is interrupted by the operation of the stop control means is input to the reading unit”, and past the time TS. The time TP when the event occurrence signal is last input from the generation signal output means (however, the time TP mentioned here may or may not include the time TS), and after the elapse of the time TP, Of the position XP detected by the position detecting means at the time TP and the position XF detected by the position detecting means at the time TF based on the temporal relationship with the time TF when the event occurrence signal is input to Either one is selectively set as a reading resume position.

この他、後退制御手段は、停止制御手段の動作によって読取制御手段による処理が中断させられると、搬送機構を通じ、搬送対象を、画像読取方向とは逆方向に、再開位置設定手段により設定された読取再開位置より進んだ位置まで、移動させる。また、再開判定手段は、読取制御手段による処理が中断されている期間、読取制御手段による処理の再開要否を判定する。   In addition, when the processing by the reading control unit is interrupted by the operation of the stop control unit, the retreat control unit sets the conveyance target through the conveyance mechanism in the direction opposite to the image reading direction by the resume position setting unit. Move to a position advanced from the reading resume position. The resumption determination unit determines whether or not the resumption of the processing by the reading control unit is necessary during the period when the processing by the reading control unit is interrupted.

そして、再開判定手段により再開が必要であると判定されると、読取制御手段は、後退制御手段により移動された搬送対象を、再度、画像読取方向に、定速で移動させると共に、位置検出手段の検出結果に基づき、搬送対象が、再開位置設定手段により設定された読取再開位置に到達した時点で、読取ユニットにラインスタート信号を入力し、以後、周期的にラインスタート信号を入力することより、上記読取再開位置から、読取ユニットに読取動作を実行させ、読取ユニットにより生成された読取画像データを、バッファに書き込む処理を実行する。   When it is determined by the restart determining means that the restart is necessary, the reading control means again moves the conveyance object moved by the backward control means in the image reading direction at a constant speed, and the position detecting means. The line start signal is input to the reading unit when the conveyance target reaches the reading restart position set by the restart position setting means based on the detection result of the above, and thereafter the line start signal is periodically input thereafter. Then, from the reading restart position, the reading unit is caused to execute a reading operation, and the read image data generated by the reading unit is written into the buffer.

このように動作する画像読取装置によれば、時点TSと、時点TSを挟む時点TP及び時点TFとの時間的な関係に基づいて、位置XP及び位置XFの内、時点TSで搬送対象がいた読取中断位置に近いほうを選択して、読取再開位置を設定することができるので、読取中断位置と読取再開位置とのズレを抑え、良好な画質の画像データを生成することができる。   According to the image reading apparatus that operates in this manner, based on the temporal relationship between the time point TS and the time point TP and the time point TF that sandwich the time point TS, there was a conveyance target at the time point TS among the positions XP and XF. Since the position closer to the reading interruption position can be selected and the reading resumption position can be set, the deviation between the reading interruption position and the reading resumption position can be suppressed, and image data with good image quality can be generated.

具体的に、この画像読取装置は、時点TPから時点TSまでの時間長さLP、及び、時点TSから時点TFまでの時間長さLFを計測し、計測した時間長さLPと時間長さLFとの関係に基づき、読取再開位置を、設定する構成にすることができる(請求項2)。   Specifically, the image reading apparatus measures the time length LP from the time point TP to the time point TS and the time length LF from the time point TS to the time point TF, and the measured time length LP and time length LF. Based on the relationship, the reading resumption position can be set (claim 2).

また、再開位置設定手段は、時間長さLPが時間長さLFより短い場合、時点TPで位置検出手段により検出された位置XPを、読取再開位置に設定し、時間長さLPが時間長さLFより長い場合、時点TFで位置検出手段により検出された位置XFを、読取再開位置に設定する構成にすることができる(請求項3)。このように再開位置設定手段が構成された画像読取装置によれば、上述したように、読取中断位置と読取再開位置とのズレを抑え、良好な画質の画像データを生成することができる。   Further, when the time length LP is shorter than the time length LF, the restart position setting means sets the position XP detected by the position detection means at the time TP as the reading resume position, and the time length LP is the time length. In the case where it is longer than LF, the position XF detected by the position detection means at the time TF can be set as the reading restart position (claim 3). As described above, according to the image reading apparatus in which the restart position setting unit is configured as described above, it is possible to suppress the deviation between the reading interruption position and the reading restart position and generate image data with good image quality.

但し、時間長さLFを計測する画像読取装置では、読取の中断が確定した後でも、時間長さLFを計測するまで、搬送対象を減速させて反転させることができない。即ち、時間長さLPと、時間長さLFとの関係に基づいて、読取中断位置と、位置XP,XFとの距離的な関係を正しく評価するには、その間の搬送対象が一定速度である必要があり、時点TSで減速を開始してしまうと、その距離的な関係を正しく評価できなくなってしまう。   However, in the image reading apparatus that measures the time length LF, the conveyance target cannot be decelerated and reversed until the time length LF is measured even after the interruption of reading is confirmed. That is, based on the relationship between the time length LP and the time length LF, in order to correctly evaluate the distance relationship between the reading interruption position and the positions XP and XF, the conveyance target between them is a constant speed. If it is necessary and deceleration is started at the time TS, the distance relationship cannot be correctly evaluated.

従って、時点TSの経過後、直ちに搬送対象を減速させて反転させる場合には、画像読取装置を、次のように構成されるとよい。
即ち、画像読取装置は、事象発生信号出力手段から入力される事象発生信号に基づき、事象発生信号の入力時間間隔LIを検出する入力時間間隔検出手段を備えると共に、「時点TSより過去において事象発生信号出力手段から最後に事象発生信号が入力された」時点TPと時点TSとの間の時間長さLP、を検出する時間長さ検出手段を備える構成にされるとよい。
Therefore, when the conveyance target is decelerated and reversed immediately after the elapse of time TS, the image reading apparatus may be configured as follows.
That is, the image reading apparatus includes input time interval detection means for detecting the input time interval LI of the event occurrence signal based on the event occurrence signal input from the event occurrence signal output means, It may be configured to include time length detection means for detecting a time length LP between the time point TP and the time point TS when the event occurrence signal is last input from the signal output means.

このとき、再開位置設定手段は、時間長さ検出手段により検出された時間長さLPと、時点TPで、入力時間間隔検出手段により検出された事象発生信号の入力時間間隔LIとの関係に基づき、時点TPで位置検出手段により検出された位置XP、及び、時点TPの経過後、最初に事象発生信号が入力された時点TFで位置検出手段により検出された位置XFのいずれか一方を選択的に、読取再開位置に設定する構成にすることができる(請求項4)。   At this time, the restart position setting means is based on the relationship between the time length LP detected by the time length detection means and the input time interval LI of the event occurrence signal detected by the input time interval detection means at the time TP. The position XP detected by the position detection means at the time TP and the position XF detected by the position detection means at the time TF when the event occurrence signal is first input after the time TP has elapsed are selectively selected. In addition, it is possible to adopt a configuration in which the reading is resumed (claim 4).

時点TSまで、搬送対象は等速に制御されるので、このように画像読取装置を構成すれば、時間間隔LIと時間長さLPとの関係から、時点TSから時点TFまでの時間長さLFを推定することができる。従って、この画像読取装置によれば、位置XP及び位置XFの内、時点TSで搬送対象がいた読取中断位置に近いほうを選択して、読取再開位置を設定することができ、読取中断位置と読取再開位置とのズレを抑え、良好な画質の画像データを生成することができる。   Since the conveyance target is controlled at a constant speed until the time point TS, if the image reading apparatus is configured in this way, the time length LF from the time point TS to the time point TF is obtained from the relationship between the time interval LI and the time length LP. Can be estimated. Therefore, according to this image reading apparatus, it is possible to select a position closer to the reading interruption position where the conveyance target is located at the time TS among the positions XP and XF, and set the reading resumption position. The deviation from the reading restart position can be suppressed, and image data with good image quality can be generated.

尚、このように画像読取装置を構成する場合、時間長さLPが入力時間間隔LIの二分の一より小さいとき、時点TPで前記位置検出手段により検出された位置XPを、読取再開位置に設定し、時間長さLPが入力時間間隔LIの二分の一より大きいとき、時点TFで位置検出手段により検出された位置XFを、読取再開位置に設定するように、再開位置設定手段を構成することで、高精度に、読取中断位置と読取再開位置とのズレを抑え、良好な画質の画像データを生成することができる(請求項5)。   In the case of configuring the image reading apparatus in this way, when the time length LP is smaller than one half of the input time interval LI, the position XP detected by the position detecting means at the time TP is set as the reading resume position. When the time length LP is greater than one half of the input time interval LI, the restart position setting means is configured to set the position XF detected by the position detection means at the time TF as the reading restart position. Thus, it is possible to suppress the deviation between the reading interruption position and the reading resumption position with high accuracy and generate image data with good image quality.

以下に本発明の実施例について、図面と共に説明する。
(1)画像読取装置1の全体構成
図1は、本発明が適用された画像読取装置1の電気的構成を表すブロック図である。本実施例の画像読取装置1は、各種演算処理を実行するCPU11、各種プログラムやデータ等を記憶するROM12、及び、CPU11による演算時に作業領域として使用されるRAM13を備え、CPU11にて各種プログラムを実行して、装置全体を統括制御し、スキャナ機能等を実現する。
Embodiments of the present invention will be described below with reference to the drawings.
(1) Overall Configuration of Image Reading Apparatus 1 FIG. 1 is a block diagram showing an electrical configuration of the image reading apparatus 1 to which the present invention is applied. The image reading apparatus 1 according to the present embodiment includes a CPU 11 that executes various arithmetic processes, a ROM 12 that stores various programs and data, and a RAM 13 that is used as a work area when the CPU 11 performs calculations. Execute to control the entire device and realize the scanner function.

この画像読取装置1は、更に、CCDラインセンサ20と、CCDラインセンサ20を制御する読取制御部21と、モータMT1,MT2を制御する駆動制御部17と、エンコーダEN1,EN2からのパルス信号に基づく処理を実行するエンコーダ処理部15と、外部インタフェース23と、を備え、外部インタフェース23を介して、外部機器(パーソナルコンピュータ等)と通信可能な構成にされている。外部インタフェース23としては、例えば、USBインタフェースを挙げることができる。   The image reading apparatus 1 further includes a CCD line sensor 20, a reading control unit 21 that controls the CCD line sensor 20, a drive control unit 17 that controls the motors MT1 and MT2, and pulse signals from the encoders EN1 and EN2. The encoder processing unit 15 that executes the processing based on the above and an external interface 23 are configured to be communicable with an external device (such as a personal computer) via the external interface 23. An example of the external interface 23 is a USB interface.

CCDラインセンサ20は、ライン状に配列された受光素子(フォトダイオード)群20a及びCCDアナログシフトレジスタ20bを備えるものであり(図7参照)、読取制御部21に制御されて、ラインスタート信号が入力される度、受光素子にて蓄積された画素情報を表す信号電荷を、CCDアナログシフトレジスタ20bに入力し、次のラインスタート信号が入力されるまでの期間に、このCCDアナログシフトレジスタ20bの出力端から、転送クロック信号に従って、順次画素信号を出力する。   The CCD line sensor 20 includes a light receiving element (photodiode) group 20a and a CCD analog shift register 20b arranged in a line (see FIG. 7), and is controlled by the reading control unit 21 so that a line start signal is transmitted. Each time it is input, signal charges representing pixel information accumulated in the light receiving element are input to the CCD analog shift register 20b, and during the period until the next line start signal is input, From the output end, pixel signals are sequentially output according to the transfer clock signal.

読取制御部21は、このCCDラインセンサ20にラインスタート信号及び転送クロック信号を入力して、CCDラインセンサ20を制御し、CCDラインセンサ20に、読取対象である原稿の画像情報を読み取らせ、CCDラインセンサ20から出力される読取結果としての画素信号を、ディジタルの画素データに変換する。そして、各画素データを配列してライン画像データを生成し、これをRAM13に書き込む。   The reading control unit 21 inputs a line start signal and a transfer clock signal to the CCD line sensor 20, controls the CCD line sensor 20, and causes the CCD line sensor 20 to read image information of a document to be read. A pixel signal as a reading result output from the CCD line sensor 20 is converted into digital pixel data. Then, each pixel data is arranged to generate line image data, which is written in the RAM 13.

このCCDラインセンサ20は、自動搬送読取機能の作動時、所定の読取位置に固定され、読取制御部21の制御を受けて、ADF装置150(図2参照)の動作により読取位置を通過する原稿を読み取る。また、CCDラインセンサ20は、静止原稿読取機能の作動時、駆動制御部17が制御する読取モータMT1の回転力をキャリッジを介して受けて、原稿が載置されたプラテン102A下で、画像読取方向に移動し、その移動と共に、原稿の画像情報を、ライン毎に読み取る。   The CCD line sensor 20 is fixed at a predetermined reading position when the automatic conveyance reading function is operated, and receives an original from the reading position by the operation of the ADF device 150 (see FIG. 2) under the control of the reading control unit 21. Read. The CCD line sensor 20 receives the rotational force of the reading motor MT1 controlled by the drive control unit 17 through the carriage when the stationary document reading function is activated, and reads the image under the platen 102A on which the document is placed. The image information of the original is read for each line along with the movement.

詳述すると、画像読取装置1の筐体には、図2に示すように、静止原稿読取機能用の画像読取窓(以下、静止読取窓という。)102、及び、自動搬送読取機能用の画像読取窓(以下、自動読取窓という。)103が設けられている。これら両読取窓102,103は、ガラスやアクリル等の透明なプラテン102A、103Aにて閉塞されている。図2は、本実施例の画像読取装置1の機械的構成を示す断面図である。   More specifically, as shown in FIG. 2, an image reading window (hereinafter referred to as a stationary reading window) 102 for a stationary document reading function 102 and an image for an automatic conveyance reading function are provided in the casing of the image reading apparatus 1. A reading window (hereinafter referred to as an automatic reading window) 103 is provided. Both reading windows 102 and 103 are closed by transparent platens 102A and 103A such as glass and acrylic. FIG. 2 is a cross-sectional view showing a mechanical configuration of the image reading apparatus 1 of the present embodiment.

この画像読取装置1においては、更に、装置本体101の上面側に、両読取窓102,103を覆う原稿カバー104が揺動可能に組み付けられており、静止読取窓102にて原稿読取が行われる場合には、使用者により、この原稿カバー104が手動操作にて上方側に開かれ、読取対象の原稿が静止読取窓102に載置される。   In the image reading apparatus 1, a document cover 104 that covers both the reading windows 102 and 103 is swingably assembled on the upper surface side of the apparatus main body 101, and the document is read by the stationary reading window 102. In this case, the document cover 104 is manually opened by the user and the document to be read is placed on the stationary reading window 102.

一方、装置本体101の内部には、両読取窓102、103の直下において、原稿に照射されて反射した光を受光し、その受光した光に基づいて画素信号を生成する上述のCCDラインセンサ20が、移動可能に設けられており、このCCDラインセンサ20は、長手方向(換言すると受光素子配列方向)が、CCDラインセンサ20の移動方向とは、垂直な方向に延びている。   On the other hand, inside the apparatus main body 101, the CCD line sensor 20 described above receives the light reflected and reflected on the document just below the reading windows 102 and 103, and generates a pixel signal based on the received light. However, the CCD line sensor 20 has a longitudinal direction (in other words, a light receiving element arrangement direction) extending in a direction perpendicular to the moving direction of the CCD line sensor 20.

具体的に、このCCDラインセンサ20は、キャリッジ106を介して装置本体101の長手方向(図2の左右方向)に移動可能に組み付けられており、自動搬送読取機能の作動時、自動読取窓103の直下に停止配置される。一方、静止原稿読取機能の作動時には、静止読取窓102の直下で、駆動制御部17に制御されて、定速移動する。   Specifically, the CCD line sensor 20 is assembled so as to be movable in the longitudinal direction of the apparatus main body 101 (the left-right direction in FIG. 2) via the carriage 106, and the automatic reading window 103 is activated when the automatic conveyance reading function is activated. It is placed immediately below. On the other hand, when the stationary document reading function is activated, it moves at a constant speed under the control of the drive control unit 17 immediately below the stationary reading window 102.

尚、本実施例では、キャリッジ106が、駆動プーリ107及び従動プーリ108に掛けられたベルト109に連結されており、このベルト109には、ギヤを介してDCモータで構成される読取モータMT1が接続されている。   In this embodiment, the carriage 106 is connected to a belt 109 that is hung on a driving pulley 107 and a driven pulley 108, and a reading motor MT1 constituted by a DC motor is connected to the belt 109 via a gear. It is connected.

即ち、静止原稿読取機能の作動時、CCDラインセンサ20は、読取モータMT1の回転力をベルト109を介して受け、ベルト109と平行に設置されたガイド軸111に案内されながら、装置本体101の長手方向を真っ直ぐ移動する。図3は、CCDラインセンサ20の移動態様を表す説明図である。   That is, when the stationary document reading function is activated, the CCD line sensor 20 receives the rotational force of the reading motor MT1 through the belt 109 and is guided by the guide shaft 111 installed in parallel with the belt 109, while Move straight in the longitudinal direction. FIG. 3 is an explanatory diagram showing a movement mode of the CCD line sensor 20.

読取モータMT1の回転軸には、読取エンコーダEN1が設けられており、読取エンコーダEN1は、読取モータMT1が所定角度回転する度に、パルス信号(A相信号、B相信号)を出力するロータリーエンコーダとして構成されている。画像読取装置1は、読取モータMT1が所定角度回転すると、CCDラインセンサ20が、所定距離を移動する構成にされており、本実施例では、この読取エンコーダEN1のパルス信号に基づき、エンコーダ処理部15にて、CCDラインセンサ20の位置や移動速度を検出し、更に、A相信号及びB相信号に基づき、モータの回転方向を検出する。   A reading encoder EN1 is provided on the rotation shaft of the reading motor MT1, and the reading encoder EN1 outputs a pulse signal (A phase signal, B phase signal) every time the reading motor MT1 rotates by a predetermined angle. It is configured as. The image reading apparatus 1 is configured such that when the reading motor MT1 rotates by a predetermined angle, the CCD line sensor 20 moves by a predetermined distance. In this embodiment, an encoder processing unit is based on the pulse signal of the reading encoder EN1. At 15, the position and moving speed of the CCD line sensor 20 are detected, and further, the rotational direction of the motor is detected based on the A phase signal and the B phase signal.

そして、画像読取装置1は、この検出結果に基づき、駆動制御部17にて、読取モータMT1を制御し、CCDラインセンサ20を定速で、ガイド軸111に沿って移動させつつ、読取制御部21にて、CCDラインセンサ20を制御し、静止画像読取機能を実現する。   The image reading apparatus 1 controls the reading motor MT1 by the drive control unit 17 based on the detection result, and moves the CCD line sensor 20 at a constant speed along the guide shaft 111 while reading the control unit. At 21, the CCD line sensor 20 is controlled to realize a still image reading function.

この他、読取対象の原稿を自動読取窓103に搬送するADF装置150は、原稿カバー104における自動読取窓103に対応する部位に、設けられており、自動搬送読取機能の作動時において、ユーザにより原稿トレイ165に積層載置された原稿を、分離して、読取位置である自動読取窓103に、搬送する。   In addition, an ADF device 150 that conveys a document to be read to the automatic reading window 103 is provided in a portion of the document cover 104 corresponding to the automatic reading window 103, and is operated by the user when the automatic conveyance reading function is activated. The documents stacked on the document tray 165 are separated and conveyed to the automatic reading window 103 which is a reading position.

このADF装置150は、積層された原稿を1枚ずつ分離する分離機構として、最上層に載置された原稿に搬送力を付与する分離ローラ153と、分離ローラ153に対して対向配置されて分離ローラ153の反対側から原稿に接触し所定の搬送抵抗を付与する分離パッド154と、原稿トレイ165に積層された原稿を吸引するようにして分離ローラ153に原稿を送り出す吸入ローラ155と、を備える。   The ADF device 150 is a separation mechanism that separates the stacked originals one by one, a separation roller 153 that applies a conveying force to the original placed on the uppermost layer, and a separation roller 153 that is disposed opposite the separation roller 153. A separation pad 154 that contacts the document from the opposite side of the roller 153 and applies a predetermined conveyance resistance, and a suction roller 155 that feeds the document to the separation roller 153 so as to suck the document stacked on the document tray 165 are provided. .

また、ADF装置150は、分離機構にて分離された原稿を自動読取窓103に搬送する搬送機構として、分離機構から分離搬送されてきた原稿の搬送方向を自動読取窓103側に向けて転向させながら搬送力を付与する給紙ローラ159と、原稿を給紙ローラ159に押し付ける一対のピンチローラ160と、原稿押さえ161と、排紙ローラ162と、原稿センサアクチュエータ164と、を備える。   In addition, the ADF apparatus 150 turns the direction of conveyance of the document separated and conveyed from the separation mechanism toward the automatic reading window 103 as a conveyance mechanism that conveys the document separated by the separation mechanism to the automatic reading window 103. A paper feed roller 159 that applies a conveying force while being provided, a pair of pinch rollers 160 that press the document against the paper feed roller 159, a document press 161, a paper discharge roller 162, and a document sensor actuator 164 are provided.

尚、ADF装置150を構成する各ローラは、読取搬送モータMT2の回転力を受けて回転し、原稿を、原稿トレイ165から排紙トレイ166へと搬送する構成にされており、画像読取装置1では、読取搬送モータMT2が所定角度回転すると、読取対象の原稿が、所定距離移動する。   Each roller constituting the ADF device 150 is rotated by receiving the rotational force of the reading and conveying motor MT2, and is configured to convey the document from the document tray 165 to the discharge tray 166. Then, when the reading and conveying motor MT2 rotates by a predetermined angle, the original to be read moves by a predetermined distance.

原稿押さえ161は、搬送されてきた原稿を自動読取窓103側に押さえるものである。CCDラインセンサ20は、自動搬送読取機能の作動時、この原稿押さえ161の下方に配置された状態で、この地点を通過する原稿を読み取る。   The document presser 161 presses the conveyed document toward the automatic reading window 103 side. The CCD line sensor 20 reads a document passing through this point while being arranged below the document presser 161 when the automatic conveyance reading function is activated.

また、原稿センサアクチュエータ164は、原稿押さえ161の上流に配置され、原稿が通過したか否かを検出するものである。即ち、本実施例では、原稿センサアクチュエータ164からのオン/オフ信号と、DCモータで構成される読取搬送モータMT2の回転軸に設置された読取搬送エンコーダEN2からのパルス信号とに基づき、エンコーダ処理部15にて、原稿の搬送位置を検出する。尚、読取搬送エンコーダEN2は、読取搬送モータMT2が所定角度回転する度に、パルス信号(A相信号、B相信号)を出力するロータリーエンコーダである。   The document sensor actuator 164 is arranged upstream of the document presser 161 and detects whether or not the document has passed. That is, in this embodiment, the encoder processing is performed based on the ON / OFF signal from the document sensor actuator 164 and the pulse signal from the reading / transporting encoder EN2 installed on the rotation shaft of the reading / transporting motor MT2 formed of a DC motor. The unit 15 detects the document transport position. The reading / transporting encoder EN2 is a rotary encoder that outputs a pulse signal (A phase signal, B phase signal) every time the reading / transporting motor MT2 rotates by a predetermined angle.

そして、画像読取装置1は、この検出結果に基づき、駆動制御部17にて、原稿の搬送を制御し、原稿を読取位置へ一定速度で搬送すると共に、読取制御部21にて、CCDラインセンサ20を制御し、自動搬送読取機能を実現する。   The image reading apparatus 1 controls the conveyance of the original by the drive control unit 17 based on the detection result, conveys the original to the reading position at a constant speed, and the CCD line sensor at the reading control unit 21. 20 is controlled to realize an automatic conveyance reading function.

尚、静止原稿読取機能は、原稿トレイ165に原稿が未載置の状態で、当該画像読取装置1に設けられた読取キー(図示せず)が押下操作されたり、外部インタフェース23を通じて読取指令が入力されると、CPU11が実行するプログラムにより作動を開始する。この作動により、画像読取装置1では、静止読取窓102に載置されている原稿が読み取られる。   The stationary document reading function is such that when a document is not placed on the document tray 165, a reading key (not shown) provided in the image reading apparatus 1 is pressed or a reading command is issued through the external interface 23. When input, the operation is started by a program executed by the CPU 11. With this operation, the image reading apparatus 1 reads the document placed on the stationary reading window 102.

一方、自動搬送読取機能は、原稿トレイ165に原稿が載置された状態で、読取キーが押下操作されたり、外部インタフェース23を通じて読取指令が入力されると、CPU11が実行するプログラムにより作動を開始する。画像読取装置1では、原稿トレイ165に載置された原稿が空になるまで、この自動搬送読取機能が繰返し動作し、原稿トレイ165に載置されている各原稿が、順次読み取られる。尚、原稿トレイ165に原稿が未載置であるか否かは、原稿トレイ165に設けられた図示しないセンサの検出信号に基づき、判断される。
(2)エンコーダ処理部15及び駆動制御部17の詳細構成
続いて、エンコーダ処理部15及び駆動制御部17の詳細構成について、図4〜図6を用いて説明する。図4は、エンコーダ処理部15及び駆動制御部17の構成を表すブロック図である。
(2.1)エンコーダ処理部15の構成
本実施例のエンコーダ処理部15は、エンコーダEN1,EN2の夫々に対して、エンコーダエッジ検出部31及び位置カウンタ33及び周期カウンタ35の組を有し、これらの組により、エンコーダEN1,EN2が設置されたモータMT1,MT2の回転量、結果的には、搬送対象の移動量を検出する構成にされている。
On the other hand, the automatic conveyance reading function starts to operate according to a program executed by the CPU 11 when a reading key is pressed or a reading command is input through the external interface 23 with a document placed on the document tray 165. To do. In the image reading apparatus 1, the automatic conveyance reading function is repeatedly operated until the document placed on the document tray 165 is empty, and each document placed on the document tray 165 is sequentially read. Whether a document is not placed on the document tray 165 is determined based on a detection signal of a sensor (not shown) provided on the document tray 165.
(2) Detailed Configuration of Encoder Processing Unit 15 and Drive Control Unit 17 Subsequently, detailed configurations of the encoder processing unit 15 and the drive control unit 17 will be described with reference to FIGS. FIG. 4 is a block diagram illustrating the configuration of the encoder processing unit 15 and the drive control unit 17.
(2.1) Configuration of Encoder Processing Unit 15 The encoder processing unit 15 of the present embodiment has a set of an encoder edge detection unit 31, a position counter 33, and a period counter 35 for each of the encoders EN1 and EN2. These sets are configured to detect the amount of rotation of the motors MT1 and MT2 in which the encoders EN1 and EN2 are installed, and consequently, the amount of movement of the conveyance target.

具体的に、エンコーダ処理部15のエンコーダエッジ検出部31は、対応するエンコーダEN1,EN2の立ち上がりエッジを検出し、このエッジの検出毎に、エッジ検出信号を出力する構成にされている。このエッジ検出信号は、対応する組の位置カウンタ33及び周期カウンタ35に入力される。   Specifically, the encoder edge detection unit 31 of the encoder processing unit 15 is configured to detect rising edges of the corresponding encoders EN1 and EN2, and to output an edge detection signal each time this edge is detected. This edge detection signal is input to a corresponding set of position counter 33 and period counter 35.

尚、読取エンコーダEN1からのパルス信号(エンコーダ信号)が入力される読取エンコーダEN1用のエンコーダエッジ検出部31から出力されるエッジ検出信号は、読取エンコーダEN1用の位置カウンタ33及び周期カウンタ35に入力されると共に、静止原稿読取機能の作動時、読取制御部21が備える駆動停止指令生成部49、時間計測部51、再開位置設定部55、及び、強制同期指令生成部59に入力される。   The edge detection signal output from the encoder edge detector 31 for the read encoder EN1 to which the pulse signal (encoder signal) from the read encoder EN1 is input is input to the position counter 33 and the period counter 35 for the read encoder EN1. At the same time, when the stationary document reading function is activated, it is input to the drive stop command generating unit 49, the time measuring unit 51, the restart position setting unit 55, and the forced synchronization command generating unit 59 included in the reading control unit 21.

また、読取エンコーダEN1用の位置カウンタ33から出力される値enc_cnt及び読取エンコーダEN1用の周期カウンタ35から出力される値enc_cycは、駆動制御部17に入力されると共に、静止原稿読取機能の作動時、読取制御部21の時間計測部51に入力される。また、読取エンコーダEN1用の位置カウンタ33から出力される値enc_cntは、静止原稿読取機能の作動時、読取制御部21の強制同期指令生成部59にも入力される。   Further, the value enc_cnt output from the position counter 33 for the reading encoder EN1 and the value enc_cyc output from the cycle counter 35 for the reading encoder EN1 are input to the drive control unit 17 and when the stationary document reading function is activated. The time is input to the time measuring unit 51 of the reading control unit 21. The value enc_cnt output from the position counter 33 for the reading encoder EN1 is also input to the forced synchronization command generation unit 59 of the reading control unit 21 when the stationary document reading function is activated.

また、読取搬送エンコーダEN2からのパルス信号が入力される読取搬送エンコーダEN2用のエンコーダエッジ検出部31から出力されるエッジ検出信号は、読取搬送エンコーダEN2用の位置カウンタ33及び周期カウンタ35に入力されると共に、自動搬送読取機能の作動時、読取制御部21が備える駆動停止指令生成部49、時間計測部51、再開位置設定部55、及び、強制同期指令生成部59に入力される。   Further, the edge detection signal output from the encoder edge detector 31 for the read and transport encoder EN2 to which the pulse signal from the read and transport encoder EN2 is input is input to the position counter 33 and the period counter 35 for the read and transport encoder EN2. At the same time, when the automatic conveyance reading function is activated, it is input to the drive stop command generation unit 49, the time measurement unit 51, the restart position setting unit 55, and the forced synchronization command generation unit 59 provided in the reading control unit 21.

また、読取搬送エンコーダEN2用の位置カウンタ33から出力される値enc_cnt及び読取搬送エンコーダEN2用の周期カウンタ35から出力される値enc_cycは、駆動制御部17に入力されると共に、自動搬送読取機能の作動時、読取制御部21の時間計測部51に入力される。また、読取搬送エンコーダEN2用の位置カウンタ33から出力される値enc_cntは、自動搬送読取機能の作動時、読取制御部21の強制同期指令生成部59にも入力される。   Further, the value enc_cnt output from the position counter 33 for the reading and transporting encoder EN2 and the value enc_cyc output from the cycle counter 35 for the reading and transporting encoder EN2 are input to the drive control unit 17 and the automatic transporting and reading function. At the time of operation, it is input to the time measuring unit 51 of the reading control unit 21. Further, the value enc_cnt output from the position counter 33 for the reading and transporting encoder EN2 is also input to the forced synchronization command generating unit 59 of the reading control unit 21 when the automatic transporting and reading function is activated.

尚、周期カウンタ35は、画像読取装置1がオンされると、図5(b)に示すように、対応するエンコーダエッジ検出部31からエッジ検出信号が入力される度、そのエッジ検出信号の入力時間間隔(今回エッジ検出信号が入力された時点と前回エッジ検出信号が入力された時点との時間間隔)を検出して、検出した入力時間間隔を、上記値enc_cycとして、出力する構成にされている。このような動作により、読取エンコーダEN1用の周期カウンタ35は、読取モータMT1が一定角度回転するのに要した時間、結果的には、CCDラインセンサ20の単位距離当たりの移動時間を検出する。同様に、読取搬送エンコーダEN2用の周期カウンタ35は、原稿の単位距離当たりの移動時間を検出する。尚、検出される移動時間の逆数は、速度を表し、駆動制御部17では、この速度情報を用いて、制御対象のモータを制御する。   When the image reading apparatus 1 is turned on, the cycle counter 35 receives the edge detection signal every time an edge detection signal is input from the corresponding encoder edge detection unit 31, as shown in FIG. 5B. The time interval (the time interval between the time when the current edge detection signal is input and the time when the previous edge detection signal is input) is detected, and the detected input time interval is output as the value enc_cyc. Yes. By such an operation, the period counter 35 for the reading encoder EN1 detects the time required for the reading motor MT1 to rotate by a certain angle, and consequently the moving time per unit distance of the CCD line sensor 20. Similarly, the cycle counter 35 for the reading and transport encoder EN2 detects the movement time per unit distance of the document. The reciprocal of the detected moving time represents the speed, and the drive control unit 17 controls the motor to be controlled using this speed information.

また、位置カウンタ33は、画像読取装置1がオンされると、図5(a)に示す処理を開始し、以後、継続的に、値enc_cntを更新する。図5(a)は、位置カウンタ33が実行する処理を表すフローチャートである。ここでは、読取エンコーダEN1用の位置カウンタ33が実行する処理について、図5(a)を用いて説明するが、読取制御エンコーダEN2用の位置カウンタ33においても、読取エンコーダEN1用の位置カウンタ33と、同様の処理が行われる。   Further, when the image reading apparatus 1 is turned on, the position counter 33 starts the processing shown in FIG. 5A, and thereafter continuously updates the value enc_cnt. FIG. 5A is a flowchart showing the process executed by the position counter 33. Here, the processing executed by the position counter 33 for the reading encoder EN1 will be described with reference to FIG. 5A. However, the position counter 33 for the reading encoder EN1 also includes the position counter 33 for the reading control encoder EN2. A similar process is performed.

位置カウンタ33は、図5(a)に示す処理を開始すると、まず、搬送対象(CCDラインセンサ20)が所定の原点位置(ホームポジション)に配置されていることを条件として、変数enc_cntをゼロにリセットし(S110)、その後、エッジ検出信号が、読取エンコーダEN1用のエンコーダエッジ検出部31より入力されるまで待機する(S120)。そして、エッジ検出信号が入力されると、対応する読取モータMT1の回転方向を判断し(S130)、読取モータMT1の回転方向が順方向である場合、変数enc_cntを1加算し(S140)、その後、S120に移行する。一方、読取モータMT1の回転方向が逆方向である場合には、変数enc_cntを1減算し(S150)、S120に移行する。   When the process shown in FIG. 5A is started, the position counter 33 first sets the variable enc_cnt to zero on the condition that the conveyance target (CCD line sensor 20) is arranged at a predetermined origin position (home position). (S110), and then waits until an edge detection signal is input from the encoder edge detector 31 for the reading encoder EN1 (S120). When the edge detection signal is input, the rotation direction of the corresponding reading motor MT1 is determined (S130). If the rotation direction of the reading motor MT1 is the forward direction, the variable enc_cnt is incremented by 1 (S140), and then , S120 is entered. On the other hand, when the rotation direction of the reading motor MT1 is the reverse direction, the variable enc_cnt is decremented by 1 (S150), and the process proceeds to S120.

このようにして、位置カウンタ33は、モータが順方向に回転している場合、エッジ検出信号が入力される度に、変数enc_cntをカウントアップし、モータが逆方向に回転している場合、エッジ検出信号が入力される度に、変数enc_cntをカウントダウンする。これにより読取エンコーダEN1用の位置カウンタ33では、CCDラインセンサ20の位置が検出され、読取搬送エンコーダEN2用の位置カウンタ33では、原稿の搬送位置が検出される。尚、位置検出は、エンコーダのA相信号を用いて、回転方向の検出は、エンコーダのB相信号を用いて、行うことができる。
(2.2)駆動制御部17の詳細構成
続いて、駆動制御部17の構成について説明する。駆動制御部17は、図4に示すように、読取モータMT1及び読取搬送モータMT2を、駆動回路37を介して制御するモータ制御部39を備える。モータ制御部39は、制御対象のモータに取り付けられたエンコーダに対応する位置カウンタ33及び周期カウンタ35の出力enc_cnt,enc_cycに基づき、制御対象のモータMT1,MT2を制御する。
In this way, the position counter 33 counts up the variable enc_cnt every time an edge detection signal is input when the motor is rotating in the forward direction, and when the motor is rotating in the reverse direction, the edge counter 33 Each time a detection signal is input, the variable enc_cnt is counted down. Accordingly, the position counter 33 for the reading encoder EN1 detects the position of the CCD line sensor 20, and the position counter 33 for the reading and conveying encoder EN2 detects the conveyance position of the document. The position detection can be performed using the A phase signal of the encoder, and the rotation direction can be detected using the B phase signal of the encoder.
(2.2) Detailed Configuration of Drive Control Unit 17 Next, the configuration of the drive control unit 17 will be described. As shown in FIG. 4, the drive control unit 17 includes a motor control unit 39 that controls the reading motor MT <b> 1 and the reading conveyance motor MT <b> 2 via a driving circuit 37. The motor control unit 39 controls the motors MT1 and MT2 to be controlled based on the outputs enc_cnt and enc_cyc of the position counter 33 and the cycle counter 35 corresponding to the encoder attached to the motor to be controlled.

詳述すると、モータ制御部39は、エンコーダ処理部15が有する読取エンコーダEN1用の位置カウンタ33及び周期カウンタ35からの値enc_cnt,enc_cycに基づいて、読取モータMT1を制御する共に、読取搬送エンコーダEN2用の位置カウンタ33及び周期カウンタ35からの値enc_cnt,enc_cycに基づいて、読取搬送モータMT2を制御する。   More specifically, the motor control unit 39 controls the reading motor MT1 based on the values enc_cnt and enc_cyc from the position counter 33 and period counter 35 for the reading encoder EN1 included in the encoder processing unit 15, and also reads the reading transport encoder EN2. Based on the values enc_cnt and enc_cyc from the position counter 33 and the cycle counter 35, the reading and conveying motor MT2 is controlled.

具体的に、このモータ制御部39は、読取機能が作動すると、CPU11からの指令を受け、制御対象として読取モータMT1及び読取搬送モータMT2のいずれか一方を選択し、選択した制御対象を制御するために、図6に示す処理の実行を開始する。尚、静止原稿読取機能の作動時には、制御対象として読取モータMT1を選択し、自動原稿読取機能の作動時には、制御対象として読取搬送モータMT2を選択する。   Specifically, when the reading function is activated, the motor control unit 39 receives a command from the CPU 11, selects one of the reading motor MT1 and the reading transport motor MT2 as a control target, and controls the selected control target. Therefore, the execution of the process shown in FIG. 6 is started. When the stationary document reading function is operated, the reading motor MT1 is selected as a control target, and when the automatic document reading function is operated, the reading conveyance motor MT2 is selected as a control target.

その他、モータ制御部39は、読取対象の読取終了前に、モータ停止指令信号としてのmtstop信号(詳細後述)に基づき、図6に示す処理を終了した場合、CPU11から読取再開指令が入力されたときに限って、再び、図6に示す処理の実行を開始する。   In addition, when the process shown in FIG. 6 is completed based on the mtstop signal (detailed later) as a motor stop command signal before the reading of the reading target is completed, the motor control unit 39 receives a reading restart command from the CPU 11. Only once, the execution of the process shown in FIG. 6 is started again.

図6は、モータ制御部39が実行する処理を表すフローチャートである。
モータ制御部39は、図6に示す処理を開始すると、モータ駆動設定を行い、モータ回転方向を順方向(画像読取方向)に設定する(S310)。また、S310では、読取解像度に応じて、モータの目標回転速度を設定する。
FIG. 6 is a flowchart showing processing executed by the motor control unit 39.
When the process shown in FIG. 6 is started, the motor control unit 39 performs motor drive setting, and sets the motor rotation direction to the forward direction (image reading direction) (S310). In S310, the target rotational speed of the motor is set according to the reading resolution.

また、この処理を終えると、モータ制御部39は、先駆けてS310で行った駆動設定の内容に従い、制御対象のモータを制御する(S320)。具体的に、S320では、設定された目標回転速度周辺まで、モータの回転を加速させ、その後、搬送負荷によらず、モータの回転速度が目標回転速度となるように、モータの制御を行う。本実施例では、このようにして、搬送対象を一定速度で画像読取方向に移動させる。   When this process is completed, the motor control unit 39 controls the motor to be controlled in accordance with the content of the drive setting performed in S310 ahead of time (S320). Specifically, in S320, the rotation of the motor is accelerated to around the set target rotation speed, and then the motor is controlled so that the rotation speed of the motor becomes the target rotation speed regardless of the conveyance load. In this embodiment, the conveyance target is moved in the image reading direction at a constant speed in this way.

また、当該制御の実行中には、読取終了信号(詳細後述)が入力されているか否かを判断し(S330)、読取終了信号が入力されていない場合には(S330でNo)、駆動停止指令生成部49から入力されるmtstop信号が値1であるか否かを判断する(S340)。そして、読取終了信号が入力されておらず(S330でNo)、mtstop信号が値1でない場合には(S340でNo)、S330,S340での判断を行いながら、モータの制御を継続的に実行する。   Further, during execution of the control, it is determined whether or not a reading end signal (details will be described later) is input (S330). If the reading end signal is not input (No in S330), the drive is stopped. It is determined whether or not the mtstop signal input from the command generator 49 is a value 1 (S340). If the reading end signal is not input (No in S330) and the mtstop signal is not 1 (No in S340), the motor control is continuously executed while making the determinations in S330 and S340. To do.

そして、mtstop信号が値1に切り替わると、制御対象のモータを減速・停止させる処理を行う(S350)。また、モータが停止した後には、モータ駆動設定を行い、モータ回転方向を画像読取方向とは逆方向に設定すると共に、モータの目標回転速度及び回転時間を、予め定められた所定値に設定する(S360)。尚、S360では、モータの目標回転速度及び回転時間として、「S350でモータが減速・停止するまでに要する回転量の最大値に、S320でモータを目標回転速度に収束させるのに必要十分なモータ回転量を加算した量を、モータが回転する」のに必要な値が設定される。この所定値は、本実施例において、設計段階で予め定められているものとする。   When the mtstop signal is switched to the value 1, a process of decelerating and stopping the motor to be controlled is performed (S350). Further, after the motor stops, the motor drive setting is performed, the motor rotation direction is set to the opposite direction to the image reading direction, and the target rotation speed and rotation time of the motor are set to predetermined predetermined values. (S360). In S360, the target rotation speed and rotation time of the motor are set as “the motor necessary and sufficient to converge the motor to the target rotation speed in S320 to the maximum rotation amount required until the motor decelerates and stops in S350. A value necessary for “the motor rotates” is set by adding the rotation amount. This predetermined value is assumed to be predetermined in the design stage in this embodiment.

また、この処理を終えると、モータ制御部39は、モータを、駆動設定時の設定内容に従い、所定時間、逆方向に回転させる(S370)。この動作によって、モータの回転力により搬送される搬送対象(CCDラインセンサ20又は読取対象の原稿)は、mtstop信号が値1に切り替わった時点にいた地点よりも、加速に十分な前の地点(詳細には、搬送対象が、後述する読取再開位置restart_cntに到達するまでに定速走行可能な地点)に、後退させられる。そして、S370におけるモータの回転・停止が完了すると、一旦休止する。   When this process is completed, the motor control unit 39 rotates the motor in the reverse direction for a predetermined time according to the setting content at the time of drive setting (S370). By this operation, the conveyance target (CCD line sensor 20 or the original to be read) conveyed by the rotational force of the motor is located at a point sufficiently before acceleration (at the point where the mtstop signal is switched to the value 1). More specifically, the conveyance target is moved backward to a point where it can travel at a constant speed before reaching a reading restart position restart_cnt described later. Then, once the rotation / stop of the motor in S370 is completed, the motor is paused.

一方、モータ制御部39は、読取終了信号が入力されると(S330でYes)、作動中の読取機能が静止原稿読取機能であるか否かを判断する(S380)。そして、静止原稿読取機能である場合には(S380でYes)、制御対象のモータを減速・停止させる処理を行い(S390)、モータが停止した後には、モータ駆動設定を行って、モータ回転方向を画像読取方向とは逆方向に設定する(S400)。また、この処理を終えると、モータ制御部39は、制御対象のモータ(読取モータMT1)を駆動して、搬送対象(CCDラインセンサ20)を、ホームポジションまで搬送する(S410)。
そして、CCDラインセンサ20をホームポジションまで搬送すると、一旦休止する。尚、CCDラインセンサ20のホームポジションは、本実施例において、自動原稿読取機能作動時のCCDラインセンサ20の固定位置に設定されている。
On the other hand, when the reading end signal is input (Yes in S330), the motor control unit 39 determines whether or not the operating reading function is a stationary document reading function (S380). If it is a stationary document reading function (Yes in S380), a process of decelerating and stopping the motor to be controlled is performed (S390). After the motor is stopped, the motor drive setting is performed and the motor rotation direction is set. Is set in the direction opposite to the image reading direction (S400). When this process is completed, the motor control unit 39 drives the motor to be controlled (reading motor MT1) and transports the transport target (CCD line sensor 20) to the home position (S410).
Then, when the CCD line sensor 20 is transported to the home position, it temporarily stops. In the present embodiment, the home position of the CCD line sensor 20 is set to a fixed position of the CCD line sensor 20 when the automatic document reading function is activated.

その他、作動中の読取機能が自動搬送読取機能である場合(S380でNo)、モータ制御部39は、制御対象のモータ(読取搬送モータMT2)を、搬送中の原稿が排紙トレイ166に排出されるまで駆動し、原稿の排出が終了した時点で、モータの回転を止めて(S420)、一旦休止する。
(3)読取制御部21の詳細構成
続いて、読取制御部21の詳細構成について説明する。図7は、読取制御部21の詳細構成を表すブロック図である。
In addition, when the reading function in operation is the automatic conveyance reading function (No in S380), the motor control unit 39 discharges the motor to be controlled (the reading conveyance motor MT2), and the document being conveyed is discharged to the discharge tray 166. Until the document is completely discharged, the motor stops rotating (S420) and pauses.
(3) Detailed Configuration of Reading Control Unit 21 Subsequently, a detailed configuration of the reading control unit 21 will be described. FIG. 7 is a block diagram illustrating a detailed configuration of the reading control unit 21.

図7に示すように、読取制御部21は、読取フロントエンド41、画データ処理部43、ローカルRAM45、駆動停止指令生成部49、時間計測部51、再開位置設定部55、及び、強制同期指令生成部59を構成要素として備え、これら各部を用いて、本発明特有の読取制御を実現する。以下、各部の詳細について、個別に説明する。
(3.1)読取フロントエンド41の詳細
本実施例の読取制御部21が備える読取フロントエンド41は、CCDラインセンサ20に接続され、CCDラインセンサ20に対する制御信号を入力すると共に、CCDラインセンサ20から入力される読取結果としての画素信号を受け付けて、処理するものである。
As shown in FIG. 7, the reading control unit 21 includes a reading front end 41, an image data processing unit 43, a local RAM 45, a drive stop command generation unit 49, a time measurement unit 51, a restart position setting unit 55, and a forced synchronization command. The generation unit 59 is provided as a constituent element, and reading control unique to the present invention is realized by using these units. Hereinafter, details of each part will be described individually.
(3.1) Details of Reading Front End 41 The reading front end 41 provided in the reading control unit 21 of the present embodiment is connected to the CCD line sensor 20 and inputs a control signal to the CCD line sensor 20, and the CCD line sensor. The pixel signal as a reading result input from 20 is received and processed.

この読取フロントエンド41は、ラインスタートトリガ信号生成部41a、ラインスタート信号生成部41b、及び、転送クロック信号生成部41cを備え、ラインスタートトリガ信号生成部41aにて周期的にラインスタートトリガ(l_start_trg)信号を生成し、このラインスタートトリガ信号に基づいて、CCDラインセンサ20にライン画像の読取タイミングを指定するためのラインスタート信号を入力する。   The reading front end 41 includes a line start trigger signal generation unit 41a, a line start signal generation unit 41b, and a transfer clock signal generation unit 41c. The line start trigger signal generation unit 41a periodically performs a line start trigger (l_start_trg). ) Signal is generated, and a line start signal for designating the reading timing of the line image is input to the CCD line sensor 20 based on the line start trigger signal.

ラインスタートトリガ信号は、ラインスタート信号の出力タイミングを規定する信号であり、CCDラインセンサ20に入力されるべきラインスタート信号の入力周期で、ラインスタートトリガ信号生成部41aにより生成され、ラインスタート信号生成部41bに入力される。   The line start trigger signal is a signal that defines the output timing of the line start signal. The line start trigger signal is generated by the line start trigger signal generation unit 41a at the input cycle of the line start signal to be input to the CCD line sensor 20, and the line start signal The data is input to the generation unit 41b.

尚、ラインスタートトリガ信号生成部41aは、読取機能が作動すると、ラインスタートトリガ信号の出力を開始し、以後、周期的に、ラインスタートトリガ信号を出力する。また、ラインスタートトリガ信号生成部41aは、読取対象の読取終了前に、ラインスタートトリガ信号の出力を休止すると、強制同期指令生成部59からの同期指令待ち状態に遷移し、その後、強制同期指令生成部59からの同期指令を受けるまで待機する。そして、強制同期指令生成部59からの同期指令を受けると、その指令入力のタイミングで、ラインスタートトリガ信号の出力を再開し、以後、周期的に、ラインスタートトリガ信号を出力する。   The line start trigger signal generator 41a starts outputting the line start trigger signal when the reading function is activated, and thereafter periodically outputs the line start trigger signal. In addition, when the line start trigger signal generation unit 41a pauses the output of the line start trigger signal before the reading of the reading target is completed, the line start trigger signal generation unit 41a transits to a state of waiting for the synchronization command from the forced synchronization command generation unit 59, and then the forced synchronization command. It waits until it receives the synchronous command from the production | generation part 59. FIG. When the synchronization command is received from the forced synchronization command generator 59, the output of the line start trigger signal is restarted at the command input timing, and thereafter the line start trigger signal is periodically output.

また、ラインスタート信号生成部41bは、ラインスタートトリガ信号の入力タイミングで、CCDラインセンサ20に適合する規定のパルス幅のラインスタート信号を、CCDラインセンサ20に入力するものである。このラインスタート信号が入力されるとCCDラインセンサ20では、受光素子に蓄積された信号電荷がCCDアナログシフトレジスタ20bに入力され、ラインスタート信号の当該入力以前に読み取った画像情報がCCDアナログシフトレジスタ20bに記憶保持される。また、このタイミングで、受光素子では、信号電荷がリセットされ、光電効果を利用した新たな読取動作が行われる。   The line start signal generation unit 41b inputs a line start signal having a prescribed pulse width suitable for the CCD line sensor 20 to the CCD line sensor 20 at the input timing of the line start trigger signal. When this line start signal is input, in the CCD line sensor 20, the signal charge accumulated in the light receiving element is input to the CCD analog shift register 20b, and the image information read before the input of the line start signal is the CCD analog shift register. 20b is stored and held. At this timing, the signal charge is reset in the light receiving element, and a new reading operation using the photoelectric effect is performed.

また、転送クロック信号生成部41cは、CCDアナログシフトレジスタ20bに画素信号を出力させるための転送クロック信号を生成するものであり、この転送クロック信号は、CCDラインセンサ20に入力される。   The transfer clock signal generation unit 41 c generates a transfer clock signal for causing the CCD analog shift register 20 b to output a pixel signal, and this transfer clock signal is input to the CCD line sensor 20.

この転送クロック信号の入力により、CCDアナログシフトレジスタ20bに記憶された1ライン分の画像情報は、画素信号として、次のラインスタート信号が入力されるまでの期間に、CCDアナログシフトレジスタ20bから一通り出力される。   The image information for one line stored in the CCD analog shift register 20b by the input of the transfer clock signal is received from the CCD analog shift register 20b until the next line start signal is input as a pixel signal. Is output.

また、CCDアナログシフトレジスタ20bから読取フロントエンド41に入力される画素信号は、読取フロントエンド41が有するA/D(アナログ/ディジタル)変換器41d(図8参照)にてディジタルの画素データに変換され、各画素データは、一ライン分、シリアルに配列されて、ライン画像データとして、画データ処理部43に転送される。   The pixel signal input from the CCD analog shift register 20b to the reading front end 41 is converted into digital pixel data by an A / D (analog / digital) converter 41d (see FIG. 8) of the reading front end 41. Each pixel data is serially arranged for one line and transferred to the image data processing unit 43 as line image data.

尚、このように構成された読取フロントエンド41は、ラインスタートトリガ信号生成部41aから出力されるラインスタートトリガ信号を、時間計測部51にも入力する。
また、読取フロントエンド41は、停止指令信号としてのstop_sig信号が値0から値1に切り替わった時点で、ラインスタートトリガ信号及びラインスタート信号の出力を休止すると共に、この時点でCCDアナログシフトレジスタ20bに記憶保持されている画像情報が、画素信号として一通り出力されるまで、転送クロック信号の出力を継続し、その後、転送クロック信号の出力を休止する。
The reading front end 41 configured in this manner also inputs the line start trigger signal output from the line start trigger signal generation unit 41 a to the time measurement unit 51.
Further, the reading front end 41 stops outputting the line start trigger signal and the line start signal when the stop_sig signal as the stop command signal is switched from the value 0 to the value 1, and at this time, the CCD analog shift register 20b. The output of the transfer clock signal is continued until the image information stored in the memory is output as a pixel signal, and then the output of the transfer clock signal is stopped.

その後、読取フロントエンド41は、強制同期指令生成部59から上記同期指令が入力されるまで待機し、同期指令が入力されると、その時点から、再び、ラインスタートトリガ信号、ラインスタート信号及び転送クロック信号の出力を再開する。
(3.2)画データ処理部43の詳細
続いて、画データ処理部43の詳細について、図7〜図10を用いて説明する。
Thereafter, the reading front end 41 waits until the synchronization command is input from the forced synchronization command generation unit 59. When the synchronization command is input, the line start trigger signal, the line start signal, and the transfer are started again from that point. Resume clock signal output.
(3.2) Details of Image Data Processing Unit 43 Next, details of the image data processing unit 43 will be described with reference to FIGS.

画データ処理部43は、読取フロントエンド41から入力されるライン画像データを、順次、ローカルRAM45に設けられたFIFOメモリとしてのバッファ45aに書き込むと共に、バッファ45aに蓄積された各ライン画像データに対し、シェーディング補正、ガンマ補正等の画像処理を施し、画像処理後の各ライン画像データを、メモリコントローラ63を通じて、RAM13に書き込むデータ処理機能を有する。   The image data processing unit 43 sequentially writes the line image data input from the reading front end 41 into a buffer 45a as a FIFO memory provided in the local RAM 45, and for each line image data stored in the buffer 45a. And a data processing function for performing image processing such as shading correction and gamma correction, and writing each line image data after the image processing to the RAM 13 through the memory controller 63.

また、この画データ処理部43は、バッファ45aの空き容量に基づき、読取フロントエンド41からのライン画像データの転送を一時停止させるための停止指令信号(stop_sig信号)を出力すると共に、ライン画像データの転送を再開させるための再開指令信号(restart_sig信号)を出力する停止再開制御機能を有する。   Further, the image data processing unit 43 outputs a stop command signal (stop_sig signal) for temporarily stopping the transfer of the line image data from the reading front end 41 based on the free space of the buffer 45a, and the line image data. Has a stop / restart control function for outputting a restart command signal (restart_sig signal) for restarting the transfer.

図8は、画データ処理部43で実現される上記データ処理機能に係る説明図である。
画データ処理部43は、データ処理機能を実現するための構成として、データ書込部43a、画像処理部43b、及び、データ転送部43cを備え、読取フロントエンド41から、1ライン分の画像データとしてのライン画像データが入力される度、データ書込部43aにて、このライン画像データを、バッファ45aに書き込む。
FIG. 8 is an explanatory diagram relating to the data processing function realized by the image data processing unit 43.
The image data processing unit 43 includes a data writing unit 43a, an image processing unit 43b, and a data transfer unit 43c as a configuration for realizing a data processing function, and image data for one line from the reading front end 41. When the line image data is input, the data writing unit 43a writes the line image data into the buffer 45a.

また、画データ処理部43は、画像処理部43bにて、バッファ45aの読出位置に記録されたライン画像データを読出し、このライン画像データに対してシェーディング補正やガンマ補正等の画像処理を施し、この画像処理後のライン画像データを、ローカルRAM45内の処理データ記憶部45bに一時保存する。また、画データ処理部43は、処理データ記憶部45bに蓄積された各ライン画像データを、データ転送部43cを通じて、RAM13に書き込み、読取画像を表す画像データを、RAM13上に生成する。   The image data processing unit 43 reads the line image data recorded at the reading position of the buffer 45a in the image processing unit 43b, performs image processing such as shading correction and gamma correction on the line image data, The line image data after the image processing is temporarily stored in the processing data storage unit 45b in the local RAM 45. The image data processing unit 43 writes each line image data stored in the processing data storage unit 45b to the RAM 13 through the data transfer unit 43c, and generates image data representing the read image on the RAM 13.

また、図7に示す画データ処理部43内の機能ブロックは、上記停止再開制御機能に係る機能ブロックを示したものである。
図7に示すように、画データ処理部43は、停止指令信号としてのstop_sig信号を出力する停止信号生成部43dと、再開指令信号としてのrestart_sig信号を出力する再開信号生成部43eと、を備える。
Also, the functional blocks in the image data processing unit 43 shown in FIG. 7 are functional blocks related to the stop / resume control function.
As shown in FIG. 7, the image data processing unit 43 includes a stop signal generation unit 43d that outputs a stop_sig signal as a stop command signal, and a restart signal generation unit 43e that outputs a restart_sig signal as a restart command signal. .

停止信号生成部43dは、具体的に、図9に示す処理を実行して、出力するstop_sig信号の状態を切り換える。図9は、読取機能の作動時に、停止信号生成部43dが実行する処理を表すフローチャートである。   Specifically, the stop signal generation unit 43d executes the processing illustrated in FIG. 9 and switches the state of the output stop_sig signal. FIG. 9 is a flowchart showing the process executed by the stop signal generator 43d when the reading function is activated.

停止信号生成部43dは、図9に示す処理を開始すると、stop_sig信号を値ゼロに設定し(S510)、その後、読取フロントエンド41から入力された画像データのライン数に基づき、読取終了ラインまでのライン画像データの取得が完了したか否かを判断する(S520)。そして、読取終了ラインまでのライン画像データの取得が完了している場合には(S520でYes)、読取終了信号を出力して、読取終了の旨を各部に通知した後(S560)、図9に示す処理を終了する。   When the processing shown in FIG. 9 is started, the stop signal generation unit 43d sets the stop_sig signal to a value of zero (S510), and then reaches the reading end line based on the number of lines of image data input from the reading front end 41. It is determined whether or not the acquisition of the line image data is completed (S520). If the acquisition of the line image data up to the reading end line is completed (Yes in S520), a reading end signal is output to notify each unit of the end of reading (S560), and then FIG. The process shown in FIG.

一方、読取終了ラインまでのライン画像データの取得が完了していない場合には(S520でNo)、バッファ45aの空き容量rem_bufが、予め定められた閾値B_lim以下であるか否かを判断する(S530)。そして、バッファ45aの空き容量rem_bufが閾値B_limより大きい場合には(S530でNo)、ライン画像データの書込に十分な空き容量があるとして、S510に移行し、stop_sig信号を値ゼロに設定する。   On the other hand, when the acquisition of the line image data up to the reading end line is not completed (No in S520), it is determined whether or not the free capacity rem_buf of the buffer 45a is equal to or less than a predetermined threshold B_lim ( S530). If the free capacity rem_buf of the buffer 45a is larger than the threshold value B_lim (No in S530), it is determined that there is sufficient free capacity for writing line image data, and the process proceeds to S510, and the stop_sig signal is set to zero. .

これに対し、バッファ45aの空き容量rem_bufが、閾値B_lim以下である場合(S530でYes)、停止信号生成部43dは、今後書き込む必要のある読取終了ラインまでのライン画像データの総量rem_linがバッファ45aの空き容量rem_buf以下であるか否かを判断し(S540)、総量rem_linが、空き容量rem_buf以下である場合には(S540でYes)、読取終了までにバッファ45aが一杯になることがないとして、S510に移行し、stop_sig信号を値ゼロに設定し、読取フロントエンド41からのライン画像データの出力が停止しないように制御する。   On the other hand, when the free space rem_buf of the buffer 45a is equal to or smaller than the threshold B_lim (Yes in S530), the stop signal generation unit 43d determines that the total amount rem_lin of the line image data up to the read end line that needs to be written is It is determined whether the total capacity rem_lin is equal to or less than the free capacity rem_buf (Yes in S540), and it is assumed that the buffer 45a does not become full by the end of reading. , The process proceeds to S510, the stop_sig signal is set to zero, and control is performed so that the output of line image data from the reading front end 41 does not stop.

一方、総量rem_linが、空き容量rem_bufよりも大きい場合(S540でNo)、停止信号生成部43dは、stop_sig信号を値ゼロから値1に設定変更し、読取フロントエンド41からのライン画像データの出力が停止するようにする(S550)。その後、S520に移行する。尚、このようにして状態が切り替えられるstop_sig信号は、読取フロントエンド41、駆動停止指令生成部49、及び、再開位置設定部55に入力される。   On the other hand, when the total amount rem_lin is larger than the free space rem_buf (No in S540), the stop signal generation unit 43d changes the setting of the stop_sig signal from the value zero to the value 1, and outputs the line image data from the reading front end 41. Is stopped (S550). Thereafter, the process proceeds to S520. The stop_sig signal whose state is switched in this way is input to the reading front end 41, the drive stop command generation unit 49, and the restart position setting unit 55.

この他、再開信号生成部43eは、図10に示す処理を実行して、restart_sig信号の状態を切り替える。図10は、読取機能の作動時に、再開信号生成部43eが実行する処理を表すフローチャートである。   In addition, the restart signal generation unit 43e executes the process illustrated in FIG. 10 to switch the state of the restart_sig signal. FIG. 10 is a flowchart showing processing executed by the restart signal generation unit 43e when the reading function is activated.

再開信号生成部43eは、図10に示す処理を開始すると、まずrestart_sig信号を値ゼロに設定し(S610)、その後、読取フロントエンド41から入力された画像データのライン数に基づき、読取終了ラインまでのライン画像データの取得が完了したか否かを判断する(S620)。そして、読取終了ラインまでのライン画像データの取得が完了している場合には(S620でYes)、休止する。   When the process shown in FIG. 10 is started, the restart signal generation unit 43e first sets the restart_sig signal to a value of zero (S610), and then reads the reading end line based on the number of lines of image data input from the reading front end 41. It is determined whether or not the acquisition of the line image data up to is completed (S620). If the acquisition of the line image data up to the reading end line has been completed (Yes in S620), the process is paused.

一方、読取終了ラインまでのライン画像データの取得が完了していない場合には(S620でNo)、バッファ45aの空き容量rem_bufが、予め定められた閾値B_th以上であるか否かを判断する(S630)。そして、空き容量rem_bufが、閾値B_th以上である場合には(S630でYes)、バッファ45aの空き容量rem_bufが再開に十分な量あるとして、restart_sig信号を値ゼロから値1に設定変更する(S650)。その後、S620に移行する。尚、閾値B_thは、閾値B_limよりも大きい値に設定されているものとする(B_th>B_lim)。   On the other hand, when the acquisition of the line image data up to the reading end line is not completed (No in S620), it is determined whether or not the free capacity rem_buf of the buffer 45a is equal to or larger than a predetermined threshold B_th ( S630). If the free capacity rem_buf is equal to or greater than the threshold B_th (Yes in S630), the restart_sig signal is changed from the value zero to the value 1 assuming that the free capacity rem_buf of the buffer 45a is sufficient for restarting (S650). ). Thereafter, the process proceeds to S620. Note that the threshold B_th is set to a value larger than the threshold B_lim (B_th> B_lim).

また、再開信号生成部43eは、バッファ45aの空き容量rem_bufが、閾値B_th未満である場合(S630でNo)、バッファ45aの空き容量rem_bufが、今後書き込む必要のある読取終了ラインまでのライン画像データの総量rem_lin以上であるか否かを判断し(S640)、空き容量rem_bufが総量rem_lin以上である場合には(S640でYes)、バッファ45aの空き容量rem_bufが再開に十分な量あるとして、restart_sig信号を値ゼロから値1に設定変更する(S650)。その後、S620に移行する。   In addition, when the free capacity rem_buf of the buffer 45a is less than the threshold B_th (No in S630), the restart signal generation unit 43e stores the line image data up to the reading end line that needs to be written in the future in the free capacity rem_buf of the buffer 45a. Whether or not the free capacity rem_buf is greater than or equal to the total amount rem_lin (Yes in S640), it is determined that the free capacity rem_buf of the buffer 45a is sufficient for restarting and restart_sig. The signal is changed from value zero to value 1 (S650). Thereafter, the process proceeds to S620.

これに対し、バッファ45aの空き容量rem_bufが、閾値B_th以上でもなく、総量rem_lin以上でもない場合、再開信号生成部43eは、バッファ45aの空き容量rem_bufが再開に十分な量ないとして、S610に移行し、restart_sig信号を値ゼロに設定する。その後、S620に移行する。   On the other hand, when the free capacity rem_buf of the buffer 45a is not equal to or greater than the threshold value B_th and not equal to or greater than the total amount rem_lin, the restart signal generator 43e proceeds to S610, assuming that the free capacity rem_buf of the buffer 45a is not sufficient for restart And set the restart_sig signal to the value zero. Thereafter, the process proceeds to S620.

尚、このようにして状態が切り替えられるrestart_sig信号は、CPU11に入力される。また、CPU11は、常時restart_sig信号を監視しており、restart_sig信号が値0から1に切り替わると、モータ制御部39に対して読取再開指令を入力し、モータ制御部39に図6に示す処理をS310から実行させると共に、再開位置設定部55及び強制同期指令生成部59に対して読取再開指令を入力して、再開位置設定部55及び強制同期指令生成部59を作動させる。
(3.3)駆動停止指令生成部49の詳細
続いて、駆動停止指令生成部49の詳細について、図11を用いて説明する。図11は、駆動停止指令生成部49が実行する処理を表すフローチャートである。
A restart_sig signal whose state is switched in this way is input to the CPU 11. Further, the CPU 11 constantly monitors the restart_sig signal. When the restart_sig signal is switched from the value 0 to 1, the CPU 11 inputs a reading restart command to the motor control unit 39, and performs the processing shown in FIG. While executing from S310, a reading resumption command is input to the resumption position setting unit 55 and the forced synchronization command generation unit 59 to operate the resumption position setting unit 55 and the forced synchronization command generation unit 59.
(3.3) Details of Drive Stop Command Generating Unit 49 Next, details of the drive stop command generating unit 49 will be described with reference to FIG. FIG. 11 is a flowchart showing the process executed by the drive stop command generation unit 49.

駆動停止指令生成部49は、モータ停止指令信号としてのmtstop信号をモータ制御部39に出力するものであり、読取機能の作動時に、図11に示す処理を開始して、画データ処理部43から入力されるstop_sig信号に基づき、mtstop信号の状態を切り替える。   The drive stop command generation unit 49 outputs an mtstop signal as a motor stop command signal to the motor control unit 39. When the reading function is activated, the drive stop command generation unit 49 starts the processing shown in FIG. Based on the inputted stop_sig signal, the state of the mtstop signal is switched.

駆動停止指令生成部49は、この処理を開始すると、mtstop信号を値ゼロに設定すると共に(S810)、画データ処理部43から読取終了信号が入力されているか否かを判断することにより、読取対象の読取(原稿1枚分の読取)が終了しているか否かを判断する(S820)。そして、読取が終了している場合には(S820でYes)、再度、mtstop信号を値ゼロに設定した後(S830)、休止する。   When this process is started, the drive stop command generation unit 49 sets the mtstop signal to zero (S810), and determines whether or not a reading end signal is input from the image data processing unit 43, thereby reading. It is determined whether or not the target reading (reading of one original document) has been completed (S820). If the reading has been completed (Yes in S820), the mtstop signal is set to zero again (S830) and then paused.

一方、読取が終了していない場合(S820でNo)、駆動停止指令生成部49は、読取が終了するか、画データ処理部43から入力されるstop_sig信号が値1となるまで、mtstop信号を値ゼロに維持する。そして、stop_sig信号が値1に遷移すると(S840でYes)、その後、エッジ検出信号が入力された時点で(S850でYes)、mtstop信号を値1に変更する(S860)。その後、S820に移行し、stop_sig信号が値1である期間には、mtstop信号を値1に保持し、stop_sig信号が値0に遷移すると、mtstop信号を値0に切り替える。   On the other hand, if the reading has not ended (No in S820), the drive stop command generation unit 49 outputs the mtstop signal until the reading ends or the stop_sig signal input from the image data processing unit 43 becomes 1. Keep the value zero. When the stop_sig signal transitions to the value 1 (Yes in S840), after that, when the edge detection signal is input (Yes in S850), the mtstop signal is changed to the value 1 (S860). Thereafter, the process proceeds to S820, where the mtstop signal is held at the value 1 during the period in which the stop_sig signal has the value 1, and when the stop_sig signal transitions to the value 0, the mtstop signal is switched to the value 0.

尚、モータ制御部39では、mtstop信号が値1に切り替わった時点で、モータを減速させるが、mtstop信号は、エッジ検出信号に同期して状態変化するため、モータ制御部39によるモータの減速制御は、図12に示すように、stop_sig信号が値1に状態変化した後、エンコーダからパルスエッジが入力された時点で、開始される。図12は、mtstop信号が値1に切り替わる時点前後の各種信号の状態を表すタイムチャートである。
(3.4)時間計測部51の詳細
続いて、時間計測部51の詳細について、図13を用いて説明する。図13(a)は、時間計測部51が実行する第一計測処理を表すフローチャートであり、図13(b)は、時間計測部51が第一計測処理と並行して実行する第二計測処理を表すフローチャートである。
The motor control unit 39 decelerates the motor when the mtstop signal is switched to the value 1. However, since the mtstop signal changes its state in synchronization with the edge detection signal, the motor control unit 39 controls the motor deceleration. 12 is started when a pulse edge is input from the encoder after the stop_sig signal changes state to a value of 1, as shown in FIG. FIG. 12 is a time chart showing the states of various signals before and after the mtstop signal switches to the value 1.
(3.4) Details of Time Measurement Unit 51 Next, details of the time measurement unit 51 will be described with reference to FIG. FIG. 13A is a flowchart showing a first measurement process executed by the time measurement unit 51, and FIG. 13B is a second measurement process executed by the time measurement unit 51 in parallel with the first measurement process. It is a flowchart showing.

時間計測部51は、再開位置設定部55に対し、読取再開位置(restart_cnt)を設定するために必要な、変数time_p及び変数time_f及び変数positionの値を出力するものであり、読取機能の作動時に、第一及び第二計測処理を開始し、変数time_p及び変数time_f及び変数positionの値を更新する。   The time measurement unit 51 outputs the values of the variable time_p, the variable time_f, and the variable position, which are necessary for setting the reading restart position (restart_cnt) to the restart position setting unit 55. The first and second measurement processes are started, and the values of the variable time_p, the variable time_f, and the variable position are updated.

尚、この時間計測部51は、第一及び第二計時カウンタを内蔵しており、これらの計時カウンタを用いて、第一及び第二計測処理を実行し、時間計測する。また、時間計測部51は、第二計時カウンタが計時中であるか否かを表すステータス(status)信号も再開位置設定部55に入力する構成にされており、第二計時カウンタが計時中のとき、status信号として値1を出力し、第二計時カウンタが停止中のとき、status信号として値0を出力する。   The time measuring unit 51 includes first and second time counters, and uses these time counters to execute the first and second measurement processes to measure time. The time measuring unit 51 is also configured to input a status signal indicating whether or not the second time counter is measuring time to the restart position setting unit 55, and the second time counter is measuring time. When the second time counter is stopped, the value 0 is output as the status signal.

第一計測処理を開始すると、時間計測部51は、画データ処理部43から読取終了信号が入力されているか否かを判断し(S910)、読取終了信号が入力されていない場合には(S910でNo)、エッジ検出信号が入力されている否かを判断し(S920)、エッジ検出信号が入力されていない場合には(S920でNo)、ラインスタートトリガ信号が入力されているか否かを判断する(S930)。   When the first measurement process is started, the time measurement unit 51 determines whether or not a reading end signal is input from the image data processing unit 43 (S910), and when the reading end signal is not input (S910). No), it is determined whether an edge detection signal is input (S920). If no edge detection signal is input (No in S920), it is determined whether a line start trigger signal is input. Judgment is made (S930).

そして、読取終了信号、エッジ検出信号、及び、ラインスタートトリガ信号のいずれもが入力されていない場合には、これらの信号のいずれかが入力されるまで待機する。
そして、エッジ検出信号が入力されると(S920でYes)、第一計時カウンタによる計時を開始し(S925)、第一計時カウンタに、このエッジ検出信号の入力時点からの経過時間を計測させる。尚、計時の開始に先駆けては、第一計時カウンタの値CN1をゼロにリセットする。また、計時を開始すると、S930に移行し、ラインスタートトリガ信号が入力されているか否かを判断する(S930)。そして、ラインスタートトリガ信号が入力されていない場合には(S930でNo)、S910に移行し、入力されている場合には(S930でYes)、S935に移行する。
When none of the reading end signal, the edge detection signal, and the line start trigger signal is input, the process waits until any of these signals is input.
When the edge detection signal is input (Yes in S920), the time measurement by the first time counter is started (S925), and the first time counter is caused to measure the elapsed time from the input time of the edge detection signal. Prior to the start of timing, the value CN1 of the first timing counter is reset to zero. When the timing is started, the process proceeds to S930, and it is determined whether or not a line start trigger signal is input (S930). If the line start trigger signal is not input (No in S930), the process proceeds to S910. If it is input (Yes in S930), the process proceeds to S935.

また、ラインスタートトリガ信号が入力されると(S930でYes)、時間計測部51は、第一計時カウンタの値CN1を、変数time_pに設定することで(S935)、最後にエッジ検出信号が入力されてから当該ラインスタートトリガ信号が入力されるまでに要した時間の情報を、変数time_pに保持する。その後、S910に移行し、読取終了信号、エッジ検出信号、及び、ラインスタートトリガ信号のいずれかが入力されるまで待機する。   When the line start trigger signal is input (Yes in S930), the time measuring unit 51 sets the value CN1 of the first time counter to the variable time_p (S935), and finally the edge detection signal is input. Information on the time required from when the line start trigger signal is input until the line start trigger signal is input is held in the variable time_p. Thereafter, the process proceeds to S910, and waits until any of the reading end signal, the edge detection signal, and the line start trigger signal is input.

そして、読取終了信号が入力されると(S910でYes)、読取対象の読取(原稿1枚分の読取)が終了したとして、当該第一計測処理を終了する。
同様に、第二計測処理を開始すると、時間計測部51は、画データ処理部43から読取終了信号が入力されているか否かを判断し(S950)、読取終了信号が入力されていない場合には(S950でNo)、ラインスタートトリガ信号が入力されているか否かを判断し(S960)、ラインスタートトリガ信号が入力されていない場合には(S960でNo)、エッジ検出信号が入力されている否かを、判断する(S970)。
Then, when the reading end signal is input (Yes in S910), the first measurement process is ended, assuming that reading of the reading target (reading of one original) has been completed.
Similarly, when the second measurement process is started, the time measurement unit 51 determines whether or not the reading end signal is input from the image data processing unit 43 (S950), and when the reading end signal is not input. (No in S950), it is determined whether or not the line start trigger signal is input (S960). If the line start trigger signal is not input (No in S960), the edge detection signal is input. It is determined whether or not there is (S970).

そして、読取終了信号、エッジ検出信号、及び、ラインスタートトリガ信号のいずれもが入力されていない場合には、これらの信号のいずれかが入力されるまで待機する。
そして、ラインスタートトリガ信号が入力されると(S960でYes)、第二計時カウンタによる計時を開始し(S990)、第二計時カウンタに、当該ラインスタートトリガ信号の入力時点からの経過時間を計測させる。尚、計時の開始に先駆けては、第二計時カウンタの値CN2をゼロにリセットする。同時に、status信号を値1に切り替える(S995)。その後、S950に移行して、読取終了信号、エッジ検出信号、及び、ラインスタートトリガ信号のいずれかが入力されるまで待機する。
When none of the reading end signal, the edge detection signal, and the line start trigger signal is input, the process waits until any of these signals is input.
When the line start trigger signal is input (Yes in S960), the time measurement by the second time counter is started (S990), and the elapsed time from the input time of the line start trigger signal is measured by the second time counter. Let Prior to the start of timing, the value CN2 of the second timing counter is reset to zero. At the same time, the status signal is switched to the value 1 (S995). Thereafter, the process proceeds to S950 and waits until any of a reading end signal, an edge detection signal, and a line start trigger signal is input.

一方、エッジ検出信号が入力されると(S970でYes)、時間計測部51は、status信号が値1であるか否かを判断し(S980)、値1であれば(S980でYes)、第二計時カウンタによる計時を停止して(S981)、第二計時カウンタの値CN2を、変数time_fに設定する(S983)。   On the other hand, when the edge detection signal is input (Yes in S970), the time measuring unit 51 determines whether or not the status signal has a value of 1 (S980), and if the value is 1 (Yes in S980), The time counting by the second time counter is stopped (S981), and the value CN2 of the second time counter is set to the variable time_f (S983).

同時に、時間計測部51は、当該エッジ検出信号の入力により位置カウンタ33にて更新された値enc_cntを、変数positionに設定することで、当該エッジ検出信号入力時点での搬送対象の位置を記憶保持する(S985)。更に、status信号を値0に切り替える(S987)。その後、S950に移行し、読取終了信号、エッジ検出信号、及び、ラインスタートトリガ信号のいずれかが入力されるまで待機する。これに対し、status信号が値1でない場合(S980でNo)、時間計測部51は、S981〜S987の処理を実行することなく、S950に移行する。   At the same time, the time measuring unit 51 stores and holds the position of the conveyance target at the time of input of the edge detection signal by setting the value enc_cnt updated by the position counter 33 by the input of the edge detection signal to the variable position. (S985). Further, the status signal is switched to the value 0 (S987). Thereafter, the process proceeds to S950 and waits until any of a reading end signal, an edge detection signal, and a line start trigger signal is input. On the other hand, when the status signal is not 1 (No in S980), the time measuring unit 51 proceeds to S950 without executing the processes of S981 to S987.

また、時間計測部51は、画データ処理部43から読取終了信号が入力されると(S910でYes)、当該第二計測処理を終了する。
このようにして、時間計測部51は、エンコーダ処理部15から入力されるエッジ検出信号及び読取フロントエンド41から入力されるラインスタートトリガ信号に基づいて、図14に示すように、エッジ検出信号が入力されてからラインスタートトリガ信号が入力されるまでの時間長さtime_p、及び、ラインスタートトリガ信号が入力されてからエッジ検出信号が入力されるまでの時間長さtime_fを計測し、これを再開位置設定部55に出力する。尚、図14は、時間長さtime_p及びtime_fを示した説明図である。
(3.5)再開位置設定部55の詳細
続いて、再開位置設定部55の詳細について、図15を用いて説明する。図15は、再開位置設定部55が実行する処理を表すフローチャートである。
Further, when the reading end signal is input from the image data processing unit 43 (Yes in S910), the time measuring unit 51 ends the second measuring process.
In this way, the time measurement unit 51 receives the edge detection signal based on the edge detection signal input from the encoder processing unit 15 and the line start trigger signal input from the reading front end 41, as shown in FIG. The time length time_p from when the line start trigger signal is input until the line start trigger signal is input and the time length time_f from when the line start trigger signal is input until the edge detection signal is input are measured and restarted. Output to the position setting unit 55. FIG. 14 is an explanatory diagram showing time lengths time_p and time_f.
(3.5) Details of Restart Position Setting Unit 55 Next, details of the restart position setting unit 55 will be described with reference to FIG. FIG. 15 is a flowchart showing processing executed by the restart position setting unit 55.

再開位置設定部55は、画データ処理部43から停止指令信号(stop_sig)として値1が入力されると、その後再開される読取動作のために、読取再開位置(restart_cnt)を設定し、この位置restart_cntを、強制同期指令生成部59に入力するものである。具体的に、この再開位置設定部55は、読取機能の作動時、図15に示す処理の実行を開始し、更に、CPU11から読取再開指令が入力された場合にも、図15に示す処理の実行を開始する。   When the value 1 is input as the stop command signal (stop_sig) from the image data processing unit 43, the restart position setting unit 55 sets the read restart position (restart_cnt) for the reading operation to be restarted thereafter. restart_cnt is input to the forced synchronization command generation unit 59. Specifically, the resumption position setting unit 55 starts executing the processing shown in FIG. 15 when the reading function is activated, and also performs the processing shown in FIG. 15 when a reading resumption command is input from the CPU 11. Start execution.

この処理を開始すると、再開位置設定部55は、まず、stop_sig信号が値0から値1に遷移するまで待機し(S1110)、stop_sig信号が値1に遷移すると(S1110でYes)、その時点で、時間計測部51から入力されているstatus信号が値0であるか否かを判断することによって、第二計時カウンタが停止中であるか否かを判断する(S1120)。そして、status信号が値1である場合には(S1120でNo)、status信号が値0となるまで待機する。   When this process is started, the restart position setting unit 55 first waits until the stop_sig signal transitions from the value 0 to the value 1 (S1110), and when the stop_sig signal transitions to the value 1 (Yes in S1110), at that time. Then, it is determined whether or not the second time counter is stopped by determining whether or not the status signal input from the time measurement unit 51 is 0 (S1120). If the status signal is 1 (No in S1120), the process waits until the status signal becomes 0.

そして、status信号が値0であると判断すると(S1120でYes)、S1130に移行し、その時点で時間計測部51から入力される値positionを、変数X[1]に設定すると共に、変数X[0]を、X[0]=position−1に設定する。更に、時間計測部51から入力される値time_pを、変数L[0]に設定すると共に、値time_fを、変数L[1]に設定する。   If it is determined that the status signal has a value of 0 (Yes in S1120), the process proceeds to S1130, where the value position input from the time measuring unit 51 is set to the variable X [1] and the variable X [0] is set to X [0] = position-1. Further, the value time_p input from the time measuring unit 51 is set to the variable L [0], and the value time_f is set to the variable L [1].

また、この処理を終えると、再開位置設定部55は、値L[0]が値L[1]以下であるか否かを判断し(S1140)、L[0]≦L[1]であると判断すると(S1140でYes)、変数restart_cntに、値X[0]を設定し、この値を強制同期指令生成部59に入力する(S1150)。これにより、読取再開位置restart_cntを、読取中断ラインに対応するラインスタート信号がCCDラインセンサ20に入力された時点TSより過去において、最後にエッジ検出信号が入力された時点TPで搬送対象が存在した地点に設定する。例えば、図16(a)に示すタイミングで、ラインスタート信号がCCDラインセンサ20に入力され、その入力時点若しくはそれより後に、stop_sig信号が値1に遷移したときには、L[0]≦L[1]であるので、読取再開位置restart_cntを、位置X[0]に設定する。そして、S1150での処理を終えると、当該処理を終了する。   When this process is completed, the restart position setting unit 55 determines whether or not the value L [0] is equal to or smaller than the value L [1] (S1140), and L [0] ≦ L [1]. (Yes in S1140), a value X [0] is set in the variable restart_cnt, and this value is input to the forced synchronization command generation unit 59 (S1150). As a result, the reading resume position restart_cnt is in the past from the time TS when the line start signal corresponding to the reading interruption line is input to the CCD line sensor 20, and the transport target exists at the time TP when the edge detection signal is last input. Set to a point. For example, when the line start signal is input to the CCD line sensor 20 at the timing shown in FIG. 16A and the stop_sig signal transitions to the value 1 at or after the input time, L [0] ≦ L [1 ], The reading restart position restart_cnt is set to the position X [0]. Then, when the processing in S1150 is finished, the processing is finished.

一方、再開位置設定部55は、L[0]>L[1]であると判断すると(S1140でNo)、変数restart_cntに、値X[1]を設定し、この値を強制同期指令生成部59に入力することにより(S1160)、読取再開位置restart_cntを、読取中断ラインに対応するラインスタート信号がCCDラインセンサ20に入力された時点TSより過去において最後に入力されたエッジ検出信号、の次に入力されたエッジ検出信号の当該入力時点TFにおいて、搬送対象が存在した地点に設定する。   On the other hand, when the restart position setting unit 55 determines that L [0]> L [1] (No in S1140), the restart position setting unit 55 sets a value X [1] to the variable restart_cnt and uses this value as the forced synchronization command generation unit. 59 (S1160), the reading restart position restart_cnt is set next to the edge detection signal last input in the past from the time TS when the line start signal corresponding to the reading interruption line is input to the CCD line sensor 20. Is set to a point where the conveyance target exists at the input time point TF of the edge detection signal input to.

例えば、図16(b)に示すタイミングで、ラインスタート信号がCCDラインセンサ20に入力され、その入力時点若しくはそれより後に、stop_sig信号が値1に遷移したときには、L[0]>L[1]であるので、読取再開位置restart_cntを、位置X[1]に設定する。そして、S1160での処理を終えると、当該処理を終了する。
(3.6)強制同期指令生成部59の詳細
続いて、強制同期指令生成部59の詳細について、図17及び図18を用いて説明する。図17は、強制同期指令生成部59が実行する処理を表すフローチャートである。尚、強制同期指令生成部59は、読取動作を再開する際に、ラインスタート信号の強制同期をとるためのものであり、CPU11から読取再開指令が入力されると、図17に示す処理の実行を開始する。
For example, when the line start signal is input to the CCD line sensor 20 at the timing shown in FIG. 16B and the stop_sig signal transitions to the value 1 at or after the input time, L [0]> L [1 ], The reading restart position restart_cnt is set to the position X [1]. Then, when the process in S1160 ends, the process ends.
(3.6) Details of Forced Synchronization Command Generation Unit 59 Next, details of the forced synchronization command generation unit 59 will be described with reference to FIGS. 17 and 18. FIG. 17 is a flowchart showing the process executed by the forced synchronization command generation unit 59. The forced synchronization command generation unit 59 is for forcibly synchronizing the line start signal when restarting the reading operation. When a reading restart command is input from the CPU 11, the processing shown in FIG. To start.

強制同期指令生成部59は、図17に示す処理を開始すると、エッジ検出信号が入力される度(S1410でYes)、当該エッジ検出信号の入力により更新された位置カウンタ33の出力値enc_cntが、読取再開位置restart_cntより一つ手前の値(restart_cnt−1)に一致するか否かを判断し(S1420)、一致しない場合には、上記判断を繰返し、一致すると(enc_cnt=restart_cnt−1:S1420でYes)、S1430に移行する。   When the forced synchronization command generation unit 59 starts the processing shown in FIG. 17, every time an edge detection signal is input (Yes in S1410), the output value enc_cnt of the position counter 33 updated by the input of the edge detection signal is It is determined whether or not it coincides with a value (restart_cnt-1) immediately before the reading restart position restart_cnt (S1420). If not coincident, the above determination is repeated. Yes), the process proceeds to S1430.

その後、強制同期指令生成部59は、新たにエッジ検出信号が入力された時点で(S1430でYes)、搬送対象が、読取再開位置restart_cntに到達したとして、同期指令を、ラインスタートトリガ信号生成部41aに入力し、その時点でCCDラインセンサ20にラインスタート信号が入力されるようにする。そして、同期指令の入力を終了すると、強制同期指令生成部59は、再び読取再開指令が入力されるまで休止する。   Thereafter, when the edge detection signal is newly input (Yes in S1430), the forced synchronization command generation unit 59 determines that the conveyance target has reached the reading restart position restart_cnt, and issues a synchronization command to the line start trigger signal generation unit. The line start signal is input to the CCD line sensor 20 at that time. When the input of the synchronization command is completed, the forced synchronization command generation unit 59 pauses until the reading restart command is input again.

尚、図18は、図12に示す態様で読取動作が中断して読取再開位置がrestart_cnt=kに設定された場合における同期指令の入力態様を表すタイムチャートである。   FIG. 18 is a time chart showing an input mode of the synchronization command when the reading operation is interrupted and the reading restart position is set to restart_cnt = k in the mode shown in FIG.

このようにして、強制同期指令生成部59は、搬送対象が読取再開位置restart_cntに到達した時点から、ラインスタート信号がCCDラインセンサ20に、周期的に入力されるようにし、読取再開位置restart_cntから、CCDラインセンサ20にて、ライン毎の読取動作が実行されるようにする。   In this way, the forced synchronization command generation unit 59 causes the line start signal to be periodically input to the CCD line sensor 20 from the time when the conveyance target reaches the reading restart position restart_cnt, and from the reading restart position restart_cnt. The reading operation for each line is executed by the CCD line sensor 20.

また、強制同期指令生成部59は、同期指令の入力により、読取再開位置restart_cntに到達した時点から、CCDラインセンサへの転送クロック信号の入力を、読取フロントエンド41に開始させ、CCDアナログシフトレジスタ20bから読取フロントエンド41に画素信号が出力されるようにする。但し、同期指令の入力に伴って、CCDラインセンサ20に、ラインスタート信号が入力されてから、次のラインスタート信号が入力されるまでの期間に、CCDアナログシフトレジスタ20bから出力される画素信号は、読取フロントエンド41で破棄するものとする。
(4)画像読取装置1が奏する効果
以上、本実施例の画像読取装置1の構成について説明したが、この画像読取装置1によれば、時点TSと、時点TSを挟む時点TP及び時点TFとの時間的な関係に基づいて、位置XP及び位置XFの内、時点TSで搬送対象がいた読取中断位置に近いほうを選択して、読取再開位置を設定する。
Further, the forced synchronization command generation unit 59 causes the reading front end 41 to start inputting the transfer clock signal to the CCD line sensor from the time when the reading restart position restart_cnt is reached by the input of the synchronization command, and the CCD analog shift register. A pixel signal is outputted from the reading front end 41 from 20b. However, the pixel signal output from the CCD analog shift register 20b during the period from when the line start signal is input to the CCD line sensor 20 until the next line start signal is input in response to the input of the synchronization command. Are discarded by the reading front end 41.
(4) Effects of Image Reading Device 1 The configuration of the image reading device 1 of the present embodiment has been described above. According to the image reading device 1, the time point TS, the time point TP and the time point TF sandwiching the time point TS, Based on the temporal relationship, the position XP and the position XF that are closer to the reading interruption position where the conveyance target was at the time TS are selected, and the reading resumption position is set.

具体的には、時点TPから時点TSまでの時間長さL[0]、及び、時点TSから時点TFまでの時間長さL[1]を計測し、時間長さL[0]が時間長さL[1]以下である場合、時点TPで位置カウンタ33により検出された位置X[0]を、読取再開位置に設定し、時間長さL[0]が時間長さL[1]より大きい場合、時点TFで位置カウンタ33により検出された位置X[1]を、読取再開位置に設定する。   Specifically, the time length L [0] from the time point TP to the time point TS and the time length L [1] from the time point TS to the time point TF are measured, and the time length L [0] is the time length. If it is less than or equal to L [1], the position X [0] detected by the position counter 33 at the time TP is set as the reading restart position, and the time length L [0] is greater than the time length L [1]. If larger, the position X [1] detected by the position counter 33 at the time TF is set as the reading restart position.

従って、この画像読取装置1によれば、読取中断位置と読取再開位置とのズレを抑え、良好な画質の画像データを生成することができる。
尚、本発明の読取ユニットは、CCDラインセンサ20に相当し、搬送機構は、読取モータMT1の回転力を受けてCCDラインセンサ20を移動させる機構、及び、読取搬送モータMT2の回転力を受けて読取対象の原稿を移動させるADF装置150に相当する。また、事象発生信号出力手段は、読取エンコーダEN1及び読取搬送エンコーダEN2に相当する。
Therefore, according to the image reading apparatus 1, it is possible to suppress the deviation between the reading interruption position and the reading resumption position and to generate image data with good image quality.
The reading unit of the present invention corresponds to the CCD line sensor 20, and the transport mechanism receives the rotational force of the reading motor MT1 and moves the CCD line sensor 20, and the rotational force of the read transport motor MT2. This corresponds to the ADF device 150 that moves the document to be read. The event generation signal output means corresponds to the reading encoder EN1 and the reading transport encoder EN2.

また、読取制御手段は、モータ制御部39におけるS320の処理及び読取制御部21にて実現され、中断判定手段は、停止信号生成部43dにおけるS530,S540の処理にて実現され、停止制御手段は、停止信号生成部43dにおけるS550の処理にて実現されている。その他、位置検出手段は、位置カウンタ33にて実現され、時間計測手段は、時間計測部51にて実現され、再開位置設定手段は、再開位置設定部55にて実現され、後退制御手段は、モータ制御部39のS350〜S370の処理にて実現されている。
(5)変形例
続いて、変形例の画像読取装置1の構成について説明する。但し、変形例の画像読取装置1は、時間計測部51が、図13に示す第一及び第二計測処理に代えて、図19に示す計測処理を実行する構成にされ、再開位置設定部55が、図15に示す処理に代えて、図20に示す処理を実行する構成にされた程度であるので、以下では、変形例の画像読取装置1の説明として、図19〜図21を用いて、上記実施例とは異なる構成を選択的に説明する。
(5.1)時間計測部51の詳細
図19は、変形例において、時間計測部51が実行する計測処理を表すフローチャートである。
Further, the reading control means is realized by the processing of S320 in the motor control section 39 and the reading control section 21, the interruption determining means is realized by the processing of S530 and S540 in the stop signal generating section 43d, and the stop control means is This is realized by the processing of S550 in the stop signal generation unit 43d. In addition, the position detecting means is realized by the position counter 33, the time measuring means is realized by the time measuring section 51, the restart position setting means is realized by the restart position setting section 55, and the reverse control means is This is realized by the processing of S350 to S370 of the motor control unit 39.
(5) Modified Example Next, the configuration of the image reading apparatus 1 according to a modified example will be described. However, in the image reading apparatus 1 of the modification, the time measurement unit 51 is configured to execute the measurement process shown in FIG. 19 instead of the first and second measurement processes shown in FIG. However, instead of the process shown in FIG. 15, the process is configured to execute the process shown in FIG. 20, and in the following, as a description of the image reading apparatus 1 of the modification, FIGS. 19 to 21 will be used. A configuration different from the above embodiment will be described selectively.
(5.1) Details of Time Measurement Unit 51 FIG. 19 is a flowchart showing measurement processing executed by the time measurement unit 51 in the modification.

変形例の画像読取装置1における時間計測部51は、再開位置設定部55に対し、変数time_p及び変数position及び変数intervalの値を出力するものであり、読取機能の作動時に、計測処理を開始し、変数time_p及び変数position及び変数intervalの値を更新する。また、時間計測部51は、計時カウンタを内蔵しており、これらの計時カウンタを用いて、計測処理を実行し、時間計測する。   The time measuring unit 51 in the image reading apparatus 1 according to the modification outputs values of the variable time_p, the variable position, and the variable interval to the restart position setting unit 55, and starts the measurement process when the reading function is activated. The values of the variable time_p, the variable position, and the variable interval are updated. The time measuring unit 51 has a built-in time counter, and uses these time counters to execute a measurement process and measure time.

この計測処理を開始すると、時間計測部51は、画データ処理部43から読取終了信号が入力されているか否かを判断し(S1510)、読取終了信号が入力されていない場合には(S1510でNo)、エッジ検出信号が入力されている否かを判断し(S1520)、エッジ検出信号が入力されていない場合には(S1520でNo)、ラインスタートトリガ信号が入力されているか否かを判断する(S1530)。   When this measurement process is started, the time measurement unit 51 determines whether or not a reading end signal is input from the image data processing unit 43 (S1510). If the reading end signal is not input (S1510). No), it is determined whether an edge detection signal is input (S1520). If no edge detection signal is input (No in S1520), it is determined whether a line start trigger signal is input. (S1530).

そして、読取終了信号、エッジ検出信号、及び、ラインスタートトリガ信号のいずれもが入力されていない場合には、これらの信号のいずれかが入力されるまで待機する。
そして、エッジ検出信号が入力されると(S1520でYes)、計時カウンタによる計時を開始し(S1525)、計時カウンタに、このエッジ検出信号の入力時点からの経過時間を計測させる。尚、計時の開始に先駆けては、計時カウンタの値CNをゼロにリセットする。また、計時を開始すると、S1530に移行し、ラインスタートトリガ信号が入力されているか否かを判断する。そして、ラインスタートトリガ信号が入力されていない場合には(S1530でNo)、S1510に移行し、入力されている場合には(S1530でYes)、S1540に移行する。
When none of the reading end signal, the edge detection signal, and the line start trigger signal is input, the process waits until any of these signals is input.
When the edge detection signal is input (Yes in S1520), the time counter starts counting (S1525), and causes the time counter to measure the elapsed time from the input time of the edge detection signal. Prior to the start of timing, the time counter value CN is reset to zero. When the timing is started, the process proceeds to S1530, and it is determined whether or not a line start trigger signal is input. If the line start trigger signal is not input (No in S1530), the process proceeds to S1510. If the line start trigger signal is input (Yes in S1530), the process proceeds to S1540.

また、ラインスタートトリガ信号が入力されると(S1530でYes)、時間計測部51は、計時カウンタの値CNを、変数time_pに設定することで(S1540)、最後にエッジ検出信号が入力されてから当該ラインスタートトリガ信号が入力されるまでに要した時間の情報を、変数time_pに保持すると共に、位置カウンタ33から入力されている値enc_cntを、変数positionに設定して、上記エッジ検出信号の入力時点での搬送対象の位置を記憶保持する(S1550)。   When the line start trigger signal is input (Yes in S1530), the time measurement unit 51 sets the value CN of the time counter to the variable time_p (S1540), and finally the edge detection signal is input. Is stored in the variable time_p, and the value enc_cnt input from the position counter 33 is set in the variable position to set the value of the edge detection signal. The position of the conveyance target at the time of input is stored and held (S1550).

更には、周期カウンタ35から入力されている値enc_cycを、変数intervalに設定することで、このラインスタート信号入力時点直前のエッジ検出信号の入力時間間隔を記憶保持する(S1560)。   Furthermore, by setting the value enc_cyc input from the period counter 35 to the variable interval, the input time interval of the edge detection signal immediately before the line start signal input time is stored and held (S1560).

また、このようにしてS1560までの処理を終えると、時間計測部51は、S1510に移行して、再び、読取終了信号、エッジ検出信号、及び、ラインスタートトリガ信号のいずれかが入力されるまで待機する。そして、画データ処理部43から読取終了信号が入力されると(S1510でYes)、当該計測処理を終了する。
(5.2)再開位置設定部55の詳細
続いて、変形例の再開位置設定部55の詳細について、図20を用いて説明する。図20は、再開位置設定部55が実行する処理を表すフローチャートである。
In addition, when the processing up to S1560 is completed in this way, the time measurement unit 51 proceeds to S1510 and again receives any of the reading end signal, the edge detection signal, and the line start trigger signal. stand by. Then, when the reading end signal is input from the image data processing unit 43 (Yes in S1510), the measurement process is ended.
(5.2) Details of Restart Position Setting Unit 55 Next, details of the restart position setting unit 55 of the modification will be described with reference to FIG. FIG. 20 is a flowchart showing the process executed by the resume position setting unit 55.

図20に示す処理を開始すると、再開位置設定部55は、まず、stop_sig信号が値0から値1に遷移するまで待機し(S1610)、stop_sig信号が値1に遷移すると(S1610でYes)、その時点で、時間計測部51から入力される値positionを、変数X[0]に設定すると共に、変数X[1]を、X[1]=position+1に設定する。更に、時間計測部51から入力される値time_pを、変数L[0]に設定すると共に、値intervalを、変数LIに設定する(S1620)。   When the process shown in FIG. 20 is started, the restart position setting unit 55 first waits until the stop_sig signal transitions from the value 0 to the value 1 (S1610), and when the stop_sig signal transitions to the value 1 (Yes in S1610), At that time, the value position input from the time measuring unit 51 is set to the variable X [0], and the variable X [1] is set to X [1] = position + 1. Further, the value time_p input from the time measuring unit 51 is set to the variable L [0], and the value interval is set to the variable LI (S1620).

尚、ラインスタートトリガ信号が発生すると同時にstop_sig信号が値1に切り替わった場合には、当該ラインスタートトリガ信号(読取中断ラインに対応するラインスタートトリガ信号)により時間計測部51で更新された値time_p,position,intervalの値を用いて、変数X[0],X[1],LIを設定する。   When the stop_sig signal is switched to the value 1 at the same time as the line start trigger signal is generated, the value time_p updated by the time measuring unit 51 by the line start trigger signal (line start trigger signal corresponding to the reading interruption line). , Position, interval values, variables X [0], X [1], and LI are set.

また、この処理を終えると、再開位置設定部55は、値L[0]が値(LI−L[0])以下であるか否かを判断し(S1630)、L[0]≦(LI−L[0])である場合には(S1630でYes)、変数restart_cntに、値X[0]を設定し、この値を強制同期指令生成部59に入力して(S1640)、読取再開位置restart_cntを、読取中断ラインに対応するラインスタート信号がCCDラインセンサ20に入力された時点TSより過去において、最後にエッジ検出信号が入力された時点TPで搬送対象が存在した地点に設定する。   When this process is finished, the restart position setting unit 55 determines whether or not the value L [0] is equal to or less than the value (LI−L [0]) (S1630), and L [0] ≦ (LI -L [0]) (Yes in S1630), the value X [0] is set in the variable restart_cnt, and this value is input to the forced synchronization command generation unit 59 (S1640), and the reading resume position The restart_cnt is set to a point where the conveyance target exists at the time TP when the edge detection signal is last input before the time TS when the line start signal corresponding to the reading interruption line is input to the CCD line sensor 20.

例えば、図21(a)に示すタイミングで、ラインスタート信号がCCDラインセンサ20に入力され、その入力時点若しくはそれより後に、stop_sig信号が値1に遷移したときには、L[0]≦LI−L[0]であるので、読取再開位置restart_cntを、位置X[0]に設定する。そして、S1640での処理を終えると、当該処理を終了する。   For example, when the line start signal is input to the CCD line sensor 20 at the timing shown in FIG. 21A and the stop_sig signal transitions to the value 1 at or after the input time, L [0] ≦ LI−L Since it is [0], the reading restart position restart_cnt is set to the position X [0]. Then, when the processing in S1640 is finished, the processing is finished.

一方、再開位置設定部55は、L[0]>(LI−L[0])であると判断すると(S1630でNo)、変数restart_cntに、値X[1]を設定し、この値を強制同期指令生成部59に入力して(S1650)、読取再開位置restart_cntを、読取中断ラインに対応するラインスタート信号がCCDラインセンサ20に入力された時点TSより過去において最後に入力されたエッジ検出信号、の次に入力されたエッジ検出信号の当該入力時点TFにおいて、搬送対象が存在した地点に設定する。   On the other hand, when the restart position setting unit 55 determines that L [0]> (LI−L [0]) (No in S1630), the restart position setting unit 55 sets a value X [1] to the variable restart_cnt and forces this value. Input to the synchronization command generation unit 59 (S1650), the resumption position restart_cnt is set as the edge detection signal last input in the past from the time TS when the line start signal corresponding to the reading interruption line is input to the CCD line sensor 20. , The edge detection signal input next to is set at the point where the conveyance target exists at the input time point TF.

例えば、図21(b)に示すタイミングで、ラインスタート信号がCCDラインセンサ20に入力され、その入力時点若しくはそれより後に、stop_sig信号が値1に遷移したときには、L[0]>L(LI−L[0])であるので、読取再開位置restart_cntを、位置X[1]に設定する。そして、S1650での処理を終えると、当該処理を終了する。
(5.3)変形例のまとめ
以上、変形例の画像読取装置1について説明したが、この変形例の画像読取装置1によれば、搬送対象の速度が略一定であることを利用して、時点TPから時点TSまでの時間長さL[0]と、時点TPでのエッジ検出信号の入力時間間隔intervalとに基づき、時点TSから時点TFまでの時間長さL[1]を、L[1]=LI−L[0]で推定し、これらL[0],L[1]に基づき、第一実施例と同様の手法で、読取再開位置restart_cntを設定する。
For example, when the line start signal is input to the CCD line sensor 20 at the timing shown in FIG. 21B and the stop_sig signal transitions to the value 1 at or after the input time, L [0]> L (LI -L [0]), the reading restart position restart_cnt is set to the position X [1]. Then, when the processing in S1650 is finished, the processing is finished.
(5.3) Summary of Modifications The image reading apparatus 1 of the modification has been described above. According to the image reading apparatus 1 of the modification, the speed of the conveyance target is substantially constant, Based on the time length L [0] from the time point TP to the time point TS and the input time interval interval of the edge detection signal at the time point TP, the time length L [1] from the time point TS to the time point TF is set to L [ 1] = LI−L [0], and based on these L [0] and L [1], the reading restart position restart_cnt is set by the same method as in the first embodiment.

従って、上記実施例と同様に、読取中断位置と読取再開位置とのズレを抑え、良好な画質の画像データを生成することができる。
また、本実施例では、時間長さtime_fを計測しなくてもよいので、time_fを計測し終わるまで、モータの減速を待つ必要がない。従って、駆動停止指令生成部49では、stop_sig信号が値1に遷移した時点で(S840)、エッジ検出信号の入力を待つことなく、mtstop信号を値1に設定することができ(S860)、このように、画像読取装置1を構成すれば、迅速にモータを減速させて、搬送対象を停止することができる。
Therefore, similarly to the above-described embodiment, it is possible to suppress the deviation between the reading interruption position and the reading restart position and generate image data with good image quality.
In the present embodiment, the time length time_f need not be measured, so there is no need to wait for the motor to decelerate until time_f is measured. Therefore, the drive stop command generation unit 49 can set the mtstop signal to the value 1 without waiting for the input of the edge detection signal (S860) when the stop_sig signal transits to the value 1 (S840). As described above, if the image reading apparatus 1 is configured, the motor can be quickly decelerated and the conveyance target can be stopped.

また、変形例では、S1630で、L[0]≦(LI−L[0])であるか否かを判断するようにしたが、S1630では、L[0]≦(LI/2)であるか否かを判断するようにしてもよい。このようにしても、同様の動作を実現することができて、読取中断位置と読取再開位置とのズレを抑え、良好な画質の画像データを生成することができる。   In the modification, it is determined whether or not L [0] ≦ (LI−L [0]) in S1630. However, in S1630, L [0] ≦ (LI / 2). It may be determined whether or not. Even in this case, the same operation can be realized, and the deviation between the reading interruption position and the reading resumption position can be suppressed, and image data with good image quality can be generated.

尚、本発明の時間長さ検出手段は、変形例において、時間計測部51及び再開位置設定部55が実行するS1620の処理にて実現され、入力時間間隔検出手段は、周期カウンタ35にて実現されている。
(6)その他
以上、本発明の実施例について説明したが、本発明は、上記実施例に限定されるものではなく、種々の態様を採りえる。
In the modification, the time length detection means of the present invention is realized by the processing of S1620 executed by the time measurement unit 51 and the restart position setting unit 55, and the input time interval detection means is realized by the period counter 35. Has been.
(6) Others Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and can take various forms.

例えば、上記実施例では、読取ユニットとして、CCDラインセンサ20を用いたが、読取ユニットとしては、コンタクトイメージセンサ(CIS:Contact Image Sensor)を用いても良い。その他、本実施例では、エンコーダEN1として、ロータリーエンコーダを用いたが、ロータリーエンコーダに代えて、リニアエンコーダを用いてもよい。   For example, in the above embodiment, the CCD line sensor 20 is used as the reading unit, but a contact image sensor (CIS: Contact Image Sensor) may be used as the reading unit. In addition, in this embodiment, a rotary encoder is used as the encoder EN1, but a linear encoder may be used instead of the rotary encoder.

また、上記実施例の画像読取装置1は、複写機として構成されてもよいし、ファクシミリ装置として構成されてもよいし、スキャナ機能を有する複合機として構成されてもよい。   In addition, the image reading apparatus 1 of the above embodiment may be configured as a copying machine, a facsimile apparatus, or a multifunction machine having a scanner function.

画像読取装置1の電気的構成を表すブロック図である。2 is a block diagram illustrating an electrical configuration of the image reading apparatus 1. FIG. 画像読取装置1の機械的構成を示す断面図である。2 is a cross-sectional view showing a mechanical configuration of the image reading apparatus 1. FIG. CCDラインセンサ20の移動態様に関する説明図である。4 is an explanatory diagram relating to a movement mode of the CCD line sensor 20. FIG. エンコーダ処理部15及び駆動制御部17の構成を表すブロック図である。3 is a block diagram illustrating configurations of an encoder processing unit 15 and a drive control unit 17. FIG. 位置カウンタ33が実行する処理を表すフローチャート(a)及び周期カウンタ35の動作態様を示す説明図(b)である。FIG. 6 is a flowchart (a) showing processing executed by the position counter 33 and an explanatory diagram (b) showing an operation mode of the period counter 35. FIG. モータ制御部39が実行する処理を表すフローチャートである。4 is a flowchart illustrating processing executed by a motor control unit 39. 読取制御部21の構成を表すブロック図である。3 is a block diagram illustrating a configuration of a reading control unit 21. FIG. 画データ処理部43で実現されるデータ処理機能に係る説明図である。6 is an explanatory diagram relating to a data processing function realized by an image data processing unit 43. FIG. 停止信号生成部43dが実行する処理を表すフローチャートである。It is a flowchart showing the process which the stop signal production | generation part 43d performs. 再開信号生成部43eが実行する処理を表すフローチャートである。It is a flowchart showing the process which the restart signal production | generation part 43e performs. 駆動停止指令生成部49が実行する処理を表すフローチャートである。It is a flowchart showing the process which the drive stop command generation part 49 performs. mtstop信号が値1に切り替わる時点前後の各種信号の状態を表すタイムチャートである。It is a time chart showing the state of various signals before and after the time when the mtstop signal switches to the value 1. 時間計測部51が実行する第一計測処理を表すフローチャート(a)及び第二計測処理を表すフローチャート(b)である。It is the flowchart (a) showing the 1st measurement process which the time measurement part 51 performs, and the flowchart (b) showing the 2nd measurement process. 時間長さtime_p及びtime_fを表す説明図である。It is explanatory drawing showing time length time_p and time_f. 再開位置設定部55が実行する処理を表すフローチャートである。It is a flowchart showing the process which the restart position setting part 55 performs. 読取再開位置の設定方法に関する説明図である。It is explanatory drawing regarding the setting method of a reading resumption position. 強制同期指令生成部59が実行する処理を表すフローチャートである。It is a flowchart showing the process which the forced synchronous command generation part 59 performs. 同期指令の入力タイミングを表すタイムチャートである。It is a time chart showing the input timing of a synchronous command. 変形例の時間計測部51が実行する計測処理を表すフローチャートである。It is a flowchart showing the measurement process which the time measurement part 51 of a modification performs. 変形例の再開位置設定部55が実行する処理を表すフローチャートである。It is a flowchart showing the process which the restart position setting part 55 of a modification performs. 変形例での読取再開位置の設定方法に関する説明図である。It is explanatory drawing regarding the setting method of the reading restart position in a modification.

符号の説明Explanation of symbols

1…画像読取装置、11…CPU、12…ROM、13…RAM、15…エンコーダ処理部、17…駆動制御部、20…CCDラインセンサ、20a…受光素子群、20b…CCDアナログシフトレジスタ、21…読取制御部、23…外部インタフェース、31…エンコーダエッジ検出部、33…位置カウンタ、35…周期カウンタ、37…駆動回路、39…モータ制御部、41…読取フロントエンド、41a…ラインスタートトリガ信号生成部、41b…ラインスタート信号生成部、41c…転送クロック信号生成部、41d…A/D変換器、43…画データ処理部、43a…データ書込部、43b…画像処理部、43c…データ転送部、43d…停止信号生成部、43e…再開信号生成部、45…ローカルRAM、45a…バッファ、45b…処理データ記憶部、49…駆動停止指令生成部、51…時間計測部、55…再開位置設定部、59…強制同期指令生成部、63…メモリコントローラ、101…装置本体、102…静止読取窓、102A,103A…プラテン、103…自動読取窓、104…原稿カバー、106…キャリッジ、107,108…プーリ、109…ベルト、111…ガイド軸、150…ADF装置、153…分離ローラ、154…分離パッド、155…吸入ローラ、159…給紙ローラ、160…ピンチローラ、161…原稿押さえ、162…排紙ローラ、164…原稿センサアクチュエータ、165…原稿トレイ、166…排紙トレイ、EN1…読取エンコーダ、EN2…読取搬送エンコーダ、MT1…読取モータ、MT2…読取搬送モータ DESCRIPTION OF SYMBOLS 1 ... Image reading device, 11 ... CPU, 12 ... ROM, 13 ... RAM, 15 ... Encoder processing part, 17 ... Drive control part, 20 ... CCD line sensor, 20a ... Light receiving element group, 20b ... CCD analog shift register, 21 ... Reading control unit, 23 ... External interface, 31 ... Encoder edge detection unit, 33 ... Position counter, 35 ... Period counter, 37 ... Drive circuit, 39 ... Motor control unit, 41 ... Reading front end, 41a ... Line start trigger signal Generation unit 41b Line start signal generation unit 41c Transfer clock signal generation unit 41d A / D converter 43 Image data processing unit 43a Data writing unit 43b Image processing unit 43c Data Transfer unit, 43d ... stop signal generation unit, 43e ... restart signal generation unit, 45 ... local RAM, 45a ... buffer, 4 b: Processing data storage unit, 49 ... Drive stop command generation unit, 51 ... Time measurement unit, 55 ... Restart position setting unit, 59 ... Forced synchronization command generation unit, 63 ... Memory controller, 101 ... Main unit, 102 ... Static reading Window, 102A, 103A ... Platen, 103 ... Automatic reading window, 104 ... Document cover, 106 ... Carriage, 107, 108 ... Pulley, 109 ... Belt, 111 ... Guide shaft, 150 ... ADF device, 153 ... Separation roller, 154 ... Separation pad, 155... Suction roller, 159 .. feed roller, 160... Pinch roller, 161 .. document press, 162 .. discharge roller, 164 .. document sensor actuator, 165. Encoder, EN2 ... Reading transport encoder, MT1 ... Reading motor, MT2 ... Reading transport motor

Claims (6)

読取対象の画像情報を読み取る読取ユニットと、
DCモータを有し、前記DCモータの駆動力により、前記読取ユニット及び読取対象のいずれか一方を、搬送対象として、搬送する搬送機構と、
前記搬送機構を通じて、前記搬送対象の移動速度を制御し、前記搬送対象を、画像読取方向に定速で移動させると共に、ラインスタート信号を、前記読取ユニットに周期的に入力することにより、前記読取ユニットに、ライン画像の読取開始タイミングを指定して、ライン毎に読取動作を行わせ、各ラインの読取画像データを、前記読取ユニットに生成させ、前記生成された読取画像データを、バッファに書き込む処理を実行する読取制御手段と、
前記読取制御手段による処理の中断要否を判定する中断判定手段と、
前記中断判定手段により前記読取制御手段による処理の中断が必要であると判定されると、前記読取制御手段による処理を中断させる停止制御手段と、
前記搬送対象が所定量移動する度、事象発生信号を出力する事象発生信号出力手段と、
前記事象発生信号出力手段から入力される事象発生信号に基づき、前記搬送対象の現在位置を検出する位置検出手段と、
前記停止制御手段の動作によって前記読取制御手段による処理が中断されたラインに対応するラインスタート信号が前記読取ユニットに入力された時点TSと、前記時点TSより過去において、前記事象発生信号出力手段から最後に事象発生信号が入力された時点TPと、前記時点TPの経過後、最初に前記事象発生信号が入力された時点TFと、の時間的な関係に基づき、前記時点TPで前記位置検出手段により検出された位置、及び、前記時点TFで前記位置検出手段により検出された位置のいずれか一方を選択的に、読取再開位置に設定する再開位置設定手段と、
前記停止制御手段の動作によって前記読取制御手段による処理が中断させられると、前記搬送機構を通じ、前記搬送対象を、前記画像読取方向とは逆方向に、前記再開位置設定手段により設定された読取再開位置より進んだ位置まで、移動させる後退制御手段と、
前記読取制御手段による処理が中断されている期間、前記読取制御手段による処理の再開要否を判定する再開判定手段と、
を備え、
前記読取制御手段は、前記再開判定手段により再開が必要であると判定されると、前記後退制御手段により移動された前記搬送対象を、再度、前記画像読取方向に、定速で移動させると共に、前記位置検出手段の検出結果に基づき、前記搬送対象が、前記再開位置設定手段により設定された読取再開位置に到達した時点で、前記読取ユニットにラインスタート信号を入力し、以後、周期的にラインスタート信号を入力することにより、前記読取再開位置から、前記読取ユニットに読取動作を実行させ、前記読取ユニットにより生成された前記読取画像データを、バッファに書き込む処理を実行すること
を特徴とする画像読取装置。
A reading unit for reading image information to be read; and
A transport mechanism that includes a DC motor, and transports one of the reading unit and the reading target as a transport target by the driving force of the DC motor;
By controlling the moving speed of the conveyance object through the conveyance mechanism, moving the conveyance object at a constant speed in the image reading direction, and periodically inputting a line start signal to the reading unit. The unit designates the reading start timing of the line image, performs the reading operation for each line, causes the reading unit to generate the read image data of each line, and writes the generated read image data to the buffer Reading control means for executing processing;
Interruption determination means for determining whether or not the processing by the reading control means is interrupted;
When it is determined by the interruption determination unit that the processing by the reading control unit needs to be interrupted, a stop control unit that interrupts the processing by the reading control unit;
An event occurrence signal output means for outputting an event occurrence signal each time the transport object moves by a predetermined amount;
Based on the event occurrence signal input from the event occurrence signal output means, position detection means for detecting the current position of the conveyance target;
The time TS when the line start signal corresponding to the line for which the processing by the reading control means is interrupted by the operation of the stop control means is input to the reading unit, and the event occurrence signal output means before the time TS Based on the temporal relationship between the time point TP when the event occurrence signal was last input and the time point TF when the event occurrence signal was first input after the elapse of the time point TP, the position at the time point TP A restart position setting means for selectively setting any one of the position detected by the detection means and the position detected by the position detection means at the time TF to the reading restart position;
When the processing by the reading control unit is interrupted by the operation of the stop control unit, the reading target set by the resume position setting unit is set in the direction opposite to the image reading direction through the transport mechanism. Retreat control means for moving to a position advanced from the position;
Resumption determination means for determining whether or not resumption of the processing by the reading control means is required during a period when the processing by the reading control means is suspended;
With
When the reading control unit determines that the restart determination unit needs to restart, the reading control unit moves the conveyance object moved by the retreat control unit again in the image reading direction at a constant speed, and Based on the detection result of the position detection means, when the conveyance object reaches the reading restart position set by the restart position setting means, a line start signal is input to the reading unit. Inputting a start signal causes the reading unit to execute a reading operation from the reading restart position, and executes processing for writing the read image data generated by the reading unit into a buffer. Reader.
前記時点TPから前記時点TSまでの時間長さLP、及び、前記時点TSから前記時点TFまでの時間長さLFを計測する時間計測手段
を備え、
前記再開位置設定手段は、前記時間計測手段により計測された前記時間長さLPと前記時間長さLFとの関係に基づき、前記読取再開位置を、設定する構成にされていること
と特徴とする請求項1記載の画像読取装置。
A time measuring means for measuring a time length LP from the time point TP to the time point TS and a time length LF from the time point TS to the time point TF;
The restart position setting means is configured to set the reading restart position based on the relationship between the time length LP and the time length LF measured by the time measuring means. The image reading apparatus according to claim 1.
前記再開位置設定手段は、前記時間長さLPが前記時間長さLFより短い場合、前記時点TPで前記位置検出手段により検出された位置を、前記読取再開位置に設定し、前記時間長さLPが前記時間長さLFより長い場合、前記時点TFで前記位置検出手段により検出された位置を、前記読取再開位置に設定する構成にされていること
を特徴とする請求項2記載の画像読取装置。
When the time length LP is shorter than the time length LF, the resumption position setting means sets the position detected by the position detection means at the time TP as the reading resumption position, and the time length LP 3. The image reading apparatus according to claim 2, wherein when the time length LF is longer than the time length LF, the position detected by the position detection unit at the time point TF is set as the reading restart position. .
読取対象の画像情報を読み取る読取ユニットと、
DCモータを有し、前記DCモータの駆動力により、前記読取ユニット及び読取対象のいずれか一方を、搬送対象として、搬送する搬送機構と、
前記搬送機構を通じて、前記搬送対象の移動速度を制御し、前記搬送対象を、画像読取方向に定速で移動させると共に、ラインスタート信号を、前記読取ユニットに周期的に入力することにより、前記読取ユニットに、ライン画像の読取開始タイミングを指定して、ライン毎に読取動作を行わせ、各ラインの読取画像データを、前記読取ユニットに生成させ、前記生成された読取画像データを、バッファに書き込む処理を実行する読取制御手段と、
前記読取制御手段による処理の中断要否を判定する中断判定手段と、
前記中断判定手段により前記読取制御手段による処理の中断が必要であると判定されると、前記読取制御手段による処理を中断させる停止制御手段と、
前記搬送対象が所定量移動する度、事象発生信号を出力する事象発生信号出力手段と、
前記事象発生信号出力手段から入力される事象発生信号に基づき、前記搬送対象の現在位置を検出する位置検出手段と、
前記停止制御手段の動作によって前記読取制御手段による処理が中断されたラインに対応するラインスタート信号が前記読取ユニットに入力された時点TSと、前記時点TSより過去において、前記事象発生信号出力手段から最後に事象発生信号が入力された時点TPとの間の時間長さLPを、検出する時間長さ検出手段と、
前記事象発生信号出力手段から入力される事象発生信号に基づき、前記事象発生信号の入力時間間隔LIを、検出する入力時間間隔検出手段と、
前記時間長さ検出手段により検出された前記時間長さLPと、前記時点TPで、前記入力時間間隔検出手段により検出された前記事象発生信号の入力時間間隔LIとの関係に基づき、前記時点TPで前記位置検出手段により検出された位置、及び、前記時点TPの経過後、最初に前記事象発生信号が入力された時点TFで前記位置検出手段により検出された位置のいずれか一方を選択的に、読取再開位置に設定する再開位置設定手段と、
前記停止制御手段の動作によって前記読取制御手段による処理が中断させられると、前記搬送機構を通じ、前記搬送対象を、前記画像読取方向とは逆方向に、前記再開位置設定手段により設定された読取再開位置より進んだ位置まで、移動させる後退制御手段と、
前記読取制御手段による処理が中断されている期間、前記読取制御手段による処理の再開要否を判定する再開判定手段と、
を備え、
前記読取制御手段は、前記再開判定手段により再開が必要であると判定されると、前記後退制御手段により移動された前記搬送対象を、再度、前記画像読取方向に、定速で移動させると共に、前記位置検出手段の検出結果に基づき、前記搬送対象が、前記再開位置設定手段により設定された読取再開位置に到達した時点で、前記読取ユニットにラインスタート信号を入力し、以後、周期的にラインスタート信号を入力することにより、前記読取再開位置から、前記読取ユニットに読取動作を実行させ、前記読取ユニットにより生成された前記読取画像データを、バッファに書き込む処理を実行すること
を特徴とする画像読取装置。
A reading unit for reading image information to be read; and
A transport mechanism that includes a DC motor, and transports one of the reading unit and the reading target as a transport target by the driving force of the DC motor;
By controlling the moving speed of the conveyance object through the conveyance mechanism, moving the conveyance object at a constant speed in the image reading direction, and periodically inputting a line start signal to the reading unit. The unit designates the reading start timing of the line image, performs the reading operation for each line, causes the reading unit to generate the read image data of each line, and writes the generated read image data to the buffer Reading control means for executing processing;
Interruption determination means for determining whether or not the processing by the reading control means is interrupted;
When it is determined by the interruption determination unit that the processing by the reading control unit needs to be interrupted, a stop control unit that interrupts the processing by the reading control unit;
An event occurrence signal output means for outputting an event occurrence signal each time the transport object moves by a predetermined amount;
Based on the event occurrence signal input from the event occurrence signal output means, position detection means for detecting the current position of the conveyance target;
The time TS when the line start signal corresponding to the line for which the processing by the reading control means is interrupted by the operation of the stop control means is input to the reading unit, and the event occurrence signal output means before the time TS A time length detecting means for detecting a time length LP from the time point TP when the event occurrence signal is last input to
Input time interval detection means for detecting an input time interval LI of the event occurrence signal based on an event occurrence signal input from the event occurrence signal output means;
Based on the relationship between the time length LP detected by the time length detection means and the input time interval LI of the event occurrence signal detected by the input time interval detection means at the time TP, the time point Select one of the position detected by the position detecting means at TP and the position detected by the position detecting means at the time TF when the event occurrence signal is first input after the time TP has elapsed. In particular, restart position setting means for setting the reading restart position,
When the processing by the reading control unit is interrupted by the operation of the stop control unit, the reading target set by the resume position setting unit is set in the direction opposite to the image reading direction through the transport mechanism. Retreat control means for moving to a position advanced from the position;
Resumption determination means for determining whether or not resumption of the processing by the reading control means is required during a period when the processing by the reading control means is suspended;
With
When the reading control unit determines that the restart determination unit needs to restart, the reading control unit moves the conveyance object moved by the retreat control unit again in the image reading direction at a constant speed, and Based on the detection result of the position detection means, when the conveyance object reaches the reading restart position set by the restart position setting means, a line start signal is input to the reading unit. Inputting a start signal causes the reading unit to execute a reading operation from the reading restart position, and executes processing for writing the read image data generated by the reading unit into a buffer. Reader.
前記再開位置設定手段は、前記時間長さLPが前記入力時間間隔LIの二分の一より小さいとき、前記時点TPで前記位置検出手段により検出された位置を、前記読取再開位置に設定し、前記時間長さLPが前記入力時間間隔LIの二分の一より大きいとき、前記時点TFで前記位置検出手段により検出された位置を、前記読取再開位置に設定する構成にされていること
を特徴とする請求項4記載の画像読取装置。
The restart position setting means sets the position detected by the position detection means at the time TP as the reading restart position when the time length LP is smaller than one half of the input time interval LI, When the time length LP is larger than one half of the input time interval LI, the position detected by the position detection means at the time point TF is set as the reading restart position. The image reading apparatus according to claim 4.
前記中断判定手段は、前記バッファの空き容量に基づき、前記読取制御手段による処理の中断要否を判定する構成にされていることを特徴とする請求項1〜請求項5のいずれかに記載の画像読取装置。   6. The interrupt determination unit according to claim 1, wherein the interrupt determination unit is configured to determine whether or not the processing by the reading control unit is interrupted based on a free space of the buffer. Image reading device.
JP2007257831A 2007-10-01 2007-10-01 Image reading device Expired - Fee Related JP4748135B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007257831A JP4748135B2 (en) 2007-10-01 2007-10-01 Image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007257831A JP4748135B2 (en) 2007-10-01 2007-10-01 Image reading device

Publications (2)

Publication Number Publication Date
JP2009089160A JP2009089160A (en) 2009-04-23
JP4748135B2 true JP4748135B2 (en) 2011-08-17

Family

ID=40661941

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007257831A Expired - Fee Related JP4748135B2 (en) 2007-10-01 2007-10-01 Image reading device

Country Status (1)

Country Link
JP (1) JP4748135B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3585976B2 (en) * 1995-02-22 2004-11-10 松下電器産業株式会社 Image reading device
JP2000270162A (en) * 1999-03-15 2000-09-29 Fuji Xerox Co Ltd Image reader
JP2001045236A (en) * 1999-08-02 2001-02-16 Ricoh Co Ltd Image reader
JP2001186311A (en) * 1999-10-14 2001-07-06 Ricoh Co Ltd Picture reader, copying machine, facsimile equipment and composite equipment
JP2002176534A (en) * 2000-12-07 2002-06-21 Brother Ind Ltd Image reader
JP2005333377A (en) * 2004-05-19 2005-12-02 Sharp Corp Image reading apparatus

Also Published As

Publication number Publication date
JP2009089160A (en) 2009-04-23

Similar Documents

Publication Publication Date Title
JP4797936B2 (en) Image reading device
JP2008129063A (en) Image reader
JP4650576B2 (en) Image reading device
JP2010141467A (en) Apparatus, program and method for reading image
JP5141712B2 (en) Image reading device
JP5141713B2 (en) Image reading device
JP4748135B2 (en) Image reading device
JP5098756B2 (en) Image reading device
JP5056069B2 (en) Motor control method and motor control apparatus
JP4858477B2 (en) Image reading device
JP4858478B2 (en) Image reading device
JP4803149B2 (en) Image reading device
JP5915501B2 (en) Image reading device
JP2009246665A (en) Image scanner
JP4803160B2 (en) Image reading device
JP2016189569A (en) Image reading system
JP4737070B2 (en) Image reading device
JP2008005165A (en) Image reader
US9131101B2 (en) Image reading apparatus
JP6323002B2 (en) Image reading device
JP7192495B2 (en) Image reading system, image reading method, and computer program.
CN117896470A (en) Image reading apparatus and computer-readable storage medium
JP2014049947A (en) Image reader
JP2010141465A (en) Apparatus, program and method for reading image
JP2010141464A (en) Apparatus, program and method for reading image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110411

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: 20110419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110502

R150 Certificate of patent or registration of utility model

Ref document number: 4748135

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140527

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees