JP2013091214A - Printer and printing method - Google Patents

Printer and printing method Download PDF

Info

Publication number
JP2013091214A
JP2013091214A JP2011234052A JP2011234052A JP2013091214A JP 2013091214 A JP2013091214 A JP 2013091214A JP 2011234052 A JP2011234052 A JP 2011234052A JP 2011234052 A JP2011234052 A JP 2011234052A JP 2013091214 A JP2013091214 A JP 2013091214A
Authority
JP
Japan
Prior art keywords
printing
data
print
unit
data amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2011234052A
Other languages
Japanese (ja)
Inventor
Mitsuhiro Ueda
光浩 上田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2011234052A priority Critical patent/JP2013091214A/en
Publication of JP2013091214A publication Critical patent/JP2013091214A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a printer and a printing method capable of performing printing in the course of receiving print data from an external apparatus connected to any of a plurality of kinds of communication interfaces while suppressing throughput degradation of printing.SOLUTION: In this printer, the print data received from the external apparatus by using any of the plurality of kinds of communication interfaces are sequentially accumulated and stored. Based on the stored print data, printing is performed with respect to each print line while conveying a sheet. Based on the communication interfaces used for receiving the print data, a start line k is specified (S81-S91). When conveyance of the sheet and printing are stopped, the conveyance of the sheet and printing are started (S95) if the number of received lines s is larger than the start line k (S93:YES).

Description

本発明は、外部機器から受信した印刷データに基づいて印刷を行う印刷装置および印刷方法に関する。   The present invention relates to a printing apparatus and a printing method for performing printing based on print data received from an external device.

パソコン等の外部機器と接続可能な複数種類の通信インタフェイスを備えて、各通信インタフェイスに接続された外部機器から受信した印刷データに従って逐次印刷を行う印刷装置が知られている(例えば、特許文献1)。逐次印刷とは、外部機器からの印刷データを受信しながら、受信したデータに基づき印刷媒体に順次印刷を行う印刷態様である。   2. Description of the Related Art A printing apparatus that includes a plurality of types of communication interfaces that can be connected to an external device such as a personal computer and performs sequential printing according to print data received from an external device connected to each communication interface is known (for example, a patent) Reference 1). Sequential printing is a printing mode in which print data is sequentially printed on a print medium based on received data while receiving print data from an external device.

特許文献1に記載の印刷装置には、蓄積データ量が必要量未満になると印刷を一旦停止し、その後のデータ受信によって蓄積データ量が必要量以上になると、印刷を再開することが開示されている。また、蓄積データ量が必要量未満になると印刷速度を低速度に変更し、その後のデータ受信によって蓄積データ量が必要量以上になると、印刷速度を標準速度に変更することが開示されている。   The printing apparatus described in Patent Document 1 discloses that printing is temporarily stopped when the amount of accumulated data becomes less than the necessary amount, and printing is resumed when the amount of accumulated data exceeds the necessary amount due to subsequent data reception. Yes. Further, it is disclosed that the printing speed is changed to a low speed when the accumulated data amount becomes less than the necessary amount, and the printing speed is changed to the standard speed when the accumulated data amount exceeds the necessary amount due to subsequent data reception.

特開2009−73131号公報JP 2009-73131 A

しかしながら、逐次印刷の実行中に蓄積データ量に応じて印刷を一旦停止する場合、印刷再開時に繋ぎ印刷を行って、印刷停止直前に印刷した部分を印刷しなおす必要がある。繋ぎ印刷では、一度印刷された部分に再度印刷を行うために、印刷媒体を通常の搬送方向とは反対方向に一旦戻し、再度、通常の方向に搬送する。このとき、印刷が重なる部分が僅かにずれて、印刷品質が低下する可能性がある。   However, when the printing is temporarily stopped according to the accumulated data amount during the execution of the sequential printing, it is necessary to perform the continuous printing when the printing is resumed and to reprint the printed portion immediately before the printing is stopped. In splicing printing, the printing medium is once returned to the direction opposite to the normal transport direction and transported in the normal direction again in order to perform printing again on the portion that has been printed once. At this time, there is a possibility that a portion where printing overlaps slightly shifts and print quality is deteriorated.

また、逐次印刷の実行中に蓄積データ量に応じて印刷速度を変更する場合、逐次印刷の制御が複雑となり、印刷装置の処理負担が大きくなる可能性がある。このように、逐次印刷の実行時における印刷の一時停止や処理負担の増加は、印刷のスループットを低下させる原因となりえる。   Further, when the printing speed is changed according to the accumulated data amount during the execution of the sequential printing, the control of the sequential printing becomes complicated, and the processing load of the printing apparatus may be increased. As described above, the temporary suspension of printing or the increase in processing load during the execution of sequential printing can cause a decrease in printing throughput.

本発明は、印刷のスループット低下を抑制しつつ、複数種類の通信インタフェイスのいずれかに接続された外部機器から印刷データを受信しながら印刷を実行可能な印刷装置および印刷方法を提供することを目的とする。   The present invention provides a printing apparatus and a printing method capable of executing printing while receiving print data from an external device connected to any of a plurality of types of communication interfaces while suppressing a decrease in printing throughput. Objective.

本発明の第一態様に係る印刷装置は、外部機器に接続可能であり、接続された前記外部機器に対してデータ送受信を行う、複数種類の通信インタフェイスを備えた印刷装置であって、前記複数種類の通信インタフェイスのいずれかを使用して前記外部機器から受信した印刷データを順次蓄積して記憶するデータ記憶手段と、印刷媒体を搬送する搬送手段と、前記データ記憶手段に記憶された前記印刷データに基づいて、前記搬送手段によって搬送される前記印刷媒体に、前記印刷媒体が搬送される方向に直交する方向に延びる印刷ライン毎に印刷を行う印刷手段と、前記印刷データの受信に使用される前記通信インタフェイスに基づいて、印刷の開始条件を示す前記印刷データのデータ量である必要データ量を特定するデータ量特定手段と、前記搬送手段の搬送および前記印刷手段の印刷が停止されている場合に、前記データ記憶手段に記憶されている前記印刷データのデータ量が、前記データ量特定手段によって特定された前記必要データ量以上であるか否かを判定する第一判定手段と、前記第一判定手段によって前記印刷データのデータ量が前記必要データ量以上であると判定された場合、前記搬送手段に前記印刷媒体の搬送を開始させ、且つ、前記データ記憶手段に記憶されている前記印刷データに基づく印刷を、前記印刷手段に開始させる印刷開始手段とを備える。   The printing apparatus according to the first aspect of the present invention is a printing apparatus provided with a plurality of types of communication interfaces that can be connected to an external device and performs data transmission / reception with respect to the connected external device. Data storage means for sequentially accumulating and storing print data received from the external device using any of a plurality of types of communication interfaces, transport means for transporting a print medium, and stored in the data storage means A printing unit that performs printing on the printing medium conveyed by the conveying unit for each printing line extending in a direction orthogonal to the direction in which the printing medium is conveyed based on the printing data; and for receiving the printing data A data amount specifying means for specifying a necessary data amount, which is a data amount of the print data indicating a printing start condition, based on the communication interface used; When the conveyance of the recording means and the printing of the printing means are stopped, the data amount of the print data stored in the data storage means is greater than the necessary data amount specified by the data amount specifying means A first determination unit that determines whether or not the print data is greater than the necessary data amount by the first determination unit; Printing start means for starting the printing means and starting printing based on the print data stored in the data storage means.

本発明の第二態様に係る印刷方法は、外部機器に接続可能であり、接続された前記外部機器に対してデータ送受信を行う複数種類の通信インタフェイスと、前記複数種類の通信インタフェイスのいずれかを使用して前記外部機器から受信した印刷データを順次蓄積して記憶するデータ記憶手段と、印刷媒体を搬送する搬送手段と、前記データ記憶手段に記憶された前記印刷データに基づいて、前記搬送手段によって搬送される前記印刷媒体に、前記印刷媒体が搬送される方向に直交する方向に延びる印刷ライン毎に印刷を行う印刷手段とを備えた印刷装置で実行される印刷方法であって、前記印刷データの受信に使用される前記通信インタフェイスに基づいて、印刷の開始条件を示す前記印刷データのデータ量である必要データ量を特定するデータ量特定ステップと、前記搬送手段の搬送および前記印刷手段の印刷が停止されている場合に、前記データ記憶手段に記憶されている前記印刷データのデータ量が、前記データ量特定ステップによって特定された前記必要データ量以上であるか否かを判定する判定ステップと、前記判定ステップによって前記印刷データのデータ量が前記必要データ量以上であると判定された場合、前記搬送手段に前記印刷媒体の搬送を開始させ、且つ、前記データ記憶手段に記憶されている前記印刷データに基づく印刷を、前記印刷手段に開始させる印刷開始ステップとを備える。   The printing method according to the second aspect of the present invention is connectable to an external device, and includes any of a plurality of types of communication interfaces that perform data transmission / reception with respect to the connected external device, and the plurality of types of communication interfaces. Based on the print data stored in the data storage means, data storage means for sequentially storing and storing print data received from the external device using A printing method that is executed by a printing apparatus that includes a printing unit that performs printing on each printing line that extends in a direction orthogonal to a direction in which the printing medium is conveyed on the printing medium that is conveyed by a conveying unit, Based on the communication interface used for receiving the print data, a necessary data amount that is a data amount of the print data indicating a print start condition is specified. Data amount specifying step, and when the transport of the transport unit and the printing of the printing unit are stopped, the data amount of the print data stored in the data storage unit is specified by the data amount specifying step. A determination step for determining whether or not the data amount is greater than the required data amount, and when the determination step determines that the data amount of the print data is greater than or equal to the necessary data amount, And a printing start step for causing the printing unit to start printing based on the print data stored in the data storage unit.

上記第一、第二態様によれば、複数種類の通信インタフェイスのいずれかを使用して外部機器から受信した印刷データが、順次蓄積して記憶される。記憶された印刷データに基づいて、印刷媒体を搬送しながら印刷ライン毎に印刷が実行される。印刷データの受信に使用される通信インタフェイスに基づいて、必要データ量が特定される。印刷媒体の搬送および印刷が停止されている場合、記憶されている印刷データのデータ量が特定された必要データ量以上であれば、印刷媒体の搬送および印刷が開始される。   According to the first and second aspects, print data received from an external device using one of a plurality of types of communication interfaces is sequentially accumulated and stored. Based on the stored print data, printing is executed for each print line while conveying the print medium. The required data amount is specified based on the communication interface used for receiving the print data. When the conveyance and printing of the print medium are stopped, the conveyance and printing of the print medium are started if the data amount of the stored print data is greater than the specified necessary data amount.

