JP2012228839A - Recording device, method for controlling recording device, and program - Google Patents

Recording device, method for controlling recording device, and program Download PDF

Info

Publication number
JP2012228839A
JP2012228839A JP2011099455A JP2011099455A JP2012228839A JP 2012228839 A JP2012228839 A JP 2012228839A JP 2011099455 A JP2011099455 A JP 2011099455A JP 2011099455 A JP2011099455 A JP 2011099455A JP 2012228839 A JP2012228839 A JP 2012228839A
Authority
JP
Japan
Prior art keywords
processing
recording medium
distance
mark
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011099455A
Other languages
Japanese (ja)
Other versions
JP2012228839A5 (en
JP5803243B2 (en
Inventor
Isao Eguchi
勲 江口
Shingo Todaka
伸悟 戸▲高▼
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 JP2011099455A priority Critical patent/JP5803243B2/en
Priority to CN201210080644.7A priority patent/CN102756568B/en
Publication of JP2012228839A publication Critical patent/JP2012228839A/en
Publication of JP2012228839A5 publication Critical patent/JP2012228839A5/ja
Application granted granted Critical
Publication of JP5803243B2 publication Critical patent/JP5803243B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Handling Of Sheets (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce restriction on a processing target position for processing where a recording medium is processed, in a recording device performing recording on the recording medium and processing of cutting, etc.SOLUTION: A printer 2 includes a cutter unit 25 which is provided in the predetermined position of a conveyance path where roll paper 22 is conveyed and performs cutting processing to the roll paper 22 in the position and a BM (black mark) sensor 64 which is provided in the predetermined position of the conveyance path and detects a BM provided on the roll paper 22 at a predetermined interval in a conveyance direction. The printer 2 calculates a distance between the black mark detected at this time and the back mark detected at the last time, whenever the BM sensor 64 detects the black mark and decides a cut position on the roll paper 22 based on the position of the black mark detected at the last time, when the calculated distance is within a predetermined range, and a cut position based on the position of the newly detected black mark, when the calculated distance is out of the predetermined range.

Description

本発明は、記録装置、記録装置の制御方法、及び、プログラムに関する。   The present invention relates to a recording apparatus, a control method for the recording apparatus, and a program.

従来、ロール紙等の記録媒体に記録を行う記録装置において、記録を行うとともに記録媒体に対するカット等の処理を行うものが知られている。この種の記録装置は、記録した位置に合わせて処理を行うために処理対象位置の位置合わせを行う。このため、この種の記録装置で使用される記録媒体には、例えばブラックマークと呼ばれる位置検出用のマークが設けられており、記録装置は、位置検出用マークを検出する手段を備えている。そして、位置検出用マークの位置を基準としてカット等の処理が行われる(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, recording apparatuses that perform recording on a recording medium such as roll paper perform recording and processing such as cutting on the recording medium. This type of recording apparatus aligns processing target positions in order to perform processing in accordance with the recorded positions. For this reason, a recording medium used in this type of recording apparatus is provided with a position detection mark called a black mark, for example, and the recording apparatus includes means for detecting the position detection mark. Then, processing such as cutting is performed on the basis of the position of the position detection mark (see, for example, Patent Document 1).

特開2002−326408号公報JP 2002-326408 A

上記従来の記録装置において、位置検出用マークを検出してから処理対象位置を決定する場合、位置検出用マークを検出する位置とカット等の処理を行う位置との間の距離によっては、位置検出用マークを検出した時点で本来の処理対象位置とすべき位置が処理位置を通過してしまっていることがある。その原因は、位置検出用マークと処理対象位置との位置関係と、位置検出用マークを検出する位置と処理を行う位置との位置関係が適合していないことである。このため、記録媒体においてカット等の処理を行う処理対象位置は、位置検出用マークを検出する位置と処理を行う位置との位置関係、即ち機械的構造の制約を受けるという問題があった。
本発明は、上述した事情に鑑みてなされたものであり、記録媒体に記録を行うとともにカット等の処理を行う記録装置において、記録媒体が処理される処理対象位置に関する制約を緩和できるようにすることを目的とする。
In the conventional recording apparatus, when the position to be processed is determined after detecting the position detection mark, the position detection is performed depending on the distance between the position for detecting the position detection mark and the position for processing such as cutting. When the mark for detection is detected, the position that should be the original processing target position may pass the processing position. The cause is that the positional relationship between the position detection mark and the processing target position does not match the positional relationship between the position where the position detection mark is detected and the position where the processing is performed. For this reason, there is a problem in that the processing target position for performing processing such as cutting on the recording medium is restricted by the positional relationship between the position for detecting the position detection mark and the position for processing, that is, the mechanical structure.
The present invention has been made in view of the above-described circumstances, and allows a recording apparatus that performs recording such as cutting and recording on a recording medium to relax restrictions on a processing target position where the recording medium is processed. For the purpose.

上記課題を解決するため、本発明は、記録媒体を搬送する搬送手段と、前記搬送手段により前記記録媒体が搬送される搬送路の所定位置に設けられ、当該位置において前記記録媒体に対する処理を行う処理手段と、前記搬送路の所定位置に設けられ、前記記録媒体上に搬送方向に所定間隔で設けられている位置検出用マークを検出するマーク検出手段と、前記マーク検出手段の検出状態に基づいて、前記処理手段による処理を実行させる制御手段と、を備え、前記制御手段は、前記マーク検出手段が前記位置検出用マークを検出する毎に、当該位置検出用マークと前回検出された前記位置検出用マークとの間の距離を求める距離検出手段と、前記距離検出手段が求めた距離が所定範囲内である場合は、前回検出された前記位置検出用マークの位置に基づいて前記処理手段が処理を実行する前記記録媒体上の処理対象位置を決定し、前記距離検出手段が求めた距離が所定範囲を逸脱している場合には新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定する処理位置制御手段と、前記処理位置制御手段により決定された前記記録媒体上の処理対象位置が前記処理手段の位置に達した場合に前記処理手段に処理を実行させる実行制御手段とを備えることを特徴とする。
本発明によれば、位置検出用マークを検出して記録媒体を処理する場合に、記録媒体に所定間隔で設けられている位置検出用マーク間の距離が所定範囲内であれば先に検出した位置検出用マークに基づいて処理対象位置を決定するので、適切に搬送されている間は処理対象位置に関する制約を緩和し、処理の効率を高めることができる。また、記録媒体の搬送の支障等により位置検出用マーク間の距離が所定範囲を逸脱した場合には、後に検出される位置検出用マークに基づいて、支障の影響を受けることなく正確に処理対象位置を決定し、正確な位置で記録媒体を処理できる。
In order to solve the above-described problems, the present invention is provided at a predetermined position on a conveyance unit that conveys a recording medium and a conveyance path along which the recording medium is conveyed by the conveyance unit, and performs processing on the recording medium at the position. Based on processing means, mark detection means for detecting position detection marks provided at predetermined intervals on the recording medium and at predetermined intervals on the recording medium, and based on detection states of the mark detection means Control means for executing processing by the processing means, the control means each time the mark detection means detects the position detection mark, the position detection mark and the previously detected position. If the distance detection means for obtaining the distance to the detection mark and the distance obtained by the distance detection means are within a predetermined range, the position detection mark of the previously detected position The processing means determines a processing target position on the recording medium on which the processing is executed based on the position, and the newly detected position when the distance obtained by the distance detection means is out of a predetermined range A processing position control means for determining a processing target position on the recording medium based on the position of the detection mark, and a processing target position on the recording medium determined by the processing position control means reaches the position of the processing means. And an execution control means for causing the processing means to execute the process in this case.
According to the present invention, when a position detection mark is detected and a recording medium is processed, if the distance between the position detection marks provided on the recording medium at a predetermined interval is within a predetermined range, the position detection mark is detected first. Since the processing target position is determined based on the position detection mark, restrictions on the processing target position can be relaxed and the processing efficiency can be increased while the paper is appropriately transported. In addition, when the distance between the position detection marks deviates from the predetermined range due to troubles in transport of the recording medium, etc., the processing target can be accurately processed without being affected by the trouble based on the position detection marks detected later. The position can be determined and the recording medium can be processed at the correct position.

また、本発明は、上記記録装置において、前記処理位置制御手段は、前記位置検出用マークの前記所定間隔と、前記距離検出手段が求めた距離とのずれ量に基づいて、前記記録媒体に外部から引張り力が作用したことを検出し、この引張り力が働いた場合には新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定することを特徴とする。
本発明によれば、記録媒体に対して外部から引張り力が作用したことを速やかに、かつ確実に検出し、引張り力を受けた場合であっても正確な位置で記録媒体を処理できる。
Further, the present invention is the recording apparatus, wherein the processing position control means is connected to the recording medium based on a deviation amount between the predetermined interval of the position detection marks and the distance obtained by the distance detection means. And detecting the processing target position on the recording medium based on the position of the newly detected position detection mark when the tensile force is applied. To do.
According to the present invention, it is possible to quickly and surely detect that a tensile force has been applied to the recording medium from the outside, and to process the recording medium at an accurate position even when the tensile force is received.

また、本発明は、上記記録装置において、前記制御手段は、前記処理位置制御手段が決定した前記記録媒体上の処理対象位置が、前記処理手段の位置より下流側にある場合に、当該処理対象位置が前記処理手段の位置に達するように前記搬送手段によって前記記録媒体を逆方向に搬送させる搬送制御手段を備えることを特徴とする。
本発明によれば、位置検出用マークに基づいて、処理手段の位置より下流側に達している処理対象位置において記録媒体を処理することができる。また、適切に搬送されている間は先に検出された位置検出用マークに基づいて処理対象位置を決定するので、逆方向への搬送を行うことなく記録媒体を処理できる。これにより、必要に応じて逆方向への搬送を行って位置検出用マークと処理対象位置との位置関係に関する制約を緩和する一方、逆方向への搬送の頻度を必要最小限に抑えることでスループットの低下を抑えることができる。
Further, the present invention provides the recording apparatus, wherein the control unit is configured to process the processing target when the processing target position on the recording medium determined by the processing position control unit is downstream of the position of the processing unit. It further comprises a conveyance control means for conveying the recording medium in the reverse direction by the conveyance means so that the position reaches the position of the processing means.
According to the present invention, the recording medium can be processed at the processing target position that reaches the downstream side of the position of the processing means based on the position detection mark. Further, since the position to be processed is determined based on the position detection mark detected earlier while being properly conveyed, the recording medium can be processed without being conveyed in the reverse direction. As a result, transport in the reverse direction is performed as necessary to ease restrictions on the positional relationship between the position detection mark and the processing target position, while throughput is reduced by minimizing the frequency of transport in the reverse direction. Can be suppressed.

また、本発明は、上記記録装置において、前記搬送制御手段は、前記マーク検出手段の検出位置から前記処理手段の位置までの距離と、前記マーク検出手段が前記位置検出用マークを検出してからの前記搬送手段による搬送量とを比較することにより、前記処理位置制御手段が決定した前記記録媒体上の処理対象位置が、前記処理手段の位置を既に通過したか否かを判定することを特徴とする。
本発明によれば、処理対象位置が処理手段の位置を既に通過したか否かを速やかに、かつ正確に判定できる。
According to the present invention, in the recording apparatus, the transport control unit may detect a distance from a detection position of the mark detection unit to a position of the processing unit, and after the mark detection unit detects the position detection mark. By comparing with the transport amount by the transport means, it is determined whether or not the processing target position on the recording medium determined by the processing position control means has already passed the position of the processing means. And
According to the present invention, it is possible to quickly and accurately determine whether or not the processing target position has already passed the position of the processing means.

また、本発明は、上記記録装置において、前記距離検出手段は、前記距離検出手段が求めた距離が所定範囲を逸脱していて、前記処理位置制御手段が新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定した場合には、この新たに検出された前記位置検出用マークと次の前記位置検出用マークとの間の距離を求めることを特徴とする。
本発明によれば、搬送の支障等によって、求めた位置検出用マーク間の距離が所定範囲を逸脱している場合に、それ以後の位置検出用マーク間の距離を、支障等の影響を受けることなく正確に求めることができる。
According to the present invention, in the recording apparatus, the distance detection unit is configured to detect the position detection mark newly detected by the processing position control unit when the distance obtained by the distance detection unit is out of a predetermined range. When the processing target position on the recording medium is determined based on the position of the recording medium, a distance between the newly detected position detection mark and the next position detection mark is obtained. To do.
According to the present invention, when the obtained distance between the position detection marks deviates from a predetermined range due to a trouble in conveyance or the like, the distance between the subsequent position detection marks is affected by the trouble or the like. Can be obtained accurately without any problems.

また、本発明は、上記記録装置において、前記処理手段は、前記記録媒体を、搬送方向に対し直交する方向にカットするカッターユニットを備えて構成され、前記実行制御手段は、前記処理位置制御手段により決定された前記記録媒体上の処理対象位置で前記記録媒体がカットされるように前記カッターユニットを制御することを特徴とする。
本発明によれば、位置検出用マークとカット位置との位置関係に関する制約を緩和し、効率よく記録媒体をカットできる。
In the recording apparatus, the processing unit may include a cutter unit that cuts the recording medium in a direction orthogonal to a conveyance direction, and the execution control unit may be the processing position control unit. The cutter unit is controlled so that the recording medium is cut at the processing target position on the recording medium determined by the above.
According to the present invention, it is possible to relax the restriction on the positional relationship between the position detection mark and the cutting position, and to cut the recording medium efficiently.

また、上記課題を解決するため、本発明は、記録媒体を搬送する搬送手段と、前記搬送手段により前記記録媒体が搬送される搬送路の所定位置に設けられ、当該位置において前記記録媒体に対する処理を行う処理手段と、前記搬送路の所定位置に設けられ、前記記録媒体上に搬送方向に所定間隔で設けられている位置検出用マークを検出するマーク検出手段と、を備えた記録装置を制御して、前記マーク検出手段が前記位置検出用マークを検出する毎に、当該位置検出用マークと前回検出された前記位置検出用マークとの間の距離を求め、前記求められた距離が所定範囲内である場合は、前回検出された前記位置検出用マークの位置に基づいて前記処理手段が処理を実行する前記記録媒体上の処理対象位置を決定し、前記求められた距離が所定範囲を逸脱している場合には新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定し、決定した前記記録媒体上の処理対象位置が前記処理手段の位置に達した場合に前記処理手段に処理を実行させること、を特徴とする。
本発明によれば、位置検出用マークを検出して記録媒体を処理する場合に、記録媒体に所定間隔で設けられている位置検出用マーク間の距離が所定範囲内であれば先に検出した位置検出用マークに基づいて処理対象位置を決定するので、適切に搬送されている間は処理対象位置に関する制約を緩和し、処理の効率を高めることができる。また、記録媒体の搬送の支障等により位置検出用マーク間の距離が所定範囲を逸脱した場合には、後に検出される位置検出用マークに基づいて、支障の影響を受けることなく正確に処理対象位置を決定し、正確な位置で記録媒体を処理できる。
In order to solve the above-described problem, the present invention is provided at a predetermined position of a conveyance unit that conveys a recording medium, and a conveyance path along which the recording medium is conveyed by the conveyance unit, and performs processing on the recording medium at the position. And a mark detection means for detecting position detection marks provided at predetermined intervals on the recording medium and at predetermined intervals on the recording medium. Each time the mark detection means detects the position detection mark, a distance between the position detection mark and the previously detected position detection mark is obtained, and the obtained distance is within a predetermined range. The processing target position on the recording medium to be processed by the processing means is determined based on the position of the position detection mark detected last time, and the calculated distance is determined. When the position deviates from the range, the processing target position on the recording medium is determined based on the position of the position detection mark newly detected, and the determined processing target position on the recording medium is the processing means. When the position reaches the position, the processing means is made to execute the processing.
According to the present invention, when a position detection mark is detected and a recording medium is processed, if the distance between the position detection marks provided on the recording medium at a predetermined interval is within a predetermined range, the position detection mark is detected first. Since the processing target position is determined based on the position detection mark, restrictions on the processing target position can be relaxed and the processing efficiency can be increased while the paper is appropriately transported. In addition, when the distance between the position detection marks deviates from the predetermined range due to troubles in transport of the recording medium, etc., the processing target can be accurately processed without being affected by the trouble based on the position detection marks detected later. The position can be determined and the recording medium can be processed at the correct position.

また、上記課題を解決するため、本発明は、記録媒体を搬送する搬送手段と、前記搬送手段により前記記録媒体が搬送される搬送路の所定位置に設けられ、当該位置において前記記録媒体に対する処理を行う処理手段と、前記搬送路の所定位置に設けられ、前記記録媒体上に搬送方向に所定間隔で設けられている位置検出用マークを検出するマーク検出手段とを備えた記録装置を制御する制御部が実行可能なプログラムであって、前記制御部を、前記マーク検出手段が前記位置検出用マークを検出する毎に、当該位置検出用マークと前回検出された前記位置検出用マークとの間の距離を求める距離検出手段と、前記距離検出手段が求めた距離が所定範囲内である場合は、前回検出された前記位置検出用マークの位置に基づいて前記処理手段が処理を実行する前記記録媒体上の処理対象位置を決定し、前記距離検出手段が求めた距離が所定範囲を逸脱している場合には新たに検出された前記位置検出用マークの位置に基づいて処理対象位置を決定する処理位置制御手段と、前記処理位置制御手段により決定された前記記録媒体上の処理対象位置が前記処理手段の位置に達した場合に前記処理手段に処理を実行させる実行制御手段と、して機能させるためのプログラムである。
本発明によれば、位置検出用マークを検出して記録媒体を処理する場合に、記録媒体に所定間隔で設けられている位置検出用マーク間の距離が所定範囲内であれば先に検出した位置検出用マークに基づいて処理対象位置を決定するので、適切に搬送されている間は処理対象位置に関する制約を緩和し、処理の効率を高めることができる。また、記録媒体の搬送の支障等により位置検出用マーク間の距離が所定範囲を逸脱した場合には、後に検出される位置検出用マークに基づいて、支障の影響を受けることなく正確に処理対象位置を決定し、正確な位置で記録媒体を処理できる。
In order to solve the above-described problem, the present invention is provided at a predetermined position of a conveyance unit that conveys a recording medium, and a conveyance path along which the recording medium is conveyed by the conveyance unit, and performs processing on the recording medium at the position. And a mark detecting means for detecting position detection marks provided at predetermined intervals on the recording medium and at predetermined intervals in the conveying direction. A program that can be executed by a control unit, wherein the control unit causes the position detection mark to be detected between the position detection mark and the previously detected position detection mark each time the mark detection unit detects the position detection mark. If the distance obtained by the distance detecting means and the distance obtained by the distance detecting means are within a predetermined range, the processing means is based on the position of the position detecting mark detected last time. A processing target position on the recording medium on which the processing is performed is determined, and when the distance obtained by the distance detection means deviates from a predetermined range, based on the position of the position detection mark newly detected Processing position control means for determining a processing target position, and execution control for causing the processing means to execute processing when the processing target position on the recording medium determined by the processing position control means reaches the position of the processing means. It is a program for functioning as a means.
According to the present invention, when a position detection mark is detected and a recording medium is processed, if the distance between the position detection marks provided on the recording medium at a predetermined interval is within a predetermined range, the position detection mark is detected first. Since the processing target position is determined based on the position detection mark, restrictions on the processing target position can be relaxed and the processing efficiency can be increased while the paper is appropriately transported. In addition, when the distance between the position detection marks deviates from the predetermined range due to troubles in transport of the recording medium, etc., the processing target can be accurately processed without being affected by the trouble based on the position detection marks detected later. The position can be determined and the recording medium can be processed at the correct position.

本発明によれば、記録媒体が適切に搬送されている間は位置検出用マークと処理対象位置との位置関係に関する制約を緩和し、処理の効率を高めることができ、搬送の支障等が生じた場合であっても正確な位置で記録媒体を処理できる。   According to the present invention, while the recording medium is being transported appropriately, restrictions on the positional relationship between the position detection mark and the processing target position can be relaxed, the processing efficiency can be improved, and transportation troubles can occur. Even in this case, the recording medium can be processed at an accurate position.

本発明の実施形態に係るプリンターの外観斜視図である。1 is an external perspective view of a printer according to an embodiment of the present invention. プリンターの要部構成を示す側面図である。FIG. 2 is a side view illustrating a main configuration of the printer. プリンターにより出力される帳票の例を示す図である。It is a figure which shows the example of the form output by a printer. プリンターの制御系の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of a printer control system. プリンターとホストコンピューターの動作シーケンスを示す図である。It is a figure which shows the operation | movement sequence of a printer and a host computer. プリンターの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer.

以下、図面を参照して本発明の実施形態について説明する。
図1は、本発明を適用した実施形態に係る印刷システム1の概略構成を示す図である。また、図2は、印刷システム1が備えるプリンター2(記録装置)の要部の構成を示す側面図である。
図1に示す印刷システム1は、例えば小売店等の店頭に設置された販売時点管理システム(POSシステム)のレジスター、或いは、富くじや各種チケットを発券する発券システムを構成し、レシート、クーポン、富くじ、チケット等の帳票10(図3)を印刷出力する。この図1に示す印刷システム1は、帳票10を発行するプリンター2に、プリンター2を制御するホストコンピューター3を接続して構成される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing a schematic configuration of a printing system 1 according to an embodiment to which the present invention is applied. FIG. 2 is a side view illustrating a configuration of a main part of a printer 2 (recording apparatus) included in the printing system 1.
The printing system 1 shown in FIG. 1 constitutes, for example, a register of a point-of-sale management system (POS system) installed at a store such as a retail store, or a ticket issuing system for issuing lottery tickets and various tickets, and includes receipts, coupons, and lottery tickets. The form 10 (FIG. 3) such as a ticket is printed out. The printing system 1 shown in FIG. 1 is configured by connecting a host computer 3 that controls the printer 2 to a printer 2 that issues a form 10.

ホストコンピューター3は、売上登録処理や精算処理の処理内容、或いは発行する帳票に関する情報を表示するディスプレイ12、帳票発行に関するバーコードを読み取るバーコードスキャナー13、帳票発行指示等のキー等の各種キーを備えたキー入力部14、精算用の現金を収容するキャッシュドロワー15等を備えている。また、ホストコンピューター3には、プリンター2による帳票10の発行記録や取引記録のデータを収集するサーバー16が接続されている。帳票10の発行に際し、ホストコンピューター3は、バーコードスキャナー13からの入力値や、キー入力部14からの入力値に基づいて、サーバー16にアクセスし、帳票10を発行するために必要な情報を取得し、プリンター2に帳票10の発行に係る各種動作を行わせる制御データを生成し、プリンター2に出力する。プリンター2は、ホストコンピューター3から入力された制御データに基づいて、各部を動作させ、帳票10を発行する。
また、図1に示すように、プリンター2の本体20には開閉可能なカバー35が設けられる。本体20には、カバー35を開くためのレバー36が設けられ、カバー35を開くと、ロール紙22を収容する空間が露出し、ロール紙22の補充や交換が可能になる。また、本体20には、プリンター2の電源をオン/オフさせる電源スイッチ37、動作モードの切り替え等の操作を行うための紙送りスイッチ38、及び、LEDの点灯/消灯状態によりプリンター2の動作状態等を表示するLED表示部39が設けられている。
The host computer 3 displays various keys such as a display 12 for displaying information on sales registration processing and settlement processing, or information on a form to be issued, a bar code scanner 13 for reading a bar code relating to form issuance, and a key for issuing a form. A key input unit 14 provided, a cash drawer 15 for storing cash for settlement, and the like are provided. The host computer 3 is connected to a server 16 that collects data of issuance records and transaction records of the forms 10 by the printer 2. When the form 10 is issued, the host computer 3 accesses the server 16 based on the input value from the barcode scanner 13 or the input value from the key input unit 14 and obtains information necessary for issuing the form 10. Control data that is acquired and causes the printer 2 to perform various operations related to the issuance of the form 10 is generated and output to the printer 2. The printer 2 operates each unit based on the control data input from the host computer 3 and issues a form 10.
As shown in FIG. 1, the main body 20 of the printer 2 is provided with a cover 35 that can be opened and closed. The main body 20 is provided with a lever 36 for opening the cover 35. When the cover 35 is opened, a space for accommodating the roll paper 22 is exposed, and the roll paper 22 can be replenished or replaced. Further, the main body 20 includes a power switch 37 for turning on / off the power of the printer 2, a paper feed switch 38 for performing operations such as switching of an operation mode, and the operation state of the printer 2 depending on whether the LED is on or off. An LED display unit 39 for displaying the above is provided.

図2に示すように、プリンター2は、長尺の感熱紙をロール状に巻いたロール紙22を記録媒体として用い、サーマルヘッド24によりロール紙22に熱を加えて文字等を記録(印刷)する。印刷後のロール紙22はカッターユニット25によって切断され、帳票10として排紙口28(図1)から排出される。
プリンター2は、本体20にロール紙22を収容し、このロール紙22を繰り出して搬送するローラー形状のプラテン23(搬送手段)と、プラテン23に対向配置されたサーマルヘッド24と、搬送方向に対し直交する方向にロール紙22を切断するカッターユニット25(処理手段)とを備える。カッターユニット25は、ロール紙22を幅方向に完全に切断する構成であっても、幅方向中央または端部を切り残す構成であってもよい。
プラテン23は、図示しない駆動機構を介して搬送モーター33(図4)に連結されており、搬送モーター33の動作により回転する。プラテン23とサーマルヘッド24とは板ばね等の付勢手段により相互に密接するよう付勢されている。また、プラテン23の周面はゴム等を用いて摩擦係数の高い面となっている。このため、プラテン23の回転に伴い、プラテン23とサーマルヘッド24との間に挟まれたロール紙22が搬送される。搬送モーター33が正方向に回転する場合、プラテン23はロール紙22を排紙口28に向けて搬送する方向に回転する。この場合の搬送方向を正方向とし、図2に矢印Fで示す。反対に、搬送モーター33が逆方向に回転する場合、プラテン23はロール紙22を排紙口28から引き戻す方向に回転する。この場合の搬送方向を逆方向とする。
As shown in FIG. 2, the printer 2 uses a roll paper 22 obtained by winding a long thermal paper in a roll shape as a recording medium, and heats the roll paper 22 with a thermal head 24 to record characters (printing). To do. The roll paper 22 after printing is cut by the cutter unit 25 and discharged as a form 10 from a paper discharge port 28 (FIG. 1).
The printer 2 accommodates a roll paper 22 in a main body 20, a roller-shaped platen 23 (conveying means) that feeds and conveys the roll paper 22, a thermal head 24 disposed opposite to the platen 23, and a conveyance direction And a cutter unit 25 (processing means) that cuts the roll paper 22 in a direction orthogonal to each other. The cutter unit 25 may be configured to completely cut the roll paper 22 in the width direction, or may be configured to leave the center or end portion in the width direction.
The platen 23 is connected to the transport motor 33 (FIG. 4) via a drive mechanism (not shown), and rotates by the operation of the transport motor 33. The platen 23 and the thermal head 24 are biased so as to be in close contact with each other by biasing means such as a leaf spring. Further, the peripheral surface of the platen 23 is a surface having a high friction coefficient using rubber or the like. For this reason, as the platen 23 rotates, the roll paper 22 sandwiched between the platen 23 and the thermal head 24 is conveyed. When the transport motor 33 rotates in the forward direction, the platen 23 rotates in the direction of transporting the roll paper 22 toward the paper discharge port 28. In this case, the transport direction is the forward direction, and is indicated by an arrow F in FIG. On the other hand, when the transport motor 33 rotates in the reverse direction, the platen 23 rotates in a direction in which the roll paper 22 is pulled back from the paper discharge port 28. The transport direction in this case is the reverse direction.

ロール紙22は、少なくとも一方の面に熱によって発色する発色層が設けられ、この面が表面10A(記録面)となっている。表面10Aの反対側、即ち裏面10Bには、印刷や切断の位置合わせのために、位置検出用マークとしてのブラックマーク(以下、BMという)が所定間隔で設けられている。なお、裏面10Bにおける発色層の有無は問わない。
BMは裏面10Bの幅方向の一端に形成された所定サイズのマークであり、例えば、搬送方向に沿ったサイズが五ミリ程度の長方形である。BMの色としては、白色のロール紙22に黒いBMが形成される態様が一般的であるが、後述するBMセンサー64のような光センサーが検出可能であればよい。BMは、ロール紙22の全長にわたって、所定長さ毎に、即ち等間隔で印刷等により形成されている。
The roll paper 22 is provided with a color developing layer that develops color by heat on at least one surface, and this surface is the surface 10A (recording surface). On the opposite side of the front surface 10A, that is, the back surface 10B, black marks (hereinafter referred to as BM) as position detection marks are provided at predetermined intervals for positioning for printing and cutting. In addition, the presence or absence of the color development layer in the back surface 10B does not matter.
BM is a mark of a predetermined size formed at one end in the width direction of the back surface 10B, and is, for example, a rectangle having a size of about 5 mm along the transport direction. As a color of the BM, a mode in which a black BM is formed on the white roll paper 22 is generally used, but it is sufficient that an optical sensor such as a BM sensor 64 described later can be detected. The BM is formed by printing or the like over the entire length of the roll paper 22 every predetermined length, that is, at equal intervals.

プリンター2は、ロール紙22の表面10Aに接するようにサーマルヘッド24が配置され、裏面10Bに対向してBMセンサー64(マーク検出手段)が設けられている。BMセンサー64は、例えば反射型の光センサーであり、裏面10Bに対して光を照射し、その反射光の光量を検出する。このBMセンサー64が検出した光量の変化に基づきBMを検出できる。
また、カッターユニット25は、ロール紙22の搬送路の一方側(裏面10B側)に配置された固定刃30と、この固定刃30に対向してロール紙22の搬送路の他方側(表面10A側)に配置された可動刃31と、可動刃31を固定刃30に向けてスライドさせるカッター駆動モーター32とを備えている。カッター駆動モーター32の駆動力により、駆動機構(図示略)を介して可動刃31がカッター駆動モーター32に向けて移動され、固定刃30と可動刃31との間に印刷後のロール紙22が挟まれ、切断される。
In the printer 2, the thermal head 24 is disposed so as to be in contact with the front surface 10 </ b> A of the roll paper 22, and a BM sensor 64 (mark detection unit) is provided facing the back surface 10 </ b> B. The BM sensor 64 is, for example, a reflection type optical sensor, which irradiates the back surface 10B with light and detects the amount of reflected light. BM can be detected based on the change in the amount of light detected by the BM sensor 64.
The cutter unit 25 includes a fixed blade 30 disposed on one side (back surface 10B side) of the roll paper 22 conveyance path, and the other side (surface 10A) of the roll paper 22 conveyance path facing the fixed blade 30. And a cutter driving motor 32 that slides the movable blade 31 toward the fixed blade 30. Due to the driving force of the cutter drive motor 32, the movable blade 31 is moved toward the cutter drive motor 32 via a drive mechanism (not shown), and the printed roll paper 22 is placed between the fixed blade 30 and the movable blade 31. It is sandwiched and cut.

ここで、BMセンサー64が裏面10BのBMを読み取る位置を読取位置RPとし、サーマルヘッド24が表面10Aに印刷する位置を印刷位置PPとし、カッターユニット25がロール紙22を切断する位置をカッター位置CPとすると、図2に示すロール紙22の搬送路において、搬送方向Fの上流側から順に、読取位置RP、印刷位置PP、カッター位置CPの順に並んでいる。読取位置RP、印刷位置PP、カッター位置CPの間の搬送路に沿う距離は、いずれもプリンター2の機械的構造によって決定される。   Here, a position where the BM sensor 64 reads the BM on the back surface 10B is a reading position RP, a position where the thermal head 24 prints on the front surface 10A is a printing position PP, and a position where the cutter unit 25 cuts the roll paper 22 is a cutter position. Assuming CP, the reading position RP, the printing position PP, and the cutter position CP are arranged in this order from the upstream side in the conveyance direction F in the conveyance path of the roll paper 22 shown in FIG. The distance along the conveyance path between the reading position RP, the printing position PP, and the cutter position CP is all determined by the mechanical structure of the printer 2.

図3は、プリンター2が印刷出力する帳票10の一例を示す図であり、図3(A)は裏面10Bを示し、図3(B)は表面10Aを示す。
図3(A)及び(B)には帳票10の一例として、一般にロッタリー(Lottery,lotto)と呼ばれる数字選択式の富くじを示す。この図では、ロール紙22を切断して複数枚の帳票10を発行する様子を説明するため、カッターユニット25によってカットされる帳票10(ロール紙22)上の位置を実線の被カット位置CLで示す。
1枚の帳票10において、表面10Aには発行日時、発行した店舗や売り場、発券番号等の情報と、購入者が選択または自動選択された数字の組み合わせと、これらの数字の組み合わせを表す機械読み取り可能なコードが印刷されている。裏面10Bには、偽造を防止するために予め絵柄等が印刷され、帳票10の数に相当するシリアル番号と、位置合わせ用のBMが印刷されている。図3の例では1枚の帳票10に使用する長さが決まっているので、この長さに合わせて絵柄、シリアル番号及びBMが等間隔であらかじめ印刷されている。
FIG. 3 is a diagram illustrating an example of a form 10 that is printed out by the printer 2. FIG. 3A illustrates the back surface 10B, and FIG. 3B illustrates the front surface 10A.
3A and 3B show, as an example of the form 10, a number selection type lottery generally called a lottery (Lottery, lotto). In this figure, in order to describe a state in which the roll paper 22 is cut and a plurality of forms 10 are issued, the position on the form 10 (roll paper 22) cut by the cutter unit 25 is indicated by a solid cut position CL. Show.
In one form 10, on the front surface 10A, information such as the date and time of issue, issued store or sales floor, ticketing number, etc., a combination of numbers selected or automatically selected by the purchaser, and a machine reading representing the combination of these numbers Possible codes are printed. On the back surface 10B, a pattern or the like is printed in advance to prevent forgery, and a serial number corresponding to the number of the forms 10 and an alignment BM are printed. In the example of FIG. 3, since the length to be used for one form 10 is determined, the pattern, serial number, and BM are printed in advance at equal intervals according to this length.

ここで、裏面10Bに予め設けられたBMどうしの間隔(BM間距離)を距離D11とし、図3(A)に示したBMを、搬送方向Fの下流(先頭)側から順にBM1、BM2、BM3とする。また、BMセンサー64が検出するBMの先頭側の端から被カット位置CLまでの長さを距離D12とする。
プリンター2は、読取位置RP(図2)においてBMセンサー64がBMを検出したら、この検出したBMの位置を基準としてロール紙22の被カット位置CLを決定し、ロール紙22を正方向に搬送して被カット位置CLがカッター位置CP(図2)に達したら、カッター駆動モーター32を駆動してカットする。被カット位置CLがカッター位置CPに達するタイミングは、プラテン23を回転させる搬送モーター33(図4)の回転数やパルス数により特定できる。
Here, an interval between BMs (distance between BMs) provided in advance on the back surface 10B is set as a distance D11, and the BM shown in FIG. 3A is sequentially changed from BM1, BM2, BM3. Further, the length from the leading end of the BM detected by the BM sensor 64 to the cut position CL is defined as a distance D12.
When the BM sensor 64 detects the BM at the reading position RP (FIG. 2), the printer 2 determines the cut position CL of the roll paper 22 based on the detected BM position, and transports the roll paper 22 in the forward direction. When the cut position CL reaches the cutter position CP (FIG. 2), the cutter drive motor 32 is driven to cut. The timing at which the cut position CL reaches the cutter position CP can be specified by the number of rotations and the number of pulses of the transport motor 33 (FIG. 4) that rotates the platen 23.

しかしながら、図2に示したようにBMセンサー64はカッターユニット25よりも上流側にあるため、BMセンサー64がBMを検出したときに、既にロール紙22の被カット位置CLがカッター位置CPを通過してしまっている場合がある。
この場合について詳細に説明する。図3(B)には、プリンター2のカッター位置CP、印刷位置PP及び読取位置RPの位置を、ロール紙22に対応させて示している。そして、読取位置RPの位置をBM2に並ぶように破線で示している。印刷位置PPとカッター位置CPとの距離(搬送路に沿う距離)を距離D1、読取位置RPと印刷位置PPの間の距離(搬送路に沿う距離)を距離D2とし、読取位置RPとカッター位置CPとの間の距離(搬送路に沿う距離)を距離D3とする。
例えば、BMセンサー64がBM2を検出した後で、このBM2よりも距離D12だけ先頭側にある被カット位置CLでカットする場合を想定する。BMセンサー64がBM2を検出したときには、読取位置RP(図2)にBM2が位置していることになる。この時点で、カッターユニット25のカッター位置CP(図2)は、図3(B)に破線CPで示すロール紙22上の位置にある。
However, as shown in FIG. 2, since the BM sensor 64 is upstream of the cutter unit 25, the cut position CL of the roll paper 22 has already passed the cutter position CP when the BM sensor 64 detects BM. It may be done.
This case will be described in detail. In FIG. 3B, the positions of the cutter position CP, the printing position PP, and the reading position RP of the printer 2 are shown in correspondence with the roll paper 22. The position of the reading position RP is indicated by a broken line so as to be aligned with BM2. The distance between the printing position PP and the cutter position CP (distance along the conveyance path) is the distance D1, and the distance between the reading position RP and the printing position PP (distance along the conveyance path) is the distance D2, and the reading position RP and the cutter position. A distance from the CP (a distance along the conveyance path) is defined as a distance D3.
For example, a case is assumed in which after the BM sensor 64 detects BM2, cutting is performed at a cut position CL that is a distance D12 from the BM2 on the leading side. When the BM sensor 64 detects BM2, the BM2 is positioned at the reading position RP (FIG. 2). At this time, the cutter position CP (FIG. 2) of the cutter unit 25 is at a position on the roll paper 22 indicated by a broken line CP in FIG. 3 (B).

ここで、プリンター2は、BM2の位置を基準として、BM2より下流側(先頭側、排出口側)にある被カット位置CL2の位置を決定する。ところが、BMから被カット位置CLまでの距離D12と、読取位置RPからカッター位置CPまでの距離D3とを比較して、D12>D3となっている場合は、図3(B)に示すように、BM2が読取位置RPで検出されたときに、すでにロール紙22上の被カット位置CL2がカッター位置CPよりも先(排出口側)に位置している。この状態では、カッター位置CPを通過した被カット位置CL2でカットすることはできない。
そこで、本実施形態のプリンター2は、二通りの方法により、被カット位置CL2におけるカットを可能とする。
Here, the printer 2 determines the position of the cut position CL2 on the downstream side (leading side, discharge port side) from the BM2 with reference to the position of the BM2. However, when the distance D12 from the BM to the cut position CL is compared with the distance D3 from the reading position RP to the cutter position CP, and D12> D3, as shown in FIG. , BM2 is detected at the reading position RP, the cut position CL2 on the roll paper 22 is already positioned ahead (the discharge port side) of the cutter position CP. In this state, cutting cannot be performed at the cut position CL2 that has passed the cutter position CP.
Therefore, the printer 2 of the present embodiment enables cutting at the cut position CL2 by two methods.

プリンター2は、ロール紙22が安定して適正に搬送されている間は、BM2よりも上流側(ロール側)に位置する被カット位置CL3を決定して、カッターユニット25によりカットを実行させる。図3(A)の例では、BMセンサー64によりBM1が検出されたときに、BM1の位置を基準として、BM1とBM2の間の被カット位置CL2の位置を決定する。BMセンサー64によりBM2が検出されたときには、BM2の位置を基準として、BM2とBM3の間の被カット位置CL3の位置を決定する。この場合、被カット位置CL2、CL3は、それぞれ基準となったBM1、BM2よりも後にカッター位置CPを通過するので、カットを実行できる。   While the roll paper 22 is being transported stably and properly, the printer 2 determines the cut position CL3 positioned upstream (roll side) from the BM 2 and causes the cutter unit 25 to perform cutting. In the example of FIG. 3A, when BM1 is detected by the BM sensor 64, the position of the cut position CL2 between BM1 and BM2 is determined using the position of BM1 as a reference. When BM2 is detected by the BM sensor 64, the position of the cut position CL3 between BM2 and BM3 is determined based on the position of BM2. In this case, since the cut positions CL2 and CL3 pass through the cutter position CP after the reference BM1 and BM2, respectively, cutting can be executed.

一方、ロール紙22の搬送に支障が生じた場合を考慮すると、BM2より下流側に位置する被カット位置CL3を決定する方が、BM2より上流側に位置する被カット位置CL2を決定するよりも好ましい。理由は、既にロールから引き出され、プラテン23を通過しているロール紙22は、正常に搬送される可能性が高いためである。これに対し、まだロールから繰り出されていない部分が正常に搬送される可能性は、上記の場合ほど高くはない。
そこで、本実施形態のプリンター2は、ロール紙22の搬送に支障が生じた場合には、読取位置RPにおいてBMセンサー64がBM2を検出したときに、検出されたBM2よりも下流側に位置する被カット位置CL1の位置を決定して、この被カット位置CL1に合わせてカッターユニット25がカットする動作を行う。但しこの場合、上述したように、ロール紙22上の被カット位置CL1がカッター位置CPを通過している可能性があるが、プリンター2は、プラテン23を逆回転させてロール紙22を逆搬送(バックフィード)することで、被カット位置CL1をカッター位置CPに合わせる。これによって、支障なくカットを行える。
On the other hand, considering the case where trouble occurs in the conveyance of the roll paper 22, the cut position CL3 positioned on the downstream side of the BM2 is determined rather than the cut position CL2 positioned on the upstream side of the BM2. preferable. The reason is that the roll paper 22 that has already been pulled out of the roll and passed through the platen 23 is likely to be normally conveyed. On the other hand, the possibility that the part that has not yet been fed out from the roll is normally conveyed is not as high as in the above case.
Therefore, when trouble occurs in the conveyance of the roll paper 22, the printer 2 according to the present embodiment is located downstream of the detected BM2 when the BM sensor 64 detects BM2 at the reading position RP. The position of the cut position CL1 is determined, and the cutter unit 25 performs an operation of cutting in accordance with the cut position CL1. However, in this case, as described above, there is a possibility that the cut position CL1 on the roll paper 22 has passed the cutter position CP, but the printer 2 reversely rotates the platen 23 to reversely convey the roll paper 22. By performing (back feed), the cut position CL1 is matched with the cutter position CP. As a result, cutting can be performed without any problem.

さらに、プリンター2は、ロール紙22の搬送に支障が生じているか否かを、BM間の距離に基づいて判定する。即ち、プリンター2は、BMセンサー64によりBMが検出される毎に、その前に検出されたBMとの間の距離を求め、本来のBM間の距離D13とのずれ量を算出する。このずれ量が予め設定された所定範囲内であれば搬送は正常と判定し、ずれ量が所定範囲を超えた場合は搬送に支障が生じたものと判定する。これにより、BMを検出するBMセンサー64を利用して、搬送の支障の有無を正確に判定できる。   Further, the printer 2 determines whether or not a trouble has occurred in the conveyance of the roll paper 22 based on the distance between the BMs. That is, every time a BM is detected by the BM sensor 64, the printer 2 calculates a distance from the BM detected before that, and calculates a deviation from the original distance BM between the BMs. If the deviation amount is within a predetermined range set in advance, the conveyance is determined to be normal, and if the deviation amount exceeds the predetermined range, it is determined that the conveyance is hindered. Accordingly, it is possible to accurately determine the presence or absence of the conveyance trouble using the BM sensor 64 that detects the BM.

また、BM間距離のずれ量の原因は、プラテン23を含む機械構造の公差などの他に、外部から印刷中のロール紙22に対して力が加わることが挙げられる。通常、機械構造等に起因する搬送量のばらつきは、発行する帳票の品質に影響しない程度に抑えられているので、許容しても問題がない。これに対し、例えば帳票10を早く発行させたいがために、カッターユニット25がカットする前に帳票10の先端を引っ張る行為により、搬送量が大きくずれることがある。カッターユニット25は排紙口28の近傍に配置されるため、カットする前に帳票10の一部が排紙口28よりも外に出ることがあり、上記の行為によりロール紙22に引張り力が作用することがある。この外力は、プラテン23及びサーマルヘッド24に挟まれた箇所にも作用し、プラテン23との間に滑りを生じながらロール紙22が引き出される。この場合、ロール紙22はプラテン23の回転量よりも多く繰り出され、サーマルヘッド24が1枚の帳票10の印刷を終えたときには、1枚の帳票10を超える長さのロール紙22が消費される。この場合、通常と同じ位置でロール紙22をカットしてしまうと、印刷された文字やマークが途切れる可能性もある。   In addition to the tolerance of the mechanical structure including the platen 23, the cause of the deviation amount of the distance between the BMs is that force is applied to the roll paper 22 during printing from the outside. Usually, the variation in the conveyance amount due to the machine structure or the like is suppressed to such an extent that it does not affect the quality of the form to be issued. On the other hand, for example, in order to issue the form 10 quickly, the transport amount may be greatly shifted by an action of pulling the tip of the form 10 before the cutter unit 25 cuts. Since the cutter unit 25 is disposed in the vicinity of the paper discharge port 28, a part of the form 10 may come out of the paper discharge port 28 before cutting, and the above action causes a tensile force to the roll paper 22. May work. This external force also acts on a portion sandwiched between the platen 23 and the thermal head 24, and the roll paper 22 is pulled out while slipping between the platen 23 and the platen 23. In this case, the roll paper 22 is fed out more than the rotation amount of the platen 23, and when the thermal head 24 finishes printing one form 10, the roll paper 22 having a length exceeding the one form 10 is consumed. The In this case, if the roll paper 22 is cut at the same position as usual, printed characters and marks may be interrupted.

つまり、BM間距離のずれ量が所定範囲を逸脱している場合には、外部からの引張り力によりロール紙22が過剰に引き出されたことと想定されるので、この場合にBMを基準としてBMより上流側の被カット位置CLを決めてしまうと、被カット位置CLが文字やマークに重なる可能性がある。
上述のように、BM間距離のずれ量が所定範囲を逸脱している場合に、より上流側に位置する次のBMが検出されるまで搬送を行い、当該BMを検出したら、このBMを基準として先頭側の被カット位置CLを決定すれば、引張り力の影響を受けたときに検出したBMの位置を避けて、その後のBMの位置に基づいて適切な被カット位置CLを決定できるという利点がある。これにより、外部から搬送に支障を来すような引張り力が加わった場合であっても、文字やマークに重ならない適切な位置でカットできる。
That is, when the deviation amount of the distance between the BMs deviates from the predetermined range, it is assumed that the roll paper 22 is excessively pulled out by the pulling force from the outside, and in this case, the BM is based on the BM. If the cut position CL on the upstream side is determined, the cut position CL may overlap with a character or a mark.
As described above, when the deviation amount of the distance between the BMs deviates from the predetermined range, the conveyance is performed until the next BM located further upstream is detected, and when the BM is detected, the BM is used as a reference. If the cutting position CL on the head side is determined as follows, the position of the BM detected when affected by the tensile force can be avoided, and the appropriate cutting position CL can be determined based on the subsequent BM position. There is. As a result, even when a tensile force that impedes conveyance from the outside is applied, cutting can be performed at an appropriate position that does not overlap characters or marks.

図4は、プリンター2の機能的構成を示すブロック図である。
プリンター2は、プリンター2の各部を中枢的に制御する制御部4(制御手段)、制御部4の制御に従って各種センサーの検出状態を取得するセンサー制御部51、制御部4の制御のもとに各モーターを駆動するモータードライバー52、制御部4の制御のもとにサーマルヘッド24への通電を行うヘッドドライバー53、ホストコンピューター3に接続され、ホストコンピューター3との間で各種データを送受信するインターフェイス(I/F)部54、スイッチ38の操作を検出する入力部55、及び、制御部4の制御によってLED表示部39のLEDの点灯状態を切り替える表示部56を備えている。
FIG. 4 is a block diagram illustrating a functional configuration of the printer 2.
The printer 2 is controlled under the control of a control unit 4 (control means) that centrally controls each unit of the printer 2, a sensor control unit 51 that acquires detection states of various sensors according to the control of the control unit 4, and the control unit 4. A motor driver 52 that drives each motor, a head driver 53 that energizes the thermal head 24 under the control of the control unit 4, and an interface that is connected to the host computer 3 and transmits / receives various data to / from the host computer 3. (I / F) part 54, input part 55 which detects operation of switch 38, and display part 56 which changes the lighting state of LED of LED display part 39 by control of control part 4 are provided.

センサー制御部51には、カバー35が開いたことを検出するカバーセンサー61と、サーマルヘッド24の上流側に配置され、ロール紙22が無くなったことを検出するリアルエンドセンサー62及びニアエンドセンサー63と、BMセンサー64とが接続されている。カバーセンサー61はカバー35が開いた場合にオンとなるスイッチ式のセンサーである。リアルエンドセンサー62及びニアエンドセンサー63は、例えば反射型または透過型の光センサーにより構成され、リアルエンドセンサー62はサーマルヘッド24の近傍に配置され、ニアエンドセンサー63はリアルエンドセンサー62よりもサーマルヘッド24から離れた位置に配置される。センサー制御部51は、これら各センサーに動作用の電力を供給し、各センサーの検出状態に応じて変化する出力電流を検出する。そして、センサー制御部51は、各センサーの出力電流に基づいて各センサーの検出状態を特定し、検出状態を示すデジタルデータを生成して、制御部4に出力する。   The sensor control unit 51 includes a cover sensor 61 that detects that the cover 35 is opened, a real-end sensor 62 that is disposed upstream of the thermal head 24, and that detects that the roll paper 22 has been lost. The BM sensor 64 is connected. The cover sensor 61 is a switch type sensor that is turned on when the cover 35 is opened. The real end sensor 62 and the near end sensor 63 are configured by, for example, a reflection type or a transmission type optical sensor. The real end sensor 62 is disposed in the vicinity of the thermal head 24, and the near end sensor 63 is more thermal head 24 than the real end sensor 62. It is arranged in the position away from. The sensor control unit 51 supplies power for operation to each of these sensors, and detects an output current that changes according to the detection state of each sensor. Then, the sensor control unit 51 specifies the detection state of each sensor based on the output current of each sensor, generates digital data indicating the detection state, and outputs the digital data to the control unit 4.

モータードライバー52には、プラテン23を回転させる搬送モーター33、及び、カッターユニット25が備えるカッター駆動モーター32が接続されている。モータードライバー52は、カッター駆動モーター32及び搬送モーター33に対し、制御部4の制御に従って駆動電流を供給し、カッター駆動モーター32と搬送モーター33をそれぞれ正方向あるいは逆方向に回転させる。ここで、カッター駆動モーター32、搬送モーター33がステッピングモーターとして構成されている場合、モータードライバー52は、駆動電流とともに駆動パルスを出力する。
ヘッドドライバー53は、サーマルヘッド24が備える発熱素子に駆動電流を供給し、さらに発熱素子毎の電流の供給を制御することにより、サーマルヘッド24によってロール紙22に印刷を実行させる。
The motor driver 52 is connected to a conveyance motor 33 that rotates the platen 23 and a cutter drive motor 32 provided in the cutter unit 25. The motor driver 52 supplies a drive current to the cutter drive motor 32 and the transport motor 33 according to the control of the control unit 4, and rotates the cutter drive motor 32 and the transport motor 33 in the forward direction or the reverse direction, respectively. Here, when the cutter drive motor 32 and the conveyance motor 33 are configured as stepping motors, the motor driver 52 outputs a drive pulse together with a drive current.
The head driver 53 causes the thermal head 24 to print on the roll paper 22 by supplying a driving current to the heating elements included in the thermal head 24 and controlling the supply of current for each heating element.

制御部4は、制御プログラム及び制御プログラムに係る設定値等のデータを記憶する不揮発性メモリー、このROMに記憶されたプログラムを実行するCPU、CPUが実行するプログラム及び処理されるデータを一時的に記憶するRAM等を備えて構成される。制御部4は、上記CPUがプログラムを実行することで、ソフトウェアとハードウェアの協働により、種々の機能を実現する。これらの機能は、記録制御部41、距離検出部42、処理位置制御部43、搬送制御部44、実行制御部45、及び記憶部46として表現される。   The control unit 4 is a non-volatile memory that stores data such as a control program and set values related to the control program, a CPU that executes a program stored in the ROM, a program that is executed by the CPU, and data that is processed temporarily. It comprises a RAM and the like for storing. The control part 4 implement | achieves a various function by cooperation of software and hardware, when the said CPU runs a program. These functions are expressed as a recording control unit 41, a distance detection unit 42, a processing position control unit 43, a conveyance control unit 44, an execution control unit 45, and a storage unit 46.

記録制御部41は、インターフェイス部54を介してホストコンピューター3から受信したコマンド及びデータに従って、モータードライバー52を制御して搬送モーター33を動作させ、ヘッドドライバー53を制御し、ロール紙22への印刷を実行する。
距離検出部42(距離検出手段)は、センサー制御部51を介してBMセンサー64の検出状態を監視する処理と、搬送モーター33の回転量に基づいてBMセンサー64がBMを検出してからのロール紙22の搬送量をカウントする処理とを実行する。そして、距離検出部42は、BMセンサー64がBMを検出する毎に、検出されたBMと、その直前に検出されたBMとの間の距離(BM間距離)を、カウント値に基づいて算出する。また、距離検出部42は、後述する処理位置制御部43によって、BM間距離のずれ量が所定範囲を逸脱していると判定された場合には、カウント値をクリアし、BMセンサー64が次のBMを検出してからカウントを開始する。
The recording control unit 41 controls the motor driver 52 to operate the transport motor 33 according to the command and data received from the host computer 3 via the interface unit 54, controls the head driver 53, and prints on the roll paper 22. Execute.
The distance detection unit 42 (distance detection means) is configured to monitor the detection state of the BM sensor 64 via the sensor control unit 51 and the BM sensor 64 after detecting the BM based on the rotation amount of the transport motor 33. A process of counting the transport amount of the roll paper 22 is executed. Then, every time the BM sensor 64 detects the BM, the distance detection unit 42 calculates the distance between the detected BM and the BM detected immediately before that (based on the BM distance) based on the count value. To do. The distance detection unit 42 clears the count value when the processing position control unit 43 described later determines that the deviation amount of the BM distance is out of the predetermined range, and the BM sensor 64 The count is started after detecting the BM.

処理位置制御部43(処理位置制御手段)は、距離検出部42が算出したBM間距離と、予め記憶部46に記憶されているBM間距離の基準値とをもとにずれ量を算出する。処理位置制御部43は、算出したずれ量と、記憶部46に記憶されているしきい値とを比較し、ずれ量がしきい値を超えているか否か、即ち設定された範囲から逸脱しているか否かを判定する。ずれ量が設定範囲内である場合、処理位置制御部43は、直前にBMセンサー64が検出したBMの位置を基準として、それより上流側の被カット位置CLを決定する。また、ずれ量が設定範囲内である場合、処理位置制御部43は、直前にBMセンサー64が検出したBMの位置を基準として、それより先頭側の被カット位置CLを決定する。   The processing position control unit 43 (processing position control means) calculates the amount of deviation based on the distance between BMs calculated by the distance detection unit 42 and the reference value of the distance between BMs stored in the storage unit 46 in advance. . The processing position control unit 43 compares the calculated deviation amount with the threshold value stored in the storage unit 46, and determines whether the deviation amount exceeds the threshold value, that is, deviates from the set range. It is determined whether or not. When the deviation amount is within the set range, the processing position control unit 43 determines the cut position CL on the upstream side with reference to the position of the BM detected by the BM sensor 64 immediately before. Further, when the deviation amount is within the set range, the processing position control unit 43 determines the cut position CL on the head side based on the position of the BM detected by the BM sensor 64 immediately before.

搬送制御部44(搬送制御手段)は、モータードライバー52を制御して搬送モーター33を動作させ、処理位置制御部43が決定した被カット位置CLがカッターユニット25のカッター位置CPに達するようにロール紙22を搬送する。処理位置制御部43が決定した被カット位置CLが、既にカッター位置CPよりも下流側に位置している場合には、搬送モーター33を逆回転させてロール紙22をバックフィードして(逆搬送して)、被カット位置CLとカッター位置CPの位置を合わせる。搬送制御部44は、BMセンサー64の検出位置からカッターユニット25の処理位置までの距離(図3の距離D3)と、BMセンサー64がBMを検出してからの搬送量とを比較することにより、被カット位置CLがカッターユニット25の位置を既に通過したか否かを判定する。
実行制御部45(実行制御手段)は、搬送制御部44の制御によってロール紙22上の被カット位置CLがカッター位置CPに達すると、モータードライバー52を制御してカッターユニット25を動作させ、ロール紙22をカットする。
The transport control unit 44 (transport control means) controls the motor driver 52 to operate the transport motor 33 and rolls so that the cut position CL determined by the processing position control unit 43 reaches the cutter position CP of the cutter unit 25. The paper 22 is conveyed. When the cut position CL determined by the processing position control unit 43 is already positioned downstream of the cutter position CP, the transport motor 33 is rotated in the reverse direction to back feed the roll paper 22 (reverse transport). And align the cut position CL with the cutter position CP. The conveyance control unit 44 compares the distance from the detection position of the BM sensor 64 to the processing position of the cutter unit 25 (distance D3 in FIG. 3) with the conveyance amount after the BM sensor 64 detects BM. Then, it is determined whether or not the cut position CL has already passed the position of the cutter unit 25.
The execution control unit 45 (execution control means) controls the motor driver 52 to operate the cutter unit 25 when the cut position CL on the roll paper 22 reaches the cutter position CP under the control of the conveyance control unit 44, and operates the roll Cut the paper 22.

記憶部46は、フラッシュROMやEEPROM等の書き換え可能な不揮発性メモリーにより構成され、各種設定値を不揮発的に記憶する。記憶部46が記憶する設定値としては、ロール紙22に設けられているBMのBM間距離、処理位置制御部43が判定を行うためのしきい値等が挙げられる。これらの設定値は、ホストコンピューター3から送信された値、スイッチ38の操作により選択または入力された値、或いは、出荷時に予め記憶されていた値である。記憶部46が記憶する設定値は、例えば、ロール紙22の幅方向のサイズ毎に複数記憶されており、ホストコンピューター3から送信されるコマンドやスイッチ38の操作によりロール紙22のサイズが指定されることで、このサイズに対応する他の設定値が選択される構成としてもよい。   The storage unit 46 includes a rewritable nonvolatile memory such as a flash ROM or an EEPROM, and stores various setting values in a nonvolatile manner. Examples of the setting values stored in the storage unit 46 include a distance between BMs of the BM provided on the roll paper 22 and a threshold value for the processing position control unit 43 to make a determination. These set values are values transmitted from the host computer 3, values selected or input by operating the switch 38, or values stored in advance at the time of shipment. A plurality of setting values stored in the storage unit 46 are stored for each size in the width direction of the roll paper 22, for example, and the size of the roll paper 22 is designated by a command transmitted from the host computer 3 or an operation of the switch 38. Thus, another setting value corresponding to this size may be selected.

図5は、プリンター2とホストコンピューター3の動作シーケンスを示す図である。図5(A)はホストコンピューター3の動作を示し、図5(B)はプリンター2の動作を示す。
ホストコンピューター3は、帳票10の印刷に先だって、プリンター2に対して設定情報を送信する(ステップS11)。この設定情報は、少なくとも、ロール紙22のBM間距離を含み、サーマルヘッド24による印刷開始位置や、ロール紙22のサイズ、使用するフォント等の情報を含んでいてもよい。
プリンター2の制御部4は、ホストコンピューター3から送信された設定情報を受信し(ステップS21)、受信した設定情報に含まれるBM間距離を記憶部46に記憶する等、設定情報に従ってプリンター2の動作に関する設定を行う(ステップS22)。
FIG. 5 is a diagram illustrating an operation sequence of the printer 2 and the host computer 3. FIG. 5A shows the operation of the host computer 3, and FIG. 5B shows the operation of the printer 2.
The host computer 3 transmits setting information to the printer 2 prior to printing the form 10 (step S11). This setting information includes at least the BM distance of the roll paper 22 and may include information such as the print start position by the thermal head 24, the size of the roll paper 22, and the font to be used.
The control unit 4 of the printer 2 receives the setting information transmitted from the host computer 3 (step S21), stores the BM distance included in the received setting information in the storage unit 46, and the like, according to the setting information. Settings relating to the operation are performed (step S22).

その後、ホストコンピューター3は、プリンター2に対するトランザクションを実行し、プリンター2に対して印刷実行を指示するコマンド、印刷するデータ等を含む情報を送信する(ステップS12)。
プリンター2の制御部4は、ホストコンピューター3のトランザクションにおいて送信されるコマンドやデータを受信し、受信したコマンドに従って、記録制御部41がロール紙22への印刷を実行する(ステップS23)。この印刷を開始した後、制御部4は、帳票カット処理を実行し、印刷済みのロール紙22を順次カットして帳票10を出力する(ステップS24)。
Thereafter, the host computer 3 executes a transaction for the printer 2 and transmits information including a command for instructing the printer 2 to execute printing, data to be printed, and the like (step S12).
The control unit 4 of the printer 2 receives a command or data transmitted in the transaction of the host computer 3, and the recording control unit 41 executes printing on the roll paper 22 in accordance with the received command (step S23). After starting this printing, the control unit 4 executes a form cut process, sequentially cuts the printed roll paper 22 and outputs the form 10 (step S24).

図6は、プリンターの動作を示すフローチャートであり、図5のステップS24に示した帳票カット処理を詳細に示す。
この帳票カット処理は、プリンター2の印刷の開始(図5のステップS23)とともに開始される。
制御部4の距離検出部42は、BMセンサー64がBMを検出してから次のBMが検出されるまでの搬送量のカウントを実行し、BMセンサー64が次のBMを検出すると(ステップS31)、前回(直前)にBMセンサー64が検出したBMからのBM間距離を算出する(ステップS32)。
FIG. 6 is a flowchart showing the operation of the printer, and shows the form cut process shown in step S24 of FIG. 5 in detail.
This form cut process is started together with the start of printing by the printer 2 (step S23 in FIG. 5).
The distance detection unit 42 of the control unit 4 counts the conveyance amount from when the BM sensor 64 detects BM until the next BM is detected, and when the BM sensor 64 detects the next BM (step S31). ) The distance between BMs from the BM detected by the BM sensor 64 at the previous time (immediately before) is calculated (step S32).

処理位置制御部43は、距離検出部42が算出したBM間距離と、記憶部46が記憶しているBM間距離の基準値とをもとに、ずれ量を算出する(ステップS33)。次に、搬送制御部44は、処理位置制御部43が算出したずれ量が記憶部46に記憶されたしきい値を超えているか否か、即ち設定範囲内であるか設定範囲を逸脱しているかを判定する(ステップS34)。   The processing position control unit 43 calculates a deviation amount based on the distance between BMs calculated by the distance detection unit 42 and the reference value of the distance between BMs stored in the storage unit 46 (step S33). Next, the conveyance control unit 44 determines whether or not the deviation amount calculated by the processing position control unit 43 exceeds the threshold value stored in the storage unit 46, that is, whether the deviation is within the set range or deviates from the set range. (Step S34).

処理位置制御部43は、ずれ量が設定範囲内であると判定した場合(ステップS34;Yes)、ステップS31で検出したBMの位置に基づいてロール紙22上の被カット位置CLを決定する(ステップS35)。その後、搬送制御部44が搬送モーター33を動作させて被カット位置CLがカッター位置CPの位置に達するまでロール紙22の搬送方向Fの搬送を行い(ステップS36)、被カット位置CLがカッター位置CPに達すると実行制御部45がカッター駆動モーター32を動作させてカットを実行し(ステップS37)、排紙口28から帳票10を排出して(ステップS38)、本処理を終了する。   When the processing position control unit 43 determines that the deviation amount is within the set range (step S34; Yes), the processing position control unit 43 determines the cut position CL on the roll paper 22 based on the position of the BM detected in step S31 ( Step S35). Thereafter, the transport control unit 44 operates the transport motor 33 to transport the roll paper 22 in the transport direction F until the cut position CL reaches the cutter position CP (step S36), and the cut position CL is the cutter position. When CP is reached, the execution control unit 45 operates the cutter drive motor 32 to execute cutting (step S37), discharges the form 10 from the paper discharge port 28 (step S38), and ends this processing.

また、処理位置制御部43は、ずれ量が設定範囲を逸脱していると判定した場合(ステップS34;No)、次のBMがBMセンサー64によって検出されるまでロール紙22を搬送させる(ステップS39)。そして、次のBMが検出されると、距離検出部42がBM間距離のカウントをリセットして、ここで検出されたBMの位置からBM間距離のカウントを再開するとともに(ステップS40)、処理位置制御部43が、ステップS39で検出されたBMの位置に基づいて、より先頭側(下流側)の被カット位置CLを決定する(ステップS41)。   Further, when the processing position control unit 43 determines that the deviation amount deviates from the set range (step S34; No), the roll paper 22 is conveyed until the next BM is detected by the BM sensor 64 (step S34). S39). When the next BM is detected, the distance detector 42 resets the BM distance count, restarts the BM distance count from the detected BM position (step S40), and processing The position control unit 43 determines a cut position CL on the leading side (downstream side) based on the position of the BM detected in step S39 (step S41).

搬送制御部44は、処理位置制御部43がステップS41で決定したロール紙22の被カット位置CLが、カッター位置CPを既に通過しているか否かを判定する(ステップS42)。ここで、既に通過している場合には(ステップS42;Yes)、搬送モーター33を逆回転させて、被カット位置CLをカッター位置CPの位置に合わせるようにロール紙22をバックフィードする(ステップS43)。被カット位置CLがカッター位置CPに達したらステップS37に移行して、実行制御部45がカットを実行する。
また、被カット位置CLがカッター位置CPを通過していない場合(ステップS42;No)、搬送制御部44は搬送モーター33を動作させて、被カット位置CLがカッター位置CPの位置に達するまで搬送方向Fの搬送を行い(ステップS44)、被カット位置CLがカッター位置CPに達したらステップS37に移行して、実行制御部45がカットを実行する。
The conveyance control unit 44 determines whether or not the cut position CL of the roll paper 22 determined by the processing position control unit 43 in step S41 has already passed the cutter position CP (step S42). If the sheet has already passed (step S42; Yes), the transport motor 33 is rotated in the reverse direction, and the roll paper 22 is back-fed so that the cut position CL is aligned with the cutter position CP (step). S43). When the cut position CL reaches the cutter position CP, the process proceeds to step S37, and the execution control unit 45 executes the cut.
When the cut position CL does not pass the cutter position CP (step S42; No), the conveyance control unit 44 operates the conveyance motor 33 to convey the cut position CL until it reaches the cutter position CP. The conveyance of the direction F is performed (step S44), and if the to-be-cut position CL reaches the cutter position CP, it will transfer to step S37 and the execution control part 45 will perform a cut.

以上説明したように、本発明を適用した実施形態に係る印刷システム1によれば、プリンター2は、ロール紙22を搬送するプラテン23及び搬送モーター33と、プラテン23及び搬送モーター33によりロール紙22が搬送される搬送路の所定位置に設けられ、当該位置においてロール紙22に対するカット処理を行うカッターユニット25と、搬送路の所定位置に設けられ、ロール紙22上に搬送方向に所定間隔で設けられているBMを検出するBMセンサー64と、BMセンサー64の検出状態に基づいて、カッターユニット25による処理を実行させる制御部4と、を備え、制御部4は、BMセンサー64がBMを検出する毎に、当該BMと前回検出されたBMとの間の距離を求める距離検出部42と、距離検出部42が求めた距離が所定範囲内である場合は、前回検出されたBMの位置に基づいてカッターユニット25が処理を実行するロール紙22上の被カット位置CLを決定し、距離検出部42が求めた距離が所定範囲を逸脱している場合には新たに検出されたBMの位置に基づいてロール紙22上の被カット位置CLを決定する処理位置制御部43と、処理位置制御部43により決定されたロール紙22上の被カット位置CLがカッターユニット25の位置に達した場合にカッターユニット25に処理を実行させる実行制御部45とを備え、距離検出部42が求めたBM間の距離が所定範囲内であれば先に検出したBMに基づいて被カット位置CLを決定するので、適切に搬送されている間は被カット位置CLに関する制約を緩和し、処理の効率を高めることができる。また、ロール紙22の搬送の支障等によりBM間の距離が所定範囲を逸脱した場合には、後に検出されるBMに基づいて、支障の影響を受けることなく正確に被カット位置CLを決定し、正確な位置で効率よくロール紙22をカットできる。   As described above, according to the printing system 1 according to the embodiment to which the present invention is applied, the printer 2 includes the platen 23 and the conveyance motor 33 that convey the roll paper 22, and the roll paper 22 by the platen 23 and the conveyance motor 33. Is provided at a predetermined position on the conveyance path, and is provided at a predetermined position on the roll paper 22 at a predetermined interval on the roll paper 22 at a predetermined position on the conveyance path. A BM sensor 64 that detects the BM that has been detected, and the control unit 4 that executes processing by the cutter unit 25 based on the detection state of the BM sensor 64, and the control unit 4 detects the BM. Each time, the distance detection unit 42 for obtaining the distance between the BM and the BM detected last time, and the distance obtained by the distance detection unit 42 Is within the predetermined range, the cut unit CL on the roll paper 22 on which the cutter unit 25 executes processing is determined based on the previously detected BM position, and the distance obtained by the distance detecting unit 42 is predetermined. A processing position control unit 43 that determines the cut position CL on the roll paper 22 based on the newly detected BM position when the range is out of the range, and the roll paper determined by the processing position control unit 43 22 and an execution control unit 45 that causes the cutter unit 25 to execute processing when the cut position CL on the cutter 22 reaches the position of the cutter unit 25, and the distance between the BMs determined by the distance detection unit 42 is within a predetermined range. If there is, the cut position CL is determined based on the previously detected BM, so that the restriction on the cut position CL can be relaxed and the processing efficiency can be improved while the paper is being conveyed properly. Kill. Further, when the distance between the BMs deviates from a predetermined range due to troubles in conveying the roll paper 22, the cut position CL is accurately determined without being affected by troubles based on the BM detected later. The roll paper 22 can be efficiently cut at an accurate position.

また、処理位置制御部43は、ロール紙22に設けられているBMの所定間隔と、距離検出部42が求めた距離とのずれ量に基づいて、ロール紙22に外部から引張り力が作用したことを検出し、この引張り力が働いた場合には新たに検出されたBMの位置に基づいてロール紙22上の被カット位置CLを決定するので、ロール紙22に対して外部から引張り力が作用したことを速やかに、かつ確実に検出し、引張り力を受けた場合であっても正確な位置でロール紙22をカットできる。   In addition, the processing position control unit 43 has an external tensile force applied to the roll paper 22 based on a deviation amount between a predetermined interval of the BM provided on the roll paper 22 and the distance obtained by the distance detection unit 42. When this pulling force is detected, the cut position CL on the roll paper 22 is determined based on the newly detected BM position, so that the pulling force is applied to the roll paper 22 from the outside. Even when the action is promptly and reliably detected and a tensile force is applied, the roll paper 22 can be cut at an accurate position.

また、制御部4は、処理位置制御部43が決定したロール紙22上の被カット位置CLが、カッターユニット25の位置より下流側にある場合に、当該被カット位置CLがカッターユニット25の位置に達するようにプラテン23及び搬送モーター33によってロール紙22を逆方向に搬送させる搬送制御部44を備えるので、カッターユニット25の位置を通過して下流側に達した被カット位置CLにおいてロール紙22をカットできる。また、ロール紙22が適切に搬送されている間は先に検出されたBMに基づいて被カット位置CLを決定するので、逆方向への搬送を行うことなくロール紙22をカットできる。これにより、必要に応じて逆方向への搬送を行ってBMと被カット位置CLとの位置関係に関する制約を緩和する一方、逆方向への搬送の頻度を必要最小限に抑えることでスループットの低下を抑えることができる。   Further, when the cut position CL on the roll paper 22 determined by the processing position control unit 43 is on the downstream side of the cutter unit 25, the control unit 4 determines that the cut position CL is the position of the cutter unit 25. Is provided with a transport control unit 44 that transports the roll paper 22 in the reverse direction by the platen 23 and the transport motor 33 so that the roll paper 22 passes through the position of the cutter unit 25 and reaches the downstream side at the cut position CL. Can be cut. Further, since the cut position CL is determined based on the previously detected BM while the roll paper 22 is being properly conveyed, the roll paper 22 can be cut without being conveyed in the reverse direction. As a result, if necessary, the conveyance in the reverse direction is performed to relieve restrictions on the positional relationship between the BM and the cut position CL, while the frequency of the conveyance in the reverse direction is minimized to reduce the throughput. Can be suppressed.

さらに、搬送制御部44は、BMセンサー64の検出位置からカッターユニット25の被カット位置CLまでの距離と、BMセンサー64がBMを検出してからのプラテン23及び搬送モーター33による搬送量とを比較することにより、処理位置制御部43が決定したロール紙22上の被カット位置CLが、カッターユニット25の位置を既に通過したか否かを判定するので、被カット位置CLがカッターユニット25の位置を既に通過したか否かを速やかに、かつ正確に判定できる。   Further, the conveyance control unit 44 determines the distance from the detection position of the BM sensor 64 to the cut position CL of the cutter unit 25 and the conveyance amount by the platen 23 and the conveyance motor 33 after the BM sensor 64 detects BM. By comparing, it is determined whether or not the cut position CL on the roll paper 22 determined by the processing position control unit 43 has already passed the position of the cutter unit 25. It is possible to quickly and accurately determine whether or not the position has already been passed.

また、距離検出部42は、距離検出部42が求めたBM間の距離が所定範囲を逸脱していて、処理位置制御部43が新たに検出されたBMの位置に基づいてロール紙22上の被カット位置CLを決定した場合には、この新たに検出されたBMと次のBMとの間の距離を求めるので、搬送の支障等によりBM間の距離が所定範囲を逸脱した場合に、それ以後のBM間の距離を、支障等の影響を受けることなく正確に求めることができる。   In addition, the distance detection unit 42 determines whether the distance between the BMs determined by the distance detection unit 42 is out of a predetermined range, and the processing position control unit 43 is on the roll paper 22 based on the newly detected BM position. When the cut position CL is determined, the distance between the newly detected BM and the next BM is obtained. Therefore, when the distance between the BMs deviates from a predetermined range due to a transportation trouble or the like, Subsequent distances between BMs can be accurately obtained without being affected by troubles.

なお、上記実施形態は本発明を適用した一具体例を示すものであり、本発明はこれに限定されるものではない。例えば、プリンター2において、ロール紙22を処理する処理手段は、カッターユニット25に限定されず、例えばロール紙22の裏面10Bに記録を行う記録ヘッドや、表面10Aまたは裏面10Bを光学的に読み取るスキャナー等を用いてもよい。
また、例えば、プリンター2からホストコンピューター3に対し、BMセンサー64によるBMの検出状態や距離検出部42が求めたBM間隔をステータス情報として送信し、ホストコンピューター3が、BMの検出位置及びBM間隔のずれ量に基づいて、図6に示した帳票カット処理における制御を実行し、被カット位置CLを決定してプリンター2に送信し、この情報をプリンター2が受信してカットを実行させる構成としてもよい。
In addition, the said embodiment shows one specific example to which this invention is applied, and this invention is not limited to this. For example, in the printer 2, the processing unit that processes the roll paper 22 is not limited to the cutter unit 25. For example, a recording head that performs recording on the back surface 10 </ b> B of the roll paper 22 or a scanner that optically reads the front surface 10 </ b> A or the back surface 10 </ b> B. Etc. may be used.
Further, for example, the BM detection state by the BM sensor 64 and the BM interval obtained by the distance detection unit 42 are transmitted as status information from the printer 2 to the host computer 3, and the host computer 3 detects the BM detection position and the BM interval. Based on the deviation amount, the control in the form cutting process shown in FIG. 6 is executed, the cut position CL is determined and transmitted to the printer 2, and this information is received by the printer 2 so as to execute the cutting. Also good.

また、例えば、上記実施形態において、プリンター2が、ホストコンピューター3から受信したコマンドやデータ等を一時的に記憶する受信バッファーを備えた構成としてもよい。さらに、図4のブロック図に示した各機能部は機能的構成を示すものであって、各機能部を独立したハードウェアにより構成する必要はなく、ソフトウェアとハードウェアとの協働により、複数の機能部の機能を1つのハードウェアに集約して実現することも、一つの機能部を複数のハードウェアにより実現することも勿論可能である。
また、本発明を適用可能な記録装置は、記録媒体を搬送して記録するプリンターであって少なくとも一つの記録ヘッドと、この記録ヘッド以外の処理手段を備えるものであればよく、サーマルラインプリンターに限らず、インクジェット式プリンター、ドットインパクト式プリンター、レーザープリンター、熱昇華型プリンターのいずれであってもよいし、他の方式で文字や画像を形成するプリンターであってもよい、また、他の装置に組み込まれる各種プリンターにも本発明を適用可能であり、プリンター2の機構をホストコンピューター3に組み込み、一体型の装置として構成することも可能である。また、上述の動作を行う制御部4のCPUが実行するプログラムは、制御部4の不揮発性メモリーが記憶する構成に限らず、可搬型の記録媒体に記憶されている構成であってもよいし、或いは、通信回線を介して接続された他の装置にダウンロード可能に記憶され、これらの装置からプリンター2が上記プログラムをダウンロードして実行してもよく、その他の構成についても任意に変更可能である。
Further, for example, in the above-described embodiment, the printer 2 may include a reception buffer that temporarily stores commands, data, and the like received from the host computer 3. Furthermore, each functional unit shown in the block diagram of FIG. 4 shows a functional configuration, and it is not necessary to configure each functional unit with independent hardware. It is of course possible to realize the functions of these functional units in a single piece of hardware, or to implement a single functional unit with a plurality of hardware.
The recording apparatus to which the present invention is applicable may be any printer that transports and records a recording medium and includes at least one recording head and processing means other than the recording head. Not limited to, an ink jet printer, a dot impact printer, a laser printer, a thermal sublimation printer, a printer that forms characters and images by other methods, and other devices The present invention can also be applied to various printers incorporated into the printer, and the mechanism of the printer 2 can be incorporated into the host computer 3 and configured as an integrated apparatus. In addition, the program executed by the CPU of the control unit 4 that performs the above-described operation is not limited to the configuration stored in the nonvolatile memory of the control unit 4, and may be a configuration stored in a portable recording medium. Alternatively, it may be stored in a downloadable manner in another device connected via a communication line, and the printer 2 may download and execute the program from these devices, and other configurations can be arbitrarily changed. is there.

1…印刷システム、2…プリンター(記録装置)、3…ホストコンピューター、4…制御部(制御手段)、22…ロール紙(記録媒体)、23…プラテン(搬送手段)、24…サーマルヘッド、25…カッターユニット(処理手段)、32…カッター駆動モーター、33…搬送モーター、41…記録制御部、42…距離検出部(距離検出手段)、43…処理位置制御部(処理位置制御手段)、44…搬送制御部(搬送制御手段)、45…実行制御部(実行制御手段)、46…記憶部、64…BMセンサー(マーク検出手段)、BM…ブラックマーク(位置検出用マーク)、CL…被カット位置(処理対象位置)、CP…カッター位置。   DESCRIPTION OF SYMBOLS 1 ... Printing system, 2 ... Printer (recording apparatus), 3 ... Host computer, 4 ... Control part (control means), 22 ... Roll paper (recording medium), 23 ... Platen (conveyance means), 24 ... Thermal head, 25 ... Cutter unit (processing means) 32 ... Cutter drive motor 33 ... Conveyance motor 41 ... Recording control unit 42 ... Distance detection unit (distance detection unit) 43 ... Processing position control unit (processing position control unit) 44 ... transport control section (transport control means), 45 ... execution control section (execution control means), 46 ... storage section, 64 ... BM sensor (mark detection means), BM ... black mark (position detection mark), CL ... covered Cut position (process target position), CP ... cutter position.

Claims (8)

記録媒体を搬送する搬送手段と、
前記搬送手段により前記記録媒体が搬送される搬送路の所定位置に設けられ、当該位置において前記記録媒体に対する処理を行う処理手段と、
前記搬送路の所定位置に設けられ、前記記録媒体上に搬送方向に所定間隔で設けられている位置検出用マークを検出するマーク検出手段と、
前記マーク検出手段の検出状態に基づいて、前記処理手段による処理を実行させる制御手段と、を備え、
前記制御手段は、
前記マーク検出手段が前記位置検出用マークを検出する毎に、当該位置検出用マークと前回検出された前記位置検出用マークとの間の距離を求める距離検出手段と、
前記距離検出手段が求めた距離が所定範囲内である場合は、前回検出された前記位置検出用マークの位置に基づいて、前記処理手段が処理を実行する前記記録媒体上の処理対象位置を決定し、前記距離検出手段が求めた距離が所定範囲を逸脱している場合には新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定する処理位置制御手段と、
前記処理位置制御手段により決定された前記記録媒体上の処理対象位置が、前記処理手段の位置に達した場合に前記処理手段に処理を実行させる実行制御手段と、を備えること、
を特徴とする記録装置。
Conveying means for conveying the recording medium;
A processing unit that is provided at a predetermined position on a transport path along which the recording medium is transported by the transport unit, and that performs processing on the recording medium at the position;
Mark detecting means for detecting position detection marks provided at predetermined positions on the conveyance path and provided at predetermined intervals in the conveyance direction on the recording medium;
Control means for executing processing by the processing means based on the detection state of the mark detection means,
The control means includes
Each time the mark detection means detects the position detection mark, a distance detection means for obtaining a distance between the position detection mark and the previously detected position detection mark;
When the distance obtained by the distance detection means is within a predetermined range, the processing means determines the processing target position on the recording medium on which the processing means executes processing based on the position of the position detection mark detected last time. And processing position control for determining a processing target position on the recording medium based on the position of the position detection mark newly detected when the distance obtained by the distance detection means is out of a predetermined range. Means,
Execution control means for causing the processing means to execute processing when the processing target position on the recording medium determined by the processing position control means reaches the position of the processing means;
A recording apparatus.
前記処理位置制御手段は、前記位置検出用マークの前記所定間隔と、前記距離検出手段が求めた距離とのずれ量に基づいて、前記記録媒体に外部から引張り力が作用したことを検出し、この引張り力が働いた場合には新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定することを特徴とする請求項1記載の記録装置。   The processing position control means detects that a tensile force is applied to the recording medium from the outside based on a deviation amount between the predetermined interval of the position detection mark and the distance obtained by the distance detection means, 2. The recording apparatus according to claim 1, wherein when the tensile force is applied, a processing target position on the recording medium is determined based on a position of the position detection mark newly detected. 前記制御手段は、前記処理位置制御手段が決定した前記記録媒体上の処理対象位置が、前記処理手段の位置より搬送方向の下流側にある場合に、当該処理対象位置が前記処理手段の位置に達するように前記搬送手段によって前記記録媒体を逆方向に搬送させる搬送制御手段を備えることを特徴とする請求項1または2記載の記録装置。   When the processing target position on the recording medium determined by the processing position control unit is on the downstream side in the transport direction from the position of the processing unit, the control unit sets the processing target position to the position of the processing unit. The recording apparatus according to claim 1, further comprising a conveyance control unit that conveys the recording medium in the reverse direction by the conveyance unit. 前記搬送制御手段は、前記マーク検出手段の検出位置から前記処理手段の位置までの距離と、前記マーク検出手段が前記位置検出用マークを検出してからの前記搬送手段による搬送量とを比較することにより、前記処理位置制御手段が決定した前記記録媒体上の処理対象位置が、前記処理手段の位置を既に通過したか否かを判定することを特徴とする請求項3記載の記録装置。   The conveyance control unit compares a distance from a detection position of the mark detection unit to a position of the processing unit and a conveyance amount by the conveyance unit after the mark detection unit detects the position detection mark. 4. The recording apparatus according to claim 3, wherein the processing target position on the recording medium determined by the processing position control means determines whether or not the position of the processing means has already passed. 前記距離検出手段は、前記距離検出手段が求めた距離が所定範囲を逸脱していて、前記処理位置制御手段が新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定した場合には、この新たに検出された前記位置検出用マークと次の前記位置検出用マークとの間の距離を求めることを特徴とする請求項1から4のいずれかに記載の記録装置。   The distance detection unit is configured to process the data on the recording medium based on the position of the position detection mark newly detected by the processing position control unit when the distance obtained by the distance detection unit is out of a predetermined range. 5. The distance between the newly detected position detection mark and the next position detection mark is obtained when the target position is determined. 6. Recording device. 前記処理手段は、前記記録媒体を、搬送方向に対し直交する方向にカットするカッターユニットを備えて構成され、
前記実行制御手段は、前記処理位置制御手段により決定された前記記録媒体上の処理対象位置で前記記録媒体がカットされるように前記カッターユニットを制御することを特徴とする請求項1から5のいずれかに記載の記録装置。
The processing means is configured to include a cutter unit that cuts the recording medium in a direction orthogonal to the conveyance direction,
The said execution control means controls the said cutter unit so that the said recording medium may be cut in the process target position on the said recording medium determined by the said processing position control means. The recording device according to any one of the above.
記録媒体を搬送する搬送手段と、前記搬送手段により前記記録媒体が搬送される搬送路の所定位置に設けられ、当該位置において前記記録媒体に対する処理を行う処理手段と、前記搬送路の所定位置に設けられ、前記記録媒体上に搬送方向に所定間隔で設けられている位置検出用マークを検出するマーク検出手段と、を備えた記録装置を制御して、
前記マーク検出手段が前記位置検出用マークを検出する毎に、当該位置検出用マークと前回検出された前記位置検出用マークとの間の距離を求め、
前記求められた距離が所定範囲内である場合は、前回検出された前記位置検出用マークの位置に基づいて前記処理手段が処理を実行する前記記録媒体上の処理対象位置を決定し、前記求められた距離が所定範囲を逸脱している場合には新たに検出された前記位置検出用マークの位置に基づいて前記記録媒体上の処理対象位置を決定し、
決定した前記記録媒体上の処理対象位置が前記処理手段の位置に達した場合に前記処理手段に処理を実行させること、
を特徴とする記録装置の制御方法。
A conveying unit configured to convey a recording medium; a processing unit configured to perform processing on the recording medium at the position; and a predetermined position of the conveying path. And a mark detection means for detecting position detection marks provided at predetermined intervals in the transport direction on the recording medium, and controlling a recording apparatus,
Each time the mark detection means detects the position detection mark, the distance between the position detection mark and the position detection mark detected last time is obtained,
If the determined distance is within a predetermined range, the processing means determines a processing target position on the recording medium to be processed based on the position of the position detection mark detected last time, and the determination is performed. If the determined distance deviates from the predetermined range, a processing target position on the recording medium is determined based on the position of the position detection mark newly detected,
Causing the processing means to execute processing when the determined processing target position on the recording medium reaches the position of the processing means;
A control method for a recording apparatus.
記録媒体を搬送する搬送手段と、前記搬送手段により前記記録媒体が搬送される搬送路の所定位置に設けられ、当該位置において前記記録媒体に対する処理を行う処理手段と、前記搬送路の所定位置に設けられ、前記記録媒体上に搬送方向に所定間隔で設けられている位置検出用マークを検出するマーク検出手段とを備えた記録装置を制御する制御部が実行可能なプログラムであって、
前記制御部を、
前記マーク検出手段が前記位置検出用マークを検出する毎に、当該位置検出用マークと前回検出された前記位置検出用マークとの間の距離を求める距離検出手段と、
前記距離検出手段が求めた距離が所定範囲内である場合は、前回検出された前記位置検出用マークの位置に基づいて前記処理手段が処理を実行する前記記録媒体上の処理対象位置を決定し、前記距離検出手段が求めた距離が所定範囲を逸脱している場合には新たに検出された前記位置検出用マークの位置に基づいて処理対象位置を決定する処理位置制御手段と、
前記処理位置制御手段により決定された前記記録媒体上の処理対象位置が前記処理手段の位置に達した場合に前記処理手段に処理を実行させる実行制御手段と、
して機能させるためのプログラム。
A conveying unit configured to convey a recording medium; a processing unit configured to perform processing on the recording medium at the position; and a predetermined position of the conveying path. A program executable by a control unit for controlling a recording apparatus provided with mark detection means for detecting position detection marks provided at predetermined intervals in the transport direction on the recording medium,
The control unit
Each time the mark detection means detects the position detection mark, a distance detection means for obtaining a distance between the position detection mark and the previously detected position detection mark;
When the distance obtained by the distance detection means is within a predetermined range, the processing means determines a processing target position on the recording medium on which the processing means performs processing based on the position of the position detection mark detected last time. A processing position control means for determining a processing target position based on a position of the position detection mark newly detected when the distance obtained by the distance detection means is out of a predetermined range;
Execution control means for causing the processing means to execute processing when the processing target position on the recording medium determined by the processing position control means reaches the position of the processing means;
Program to make it function.
JP2011099455A 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM Expired - Fee Related JP5803243B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2011099455A JP5803243B2 (en) 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
CN201210080644.7A CN102756568B (en) 2011-04-27 2012-03-23 A recording device and a control method of the recording device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011099455A JP5803243B2 (en) 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Publications (3)

Publication Number Publication Date
JP2012228839A true JP2012228839A (en) 2012-11-22
JP2012228839A5 JP2012228839A5 (en) 2014-05-29
JP5803243B2 JP5803243B2 (en) 2015-11-04

Family

ID=47051315

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011099455A Expired - Fee Related JP5803243B2 (en) 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Country Status (2)

Country Link
JP (1) JP5803243B2 (en)
CN (1) CN102756568B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10210436B2 (en) 2016-05-31 2019-02-19 Oki Data Corporation Printing apparatus and printing control device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103213410B (en) * 2013-04-22 2016-10-05 山东新北洋信息技术股份有限公司 Check paper cutting control device and drawing machine
CN105740816B (en) * 2016-01-29 2019-06-11 山东东港彩意网络科技有限公司 It is the device and method made out an invoice by scraping award region recognition
CN105513195B (en) * 2016-01-29 2018-11-30 山东东港彩意网络科技有限公司 It is the device and method made out an invoice by scraping award region recognition
KR101884997B1 (en) * 2016-10-20 2018-08-03 주식회사 빅솔론 Method for controlling printer and the printer therefore
CN107584902A (en) * 2017-10-10 2018-01-16 北京鼎致远科技发展有限公司 A kind of method for determining printing cut paper region using single black mark
CN107825877A (en) * 2017-10-10 2018-03-23 北京鼎致远科技发展有限公司 A kind of method for determining printing cut paper region using multiple black marks

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0781801A (en) * 1993-09-10 1995-03-28 Hitachi Ltd Paper sheet carrying device
JP2004338322A (en) * 2003-05-19 2004-12-02 Noritsu Koki Co Ltd Printing processor

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2815961B2 (en) * 1990-02-26 1998-10-27 キヤノン株式会社 Recording device
CN1245312C (en) * 2003-02-21 2006-03-15 王工一 Automatic color code tracking system of packaging machine
JP4802559B2 (en) * 2005-06-08 2011-10-26 コニカミノルタホールディングス株式会社 Image recording device
JP4627085B2 (en) * 2005-07-27 2011-02-09 三菱電機株式会社 Printing apparatus and printing method
CN101722743B (en) * 2008-10-30 2011-11-09 山东新北洋信息技术股份有限公司 Paper cutting control device for bill paper and drawing machine thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0781801A (en) * 1993-09-10 1995-03-28 Hitachi Ltd Paper sheet carrying device
JP2004338322A (en) * 2003-05-19 2004-12-02 Noritsu Koki Co Ltd Printing processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10210436B2 (en) 2016-05-31 2019-02-19 Oki Data Corporation Printing apparatus and printing control device

Also Published As

Publication number Publication date
CN102756568A (en) 2012-10-31
CN102756568B (en) 2015-04-29
JP5803243B2 (en) 2015-11-04

Similar Documents

Publication Publication Date Title
JP5803243B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
US8029083B2 (en) Recording medium detection method and label printer
US8469477B2 (en) Recording device, recording device control method, and computer-readable recording medium that stores a program executed by a control unit that controls the recording device
US20060279624A1 (en) Printer, printing control method for a printer and computer program for a printer
CN108068478B (en) Printing apparatus and control method of printing apparatus
JP4396662B2 (en) Printer, print control method, and program
JP2013000968A (en) Recording apparatus, control method for recording apparatus and program
JP4604352B2 (en) Printer, control method therefor, and information recording medium
TWI486262B (en) A recording device, a recording medium, and a recording device
JP4415362B2 (en) Printing apparatus, control method, and information recording medium
JP4534467B2 (en) Printing method
JP4981545B2 (en) Printer
JP5691335B2 (en) Medium processing apparatus, method for controlling medium processing apparatus, and program
JP2014104606A (en) Printer control method and printer system
JP6221423B2 (en) Printing apparatus and printing apparatus control method
WO2023085252A1 (en) Verification system and verification method
JP5949969B2 (en) Medium processing apparatus, method for controlling medium processing apparatus, and program
JP2011073184A (en) Method of controlling conveyance of recording paper of printer, and printer
JP2011088373A (en) Recorder, control method for the same and program
JP2017035857A (en) Printer and control method for the same
WO2006109523A1 (en) Printer
JP6202169B2 (en) Tape printer and tape cartridge
JP5924126B2 (en) Medium processing apparatus and POS system
JP2013158952A (en) Recording device, method for controlling recording device, and program
JP2019081274A (en) Printer and control method for printer

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140409

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140409

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150108

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150120

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150306

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150804

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150817

R150 Certificate of patent or registration of utility model

Ref document number: 5803243

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees