JP2012190169A - Optical reading device, control method for optical reading device, and program - Google Patents

Optical reading device, control method for optical reading device, and program Download PDF

Info

Publication number
JP2012190169A
JP2012190169A JP2011051963A JP2011051963A JP2012190169A JP 2012190169 A JP2012190169 A JP 2012190169A JP 2011051963 A JP2011051963 A JP 2011051963A JP 2011051963 A JP2011051963 A JP 2011051963A JP 2012190169 A JP2012190169 A JP 2012190169A
Authority
JP
Japan
Prior art keywords
read
line
pointer
data
area
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.)
Withdrawn
Application number
JP2011051963A
Other languages
Japanese (ja)
Inventor
Kenji Asada
健司 浅田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2011051963A priority Critical patent/JP2012190169A/en
Priority to CN 201220041700 priority patent/CN202615787U/en
Publication of JP2012190169A publication Critical patent/JP2012190169A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To effectively prevent data from being newly written in an area in which data that has not been completely read is written.SOLUTION: A control unit 40 controls movement of a write pointer using a destructive pointer following a read pointer so that the write pointer does not pass the destructive pointer toward a predetermined direction side, and also controls movement of the destructive pointer so that it does not pass, toward the predetermined direction side, the position of a line in which line data containing data that has not been completely read is written regardless of the position of the read pointer.

Description

本発明は、読み取り対象の媒体を光学的に読み取る光学読取装置、当該光学読取装置の制御方法、及び、当該光学読取装置を制御するためのプログラムに関する。   The present invention relates to an optical reader that optically reads a medium to be read, a control method for the optical reader, and a program for controlling the optical reader.

従来、読み取り対象の媒体を光学的に読み取り、読み取り結果を順次リングバッファーに書き込む光学読取装置が知られている(例えば、特許文献1参照)。
この種の光学読取装置では、リングバッファーに書き込まれたデータが、順次、読み出されるのが一般的である。
2. Description of the Related Art Conventionally, an optical reading apparatus that optically reads a medium to be read and writes reading results in a ring buffer sequentially is known (for example, see Patent Document 1).
In this type of optical reading apparatus, data written in the ring buffer is generally read sequentially.

特開2004−94735号公報JP 2004-94735 A

しかしながら、上述した光学読取装置のように、読み取り結果をリングバッファーに書き込むものでは、未だ読み出しが終了していないデータが書き込まれている領域に対して、新たにデータが書き込まれることを防止する必要がある。
本発明は、上述した事情に鑑みてなされたものであり、リングバッファーに読み取り結果を書き込む光学読取装置において、読み出しが終了していないデータが書き込まれている領域に対して、新たにデータが書き込まれることを効果的に防止することを目的とする。
However, in the case where the reading result is written in the ring buffer as in the optical reading device described above, it is necessary to prevent new data from being written to the area where the data that has not yet been read is written. There is.
The present invention has been made in view of the above-described circumstances, and in an optical reading apparatus that writes a reading result in a ring buffer, new data is written in an area where data that has not been read is written. The purpose is to effectively prevent the occurrence of the problem.

上記目的を達成するために、本発明は、光学読取装置であって、媒体を光学的に読み取るものでライン状に並んだ光素子を有する光学読取部と、記憶部と、前記記憶部の記憶領域に形成されたリングバッファーと、前記光学読取部によりライン単位で読み取った読取データを前記リングバッファーに巡回的に書き込み、前記リングバッファーにおける所定の領域の前記読取データを読み出す制御部と、を備え、前記制御部は、前記読取データを前記リングバッファーに書き込む前記ラインの位置を示すライトポインター、及び、読み出す前記読取データが含まれる前記ラインの位置を示すリードポインターによって、前記読取データの書き込み、及び、読み出しの対象となる前記ラインを管理し、さらに、前記リングバッファーにおける消去または上書き可能な前記ラインの位置を示す破棄ポインターによって、前記ライトポインターが前記破棄ポインターの位置を超えないように、前記ライトポインターを制御すると共に、前記リードポインターの位置にかかわらず、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御することを特徴とする。
この構成によれば、破棄ポインターは、リードポインターの位置にかかわらず、読み出しが完了していない読取データを含むラインの位置を超えないよう、その移動が制御されかつ、ライトポインターは、この破棄ポインターの位置を超えないようにその移動が制御されるため、読み出しが完了していない読取データを含むラインに対して読取データが上書きされることにより、新たにデータが書き込まれたり、また、当該ラインに含まれる読取データが消去されたりすることを効果的に防止できる。
ここで、リングバッファーにおいて、有用な読取データのみを読み出すようにし、有用な読取データが含まれる所定の領域のみを取り扱うのが効率的である。この場合、同じラインに複数の有用な読取データが含まれる所定の領域が存在する場合、一つの領域を読み出した後一旦リードポインターが進んでいるので、ライトポインターを進めて書き込みを行ってしまうと、まだ読み出しが済んでいない所定の領域に書き込みがされてしまうおそれがある。ライトポインターとリードポインターのみの管理ではこのような問題がある。そこで、破棄ポインターにより、読み出しが済んでいない所定の領域を含むラインの位置を超えないように、該当するラインの全ての所定の領域の読み出しが終わっていて、消去または上書き可能なラインの位置を示すものとして管理する。ラインポインターが破棄ポインターの位置を超えなければ、まだ読み出しが済んでいない所定の領域に書き込みがされてしまうことがない。また、破棄ポインターの位置までライトポインターを進めてよいことがわかり、効率的な読み取り動作も可能となる。
In order to achieve the above object, the present invention provides an optical reader, an optical reader that optically reads a medium and includes optical elements arranged in a line, a storage, and a storage of the storage A ring buffer formed in a region, and a control unit that cyclically writes the read data read in line units by the optical reading unit to the ring buffer and reads the read data of a predetermined region in the ring buffer. The control unit writes the read data by a write pointer that indicates the position of the line that writes the read data to the ring buffer, and a read pointer that indicates the position of the line that includes the read data to be read; and Manage the line to be read, and erase in the ring buffer Alternatively, the write pointer is controlled by a discard pointer indicating the position of the overwritable line so that the write pointer does not exceed the position of the discard pointer, and reading is completed regardless of the position of the read pointer. The discard pointer is controlled so as not to exceed the position of the line including the read data that has not been read.
According to this configuration, regardless of the position of the read pointer, the movement of the discard pointer is controlled so as not to exceed the position of the line including the read data that has not been read, and the write pointer is the discard pointer. Since the movement is controlled so as not to exceed the position of the read data, when the read data is overwritten on the line including the read data that has not been read, new data is written or the line Can be effectively prevented from being erased.
Here, in the ring buffer, it is efficient to read only useful read data and handle only a predetermined area containing useful read data. In this case, when there is a predetermined area containing a plurality of useful read data on the same line, the read pointer advances once after reading one area. There is a risk of writing in a predetermined area that has not yet been read. There is such a problem in the management of only the write pointer and the read pointer. Therefore, the position of the erasable or overwritable line is determined by reading all the predetermined areas of the corresponding line so that the position of the line including the predetermined area that has not been read is not exceeded by the discard pointer. Manage as shown. If the line pointer does not exceed the position of the discard pointer, writing to a predetermined area that has not yet been read will not occur. Further, it is understood that the write pointer can be advanced to the position of the discard pointer, and an efficient reading operation is also possible.

また、上記発明の光学読取装置であって、本発明は、前記制御部は、前記所定の領域が複数の場合は、それぞれの領域毎に読み出されるような態様で、前記読取データの読み出しが可能であり、1のラインに、複数の前記所定の領域のそれぞれに属する前記読取データが包含されている場合は、各領域に属する前記読取データのそれぞれの読み出しが完了するまでは、前記リードポインターの位置にかかわらず、前記破棄ポインターが、当該1のラインの位置を超えないようにすることを特徴とする。
この構成によれば、リングバッファーにおける複数の領域に属する読取データを領域毎に読み出す場合において、1のラインに、複数の異なる領域のそれぞれに属する読取データが包含されている場合であっても、包含された全ての読取データの読み出しが完了する前に、当該1のラインに、新たに読取データが書き込まれることを効果的に防止できる。
Further, in the optical reading apparatus according to the invention described above, the control unit may read the read data in such a manner that when the predetermined area is plural, the read data is read for each area. When one line includes the read data belonging to each of the plurality of predetermined areas, until the reading of the read data belonging to each area is completed, Regardless of the position, the discard pointer does not exceed the position of the one line.
According to this configuration, when reading data belonging to a plurality of areas in the ring buffer is read for each area, even if the read data belonging to each of a plurality of different areas is included in one line, Before the reading of all the included read data is completed, it is possible to effectively prevent new read data from being written to the one line.

また、上記発明の光学読取装置であって、本発明は、前記制御部は、前記リングバッファーを複数の前記ラインごとに分割して形成されたブロック毎に、1のブロックに属する各前記ラインへの前記読取データの書き込みが完了した後、当該1のブロック内で前記リードポインターの位置を移動させつつ、当該ブロックに属する前記ラインの前記読取データを読み出し、1のブロックに、複数の所定の領域が属している場合、前記リードポインターの位置にかかわらず、当該1のブロックに属する前記ラインのうち、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御することを特徴とする。
この構成によれば、ブロック単位で読取データの読み出しを実行することによる読み出し処理の効率化を実現しつつ、ブロック内に、複数の所定領域がある場合であっても、読み出しが完了していない読取データを含むラインを超えないように破棄ポインターの移動が制御され、当該ラインに新たに読取データが書き込まれることを効果的に防止できる。
Further, in the optical reading device according to the invention described above, the control unit is configured to transfer the ring buffer to each line belonging to one block for each block formed by dividing the ring buffer into a plurality of lines. After writing of the read data is completed, the read data of the line belonging to the block is read while moving the position of the read pointer within the block, and a plurality of predetermined areas are read in one block. The discard pointer does not exceed the position of the line including the read data that has not been read out of the lines belonging to the one block regardless of the position of the read pointer. It is characterized by controlling.
According to this configuration, the reading process is efficiently performed by reading the read data in units of blocks, and the read is not completed even when there are a plurality of predetermined areas in the block. The movement of the discard pointer is controlled so as not to exceed the line including the read data, and it is possible to effectively prevent new read data from being written to the line.

また、上記目的を達成するために、本発明は、媒体を光学的に読み取るものでライン状に並んだ光素子を有する光学読取部と、記憶部の記憶領域に形成されたリングバッファーと、を備える光学読取装置の制御方法であって、前記光学読取部が読み取った読取データを前記リングバッファーに書き込む前記ラインの位置を示すライトポインター、及び、読み出す前記読取データが含まれる前記ラインの位置を示すリードポインターによって、前記読取データの書き込み、及び、読み出しの対象となる前記ラインを管理した上で、前記光学読取部によりライン単位で読み取った前記読取データを前記リングバッファーにおいて巡回的に書き込み、前記リングバッファーにおける所定の領域の前記読取データを読み出し、さらに、前記リングバッファーにおける消去または上書き可能な前記ラインの位置を示す破棄ポインターによって、前記ライトポインターが前記破棄ポインターの位置を超えないように、前記ライトポインターを制御すると共に、前記リードポインターの位置にかかわらず、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御することを特徴とする。
この制御方法によれば、破棄ポインターは、リードポインターの位置にかかわらず、読み出しが完了していない読取データを含むラインの位置を超えないよう、その移動が制御されかつ、ライトポインターは、この破棄ポインターの位置を超えないようにその移動が制御されるため、読み出しが完了していない読取データを含むラインに対して読取データが上書きされることにより、新たにデータが書き込まれたり、また、当該ラインに含まれる読取データが消去されたりすることを効果的に防止できる。
In order to achieve the above object, the present invention includes an optical reading unit that optically reads a medium and includes optical elements arranged in a line, and a ring buffer formed in a storage area of the storage unit. A method for controlling an optical reading apparatus, comprising: a write pointer indicating a position of the line for writing read data read by the optical reading unit to the ring buffer; and a position of the line including the read data to be read. The read data is written and read by the read pointer, and the lines to be read are managed, and the read data read in line units by the optical reading unit is cyclically written in the ring buffer. The read data of a predetermined area in the buffer is read, and the ring buffer is further read. The write pointer is controlled so that the write pointer does not exceed the position of the discard pointer by the discard pointer indicating the position of the erasable or overwritable line in the key, and regardless of the position of the read pointer, The discard pointer is controlled so as not to exceed the position of the line including the read data that has not been read.
According to this control method, regardless of the position of the read pointer, the movement of the discard pointer is controlled so as not to exceed the position of the line including the read data that has not been read, and the write pointer is Since the movement is controlled so as not to exceed the position of the pointer, when the read data is overwritten on the line including the read data that has not been read, new data is written or It is possible to effectively prevent the read data included in the line from being erased.

また、上記目的を達成するために、本発明は、媒体を光学的に読み取るものでライン状に並んだ光素子を有する光学読取部と、前記記憶部の記憶領域に形成されたリングバッファーと、を備える光学読取装置を制御する制御部により実行されるプログラムであって、前記制御部を、前記光学読取部が読み取った読取データを前記リングバッファーに書き込む前記ラインの位置を示すライトポインター、及び、読み出す前記読取データが含まれる前記ラインの位置を示すリードポインターによって、前記読取データの書き込み、及び、読み出しの対象となる前記ラインを管理した上で、前記光学読取部によりライン単位で読み取った前記読取データを前記リングバッファーにおいて巡回的に書き込み、前記リングバッファーにおける所定の領域の前記読取データを読み出し、さらに、前記リングバッファーにおける消去または上書き可能な前記ラインの位置を示す破棄ポインターによって、前記ライトポインターが前記破棄ポインターの位置を超えないように、前記ライトポインターを制御すると共に、前記リードポインターの位置にかかわらず、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御する手段として機能させることを特徴とする。
このプログラムを実行すれば、破棄ポインターは、リードポインターの位置にかかわらず、読み出しが完了していない読取データを含むラインの位置を超えないよう、その移動が制御されかつ、ライトポインターは、この破棄ポインターの位置を超えないようにその移動が制御されるため、読み出しが完了していない読取データを含むラインに対して読取データが上書きされることにより、新たにデータが書き込まれたり、また、当該ラインに含まれる読取データが消去されたりすることを効果的に防止できる。
In order to achieve the above object, the present invention provides an optical reading unit that optically reads a medium and includes optical elements arranged in a line, a ring buffer formed in a storage area of the storage unit, A light pointer indicating the position of the line for writing the read data read by the optical reading unit to the ring buffer; The reading that is read and read in units of lines by the optical reading unit after the lines to be read and written are managed by a read pointer indicating the position of the line including the read data to be read. Data is cyclically written in the ring buffer, and a predetermined area in the ring buffer The read pointer is read, and the write pointer is controlled by a discard pointer indicating the position of the line that can be erased or overwritten in the ring buffer so that the write pointer does not exceed the position of the discard pointer. Regardless of the position of the read pointer, it functions as means for controlling the discard pointer so as not to exceed the position of the line including the read data that has not been read.
When this program is executed, the movement of the discard pointer is controlled so that it does not exceed the position of the line containing the read data that has not been read, regardless of the position of the read pointer, and the write pointer is Since the movement is controlled so as not to exceed the position of the pointer, when the read data is overwritten on the line including the read data that has not been read, new data is written or It is possible to effectively prevent the read data included in the line from being erased.

本発明によれば、読み出しが終了していないデータが書き込まれている領域に対して、新たにデータが書き込まれることを効果的に防止できる。   According to the present invention, it is possible to effectively prevent new data from being written to an area where data that has not been read is written.

本実施形態に係るドットインパクトプリンターの外観斜視図である。1 is an external perspective view of a dot impact printer according to an embodiment. プリンター本体を示す斜視図である。FIG. 2 is a perspective view showing a printer body. プリンター本体の側断面図である。FIG. 3 is a side sectional view of the printer body. ドットインパクトプリンターの機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of a dot impact printer. 画像バッファーを模式的に示す図である。It is a figure which shows an image buffer typically. ブロックを説明するため、画像バッファーを模式的に示す図である。It is a figure which shows an image buffer typically, in order to demonstrate a block. エリアスキャンを説明するため、画像バッファーを模式的に示す図。The figure which shows an image buffer typically in order to demonstrate area scanning. 破棄ポインターを説明するため、画像バッファーを模式的に示す図。The figure which shows an image buffer typically in order to demonstrate a discard pointer. エリアスキャン時の画像バッファーを模式的に示す図である。It is a figure which shows typically the image buffer at the time of an area scan. エリアスキャン時の画像バッファーを模式的に示す図である。It is a figure which shows typically the image buffer at the time of an area scan.