これにより、印刷データが印刷の開始条件を満たすデータ量以上記憶された場合に、印刷媒体の搬送および印刷が開始される。現在の印刷データに基づく印刷の実行中に、次の印刷データの受信が完了する可能性が高まる。ひいては、次の印刷データに基づく印刷の開始時に、次の印刷データの受信が未完了であることに起因する印刷の一時停止が発生しにくい。したがって、印刷のスループット低下を抑制しつつ、複数の通信インタフェイスのいずれかに接続された外部機器から印刷データを受信しながら印刷を実行することができる。   As a result, when the print data is stored in an amount greater than or equal to the amount of data that satisfies the print start condition, the conveyance and printing of the print medium are started. While printing based on the current print data is being executed, the possibility that reception of the next print data is completed is increased. As a result, at the start of printing based on the next print data, it is difficult to cause a temporary stop of printing due to incomplete reception of the next print data. Therefore, it is possible to execute printing while receiving print data from an external device connected to any of a plurality of communication interfaces while suppressing a decrease in printing throughput.

カバー5が開位置にある印刷装置1の斜視図である。2 is a perspective view of the printing apparatus 1 with a cover 5 in an open position. FIG. 印刷装置1の縦断面図である。2 is a longitudinal sectional view of the printing apparatus 1. FIG. 印刷装置1の電気的構成を示すブロック図である。FIG. 2 is a block diagram illustrating an electrical configuration of the printing apparatus 1. メイン処理のフローチャートである。It is a flowchart of a main process. 初期化処理のフローチャートである。It is a flowchart of an initialization process. 通信処理のフローチャートである。It is a flowchart of a communication process. コマンド処理のフローチャートである。It is a flowchart of command processing. 印刷開始判定処理のフローチャートである。It is a flowchart of a printing start determination process. 印刷処理のフローチャートである。It is a flowchart of a printing process. 印刷装置1における印刷態様を説明するための図である。3 is a diagram for explaining a printing mode in the printing apparatus 1. FIG. 印刷条件テーブル220の具体例を示す図である。5 is a diagram illustrating a specific example of a printing condition table 220. FIG. 変形例に係る印刷開始判定処理のフローチャートである。It is a flowchart of the printing start determination process which concerns on a modification.

以下、本発明を具現化した一実施形態について、図面を参照して説明する。   Hereinafter, an embodiment embodying the present invention will be described with reference to the drawings.

図1および図2を参照して、本実施形態に係る印刷装置1の概略構成について説明する。以下の説明では、図1の右上側、左下側、右下側、左下側、上側、下側を、それぞれ印刷装置1の後側、前側、右側、左側、上側、下側とする。なお、図2は、カバー5が閉じられた状態にある印刷装置1の縦断面図を示している。   A schematic configuration of the printing apparatus 1 according to the present embodiment will be described with reference to FIGS. 1 and 2. In the following description, the upper right side, lower left side, lower right side, lower left side, upper side, and lower side in FIG. 1 are defined as the rear side, front side, right side, left side, upper side, and lower side of the printing apparatus 1, respectively. 2 shows a longitudinal sectional view of the printing apparatus 1 in a state where the cover 5 is closed.

印刷装置1は、長尺状のロールシート(以下、単にシートという)3に種々のキャラクタ(文字、数字、記号、および図形等)を印刷する装置である。印刷装置1は、カバー5の上面が弧状に丸みをおびた形状を有する。印刷装置1は、印刷装置1の本体をなす筐体2と、筐体2後部に回動可能に軸支され、筐体2の上面の一部を被覆可能なカバー5を備えている。筐体2の前面には、ユーザが印刷後のシート3を切断するためのカットレバー9が設けられている。   The printing apparatus 1 is an apparatus that prints various characters (characters, numbers, symbols, figures, and the like) on a long roll sheet (hereinafter simply referred to as a sheet) 3. The printing apparatus 1 has a shape in which the upper surface of the cover 5 is rounded in an arc shape. The printing apparatus 1 includes a casing 2 that forms a main body of the printing apparatus 1, and a cover 5 that is pivotally supported by a rear portion of the casing 2 so as to cover a part of the upper surface of the casing 2. On the front surface of the housing 2, a cut lever 9 is provided for the user to cut the printed sheet 3.

筐体2の前端部の上面には、電源ボタン等の種々の入力ボタンを含む操作部7が設けられている。操作部7の後側には、板状のトレー6が立設されている。トレー6の後側には、カバー5が閉じられると、カバー5の前端部と筐体2とによって左右方向に長い排出口21(図2参照)が形成される。トレー6は、排出口21から排出される印刷後のシート3を受ける。   An operation unit 7 including various input buttons such as a power button is provided on the upper surface of the front end portion of the housing 2. A plate-like tray 6 is erected on the rear side of the operation unit 7. When the cover 5 is closed on the rear side of the tray 6, a discharge port 21 (see FIG. 2) that is long in the left-right direction is formed by the front end portion of the cover 5 and the housing 2. The tray 6 receives the printed sheet 3 discharged from the discharge port 21.

筐体2の背面部には、電源コード10(図2参照)が接続されるコネクタが備えられている。筐体2の側面部には、無線通信を行うためのアンテナ15が備えられている。図示はしないが、筐体2の背面部には、USB(Universal Serial Bus)ケーブルが接続されるUSBコネクタも設けられている。本実施形態のアンテナ15は、Wi−Fi(登録商標)に準拠した無線LAN通信と、Bluetooth(登録商標)による近距離無線通信とに共用可能である。   A connector to which a power cord 10 (see FIG. 2) is connected is provided on the back surface of the housing 2. An antenna 15 for performing wireless communication is provided on the side surface of the housing 2. Although not shown, a USB connector to which a USB (Universal Serial Bus) cable is connected is also provided on the back surface of the housing 2. The antenna 15 of the present embodiment can be used for both wireless LAN communication based on Wi-Fi (registered trademark) and short-range wireless communication based on Bluetooth (registered trademark).

印刷装置1は、パーソナルコンピュータ(PC)等の外部機器との間で、アンテナ15を介して無線(Wi−Fi(登録商標)またはBluetooth(登録商標))でデータ通信を実行可能である。また、印刷装置1は、外部機器との間で、USBコネクタを介して有線でデータ通信を実行可能である。つまり、本実施形態の印刷装置1は、外部機器に接続するための通信インタフェイスを、複数種類備えている。   The printing apparatus 1 can execute data communication with an external device such as a personal computer (PC) wirelessly (Wi-Fi (registered trademark) or Bluetooth (registered trademark)) via an antenna 15. Further, the printing apparatus 1 can execute data communication with an external device through a USB connector in a wired manner. That is, the printing apparatus 1 of the present embodiment includes a plurality of types of communication interfaces for connecting to external devices.

筐体2内部の後部には、シート収納部4が設けられている。シート収納部4には、シート3が収納される。カバー5が閉じられると、プラテンローラ26と搬送ローラ28とが、シート3をサーマルヘッド31に向けて押圧して、印刷装置1は印刷可能な状態になる。プラテンローラ26および搬送ローラ28は、サーマルヘッド31との間にシート3を挟んで同一の方向に回転することで、シート3をシート収納部4から排出口21に向けて搬送する。   A sheet storage unit 4 is provided at the rear of the housing 2. The sheet storage unit 4 stores the sheet 3. When the cover 5 is closed, the platen roller 26 and the conveying roller 28 press the sheet 3 toward the thermal head 31, and the printing apparatus 1 is ready for printing. The platen roller 26 and the conveyance roller 28 convey the sheet 3 from the sheet storage unit 4 toward the discharge port 21 by rotating in the same direction with the sheet 3 interposed between the platen roller 26 and the conveyance roller 28.

このとき、サーマルヘッド31は、シート3の搬送方向に直交する方向に配列された一列の発熱素子に対応する1ライン毎に(つまり、搬送方向と直交する方向に延びる印刷ライン毎に)、搬送されるシート3に印刷を行う。プラテンローラ26と排出口21との間には、固定刃および可動刃を有するカッターユニット8が設けられている。ユーザがカットレバー9を左右方向に移動させると、固定刃と可動刃との間でシート3が挟まれて切断される。   At this time, the thermal head 31 is transported for each line corresponding to a row of heating elements arranged in a direction orthogonal to the transport direction of the sheet 3 (that is, for each print line extending in a direction orthogonal to the transport direction). The sheet 3 to be printed is printed. A cutter unit 8 having a fixed blade and a movable blade is provided between the platen roller 26 and the discharge port 21. When the user moves the cut lever 9 in the left-right direction, the sheet 3 is sandwiched and cut between the fixed blade and the movable blade.

図3を参照して、印刷装置1の電気的構成について説明する。図3に示すように、印刷装置1は、相互にバスで接続された、CPU201、ROM202、RAM203、およびフラッシュROM204を備えている。CPU201は、印刷装置1全体の制御を司る。ROM202には、後述する印刷処理用のプログラム等、印刷装置1の制御に必要な各種のプログラムと、これらのプログラムに必要な制御データ等が記憶されている。CPU201は、ROM202に記憶されたプログラムに従って、各種の演算、制御処理を行う。さらに、ROM202には、多数のキャラクタフォントが記憶されている。フラッシュROM204は、不揮発性メモリであり、各種の情報が記憶される。   The electrical configuration of the printing apparatus 1 will be described with reference to FIG. As shown in FIG. 3, the printing apparatus 1 includes a CPU 201, a ROM 202, a RAM 203, and a flash ROM 204 that are connected to each other via a bus. The CPU 201 controls the entire printing apparatus 1. The ROM 202 stores various programs necessary for controlling the printing apparatus 1, such as a program for printing processing described later, and control data necessary for these programs. The CPU 201 performs various calculations and control processes in accordance with programs stored in the ROM 202. Furthermore, the ROM 202 stores a large number of character fonts. The flash ROM 204 is a non-volatile memory and stores various information.

RAM203には、CPU201による各種の演算結果等が一時的に記憶される。図示はしないが、RAM203には、通信バッファ、印刷バッファ、印刷設定記憶エリア、ワークエリア等の記憶領域が設けられる。通信バッファは、外部機器から受信したデータが順次蓄積して一時記憶される領域である。印刷バッファは、印刷対象の印刷データに基づく印刷用ドットパターンデータ(以下、単にドットデータという)が記憶される記憶領域である。ドットデータは、外部機器から受信された印刷データとROM202に記憶されたフォントに基づいて、印刷バッファに展開される。印刷設定記憶エリアは、印刷データの印刷サイズや印刷品質などが設定される記憶領域である。さらに、後述の処理中ページp、ページ開始位置q、ページ終了位置r、受信ライン数s、印刷位置i、処理許可フラグ、ジョブ受信完了フラグ、印刷状態フラグ、開始ラインkも、RAM203に記憶されている。   The RAM 203 temporarily stores various calculation results by the CPU 201. Although not shown, the RAM 203 is provided with storage areas such as a communication buffer, a print buffer, a print setting storage area, and a work area. The communication buffer is an area where data received from an external device is sequentially accumulated and temporarily stored. The print buffer is a storage area for storing printing dot pattern data (hereinafter simply referred to as dot data) based on print data to be printed. The dot data is developed in the print buffer based on the print data received from the external device and the font stored in the ROM 202. The print setting storage area is a storage area in which the print size and print quality of the print data are set. Further, a page p, a page start position q, a page end position r, a received line number s, a print position i, a process permission flag, a job reception completion flag, a print status flag, and a start line k, which will be described later, are also stored in the RAM 203. ing.

