[go: up one dir, main page]

JP2004098313A - Printer with improved print data transfer efficiency - Google Patents

Printer with improved print data transfer efficiency Download PDF

Info

Publication number
JP2004098313A
JP2004098313A JP2002259553A JP2002259553A JP2004098313A JP 2004098313 A JP2004098313 A JP 2004098313A JP 2002259553 A JP2002259553 A JP 2002259553A JP 2002259553 A JP2002259553 A JP 2002259553A JP 2004098313 A JP2004098313 A JP 2004098313A
Authority
JP
Japan
Prior art keywords
print
packet size
printer
host computer
print data
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
JP2002259553A
Other languages
Japanese (ja)
Inventor
Takashi Tsutsumi
堤 崇
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 JP2002259553A priority Critical patent/JP2004098313A/en
Publication of JP2004098313A publication Critical patent/JP2004098313A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)
  • Storing Facsimile Image Data (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

【課題】従来のパケットサイズは、D4通信の初期化の際決定されるパケットサイズに固定され、印刷データの種類によっては、オーバヘッドが増大し、印刷効率を低下させていた。
【解決手段】ホストコンピュータから印刷データを受信して印刷するプリンタにおいて、印刷開始時に前記ホストコンピュータからの第1の要求に応答して、前記印刷データの送信パケットサイズを返信し、送信パケット数を要求する前記ホストコンピュータからの第2の要求に応答して、受信可能な送信パケット数を返信し、当該返信した送信パケット数の印刷データを前記ホストコンピュータから受信するインタフェースタスクと、前記ホストから送信された印刷データを一時的に蓄積するバッファと、前記バッファに蓄積された印刷データを処理して印刷エンジンに印刷を指令する印刷タスクとを有し、前記インタフェースタスクは、前記第1の要求に応答して返信する送信パケットサイズを、現在処理中の印刷ジョブに対する前記バッファの空き速度に応じたサイズに可変制御することを特徴とするプリンタ。
【選択図】図5
A conventional packet size is fixed to a packet size determined at the time of initialization of D4 communication, and depending on the type of print data, overhead increases and printing efficiency decreases.
In a printer that receives print data from a host computer and prints, at the start of printing, in response to a first request from the host computer, the printer returns a transmission packet size of the print data and reduces the number of transmission packets. An interface task for returning a number of receivable transmission packets in response to a second request from the host computer requesting, and receiving print data of the returned number of transmission packets from the host computer; And a print task for processing the print data stored in the buffer and instructing a print engine to print, wherein the interface task is configured to execute the first request in response to the first request. The size of the transmitted packet returned in response to the Printer, characterized in that the variable control of the size corresponding to the free speed of the fan.
[Selection diagram] FIG.

Description

【0001】
【発明の属する技術分野】
本発明は、印刷データの転送効率を高めたプリンタに関する。
【0002】
【従来の技術】
プリンタは、ホストコンピュータから送信される印刷データを受信後、それを一時的にバッファと呼ばれる記憶装置に格納し、紙などの媒体やファイルに出力する。また、プリンタは、印刷進行状況、紙詰まり、またはインク切れなどの情報を印刷ステータスとしてホストコンピュータへ送信する。
【0003】
そのために、プリンタは、IEEE1284.4という通信規格を用いて、ホストコンピュータとデータの送受信を行う。この通信(以降D4通信と呼ぶ)では、印刷ステータスや印刷データ等、扱うデータによりチャネルを分けて通信が行われる。
【0004】
ホストコンピュータとプリンタは、印刷データを、パケットサイズを単位とするパケットに分割し、D4通信を行う。従来においては、印刷データを扱うチャネルを初期化する際に、ホストコンピュータにインストールされたプリンタドライバが指定するパケットサイズが、そのままパケットサイズとして固定的に設定されていた。つまり、チャネル初期化の際に設定されたパケットサイズが、どの印刷ジョブに対しても適用されていた。
【0005】
チャネル初期化後、印刷データを転送するために、次の通信処理が行われる。即ち、最初にホストコンピュータが、プリンタドライバを介して、プリンタで一度に受信可能なパケット数を要求する(クレジット要求)。これに応答して、プリンタのインタフェースタスクは、受信バッファ内の空き領域に応じて、受信可能なパケット数を返信する。
【0006】
受信バッファ内に空き領域が存在しない場合は、プリンタのインタフェースタスクは、ゼロクレジット(パケット数ゼロ)を返信し、それに応答して、プリンタドライバは、所定時間経過後に再度クレジット要求を送信する。プリンタから受信可能なパケット数が返信されると、ホストコンピュータは、プリンタドライバを介して、印刷データを、パケット数分だけ一度に送信する。
【0007】
この印刷データの転送処理では、パケット数分の印刷データが連続して送信され、パケット毎に受信確認を行うことはない。ホストコンピュータは、1ページ分の印刷データを転送し終えたら、チャネルを閉じる処理を行う。そして、次ページの印刷データ転送処理として、チャネルの初期化を開始し、1ページ毎に上記の通信処理を繰り返す。
【0008】
【発明が解決しようとする課題】
しかしながら、従来は、どの印刷ジョブに対しても、チャネル初期化の際に決定されたパケットサイズが固定的に適用される。テキストデータまたは画像データなど印刷ジョブのデータ種類に応じて、プリンタの印刷処理速度が異なるため、受信バッファ空き速度にも違いが生じる。
【0009】
受信バッファ空き速度の遅い印刷ジョブに対して、設定されたパケットサイズが大きすぎると、1つのパケットを処理する前に、ホストコンピュータがクレジット要求し、プリンタがゼロクレジットを返信する確率が高い。ゼロクレジットが発生するとオーバヘッドが増大し、印刷効率は低下する。
【0010】
また、受信バッファ空き速度の速い印刷ジョブに対して、設定されたパケットサイズが小さすぎると、クレジット要求とその応答回数が頻繁に発生し、オーバヘッドの増大を招き、同様に印刷効率は低下する。
【0011】
したがって、固定されたパケットサイズが、ある印刷ジョブの印刷データに対しては最適であっても、別の印刷ジョブの印刷データに対しては、最適ではなく、このため印刷効率を高めることができないでいた。そこで、本発明の目的は、印刷ジョブ毎に最適なパケットサイズを設定することにより、印刷効率の高いプリンタを提供することにある。
【0012】
【課題を解決するための手段】
上記目的は、本発明第1の発明によれば、ホストコンピュータから印刷データを受信して印刷するプリンタにおいて、印刷開始時に前記ホストコンピュータからの第1の要求に応答して、前記印刷データの送信パケットサイズを返信し、送信パケット数を要求する前記ホストコンピュータからの第2の要求に応答して、受信可能な送信パケット数を返信し、当該返信した送信パケット数の印刷データを前記ホストコンピュータから受信するインタフェースタスクと、前記ホストから送信された印刷データを一時的に蓄積するバッファと、前記バッファに蓄積された印刷データを処理して印刷エンジンに印刷を指令する印刷タスクとを有し、前記インタフェースタスクは、前記第1の要求に応答して返信する送信パケットサイズを、現在処理中の印刷ジョブに対する前記バッファの空き速度に応じたサイズに可変制御することを特徴とするプリンタを提供することで達成される。
【0013】
第1の発明により、印刷ジョブ毎にパケットサイズを変更可能で、最適化されたパケットサイズを設定することにより、ホストコンピュータとプリンタ間で行われる印刷データ送信におけるオーバヘッドを減少させ、印刷効率を高めることが可能となる。
【0014】
【発明の実施の形態】
以下、本発明の実施の形態について図面に従って説明する。しかしながら、本発明の技術的範囲はかかる実施の形態によって限定されるものではなく、特許請求の範囲に記載された発明とその均等物に及ぶものである。
【0015】
図1は、本発明の実施の一形態における構成例を示す図である。ホストコンピュータ10とプリンタ20は、印刷データおよび印刷ステータスなどのデータを送受信するために、D4通信を行う。D4通信では、扱うデータ毎にチャネルを分けて通信が行われ、チャネルの初期化の際に、ホストコンピュータ10とプリンタ20は、以降の通信に使用するパケットサイズを決定する。
【0016】
そして、ホストコンピュータ10は、印刷データ等を、決定されたパケットサイズ毎に複数のパケットに分割し、プリンタ20に送信する。送信されたパケットは、外部との通信を制御するインタフェースタスク22で受信される。インタフェースタスク22は、受信したパケットを受信バッファ23に格納する。
【0017】
印刷タスク24は、受信バッファ23に格納されたパケットから、分割前のデータを再構築する。印刷タスク24は、再構築された印刷データを、印刷エンジン25で印刷するために、受信した印刷データを印字可能データに変換すると同時に、印刷エンジン25に供給する。
【0018】
印字可能データへの変換とは、例えば、印刷エンジンのインクヘッドに備えられた各色のノズルの駆動に対応するデータに展開することである。印字可能データに変換した後印刷タスク24は、印刷エンジン25に、変換されたデータと印刷エンジンの制御コマンドを送信する。
【0019】
印刷エンジン25は、例えば、インクヘッドおよび給排紙機構などを有し、印刷タスク24からの制御コマンドに従って紙などの媒体に印刷を行う。印刷タスク24の処理によって、受信バッファ23からデータが読み出されるので、受信バッファ23には空き領域が生じる。ホストコンピュータ10は、受信バッファ23に空き領域があれば、残りの印刷データを転送し終えるまで、順次データ転送処理を行う。
【0020】
なお、インタフェースタスク22および印刷タスク24は、メモリ26に格納されるアプリケーションプログラムをCPU21が実行することで機能的に実現されるが、ハードウエアとして実現することも可能である。
【0021】
図2は、受信バッファ23の内部を模式的に表した一例を示す図である。受信バッファをパケットサイズ毎に区切ったときの1つのブロックをクレジット27と呼ぶ。
【0022】
1クレジットの大きさは、パケットサイズに等しく、クレジット数とパケット数は1対1に対応する。すなわち、空きクレジット数に等しいパケット数を受信可能である。図2では、128キロバイトの受信バッファに対し、パケットサイズが16キロバイトの8クレジットが含まれる。
【0023】
図3および図4は、本発明におけるデータ転送処理を説明する図である。ページ毎に、図5で後述するパケットサイズ決定処理を実施することにより、ページ毎にパケットサイズを変更することができる例である。
【0024】
図3ではまず、ホストコンピュータ10は、オープンリクエストコマンドを送信し、ページデータ転送に使用するチャネルの初期化を行う(S301)。コマンドの引数として、ホストコンピュータ10は、パケットサイズを65,535バイトと指定する。これは、図7にて説明するパケットサイズフィールドで表現できる最大数である。
【0025】
プリンタ20は、後述するパケットサイズ決定処理を行い、パケットサイズを決定する(S302)。図3では、16キロバイトに決定されるとする。そして、プリンタ20は、ステップS301で送信されたオープンチャネルリクエストコマンドへの応答として、オープンチャネルリプライコマンドをホストコンピュータ10に送信する(S303)。
【0026】
図3では、ステップS302で決定された16キロバイトが、ホストコンピュータ10に応答される。ステップS301、S302、S303により、以降のページデータ転送処理で使用されるパケットサイズが16キロバイトと決定される。
【0027】
次に、ホストコンピュータ10は、印刷データを転送するために、受信バッファの受信可能パケット数を要求する(S304)。プリンタ20では、受信バッファ23の空きクレジット数を受信可能パケット数として応答する(S305)。ここでは、6クレジットの空きが通知される。
【0028】
ホストコンピュータ10は、ステップS305で応答されたクレジット数に合わせてデータを送信する(S306)。ホストコンピュータ10は、6パケットをプリンタ20に送信する。
【0029】
ホストコンピュータ10は、ページデータの送信を完了し、クローズチャネルリクエストコマンドを送信し、チャネルの使用を終了する(S307)。プリンタ20は、クローズチャネルリクエストへの応答として、クローズチャネルリプライコマンドをホストコンピュータ10に送信する(S308)。この時点で、ページデータ転送処理は一旦終了する。
【0030】
続いて、さらにページデータがあれば、次ページのデータ転送処理を開始する。
ホストコンピュータ10は、オープンリクエストコマンドを送信し、ページデータ転送に使用するチャネルの初期化を行う(S309)。コマンドの引数として、ホストコンピュータ10は、パケットサイズを65,535バイトと指定する。
【0031】
プリンタ20は、後述するパケットサイズ決定処理を行い、パケットサイズを決定する(S310)。図3では、20キロバイトに決定されるとする。そして、プリンタ20は、ステップS309で送信されたオープンチャネルリクエストコマンドへの応答として、オープンチャネルリプライコマンドをホストコンピュータ10に送信する(S311)。
【0032】
図3では、ステップS310で決定された20キロバイトが、ホストコンピュータ10に応答される。ステップS309、S310、S311により、以降のページデータ転送処理で使用されるパケットサイズが20キロバイトと決定される。次に、ホストコンピュータ10は、印刷データを転送するために、受信バッファの受信可能パケット数を要求する(S312)。
【0033】
図4に移り、プリンタ20では、受信バッファ23の空きクレジット数を受信可能パケット数として応答する(S313)。図4では、4クレジットの空きが通知される。ホストコンピュータ10は、ステップS313で応答されたクレジット数に合わせてデータを送信する(S314)。ホストコンピュータ10は、4パケットをプリンタ20に送信する。
【0034】
以降は、ページデータを転送し終えるまで、ステップS312からS314を繰り返し、ページデータを転送し終えたら、ステップS307、S308同様、クローズチャネルリクエスト、クローズチャネルリプライコマンドにより、チャネルの使用を停止する。
【0035】
図3および図4のデータ転送処理によって、ページ毎に、パケットサイズを変更することが可能となり、最適なパケットサイズを設定することで、オーバヘッドを減少させ、印刷効率を高めることができる。ページ毎にパケットサイズを変更するので、印刷ジョブ毎にパケットサイズを変更することにもなる。続いて、どのようにして最適なパケットサイズを決定するかを説明する。
【0036】
図5は、パケットサイズ決定処理を説明するフローチャートである。受信バッファ空き速度は、印刷ジョブの印刷データの種類に応じて異なる。受信バッファ空き速度の速い印刷ジョブに対して、パケットサイズを現在の設定より大きくすれば、クレジット要求とその応答回数が減少し、印刷効率を改善することができる。また、受信バッファ空き速度が遅い印刷ジョブに対して、パケットサイズを現在の設定よりも小さくすれば、ゼロクレジットによるオーバヘッドが減少し、印刷効率を改善することが可能である。
【0037】
従って、本パケットサイズ決定処理では、パケットサイズに応じて設定された基準値を基に、印刷ジョブのページデータを印刷する際の受信バッファ空き速度を判定し、基準値よりも速い場合は、パケットサイズを大きく設定する。また、基準値よりも遅い場合は、パケットサイズを小さく設定し、印刷ジョブ毎にパケットサイズを最適に設定する。
【0038】
まず、プリンタ20は、印刷するページが1ページ目かどうか判定し(S501)、印刷ジョブの1ページ目を印刷するのであれば、パケットサイズをデフォルト値に設定する(S502)。デフォルト値とは、あらかじめ設定された初期値のことで、例えば、16キロバイトである。
【0039】
プリンタ20は、印刷ジョブの2ページ目以降を印刷するのであれば、前ページを印刷した際のバッファ空き速度を求める(S503)。バッファの空き速度は、ページデータの受信から1ページ分のデータが受信バッファから読み出されるまでの時間と、ページデータサイズから印刷タスク24によって算出される。また、印刷タスク24が、ページデータ受信から印刷終了までの時間と、ページデータサイズからバッファの空き速度を求めることも可能である。
【0040】
プリンタ20は、後述するタイムテーブルを参照し、現在のパケットサイズに対応するバッファ空き速度基準値を求める(S504)。タイムテーブルには、パケットサイズに対応するバッファ空き速度基準値が記述されている。タイムテーブルは、図示省略されたROM(ReadOnlyMemory)に出荷時に記録され、プリンタ20の電源投入時にメモリ26にロードされる。
【0041】
続いて、プリンタ20は、ステップS503で測定されたバッファ空き速度が、ステップS504のバッファ空き速度基準値よりも速いか判定する(S505)。これは、CPU21が、メモリ26にロードされたバッファ空き速度基準値と、印刷タスク24の持つ、測定されたバッファ空き速度を比較することで行う。
【0042】
ステップS505で速いと判定された場合、現在のパケットサイズよりも大きなパケットサイズを設定する(S506)。ステップS505で遅いと判定された場合、現在のパケットサイズよりも小さなパケットサイズを設定する(S507)。
【0043】
ステップS506またはS507にて起こるパケットサイズの増減量は、タイムテーブルにパケットサイズ増減量として、記録されており、例えば、4キロバイトである。そして、ステップS502またはS506またはS507で決定されたパケットサイズを基にページデータを印刷する(S508)。
【0044】
上記ステップS501からS508に従って所定の回数パケットサイズを変更後(S509)、その印刷ジョブにて使用するパケットサイズを最終的に決定する(S510)。例えば、最後に設定されたパケットサイズを選択し、その印刷ジョブの残りのページデータに対するパケットサイズとして固定する。
【0045】
ステップS509で、所定の回数に満たなければ、ステップS501からS508を行い、新たなページデータに対するパケットサイズを決定する。なお、図5では、所定の回数パケットサイズを変更後、最終的なパケットサイズを固定し、印刷ジョブの残りのページに対して、同じパケットサイズを使用するが、パケットサイズを固定せず、ページ毎に変更することも可能である。
【0046】
図5のパケットサイズ決定処理によって、受信バッファ空き速度が速い印刷ジョブの場合、パケットサイズを現在の数値より大きく設定することで、クレジット要求とその応答回数によるオーバヘッドを減少でき、印刷効率の改善が可能である。また、受信バッファ空き速度が遅い印刷ジョブの場合、パケットサイズを現在の数値より小さく設定することで、ゼロクレジットによるオーバヘッドを減少でき、印刷効率の改善が可能である。
【0047】
図6は、タイムテーブルの一例を示す図である。パケットサイズ601(単位キロバイト)ごとに、バッファ空き速度基準値602(単位キロバイト毎秒)とパケットサイズ変動量603(単位キロバイト)の対応が記録される。パケットサイズ601が大きくなれば、バッファ空き速度基準値も大きくなる関係にある。
【0048】
例えば、パケットサイズ601がY1キロバイトの時、バッファ空き速度基準値602がY2キロバイト毎秒で、計測されたバッファ空き速度がY2キロバイト以上であれば、パケットサイズを現在よりX1キロバイト増加させる。逆に下回れば、X1キロバイト減少させる。
【0049】
図7は、パケットサイズフィールドを説明する図である。図7には、D4通信にて使用されるパケット71が描かれている。パケット71は、ある用途に使用される複数のフィールドに区切られる。その中に、パケットサイズを決定するパケットサイズフィールド72が2バイト確保される。このパケットサイズフィールド72に、指定できる値は、0〜65,535バイトである。図7に示されているのは、パケットサイズを16キロバイトに設定する例である。
【0050】
なお、本発明において、また、インタフェースタスク22は、データ通信を安定化させるために、プリンタ内において、データ変換処理などを行う印刷タスク24などに比較してより高い優先度でCPUなどのリソースを占有する。これは、もしインタフェースタスク22の優先度が印刷タスク24などよりも低いと、ホストコンピュータ10とインタフェースタスク22がデータ通信中であっても、優先度の高い他のタスクによる割り込み処理がおき、データ通信が中断される。すると、データ通信を最初からやり直すことになり、ホストコンピュータ10、プリンタ20で更にリソースを消費し、印刷効率を悪くするためである。
【0051】
従って、この優先度の高いインタフェースタスク22による印刷データの転送効率を上げることで、データ変換処理を行う印刷タスク24の処理時間も長くなり、さらに印刷処理効率を高めることができる。
【図面の簡単な説明】
【図1】実施の一形態における構成例を示す図
【図2】受信バッファの内部を模式的に表した一例を示す図
【図3】本発明におけるデータ転送処理を説明する図
【図4】本発明におけるデータ転送処理を説明する図
【図5】パケットサイズ決定処理を説明するフローチャート
【図6】タイムテーブルの一例を示す図
【図7】パケットサイズフィールドを説明する図
【符号の説明】
10 ホストコンピュータ、 20 プリンタ、 21 CPU、
22 インタフェースタスク、 23 バッファ、 24 印刷タスク、
25 印刷エンジン、 26 メモリ、 27 クレジット
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a printer with improved print data transfer efficiency.
[0002]
[Prior art]
After receiving the print data transmitted from the host computer, the printer temporarily stores the print data in a storage device called a buffer and outputs it to a medium such as paper or a file. Further, the printer transmits information such as a printing progress status, a paper jam, or an out of ink to the host computer as a printing status.
[0003]
For this purpose, the printer transmits and receives data to and from the host computer using the communication standard of IEEE1284.4. In this communication (hereinafter referred to as D4 communication), communication is performed by dividing channels according to data to be handled, such as print status and print data.
[0004]
The host computer and the printer divide the print data into packets in packet size units, and perform D4 communication. Conventionally, when a channel for handling print data is initialized, a packet size specified by a printer driver installed in a host computer is fixedly set as it is as a packet size. That is, the packet size set at the time of channel initialization has been applied to any print job.
[0005]
After the channel initialization, the following communication processing is performed to transfer the print data. That is, first, the host computer requests the number of packets that can be received at one time by the printer via the printer driver (credit request). In response, the interface task of the printer returns the number of receivable packets according to the free space in the reception buffer.
[0006]
If there is no free space in the reception buffer, the interface task of the printer returns zero credit (the number of packets is zero), and in response, the printer driver transmits a credit request again after a predetermined time has elapsed. When the number of receivable packets is returned from the printer, the host computer transmits the print data at once by the number of packets via the printer driver.
[0007]
In this print data transfer process, print data for the number of packets is continuously transmitted, and reception confirmation is not performed for each packet. When the transfer of the print data for one page is completed, the host computer performs a process of closing the channel. Then, as print data transfer processing for the next page, channel initialization is started, and the above-described communication processing is repeated for each page.
[0008]
[Problems to be solved by the invention]
However, conventionally, the packet size determined at the time of channel initialization is fixedly applied to any print job. Since the print processing speed of the printer is different depending on the data type of the print job such as text data or image data, there is also a difference in the reception buffer free speed.
[0009]
If the set packet size is too large for a print job with a low reception buffer free speed, there is a high probability that the host computer requests a credit and the printer returns zero credit before processing one packet. When zero credits occur, the overhead increases and the printing efficiency decreases.
[0010]
If the set packet size is too small for a print job with a high reception buffer free speed, a credit request and the number of responses to the request frequently occur, which causes an increase in overhead and similarly lowers printing efficiency.
[0011]
Therefore, even though the fixed packet size is optimal for print data of a certain print job, it is not optimal for print data of another print job, so that it is not possible to increase the printing efficiency. Was out. Therefore, an object of the present invention is to provide a printer with high printing efficiency by setting an optimal packet size for each print job.
[0012]
[Means for Solving the Problems]
According to a first aspect of the present invention, there is provided a printer which receives print data from a host computer and prints the print data in response to a first request from the host computer at the start of printing. In response to a second request from the host computer requesting the number of transmission packets, the number of receivable transmission packets is returned, and print data of the returned transmission packet number is transmitted from the host computer. An interface task for receiving, a buffer for temporarily storing print data transmitted from the host, and a print task for processing print data stored in the buffer and instructing a print engine to print, The interface task is currently processing a transmission packet size to be returned in response to the first request. It is accomplished by providing a printer, characterized by variably controlling the size corresponding to the free speed of the buffer for the print job.
[0013]
According to the first aspect, the packet size can be changed for each print job, and by setting an optimized packet size, overhead in print data transmission performed between the host computer and the printer is reduced, and printing efficiency is increased. It becomes possible.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the technical scope of the present invention is not limited by such embodiments, but extends to the inventions described in the claims and their equivalents.
[0015]
FIG. 1 is a diagram illustrating a configuration example according to an embodiment of the present invention. The host computer 10 and the printer 20 perform D4 communication in order to transmit and receive data such as print data and print status. In D4 communication, communication is performed by dividing a channel for each data to be handled, and when the channel is initialized, the host computer 10 and the printer 20 determine a packet size to be used for subsequent communication.
[0016]
Then, the host computer 10 divides the print data and the like into a plurality of packets for each determined packet size, and transmits the packets to the printer 20. The transmitted packet is received by the interface task 22 that controls communication with the outside. The interface task 22 stores the received packet in the reception buffer 23.
[0017]
The print task 24 reconstructs data before division from the packets stored in the reception buffer 23. The print task 24 converts the received print data into printable data and supplies the print data to the print engine 25 in order to print the reconstructed print data by the print engine 25.
[0018]
The conversion to printable data means, for example, expanding the data into data corresponding to driving of nozzles of each color provided in an ink head of a print engine. After converting the print data into printable data, the print task 24 transmits the converted data and a print engine control command to the print engine 25.
[0019]
The print engine 25 has, for example, an ink head and a paper supply / discharge mechanism, and performs printing on a medium such as paper according to a control command from the print task 24. Since data is read from the reception buffer 23 by the processing of the print task 24, an empty area is created in the reception buffer 23. If there is a free space in the reception buffer 23, the host computer 10 sequentially performs the data transfer processing until the transfer of the remaining print data is completed.
[0020]
The interface task 22 and the print task 24 are functionally implemented by the CPU 21 executing an application program stored in the memory 26, but may be implemented as hardware.
[0021]
FIG. 2 is a diagram schematically illustrating an example of the inside of the reception buffer 23. One block when the reception buffer is divided for each packet size is called a credit 27.
[0022]
The size of one credit is equal to the packet size, and the number of credits and the number of packets correspond one to one. That is, the number of packets equal to the number of available credits can be received. In FIG. 2, a credit buffer of 128 kilobytes includes 8 credits with a packet size of 16 kilobytes.
[0023]
3 and 4 are diagrams for explaining the data transfer processing according to the present invention. This is an example in which the packet size can be changed for each page by performing a packet size determination process described later with reference to FIG. 5 for each page.
[0024]
In FIG. 3, first, the host computer 10 transmits an open request command to initialize a channel used for page data transfer (S301). As an argument of the command, the host computer 10 specifies the packet size as 65,535 bytes. This is the maximum number that can be represented in the packet size field described in FIG.
[0025]
The printer 20 performs a packet size determination process described later to determine a packet size (S302). In FIG. 3, it is assumed that the size is determined to be 16 kilobytes. Then, the printer 20 transmits an open channel reply command to the host computer 10 as a response to the open channel request command transmitted in step S301 (S303).
[0026]
In FIG. 3, the 16 kilobytes determined in step S302 are returned to the host computer 10. Through steps S301, S302, and S303, the packet size used in the subsequent page data transfer processing is determined to be 16 kilobytes.
[0027]
Next, the host computer 10 requests the number of receivable packets in the reception buffer to transfer the print data (S304). The printer 20 responds with the number of available credits in the reception buffer 23 as the number of receivable packets (S305). Here, the vacancy of 6 credits is notified.
[0028]
The host computer 10 transmits data in accordance with the number of credits returned in step S305 (S306). The host computer 10 transmits six packets to the printer 20.
[0029]
The host computer 10 completes the transmission of the page data, transmits a close channel request command, and ends the use of the channel (S307). The printer 20 transmits a close channel reply command to the host computer 10 as a response to the close channel request (S308). At this point, the page data transfer process ends once.
[0030]
Subsequently, if there is more page data, the data transfer processing of the next page is started.
The host computer 10 transmits an open request command and initializes a channel used for page data transfer (S309). As an argument of the command, the host computer 10 specifies the packet size as 65,535 bytes.
[0031]
The printer 20 performs a packet size determination process described later to determine a packet size (S310). In FIG. 3, it is assumed that the size is determined to be 20 kilobytes. Then, the printer 20 transmits an open channel reply command to the host computer 10 as a response to the open channel request command transmitted in step S309 (S311).
[0032]
In FIG. 3, the 20 kilobytes determined in step S310 are returned to the host computer 10. In steps S309, S310, and S311, the packet size used in the subsequent page data transfer processing is determined to be 20 kilobytes. Next, the host computer 10 requests the number of receivable packets in the reception buffer to transfer the print data (S312).
[0033]
Referring to FIG. 4, the printer 20 responds with the number of available credits in the reception buffer 23 as the number of receivable packets (S313). In FIG. 4, the vacancy of 4 credits is notified. The host computer 10 transmits data in accordance with the number of credits returned in step S313 (S314). The host computer 10 transmits four packets to the printer 20.
[0034]
Thereafter, steps S312 to S314 are repeated until the transfer of the page data is completed, and when the transfer of the page data is completed, the use of the channel is stopped by the close channel request and the close channel reply command as in steps S307 and S308.
[0035]
The data transfer processing of FIGS. 3 and 4 makes it possible to change the packet size for each page, and by setting an optimal packet size, it is possible to reduce overhead and increase printing efficiency. Since the packet size is changed for each page, the packet size is changed for each print job. Next, how to determine the optimum packet size will be described.
[0036]
FIG. 5 is a flowchart illustrating the packet size determination processing. The reception buffer free speed varies depending on the type of print data of the print job. If the packet size is made larger than the current setting for a print job with a high reception buffer free speed, the number of credit requests and the number of responses are reduced, and printing efficiency can be improved. Also, if the packet size is smaller than the current setting for a print job with a low reception buffer free speed, the overhead due to zero credits is reduced, and the printing efficiency can be improved.
[0037]
Therefore, in this packet size determination process, the receiving buffer free speed when printing the page data of the print job is determined based on the reference value set in accordance with the packet size. Increase the size. If the speed is slower than the reference value, the packet size is set smaller, and the packet size is set optimally for each print job.
[0038]
First, the printer 20 determines whether the page to be printed is the first page (S501), and if the first page of the print job is to be printed, sets the packet size to a default value (S502). The default value is a preset initial value, for example, 16 kilobytes.
[0039]
If the printer 20 is to print the second and subsequent pages of the print job, the printer 20 obtains the buffer free speed at the time of printing the previous page (S503). The buffer free speed is calculated by the print task 24 from the time from when page data is received until one page of data is read from the reception buffer, and the page data size. It is also possible for the print task 24 to determine the free speed of the buffer from the time from the reception of the page data to the end of the printing and the page data size.
[0040]
The printer 20 refers to a time table to be described later and obtains a buffer free speed reference value corresponding to the current packet size (S504). The time table describes a buffer empty speed reference value corresponding to the packet size. The time table is recorded in a ROM (Read Only Memory) not shown at the time of shipment, and is loaded into the memory 26 when the power of the printer 20 is turned on.
[0041]
Subsequently, the printer 20 determines whether the buffer empty speed measured in step S503 is faster than the buffer empty speed reference value in step S504 (S505). This is performed by the CPU 21 comparing the buffer empty speed reference value loaded in the memory 26 with the measured buffer empty speed of the print task 24.
[0042]
If it is determined in step S505 that the speed is fast, a packet size larger than the current packet size is set (S506). If it is determined in step S505 that the packet is late, a packet size smaller than the current packet size is set (S507).
[0043]
The amount of increase or decrease in packet size that occurs in step S506 or S507 is recorded in the time table as the amount of increase or decrease in packet size, and is, for example, 4 kilobytes. Then, page data is printed based on the packet size determined in step S502, S506, or S507 (S508).
[0044]
After changing the packet size a predetermined number of times in accordance with steps S501 to S508 (S509), the packet size used in the print job is finally determined (S510). For example, the packet size set last is selected and fixed as the packet size for the remaining page data of the print job.
[0045]
If the predetermined number is not reached in step S509, steps S501 to S508 are performed to determine the packet size for new page data. In FIG. 5, after changing the packet size a predetermined number of times, the final packet size is fixed, and the same packet size is used for the remaining pages of the print job. It is also possible to change each time.
[0046]
According to the packet size determination process of FIG. 5, in the case of a print job having a high reception buffer free speed, by setting the packet size larger than the current value, the overhead due to the credit request and the number of responses can be reduced, and the printing efficiency is improved. It is possible. Further, in the case of a print job having a low reception buffer free speed, by setting the packet size smaller than the current numerical value, the overhead due to zero credit can be reduced, and the printing efficiency can be improved.
[0047]
FIG. 6 is a diagram illustrating an example of the time table. For each packet size 601 (kilobytes), the correspondence between the buffer free speed reference value 602 (kilobytes per second) and the packet size variation 603 (kilobytes) is recorded. As the packet size 601 increases, the buffer empty speed reference value also increases.
[0048]
For example, when the packet size 601 is Y1 kilobytes, if the buffer empty speed reference value 602 is Y2 kilobytes per second and the measured buffer empty speed is Y2 kilobytes or more, the packet size is increased by X1 kilobytes from the present. On the other hand, if it falls below, it is reduced by X1 kilobytes.
[0049]
FIG. 7 is a diagram illustrating the packet size field. FIG. 7 illustrates a packet 71 used in the D4 communication. The packet 71 is divided into a plurality of fields used for a certain purpose. In that, two bytes of a packet size field 72 for determining the packet size are secured. The value that can be specified in the packet size field 72 is 0 to 65,535 bytes. FIG. 7 shows an example in which the packet size is set to 16 kilobytes.
[0050]
In the present invention, in order to stabilize data communication, the interface task 22 allocates resources such as a CPU with a higher priority than a print task 24 or the like which performs data conversion processing in a printer. Occupy. This is because if the priority of the interface task 22 is lower than that of the print task 24 or the like, even if the host computer 10 and the interface task 22 are performing data communication, an interrupt process by another higher priority task occurs, Communication is interrupted. Then, the data communication is restarted from the beginning, and the resources are further consumed by the host computer 10 and the printer 20, and the printing efficiency is deteriorated.
[0051]
Therefore, by increasing the transfer efficiency of the print data by the interface task 22 having the higher priority, the processing time of the print task 24 for performing the data conversion process is increased, and the print processing efficiency can be further increased.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of a configuration according to an embodiment; FIG. 2 is a diagram illustrating an example schematically illustrating the inside of a reception buffer; FIG. 3 is a diagram illustrating a data transfer process according to the present invention; FIG. 5 is a diagram illustrating a data transfer process according to the present invention. FIG. 5 is a flowchart illustrating a packet size determination process. FIG. 6 is a diagram illustrating an example of a time table. FIG. 7 is a diagram illustrating a packet size field.
10 host computer, 20 printer, 21 CPU,
22 interface tasks, 23 buffers, 24 print tasks,
25 print engines, 26 memory, 27 credits

Claims (4)

ホストコンピュータから印刷データを受信して印刷するプリンタにおいて、
印刷開始時に前記ホストコンピュータからの第1の要求に応答して、前記印刷データの送信パケットサイズを返信し、送信パケット数を要求する前記ホストコンピュータからの第2の要求に応答して、受信可能な送信パケット数を返信し、当該返信した送信パケット数の印刷データを前記ホストコンピュータから受信するインタフェースタスクと、
前記ホストから送信された印刷データを一時的に蓄積するバッファと、
前記バッファに蓄積された印刷データを処理して印刷エンジンに印刷を指令する印刷タスクとを有し、
前記インタフェースタスクは、前記第1の要求に応答して返信する送信パケットサイズを、現在処理中の印刷ジョブに対する前記バッファの空き速度に応じたサイズに可変制御することを特徴とするプリンタ。
In a printer that receives print data from a host computer and prints,
At the start of printing, a transmission packet size of the print data is returned in response to a first request from the host computer, and reception is possible in response to a second request from the host computer requesting the number of transmission packets. An interface task for returning the number of transmitted packets, and receiving print data of the returned number of transmitted packets from the host computer;
A buffer for temporarily storing print data transmitted from the host,
A print task for processing print data stored in the buffer and instructing a print engine to print,
The printer according to claim 1, wherein the interface task variably controls a transmission packet size returned in response to the first request to a size corresponding to an available speed of the buffer for a print job currently being processed.
請求項1において、
前記インタフェースタスクは、前記バッファの空き速度が第1の速度の時に、前記送信パケットサイズを第1のサイズに制御し、前記バッファの空き速度が前記第1の速度よりも速い第2の速度の時に、前記送信パケットサイズを前記第1のサイズよりも大きい第2のサイズに制御することを特徴とするプリンタ。
In claim 1,
The interface task controls the transmission packet size to a first size when the empty speed of the buffer is the first speed, and controls the transmission packet size at a second speed where the empty speed of the buffer is faster than the first speed. A printer, wherein the size of the transmission packet is sometimes controlled to a second size larger than the first size.
請求項2において、
前記インタフェースタスクは、前記印刷ジョブに対する前記バッファの空き速度を監視し、前記送信パケットサイズを、改ページ毎に設定することを特徴とするプリンタ。
In claim 2,
The printer according to claim 1, wherein the interface task monitors an available speed of the buffer for the print job, and sets the transmission packet size for each page break.
請求項1において、
前記インタフェースタスクは、前記印刷タスクよりも高い優先度で実行されることを特徴とするプリンタ。
In claim 1,
The printer according to claim 1, wherein the interface task is executed with a higher priority than the print task.
JP2002259553A 2002-09-05 2002-09-05 Printer with improved print data transfer efficiency Pending JP2004098313A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002259553A JP2004098313A (en) 2002-09-05 2002-09-05 Printer with improved print data transfer efficiency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002259553A JP2004098313A (en) 2002-09-05 2002-09-05 Printer with improved print data transfer efficiency

Publications (1)

Publication Number Publication Date
JP2004098313A true JP2004098313A (en) 2004-04-02

Family

ID=32260520

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002259553A Pending JP2004098313A (en) 2002-09-05 2002-09-05 Printer with improved print data transfer efficiency

Country Status (1)

Country Link
JP (1) JP2004098313A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008134846A (en) * 2006-11-28 2008-06-12 Dainippon Printing Co Ltd IC card communication module, IC card communication method, and computer program
JP2014056473A (en) * 2012-09-13 2014-03-27 Ricoh Co Ltd Information processing system, information transmission method, and program
JP2023074849A (en) * 2021-11-18 2023-05-30 コニカミノルタ株式会社 Image forming device, log information relay device, and log information amount response device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008134846A (en) * 2006-11-28 2008-06-12 Dainippon Printing Co Ltd IC card communication module, IC card communication method, and computer program
JP2014056473A (en) * 2012-09-13 2014-03-27 Ricoh Co Ltd Information processing system, information transmission method, and program
JP2023074849A (en) * 2021-11-18 2023-05-30 コニカミノルタ株式会社 Image forming device, log information relay device, and log information amount response device

Similar Documents

Publication Publication Date Title
JP4543340B2 (en) Image processing apparatus, image forming system, and program
EP1035498B1 (en) Printer, printer control method and storage medium for recording program
EP1026579B1 (en) Network-connectable printer, controller therefor, and method for controlling this controller
JPH1063450A (en) Print control method and print control device
JP4420207B2 (en) Host-based printer, host device, and print control method
JP2004098313A (en) Printer with improved print data transfer efficiency
JP2002091748A (en) Image processor
US20060082827A1 (en) Network printer to control a print queue and method thereof
US20050162694A1 (en) Printer control device
JPH1097391A (en) Printer system and print control method
JP2004102378A (en) Printer with high printing efficiency
JP2000148663A (en) DMA apparatus and image forming apparatus using the same
US6618164B1 (en) Network printer and network printing method
JP3809284B2 (en) Image generating apparatus, control method therefor, and printing apparatus
EP2372526A2 (en) Data dividing method and data dividing device
JP3574289B2 (en) Printer and method of adjusting reception buffer size in printer
JP4653607B2 (en) Printing device
JPH11265267A (en) Data processing device, driver switching method for data processing device, and storage medium storing computer readable program
JP2003303066A (en) Image processing system
US7388684B2 (en) Image transfer apparatus
JP3377292B2 (en) Printing device
JP4435796B2 (en) Image processing system
JP5105011B1 (en) Print control apparatus, image forming system, and program
US7380069B2 (en) Method and apparatus for DMA-generated memory write-back
JP3744351B2 (en) Printer, printer control method, computer-readable program, and storage medium storing the program