以下、図面を参照して本発明の実施形態について説明する。
図1は、本実施形態に係るドットインパクトプリンター10(光学読取装置)の外観を示す正面斜視図である。図2は、プリンター本体11を示す外観斜視図である。図3は、図1のドットインパクトプリンター10を示す側断面図である。
図1に示すドットインパクトプリンター10は、記録ヘッド18(図3参照)が備える複数の記録ワイヤーを、リボンカートリッジ(図示略)から繰り出したインクリボン(図示略)を介して記録媒体Sに押し付け、この記録媒体Sの記録面上にドットを形成することにより、文字を含む画像を記録する。ドットインパクトプリンター10は、光学読取装置110(図3参照)を備え、光学読取装置としても機能し、記録媒体Sの表面に表示された文字や記号、画像等を光学的に読み取ることができる。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a front perspective view showing an external appearance of a dot impact printer 10 (optical reading device) according to the present embodiment. FIG. 2 is an external perspective view showing the printer main body 11. FIG. 3 is a side sectional view showing the dot impact printer 10 of FIG.
The dot impact printer 10 shown in FIG. 1 presses a plurality of recording wires provided in the recording head 18 (see FIG. 3) against the recording medium S via an ink ribbon (not shown) fed out from a ribbon cartridge (not shown). By forming dots on the recording surface of the recording medium S, an image including characters is recorded. The dot impact printer 10 includes an optical reading device 110 (see FIG. 3), functions as an optical reading device, and can optically read characters, symbols, images, and the like displayed on the surface of the recording medium S.

ドットインパクトプリンター10で使用可能な記録媒体S(媒体)としては、所定長さに切断されたカット媒体と、複数枚が連接された連続紙とが挙げられる。カット媒体としては、例えば単票紙や単票複写紙などの他、通帳や葉書、封筒などがあり、連続紙には連続複写紙やミシン目などで連接されたファンフォールド紙を含む。本実施形態では、記録媒体Sとして、金融機関等が発行する小切手または手形(以下、総称して小切手という)や、金融機関等が発行する通帳が使用される。小切手は、磁気インクによって、その表面の一部の領域MAに使用者の口座番号や当該小切手のシリアル番号等のMICR(Magnetic Ink Character Recognition)情報が印刷された単票紙である。通帳は、複数枚の記録用紙が綴じられた冊子形態となっており、この冊子を開いた内側の面が記録面となっている。通帳の裏表紙に相当する面の後部には、磁気ストライプが設けられている。   Examples of the recording medium S (medium) that can be used in the dot impact printer 10 include a cut medium cut to a predetermined length and a continuous sheet in which a plurality of sheets are connected. Examples of the cut medium include cut paper, cut copy paper, and the like, as well as passbooks, postcards, envelopes, etc. The continuous paper includes continuous copy paper and fanfold paper connected by perforations. In this embodiment, a check or bill issued by a financial institution or the like (hereinafter collectively referred to as a check) or a passbook issued by a financial institution or the like is used as the recording medium S. A check is a single-cut sheet in which MICR (Magnetic Ink Character Recognition) information such as a user's account number and a serial number of the check is printed on a partial area MA of the surface by magnetic ink. The passbook is in the form of a booklet in which a plurality of recording papers are bound, and the inner side of the booklet is the recording surface. A magnetic stripe is provided at the rear of the surface corresponding to the back cover of the passbook.

ドットインパクトプリンター10は、図1に示すように、外装体としての上部カバー12、上部ケース13及び下部ケース14を備え、上部ケース13及び下部ケース14の前面には、記録媒体Sを挿入及び排出する手差口15が開口している。一方、上部ケース13及び下部ケース14の背面には記録媒体Sを排出する排出口20が開口している。ドットインパクトプリンター10により処理された記録媒体Sを手差口15から排出するか、或いは排出口20から排出するかは、後述するホストコンピューター200からドットインパクトプリンター10に対して送信されるコマンドにより設定できる。手差口15が開口した側、すなわち図3中の左側をフロント(前)側とし、排出口20が開口した側、すなわち図3中の右側をリア(後)側とする。
ドットインパクトプリンター10は、図2に示すように、上記の外装体に覆われるプリンター本体11を有している。プリンター本体11は、下本体部11Aと、この下本体部11Aの後端部に軸11Cで支持される上本体部(図示略)とを備えている。上本体部は、上本体部の左側面に設置されている開閉レバー(図示略)の操作によって回転可能であり、上本体部を回転させるとプリンター本体11の内部が露出する。
As shown in FIG. 1, the dot impact printer 10 includes an upper cover 12, an upper case 13, and a lower case 14 as exterior bodies, and a recording medium S is inserted and discharged on the front surfaces of the upper case 13 and the lower case 14. A manual feed opening 15 is opened. On the other hand, a discharge port 20 for discharging the recording medium S is opened on the back surface of the upper case 13 and the lower case 14. Whether the recording medium S processed by the dot impact printer 10 is discharged from the manual feed port 15 or the discharge port 20 is set by a command transmitted to the dot impact printer 10 from the host computer 200 described later. it can. The side where the manual feed port 15 is opened, that is, the left side in FIG. 3 is the front (front) side, and the side where the discharge port 20 is opened, ie, the right side in FIG. 3 is the rear (rear) side.
As shown in FIG. 2, the dot impact printer 10 includes a printer main body 11 covered with the above-described exterior body. The printer main body 11 includes a lower main body portion 11A and an upper main body portion (not shown) supported by a shaft 11C at the rear end portion of the lower main body portion 11A. The upper main body can be rotated by operating an open / close lever (not shown) installed on the left side surface of the upper main body. When the upper main body is rotated, the inside of the printer main body 11 is exposed.

図2及び図3に示すように、プリンター本体11は、ベースフレーム16と、このベースフレーム16の両端に固定される一対の右サイドフレーム17A及び左サイドフレーム17Bとを備える。両サイドフレーム17A、17Bの外側には、上本体部の両サイドフレーム(図示略)があり、その間にキャリッジガイド軸31が架け渡されると共に、両サイドフレーム17A、17B間に平坦面形状の前方媒体案内24及び後方媒体案内25が固定して設けられる。これらの前方媒体案内24と後方媒体案内25との間に、平面形状のプラテン21が配置され、このプラテン21の上方には、プラテン21に対向するように記録ヘッド18が配置されている。
記録ヘッド18は、キャリッジガイド軸31に摺動自在に挿通されるキャリッジ19に搭載されている。キャリッジ19は、当該キャリッジ19を駆動するキャリッジ駆動モーター56(図4)の正転又は逆転により、タイミングベルト(図示略)を介して駆動され、キャリッジガイド軸31に案内されて往復移動される。キャリッジ19は、図1中符号Cで示す方向、すなわち、キャリッジガイド軸31の軸方向及びプラテン21の長手方向と一致する主走査方向に、上本体部両サイドフレームの間で往復走査される。なお、キャリッジ19の主走査方向Cに直交する方向、すなわち図1中符号Dで示す方向を副走査方向とする。
As shown in FIGS. 2 and 3, the printer main body 11 includes a base frame 16 and a pair of right side frame 17 </ b> A and left side frame 17 </ b> B fixed to both ends of the base frame 16. Outside the both side frames 17A and 17B, there are both side frames (not shown) of the upper main body, and a carriage guide shaft 31 is bridged between them, and a flat surface shape front is formed between the side frames 17A and 17B. A medium guide 24 and a rear medium guide 25 are fixedly provided. A planar platen 21 is disposed between the front medium guide 24 and the rear medium guide 25, and the recording head 18 is disposed above the platen 21 so as to face the platen 21.
The recording head 18 is mounted on a carriage 19 that is slidably inserted into the carriage guide shaft 31. The carriage 19 is driven via a timing belt (not shown) by a forward or reverse rotation of a carriage drive motor 56 (FIG. 4) that drives the carriage 19, and is guided and reciprocated by a carriage guide shaft 31. The carriage 19 is reciprocally scanned between both side frames of the upper main body in the main scanning direction that coincides with the direction indicated by reference numeral C in FIG. 1, that is, the axial direction of the carriage guide shaft 31 and the longitudinal direction of the platen 21. A direction orthogonal to the main scanning direction C of the carriage 19, that is, a direction indicated by a symbol D in FIG.

キャリッジ19に搭載される記録ヘッド18は、キャリッジ19と共に走行される間に、その先端面においてプラテン21に対向するワイヤー突出部(図示略)から記録ワイヤーを突出させてインクリボンに打ち当て、プラテン21と記録ヘッド18との間に搬送される記録媒体Sにインクリボンのインクを付着させて、記録媒体Sに文字を含む画像を記録する。インクリボンは、上記の本体フレーム又はキャリッジ19に装着されるリボンカートリッジ(図示略)内に折り畳まれて収納され、キャリッジ19の走査に伴って繰り出される。また、記録ヘッド18の後方側には、図3に示すように、プラテン21の上方に位置するように媒体幅センサー55が配設される。媒体幅センサー55は、キャリッジ19に搭載されてキャリッジ19とともにプラテン21上を走査され、記録媒体Sの側端の位置や記録媒体Sの幅を求めるために使用される。   While the recording head 18 mounted on the carriage 19 travels with the carriage 19, the recording wire is projected from a wire projecting portion (not shown) facing the platen 21 at the front end surface of the recording head 18 and hits the ink ribbon. The ink of the ink ribbon is attached to the recording medium S conveyed between the recording head 21 and the recording head 18 to record an image including characters on the recording medium S. The ink ribbon is folded and stored in a ribbon cartridge (not shown) mounted on the main body frame or the carriage 19 and is fed out as the carriage 19 is scanned. Further, as shown in FIG. 3, a medium width sensor 55 is disposed on the rear side of the recording head 18 so as to be positioned above the platen 21. The medium width sensor 55 is mounted on the carriage 19 and scanned on the platen 21 together with the carriage 19, and is used to obtain the position of the side edge of the recording medium S and the width of the recording medium S.

プラテン21は、図2、図3に示すように、キャリッジ19の走行方向に延在して平面形状に形成され、付勢ばね180により記録ヘッド18に向けて付勢され、かつ弾性支持されている。付勢ばね180は圧縮コイルばねであり、この付勢ばね180の付勢力により、記録ヘッド18の記録動作時における記録ワイヤーの突出力が支持される。また、プラテン21は、記録媒体Sの搬送中にこの記録媒体Sの厚さが変化した場合、又はプリンター本体11に厚さの異なる記録媒体Sが搬入された場合に、付勢ばね180の付勢力に抗して、記録ヘッド18の先端により押圧されて記録ヘッド18から離れる方向に移動する。これにより、記録媒体Sの厚さにかかわらず、記録ヘッド18の先端と記録媒体Sの記録面との間のギャップが一定に確保される。   2 and 3, the platen 21 extends in the traveling direction of the carriage 19 and is formed in a planar shape. The platen 21 is urged toward the recording head 18 by an urging spring 180 and is elastically supported. Yes. The urging spring 180 is a compression coil spring, and the urging force of the urging spring 180 supports the output of the recording wire during the recording operation of the recording head 18. Further, the platen 21 is provided with the biasing spring 180 when the thickness of the recording medium S changes during conveyance of the recording medium S or when the recording medium S having a different thickness is loaded into the printer main body 11. The head is pressed by the tip of the recording head 18 against the force and moves away from the recording head 18. Accordingly, a constant gap is ensured between the tip of the recording head 18 and the recording surface of the recording medium S regardless of the thickness of the recording medium S.

プリンター本体11は、図3に示すように、記録媒体Sを搬送する媒体搬送機構(搬送部)100と、この媒体搬送機構100で搬送される記録媒体Sの先端が突き当てられて当該記録媒体Sを整列させる整列機構28と、小切手に設けられたMICR情報の読み取りや、通帳に設けられた磁気ストライプに対して磁気情報の読み取り又は書き込みを行う磁気ヘッド34を備えた磁気データ読書部29と、この磁気データ読書部29の磁気ヘッド34がMICR情報の読み取りを含む磁気情報処理の実行時に、記録媒体Sの浮き上がりを抑制すべく、記録媒体Sを上から押える媒体押え部30と、を有している。   As shown in FIG. 3, the printer main body 11 has a medium conveying mechanism (conveying unit) 100 that conveys the recording medium S and the leading end of the recording medium S that is conveyed by the medium conveying mechanism 100 abutted against the recording medium An alignment mechanism 28 for aligning S; and a magnetic data reading unit 29 including a magnetic head 34 for reading MICR information provided on a check and reading or writing magnetic information on a magnetic stripe provided on a passbook; The magnetic head 34 of the magnetic data reading unit 29 has a medium pressing unit 30 that presses the recording medium S from above in order to suppress the floating of the recording medium S when performing magnetic information processing including reading of MICR information. is doing.

媒体搬送機構100は、図2、図3に示すように、プラテン21、第1駆動ローラー22A、第1従動ローラー22B、第2駆動ローラー23A、第2従動ローラー23B、第3駆動ローラー124A、第3従動ローラー124B、前方媒体案内24、後方媒体案内25、媒体搬送モーター26及び駆動輪列部27を備えて構成されている。媒体搬送機構100は、前方媒体案内24及び後方媒体案内25上に、各ローラーを介して記録媒体Sを搬送する搬送路Pを構成し、前方媒体案内24及び後方媒体案内25の上面が搬送路Pの搬送面PAとなっている。
本構成では、第1駆動ローラー22A、第1従動ローラー22Bは、プラテン21及び記録ヘッド18に対してプリンター本体11のフロント側に配置され、第2駆動ローラー23A、第2従動ローラー23B及び第3駆動ローラー124A、第3従動ローラー124Bは、プラテン21及び記録ヘッド18に対してプリンター本体11のリア側に順次配置されている。
As shown in FIGS. 2 and 3, the medium transport mechanism 100 includes a platen 21, a first driving roller 22A, a first driven roller 22B, a second driving roller 23A, a second driven roller 23B, a third driving roller 124A, 3 a driven roller 124B, a front medium guide 24, a rear medium guide 25, a medium transport motor 26, and a drive wheel train 27. The medium transport mechanism 100 configures a transport path P that transports the recording medium S via each roller on the front medium guide 24 and the rear medium guide 25, and the upper surfaces of the front medium guide 24 and the rear medium guide 25 are transport paths. This is the P transport surface PA.
In this configuration, the first drive roller 22A and the first driven roller 22B are arranged on the front side of the printer body 11 with respect to the platen 21 and the recording head 18, and the second drive roller 23A, the second driven roller 23B, and the third The driving roller 124 </ b> A and the third driven roller 124 </ b> B are sequentially arranged on the rear side of the printer main body 11 with respect to the platen 21 and the recording head 18.

第1駆動ローラー22Aと第1従動ローラー22Bとは、上下方向に配置されて対をなし、第2駆動ローラー23Aと第2従動ローラー23Bとは、上下方向に配置されて対をなし、第3駆動ローラー124Aと第3従動ローラー124Bとは、上下方向に配置されて対をなす。
第1駆動ローラー22A、第2駆動ローラー23A及び第3駆動ローラー124Aは、媒体搬送モーター26及び駆動輪列部27によって回転駆動される駆動ローラーであり、第1従動ローラー22B、第2従動ローラー23B及び第3従動ローラー124Bは、それぞれ第1駆動ローラー22A、第2駆動ローラー23A、及び、第3駆動ローラー124A側に所定の押圧力でばね42A、42B、42Cによりばね付勢されている従動ローラーである。これによって、第1駆動ローラー22Aと第1従動ローラー22Bとが互いに反対方向に回転駆動され、第2駆動ローラー23Aと第2従動ローラー23Bとが互いに反対方向に回転駆動され、第3駆動ローラー124Aと第3従動ローラー124Bとが互いに反対方向に回転駆動される。
The first driving roller 22A and the first driven roller 22B are arranged in a vertical direction to make a pair, and the second driving roller 23A and the second driven roller 23B are arranged in a vertical direction to make a pair, a third The driving roller 124A and the third driven roller 124B are arranged in the vertical direction to make a pair.
The first driving roller 22A, the second driving roller 23A, and the third driving roller 124A are driving rollers that are rotationally driven by the medium transport motor 26 and the driving wheel train 27, and are a first driven roller 22B and a second driven roller 23B. And the third driven roller 124B are respectively driven by the springs 42A, 42B, and 42C with a predetermined pressing force toward the first drive roller 22A, the second drive roller 23A, and the third drive roller 124A. It is. Accordingly, the first driving roller 22A and the first driven roller 22B are rotationally driven in opposite directions, the second driving roller 23A and the second driven roller 23B are rotationally driven in opposite directions, and the third driving roller 124A. And the third driven roller 124B are rotationally driven in directions opposite to each other.