CPU201には入出力インタフェイス205が接続されている。入出力インタフェイス205には、操作部7、駆動回路206および207、Wi−Fi(登録商標)インタフェイス(I/F)210、Bluetooth(登録商標)インタフェイス(I/F)211、並びにUSBインタフェイス(I/F)212が接続されている。駆動回路206には、シート3への印刷を行うサーマルヘッド31(より詳細には、発熱素子)が接続されている。駆動回路206は、CPU201からの制御信号に基づき、サーマルヘッド31の各発熱素子の通電の有無を制御することで、サーマルヘッド31全体の発熱態様を制御する。駆動回路207には、シート3を搬送するプラテンローラ26および搬送ローラ28(図2参照)を回転させるための搬送モータ209が接続されている。駆動回路20は、CPU201からの制御信号に基づいて搬送モータ209を駆動制御する。   An input / output interface 205 is connected to the CPU 201. The input / output interface 205 includes an operation unit 7, drive circuits 206 and 207, Wi-Fi (registered trademark) interface (I / F) 210, Bluetooth (registered trademark) interface (I / F) 211, and USB An interface (I / F) 212 is connected. A thermal head 31 (more specifically, a heating element) that performs printing on the sheet 3 is connected to the drive circuit 206. The drive circuit 206 controls the heat generation mode of the entire thermal head 31 by controlling whether or not each heating element of the thermal head 31 is energized based on a control signal from the CPU 201. The driving circuit 207 is connected to a platen roller 26 that conveys the sheet 3 and a conveyance motor 209 that rotates the conveyance roller 28 (see FIG. 2). The drive circuit 20 drives and controls the carry motor 209 based on a control signal from the CPU 201.

Wi−Fi(登録商標)I/F210およびBluetooth(登録商標)I/F211には、それぞれアンテナ15が各I/Fに対応して接続されている。USBI/F212には、USBコネクタ(図示略)が接続されている。Wi−Fi(登録商標)I/F210およびBluetooth(登録商標)I/F211は、それぞれアンテナ15を介して、無線通信で外部機器とデータ送受信を行う。USBI/F212は、USBコネクタ(図示略)を介して、有線通信で外部機器とデータ送受信を行う。CPU201は、Wi−Fi(登録商標)I/F210、Bluetooth(登録商標)I/F211、USBI/F212のいずれかを介して外部機器から受信した印刷データに従って、印刷を制御する。   An antenna 15 is connected to each of the Wi-Fi (registered trademark) I / F 210 and the Bluetooth (registered trademark) I / F 211 corresponding to each I / F. A USB connector (not shown) is connected to the USB I / F 212. Each of the Wi-Fi (registered trademark) I / F 210 and the Bluetooth (registered trademark) I / F 211 performs data transmission / reception with an external device via the antenna 15 by wireless communication. The USB I / F 212 transmits / receives data to / from an external device via wired communication via a USB connector (not shown). The CPU 201 controls printing according to print data received from an external device via any one of the Wi-Fi (registered trademark) I / F 210, the Bluetooth (registered trademark) I / F 211, and the USB I / F 212.

図4〜図9を参照して、本実施形態の印刷装置1で実行されるメイン処理について説明する。本実施形態のメイン処理では、外部機器から印刷ジョブを受信しながら、受信された印刷ジョブに基づいて、シート3に1ライン毎に順次印刷を行う所謂逐次印刷が行われる。メイン処理は、印刷装置1の電源が投入されると、ROM202に記憶されたプログラムに従って、CPU201によって実行される。   With reference to FIGS. 4 to 9, main processing executed by the printing apparatus 1 of the present embodiment will be described. In the main processing of this embodiment, so-called sequential printing is performed in which a print job is received from an external device, and printing is sequentially performed on the sheet 3 line by line based on the received print job. The main process is executed by the CPU 201 in accordance with a program stored in the ROM 202 when the printing apparatus 1 is powered on.

印刷ジョブは、印刷対象となる画像の実データである印刷データと、印刷ジョブのデータ構成に関するプロパティ情報と、印刷設定に関する設定情報とを含む。印刷データは、一単位の画像(以下、ページという。)を、一の連続したデータ列で示す。プロパティ情報は、印刷ジョブに含まれる印刷データの数量(ページ数)、各印刷データの終了を示すページ完了指示、印刷ジョブの終了を示すジョブ完了指示などを含む。設定情報は、各印刷データを印刷するのに必要な印刷ラインの数量(ページ長)、印刷データの印刷品質(解像度等)、印刷ラインの単位長さ(つまり、テープ幅)などを示す。印刷装置1は、印刷ジョブに含まれるこれらのデータを、コマンドとして処理する。なお、本実施形態の印刷データは、シート3にページ長「500」で1ページ分の画像を印刷して、1つのラベルを作成するためのデータであるものとする。   The print job includes print data that is actual data of an image to be printed, property information related to the data configuration of the print job, and setting information related to print settings. The print data represents one unit image (hereinafter referred to as a page) by one continuous data string. The property information includes the quantity (number of pages) of print data included in the print job, a page completion instruction indicating the end of each print data, a job completion instruction indicating the end of the print job, and the like. The setting information indicates the number of print lines (page length) necessary for printing each print data, the print quality (resolution, etc.) of the print data, the unit length of the print lines (that is, the tape width), and the like. The printing apparatus 1 processes these data included in the print job as commands. Note that the print data of this embodiment is data for creating one label by printing an image for one page with a page length of “500” on the sheet 3.

図4に示すように、印刷装置1のメイン処理では、まず印刷装置1を初期状態に戻す初期化処理が実行される(S1)。次いで、外部機器とデータ通信を行う通信処理(S3)、外部機器から受信したデータを解析するコマンド処理(S5)、シート3に印刷を実行する印刷処理(S7)が実行される。その後、印刷装置1が電源OFFされたか否かが判定される(S9)。電源OFFされなかった場合(S9:NO)、処理はステップS9に戻る。電源OFFされた場合(S9:YES)、メイン処理が終了される。メイン処理が終了すると、ステップS3、S5、S7で開始された各処理も終了する。   As shown in FIG. 4, in the main process of the printing apparatus 1, an initialization process for returning the printing apparatus 1 to an initial state is first executed (S1). Next, communication processing (S3) for performing data communication with the external device, command processing (S5) for analyzing data received from the external device, and printing processing (S7) for executing printing on the sheet 3 are executed. Thereafter, it is determined whether or not the printing apparatus 1 is powered off (S9). If the power is not turned off (S9: NO), the process returns to step S9. When the power is turned off (S9: YES), the main process is terminated. When the main process ends, the processes started in steps S3, S5, and S7 also end.

図5に示すように、初期化処理(S1)では、まず印刷装置1のハードウエア(例えば、サーマルヘッド31、搬送モータ209等の駆動パラメータ)が、従来と同様に初期化される(S21)。次いで、アンテナ15またはUSBコネクタを介して接続された外部機器との間で通信が開始される(S23)。つまり、先述した複数種類のインタフェイス(USB、Wi−Fi(登録商標)、Bluetooth(登録商標))のいずれかを使用して、外部機器とデータ通信が開始される。   As shown in FIG. 5, in the initialization process (S1), first, the hardware of the printing apparatus 1 (for example, the drive parameters of the thermal head 31, the transport motor 209, etc.) is initialized as in the conventional case (S21). . Next, communication is started with the external device connected via the antenna 15 or the USB connector (S23). That is, data communication with an external device is started using any of the plurality of types of interfaces (USB, Wi-Fi (registered trademark), Bluetooth (registered trademark)) described above.

さらに、RAM203に記憶されている各種情報が初期化される(S25)。具体的には、RAM203に記憶されている処理中ページp、ページ開始位置q、ページ終了位置r、受信ライン数s、印刷位置i、処理許可フラグ、ジョブ受信完了フラグ、印刷状態フラグ、開始ラインkなどが初期化される。その後、初期化処理(S1)が終了される。   Further, various information stored in the RAM 203 is initialized (S25). Specifically, the page p being processed, the page start position q, the page end position r, the received line number s, the print position i, the process permission flag, the job reception completion flag, the print status flag, and the start line stored in the RAM 203 k and the like are initialized. Thereafter, the initialization process (S1) is terminated.

処理中ページpは、処理中の印刷データ(つまり、処理中ページ)を昇順(1、2、3・・・)で示す。ページ開始位置qは、処理中ページpの印刷が開始される印刷ラインの位置を、印刷ジョブに基づく印刷開始から起算した印刷ライン数で示す。ページ終了位置rは、処理中ページpの印刷が終了される印刷ラインの位置を、印刷ジョブに基づく印刷開始から起算した印刷ライン数で示す。受信ライン数sは、現在までに受信済みの印刷ラインのデータ量を、そのデータ量を印刷するのに必要な印刷ライン数で示す。印刷位置iは、現在の印刷ラインの位置を、印刷ジョブに基づく印刷開始から起算した印刷ライン数で示す。ステップS25では、受信ライン数sが「0」に設定され、処理中ページp、ページ開始位置q、印刷位置iが「1」に設定され、ページ終了位置rは「未設定」とされる。   The page p being processed indicates the print data being processed (that is, the page being processed) in ascending order (1, 2, 3,...). The page start position q indicates the position of the print line at which printing of the page p being processed is started by the number of print lines calculated from the start of printing based on the print job. The page end position r indicates the position of the print line where the printing of the page in process p is ended by the number of print lines calculated from the start of printing based on the print job. The reception line number s indicates the data amount of a print line that has been received so far, as the number of print lines necessary to print the data amount. The print position i indicates the current print line position by the number of print lines calculated from the start of printing based on the print job. In step S25, the number of received lines s is set to “0”, the page p being processed, the page start position q, the print position i are set to “1”, and the page end position r is set to “not set”.

処理許可フラグは、通信バッファ(図示外)に記憶されているデータ(コマンド)を処理するか否かを示すフラグである。ジョブ受信完了フラグは、印刷ジョブの受信が完了したか否かを示すフラグである。印刷状態フラグは、印刷装置1が印刷を実行中であるか否かを示すフラグである。開始ラインkは、印刷の開始条件となる印刷データのデータ量(必要データ量)を示す値であり、詳細には印刷が開始される受信ライン数(必要ライン数)を示す。ステップS25では、処理許可フラグが「ON」に設定され、ジョブ受信完了フラグが「OFF」に設定され、印刷状態フラグが「OFF」に設定され、開始ラインkが「無制限」に設定される。   The process permission flag is a flag indicating whether or not to process data (command) stored in the communication buffer (not shown). The job reception completion flag is a flag indicating whether or not reception of the print job is completed. The printing status flag is a flag indicating whether or not the printing apparatus 1 is executing printing. The start line k is a value indicating the data amount (required data amount) of print data that is a print start condition, and more specifically indicates the number of received lines (required line number) at which printing is started. In step S25, the processing permission flag is set to “ON”, the job reception completion flag is set to “OFF”, the printing status flag is set to “OFF”, and the start line k is set to “unlimited”.

図6に示すように、通信処理(S3)では、まず外部機器からデータを受信したか否かが判定される(S31)。外部機器からデータを受信した場合(S31:YES)、受信したデータが通信バッファに書き込まれる(S33)。外部機器から受信した印刷ジョブも、ステップS33で通信バッファに書き込まれる。ステップ33の実行後、または外部機器からデータを受信しなった場合(S31:NO)、処理はステップS31に戻る。   As shown in FIG. 6, in the communication process (S3), it is first determined whether or not data is received from an external device (S31). When data is received from an external device (S31: YES), the received data is written to the communication buffer (S33). The print job received from the external device is also written in the communication buffer in step S33. After step 33 or when data is not received from the external device (S31: NO), the process returns to step S31.

図7に示すように、コマンド処理(S5)では、まず処理許可フラグが「ON」であるか否かが判定される(S41)。処理許可フラグが「ON」である場合(S41:YES)、通信バッファに記憶されているデータが、コマンドとして読み出される(S43)。   As shown in FIG. 7, in the command processing (S5), it is first determined whether or not the processing permission flag is “ON” (S41). When the processing permission flag is “ON” (S41: YES), the data stored in the communication buffer is read as a command (S43).

ステップS43で読み出されたデータが、印刷ジョブに含まれる印刷データであるか否かが判定される(S45)。印刷データである場合(S45:YES)、そのドットデータが印刷バッファに書き込まれる(S47)。さらに、受信ライン数sが「1」加算される(S49)。   It is determined whether the data read in step S43 is print data included in the print job (S45). If it is print data (S45: YES), the dot data is written to the print buffer (S47). Further, “1” is added to the number s of reception lines (S49).

印刷データでない場合(S45:NO)、ステップS43で読み出されたデータがページ完了指示であるか否かが判定される(S51)。ページ完了指示である場合(S51:YES)、ページ終了位置rに受信ライン数sが設定される(S53)。さらに、処理中ページpが「1」加算され(S55)、受信ライン数sに「1」加算した値がページ開始位置qに設定される(S57)。   If it is not print data (S45: NO), it is determined whether or not the data read in step S43 is a page completion instruction (S51). If it is a page completion instruction (S51: YES), the number of received lines s is set at the page end position r (S53). Furthermore, “1” is added to the page p being processed (S55), and a value obtained by adding “1” to the number of received lines s is set as the page start position q (S57).

ページ完了指示でない場合(S51:NO)、ステップS43で読み出されたデータがジョブ完了指示であるか否かが判定される(S59)。ジョブ完了指示である場合(S59:YES)、ステップS53と同様に、ページ終了位置rに受信ライン数sが設定される(S61)。さらに、ジョブ受信完了フラグが「ON」に設定され(S63)、処理許可フラグが「OFF」に設定される(S65)。   If it is not a page completion instruction (S51: NO), it is determined whether or not the data read in step S43 is a job completion instruction (S59). If the instruction is a job completion instruction (S59: YES), the number of received lines s is set at the page end position r as in step S53 (S61). Further, the job reception completion flag is set to “ON” (S63), and the processing permission flag is set to “OFF” (S65).

ジョブ完了指示でない場合(S59:NO)、ステップS43で読み出されたデータが設定情報であるか否かが判定される(S67)。設定情報である場合(S67:YES)、その設定情報に含まれるページ長、印刷品質、テープ幅などが、印刷設定記憶エリアに書き込まれる(S69)。なお、設定情報でない場合(S67:NO)、ステップS43で読み出されたデータに応じて、その他の処理が実行される(S71)。例えば、初期化コマンドが読み出された場合、先述と同様の初期化処理(図5参照)が実行される。不適正なデータが読み出された場合、読み出されたデータが破棄される。   If it is not a job completion instruction (S59: NO), it is determined whether or not the data read in step S43 is setting information (S67). If it is setting information (S67: YES), the page length, print quality, tape width, etc. included in the setting information are written in the print setting storage area (S69). If it is not setting information (S67: NO), other processing is executed according to the data read in step S43 (S71). For example, when an initialization command is read, the same initialization process (see FIG. 5) as described above is executed. When inappropriate data is read, the read data is discarded.

ステップS49、S57、S65のいずれかの実行後、印刷状態フラグが「OFF」であるか否かが判定される(S73)。例えばメイン処理(図4)の実行直後では、搬送モータ209およびサーマルヘッド31の駆動が停止されているため、印刷状態フラグが「OFF」である(S73:YES)。この場合、印刷を開始するか否かを判定する印刷開始判定処理が、後述のように実行される(S75)。ステップS69、S71、S75のいずれかの実行後、処理はステップS41に戻る。また、処理許可フラグが「OFF」である場合や(S41:NO)、印刷状態フラグが「OFF」である場合も(S73:NO)、処理はステップS41に戻る。   After execution of any of steps S49, S57, and S65, it is determined whether or not the print status flag is “OFF” (S73). For example, immediately after the execution of the main process (FIG. 4), since the driving of the transport motor 209 and the thermal head 31 is stopped, the print state flag is “OFF” (S73: YES). In this case, a print start determination process for determining whether to start printing is executed as described later (S75). After execution of any of steps S69, S71, and S75, the process returns to step S41. In addition, when the process permission flag is “OFF” (S41: NO) or when the print status flag is “OFF” (S73: NO), the process returns to step S41.

図8に示すように、印刷開始判定処理(S75)では、まず先述の通信処理(図6)でデータ受信に使用されている通信インタフェイスの種類が特定される(S81)。ステップS81で特定された通信インタフェイスの種類が、USBであるか否かが判定される(S83)。USBI/F212からデータ受信がある場合、通信インタフェイスはUSBであると判定されて(S83:YES)、開始ラインkが「印刷位置i+100」に設定される(S85)。例えばメイン処理(図4)の実行直後では、印刷位置iは「1」であるため、開始ラインkは「101」に設定される。   As shown in FIG. 8, in the print start determination process (S75), first, the type of communication interface used for data reception in the above-described communication process (FIG. 6) is specified (S81). It is determined whether or not the type of communication interface specified in step S81 is USB (S83). If there is data reception from the USB I / F 212, it is determined that the communication interface is USB (S83: YES), and the start line k is set to “print position i + 100” (S85). For example, immediately after the execution of the main process (FIG. 4), since the print position i is “1”, the start line k is set to “101”.

USBでない場合、ステップS81で特定された通信インタフェイスの種類がWi−Fi(登録商標)であるか否かが判定される(S87)。Wi−Fi(登録商標)I/F210からデータ受信がある場合、通信インタフェイスはWi−Fi(登録商標)であると判定されて(S87:YES)、開始ラインkが「印刷位置i+300」に設定される(S89)。一方、Bluetooth(登録商標)I/F211からデータ受信がある場合、通信インタフェイスはBluetooth(登録商標)であると判定されて(S87:NO)、開始ラインkが「無制限」に設定される(S91)。開始ラインkに「無制限」が設定された場合、印刷データの全てを受信完了したことが印刷の開始条件となる。   If it is not USB, it is determined whether or not the type of communication interface specified in step S81 is Wi-Fi (registered trademark) (S87). If there is data reception from the Wi-Fi (registered trademark) I / F 210, it is determined that the communication interface is Wi-Fi (registered trademark) (S87: YES), and the start line k is set to “print position i + 300”. It is set (S89). On the other hand, when there is data reception from the Bluetooth (registered trademark) I / F 211, it is determined that the communication interface is Bluetooth (registered trademark) (S87: NO), and the start line k is set to "unlimited" ( S91). When “unlimited” is set in the start line k, the print start condition is that all the print data has been received.

つまり、上記ステップS81〜S91では、データ通信速度が速い通信インタフェイスであるほど、より小さい開始ラインkが設定される。開始ラインkが小さい場合、相対的に少ない受信ライン数分のデータ量を受信すれば、印刷が開始される。言い換えると、開始ラインkが大きくなるほど、より多量の受信ライン数分のデータ量を受信しなければ、印刷が開始されない。   That is, in steps S81 to S91, a smaller start line k is set as the communication interface has a higher data communication speed. When the start line k is small, printing is started when a data amount corresponding to the relatively small number of reception lines is received. In other words, as the start line k becomes larger, printing is not started unless a larger amount of data for the number of received lines is received.

ステップS85、S89、S91のいずれかの実行後、受信ライン数sが開始ラインk以上であるか否かが判定される(S93)。受信ライン数sが開始ラインk以上である場合(S93:YES)、印刷の開始条件となる必要データ量以上のデータを受信済みであるから、印刷状態フラグが「ON」に設定される(S95)。なお、開始ラインkが「無制限」である場合は、受信ライン数sは常に開始ラインk未満であると判定される(S93:NO)。   After execution of any of steps S85, S89, and S91, it is determined whether or not the number of received lines s is greater than or equal to the start line k (S93). If the number of received lines s is equal to or greater than the start line k (S93: YES), the print status flag is set to “ON” because data exceeding the necessary data amount that is the print start condition has been received (S95). ). When the start line k is “unlimited”, it is determined that the number of received lines s is always less than the start line k (S93: NO).

受信ライン数sが開始ラインk未満である場合(S93:NO)、ページ受信完了であるか否かが判定される(S97)。具体的には、先述のステップS51でページ完了指示を受信している場合(S51:YES)、ページ受信完了であると判定される(S97:YES)。この場合も、処理中ページの全体を既に受信済みであるから印刷の開始条件を満たし、印刷状態フラグが「ON」に設定される(S95)。一方、ページ受信完了でない場合(S97:NO)、受信済みの印刷データのデータ量が印刷の開始条件となる必要データ量を満たしていないから、印刷開始判定処理(図8)は終了される。ステップS95の実行後も、印刷開始判定処理(図8)は終了される。その後、処理はコマンド処理(図7)に戻る。   If the received line number s is less than the start line k (S93: NO), it is determined whether or not page reception is complete (S97). Specifically, if a page completion instruction has been received in step S51 described above (S51: YES), it is determined that page reception has been completed (S97: YES). Also in this case, since the entire page being processed has already been received, the print start condition is satisfied, and the print status flag is set to “ON” (S95). On the other hand, if the page reception is not complete (S97: NO), the print start determination process (FIG. 8) is terminated because the data amount of the received print data does not satisfy the necessary data amount that is the print start condition. Even after execution of step S95, the print start determination process (FIG. 8) is terminated. Thereafter, the process returns to the command process (FIG. 7).