駆動輪列部27は、図2に示すように、右サイドフレーム17Aの外側に配置される。この駆動輪列部27は、正転又は逆転可能な媒体搬送モーター26の駆動軸に回転一体に固定されたモーターピニオン51を備える。このモーターピニオン51からの駆動力が、減速ギア52を介して第2駆動ローラー23Aの第2ローラー軸33に取り付けられた第2駆動ギア53Bへ伝達され、更に、この第2駆動ギア53Bから中間ギア54を介して第1駆動ローラー22Aの第1ローラー軸32に取り付けられた第1駆動ギア53Aに伝達される。また、第2駆動ローラー23Aの第2ローラー軸33の回転力が、例えば、駆動ベルト(図示略)によって第3駆動ローラー124Aの第3ローラー軸134に伝達される。これにより、図3に示す第1駆動ローラー22A、第2駆動ローラー23A、及び、第3駆動ローラー124Aが同一方向に回転して、記録媒体Sをプリンター本体11内に搬送可能とする。つまり、図3に示す第1駆動ローラー22A、第2駆動ローラー23A、及び、第3駆動ローラー124Aは、媒体搬送モーター26が正転している場合、副走査方向に沿って、図中符号Fで示すようにプリンター本体11内に記録媒体Sを搬送し、媒体搬送モーター26が逆転している場合、図中符号Rで示すように、プリンター本体11内から排出する方向に記録媒体Sを搬送する。   As shown in FIG. 2, the drive wheel train 27 is disposed outside the right side frame 17A. The drive wheel train 27 includes a motor pinion 51 that is rotatably and integrally fixed to a drive shaft of a medium transport motor 26 that can rotate forward or reverse. The driving force from the motor pinion 51 is transmitted to the second driving gear 53B attached to the second roller shaft 33 of the second driving roller 23A via the reduction gear 52, and further from the second driving gear 53B to the middle. It is transmitted to the first drive gear 53A attached to the first roller shaft 32 of the first drive roller 22A via the gear 54. Further, the rotational force of the second roller shaft 33 of the second drive roller 23A is transmitted to the third roller shaft 134 of the third drive roller 124A by, for example, a drive belt (not shown). Accordingly, the first drive roller 22A, the second drive roller 23A, and the third drive roller 124A shown in FIG. 3 rotate in the same direction, and the recording medium S can be conveyed into the printer main body 11. That is, the first driving roller 22A, the second driving roller 23A, and the third driving roller 124A illustrated in FIG. 3 are denoted by F in the drawing along the sub-scanning direction when the medium transport motor 26 is rotating forward. When the recording medium S is transported into the printer main body 11 and the medium transport motor 26 is reversely rotated, the recording medium S is transported in the direction of ejection from the printer main body 11 as indicated by reference numeral R in the figure. To do.

整列機構28は、記録ヘッド18による記録媒体Sへの記録や、光学読取装置110による記録媒体Sの表面の読み取りを行う前に、この記録媒体Sを整列するものである。整列機構28は、第1駆動ローラー22A及び第1従動ローラー22Bと記録ヘッド18及びプラテン21との間に、主走査方向に並べて設けられ、搬送路P内に突出する複数の整列板38と、整列板38を駆動する整列モーター58(図4)とを備え、これら整列板38に記録媒体Sの先端部を突き当てることで記録媒体Sの向き整列させることができる。   The alignment mechanism 28 aligns the recording medium S before recording on the recording medium S by the recording head 18 or reading the surface of the recording medium S by the optical reading device 110. The alignment mechanism 28 is provided between the first driving roller 22A and the first driven roller 22B, the recording head 18 and the platen 21 in the main scanning direction, and a plurality of alignment plates 38 protruding into the conveyance path P. An alignment motor 58 (FIG. 4) for driving the alignment plate 38 is provided, and the recording medium S can be aligned and aligned by abutting the leading end portion of the recording medium S against the alignment plate 38.

プリンター本体11は、図2に示すように、搬送路Pにおける整列板38の上流側近傍に、これら整列板38に突き当てられた記録媒体Sの有無を検知する複数の整列センサー39を備える。整列センサー39は、それぞれ搬送路Pを挟んで対向する発光部(LED等)と受光部(フォトトランジスター等)とを備える光透過型のセンサーであり、主走査方向に並べて配設されている。複数の整列センサー39のうち記録媒体Sの先端を検出したセンサーの数及び配置により、整列機構28による整列後の記録媒体Sの搬送方向に対する傾きが、許容範囲内あるか否かを判定できる。
また、ドットインパクトプリンター10は、媒体搬送モーター26の駆動制御、キャリッジ19の走行制御、記録ヘッド18の記録ワイヤーによる記録動作の制御、光学読取装置110の読取動作の制御等、ドットインパクトプリンター10の全体を制御する制御部として、例えばプリンター本体11の後側の下方に、制御基板部(図示略)を備えている。
As shown in FIG. 2, the printer main body 11 includes a plurality of alignment sensors 39 that detect the presence or absence of the recording medium S abutted against the alignment plates 38 in the vicinity of the upstream side of the alignment plates 38 in the conveyance path P. The alignment sensor 39 is a light transmission type sensor that includes a light emitting unit (such as an LED) and a light receiving unit (such as a phototransistor) that face each other across the transport path P, and is aligned in the main scanning direction. Based on the number and arrangement of the sensors that detect the leading edge of the recording medium S among the plurality of alignment sensors 39, it is possible to determine whether the inclination of the recording medium S after the alignment by the alignment mechanism 28 with respect to the transport direction is within an allowable range.
Further, the dot impact printer 10 includes the drive control of the medium transport motor 26, the traveling control of the carriage 19, the control of the recording operation by the recording wire of the recording head 18, the control of the reading operation of the optical reader 110, etc. As a control unit for controlling the whole, for example, a control board unit (not shown) is provided below the rear side of the printer body 11.

プリンター本体11において、第1駆動ローラー22Aのフロント側には、搬送路Pへの記録媒体Sの挿入を検知する複数の媒体端センサー47が並設されている。これら媒体端センサー47は、搬送路Pに向けて光を発する発光部と、その反射光を検出する受光部とを備えた光反射型センサーであり、手差口15から挿入された記録媒体Sを検出する。なお、媒体端センサー47は搬送路Pを挟んで対向するように発光部と受光部とを配した光透過型センサーであっても良い。本構成では、すべての媒体端センサー47の受光部が、受光した状態から、いずれか1つの媒体端センサー47で受光が遮られた場合には、記録媒体Sが搬送路P内に挿入されたと判断される。   In the printer main body 11, a plurality of medium edge sensors 47 that detect insertion of the recording medium S into the conveyance path P are arranged in parallel on the front side of the first drive roller 22 </ b> A. These medium edge sensors 47 are light reflecting sensors each having a light emitting unit that emits light toward the conveyance path P and a light receiving unit that detects the reflected light, and the recording medium S inserted from the manual feed port 15. Is detected. The medium edge sensor 47 may be a light transmission type sensor in which a light emitting unit and a light receiving unit are arranged so as to face each other with the conveyance path P interposed therebetween. In this configuration, the recording medium S is inserted into the conveyance path P when the light receiving portions of all the medium edge sensors 47 are blocked by any one of the medium edge sensors 47 from the received light state. To be judged.

また、プリンター本体11は、図3に示すように、記録媒体Sの表面に表示された文字、記号または画像等を読み取る光学読取装置110(光学読取部)を備える。この光学読取装置110は、記録媒体Sの上面側に印刷等で表示されている情報を読み取る第1スキャナー111(読取部)と、この第1スキャナー111に対向配置され、当該記録媒体Sの下面側に印刷等で表示されている情報を読み取る第2スキャナー112(読取部)とを備える。通常、記録媒体Sは、MICR情報が印刷されている面が下面になるよう、手差口15から挿入される。
第1スキャナー111及び第2スキャナー112は、第2駆動ローラー23Aと第3駆動ローラー124Aとの間に配置され、搬送路Pを搬送中の記録媒体Sの情報を連続的に読み取る光学イメージセンサーである。
Further, as shown in FIG. 3, the printer main body 11 includes an optical reading device 110 (optical reading unit) that reads characters, symbols, images, or the like displayed on the surface of the recording medium S. The optical reading device 110 is disposed opposite to the first scanner 111 (reading unit) that reads information displayed on the upper surface side of the recording medium S by printing or the like, and the lower surface of the recording medium S. And a second scanner 112 (reading unit) that reads information displayed by printing or the like on the side. Usually, the recording medium S is inserted from the manual feed slot 15 so that the surface on which the MICR information is printed is the lower surface.
The first scanner 111 and the second scanner 112 are optical image sensors that are arranged between the second drive roller 23A and the third drive roller 124A, and continuously read information on the recording medium S being conveyed on the conveyance path P. is there.

第1スキャナー111及び第2スキャナー112は、例えば、CIS(Contact Image Sensor)型の画像読取センサーであり、記録媒体Sに密着する平坦なカバーガラス140、150と、これらカバーガラス140、150を保持する本体ケース141、151とをそれぞれ備える。これら本体ケース141、151の内側には、LED等の光源から出力される光を記録媒体Sの読み取り領域に対して照射する照射部(図示略)と、主走査方向(C方向)に一列に配列された複数の受光センサー(図示略)と、この受光センサーからの信号を上記制御基板部に出力する出力部(図示略)とがそれぞれ収容されている。なお、第1スキャナー111及び第2スキャナー112はCISを備えたものに限らず、CCD(Charge Coupled Device)を備えたものであってもよい。
第2スキャナー112は、図2に示すように、プラテン21と略平行にドットインパクトプリンター10の幅方向に延在して長手形状に構成される本体ケース151及びカバーガラス150を備え、この本体ケース151は、カバーガラス150の上面(ガラス面)が後方媒体案内25に形成された開口を通じて搬送路Pに露出するように配置されている。第1スキャナー111は、図3に示すように、カバーガラス140の下面(ガラス面)が、上記カバーガラス150の上面に対向するように第2スキャナー112の上方に設けられ、幅方向においても第2スキャナー112と略同一の長さの長手形状に形成されている。
The first scanner 111 and the second scanner 112 are, for example, CIS (Contact Image Sensor) type image reading sensors, and hold flat cover glasses 140 and 150 that are in close contact with the recording medium S, and these cover glasses 140 and 150. Main body cases 141 and 151 respectively. Inside the main body cases 141 and 151, an irradiation unit (not shown) for irradiating light output from a light source such as an LED to a reading area of the recording medium S and a main scanning direction (C direction) in a line. A plurality of light receiving sensors (not shown) arranged and an output part (not shown) for outputting a signal from the light receiving sensor to the control board part are accommodated. The first scanner 111 and the second scanner 112 are not limited to those having a CIS, but may be those having a CCD (Charge Coupled Device).
As shown in FIG. 2, the second scanner 112 includes a main body case 151 and a cover glass 150 that extend in the width direction of the dot impact printer 10 substantially in parallel with the platen 21 and have a longitudinal shape. 151 is arranged such that the upper surface (glass surface) of the cover glass 150 is exposed to the transport path P through an opening formed in the rear medium guide 25. As shown in FIG. 3, the first scanner 111 is provided above the second scanner 112 so that the lower surface (glass surface) of the cover glass 140 faces the upper surface of the cover glass 150. The two scanners 112 are formed in a longitudinal shape substantially the same length.

第1スキャナー111の上部には付勢部材113が設けられ、第1スキャナー111は、付勢部材113によって後方媒体案内25の記録媒体Sに対して近接するように付勢されている。また、付勢部材113は、第1スキャナー111を幅方向に渡って略均一な力で第2スキャナー112側に押し付けている。ここで、付勢部材113としては、コイルばねや板ばね、或いは、エラストマー製のクッション部材等を使用することができる。カバーガラス140、150のガラス面間には、所定の厚さの記録媒体が入り込み可能な間隔が設けられており、記録媒体Sを読み取る際には、搬送された記録媒体Sによって第1スキャナー111が上方に押し退けられ、付勢部材113が縮むことによりカバーガラス140、150間を記録媒体Sが通過可能となる。すなわち、光学読取装置110では、付勢部材113によって付勢された第1スキャナー111によって記録媒体Sを第2スキャナー112側に押し付けることで、記録媒体Sとカバーガラス140、150のガラス面とを確実に密着させて、読み取り品質を向上させている。   A biasing member 113 is provided above the first scanner 111, and the first scanner 111 is biased by the biasing member 113 so as to be close to the recording medium S of the rear medium guide 25. Further, the urging member 113 presses the first scanner 111 against the second scanner 112 side with a substantially uniform force in the width direction. Here, as the urging member 113, a coil spring, a leaf spring, an elastomer cushion member, or the like can be used. Between the glass surfaces of the cover glasses 140 and 150, an interval is provided so that a recording medium having a predetermined thickness can enter. When the recording medium S is read, the first scanner 111 is read by the conveyed recording medium S. Is pushed upward and the biasing member 113 is contracted, so that the recording medium S can pass between the cover glasses 140 and 150. That is, in the optical reading device 110, the recording medium S and the glass surfaces of the cover glasses 140 and 150 are pressed by pressing the recording medium S against the second scanner 112 side by the first scanner 111 urged by the urging member 113. It is firmly attached to improve reading quality.

第1スキャナー111及び第2スキャナー112の受光センサー(図示略)は、ドットインパクトプリンター10の主走査方向に一列に並べられ、主走査方向に延びるライン状に読み取りを行う。すなわち、光学読取部たる第1スキャナー111、及び、第2スキャナー112は、ライン状に並んだ光素子を有している。第1スキャナー111及び第2スキャナー112の受光センサーは、主走査方向における記録ヘッド18の印字可能範囲よりも広い範囲に配設されており、ドットインパクトプリンター10が印刷可能な全ての記録媒体よりも広い幅で読み取りを行える。すなわち、光学読取装置110は、ドットインパクトプリンター10で使用する全ての記録媒体Sの全面を読み取ることができる。
第1スキャナー111と第2スキャナー112とは、図3に示すように搬送路Pを挟んで対向して配設されているが、第1スキャナー111が備えるライン状の受光センサーと、第2スキャナー112が備えるライン状の受光センサーとは、記録媒体Sの搬送方向において5mm程度オフセットされている。この構成により、互いの光源からの光が他方の受光センサーに与える影響を解消でき、より高い読取品質が得られる。
The light receiving sensors (not shown) of the first scanner 111 and the second scanner 112 are arranged in a line in the main scanning direction of the dot impact printer 10 and read in a line extending in the main scanning direction. That is, the first scanner 111 and the second scanner 112 which are optical reading units have optical elements arranged in a line. The light receiving sensors of the first scanner 111 and the second scanner 112 are arranged in a wider range than the printable range of the recording head 18 in the main scanning direction, and are larger than all the recording media that the dot impact printer 10 can print. Reading is possible with a wide width. That is, the optical reading device 110 can read the entire surface of all the recording media S used in the dot impact printer 10.
As shown in FIG. 3, the first scanner 111 and the second scanner 112 are arranged to face each other with the conveyance path P interposed therebetween. However, the linear light receiving sensor provided in the first scanner 111 and the second scanner are provided. The line-shaped light receiving sensor included in 112 is offset by about 5 mm in the conveyance direction of the recording medium S. With this configuration, it is possible to eliminate the influence of light from each other's light source on the other light receiving sensor, and higher reading quality can be obtained.

第1スキャナー111及び第2スキャナー112は、それぞれ、R、G、Bの光源を備え、モノクロ(2値、16階調、256階調)及びフルカラーの読み取りが可能である。また、第1スキャナー111及び第2スキャナー112の読取解像度は、例えば、200dpi(ドット/インチ)、300dpi、600dpiの3段階に設定可能である。記録媒体Sの搬送方向(副走査方向)における読取ライン数は、主走査方向における読取解像度に合わせて設定され、読み取り時の記録媒体Sの搬送速度は読取解像度と、受光センサーの検出値の処理速度等の仕様に合わせて調整される。   The first scanner 111 and the second scanner 112 include R, G, and B light sources, respectively, and can read monochrome (binary, 16 gradations, 256 gradations) and full color. In addition, the reading resolution of the first scanner 111 and the second scanner 112 can be set in, for example, three stages of 200 dpi (dots / inch), 300 dpi, and 600 dpi. The number of reading lines in the conveyance direction (sub-scanning direction) of the recording medium S is set according to the reading resolution in the main scanning direction, and the conveyance speed of the recording medium S at the time of reading is the processing of the reading resolution and the detection value of the light receiving sensor. It is adjusted according to specifications such as speed.

図4は、ドットインパクトプリンター10の制御系の構成を示すブロック図である。
この図4に示す各部は、制御基板(図示略)に実装されたハードウェアとソフトウェアとの協働により実現される。
ドットインパクトプリンター10は、CPUや、その他の周辺回路を備え、制御プログラムに基づいてドットインパクトプリンター10の全体を制御する制御部40、制御部40によりEEPROM42から読み出された制御プログラムやデータ等を一時的に記憶するRAM41(記憶部)、制御部40により実行される制御プラグラムや処理されるデータ等を記憶したEEPROM42、ドットインパクトプリンター10を制御するホストコンピューター200との間で情報を送受信する際のデータ形式を変換するインターフェイス(I/F)43、各種センサー類に接続されたゲートアレイ(G/A)45、各種モーターを駆動するモータードライバー46、及び、ヘッドを駆動するヘッドドライバー48を備え、これらの各部はバス49を介して接続されている。
RAM41には、光学読取装置110が読み取った読取画像データが書き込まれる画像バッファー60が形成されている。詳細は後述するが、この画像バッファー60は、所定の手順に準拠して巡回的にデータが書き込まれるリングバッファーであり、制御部40は、当該画像バッファー60に書き込まれた読取画像データを読み出して、ホストコンピューター200へ出力する。
FIG. 4 is a block diagram showing the configuration of the control system of the dot impact printer 10.
Each unit shown in FIG. 4 is realized by cooperation of hardware and software mounted on a control board (not shown).
The dot impact printer 10 includes a CPU and other peripheral circuits. The control unit 40 controls the entire dot impact printer 10 based on a control program, and the control program and data read from the EEPROM 42 by the control unit 40. When transmitting / receiving information to / from the RAM 41 (storage unit) that temporarily stores, the EEPROM 42 that stores control programs executed by the control unit 40, data to be processed, and the host computer 200 that controls the dot impact printer 10 Interface (I / F) 43 for converting the data format, gate array (G / A) 45 connected to various sensors, motor driver 46 for driving various motors, and head driver 48 for driving the heads These parts are bus 4 It is connected via a.
In the RAM 41, an image buffer 60 in which read image data read by the optical reading device 110 is written is formed. Although details will be described later, the image buffer 60 is a ring buffer in which data is cyclically written in accordance with a predetermined procedure, and the control unit 40 reads the read image data written in the image buffer 60. To the host computer 200.