図9に示すように、印刷処理(S7)では、まず印刷状態フラグが「ON」であるか否かが判定される(S101)。印刷状態フラグが「ON」である場合(S101:YES)、受信ライン数sが印刷位置i以上であるか否かが判定される(S103)。受信ライン数sが印刷位置i以上である場合(S103:YES)、搬送モータ209およびサーマルヘッド31が駆動されて、シート3が搬送されつつ印刷される(S105)。詳細には、印刷バッファ内のドットデータに基づいて、印刷位置iが示す印刷ラインが印刷される。そして、印刷位置iが「1」加算される(S107)。   As shown in FIG. 9, in the printing process (S7), it is first determined whether or not the printing status flag is “ON” (S101). If the print status flag is “ON” (S101: YES), it is determined whether or not the number of received lines s is equal to or greater than the print position i (S103). When the reception line number s is equal to or greater than the printing position i (S103: YES), the conveyance motor 209 and the thermal head 31 are driven, and the sheet 3 is printed while being conveyed (S105). Specifically, the print line indicated by the print position i is printed based on the dot data in the print buffer. Then, “1” is added to the printing position i (S107).

ステップS107の実行後、印刷位置iが、印刷設定記憶エリアに記憶されているページ長と処理中ページpとを乗じた値以上であるか否かが判定される(S109)。印刷位置iがページ長と処理中ページpとを乗じた値以上である場合(S109:YES)、処理中ページpの印刷が完了して、1つのラベルが作成されたことを意味する。この場合、さらに受信ライン数sが、ページ長と処理中ページpに「1」加算した値とを乗じた値以上であるか否かが判定される(S111)。   After execution of step S107, it is determined whether or not the print position i is equal to or greater than a value obtained by multiplying the page length stored in the print setting storage area by the page being processed p (S109). If the print position i is equal to or greater than the value obtained by multiplying the page length and the page being processed p (S109: YES), it means that the printing of the page p being processed is completed and one label is created. In this case, it is further determined whether or not the number of received lines s is equal to or greater than a value obtained by multiplying the page length by the value obtained by adding “1” to the page p being processed (S111).

受信ライン数sが、ページ長と処理中ページpに「1」加算した値とを乗じた値未満である場合(S111:NO)、次の印刷対象となる印刷データ(つまり、次ページの印刷データ)の受信が完了していない。この場合、搬送モータ209およびサーマルヘッド31の駆動が中断されて印刷が一時停止し(S113)、印刷状態フラグが「OFF」に設定される(S115)。その後、ジョブ受信完了フラグが「ON」であるか否かが判定される(S117)。ジョブ受信完了フラグが「ON」である場合(S117:YES)、受信が完了した印刷ジョブに基づく全ての印刷が完了しているため、処理許可フラグが「ON」に設定される(S119)。さらに、ステップS25と同様に情報初期化が実行されて(S121)、処理はステップS101に戻る。   When the number of received lines s is less than the value obtained by multiplying the page length by the value obtained by adding “1” to the page p being processed (S111: NO), the print data to be printed next (that is, printing the next page) Data) has not been received. In this case, the driving of the transport motor 209 and the thermal head 31 is interrupted, printing is temporarily stopped (S113), and the printing status flag is set to “OFF” (S115). Thereafter, it is determined whether or not the job reception completion flag is “ON” (S117). If the job reception completion flag is “ON” (S117: YES), the processing permission flag is set to “ON” because all printing based on the received print job has been completed (S119). Further, information initialization is executed as in step S25 (S121), and the process returns to step S101.

先述のコマンド処理(図7)では、印刷ジョブの受信が完了すると、処理許可フラグが「OFF」に設定される(S59:YES、S65)。この場合、印刷ジョブに基づく印刷が完了するまで、処理許可フラグが「OFF」であるため(S41:NO)、次回以降のコマンド処理(図7)では、ステップS43以降の処理が実行されず、ひいては次の印刷ジョブに関するコマンド処理が禁止される。一方、印刷処理(図9)では、印刷ジョブに基づく印刷が完了すると、処理許可フラグが「ON」に設定される(S117:YES、S119)。これにより、先述のコマンド処理(図7)では、ステップS43以降の処理が再開されて(S41:YES)、次の印刷ジョブに関するコマンド処理が実行される。   In the above-described command processing (FIG. 7), when reception of the print job is completed, the processing permission flag is set to “OFF” (S59: YES, S65). In this case, since the processing permission flag is “OFF” until the printing based on the print job is completed (S41: NO), in the next command processing (FIG. 7), the processing after step S43 is not executed. As a result, command processing relating to the next print job is prohibited. On the other hand, in the printing process (FIG. 9), when printing based on the print job is completed, the processing permission flag is set to “ON” (S117: YES, S119). Thereby, in the above-described command processing (FIG. 7), the processing after step S43 is resumed (S41: YES), and the command processing relating to the next print job is executed.

一方、印刷位置iがページ長と処理中ページpとを乗じた値未満である場合(S109:NO)、処理中ページpの印刷が完了していないため、搬送モータ209およびサーマルヘッド31の駆動が継続した状態で、処理はステップS101に戻る。これにより、処理中ページpの印刷が完了するまで、ライン単位の印刷が連続して実行される。   On the other hand, when the printing position i is less than the value obtained by multiplying the page length and the page being processed p (S109: NO), the printing of the page p being processed is not completed, and thus the transport motor 209 and the thermal head 31 are driven. The process returns to step S101. As a result, line-by-line printing is continuously performed until printing of the page in process p is completed.

また、受信ライン数sがページ長と処理中ページpに「1」加算した値を乗じた値以上である場合(S111:YES)、次ページの印刷データの受信が完了しているから、搬送モータ209およびサーマルヘッド31の駆動が継続した状態で、処理はステップS101に戻る。これにより、次ページの印刷データに基づく印刷が開始されて、次ページがライン単位で連続して印刷される。   If the received line number s is equal to or greater than the page length and the page p being processed multiplied by “1” (S111: YES), since the reception of the print data of the next page has been completed, The process returns to step S101 while the drive of the motor 209 and the thermal head 31 is continued. Thereby, printing based on the print data of the next page is started, and the next page is continuously printed line by line.

なお、受信ライン数sが印刷位置i未満である場合(S103:NO)、次に印刷すべき印刷ラインのデータが未受信である。よって、ステップS113、115と同様に、印刷が停止されて(S123)、印刷状態フラグが「OFF」に設定される(S125)。ステップS125の実行後、または、ジョブ受信完了フラグが「OFF」である場合(S117:NO)、搬送モータ209およびサーマルヘッド31の駆動が中断した状態で、処理はステップS101に戻る。   When the number of received lines s is less than the print position i (S103: NO), the data of the print line to be printed next has not been received. Therefore, as in steps S113 and S115, printing is stopped (S123), and the print status flag is set to “OFF” (S125). After execution of step S125, or when the job reception completion flag is “OFF” (S117: NO), the process returns to step S101 with the driving of the transport motor 209 and the thermal head 31 interrupted.

このように印刷ジョブに基づく印刷が一時停止された場合は、先述のコマンド処理(図7)で印刷状態フラグが「OFF」であると判定されて(S75:YES)、先述の印刷開始判定処理(図8)が実行される。これにより、先述と同様に、ステップS81で特定された通信インタフェイスに基づいて、開始ラインkが設定される(S81〜S91)。受信ライン数sが開始ラインk以上になると、印刷状態フラグの「ON」によって印刷動作が再開される(S93:YES、S95)。   When printing based on the print job is paused in this way, it is determined that the print status flag is “OFF” in the above-described command processing (FIG. 7) (S75: YES), and the above-described print start determination processing is performed. (FIG. 8) is executed. As a result, the start line k is set based on the communication interface specified in step S81 as described above (S81 to S91). When the number of received lines s becomes equal to or greater than the start line k, the printing operation is resumed by “ON” of the printing status flag (S93: YES, S95).

図10を参照して、上記のメイン処理(図4)に基づく印刷動作の一例を説明する。以下の説明では、ページ数「2」の印刷ジョブに、2つの印刷データ「ABCDE」、「FGHIJ」が含まれているものとする。印刷装置1では、外部機器からWi−Fi(登録商標)通信で受信した印刷ジョブに基づいて、ページ「ABCDE」、「FGHIJ」がページ長(印刷ライン数)「500」で印刷され、2つの固定長(例えば、10cm)のラベルが連続作成される場合を例示する。   With reference to FIG. 10, an example of the printing operation based on the main process (FIG. 4) will be described. In the following description, it is assumed that two print data “ABCDE” and “FGHIJ” are included in a print job with the number of pages “2”. In the printing apparatus 1, pages “ABCDE” and “FGHIJ” are printed with a page length (number of print lines) “500” based on a print job received from an external device via Wi-Fi (registered trademark) communication. The case where a fixed length (for example, 10 cm) label is produced continuously is illustrated.

印刷装置1では、初期化処理が実行されたのち(S1)、受信した印刷ジョブが通信バッファに順次書き込まれる(S3)。初期状態では処理許可フラグが「ON」であるから(S41:YES)、通信バッファ内のデータが順次読み出され(S43)、コマンドとして処理される。まず印刷ジョブに含まれる設定情報が、印刷設定記憶エリアに書き込まれる(S69)。次いで、印刷ジョブに含まれる1ページ目の印刷データ「ABCDE」が、印刷バッファに順次書き込まれる(S47、S49)。初期状態では印刷状態フラグが「OFF」であるから(S75:YES)、印刷開始判定処理が実行される(S75)。通信インタフェイスは「Wi−Fi(登録商標)」であるから(S87:YES)、開始ラインkは「301」に設定される(S89)。   In the printing apparatus 1, after the initialization process is executed (S1), the received print jobs are sequentially written in the communication buffer (S3). Since the processing permission flag is “ON” in the initial state (S41: YES), the data in the communication buffer is read sequentially (S43) and processed as a command. First, the setting information included in the print job is written in the print setting storage area (S69). Next, the print data “ABCDE” of the first page included in the print job is sequentially written in the print buffer (S47, S49). Since the print state flag is “OFF” in the initial state (S75: YES), the print start determination process is executed (S75). Since the communication interface is “Wi-Fi (registered trademark)” (S87: YES), the start line k is set to “301” (S89).

印刷バッファに書き込まれた受信ライン数sが開始ラインk「301」以上になると(S93:YES)、印刷状態フラグが「ON」に設定される(S95)。これにより、1ページ目の印刷データ「ABCDE」の印刷が開始される(S101:YES、S105、S107)。図10(a)に示す例では、受信ライン数sが開始ラインk「301」以上に達した時点で印刷が開始されて、印刷位置i「10」までの印刷が完了している。この印刷に並行して印刷データが受信されているため、受信ライン数sが「320」に増加している。   When the number of received lines s written in the print buffer is equal to or greater than the start line k “301” (S93: YES), the print status flag is set to “ON” (S95). As a result, printing of the print data “ABCDE” for the first page is started (S101: YES, S105, S107). In the example shown in FIG. 10A, printing is started when the number of received lines s reaches the start line k “301” or more, and printing up to the print position i “10” is completed. Since print data is received in parallel with this printing, the number of received lines s has increased to “320”.