ゲートアレイ45には、整列センサー39、媒体端センサー47、媒体幅センサー55、第1スキャナー111、及び、第2スキャナー112が接続されている。ゲートアレイ45は、整列センサー39、媒体端センサー47及び媒体幅センサー55から入力されるアナログ電圧を量子化してデジタルデータとし、制御部40に出力する。
第1スキャナー111及び第2スキャナー112は、記録媒体Sの表面をCISにより光学的に読み取り、CISの検出電圧をCISの画素毎にゲートアレイ45に供給し、ゲートアレイ45は、第1スキャナー111及び第2スキャナー112から供給されたアナログ電圧を量子化してデジタルデータとして制御部40に出力する。制御部40は、後述する所定の手順に準拠して、取得したデジタルデータに基づいて、読取画像データを画像バッファー60に展開する。
モータードライバー46は、媒体搬送モーター26、キャリッジ駆動モーター56、磁気ヘッド駆動モーター57、及び整列モーター58に接続され、これら各モーターに駆動電流や駆動パルスを供給して、これらのモーターを動作させる。なお、モータードライバー46には、整列板38(図3)を動作させる整列モーター58(図4)等が接続されていてもよい。
媒体端センサー47は、記録ヘッド18及び磁気ヘッド34に接続され、記録ヘッド18に対して駆動電流を供給することによって記録ワイヤーを突出させる一方、磁気ヘッド34に対して読取/書込用の駆動電流を出力するとともに、磁気データの読取を行う場合には、磁気ヘッド34の検出電圧(アナログ電圧)を検出し、デジタルデータとして制御部40に出力する。
An alignment sensor 39, a medium edge sensor 47, a medium width sensor 55, a first scanner 111, and a second scanner 112 are connected to the gate array 45. The gate array 45 quantizes the analog voltage input from the alignment sensor 39, the medium edge sensor 47, and the medium width sensor 55 to generate digital data, and outputs the digital data to the control unit 40.
The first scanner 111 and the second scanner 112 optically read the surface of the recording medium S by CIS, and supply the detection voltage of CIS to the gate array 45 for each pixel of the CIS. The analog voltage supplied from the second scanner 112 is quantized and output to the control unit 40 as digital data. The control unit 40 develops the read image data in the image buffer 60 based on the acquired digital data in accordance with a predetermined procedure described later.
The motor driver 46 is connected to the medium transport motor 26, the carriage drive motor 56, the magnetic head drive motor 57, and the alignment motor 58, and supplies these motors with drive currents and drive pulses to operate these motors. The motor driver 46 may be connected to an alignment motor 58 (FIG. 4) for operating the alignment plate 38 (FIG. 3).
The medium edge sensor 47 is connected to the recording head 18 and the magnetic head 34 and supplies a driving current to the recording head 18 to cause the recording wire to protrude, while the magnetic head 34 drives for reading / writing. When outputting current and reading magnetic data, the detection voltage (analog voltage) of the magnetic head 34 is detected and output to the control unit 40 as digital data.

制御部40は、EEPROM42に格納された制御プログラムに基づいて、ゲートアレイ45、モータードライバー46及びヘッドドライバー48を介して、各種センサーの検知状態を取得するとともに各モーターを駆動して記録媒体Sを搬送し、各ヘッドを駆動することにより、記録媒体Sへの記録を実行する。   Based on a control program stored in the EEPROM 42, the control unit 40 acquires detection states of various sensors via the gate array 45, the motor driver 46, and the head driver 48, and drives each motor to record the recording medium S. The recording is performed on the recording medium S by conveying and driving each head.

次いで、画像バッファー60に読取画像データが書き込まれ、書き込まれた読取画像データが順次読み出される際の動作について詳述する。   Next, the operation when the read image data is written in the image buffer 60 and the written read image data is sequentially read will be described in detail.

図5は、所定の読取解像度(例えば600dpi)で、所定のサイズの単票紙たる記録媒体Sを読み取る場合にRAM41に形成される画像バッファー60の状態を模式的に示す図である。図5(A)は、第1スキャナー111の読取結果に基づいて読取画像データが書き込まれる画像バッファー60である第1画像バッファー60aを示し、図5(B)は、第2スキャナー112の読み取り結果に基づいて読取画像データが書き込まれる画像バッファー60である第2画像バッファー60bを示している。
図5に示すように、本実施形態では、RAM41に、2つのバッファーが形成され、一方のバッファーである第1画像バッファー60aに、第1スキャナー111の読み取り結果に基づいて読取画像データが書き込まれ、また、他方のバッファーである第2画像バッファー60bに、第2スキャナー112の読み取り結果に基づいて読取画像データが書き込まれる構成となっている。
以下の説明では、第1画像バッファー60aを利用して、画像バッファー60の構成、及び、画像バッファー60の利用の態様を説明するが、第2画像バッファー60bは、第1画像バッファー60aと同様の構成であり、かつ、利用の態様も同様である。
FIG. 5 is a diagram schematically showing the state of the image buffer 60 formed in the RAM 41 when reading the recording medium S, which is a cut sheet of a predetermined size, with a predetermined reading resolution (for example, 600 dpi). FIG. 5A shows a first image buffer 60a that is an image buffer 60 into which read image data is written based on a read result of the first scanner 111, and FIG. 5B shows a read result of the second scanner 112. 2 shows a second image buffer 60b, which is an image buffer 60 into which read image data is written.
As shown in FIG. 5, in the present embodiment, two buffers are formed in the RAM 41, and the read image data is written into the first image buffer 60a, which is one of the buffers, based on the read result of the first scanner 111. In addition, the read image data is written to the second image buffer 60b, which is the other buffer, based on the reading result of the second scanner 112.
In the following description, the configuration of the image buffer 60 and the mode of use of the image buffer 60 will be described using the first image buffer 60a. The second image buffer 60b is similar to the first image buffer 60a. The configuration is the same and the mode of use is the same.

第1画像バッファー60aは、読取画像データが展開されるバッファーである。
読取画像データは、ビットマップ形式のデータであり、データ上で読取解像度に準じたピッチでドットマトリクス状に配置された各画素について、画素毎にRGB系の色成分を階調値(例えば、RGB系の色成分のそれぞれを0−256段階で表した階調値や、モノクロに係る色成分を2値で表した値)として保持する。以下、説明の便宜のため、画素毎に保持する情報のことを単に「画素」と表現することがあるものとする。
図5(A)の例では、第1画像バッファー60aは、所定方向(矢印Y1)に8400ドット、この所定方向に直交する方向であるライン方向(矢印Y2)に5100ドットの画素が展開可能な構成となっている。また、第1画像バッファー60aは、ライン方向に延びる複数(8400本)のライン(ラインL1〜ラインL8400)が所定方向に並んで配置されて形成されている。図5(A)に示すように、所定方向とは、具体的には、ラインL1からラインL8400へ向かう方向である。
The first image buffer 60a is a buffer in which the read image data is developed.
The read image data is bitmap format data. For each pixel arranged in a dot matrix at a pitch according to the read resolution on the data, RGB color components are converted into tone values (for example, RGB) for each pixel. Each color component of the system is held as a gradation value expressed in 0-256 levels, or a monochrome color component is expressed as a binary value). Hereinafter, for convenience of explanation, information held for each pixel may be simply expressed as “pixel”.
In the example of FIG. 5A, the first image buffer 60a can develop 8400 dots in a predetermined direction (arrow Y1) and 5100 dots in a line direction (arrow Y2) that is orthogonal to the predetermined direction. It has a configuration. The first image buffer 60a is formed by arranging a plurality (8400 lines) (line L1 to line L8400) extending in the line direction side by side in a predetermined direction. As shown in FIG. 5A, the predetermined direction is specifically a direction from the line L1 toward the line L8400.

第1画像バッファー60aの各ラインには、第1スキャナー111の読み取り結果に応じて、ラインごとに所定方向へ向かって順次ラインデータ(読取データ)が書き込まれる。
詳述すると、上述したように、第1スキャナー111は、主走査方向(図1のC方向)に一列に配列された複数の受光センサーを備えており、記録媒体Sの上面の読み取りの際には、記録媒体Sの搬送に伴って、一列の受光センサーによって、間欠的に、スキャン方向(搬送方向の逆方向)へ向かって、記録媒体Sの上面が読み取られる。その際、一列の受光センサーの読み取りごとに、一列の受光センサーの出力値に基づいて、主走査方向(C方向)に対応する方向に延びる5100ドットの画素(画素ごとの色に係る情報)からなるラインデータが、順次、生成される。
第1画像バッファー60aにおいて、ライン方向(矢印Y2)は主走査方向(C方向)に対応する方向であり、かつ、所定方向(矢印Y1)はスキャン方向に対応する方向である。そして、上記のようにして生成されたラインデータは、ラインごとに所定方向へ向かって、順次、書き込まれる。より具体的には、一列の受光センサーの最初の読み取り結果に基づいて生成されたラインデータが、ラインL1に書き込まれ、次に一列の受光センサーの読み取り結果に基づいて生成されたラインデータが、ラインL2に書き込まれ、という具合に、順次、ラインデータがラインごとに所定方向へ向かって書き込まれる。
ここで、第1画像バッファー60aは、リングバッファーであり、ラインデータの書き込みは、所定方向へ向かって巡回的に行われる。より具体的には、ラインL8400へラインデータの書き込みが行われた場合、次は、ラインL1へのラインデータの書き込みが行われる。この場合、ラインL1には、既にラインデータが書き込まれているが、新たなラインデータによって上書きされる。
In each line of the first image buffer 60a, line data (read data) is sequentially written in a predetermined direction for each line according to the reading result of the first scanner 111.
More specifically, as described above, the first scanner 111 includes a plurality of light receiving sensors arranged in a line in the main scanning direction (C direction in FIG. 1), and reads the upper surface of the recording medium S. As the recording medium S is transported, the upper surface of the recording medium S is intermittently read in the scanning direction (the direction opposite to the transport direction) by a row of light receiving sensors. At that time, for each reading of the light receiving sensor in one row, based on the output value of the light receiving sensor in one row, from a pixel of 5100 dots extending in the direction corresponding to the main scanning direction (C direction) (information on the color for each pixel). Are sequentially generated.
In the first image buffer 60a, the line direction (arrow Y2) is a direction corresponding to the main scanning direction (C direction), and the predetermined direction (arrow Y1) is a direction corresponding to the scanning direction. The line data generated as described above is sequentially written in a predetermined direction for each line. More specifically, the line data generated based on the first reading result of the light receiving sensor in one row is written to the line L1, and the line data generated based on the reading result of the light receiving sensor in the next row is The line data is sequentially written in a predetermined direction for each line.
Here, the first image buffer 60a is a ring buffer, and writing of line data is performed cyclically in a predetermined direction. More specifically, when line data is written to the line L8400, next, line data is written to the line L1. In this case, line data is already written in the line L1, but is overwritten by new line data.

本実施形態では、制御部40は、ライトポインターPW、及び、リードポインターPRによって、ラインデータの書き込み、及び、読み出しの対象となるラインを管理する。
詳述すると、ライトポインターPWは、ラインデータを書き込むラインを示すポインターである。ポインターとは、特定のラインを示す値を保持する情報であればよく、例えば、ポインターを管理するためのプログラム上に定義された変数であってもよく、また、RAM41の所定の領域に書き換え可能に記憶されたデータであってもよい。このことは、リードポインターPRや、後述する破棄ポインターPHについても同様である。
制御部40は、生成されたラインデータを第1画像バッファー60aのラインに書き込む際、ライトポインターPWが示すラインにラインデータを書き込み、かつ、ラインデータの書き込みが終了した後は、ライトポインターPWが示すラインを、所定方向側へ1つ移動させる。
In the present embodiment, the control unit 40 manages lines to be written and read with line data by using the write pointer PW and the read pointer PR.
More specifically, the write pointer PW is a pointer indicating a line in which line data is written. The pointer may be information holding a value indicating a specific line. For example, the pointer may be a variable defined on a program for managing the pointer, and can be rewritten to a predetermined area of the RAM 41. May be stored in the data. The same applies to the read pointer PR and the discard pointer PH described later.
When writing the generated line data to the line of the first image buffer 60a, the control unit 40 writes the line data to the line indicated by the write pointer PW, and after the writing of the line data is completed, the write pointer PW The indicated line is moved to the predetermined direction side by one.

以下の説明では、ポインターが示すラインを、所定方向側へ移動させることを、単に、「ポインターを所定方向へ移動する」と表現することがあるものとする。
また、以下の説明において、「ポインターの位置」とは、ポインターが示すラインのことである。
In the following description, moving the line indicated by the pointer to the predetermined direction side may be simply expressed as “moving the pointer in the predetermined direction”.
In the following description, the “pointer position” is a line indicated by the pointer.

また、リードポインターPRは、ラインデータを読み出すラインを示すポインターである。
制御部40は、第1画像バッファー60aに書き込まれたラインデータを読み出す際、リードポインターPRが示すラインに書き込まれているラインデータを読み出し、かつ、ラインデータの読み出しが終了した後は、リードポインターPRが示すラインを、所定方向側へ1つ移動させる。なお、制御部40は、読み出したラインデータを、後述する所定の手順に従って、インターフェイス43を介して、ホストコンピューター200に転送する。
リードポインターPRは、基本的には、ライトポインターPWの移動に追従して、移動する。これにより、第1画像バッファー60aに書き込まれたラインデータが、書き込まれた順に読み出され、ホストコンピューター200に転送される。
The read pointer PR is a pointer indicating a line from which line data is read.
When reading the line data written in the first image buffer 60a, the control unit 40 reads the line data written in the line indicated by the read pointer PR, and after the reading of the line data is finished, the read pointer is read out. One line indicated by PR is moved to the predetermined direction side. The control unit 40 transfers the read line data to the host computer 200 via the interface 43 according to a predetermined procedure described later.
The read pointer PR basically moves following the movement of the write pointer PW. As a result, the line data written in the first image buffer 60 a is read in the order of writing and transferred to the host computer 200.

本実施形態では、ラインデータの読み出し、及び、転送は、ブロック単位で行われる。   In the present embodiment, line data is read and transferred in units of blocks.

図6は、ブロックを説明するための図であり、ブロックごとに分割された第1画像バッファー60aの様子を模式的に示す図である。
図6に示すように、本実施形態では、第1画像バッファー60aが複数のラインごとに分割されて、n個のブロック(ブロックB1〜ブロックBn)が形成されている。1つのブロックを構成するラインの数は、500個を超えない範囲で、ドットインパクトプリンター10とホストコンピューター200との間の通信速度等を考慮して、ラインデータの転送に適した値に規定される。
本実施形態では、上記のようにして形成されているブロック単位で、ラインデータの転送が行われる。
詳述すると、図6を参照し、第1スキャナー111によって記録媒体Sの上面の画像の読み取りが実行されると、ラインL1から所定方向へ向かってラインごとに、順次、ラインデータの書き込みが実行される。この場合において、ラインL1が属するブロックB1を構成するK1個のラインへのラインデータの書き込みが完了するまでは、ラインデータの読み取りは実行されず、従って、リードポインターPRは、ラインL1を示した状態が維持される。
そして、ラインデータの書き込みが進行し、ブロックB1を構成するK1個の全てのラインへのラインデータの書き込みが完了すると、制御部40により、ブロックB1を構成するラインのそれぞれについて、ラインデータの読み出しが所定方向へ向かって順次実行される。そして、ブロックB1を構成する全てのラインのラインデータの読み出しが完了した後、制御部40は、読み出したラインデータの全てを所定のプロトコルに準拠して、ホストコンピューター200に転送する。なお、ブロックB1を構成する全てのラインのラインデータの読み出しが完了した時点では、リードポインターPRは、ブロックB2の先頭のラインを示している状態となる。
制御部40は、ブロックB1を構成するラインのラインデータの転送が終了した後、ブロックB2についても同様にしてラインデータを転送する。すなわち、ブロックB2を構成する全てのラインへのラインデータの書き込みが完了するまで、ブロックB2を構成するラインに書き込まれたラインデータの読み出しを停止し、ブロックB2を構成する全てのラインへのラインデータの書き込みが完了した後に、ラインデータの読み出しを開始し、読み出したラインデータを包括的にホストコンピューター200に転送する。
このようにして、制御部40は、ブロック単位で、ラインデータの転送を実行するが、これにより、既にラインデータが書き込まれており、かつ、転送を考慮してそのサイズ(ライン数)が規定されている一群の領域(ブロック)に対して、一括して読み出し、及び、転送に係る処理を実行でき、読み出し、及び、転送に係る処理が効率化する。
FIG. 6 is a diagram for explaining blocks, and is a diagram schematically showing a state of the first image buffer 60a divided for each block.
As shown in FIG. 6, in this embodiment, the first image buffer 60a is divided into a plurality of lines to form n blocks (blocks B1 to Bn). The number of lines constituting one block is specified to a value suitable for the transfer of line data in consideration of the communication speed between the dot impact printer 10 and the host computer 200 within a range not exceeding 500. The
In the present embodiment, line data is transferred in units of blocks formed as described above.
More specifically, referring to FIG. 6, when the first scanner 111 reads an image on the upper surface of the recording medium S, line data is sequentially written line by line from the line L1 in a predetermined direction. Is done. In this case, the reading of the line data is not executed until the writing of the line data to the K1 lines constituting the block B1 to which the line L1 belongs, and therefore the read pointer PR indicates the line L1. State is maintained.
When the writing of the line data proceeds and the writing of the line data to all K1 lines constituting the block B1 is completed, the control unit 40 reads the line data for each of the lines constituting the block B1. Are sequentially executed in a predetermined direction. Then, after the reading of the line data of all the lines constituting the block B1 is completed, the control unit 40 transfers all of the read line data to the host computer 200 in accordance with a predetermined protocol. Note that when the reading of the line data of all the lines constituting the block B1 is completed, the read pointer PR is in a state indicating the head line of the block B2.
After the transfer of the line data of the lines constituting the block B1 is completed, the control unit 40 similarly transfers the line data for the block B2. That is, until the writing of line data to all the lines constituting the block B2 is completed, reading of the line data written to the lines constituting the block B2 is stopped, and the lines to all the lines constituting the block B2 are stopped. After the data writing is completed, reading of the line data is started, and the read line data is comprehensively transferred to the host computer 200.
In this way, the control unit 40 executes line data transfer in units of blocks, whereby the line data has already been written and the size (number of lines) is defined in consideration of the transfer. Processing related to reading and transfer can be executed collectively on a group of areas (blocks) that have been read, and processing related to reading and transfer is made more efficient.