このように1ページ目の印刷データの印刷中も、印刷データの受信および書き込みが継続して受信ライン数sが増加する。1ページ目の印刷データの受信が完了した場合(S51:YES)、1ページ目のページ終了位置rに現在の受信ライン数s「500」が設定され、2ページ目のページ開始位置qに次の印刷ライン「501」が設定される(S53〜S57)。図10(b)に示す例では、1ページ目の印刷データ「ABCDE」が印刷位置i「150」まで印刷が完了している。1ページ目の印刷データの受信完了後に、2ページ目の印刷データ「FGHIJ」の受信が開始された結果、現在の受信ライン数sは「530」である。   Thus, even during printing of the first page of print data, reception and writing of the print data continues and the number of received lines s increases. When reception of the print data for the first page is completed (S51: YES), the current reception line number s “500” is set at the page end position r of the first page, and the next page start position q is the next. The print line “501” is set (S53 to S57). In the example shown in FIG. 10B, the printing of the print data “ABCDE” for the first page is completed up to the print position i “150”. As a result of starting reception of print data “FGHIJ” for the second page after reception of print data for the first page is completed, the current number of received lines s is “530”.

印刷位置iが「500」以上である場合(S109:YES)、1ページ目の印刷データ「ABCDE」が完了して、1ページ目のラベルが作成されたことを意味する。このとき、受信ライン数sが「1000」以上であれば(S111:YES)、2ページ目の印刷データ「FGHIJ」の受信が完了しているから、印刷動作が継続される。図10(c)に示す例では、印刷位置i「500」まで印刷されているため、1ページ目の印刷データ「ABCDE」の印刷が完了している。このとき、既に2ページ目の印刷データの受信が完了しているため、現在の受信ライン数sは「1000」である。よって、1ページ目の印刷データ「ABCDE」の印刷完了後、2ページ目の印刷データ「FGHIJ」が継続して印刷される。   When the print position i is “500” or more (S109: YES), it means that the print data “ABCDE” for the first page is completed and the label for the first page is created. At this time, if the number of received lines s is “1000” or more (S111: YES), since the reception of the print data “FGHIJ” for the second page is completed, the printing operation is continued. In the example shown in FIG. 10C, since the printing position i “500” has been printed, the printing of the print data “ABCDE” for the first page is completed. At this time, since the reception of the print data for the second page has already been completed, the current number of received lines s is “1000”. Therefore, after the printing of the print data “ABCDE” for the first page is completed, the print data “FGHIJ” for the second page is continuously printed.

一方、受信ライン数sが「1000」未満である場合(S111:NO)2ページ目の印刷データの受信が未完了であるから、印刷動作が停止される(S113)。図10(d)に示す例では、1ページ目の印刷データ「ABCDE」の印刷は完了しているが、現在の受信ライン数sは「750」であるため、2ページ目の印刷データの受信が完了していない。この場合、印刷状態フラグが「OFF」に設定されるため(S115)、印刷開始判定処理(S75)によって開始ラインkが再設定される。具体的には、現在の印刷位置i「501」に、通信インタフェイス「Wi−Fi(登録商標)」に対応する「300」を加算した値「801」が、開始ラインkに設定される(S89)。   On the other hand, if the number of received lines s is less than “1000” (S111: NO), the printing operation of the second page is not completed, and the printing operation is stopped (S113). In the example shown in FIG. 10D, printing of the print data “ABCDE” for the first page has been completed, but since the current reception line number s is “750”, the print data for the second page is received. Is not complete. In this case, since the print state flag is set to “OFF” (S115), the start line k is reset by the print start determination process (S75). Specifically, a value “801” obtained by adding “300” corresponding to the communication interface “Wi-Fi (registered trademark)” to the current print position i “501” is set in the start line k ( S89).

その後、受信ライン数sが開始ラインk「801」以上になると(S93:YES)、印刷状態フラグが「ON」に設定されて(S95)、2ページ目の印刷データ「FGHIJ」の印刷が開始される(S101:YES、S105、S107)。さらに、印刷ジョブに含まれる全ての印刷データの受信が完了すると(S59:YES)、次の印刷ジョブに基づくコマンド処理が一時的に禁止される(S63、S65)。   Thereafter, when the number of received lines s becomes equal to or greater than the start line k “801” (S93: YES), the print status flag is set to “ON” (S95), and printing of the print data “FGHIJ” for the second page is started. (S101: YES, S105, S107). Further, when reception of all print data included in the print job is completed (S59: YES), command processing based on the next print job is temporarily prohibited (S63, S65).

一方、印刷位置iが「1000」に達すると(S109:YES)、2ページ目の印刷データ「FGHIJ」が完了して、2ページ目のラベルが作成されたことを意味する。このとき、次ページの印刷データの受信はないから(S111:NO)、印刷が停止される(S113、S115)。さらに、印刷ジョブに含まれる全ての印刷データを受信完了しているから(S117:YES)、次の印刷ジョブに基づくコマンド処理が許可される(S119)。これにより、以降の処理では、次の印刷ジョブに基づいて、上記と同様に印刷動作が実行される。   On the other hand, when the print position i reaches “1000” (S109: YES), it means that the print data “FGHIJ” for the second page is completed and the label for the second page is created. At this time, since print data for the next page is not received (S111: NO), printing is stopped (S113, S115). Furthermore, since all print data included in the print job has been received (S117: YES), command processing based on the next print job is permitted (S119). Thereby, in the subsequent processing, the printing operation is executed in the same manner as described above based on the next print job.

なお、例えば通信環境の悪化等の原因によって、外部機器とのデータ通信速度が印刷装置1の印刷速度よりも遅くなり、印刷位置iが受信ライン数sに追い付いてしまう場合がある。この場合、受信ライン数sは印刷位置i未満であるため(S103:NO)、印刷が一時停止される(S123)。この場合も、印刷状態フラグが「OFF」に設定されるため(S125)、印刷開始判定処理(S75)によって開始ラインkが再設定される。   Note that the data communication speed with the external device may be slower than the printing speed of the printing apparatus 1 due to, for example, the deterioration of the communication environment, and the print position i may catch up with the number of received lines s. In this case, since the number of received lines s is less than the print position i (S103: NO), printing is temporarily stopped (S123). Also in this case, since the print status flag is set to “OFF” (S125), the start line k is reset by the print start determination process (S75).

例えば1ページ目の印刷データに基づく印刷中に、印刷位置i「101」で印刷が一時停止したとする。この場合、現在の印刷位置i「101」に、通信インタフェイス「Wi−Fi(登録商標)」に対応する「300」を加算した値「401」が、開始ラインkに設定される(S89)。その後、受信ライン数sが開始ラインk「401」以上になると(S93:YES)、印刷状態フラグが「ON」に設定されて(S95)、1ページ目の印刷データの印刷が再開される(S101:YES、S105、S107)。   For example, assume that printing is temporarily stopped at the print position i “101” during printing based on the print data of the first page. In this case, a value “401” obtained by adding “300” corresponding to the communication interface “Wi-Fi (registered trademark)” to the current print position i “101” is set as the start line k (S89). . Thereafter, when the number of received lines s becomes equal to or greater than the start line k “401” (S93: YES), the print status flag is set to “ON” (S95), and printing of the print data for the first page is resumed (S95). S101: YES, S105, S107).

以上に説明したように、本実施形態の印刷装置1では、複数種類の通信インタフェイス(USB、Wi−Fi(登録商標)、Bluetooth(登録商標))のいずれかを使用して外部機器から受信した印刷データが、順次蓄積して記憶される。記憶された印刷データに基づいて、印刷媒体(シート3)を搬送しながら印刷ライン毎に印刷が実行される。印刷データの受信に使用される通信インタフェイスに基づいて、必要データ量(開始ラインk)が特定される。シート3の搬送および印刷が停止されている場合、記憶されている印刷データのデータ量(受信ライン数s)が特定された開始ラインk以上であれば、シート3の搬送および印刷が開始される。   As described above, in the printing apparatus 1 according to the present embodiment, reception is performed from an external device using any of a plurality of types of communication interfaces (USB, Wi-Fi (registered trademark), and Bluetooth (registered trademark)). The printed data is sequentially accumulated and stored. Based on the stored print data, printing is executed for each print line while conveying the print medium (sheet 3). Based on the communication interface used to receive the print data, the required data amount (start line k) is specified. When conveyance and printing of the sheet 3 are stopped, conveyance and printing of the sheet 3 are started if the amount of stored print data (the number of received lines s) is equal to or greater than the specified start line k. .

これにより、印刷データが印刷の開始条件を満たすデータ量(開始ラインk)以上記憶された場合に、シート3の搬送および印刷が開始される。現在の印刷データに基づく印刷の実行中に、次の印刷データの受信が完了する可能性が高まる。ひいては、次の印刷データに基づく印刷の開始時に、次の印刷データの受信が未完了であることに起因する印刷の一時停止が発生しにくい。したがって、印刷のスループット低下を抑制しつつ、複数の通信インタフェイスのいずれかに接続された外部機器から印刷データを受信しながら印刷を実行することができる。   As a result, when the print data is stored more than the amount of data (start line k) that satisfies the printing start condition, the conveyance and printing of the sheet 3 are started. While printing based on the current print data is being executed, the possibility that reception of the next print data is completed is increased. As a result, at the start of printing based on the next print data, it is difficult to cause a temporary stop of printing due to incomplete reception of the next print data. Therefore, it is possible to execute printing while receiving print data from an external device connected to any of a plurality of communication interfaces while suppressing a decrease in printing throughput.

また、必要データ量(開始ラインk)は、ステップS81で特定された通信インタフェイスの種類に基づいて特定される(S83〜S91)。これにより、印刷データの受信に使用される通信インタフェイスの種類に応じて、最適な開始ラインkを特定できる。   The necessary data amount (start line k) is specified based on the type of communication interface specified in step S81 (S83 to S91). As a result, the optimum start line k can be specified in accordance with the type of communication interface used for receiving print data.

また、印刷データが印刷の開始条件を満たす印刷ラインの数量(開始ラインk)以上記憶された場合に、シート3の搬送および印刷が開始される。したがって、記憶されている印刷データに基づく印刷ラインの数量(受信ライン数s)に基づいて、印刷の開始タイミングを正確に最適化することができる。   Further, when the print data is stored more than the number of print lines (start line k) satisfying the print start condition, the conveyance and printing of the sheet 3 are started. Therefore, it is possible to accurately optimize the print start timing based on the number of print lines (the number of received lines s) based on the stored print data.