また、本実施形態に係るドットインパクトプリンター10は、第1画像バッファー60aにおける所定の領域に属するラインデータのみの読み出し、転送を行うエリアスキャンを実行可能である。   Further, the dot impact printer 10 according to the present embodiment can execute an area scan in which only line data belonging to a predetermined area in the first image buffer 60a is read and transferred.

図7は、エリアスキャンを説明するため、第1画像バッファー60aを模式的に示す図である。
図7では、第1画像バッファー60aが所定の座標系に展開されているものとし、第1画像バッファー60aを構成する画素(=第1画像バッファー60aに展開される読取画像データを構成する画素)のうち、図中最左の最上に配置された画素を原点として、当該画素に座標として(0、0)を付与すると共に、当該原点から図中右方向へ向かう方向をx軸+方向と規定し、かつ、当該原点から図中下方向へ向かう方向をy軸+方向と規定し、図中最右の最上に配置された画素に座標として(5100、0)を付与し、図中最左の最下に配置された画素に座標として(0、8400)を付与し、図中最右の最下に配置された画素に座標として(5100、8400)を付与している。第1画像バッファー60aを構成する全ての画素は、原点からの相対的な位置を示す座標によって一意に特定される。
図7の例において、エリアスキャンでは、例えば、P1(1000、4000)、P2(4000、4000)、P3(1000、8000)、及び、P4(4000、8000)の4点によって定義される領域A1に含まれる(属する)ラインデータのみの読み出し、及び、転送を実行可能である。この場合、記録媒体Sの画像のうち、領域A1に属する画像の画像データのみが、最終的に、ホストコンピューター200に転送されることとなる。
なお、エリアスキャンの実行にあたっては、ホストコンピューター200が提供する所定のユーザーインターフェイスを利用して、ユーザーは、記録媒体Sの上面において画像の転送を行いたい矩形の領域を指定する。この指定に基づいて、ホストコンピューター200は、第1画像バッファー60aにおいて、指定された領域に対応する領域の4点の座標を算出し、算出した座標をドットインパクトプリンター10の制御部40に出力する。
FIG. 7 is a diagram schematically showing the first image buffer 60a for explaining the area scan.
In FIG. 7, it is assumed that the first image buffer 60a is developed in a predetermined coordinate system, and pixels constituting the first image buffer 60a (= pixels constituting read image data developed in the first image buffer 60a). Among them, the pixel located at the top leftmost in the figure is set as the origin, and (0, 0) is given to the pixel as coordinates, and the direction from the origin toward the right in the figure is defined as the x-axis + direction. In addition, the direction from the origin to the lower direction in the figure is defined as the y-axis + direction, and (5100, 0) is assigned as a coordinate to the pixel arranged at the uppermost right in the figure, and the leftmost in the figure (0, 8400) is assigned as the coordinate to the pixel arranged at the bottom of (5100), and (5100, 8400) is assigned as the coordinate to the pixel arranged at the bottom right of the drawing. All the pixels constituting the first image buffer 60a are uniquely specified by coordinates indicating a relative position from the origin.
In the example of FIG. 7, in the area scan, for example, an area A1 defined by four points of P1 (1000, 4000), P2 (4000, 4000), P3 (1000, 8000), and P4 (4000, 8000). It is possible to read and transfer only line data included in (belongs to). In this case, of the images on the recording medium S, only the image data of the images belonging to the area A1 is finally transferred to the host computer 200.
In executing the area scan, the user designates a rectangular area on the upper surface of the recording medium S where the image is to be transferred using a predetermined user interface provided by the host computer 200. Based on this designation, the host computer 200 calculates the coordinates of the four points in the area corresponding to the designated area in the first image buffer 60a, and outputs the calculated coordinates to the control unit 40 of the dot impact printer 10. .

図7を用いて領域A1に対するエリアスキャン時の動作について詳述する。なお、図7に示すように、領域A1は、ブロックB(i−1)、ブロックBi、及び、ブロックB(i+1)の3つのブロックに跨った領域である。
エリアスキャンでは、ラインデータの書き込みは、エリアスキャンを行わない場合と同様にして、ラインごとに所定方向へ向かって、順次、実行される。そして、第1スキャナー111による記録媒体Sの上面に読み取りに伴って、ラインデータの所定方向への書き込みが進行し、ブロックB(i−1)の1つ手前のブロックであるブロックB(i−2)を構成する全てのラインへのラインデータの書き込みが完了したものとする。この場合、ライトポインターPWは、ブロックB(i−1)の先頭のラインであるラインLaを示した状態となる。
一方、制御部40は、ブロックB(i−2)の書き込みが終了した時点では、読み出しを実行すべきラインデータが存在しないため、リードポインターPRを移動させず、リードポインターPRがラインL1を示した状態を維持する。
ブロックB(i−2)へのラインデータの書き込みが完了した後、さらに所定方向へのラインデータの書き込みが進み、ブロックB(i−1)を構成する全てのラインデータへの書き込みが完了したとする。ブロックB(i−1)には、領域A1が延在しているが、上述したように、ラインデータの読み出し、及び、転送はブロック単位で行われるため、制御部40は、ブロックB(i−1)を構成する全てのラインデータへのラインデータの書き込みが完了するまでは、リードポインターPRの移動を行わず、リードポインターPRがラインL1を示した状態を維持する。
The operation during the area scan for the area A1 will be described in detail with reference to FIG. Note that, as illustrated in FIG. 7, the region A1 is a region straddling three blocks of the block B (i−1), the block Bi, and the block B (i + 1).
In the area scan, line data is written sequentially in a predetermined direction for each line, as in the case where the area scan is not performed. As the first scanner 111 reads the upper surface of the recording medium S, writing of the line data in a predetermined direction proceeds, and the block B (i−), which is a block immediately before the block B (i−1). It is assumed that the writing of line data to all lines constituting 2) is completed. In this case, the write pointer PW is in a state indicating the line La that is the first line of the block B (i−1).
On the other hand, the controller 40 does not move the read pointer PR because the line data to be read does not exist when the writing of the block B (i-2) is completed, and the read pointer PR indicates the line L1. Maintain the state.
After the writing of the line data to the block B (i-2) is completed, the writing of the line data in a predetermined direction further proceeds, and the writing to all the line data constituting the block B (i-1) is completed. And The area A1 extends in the block B (i-1). However, as described above, since the reading and transfer of line data are performed in units of blocks, the control unit 40 performs the block B (i The read pointer PR is not moved until the writing of the line data to all the line data constituting -1) is completed, and the state in which the read pointer PR indicates the line L1 is maintained.

ブロックB(i−1)を構成する全てのラインデータへの書き込みが完了した場合、制御部40は、リードポインターPRを、ラインLaに至るまで所定方向へ向かって移動させる。この移動に際し、ラインデータの読み取りは行われない。次いで、制御部40は、領域A1が属していないラインデータが書き込まれているライン、具体的には、ラインLaとラインLbとの間に介在するライン(ラインLaを含み、ラインLbを含まない)については、ラインデータの読み出しを行うことなく、リードポインターPRが示すラインを、所定方向へ向かって順次移動させた後、リードポインターPRが示すラインを、ラインLbとする。このラインLbは、領域A1に属するデータが含まれるラインデータであって、ブロックB(i−1)において最も所定方向と逆方向側に位置するラインデータが書き込まれているラインである。
次いで、制御部40は、ラインLbに書き込まれたラインデータのうち、領域A1に属するデータ(図7中斜線で表したエリアのデータ)の読み出しを実行する。次いで、制御部40は、リードポインターPRを所定方向へ1つ移動させ、当該リードポインターPRが示すラインに書き込まれたラインデータのうち、領域A1に属するデータの読み出しを実行する。このようにして、制御部40は、ブロックB(i−1)について、領域A1に属するデータをラインごとに所定方向へ向かって順次読み出していく。
このようにして、ブロックB(i−1)において、リードポインターPRの所定方向への移動、及び、領域A1に属するデータの読み出しを順次実行し、リードポインターPRが示すラインが、ブロックBiの先頭のラインであるラインLcとなった時点で、制御部40は、読み出したデータ(=ブロックB(i−1)において領域A1に属するデータ)をホストコンピューター200に転送する。
制御部40は、ブロックBi、及び、ブロックB(i+1)についても、ブロックB(i−1)と同様にして、ブロック単位での領域A1に属するデータの読み出し、及び、データの転送を実行する。これにより、領域A1に属する全てのデータがホストコンピューター200に転送されることとなる。
このように、領域A1に属するデータついては、ブロック単位で、一括して、読み出し、転送が実行されるため、読み出し、及び、転送に係る処理の効率化を実現可能である。
When writing to all the line data constituting the block B (i-1) is completed, the control unit 40 moves the read pointer PR in a predetermined direction until reaching the line La. During this movement, line data is not read. Next, the control unit 40 includes a line in which line data to which the area A1 does not belong, specifically, a line interposed between the line La and the line Lb (including the line La and not including the line Lb). ), The line indicated by the read pointer PR is sequentially moved in a predetermined direction without reading the line data, and the line indicated by the read pointer PR is defined as a line Lb. The line Lb is line data including data belonging to the area A1, and is a line in which line data located closest to the predetermined direction in the block B (i-1) is written.
Next, the control unit 40 reads out the data belonging to the area A1 (the data in the area represented by the oblique lines in FIG. 7) among the line data written to the line Lb. Next, the control unit 40 moves the read pointer PR by one in a predetermined direction, and reads data belonging to the area A1 among the line data written in the line indicated by the read pointer PR. In this way, the control unit 40 sequentially reads out data belonging to the area A1 in a predetermined direction for each line for the block B (i-1).
In this way, in the block B (i−1), the movement of the read pointer PR in the predetermined direction and the reading of the data belonging to the area A1 are sequentially executed, and the line indicated by the read pointer PR is the head of the block Bi. When the line Lc is reached, the control unit 40 transfers the read data (= data belonging to the area A1 in the block B (i−1)) to the host computer 200.
For the block Bi and the block B (i + 1), the control unit 40 reads the data belonging to the area A1 and transfers the data in units of blocks in the same manner as the block B (i-1). . As a result, all data belonging to the area A1 is transferred to the host computer 200.
As described above, since the data belonging to the area A1 is read and transferred collectively in units of blocks, it is possible to realize the efficiency of processing related to the read and transfer.

上述したように、第1画像バッファー60aは、リングバッファーであり、ライトポインターPW、及び、このライトポインターPWに追従するリードポインターPRは、第1画像バッファー60aの末端のライン(図5(A)の例ではラインL8400)の次は、先頭のライン(図5(A)の例では、ラインL1)へ移動する構成となっている。
この場合、ライトポインターPWの所定方向への移動が進み、リードポインターPRを所定方向側へ超えてしまう、といった事態が発生する可能性がある。この場合、ラインデータの読み出しが行われていないラインに対して、新たにラインデータが書き込まれてしまうこととなるため、上記事態が発生することを防止する必要がある。
このことを防止するため、本実施形態では、ライトポインターPW、及び、リードポインターPRのほか、破棄ポインターPHを備え、制御部40は、この破棄ポインターPHによって、ライトポインターPWがリードポインターPRを所定方向側に超えることが無いよう、ライトポインターPWの位置を管理している。
As described above, the first image buffer 60a is a ring buffer, and the write pointer PW and the read pointer PR that follows the write pointer PW are the end lines of the first image buffer 60a (FIG. 5A). In this example, the line is moved to the head line (line L1 in the example of FIG. 5A) next to the line L8400).
In this case, there is a possibility that a situation occurs in which the movement of the write pointer PW in a predetermined direction advances and the read pointer PR exceeds the predetermined direction. In this case, line data is newly written to a line from which line data has not been read out, so it is necessary to prevent the above situation from occurring.
In order to prevent this, in this embodiment, in addition to the write pointer PW and the read pointer PR, a discard pointer PH is provided, and the control unit 40 uses the discard pointer PH to cause the write pointer PW to set the read pointer PR to a predetermined value. The position of the light pointer PW is managed so as not to exceed the direction side.

図8は、破棄ポインターPHの基本的な動きを説明するため、第1画像バッファー60aを模式的に示す図である。
図8では、ライトポインターPW、リードポインターPR、及び、破棄ポインターPHを模式的に示しており、各ポインターの図形の先端が指し示すラインが、各ポインターが示すラインである。
以下の説明では、説明の明確化のため、上述したエリアスキャンではなく、第1画像バッファー60aに展開された読取画像データの全てが転送されることを前提とし、また、ブロックを考慮しないものとする。
図8(A)に示すように、破棄ポインターPHは、後述する例外を除き、基本的に、リードポインターPRを追従して動く。本実施形態では、破棄ポインターPHは、基本的に、リードポインターPRが示すラインから10ライン分、所定方向と逆方向(以下、単に「逆方向」という)に位置するラインを示す状態が維持されるように、リードポインターPRを追従する。
さらに、ライトポインターPWは、破棄ポインターPHを所定方向側へ超えないように、その位置が制御される。これにより、ライトポインターPWが、リードポインターPRを超えることが防止され、読み出しが終わっていないラインデータが書き込まれたラインに、新たにラインデータが書き込まれることが防止される。
図8を用いて具体的に説明すると、ライトポインターPW、リードポインターPR、及び、破棄ポインターPHの位置関係が、図8(A)に示す状態であるものとする。なお、図8(A)中、ライトポインターPWとリードポインターPRとの間に介在するライン(斜線で示したエリアに含まれるライン)に書き込まれたラインデータは、書き込みが終了しているものの読み出しが行われていないラインデータである。
そして、図8(A)に示す状態から、ライトポインターPWの所定方向への移動が進行し、図8(B)に示す状態へと、状態が遷移したいとする。この場合において、ライトポインターPWは、破棄ポインターPHを所定方向側へ向かって超えないよう、その位置が制御されるため、ライトポインターPWが、書き込みが終了しているものの読み出しが行われていないラインデータが書き込まれたラインが存在するエリア(図8(B)中、斜線で示すエリア)に至ることが確実に防止される。
FIG. 8 is a diagram schematically showing the first image buffer 60a in order to explain the basic movement of the discard pointer PH.
In FIG. 8, the write pointer PW, the read pointer PR, and the discard pointer PH are schematically shown, and the line indicated by the tip of each pointer graphic is a line indicated by each pointer.
In the following description, for clarity of explanation, it is assumed that not all of the above-described area scan but all read image data developed in the first image buffer 60a is transferred, and that blocks are not considered. To do.
As shown in FIG. 8A, the discard pointer PH basically moves following the read pointer PR with the exception described later. In the present embodiment, the discard pointer PH basically maintains a state indicating a line located in a direction opposite to a predetermined direction (hereinafter simply referred to as “reverse direction”) for 10 lines from the line indicated by the read pointer PR. The read pointer PR is followed.
Further, the position of the write pointer PW is controlled so as not to exceed the discard pointer PH in the predetermined direction. As a result, the write pointer PW is prevented from exceeding the read pointer PR, and new line data is prevented from being written to a line in which line data that has not been read is written.
More specifically, it is assumed that the positional relationship among the write pointer PW, the read pointer PR, and the discard pointer PH is as shown in FIG. 8A. In FIG. 8A, the line data written in a line (a line included in the hatched area) interposed between the write pointer PW and the read pointer PR is read out even though the writing has been completed. This is line data that is not performed.
Then, it is assumed that the state moves from the state shown in FIG. 8 (A) to the state shown in FIG. 8 (B) as the movement of the light pointer PW proceeds in a predetermined direction. In this case, since the position of the write pointer PW is controlled so that it does not exceed the discard pointer PH toward the predetermined direction, the write pointer PW is a line that has been written but has not been read. It is possible to reliably prevent the area where the line in which the data is written exists (the area indicated by hatching in FIG. 8B).