また、ステップS105で印刷中データ(処理中ページ)に基づく印刷が開始されたのち、次の印刷データ(次ページ)を構成する全データが記憶されているか否かが判定される(S111)。全データが記憶されている場合(S111:YES)、印刷完了後に継続して次ページが印刷される。これにより、処理中ページに基づく印刷完了時に次ページの全データが受信完了していれば、一時停止することなく次ページに基づく印刷が実行されるため、印刷のスループットを向上できる。さらに、少なくとも一単位のページの印刷中には、印刷の一旦停止は実行されないため、印刷品質を向上できる。   In step S105, after printing based on the printing data (page being processed) is started, it is determined whether or not all the data constituting the next printing data (next page) is stored (S111). When all the data is stored (S111: YES), the next page is continuously printed after the printing is completed. As a result, if all the data of the next page has been received when printing based on the page being processed is completed, printing based on the next page is executed without pausing, so that the printing throughput can be improved. Furthermore, since printing is not temporarily stopped during printing of at least one unit page, the print quality can be improved.

また、印刷中データ(処理中ページ)の印刷完了時に次印刷データ(次ページ)を構成する全データの受信が未完了であれば、印刷が一旦停止される(S111:NO、S113)。その後、次ページが印刷の開始条件を満たすデータ量(開始ラインk)以上記憶されると、印刷が再開される。したがって、印刷が一旦停止した後であっても、上記と同様にして、印刷のスループット低下を抑制しつつ、複数の通信インタフェイスのいずれかに接続された外部機器から印刷データを受信しながら印刷を実行することができる。   Further, if the reception of all the data constituting the next print data (next page) is not completed when the printing of the printing data (page being processed) is completed, the printing is temporarily stopped (S111: NO, S113). After that, when the amount of data (start line k) that satisfies the printing start condition is stored for the next page, printing is resumed. Therefore, even after printing is temporarily stopped, printing is performed while receiving print data from an external device connected to one of a plurality of communication interfaces while suppressing a decrease in printing throughput in the same manner as described above. Can be executed.

本実施形態では、RAM203が、本発明の「データ記憶手段」に相当する。搬送モータ209が、本発明の「搬送手段」に相当する。サーマルヘッド31が、本発明の「印刷手段」に相当する。ステップS83〜S91を実行するCPU201が、本発明の「データ量特定手段」に相当する。ステップS93を実行するCPU201が、本発明の「第一判定手段」に相当する。ステップS95を実行するCPU201が、本発明の「印刷開始手段」に相当する。ステップS81を実行するCPU201が、本発明の「種類特定手段」に相当する。ステップS111を実行するCPU201が、本発明の「第二判定手段」に相当する。ステップS113を実行するCPU201が、本発明の「印刷停止手段」に相当する。   In the present embodiment, the RAM 203 corresponds to the “data storage unit” of the present invention. The transport motor 209 corresponds to the “transport means” of the present invention. The thermal head 31 corresponds to the “printing unit” of the present invention. The CPU 201 that executes steps S83 to S91 corresponds to the “data amount specifying means” of the present invention. The CPU 201 executing step S93 corresponds to the “first determination unit” of the present invention. The CPU 201 executing step S95 corresponds to the “print start unit” of the present invention. The CPU 201 executing step S81 corresponds to the “type specifying unit” of the present invention. The CPU 201 executing step S111 corresponds to the “second determination unit” of the present invention. The CPU 201 executing step S113 corresponds to the “printing stop unit” of the present invention.

ステップS83〜S91が、本発明の「データ量特定ステップ」に相当する。ステップS93が、本発明の「判定ステップ」に相当する。ステップS95が、本発明の「印刷開始ステップ」に相当する。なお、後述の変形例において、フラッシュROM204が、本発明の「テーブル記憶手段」に相当する。ステップS201が、本発明の「速度特定手段」に相当する。ステップS203〜S211が、本発明の「データ量特定手段」に相当する。   Steps S83 to S91 correspond to the “data amount specifying step” of the present invention. Step S93 corresponds to the “determination step” of the present invention. Step S95 corresponds to the “print start step” of the present invention. In the modification described later, the flash ROM 204 corresponds to the “table storage unit” of the present invention. Step S201 corresponds to the “speed specifying means” of the present invention. Steps S203 to S211 correspond to the “data amount specifying means” of the present invention.

本発明は上記実施形態に限定されるものではなく、種々の変更が可能である。例えば、通信インタフェイスに基づいて特定される必要データ量は、設定情報(テープ長、テープ幅、印刷品質等)や通信環境等に応じて自由に設定することができる。一例として、必要データ量は、印刷開始条件となる受信済みの印刷ライン数(開始ラインk)に代えて、印刷開始条件となる受信済みのデータ量であってもよい。この場合、印刷装置1が必要データ量の印刷データを受信すると、その印刷データに基づく印刷が開始される。   The present invention is not limited to the above embodiment, and various modifications can be made. For example, the necessary data amount specified based on the communication interface can be freely set according to setting information (tape length, tape width, print quality, etc.), communication environment, and the like. As an example, the necessary data amount may be a received data amount serving as a print start condition instead of the number of received print lines (start line k) serving as a print start condition. In this case, when the printing apparatus 1 receives the necessary amount of print data, printing based on the print data is started.

また、複数種類の通信インタフェイスごとに必要データ量を定義した印刷条件テーブル220(図11参照)を用いて、通信インタフェイスに応じた必要データ量を特定してもよい。図11に例示する印刷条件テーブル220は、通信インタフェイスの種類、テープ幅、印字品質の組合せにそれぞれ対応して開始ラインkが定義されており、フラッシュROM204に記憶されている。一般に、同一画像の印刷データであっても、印刷媒体のテープ幅が広いほどデータ量が大きくなり、印字品質が高いほどデータ量が大きくなる。よって、印刷条件テーブル220では、同種の通信インタフェイスであっても、テープ幅が広いほど開始ラインkが大きく、且つ、印字品質が高いほど開始ラインkが大きい。   Further, the necessary data amount corresponding to the communication interface may be specified by using the printing condition table 220 (see FIG. 11) in which the necessary data amount is defined for each of a plurality of types of communication interfaces. The print condition table 220 illustrated in FIG. 11 defines a start line k corresponding to each combination of the type of communication interface, tape width, and print quality, and is stored in the flash ROM 204. In general, even for print data of the same image, the data amount increases as the tape width of the print medium increases, and the data amount increases as the print quality increases. Therefore, in the printing condition table 220, even with the same type of communication interface, the start line k is larger as the tape width is wider, and the start line k is larger as the print quality is higher.

印刷条件テーブル220を用いる場合は、印刷開始判定処理(図8)の処理内容を次のように変更すればよい。すなわち、ステップS81では、通信インタフェイスの種類に加えて、印刷ジョブに含まれる設定情報に基づいて、テープ幅および印字品質が特定される。ステップS83〜S91では、ステップS81で特定された通信インタフェイス、テープ幅および印字品質の組合せに対応する開始ラインkが、印刷条件テーブル220を参照して特定されればよい。これにより、印刷条件テーブル220の定義内容を変更するだけで、印刷装置1の使用環境や通信インタフェイスの通信状況等に応じて、特定される必要データ量を最適化できる。   When the print condition table 220 is used, the processing content of the print start determination process (FIG. 8) may be changed as follows. That is, in step S81, the tape width and the print quality are specified based on the setting information included in the print job in addition to the type of communication interface. In steps S83 to S91, the start line k corresponding to the combination of the communication interface, the tape width, and the print quality specified in step S81 may be specified with reference to the print condition table 220. As a result, only by changing the definition contents of the printing condition table 220, it is possible to optimize the amount of data that is specified according to the usage environment of the printing apparatus 1, the communication status of the communication interface, and the like.

また、図12に例示する印刷開始判定処理によって、印刷データの受信に使用される通信インタフェイスのデータ通信速度に基づいて、必要データ量を特定してもよい。図12に示す印刷開始判定処理では、まず公知の手法によって、印刷データの受信に使用される通信インタフェイスのデータ通信速度が測定される(S201)。   Further, the necessary data amount may be specified based on the data communication speed of the communication interface used for receiving the print data by the print start determination process illustrated in FIG. In the print start determination process shown in FIG. 12, first, the data communication speed of the communication interface used to receive print data is measured by a known method (S201).

ステップS201で測定されたデータ通信速度が「10Mbps」以上である場合(S203:YES)、ステップS85と同様に、印刷位置iに「100」を加算した値が開始ラインkに決定される(S205)。ステップS201で測定されたデータ通信速度が「10Mbps」未満、「1Mbps」以上である場合(S203:NO、S207:YES)、ステップS89と同様に、印刷位置iに「300」を加算した値が開始ラインkに決定される(S209)。ステップS201で測定されたデータ通信速度が「1Mbps」未満である場合(S207:NO)、ステップS91と同様に、「無制限」が開始ラインkに決定される(S211)。その後の処理(S213〜S217)は、先述のステップS93〜S97と同様である。これにより、印刷データの受信に使用される通信インタフェイスのデータ通信速度に応じて、最適な必要データ量を特定できる。   When the data communication speed measured in step S201 is “10 Mbps” or more (S203: YES), a value obtained by adding “100” to the printing position i is determined as the start line k as in step S85 (S205). ). When the data communication speed measured in step S201 is less than “10 Mbps” and “1 Mbps” or more (S203: NO, S207: YES), the value obtained by adding “300” to the printing position i is the same as in step S89. The start line k is determined (S209). When the data communication speed measured in step S201 is less than “1 Mbps” (S207: NO), “unlimited” is determined as the start line k as in step S91 (S211). The subsequent processing (S213 to S217) is the same as the above-described steps S93 to S97. Thereby, the optimum required data amount can be specified according to the data communication speed of the communication interface used for receiving the print data.

上記実施形態では、外部機器から送信された印刷データが印刷装置1でドットデータに変換されているが、最初から外部機器から1ライン毎のドットデータが送信されてもよい。   In the above embodiment, print data transmitted from an external device is converted into dot data by the printing apparatus 1, but dot data for each line may be transmitted from the external device from the beginning.

1 印刷装置
31 サーマルヘッド
201 CPU
203 RAM
204 フラッシュROM
210 Wi−Fi(登録商標)インタフェイス
211 Bluetooth(登録商標)インタフェイス
212 USBインタフェイス
1 Printing Device 31 Thermal Head 201 CPU
203 RAM
204 Flash ROM
210 Wi-Fi (registered trademark) interface 211 Bluetooth (registered trademark) interface 212 USB interface

Claims (8)