また、上述したエリアスキャンでは、第1画像バッファー60aにおいて異なる複数の領域に属するデータのみの読み出し、及び、転送を実行することが可能である。そして、異なる複数の領域のそれぞれについて、ライン方向において重なった部分が存在する場合がある。このような場合は、以下のようにして、異なる複数の領域に属するデータの読み出しが実行される。   In the area scan described above, it is possible to read and transfer only data belonging to a plurality of different areas in the first image buffer 60a. In some cases, overlapping portions in the line direction exist for each of a plurality of different regions. In such a case, reading of data belonging to a plurality of different areas is executed as follows.

図9は、ライン方向に重なった部分が存在する領域のそれぞれに属するデータを読み出す際の処理を説明するため、第1画像バッファー60aを模式的に示す図である。
図9の例では、領域A2、及び、領域A3についてエリアスキャンを行うものとする。すなわち、領域A2、及び、領域A3に属するデータのみの読み出し、及び、転送を実行するものとする。図9に示すように、領域A2、及び、領域A3は、範囲Q1においてそれぞれライン方向に重なった部分が存在している。
このような場合、領域A2のうちブロックBiに属する領域である領域a2、及び、領域A3のうちブロックBiに属する領域である領域a3について、個別に、読み取りが実行される。
なお、以下の説明において、制御部40は、ブロックBiにおける領域a2、及び、領域a3の状態(範囲)を、ブロックBiに関する情報や、ホストコンピューター200から入力された領域A2、及び、領域A3の各頂点の座標等に基づいて、事前に検出しており、この検出結果に基づいて、リードポインターPRの移動を管理する。
ブロックBiを構成する全てのラインへのラインデータの書き込みが終了していることを前提として詳述すると、制御部40は、まず、領域a2に属するデータを、上述した方法により、ラインごとに所定方向へ向かって順次読み出していく。この場合、リードポインターPRは、矢印Y4に示すように移動し、最終的に、位置T1へ至ることとなる。領域a2に属するデータの読み出しが終了すると、制御部40は、読み出したデータをホストコンピューター200に転送する。このように、本実施形態では、同一のブロックに異なる複数の領域が存在している場合、領域毎に、データの読み取り、転送が行う構成となっており、これにより、異なる領域に属するデータは、領域毎にそれぞれ一括して、データの読み取り、転送が実行されることとなり、読み取り、及び、転送に係る処理の単純化、これに伴う処理効率の向上を実現している。
領域a2に属するデータの読み出しが終了すると、制御部40は、リードポインターPRを、領域a3の先頭の位置T2へ移動する。次いで、制御部40は、領域a3に属するデータを、ラインごとに所定方向へ向かって順次読み出していく。この場合、リードポインターPRは、矢印Y5に示すように移動する。次いで、制御部40は、読み出した領域a3に属するデータをホストコンピューター200に出力する。
以上のようにして制御部40は、領域a2に属するデータ、及び、領域a3に属するデータのそれぞれについて、個別に読み出し、ホストコンピューター200に転送する。
FIG. 9 is a diagram schematically showing the first image buffer 60a in order to explain processing when reading data belonging to each of the areas where the overlapping portions in the line direction exist.
In the example of FIG. 9, it is assumed that the area scan is performed for the area A2 and the area A3. In other words, it is assumed that only data belonging to the areas A2 and A3 is read and transferred. As shown in FIG. 9, the area A2 and the area A3 each have a portion overlapping in the line direction in the range Q1.
In such a case, the reading is executed individually for the area a2 that belongs to the block Bi in the area A2 and the area a3 that belongs to the block Bi among the areas A3.
In the following description, the control unit 40 determines the state (range) of the area a2 and the area a3 in the block Bi, the information about the block Bi, the area A2 input from the host computer 200, and the area A3. Detection is performed in advance based on the coordinates of each vertex and the movement of the read pointer PR is managed based on the detection result.
In detail, assuming that the writing of line data to all the lines constituting the block Bi has been completed, the control unit 40 first determines the data belonging to the area a2 for each line by the method described above. Read sequentially in the direction. In this case, the read pointer PR moves as indicated by the arrow Y4 and finally reaches the position T1. When reading of the data belonging to the area a <b> 2 is completed, the control unit 40 transfers the read data to the host computer 200. As described above, in this embodiment, when there are a plurality of different areas in the same block, the data is read and transferred for each area. Thus, data reading and transfer are performed for each area in a lump, thereby simplifying the processing related to reading and transfer and improving the processing efficiency associated therewith.
When the reading of the data belonging to the area a2 is completed, the control unit 40 moves the read pointer PR to the head position T2 of the area a3. Next, the control unit 40 sequentially reads data belonging to the region a3 in a predetermined direction for each line. In this case, the read pointer PR moves as indicated by an arrow Y5. Next, the control unit 40 outputs the data belonging to the read area a3 to the host computer 200.
As described above, the control unit 40 individually reads and transfers the data belonging to the area a2 and the data belonging to the area a3 to the host computer 200.

ここで、上述した破棄ポインターPHを、いかなる場合であっても、リードポインターPRが示すラインから10ライン分、逆方向に位置するラインを示す状態が維持されるように、移動させた場合、図9の例のようにライン方向に重なった部分が存在する複数の領域についてエリアスキャンを実行する場合に、以下のような不具合が生じる可能性がある。
すなわち、領域a2に属するデータの読み出しが完了し、リードポインターPRが位置T1に至った場合に、これに伴って、破棄ポインターPHが、それより10ライン分逆方向側の位置である位置T3に移動したとする。
この場合、位置T2と、位置T3との間の範囲Q2に属するラインに関しては、読み出すべきデータであって、かつ、読み出しが終了していないデータ(領域a3に属するデータ)が残存した状態である。従って、範囲Q2に属するラインについては、領域a3に属するデータの読み出しが終了するまでは、新たにラインデータを書き込むべきではない。しかしながら、破棄ポインターPHは、位置T3に位置しているため、当該破棄ポインターPHを所定方向側に超えないようにその移動が制御されるライトポインターPWが、破棄ポインターPHの位置に至り、これに伴って、範囲Q2に属するラインについて、読み出しが終了していない段階で新たなラインデータが書き込まれる、といった事態が発生する可能性がある。
以上を踏まえ、制御部40は、上記のような場合、破棄ポインターPHの位置を以下のように制御する。
Here, when the discard pointer PH described above is moved in any case so as to maintain a state indicating a line located in the opposite direction by 10 lines from the line indicated by the read pointer PR, When area scan is executed for a plurality of areas where overlapping portions exist in the line direction as in the example 9 described above, the following problems may occur.
That is, when the reading of the data belonging to the area a2 is completed and the read pointer PR reaches the position T1, the discard pointer PH is accordingly moved to the position T3 which is a position on the reverse direction side by 10 lines. Suppose you move.
In this case, regarding the line belonging to the range Q2 between the position T2 and the position T3, data to be read and data that has not been read (data belonging to the region a3) remains. . Therefore, for the line belonging to the range Q2, new line data should not be written until the reading of the data belonging to the region a3 is completed. However, since the discard pointer PH is located at the position T3, the light pointer PW whose movement is controlled so as not to exceed the discard pointer PH in the predetermined direction reaches the position of the discard pointer PH. Along with this, there is a possibility that a new line data is written in the line belonging to the range Q2 when the reading is not completed.
Based on the above, in the above case, the control unit 40 controls the position of the discard pointer PH as follows.

すなわち、制御部40は、破棄ポインターPHを所定方向へ1ライン分移動させる際、まず、移動予定のラインに書き込まれたラインデータに、読み出すべきデータであって、かつ、読み出しが終了していないデータが含まれているか否かを判別する。そして、制御部40は、当該データが含まれていない場合は、破棄ポインターPHの1ライン分の移動を実行し、当該データが含まれている場合は、破棄ポインターPHの移動を停止する。そして、制御部40は、上記移動後のラインに書き込まれたラインデータのうち、読み出すべきデータであって、かつ、読み出しが終了していないデータの全ての読み出しが終了したか否かを監視し、当該データの全ての読み出しが終了し、かつ、破棄ポインターPHとリードポインターPRとの間の所定方向における距離が10ラインを超えた場合に、破棄ポインターPHの所定方向への1ライン分の移動を実行する。
例えば、図9を参照し、破棄ポインターPHが、位置T2の1ライン分逆方向側の位置T4に位置しているものとする。さらに、領域a2に属するデータの読み出しは終了しているものの、領域a3に属するデータは一切読み出しが実行されていないものとする。このような状況下で、制御部40が、リードポインターPRの所定方向への移動に伴って、破棄ポインターPHを位置T4から位置T2へ移動させようとしている場合を想定する。
この場合、制御部40は、破棄ポインターPHの位置T2への移動の前に、位置T2に対応するラインに書き込まれたラインデータに、読み出すべきデータであって、かつ、読み出しが終了していないデータが含まれているか否かを判別する。この判別は、データの読み出しの状況を示す情報を記憶しておき、当該情報に基づいて行ってもよく、また、ラインごとに、ラインデータに、読み出すべきデータであって、かつ、読み出しが終了していないデータが含まれているか否かをフラグによって管理し、当該フラグの状態に基づいて行うようにしてもよい。
そして、位置T2に対応するラインに書き込まれたラインデータには、読み出すべきデータであって、かつ、読み出しが終了していないデータ(領域a3に係るデータ)が含まれているため、制御部40は、破棄ポインターPHの位置T2への移動を停止する。
次いで、制御部40は、位置T2に対応するラインに書き込まれたラインデータに含まれる領域a3に属するデータの読み出しが終了したか否かを監視し、換言すれば、位置T2に対応するラインに書き込まれたラインデータのうち、読み出すべきデータであって、かつ、読み出しが終了していないデータの全ての読み出しが終了したか否かを監視し、領域a3に属するデータの読み出しが終了した場合であって、かつ、破棄ポインターPHとリードポインターPRとの間の所定方向における距離が10ラインを超えている場合に、破棄ポインターPHを位置T4から位置T3へ移動させる。
That is, when the control unit 40 moves the discard pointer PH by one line in a predetermined direction, first, the line data written in the line to be moved is data to be read and the reading is not completed. Determine whether data is included. When the data is not included, the control unit 40 moves the discard pointer PH for one line, and when the data is included, stops the movement of the discard pointer PH. Then, the control unit 40 monitors whether or not all of the data that should be read out of the line data written in the line after the movement and that has not been read out has been read out. When all of the data has been read and the distance between the discard pointer PH and the read pointer PR in the predetermined direction exceeds 10 lines, the discard pointer PH moves in one direction in the predetermined direction. Execute.
For example, referring to FIG. 9, it is assumed that the discard pointer PH is located at a position T4 on the reverse direction side by one line from the position T2. Further, it is assumed that the data belonging to the area a2 has been read, but no data belonging to the area a3 has been read. Under such circumstances, it is assumed that the control unit 40 is about to move the discard pointer PH from the position T4 to the position T2 as the read pointer PR moves in a predetermined direction.
In this case, before the movement of the discard pointer PH to the position T2, the control unit 40 is data to be read out in the line data written in the line corresponding to the position T2, and the reading is not completed. Determine whether data is included. This determination may be performed based on the information indicating the data reading status, and for each line, the line data is the data to be read and the reading is completed. Whether or not data that is not included is included may be managed by a flag, and may be performed based on the state of the flag.
Since the line data written in the line corresponding to the position T2 includes data to be read and data that has not been read (data related to the region a3), the control unit 40 Stops moving the discard pointer PH to the position T2.
Next, the control unit 40 monitors whether or not the reading of data belonging to the region a3 included in the line data written in the line corresponding to the position T2 has been completed, in other words, the line corresponding to the position T2. In the written line data, it is monitored whether or not all of the data to be read and the data that has not been read has been read, and the reading of the data belonging to the area a3 is completed. If the distance in the predetermined direction between the discard pointer PH and the read pointer PR exceeds 10 lines, the discard pointer PH is moved from position T4 to position T3.

このように、本実施形態では、制御部40は、ある1のラインに書き込まれたラインデータに、読み出すべきデータであって、かつ、読み出しが終了していないデータが含まれている場合、制御部40は、リードポインターPRの位置にかかわらず、破棄ポインターPHが、当該1のラインを所定方向に超えて移動しないように、破棄ポインターPHの移動を制御する。
これにより、読み出すべきデータであって、かつ、読み出しが終了していないデータが存在しているラインに対して、新たにラインデータが書き込まれることが好適に防止される。
さらに、上記のように破棄ポインターPHの移動を制御すれば、ブロック内に異なる複数の領域が存在している場合において、これら領域がライン方向に重なっていない範囲(例えば、図9の範囲Q3)については、ラインデータに含まれる読み出すべきデータの読み出しの状況に応じて、適宜、破棄ポインターPHが所定方向へ移動することとなり、不必要に、破棄ポインターPHの所定方向への移動が制限され、これに伴って、新たなラインデータを書き込み可能な領域が不必要に狭められることが防止される。図9を用いて、具体的に説明すると、範囲Q3については、領域a2に係るデータの読み取りが終了すれば、この範囲Q3に属するラインに書き込まれたラインデータのうち読み出すべきデータの読み出しが終了したこととなるため、破棄ポインターPHを所定方向へ移動させてもよいが、上記のように破棄ポインターPHの移動を制御することにより、範囲Q3については、領域a2に係るデータの読み出しに応じて、適切にはきポインターPHが所定方向へ移動することとなる。
As described above, in the present embodiment, the control unit 40 performs control when the line data written to a certain line includes data to be read and data that has not been read. The unit 40 controls the movement of the discard pointer PH so that the discard pointer PH does not move beyond the one line in a predetermined direction regardless of the position of the read pointer PR.
This suitably prevents new line data from being written to a line that contains data to be read and data that has not been read.
Further, if the movement of the discard pointer PH is controlled as described above, when there are a plurality of different areas in the block, a range in which these areas do not overlap in the line direction (for example, a range Q3 in FIG. 9). For, the discard pointer PH is appropriately moved in a predetermined direction according to the reading status of the data to be read included in the line data. Unnecessarily, the movement of the discard pointer PH in the predetermined direction is restricted, Accordingly, it is possible to prevent an area where new line data can be written from being unnecessarily narrowed. More specifically, with reference to FIG. 9, in the range Q3, when the reading of the data related to the region a2 is completed, the reading of the data to be read out of the line data written in the line belonging to the range Q3 is completed. Therefore, the discard pointer PH may be moved in a predetermined direction. However, by controlling the movement of the discard pointer PH as described above, the range Q3 is read according to the reading of the data related to the area a2. Appropriately, the pointer PH moves in a predetermined direction.

また、上述したエリアスキャンでは、所定方向に離間して配置された領域に属するデータの読み出しを実行可能である。   In the area scan described above, it is possible to read data belonging to an area that is spaced apart in a predetermined direction.

図10は、所定方向に離間して配置された領域に属するデータの読み出しを説明するため、第1画像バッファー60aを模式的に示す図である。
まず、図10(A)を用いて、本願発明が適用される前の従来の読み出しに係る処理について説明する。
図10(A)の例では、領域A4、及び、この領域A4と所定方向に離間して配置された領域A5について、エリアスキャンが実行される。
図10(A)に示すように、領域A4は、第1画像バッファー60aに形成された複数のブロックのうち、先頭のブロックであるブロックB1に属し、また、領域A5は、第1画像バッファー60aに形成された複数のブロックのうち、末尾のブロックであるブロックBnに属している。
従来は、上記のように領域A4、及び、領域A5が規定されている場合において、第1スキャナー111の記録媒体Sの上面の読み取りに応じて、ブロックB1を構成する全てのラインへのラインデータの書き込みが完了すると、制御部40は、上述したように、領域A4に属するデータの読み出し、及び、転送を実行する。ブロックB1に含まれる領域A4に属するデータの読み出し、及び、転送が完了した時点では、リードポインターPRは、ブロックB2の先頭のラインに対応する位置である位置T6に位置した状態となる。
ブロックB1を構成する全てのラインへのラインデータの書き込みが完了した後も、ラインデータの書き込みは継続して実行され、ブロックB2〜ブロックB(n−1)を構成する全てのラインへのラインデータの書き込みが完了したとする。この場合、ブロックB2〜ブロックB(n−1)には、読み出すべきデータが存在しないため、制御部40は、リードポインターPRについて、ブロックB1に含まれる領域A4に属するデータの読み出し、及び、転送が完了した時点の状態、すなわち、ブロックB2の先頭のラインに対応する位置T6に位置した状態を維持する。
FIG. 10 is a diagram schematically showing the first image buffer 60a in order to explain reading of data belonging to an area that is spaced apart in a predetermined direction.
First, referring to FIG. 10 (A), a conventional process related to reading before the present invention is applied will be described.
In the example of FIG. 10A, an area scan is executed for the area A4 and the area A5 that is spaced apart from the area A4 in a predetermined direction.
As shown in FIG. 10A, the area A4 belongs to the first block B1 among the plurality of blocks formed in the first image buffer 60a, and the area A5 is the first image buffer 60a. Belong to block Bn which is the last block.
Conventionally, when the area A4 and the area A5 are defined as described above, line data for all the lines constituting the block B1 in accordance with the reading of the upper surface of the recording medium S of the first scanner 111. When the writing is completed, the control unit 40 reads and transfers data belonging to the area A4 as described above. At the time when reading and transfer of data belonging to the area A4 included in the block B1 is completed, the read pointer PR is located at a position T6 that is a position corresponding to the first line of the block B2.
Even after the writing of the line data to all the lines constituting the block B1 is completed, the writing of the line data is continuously executed, and the lines to all the lines constituting the block B2 to the block B (n-1) are performed. Assume that data writing is complete. In this case, since there is no data to be read out in the block B2 to the block B (n−1), the control unit 40 reads and transfers the data belonging to the area A4 included in the block B1 for the read pointer PR. Is maintained, that is, the state located at the position T6 corresponding to the first line of the block B2.

さらに、ラインデータの所定方向への書き込みが進行し、ブロックBnを構成する全てのラインへのラインデータの書き込みが完了したとする。ブロックBn、すなわち、領域A5を包含するブロックへのラインデータの書き込みの完了をトリガーとして、制御部40は、リードポインターPRの所定方向への移動を開始する。この場合、ブロックB2〜ブロックB(n−1)を構成するラインについては、読み出しを実行すべきデータが存在しないため、実際にデータの読み出しを行うことなく、リードポインターPRの所定方向への移動を行う。
そして、制御部40は、リードポインターPRを、ブロックBnの先頭のラインに至るまで移動させた後、ブロックBn内の領域A5に属するデータについて、データの読み出し、及び、転送を実行する。
Furthermore, it is assumed that the writing of line data in a predetermined direction has progressed and the writing of line data to all the lines constituting the block Bn has been completed. With the completion of writing line data to the block Bn, that is, the block including the region A5 as a trigger, the control unit 40 starts moving the read pointer PR in a predetermined direction. In this case, since there is no data to be read for the lines constituting the blocks B2 to B (n-1), the read pointer PR is moved in a predetermined direction without actually reading the data. I do.
Then, after moving the read pointer PR to the first line of the block Bn, the control unit 40 performs data reading and transfer for the data belonging to the area A5 in the block Bn.

このような従来の手法で、所定方向に離間した異なる領域についてエリアスキャンした場合、以下のような不具合が発生する可能性があった。
すなわち、上記の場合、ブロックBnへのラインデータの書き込みの完了をトリガーとして、位置T6に位置するリードポインターPRの所定方向への移動を開始する構成であるため、このリードポインターPRを追従する破棄ポインターPHと、ライトポインターPWとの所定方向における距離(図10(A)において符号D1を付した矢印で示す距離)が、近接した状態が現出し、これに起因して、破棄ポインターPHによってライトポインターPWの動きが制限され、新たに書き込むべきラインデータが生成されているにもかかわらず、生成されたラインデータを第1画像バッファー60aに書き込めないという事態が発生する可能性があった。
これを踏まえ、本実施形態では、制御部40は、リードポインターPRの位置を以下のように制御する。
When the area scan is performed for different regions separated in a predetermined direction by such a conventional method, the following problems may occur.
That is, in the above case, since the completion of the writing of the line data to the block Bn is used as a trigger, the movement of the read pointer PR located at the position T6 in a predetermined direction is started. The distance between the pointer PH and the write pointer PW in the predetermined direction (the distance indicated by the arrow with the symbol D1 in FIG. 10A) appears close, and this causes the write by the discard pointer PH. Although the movement of the pointer PW is limited and line data to be newly written is generated, there is a possibility that the generated line data cannot be written to the first image buffer 60a.
Based on this, in the present embodiment, the control unit 40 controls the position of the read pointer PR as follows.

すなわち、制御部40は、ライトポインターPWと、リードポインターPRとの間のライン数を常に監視する。
そして、ライトポインターPWと、リードポインターPRとの間のライン数が、閾値として予め定められたライン数を上回った場合、このライトポインターPWとリードポインターPRとにはされた領域に、読み出しを実行すべきデータが存在するか否かを判別する。読み出しを実行すべきデータが存在しない場合、制御部40は、これらライトポインターPWとリードポインターPRとに挟まれた領域に属するラインについては、ラインデータの読み出しを行うことなく、リードポインターPRを所定方向へ移動させるダミーリード処理を実行する。
図10(B)を用いて具体的に説明すると、ブロックB1に属する領域A4の読み出し、及び、転送が完了し、リードポインターPRが位置T6に位置している状態において、制御部40は、ライトポインターPWと、リードポインターPRとの間のライン数を監視する。そして、図10(B)に示すように、ライトポインターPWと、リードポインターPRとの間のライン数が、閾値として定められた「1000」を上回った場合、制御部40は、これらライトポインターPWと、リードポインターPRとの間の範囲Q4に読み出すべきデータが存在するか否かを判別する。そして、範囲Q4に読み出すべきデータが存在しない場合、制御部40は、これら範囲Q4に属するラインについては、リードポインターPRを所定方向へ向かって移動させる一方、ラインデータの読み出しを実行しないダミーリード処理を実行する。
このように範囲Q4について、ダミーリード処理が実行されることにより、ブロックBnを構成する全てのラインへのラインデータの書き込みが完了する前に、リードポインターPRが、位置T7へ移動し、このリードポインターPRの移動に追従して、破棄ポインターPHが、所定方向へ向かって移動することとなる。なお、リードポインターPRの位置T7への移動後も、ライトポインターPWとリードポインターPRとの間のライン数が閾値を上回り、かつ、これらポインターに介在する範囲に読み出しを実行すべきデータが存在しない場合は、適宜、ダミーリード処理が実行され、リードポインターPR、及び、破棄ポインターPHの所定方向への移動が実行される。
That is, the control unit 40 always monitors the number of lines between the write pointer PW and the read pointer PR.
When the number of lines between the write pointer PW and the read pointer PR exceeds a predetermined number of lines as a threshold value, reading is performed in the area defined by the write pointer PW and the read pointer PR. It is determined whether or not data to be present exists. When there is no data to be read, the control unit 40 sets the read pointer PR to a predetermined value without reading the line data for the line belonging to the area sandwiched between the write pointer PW and the read pointer PR. Execute dummy read processing to move in the direction.
Specifically, referring to FIG. 10B, in the state where the reading and transfer of the area A4 belonging to the block B1 is completed and the read pointer PR is located at the position T6, the control unit 40 performs the write operation. The number of lines between the pointer PW and the read pointer PR is monitored. Then, as shown in FIG. 10B, when the number of lines between the write pointer PW and the read pointer PR exceeds “1000” defined as the threshold value, the control unit 40 makes these write pointers PW. And the read pointer PR, it is determined whether or not there is data to be read in the range Q4. When there is no data to be read in the range Q4, the control unit 40 moves the read pointer PR in a predetermined direction for the lines belonging to the range Q4, while executing the dummy read process that does not read the line data. Execute.
As described above, the dummy read process is executed for the range Q4, so that the read pointer PR moves to the position T7 before the writing of the line data to all the lines constituting the block Bn is completed. Following the movement of the pointer PR, the discard pointer PH moves in a predetermined direction. Even after the read pointer PR is moved to the position T7, the number of lines between the write pointer PW and the read pointer PR exceeds the threshold value, and there is no data to be read in the range interposed between these pointers. In this case, a dummy read process is executed as appropriate, and the read pointer PR and the discard pointer PH are moved in a predetermined direction.

このように、本実施形態では、ライトポインターPWとリードポインターPRとの間のライン数が閾値を上回り、かつ、これらポインターに介在する範囲に読み出しを実行すべきデータが存在しない場合は、適宜、ダミーリード処理が実行され、リードポインターPR、及び、破棄ポインターPHの所定方向への移動が実行される。ここで破棄ポインターPHは、ライトポインターPWの移動を制限するためのストッパーとしての機能を有するポインターであるため、ダミーリード処理に伴う破棄ポインターPHの所定方向への移動により、第1画像バッファー60aにおいて、新たなラインデータを書き込み可能な領域が、従来と比べて拡張され、これにより生成したラインデータを第1画像バッファー60aに書き込めない事態が発生するリスクを低減できる。また、所定方向に離間した異なる領域についてエリアスキャンを行う場合であっても、ライトポインターPWと、破棄ポインターPHとの距離が近接する事態が発生しにくくなり、新たに書き込むべきラインデータが生成されているにもかかわらず、生成されたラインデータを第1画像バッファー60aに書き込めないという事態が発生することを極力防止することが可能である。
なお、本実施形態では、ライトポインターPWと、リードポインターPRとの間のライン数の閾値として「1000」が設定されているが、この閾値は、以下の観点から設定されている。
すなわち、上述したように、本実施形態では、1つのブロックを構成するラインの数は、500を超えないものとされる。そして、閾値は、ライン数が最大(500ライン)のブロック2つ分の値(1000ライン)とされる。これは、ライトポインターPWとリードポインターPRとが、ライン数が最大(500ライン)のブロック2つ分離間した場合、第1画像バッファー60a全域の所定方向のライン数(8400ライン)との関係で、相対的に十分大きな距離、ライトポインターPWとリードポインターPRとが離間したと言えるからである。
As described above, in the present embodiment, when the number of lines between the write pointer PW and the read pointer PR exceeds the threshold value and there is no data to be read out in the range interposed between these pointers, Dummy read processing is executed, and movement of the read pointer PR and the discard pointer PH in a predetermined direction is executed. Here, since the discard pointer PH is a pointer having a function as a stopper for restricting the movement of the write pointer PW, in the first image buffer 60a, the discard pointer PH moves in a predetermined direction accompanying the dummy read process. The area in which new line data can be written is expanded as compared with the conventional case, and the risk that the generated line data cannot be written to the first image buffer 60a can be reduced. In addition, even when area scanning is performed on different areas separated in a predetermined direction, it is difficult for the distance between the write pointer PW and the discard pointer PH to be close, and line data to be newly written is generated. However, it is possible to prevent as much as possible the situation that the generated line data cannot be written to the first image buffer 60a.
In the present embodiment, “1000” is set as the threshold value for the number of lines between the write pointer PW and the read pointer PR. This threshold value is set from the following viewpoints.
That is, as described above, in the present embodiment, the number of lines constituting one block does not exceed 500. The threshold value is a value (1000 lines) for two blocks having the maximum number of lines (500 lines). This is because the write pointer PW and the read pointer PR are related to the number of lines in a predetermined direction (8400 lines) in the entire first image buffer 60a when two blocks having the maximum number of lines (500 lines) are separated. This is because it can be said that the write pointer PW and the read pointer PR are separated from each other by a relatively large distance.

以上説明したように、本実施形態では、制御部40は、リードポインターPRの位置にかかわらず、読み出しが完了していないデータを含むラインデータが書き込まれているラインの位置を所定方向側に超えないように、破棄ポインターPHの移動を制御する。
これによれば、破棄ポインターPHは、リードポインターPRの位置にかかわらず、読み出しが完了していないデータを含むラインデータが書き込まれているラインの位置を所定方向側に超えないよう、その移動が制御されており、ライトポインターPWは、この破棄ポインターPHを所定方向側へ超えないようにその移動が制御されるため、読み出しが完了していないデータを含むラインデータが書き込まれているラインに対して、新たにラインデータが書き込まれることを効果的に防止できる。
As described above, in the present embodiment, the control unit 40 exceeds the position of the line where the line data including the data that has not been read out is written to the predetermined direction side regardless of the position of the read pointer PR. The movement of the discard pointer PH is controlled so as not to occur.
According to this, regardless of the position of the read pointer PR, the discard pointer PH is moved so as not to exceed the position of the line where the line data including the data that has not been read out is written. Since the movement of the write pointer PW is controlled so as not to exceed the discard pointer PH in the predetermined direction, the write pointer PW is controlled with respect to a line in which line data including data that has not been read is written. Thus, new line data can be effectively prevented from being written.

また、本実施形態では、制御部40は、エリアスキャンにおいて、リングバッファーたる第1画像バッファー60aにおける複数の異なる領域に属するデータが領域毎に読み出されるような態様で、データの読み出しが可能である。そして、制御部40は、1のラインデータに、複数の異なる領域のそれぞれに属するデータが包含されている場合は、各領域に属するデータのそれぞれの読み出しが完了するまでは、リードポインターPRの位置にかかわらず、破棄ポインターPHが、当該1のラインデータが書き込まれているラインの位置を所定方向側に超えないようにする。
これによれば、エリアスキャン時、リングバッファーたる第1画像バッファー60aにおける複数の異なる領域に属するデータを領域毎に読み出す場合において、1のラインデータに、複数の異なる領域のそれぞれに属するデータが包含されている場合であっても、包含された全てのデータの読み出しが完了する前に、当該1のラインデータが書き込まれているラインに、新たにラインデータが書き込まれることを効果的に防止できる。
In the present embodiment, the control unit 40 can read data in such a manner that data belonging to a plurality of different areas in the first image buffer 60a serving as a ring buffer is read for each area in the area scan. . When the data belonging to each of a plurality of different areas is included in one line data, the control unit 40 determines the position of the read pointer PR until the reading of the data belonging to each area is completed. Regardless, the discard pointer PH does not exceed the position of the line in which the one line data is written in the predetermined direction.
According to this, at the time of area scanning, when data belonging to a plurality of different areas in the first image buffer 60a as a ring buffer is read for each area, one line data includes data belonging to each of the plurality of different areas. Even when the data is written, it is possible to effectively prevent new line data from being written to the line in which the one line data is written before the reading of all the included data is completed. .

また、本実施形態では、制御部40は、リングバッファーたる第1画像バッファー60aを複数のラインごとに分割して形成されたブロック毎に、1のブロックに属する各ラインへのラインデータの書き込みが完了した後、当該1のブロック内で前記所定方向へリードポインターPRを移動させつつ、当該ブロックに属するラインのラインデータを所定方向へ向かって読み出し、1のブロックに、異なる領域が属している場合、リードポインターPRの位置にかかわらず、当該1のブロックに属するラインのうち、読み出しが完了していないデータを含むラインデータが書き込まれているラインの位置を所定方向側に超えないように、破棄ポインターPHの移動を制御する。
これによれば、ブロック単位でラインデータの読み出しを実行することによる読み出し処理の効率化を実現しつつ、ブロック内に、読み出しが完了していないデータを含むラインデータが存在する場合は、当該ラインデータが書き込まれたラインを所定方向側に超えないように破棄ポインターPHの移動が制御され、当該ラインに新たにラインデータが書き込まれることを効果的に防止できる。
In this embodiment, the control unit 40 writes line data to each line belonging to one block for each block formed by dividing the first image buffer 60a serving as a ring buffer into a plurality of lines. After completion, when the read pointer PR is moved in the predetermined direction in the one block, the line data of the line belonging to the block is read in the predetermined direction, and different areas belong to the one block Regardless of the position of the read pointer PR, the line is discarded so that it does not exceed the position of the line in which line data including data that has not been read out is written in the predetermined direction. Controls the movement of the pointer PH.
According to this, when line data including data that has not been read is present in a block while realizing efficiency of read processing by executing line data read in block units, The movement of the discard pointer PH is controlled so as not to exceed the line in which the data is written in the predetermined direction, and it is possible to effectively prevent new line data from being written to the line.

また、本実施形態では、制御部40は、リングバッファーたる第1画像バッファー60aを複数のラインごとに分割して形成されたブロック毎に、1のブロックに属する各ラインへのラインデータの書き込みが完了した後、当該1のブロックにおける読み出しを行うべきラインを示す位置にリードポインターPRを移動し、当該1のブロック内で所定方向へリードポインターPRを移動させつつ、当該ブロックに属するラインのラインデータを所定方向へ向かって読み出し、ライトポインターPWと、リードポインターPRとの間に介在するラインであって、読み出しを必要としないラインデータが書き込まれているラインについては、当該ラインに書き込まれたラインデータを読み出すことなく、リードポインターPRを所定方向へ向かって移動させるダミーリード処理を実行する。
これによれば、ライトポインターPWと、リードポインターPRとの間に介在するラインであって、読み出しを必要としないラインデータが書き込まれているラインについては、当該ラインに書き込まれたラインデータを読み出すことなく、リードポインターPRを所定方向へ向かって移動させるダミーリード処理が実行されるため、ブロックに属する全てのラインへのラインデータの書き込みが完了する前に、リードポインターPRが所定方向へ向かって移動することが可能となり、これにより、第1画像バッファー60aにおいて読み出しが完了し、新たにラインデータを書き込み可能な領域を多く確保することが可能となる。
In this embodiment, the control unit 40 writes line data to each line belonging to one block for each block formed by dividing the first image buffer 60a serving as a ring buffer into a plurality of lines. After completion, the read pointer PR is moved to a position indicating a line to be read in the one block, and the read pointer PR is moved in a predetermined direction in the one block, while the line data of the lines belonging to the block Is read in a predetermined direction, and a line that is interposed between the write pointer PW and the read pointer PR and in which line data that does not need to be read is written is written to the line. Without reading data, move the read pointer PR in the specified direction. Executing a dummy read process of moved.
According to this, for the line that is interposed between the write pointer PW and the read pointer PR and has line data that does not need to be read, the line data written to the line is read. Since the dummy read process for moving the read pointer PR in the predetermined direction is executed without the read pointer PR moving in the predetermined direction before the writing of the line data to all the lines belonging to the block is completed. Accordingly, reading is completed in the first image buffer 60a, and it is possible to secure a large area where new line data can be written.