外部機器に接続可能であり、接続された前記外部機器に対してデータ送受信を行う、複数種類の通信インタフェイスを備えた印刷装置であって、
前記複数種類の通信インタフェイスのいずれかを使用して前記外部機器から受信した印刷データを順次蓄積して記憶するデータ記憶手段と、
印刷媒体を搬送する搬送手段と、
前記データ記憶手段に記憶された前記印刷データに基づいて、前記搬送手段によって搬送される前記印刷媒体に、前記印刷媒体が搬送される方向に直交する方向に延びる印刷ライン毎に印刷を行う印刷手段と、
前記印刷データの受信に使用される前記通信インタフェイスに基づいて、印刷の開始条件を示す前記印刷データのデータ量である必要データ量を特定するデータ量特定手段と、
前記搬送手段の搬送および前記印刷手段の印刷が停止されている場合に、前記データ記憶手段に記憶されている前記印刷データのデータ量が、前記データ量特定手段によって特定された前記必要データ量以上であるか否かを判定する第一判定手段と、
前記第一判定手段によって前記印刷データのデータ量が前記必要データ量以上であると判定された場合、前記搬送手段に前記印刷媒体の搬送を開始させ、且つ、前記データ記憶手段に記憶されている前記印刷データに基づく印刷を、前記印刷手段に開始させる印刷開始手段と
を備えたことを特徴とする印刷装置。
A printing apparatus comprising a plurality of types of communication interfaces that can be connected to an external device and performs data transmission / reception with respect to the connected external device,
Data storage means for sequentially accumulating and storing print data received from the external device using any of the plurality of types of communication interfaces;
Conveying means for conveying the print medium;
Printing means for printing on the printing medium conveyed by the conveying means for each printing line extending in a direction orthogonal to the direction in which the printing medium is conveyed, based on the printing data stored in the data storage means When,
A data amount specifying means for specifying a necessary data amount that is a data amount of the print data indicating a print start condition based on the communication interface used for receiving the print data;
When the conveyance of the conveyance unit and the printing of the printing unit are stopped, the data amount of the print data stored in the data storage unit is equal to or greater than the necessary data amount specified by the data amount specification unit First determination means for determining whether or not
When the first determination unit determines that the data amount of the print data is greater than or equal to the necessary data amount, the conveyance unit starts conveyance of the print medium and is stored in the data storage unit A printing apparatus comprising: a printing start unit that causes the printing unit to start printing based on the print data.
前記印刷データの受信に使用される前記通信インタフェイスの種類を特定する種類特定手段を備え、
前記データ量特定手段は、前記種類特定手段によって特定された前記通信インタフェイスの種類に基づいて、前記必要データ量を特定することを特徴とする請求項1に記載の印刷装置。
A type specifying means for specifying the type of the communication interface used for receiving the print data;
The printing apparatus according to claim 1, wherein the data amount specifying unit specifies the necessary data amount based on a type of the communication interface specified by the type specifying unit.
前記印刷データの受信に使用される前記通信インタフェイスのデータ通信速度を特定する速度特定手段を備え、
前記データ量特定手段は、前記速度特定手段によって特定された前記通信インタフェイスのデータ通信速度に基づいて、前記必要データ量を特定することを特徴とする請求項1に記載の印刷装置。
A speed specifying means for specifying a data communication speed of the communication interface used for receiving the print data;
The printing apparatus according to claim 1, wherein the data amount specifying unit specifies the necessary data amount based on a data communication speed of the communication interface specified by the speed specifying unit.
前記データ量特定手段は、印刷の開始条件となる前記印刷ラインの数量である必要ライン数を、前記必要データ量として特定し、
前記第一判定手段は、前記データ記憶手段に記憶されている前記印刷データに基づく前記印刷ラインの数量が、前記データ量特定手段によって特定された前記必要ライン数以上である場合、前記印刷データのデータ量が前記必要データ量以上であると判定することを請求項1から3のいずれかに記載の印刷装置。
The data amount specifying means specifies the required number of lines, which is the quantity of the print lines that is a printing start condition, as the required data amount,
The first determination unit, when the number of the print lines based on the print data stored in the data storage unit is equal to or greater than the necessary number of lines specified by the data amount specifying unit, The printing apparatus according to claim 1, wherein the data amount is determined to be greater than the necessary data amount.
前記印刷データは、一の連続したデータ列で構成され、前記印刷装置に一単位のページを印刷させるデータであり、
前記印刷開始手段によって前記印刷手段の印刷が開始されたのち、印刷中の前記印刷データである印刷中データに連続して印刷すべき他の前記印刷データである次印刷データを構成する全データが、前記データ記憶手段に記憶されているか否かを判定する第二判定手段と、
前記第二判定手段によって前記全データが記憶されていると判定された場合、前記印刷中データの印刷完了後に、前記搬送手段の搬送が継続されて、前記印刷手段により前記次印刷データが印刷されることを特徴とする請求項1から4のいずれかに記載の印刷装置。
The print data is composed of one continuous data string, and is data for causing the printing apparatus to print one unit of page;
After printing of the printing unit is started by the printing start unit, all the data constituting the next print data that is the other print data to be printed in succession to the printing data that is the printing data that is being printed Second determination means for determining whether or not the data is stored in the data storage means;
If it is determined by the second determination means that all the data is stored, the conveyance of the conveyance means is continued after the printing of the printing data is completed, and the next print data is printed by the printing means. The printing apparatus according to claim 1, wherein the printing apparatus is a printer.
前記第二判定手段によって前記全データの少なくとも一部が記憶されていないと判定された場合、前記印刷中データの印刷完了後に、前記搬送手段の搬送および前記印刷手段の印刷を停止する印刷停止手段を備え、
前記第一判定手段は、前記印刷停止手段によって前記搬送手段の搬送および前記印刷手段の印刷が停止された場合、前記データ記憶手段に記憶されている前記次印刷データのデータ量が、前記必要データ量以上であるか否かを判定することを特徴とする請求項5に記載の印刷装置。
A printing stop unit that stops conveyance of the conveyance unit and printing of the printing unit after completion of printing of the printing data when the second determination unit determines that at least a part of the entire data is not stored. With
The first determination unit determines that the amount of the next print data stored in the data storage unit is the required data when the conveyance of the conveyance unit and the printing of the printing unit are stopped by the printing stop unit. 6. The printing apparatus according to claim 5, wherein it is determined whether or not the amount is greater than or equal to the amount.
前記複数種類の通信インタフェイスごとに前記必要データ量を定義した印刷条件テーブルを記憶するテーブル記憶手段を備え、
前記データ量特定手段は、前記印刷データの受信に使用される前記通信インタフェイスに対応する前記必要データ量を、前記印刷条件テーブルに基づいて特定することを特徴とする請求項1から6のいずれかに記載の印刷装置。
Table storage means for storing a printing condition table defining the required data amount for each of the plurality of types of communication interfaces;
7. The data amount specifying unit specifies the necessary data amount corresponding to the communication interface used for receiving the print data based on the print condition table. A printing apparatus according to claim 1.
外部機器に接続可能であり、接続された前記外部機器に対してデータ送受信を行う複数種類の通信インタフェイスと、前記複数種類の通信インタフェイスのいずれかを使用して前記外部機器から受信した印刷データを順次蓄積して記憶するデータ記憶手段と、印刷媒体を搬送する搬送手段と、前記データ記憶手段に記憶された前記印刷データに基づいて、前記搬送手段によって搬送される前記印刷媒体に、前記印刷媒体が搬送される方向に直交する方向に延びる印刷ライン毎に印刷を行う印刷手段とを備えた印刷装置で実行される印刷方法であって、
前記印刷データの受信に使用される前記通信インタフェイスに基づいて、印刷の開始条件を示す前記印刷データのデータ量である必要データ量を特定するデータ量特定ステップと、
前記搬送手段の搬送および前記印刷手段の印刷が停止されている場合に、前記データ記憶手段に記憶されている前記印刷データのデータ量が、前記データ量特定ステップによって特定された前記必要データ量以上であるか否かを判定する判定ステップと、
前記判定ステップによって前記印刷データのデータ量が前記必要データ量以上であると判定された場合、前記搬送手段に前記印刷媒体の搬送を開始させ、且つ、前記データ記憶手段に記憶されている前記印刷データに基づく印刷を、前記印刷手段に開始させる印刷開始ステップと
を備えたことを特徴とする印刷方法。
A plurality of types of communication interfaces that can be connected to an external device and transmit / receive data to / from the connected external device, and prints received from the external device using any of the plurality of types of communication interfaces Data storage means for sequentially accumulating and storing data, transport means for transporting a print medium, and based on the print data stored in the data storage means, the print medium transported by the transport means, A printing method executed by a printing apparatus including a printing unit that performs printing for each printing line extending in a direction orthogonal to a direction in which the printing medium is conveyed,
A data amount specifying step of specifying a necessary data amount that is a data amount of the print data indicating a print start condition based on the communication interface used for receiving the print data;
When the conveyance of the conveyance unit and the printing of the printing unit are stopped, the data amount of the print data stored in the data storage unit is greater than or equal to the necessary data amount specified by the data amount specifying step A determination step for determining whether or not
When the determination step determines that the data amount of the print data is greater than or equal to the required data amount, the conveyance unit starts conveyance of the print medium, and the print data stored in the data storage unit And a printing start step for causing the printing means to start printing based on the data.
JP2011234052A 2011-10-25 2011-10-25 Printer and printing method Pending JP2013091214A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011234052A JP2013091214A (en) 2011-10-25 2011-10-25 Printer and printing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011234052A JP2013091214A (en) 2011-10-25 2011-10-25 Printer and printing method

Publications (1)

Publication Number Publication Date
JP2013091214A true JP2013091214A (en) 2013-05-16

Family

ID=48614734

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011234052A Pending JP2013091214A (en) 2011-10-25 2011-10-25 Printer and printing method

Country Status (1)

Country Link
JP (1) JP2013091214A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016221705A (en) * 2015-05-27 2016-12-28 セイコーインスツル株式会社 Printer, control method and program
JP2017113972A (en) * 2015-12-24 2017-06-29 ブラザー工業株式会社 Printing device, printing method and printing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016221705A (en) * 2015-05-27 2016-12-28 セイコーインスツル株式会社 Printer, control method and program
JP2017113972A (en) * 2015-12-24 2017-06-29 ブラザー工業株式会社 Printing device, printing method and printing program

Similar Documents

Publication Publication Date Title
JP5728948B2 (en) RECORDING SYSTEM, RECORDING SYSTEM CONTROL METHOD, RECORDING CONTROL DEVICE, AND PROGRAM
JP2007320134A (en) Printer and method for controlling printer
JP4747906B2 (en) Label printing apparatus and label printing program
US8403476B2 (en) Image forming apparatus and method for controlling the same
JP5742526B2 (en) Printing device
JP2013091214A (en) Printer and printing method
JP5122379B2 (en) Portable printer
JP6703749B2 (en) Printer
JP2019199072A (en) Printer and printing program
JP6781952B2 (en) Printing equipment
JP7243484B2 (en) Control program and information processing device
US10752031B2 (en) Printing apparatus, non-transitory storage medium, and method of controlling the printing apparatus
JP4962240B2 (en) Printing device
JP6245210B2 (en) Printing device
JP2012192575A (en) Printer, and print history management program
JP2017071186A (en) Image forming apparatus, image forming method, and program
JP7147549B2 (en) editor and printer
JP2021053974A (en) Printer
JP6447559B2 (en) Printing apparatus, printing method, and printing program
US10189274B2 (en) Printer, and method and computer-readable medium for the same
US20230229880A1 (en) Printing apparatus
JP2012228861A (en) Printing apparatus
JP2021053832A (en) Printer, printing control program and production method of printed matter
JP6323287B2 (en) Printing device
JP2021128604A (en) Information processor, control method, program, and information processing system