また、本実施形態では、制御部40は、ライトポインターPWと、リードポインターPRとが所定方向に閾値以上離間した場合であって、これらポインターの間に介在するラインのそれぞれに書き込まれているラインデータが、読み出しを必要としないデータである場合に、これらポインターの間に介在するラインについてダミーリード処理を実行する。
これによれば、ライトポインターPWと、リードポインターPRとが所定方向に閾値以上離間し、かつ、これらポインターの間に介在するラインのそれぞれに書き込まれているラインデータが、読み出しを必要としないデータである場合に、これらポインターの間に介在するラインについてダミーリード処理を実行するため、必要な場合に適切にダミーリード処理が実行されることとなる。
Further, in the present embodiment, the control unit 40 is a case where the write pointer PW and the read pointer PR are spaced apart from each other by a threshold value in a predetermined direction, and the lines written in each of the lines interposed between these pointers. When the data is data that does not need to be read, dummy read processing is executed for the lines interposed between these pointers.
According to this, the write pointer PW and the read pointer PR are separated from each other by a threshold in a predetermined direction, and the line data written in each of the lines interposed between the pointers does not need to be read. In this case, since the dummy read process is executed for the line interposed between these pointers, the dummy read process is appropriately executed when necessary.

また、本実施形態では、制御部40は、第1画像バッファー60aにおける複数の異なる領域に属するラインデータが領域毎に読み出されるような態様で、ラインデータの読み出しが可能であり、第1画像バッファー60aにおける1の領域と、他の領域との間が所定方向に離間しており、当該1の領域が属する1のブロックと、当該他の領域が属する他のブロックとの間に、読み出しを必要としないラインデータが書き込まれたラインが介在している場合に、これらラインについてダミーリード処理を実行する。
これによれば、1の領域が属する1のブロックと、他の領域が属する他のブロックとの間に存在するラインについて、読み出しを必要とするデータが存在しない場合は、ダミーリード処理が実行されることとなり、これにより、他の領域が属するブロックを構成する全てのラインへのラインデータの書き込みが完了する前に、リードポインターPRが所定方向へ向かって移動することが可能となり、これにより、第1画像バッファー60aにおいて読み出しが完了した領域、換言すれば、新たにラインデータを書き込み可能な領域を多く確保することが可能となる。
In the present embodiment, the control unit 40 can read line data in such a manner that line data belonging to a plurality of different areas in the first image buffer 60a is read for each area. One area in 60a and another area are separated in a predetermined direction, and reading is necessary between one block to which the one area belongs and another block to which the other area belongs. When there are intervening lines in which line data is written, dummy read processing is executed for these lines.
According to this, when there is no data that needs to be read for a line existing between one block to which one area belongs and another block to which another area belongs, dummy read processing is executed. Thus, the read pointer PR can be moved in a predetermined direction before the writing of line data to all the lines constituting the block to which the other area belongs is completed. In the first image buffer 60a, it is possible to secure a region where reading has been completed, in other words, a region where new line data can be written.

また、本実施形態では、制御部40は、リードポインターPRに追従する破棄ポインターPHによって、当該破棄ポインターPHをライトポインターPWが所定方向側に超えないように、ライトポインターPWの移動を制御する。
これによれば、ダミーリード処理によりリードポインターPRが所定方向へ移動するのに伴って、このリードポインターPRに追従する破棄ポインターPHも所定方向へ移動することとなり、これに応じて、新たにラインデータを書き込み可能な領域を多く確保することが可能となる。
In the present embodiment, the control unit 40 controls the movement of the write pointer PW by the discard pointer PH that follows the read pointer PR so that the write pointer PW does not exceed the discard pointer PH in the predetermined direction.
According to this, as the read pointer PR moves in a predetermined direction by the dummy read process, the discard pointer PH that follows the read pointer PR also moves in the predetermined direction, and accordingly, a new line is newly generated. It is possible to secure a large area where data can be written.

以上、本発明の一実施形態について説明したが、本発明は、これに限定されるものではない。
上記実施形態では、ドットインパクトプリンター10に搭載された制御基板(図示略)に実装された制御部40が、各ポインターを管理する構成であったが、例えば、ドットインパクトプリンター10に外部接続された装置が、これらポインターを管理する構成であってもよい。すんわち、図4に示した各機能ブロックは、ハードウェアとソフトウェアとの協働により実現されるものであって、具体的なハードウェアの実装形態やソフトウェアの仕様等は任意であり、その他の細部構成についても任意に変更可能である。
また、上記実施の形態では、記録媒体Sを水平に搬送するフラットベッド型の装置に本発明を適用した場合を例に挙げて説明したが、本発明はこれに限定されず、小切手などの帳票形態の記録媒体Sを立てた状態で搬送する搬送路を備えた装置に適用することも勿論可能である。また、上記実施形態では、光学読取装置110を備えたドットインパクトプリンター10を例に挙げて説明したが、本発明はこれに限定されるものではなく、例えば、インクジェット式のプリンターや、サーマルプリンター、レーザープリンター等に、光学読取装置110に相当する光学読取部を設けた構成としても良い。さらに、独立したプリンターとして使用される機器に限らず、他の機器(ATM(Automated Teller Machine)やCD(Cash Dispenser)等)に組み込まれた装置に、光学読取装置110に相当する光学読取部を設けたものであってもよい。
さらに、紙等の記録媒体に文字や画像を記録する装置に一体として光学読取装置110を設けた構成に限らず、本発明は、例えば、独立したスキャナー装置や複写機を含む多様な機器に適用可能である。
すなわち、媒体を光学的に読み取り可能な光学読取装置に広く本願発明を適用可能である。
Although one embodiment of the present invention has been described above, the present invention is not limited to this.
In the above embodiment, the control unit 40 mounted on a control board (not shown) mounted on the dot impact printer 10 is configured to manage each pointer. For example, the control unit 40 is externally connected to the dot impact printer 10. The apparatus may be configured to manage these pointers. In other words, each functional block shown in FIG. 4 is realized by the cooperation of hardware and software, and the specific hardware implementation form, software specifications, etc. are arbitrary. The details of the configuration can be arbitrarily changed.
In the above embodiment, the case where the present invention is applied to a flat bed type apparatus that horizontally conveys the recording medium S has been described as an example. However, the present invention is not limited to this, and forms such as checks. Of course, the present invention can be applied to an apparatus having a conveyance path for conveying the recording medium S in a standing state. In the above-described embodiment, the dot impact printer 10 including the optical reading device 110 has been described as an example. However, the present invention is not limited to this, and for example, an ink jet printer, a thermal printer, A laser printer or the like may be provided with an optical reading unit corresponding to the optical reading device 110. In addition to an apparatus used as an independent printer, an optical reading unit corresponding to the optical reading apparatus 110 is included in an apparatus incorporated in another apparatus (ATM (Automated Teller Machine), CD (Cash Dispenser, etc.)). It may be provided.
Furthermore, the present invention is not limited to a configuration in which the optical reading device 110 is provided integrally with a device that records characters and images on a recording medium such as paper, and the present invention is applicable to various devices including, for example, an independent scanner device and a copying machine. Is possible.
That is, the present invention can be widely applied to an optical reading apparatus capable of optically reading a medium.

10…ドットインパクトプリンター(光学読取装置)、40…制御部、41…RAM(記憶部)、60…画像バッファー(リングバッファー)、60a…第1画像バッファー(リングバッファー)、60b…第2画像バッファー(リングバッファー)、111…第1スキャナー(読取部)、112…第2スキャナー(読取部)、200…ホストコンピューター、PH…破棄ポインター、PR…リードポインター、PW…ライトポインター、S…記録媒体(媒体)。   DESCRIPTION OF SYMBOLS 10 ... Dot impact printer (optical reader), 40 ... Control part, 41 ... RAM (memory | storage part), 60 ... Image buffer (ring buffer), 60a ... 1st image buffer (ring buffer), 60b ... 2nd image buffer (Ring buffer), 111 ... first scanner (reading unit), 112 ... second scanner (reading unit), 200 ... host computer, PH ... discard pointer, PR ... read pointer, PW ... write pointer, S ... recording medium ( Medium).

Claims (5)

媒体を光学的に読み取るものでライン状に並んだ光素子を有する光学読取部と、
記憶部と、
前記記憶部の記憶領域に形成されたリングバッファーと、
前記光学読取部によりライン単位で読み取った読取データを前記リングバッファーに巡回的に書き込み、前記リングバッファーにおける所定の領域の前記読取データを読み出す制御部と、を備え、
前記制御部は、
前記読取データを前記リングバッファーに書き込む前記ラインの位置を示すライトポインター、及び、読み出す前記読取データが含まれる前記ラインの位置を示すリードポインターによって、前記読取データの書き込み、及び、読み出しの対象となる前記ラインを管理し、
さらに、前記リングバッファーにおける消去または上書き可能な前記ラインの位置を示す破棄ポインターによって、前記ライトポインターが前記破棄ポインターの位置を超えないように、前記ライトポインターを制御すると共に、前記リードポインターの位置にかかわらず、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御することを特徴とする光学読取装置。
An optical reading unit having optical elements arranged in a line so as to optically read a medium;
A storage unit;
A ring buffer formed in a storage area of the storage unit;
A controller that cyclically writes the read data read in line units by the optical reading unit to the ring buffer, and reads the read data of a predetermined area in the ring buffer, and
The controller is
The read data is written and read by the write pointer indicating the position of the line for writing the read data to the ring buffer and the read pointer indicating the position of the line including the read data to be read. Manage the line,
Further, the write pointer is controlled by the discard pointer indicating the position of the line that can be erased or overwritten in the ring buffer so that the write pointer does not exceed the position of the discard pointer, and the position of the read pointer is set. Regardless, the discard pointer is controlled so as not to exceed the position of the line including the read data that has not been read.
前記制御部は、
前記所定の領域が複数の場合は、それぞれの領域毎に読み出されるような態様で、前記読取データの読み出しが可能であり、
1のラインに、複数の前記所定の領域のそれぞれに属する前記読取データが包含されている場合は、各領域に属する前記読取データのそれぞれの読み出しが完了するまでは、前記リードポインターの位置にかかわらず、前記破棄ポインターが、当該1のラインの位置を超えないようにすることを特徴とする請求項1に記載の光学読取装置。
The controller is
When there are a plurality of the predetermined areas, it is possible to read the read data in such a manner that each area is read.
When one line includes the read data belonging to each of the plurality of predetermined areas, the read data belonging to each area is not related to the position of the read pointer until the reading of the read data belonging to each area is completed. The optical reading apparatus according to claim 1, wherein the discard pointer does not exceed the position of the one line.
前記制御部は、
前記リングバッファーを複数の前記ラインごとに分割して形成されたブロック毎に、1のブロックに属する各前記ラインへの前記読取データの書き込みが完了した後、当該1のブロック内で前記リードポインターの位置を移動させつつ、当該ブロックに属する前記ラインの前記読取データを読み出し、
1のブロックに、複数の所定の領域が属している場合、前記リードポインターの位置にかかわらず、当該1のブロックに属する前記ラインのうち、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御することを特徴とする請求項2に記載の光学読取装置。
The controller is
For each block formed by dividing the ring buffer into a plurality of lines, after the writing of the read data to each line belonging to one block is completed, the read pointer of Reading the read data of the line belonging to the block while moving the position,
When a plurality of predetermined areas belong to one block, regardless of the position of the read pointer, out of the lines belonging to the one block, the line including the read data that has not been read out. The optical reading apparatus according to claim 2, wherein the discard pointer is controlled so as not to exceed a position.
媒体を光学的に読み取るものでライン状に並んだ光素子を有する光学読取部と、記憶部の記憶領域に形成されたリングバッファーと、を備える光学読取装置の制御方法であって、
前記光学読取部が読み取った読取データを前記リングバッファーに書き込む前記ラインの位置を示すライトポインター、及び、読み出す前記読取データが含まれる前記ラインの位置を示すリードポインターによって、前記読取データの書き込み、及び、読み出しの対象となる前記ラインを管理した上で、前記光学読取部によりライン単位で読み取った前記読取データを前記リングバッファーにおいて巡回的に書き込み、前記リングバッファーにおける所定の領域の前記読取データを読み出し、
さらに、前記リングバッファーにおける消去または上書き可能な前記ラインの位置を示す破棄ポインターによって、前記ライトポインターが前記破棄ポインターの位置を超えないように、前記ライトポインターを制御すると共に、前記リードポインターの位置にかかわらず、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御することを特徴とする光学読取装置の制御方法。
A method for controlling an optical reading device comprising: an optical reading unit that optically reads a medium and having optical elements arranged in a line; and a ring buffer formed in a storage area of the storage unit,
Write of the read data by a write pointer indicating the position of the line for writing the read data read by the optical reading unit to the ring buffer, and a read pointer indicating the position of the line including the read data to be read; and The line to be read is managed, the read data read in line units by the optical reading unit is cyclically written in the ring buffer, and the read data in a predetermined area in the ring buffer is read. ,
Further, the write pointer is controlled by the discard pointer indicating the position of the line that can be erased or overwritten in the ring buffer so that the write pointer does not exceed the position of the discard pointer, and the position of the read pointer is set. Regardless of this, the discard pointer is controlled so as not to exceed the position of the line including the read data that has not been read out.
媒体を光学的に読み取るものでライン状に並んだ光素子を有する光学読取部と、前記記憶部の記憶領域に形成されたリングバッファーと、を備える光学読取装置を制御する制御部により実行されるプログラムであって、
前記制御部を、
前記光学読取部が読み取った読取データを前記リングバッファーに書き込む前記ラインの位置を示すライトポインター、及び、読み出す前記読取データが含まれる前記ラインの位置を示すリードポインターによって、前記読取データの書き込み、及び、読み出しの対象となる前記ラインを管理した上で、前記光学読取部によりライン単位で読み取った前記読取データを前記リングバッファーにおいて巡回的に書き込み、前記リングバッファーにおける所定の領域の前記読取データを読み出し、
さらに、前記リングバッファーにおける消去または上書き可能な前記ラインの位置を示す破棄ポインターによって、前記ライトポインターが前記破棄ポインターの位置を超えないように、前記ライトポインターを制御すると共に、前記リードポインターの位置にかかわらず、読み出しが完了していない前記読取データを含む前記ラインの位置を超えないように、前記破棄ポインターを制御する手段として機能させることを特徴とするプログラム。
An optical reading unit that optically reads a medium and includes optical elements arranged in a line, and a ring buffer formed in a storage area of the storage unit is executed by a control unit that controls the optical reading device. A program,
The control unit
Write of the read data by a write pointer indicating the position of the line for writing the read data read by the optical reading unit to the ring buffer, and a read pointer indicating the position of the line including the read data to be read; and The line to be read is managed, the read data read in line units by the optical reading unit is cyclically written in the ring buffer, and the read data in a predetermined area in the ring buffer is read. ,
Further, the write pointer is controlled by the discard pointer indicating the position of the line that can be erased or overwritten in the ring buffer so that the write pointer does not exceed the position of the discard pointer, and the position of the read pointer is set. Regardless, a program that functions as means for controlling the discard pointer so as not to exceed the position of the line including the read data that has not been read.
JP2011051963A 2011-03-09 2011-03-09 Optical reading device, control method for optical reading device, and program Withdrawn JP2012190169A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2011051963A JP2012190169A (en) 2011-03-09 2011-03-09 Optical reading device, control method for optical reading device, and program
CN 201220041700 CN202615787U (en) 2011-03-09 2012-02-09 Optical reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011051963A JP2012190169A (en) 2011-03-09 2011-03-09 Optical reading device, control method for optical reading device, and program

Publications (1)

Publication Number Publication Date
JP2012190169A true JP2012190169A (en) 2012-10-04

Family

ID=47083272

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011051963A Withdrawn JP2012190169A (en) 2011-03-09 2011-03-09 Optical reading device, control method for optical reading device, and program

Country Status (2)

Country Link
JP (1) JP2012190169A (en)
CN (1) CN202615787U (en)

Also Published As

Publication number Publication date
CN202615787U (en) 2012-12-19

Similar Documents

Publication Publication Date Title
US8508753B2 (en) Optical reading device, control method for an optical reading device, and program
US8582181B2 (en) Optical reading device, control method for an optical reading device, and program
US8564850B2 (en) Optical reading device, control method for an optical reading device, and storage medium
US8605339B2 (en) Optical reading device, control method for an optical reading device, and storage medium
US8493635B2 (en) Optical reading device, control method for an optical reading device, and computer-readable recording medium storing a control program for an optical reading device
EP2346236B1 (en) Optical reader, control method of optical reader, and computer-readable recording medium
JP5691323B2 (en) Electronic device, control method of electronic device, and program
JP2012029121A (en) Reading system, image acquisition device, optical reader, method of regulating image acquisition device, and program
JP2012025078A (en) Information reading and printing apparatus, control method for the information reading and printing apparatus, and control program
JP5664047B2 (en) Multifunction machine, control method of multi-function machine, and program
JP2012190169A (en) Optical reading device, control method for optical reading device, and program
JP2012190170A (en) Optical reading device, control method for optical reading device, and program
JP2014046459A (en) Electronic apparatus, and control method for the electronic device
JP2009223947A (en) Recording device and method for controlling the same
CN211467914U (en) Printing device
JP2011146834A (en) Optical reading device, and control method and control program for the same
JP2012065145A (en) Electronic apparatus, electronic apparatus control method, and program
JP2010198416A (en) Recording device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140513