JP4320905B2 - Printer control apparatus, printer control method, and information recording medium - Google Patents

Printer control apparatus, printer control method, and information recording medium Download PDF

Info

Publication number
JP4320905B2
JP4320905B2 JP2000077109A JP2000077109A JP4320905B2 JP 4320905 B2 JP4320905 B2 JP 4320905B2 JP 2000077109 A JP2000077109 A JP 2000077109A JP 2000077109 A JP2000077109 A JP 2000077109A JP 4320905 B2 JP4320905 B2 JP 4320905B2
Authority
JP
Japan
Prior art keywords
data string
printer
data
printer control
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000077109A
Other languages
Japanese (ja)
Other versions
JP2000339124A (en
Inventor
政寛 箕輪
朝弘 小口
照哲 小口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2000077109A priority Critical patent/JP4320905B2/en
Publication of JP2000339124A publication Critical patent/JP2000339124A/en
Application granted granted Critical
Publication of JP4320905B2 publication Critical patent/JP4320905B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、プリンタ制御装置、プリンタ制御方法および情報記録媒体に関する。特に、リアルタイムコマンドの処理を行うプリンタに対してリアルタイムコマンドのデータ列と同じデータ列を含むようなイメージデータを印刷する場合であっても、プリンタの誤動作を防止することができるプリンタ制御装置、プリンタ制御方法およびこれらを実現するプログラムを記録した情報記録媒体に関する。
【0002】
【従来の技術】
プリンタ(印刷装置)は、紙などの印刷媒体に文字や図形を印刷するための装置として広く普及している。このようなプリンタはホストコンピュータ(情報処理装置)に接続され、ホストコンピュータは、文字や図形を印刷するためのデータ列や、プリンタ自体を制御するためのデータ列をプリンタに送信する。したがって、このようなホストコンピュータは、プリンタ制御装置として働く。
【0003】
ホストコンピュータがプリンタに送信するデータは、ビット列として見ることもバイト列として見ることもできる。特に、プリンタにおいては、8ビット(1バイト)単位でコマンド体系が構築され、いずれのコマンドも8の倍数のビット数、すなわち、あるバイト数からなるデータ列によって構築されることが多い。
【0004】
文字を印刷するためのデータ列としては、ASCIIコードと同じバイト値を使用する一方で、画像の印刷やユーザ定義フォントの定義においては、バイト列により白黒(すなわち、画像あるいはフォントを形成する各点を印字するか否か)を表す手法が使用されている。また、画像の印刷においては、画像の各点の色を各バイトに含まれる複数のビットによって表す手法もある。このような画像やフォントを表すデータをイメージデータという。
【0005】
プリンタはインターフェース部を介して、ホストコンピュータから送信される1バイトもしくは数バイトのデータを受信すると、受信割り込みが発生し、受信割り込み処理が起動される。受信割り込み処理では、以下の処理が行われる。
(1)受信したデータにリアルタイムコマンドが含まれるか否かを判別し、含まれている場合には、そのリアルタイムコマンドに対応する処理を直ちに実行する。
(2)受信したデータをRAM(Random Access Memory)で構成される受信バッファに記憶する。
【0006】
このように、通常のコマンドや印刷データは、受信バッファに格納された後FIFO(First-In-First-Out)的に処理されるのに対し、リアルタイムコマンドは、受信バッファに格納される前に処理される緊急性の高いコマンドであって、通常のコマンドや印刷データに優先して処理されるコマンドである。
上記の受信割り込み処理が終了すると通常処理に戻る。通常処理では、受信バッファに記憶されたデータ列を解釈して、RAMに用意されたプリントバッファに印刷イメージを展開する。印刷イメージは、印刷領域のどの部分を白くし、どの部分を黒くするか、すなわち、どのように印刷ヘッドを駆動するかを1と0のビット値で表現するのが一般的である。1パス分(例えば1行分)の印刷イメージが展開できたら、プリントバッファの内容にしたがって印刷ヘッドを駆動し、文字や図形を印刷する。
【0007】
受信バッファから読み出されたデータ列がリアルタイムコマンドに相当するデータ列である場合は、受信割り込み処理において当該コマンドに対応する処理がすでに行われているため、通常処理においては単に読み飛ばされる。
【0008】
さて、従来からリアルタイムコマンドとして、以下のようなものが使用されている。なお、以下のデータのバイト列は、ASCIIコードのニーモニックを使用して表示している。
・「DLE EOT NUL 」…プリンタの状態をリアルタイムにホストコンピュータに送信する。
・「DLE EOT BEL 」…プリンタのインクの状態をリアルタイムにホストコンピュータに送信する。
・「DLE EOT BS 」…MICR(Magnetic Ink Character Recognition)の状態をリアルタイムにホストコンピュータに送信する。
・「DLE ENQ 」…プリンタに対するリアルタイム要求。
・「DLE DC4 SOH 」…指定パルスをリアルタイムに出力する。
【0009】
ここで、各ニーモニックは十六進数表記で以下のように定義されるものであり、「0x」は十六進数を意味する接頭辞である。

Figure 0004320905
上記のとおりリアルタイムコマンドのデータ列には、NUL、SOH、EOT、ENQ、BEL、BS、DLE、DC4というバイト値以外は含まれない。
【0010】
一方で、従来から使用されている通常コマンドの一つである画像印刷コマンドは以下のようなフォーマットを有する。
・「ESC 0x6d n d1 … dn」
これは、高さ8ドット、行方向の幅「n」ドットの画像を印刷するコマンドである。「d1 … dn」のそれぞれは、高さ方向に8つ並んだドットのいずれを黒くし、いずれを白くするかを8ビットの値で現わす。すなわちd1 … dnがイメージデータのデータ列である。以下、この印刷コマンドのうち、nを長さパラメータ、nバイト長のデータ列であるd1 … dnをイメージデータパラメータと呼ぶ。これらのパラメータは、任意のバイト値をとることができる。
【0011】
【発明が解決しようとする課題】
しかしながら、イメージデータのデータ列の中に、リアルタイムコマンドと同じデータ列が偶然に現われることがある。したがって、本来リアルタイムコマンドと解釈すべきでない場合であっても、上記のように受信割り込み処理において、リアルタイムコマンドに対応する処理が実行されてしまう、という可能性があった。
【0012】
すなわち、ホストコンピュータが意図しないタイミングで意図しないリアルタイムコマンドの処理が実行されるため、例えば、ホストコンピュータ側でプリンタからのステータスデータを受信する準備がされておらず、プリンタとの整合性がとれなくなってしまうという可能性があった。
【0013】
このため、リアルタイムコマンドのデータ列と同じデータ列を含むようなイメージデータのデータ列が与えられても、リアルタイムコマンドの処理は実行せずに、当該イメージデータを印刷したものと同じ結果が得られるようにしたい、という要望があった。
【0014】
プリンタに対するコマンド体系を変更・拡張して、このような事態に対処する方策もありうる。しかしながら、既存のプリンタの資源を再利用できるような形でリアルタイムコマンドのデータ列とそれ以外のデータ列とを区別して処理させたい、という要望も大きい。
【0015】
本発明は、以上のような問題を解決するためになされたもので、リアルタイムコマンドの処理を行うプリンタに対してリアルタイムコマンドのデータ列と同じデータ列を含むようなイメージデータを印刷させる場合であっても、プリンタの誤動作を防止することができるプリンタ制御装置、プリンタ制御方法およびこれらを実現するプログラムを記録した情報記録媒体を提供することを目的とする。
【0016】
【課題を解決するための手段】
以上の目的を達成するため、本発明のプリンタ制御装置は、受付手段と、第1の送信手段と、生成手段と、第2の送信手段とを有し、受付手段は、プリンタにイメージデータを印刷させるコマンドのデータ列を受け付け、第1の送信手段は、受付手段により受け付けられたコマンドのデータ列が所定のデータ列を含まない場合、当該コマンドのデータ列をプリンタに送信し、生成手段は、受付手段により受け付けられたコマンドのデータ列が所定のデータ列を含む場合、そのそれぞれが当該所定のデータ列を含まない複数のコマンドのデータ列であって、プリンタに当該イメージデータと同じイメージデータを印刷させるものを生成し、第2の送信手段は、生成手段により生成された複数のコマンドのデータ列をプリンタに送信する。
【0017】
また本発明のプリンタ制御装置は、受付手段と、第1の送信手段と、生成手段と、第2の送信手段とを有し、受付手段は、プリンタに送信するデータブロックを受け付け、第1の送信手段は、受付手段により受け付けられたデータブロックが所定のデータ列を含まない場合、当該データブロックをプリンタに送信し、生成手段は、受付手段により受け付けられたデータブロックが所定のデータ列を含む場合、当該所定のデータ列を第1の部分と第2の部分とに分割し、第1の部分を含む第1のサブブロックと、第2の部分を含む第2のサブブロックとを生成し、第2の送信手段は、生成手段により生成された第1のサブブロックと第2のサブブロックとを別々にプリンタに送信する。
【0018】
これらの場合において、本発明のプリンタ制御装置が処理する所定のデータ列は、当該プリンタのリアルタイムコマンドのデータ列とすることができる。
【0019】
また、本発明のプリンタ制御装置は、プリンタに送信するための送信データ列(例えばビットイメージ印刷コマンド)が、所定のデータ列(例えばリアルタイムコマンドのデータ列)を含むか否かを判断する判断部と、判断部による判断結果に基づいて、送信データ列が所定のデータ列を含む場合、当該所定のデータ列を含まないよう送信データ列を分割し複数の分割データ列群を生成する生成部であって、送信データ列と複数のデータ列群とは実質的に同じ機能を有し、判断部による判断結果に基づいて、送信データ列または複数のデータ列群のいずれかをプリンタに送信する送信部とを有することを特徴とする。
【0020】
この場合において、送信データ列および分割データ列群は、ヘッダ部とパラメータ部とを有し、生成部は、送信データ列が有するヘッダ部を、分割データ列群のヘッダ部とし、また、送信データ列の分割数に応じて、分割データ列群のパラメータ部を生成することにより、複数のデータ列群に、送信データ列が有する機能と実質的に同じ機能を持たせることが容易に実現できる。
【0021】
本発明によれば、プリンタにデータを送信する前にリアルタイムコマンドのパターンをホスト装置側で検出し、当該パターンを跨るように複数のブロックに分割した後送信することができるので、意図しないリアルタイムコマンドの実行による弊害を未然に防止することができる。
【0022】
また、本発明のプリンタ制御装置は、マトリクス状に配列される印刷データ列と、当該印刷データ列の行方向および列方向の長さを表わす長さパラメータとを有する送信データをプリンタに送信するプリンタ制御装置において、印刷データ列が、所定のデータ列(例えば、当該プリンタを制御する特定のコマンドのデータ列と同様のデータ列)を含むか否かを判断する判断部と、判断部による判断結果に基づいて、印刷データ列が所定のデータ列を含む場合、当該所定のデータ列が位置する行列を特定する特定部と、特定部の特定結果に基づいて、所定のデータ列を分割すべく印刷データ列にダミーデータを挿入して複数の分割印刷データ列群を生成する分割部と、特定部の特定結果に基づいて、送信データの長さパラメータから、分割印刷データ列群の各々に適合する長さパラメータ群を変換生成する変換部と、判断部による判断結果に基づいて、分割部により生成された分割印刷データ列群と、変換部により変換生成された長さパラメータ群とからなる送信データ列群をプリンタに送信する送信部とを有することを特徴とする。
【0023】
本発明によれば、マトリックス状に配列されるイメージデータの中にリアルタイムコマンドと同じデータ列があっても、ダミーデータを挿入してこれを分割した後プリンタに送信することにより、プリンタの誤動作を防止することができる。
【0024】
この場合において、所定のデータ列がイメージデータのマトリックス内の最下行から配列される場合は、ダミーデータを挿入することなく、所定のデータ列と同じデータ列の先頭バイトを含む列までのデータと、それ以降のデータとに分割することにより、同様の効果を得ることができる。
【0025】
また、挿入すべきダミーデータの長さは、送信データの長さパラメータに基づいて決定することが望ましい。また、分割に応じて分割印刷データ列群の印刷開始位置を示すデータを生成し、送信データ列群とともにプリンタに送信することが望ましい。これにより、プリンタの誤動作を防止するとともに所望の印刷結果を得ることができる。
【0026】
なお、印刷データマトリックスの列方向は、プリンタの印刷媒体搬送方向と実質的に同一にすることができる。
【0027】
また、本発明は、プリンタ制御方法としても把握することが適当であり、その場合においても同様の作用、効果を奏するものである。
【0028】
本発明のプリンタ制御装置、プリンタ制御方法およびこれらを実現するプログラムをコンパクトディスク、フロッピーディスク、ハードディスク、光磁気ディスク、ディジタルビデオディスク、磁気テープ、半導体メモリなどの情報記録媒体に記憶することができる。このようなプログラムを「プリンタドライバ」と呼ぶ。
【0029】
さらに、本発明のプリンタ制御装置を制御し、プリンタ制御方法を実現するためのプログラムを、汎用コンピュータで実行することにより、当該汎用コンピュータを本発明のプリンタ制御装置とすることができ、プリンタ制御方法を実現することができる。
【0030】
また、本発明のプログラムをWWW(World Wide Web)のサーバコンピュータに配置し、ここからオペレータが適宜ダウンロードして情報処理装置に記憶させることにより、プログラムを更新して実行させることができる。
【0031】
【発明の実施の形態】
以下に本発明の一実施形態を説明する。なお、以下に説明する実施形態は説明のためのものであり、本願発明の範囲を制限するものではない。したがって、当業者であればこれらの各要素もしくは全要素をこれと均等なものに置換した実施形態を採用することが可能であり、これらの実施形態も本願発明の範囲に含まれる。
【0032】
以下では、本発明のプリンタ制御装置により制御されるプリンタ(従来から利用されているプリンタを含む)の概要を説明してから、本発明のプリンタ制御装置の説明を加えることとする。
【0033】
(プリンタの実施例)
図1に、本発明のプリンタ制御装置(ホストコンピュータ)が制御するプリンタの一実施形態のブロック構成図を示す。
【0034】
プリンタ101は、インターフェース102を介してホストコンピュータ120に接続されている。ホストコンピュータ120が送信したデータ列をインターフェース102を介して受信すると、CPU(Central Processing Unit;中央処理ユニット)103に受信割り込みが発生し、受信割り込み処理が起動される。前述のとおり、受信割り込み処理においてCPU 103は、受信したデータ列にリアルタイムコマンドが含まれているかを判断し、含まれている場合はこれに対応するリアルタイム処理を実行する。さらに、受信割り込み処理では、RAM 104に設けられた受信バッファ111に、受信したデータ列を記憶する。受信割り込み処理が終了すると、CPU 103の制御は通常処理に戻る。
【0035】
通常処理では、CPU 103は、RAM 104の受信バッファ111に記憶されたデータ列を印刷コマンドや印刷データ、プリンタ設定コマンドとして解釈し、フォントを記憶するROM(Read Only Memory)105からフォント形状を取得したり、イメージデータを生成したりして、RAM 104内に設けられたプリントバッファ112に印刷イメージを展開する。
【0036】
さらに、プリントバッファ112に展開された印刷イメージが所定の量、例えば1行に達した場合などに、当該印刷イメージにしたがって印刷機構106を駆動して、紙などの印刷媒体に文字や図形を印刷する。
【0037】
また、受信バッファ111に記憶されたデータ列がフォント定義コマンドである場合には、RAM 104内に当該フォントの定義を記憶する。ROM 105がEEPROM(Electrically Erasable Programmable ROM)やフラッシュメモリである場合には、フォント定義コマンドにしたがって、ROM 105の内容を更新することも可能である。
【0038】
また、RAM 104には、受信割り込み処理で使用する現在のモードを記憶する領域113が設けられている。これにより、リアルタイムコマンドの途中を受信しているのか、それともそれ以外のデータを受信しているのかがわかる。
【0039】
(プリンタの受信割り込み処理)
図2は、図1に示すプリンタ101の受信割り込み処理の流れの一実施形態を示すフローチャートである。この受信割り込み処理は、ホストコンピュータ120が送信するデータ列をプリンタ101のインターフェース102が受信する際に起動される。なお、以下では、インターフェース102が1バイトのデータを受信するごとに受信割り込みが発生する実施形態について説明するが、受信割り込みが1以上の任意のバイト数のデータを受信するごとに起動される場合であっても同様の制御が可能であり、当該実施形態も本発明の範囲に含まれる。
【0040】
上述のように、本受信割り込み処理は、ホストコンピュータ120が送信するデータをプリンタ101のインターフェース102が受信する際に起動される。
【0041】
受信割り込み処理が起動されると、まず、CPU 103は、インターフェース102が受信した1バイトのデータをRAM 104内の受信バッファ111に記憶する(ステップS201)。受信バッファ111は、リングバッファとして構成するのが一般的である。
【0042】
次に、RAM 104のモード領域113に記憶された現在の受信割り込みモードを調べる(ステップS202)。受信割り込みモードの値によって、現在リアルタイムコマンドの途中を受信しているのか否かが示される。
【0043】
さらに、ステップS201において受信されたデータの値に応じてRAM 104のモード領域113に記憶される受信割り込みモードの値を図3に示す状態遷移図にしたがって更新するとともに、必要があれば対応する処理を実施し(ステップS203)、本受信割り込み処理を終了する。
【0044】
図3は、受信割り込みにおける状態遷移を示す説明図である。この状態遷移図は、前述のリアルタイムコマンドのデータ列の体系から決まるものである。
【0045】
モードAは、現在はリアルタイムコマンド以外のコマンドを解釈していることを意味するモードである。モードAにいる場合、ステップS201において受信したデータの値が「DLE」であれば、モードBに移行する。
【0046】
モードBは、現在はリアルタイムコマンドの1バイト目(DLE)を受信していることを意味するモードである。モードBにいる場合、ステップS201において受信したデータの値に応じて、以下のように遷移する。
・「EOT」である場合は、モードCに移行する。
・「ENQ」である場合は、プリンタ101のリアルタイム要求に対応する処理を実行して、モードAに移行する。
・「DC4」である場合は、モードDに移行する。
・これ以外である場合は、受信しているデータ列はリアルタイムコマンドのデータ列ではないことになるので、モードAに移行する。
【0047】
モードCは、現在は「DLE EOT」で始まるリアルタイムコマンドを受信中であることを意味するモードである。モードCにいる場合、ステップS201において受信したデータの値に応じて、以下のように遷移する。
・「NUL」である場合は、プリンタ101の状態をホストコンピュータ120にリアルタイム送信し、モードAに移行する。
・「BEL」である場合は、プリンタ101の印刷機構106に含まれるインクの状態をホストコンピュータ120にリアルタイム送信し、モードAに移行する。
・「BS」である場合は、プリンタ101のMICRの状態をホストコンピュータ120にリアルタイム送信し、モードAに移行する。
・これ以外である場合は、受信しているデータ列はリアルタイムコマンドのデータ列ではないことになるので、モードAに移行する。
【0048】
モードDは、現在は「DLE DC4」で始まるリアルタイムコマンドを受信中であることを意味するモードである。モードDにいる場合、ステップS201において受信したデータの値に応じて、以下のように遷移する。
・「SOH」である場合は、指定パルスのリアルタイム出力を実行し、モードAに移行する。
・これ以外である場合は、受信しているデータ列はリアルタイムコマンドのデータ列ではないことになるので、モードAに移行する。
【0049】
比較的簡単な状態遷移の処理であれば、受信割り込み処理に必要な時間を短時間ですませることができる。
【0050】
(プリンタの通常処理)
通常処理は、プリンタ101が受信し、受信バッファ111に記憶されたデータを解釈して印刷する処理である。図4は、図1に示すプリンタ101の通常処理の制御の流れを示すフローチャートである。通常処理を行っている途中であっても、前述の受信割り込み処理が割り込みによって起動されることがありうる。
【0051】
なお、CPU 103は、受信バッファ111に処理していないデータが残っている間は当該データを取得し、残っていない場合には、前述の受信割り込み処理により受信バッファ111にデータが記憶されるまで待機する。このようなコルーチン的な処理が実行されるが、以下の説明では、簡単のため、上記の処理を1回行って1バイトのデータを受信バッファ111から取得する場合と、複数回行って複数バイトのデータを受信バッファ111から取得する場合とを合わせて、「受信バッファからデータを取得」と称することとする。
【0052】
まず、CPU 103は、受信バッファ111からデータを取得し(ステップS401)、そのデータの種類を調べる(ステップS402)。
【0053】
このデータがリアルタイムコマンドのデータ列であると判断された場合(ステップS402;リアルタイムコマンド)、これをスキップしてステップ401に戻る。すでに、前述した受信割り込み処理においてリアルタイムコマンドに対応するリアルタイム処理は実行済みだからである。
【0054】
一方、それ以外のコマンド、すなわち、通常処理コマンドのデータ列であると判断された場合(ステップS402;通常コマンド)、当該コマンドに対応する通常処理を実行し(ステップS403)、ステップS401に戻る。
【0055】
通常処理には、例えば、文字や図形の印刷、画像の印刷、フォントの登録、プリンタ101の設定などが含まれる。本発明は、特に、画像の印刷およびフォントの登録において、当該イメージのデータがプリンタ101に対してバイナリ表現で転送される場合に対処するものである。
【0056】
本発明のプリンタ制御装置は、このようなすでに普及しているプリンタを制御することができる。
【0057】
(プリンタ制御装置の実施例)
図5には、本発明のプリンタ制御装置(ホストコンピュータ)の一実施形態のブロック構成図を示す。
【0058】
本発明のホストコンピュータ120は、CPU 501によって制御される。ホストコンピュータ120に電源が投入されると、CPU 501は、ROM 502内の所定の場所に記憶されたIPL(Initial Program Loader)を実行し、処理を開始し、さらに、ハードディスク、フロッピーディスク、CD−ROM(Compact Disk ROM)などの不揮発性記憶装置503に記憶されたプログラムを実行することができる。プログラムの実行の際には、RAM 504を一時的な記憶装置として用いる。
【0059】
文字や図形を印刷するアプリケーションプログラムを実行する際には、印刷コマンドのデータ列をインターフェース505を介してプリンタに送信する。
【0060】
さらに、ホストコンピュータ120は、図示しないキーボードやマウスなどの入力装置、図示しないディスプレイなどの表示装置を備えることができる。
【0061】
ホストコンピュータ120で動作するOS(Operating System;オペレーティングシステム)は、これに接続されたハードウェア、例えばプリンタ101を資源として扱い、複数のアプリケーションから共用する場合の資源管理を行う。このような資源管理を行うためのプログラムが前述のプリンタドライバである。
【0062】
ホストコンピュータにおいてこのようなプリンタドライバがOSの一部として動作する場合、当該ホストコンピュータを本発明のプリンタ制御装置と見ることができる。
【0063】
アプリケーションからは、OSに対するシステムコール呼び出しとしてイメージデータがプリンタドライバに送られ、プリンタドライバはこれを受け付ける。したがって、CPU 501は、RAM 504と共働して受付手段として機能する。
【0064】
また、CPU 501は、RAM 504に記憶されたイメージデータを調べて、このデータを処理し、インターフェース505を介してプリンタ101に送信する。したがって、CPU 501は、RAM 504、インターフェース505と共働して、第1の送信手段、生成手段、第2の送信手段として機能する。同様に、判断部、生成部、送信部として、また、特定部、分割部、変換部、印刷開始位置指定部として機能する。
【0065】
また、不揮発性記憶装置503は、プログラム(プリンタドライバ)を記録した情報記録媒体として機能する。
【0066】
図6は、図5に示すプリンタ制御装置で実行されるプリンタ制御方法の処理の流れを示すフローチャートである。
【0067】
本発明のプリンタ制御方法は、OSが管理するアプリケーションが動作して、OSに対して印刷を依頼するシステムコールを呼び出すことによって起動する。また、プリンタドライバ内部のサブルーチン処理として起動される態様もありうる。
【0068】
本処理が開始されると、CPU 501は、当該呼び出しで指定された印刷したい処理に対応するデータを記憶するRAM 504内のアドレスと、当該データの大きさを調べる(ステップS601)。
【0069】
次に、ステップS601で取得したアドレスから順にデータを取得し(ステップS602)、当該データがどのような処理に対応するかを調べる(ステップS603)。
【0070】
そのデータ列が、画像印刷コマンドであった場合(ステップS603;画像印刷)、当該画像印刷コマンドのパラメータ部に前述のリアルタイムコマンドのデータ列と同じものが含まれるか否かを調べる(ステップS604)。例えば、画像印刷コマンドとして上述のような「ESC 0x6d n d1…dn」の形式のデータが指定されている場合には、そのパラメータ部「n d1…dn」に前述のリアルタイムコマンドのデータ列と同じものが含まれるか否かを調べる。
【0071】
含まれない場合には、その印刷コマンドのデータ列をプリンタ101に送信して(ステップS605)、ステップS609に進む。
【0072】
含まれる場合には、以下に説明する変換処理を行い、その印刷コマンドのデータ列を複数に分割して新たな印刷コマンドのデータ列を生成する(ステップS606)。
【0073】
さらに、生成された新たな印刷コマンドのデータ列のそれぞれについて、ステップS604〜ステップS606の処理を再帰的に行うことによりすべてのデータ列を処理して(ステップS607)、ステップS609に進む。
【0074】
一方、ステップS603において、画像印刷コマンド以外であった場合(ステップS603;その他)、当該コマンドに対応する処理を実行し(ステップS608)、ステップS609に進む。
【0075】
さらに、システムコールなどで指定されたデータ列をすべて処理したか調べ(ステップS609)、すべて処理した場合(ステップS609;Yes)、本処理を終了する。まだ処理していないデータ列が残っている場合は、ステップS602に戻る。
【0076】
以下、上述の画像印刷コマンド「ESC 0x6d n d1…dn」を例に、ステップS606における分割生成変換処理の第1の実施形態について説明する。本実施形態では、リアルタイムコマンドのデータ列と同じデータ列が、画像印刷コマンドに含まれる場合は、以下の2通りの可能性がある。
(1)長さパラメータから当該リアルタイムコマンドのデータ列と同じデータ列が始まる場合。
(2)イメージデータパラメータに当該リアルタイムコマンドのデータ列と同じデータ列が含まれる場合。
【0077】
このそれぞれについて、分割生成変換の処理を説明する。まず、長さパラメータからリアルタイムコマンドのデータ列と同じデータ列が始まる場合であるが、これは、長さパラメータがバイト値DLE=0x10=16の場合、すなわち、画像イメージが高さ8ドット、行方向の幅16ドットの場合である。この場合、行方向の幅の和が16になるような2つの画像印刷コマンドに分割すればよい。例えば、指定された印刷コマンドが以下のようなものである場合、
ESC 0x6d 16 d1 d2 d3 … d16
次に示す2つの印刷コマンドに分割することができる。
ESC 0x6d 1 d1
ESC 0x6d 15 d2 d3 … d16
ここでは、まず幅1ドットだけ画像イメージd1を印刷し、次に15ドット幅だけ画像イメージd2 d3 … d16を印刷するように、画像印刷コマンドを分割している。その他、和が16となるような任意の分割が考えられる。例えば、以下のように分割してもよい。
ESC 0x6d 2 d1 d2
ESC 0x6d 14 d3 … d16
このような分割生成変換処理により、長さパラメータからリアルタイムコマンドのデータ列と同じデータ列が始まらないようにすることができる。
【0078】
次に、イメージデータパラメータにリアルタイムコマンドのデータ列と同じデータ列が含まれる場合について説明する。例えば、以下のような場合である。
ESC 0x6d (n+m+2) d1…dn DLE ENQ e1…em
ここでは、d1…dn DLE ENQ e1…em が長さ(n+m+2) バイトのイメージデータパラメータになっている。このような場合は、以下に示すように、リアルタイムコマンドのデータ列の途中で、画像印刷コマンドを分割すればよい。
ESC 0x6d (n+1) d1…dn DLE
ESC 0x6d (m+1) ENQ e1…em
まず、幅(n+1)ドットについて画像d1…dn DLEを印刷し、次に、幅(m+1)ドットについて画像ENQ e1…emを印刷するように分割することができる。
【0079】
これらの分割を繰り返すことにより、リアルタイムコマンドのデータ列が現れないように、画像印刷コマンドを同等の画像が印刷できる複数の画像印刷コマンドに変換することができる。
【0080】
次に、他の画像印刷コマンドを例に分割生成変換処理の第2の実施形態について説明する。本例の画像印刷コマンドは、以下のようなフォーマットを有する。
【0081】
「ESC 0x2a m n d1 ・・・ dk」
ここで、mは表1に示すとおり、高さ(縦)方向のドット数を指定するとともに、高さ(縦)および幅(横)方向の印刷ドット密度(単位DPI:Dots Per Inch)を指定するパラメータである。
【0082】
【表1】
Figure 0004320905
【0083】
nは幅(横)方向のドット数を指定するパラメータである。また、kは、当該画像印刷コマンドにより送信されるイメージデータの総数を表しており、例えば、m=0、1の場合は高さ方向のドット数が8ドット(1バイト相当)であるのでk=nバイト、m=32、33の場合は高さ方向のドット数が24ドット(3バイト相当)であるのでk=3nバイト、m=80、81の場合は高さ方向のドット数が48ドット(6バイト相当)であるのでk=6nバイトとなる。なお、イメージパラメータd1 ・・・ dkは列(高さ)方向から行(幅)方向に順に並べられるものである(図8参照)。
【0084】
本例の画像印刷コマンドに、リアルタイムコマンドのデータ列と同じデータ列が含まれる可能性は、上記と同様の2つの場合である。すなわち、(1)長さパラメータnからリアルタイムコマンドのデータ列と同じデータ列が始まる場合と、(2)イメージデータパラメータd1 ・・・ dkにリアルタイムコマンドのデータ列と同じデータ列が含まれる場合である。
【0085】
(1)長さパラメータnからリアルタイムコマンドのデータ列と同じデータ列が始まる場合
これは、上記第1の実施形態と同様に長さパラメータnがバイト値DLE=0x10=16の場合であって、上述の第1の実施形態で示した方法と同様にして、少なくとも2つの画像印刷コマンドに分割すればよい。
【0086】
(2)イメージデータパラメータd1 ・・・ dkにリアルタイムコマンドのデータ列と同じデータ列が含まれる場合
本例の場合、印刷ドット密度パラメータmの指定により複数のバイト列、すなわち3バイトまたは6バイトのデータ列が並ぶ場合がある。したがって、列の途中でイメージデータを分割する必要が生ずる。
【0087】
この場合の分割生成変換処理の流れを図7および図8を参照して説明する。図7は、本発明の第2の実施形態に係る分割生成変換処理の流れを示すフローチャートである。また、図8は、本発明の第2の実施形態に係る分割生成変換処理におけるデータ構造を視覚的に表わした模式図である。
【0088】
図6に示したステップS604においてリアルタイムコマンドと同様のデータ列が発見された場合、画像印刷コマンドのパラメータmで指定された縦方向のドット数(バイト数)に相当するダミーデータ(例えばNULデータのような空白のデータ)を、リアルタイムコマンドと同様のデータ列の1バイト目と2バイト目のデータ間に挿入する(ステップS701)。例えば、図8(A)に示すように、m=32(縦3バイト)のとき、リアルタイムコマンドと同様のデータ列が、ある列((j−1)列)の2行目から存在する場合、図8(B)に示すように、1バイト目(RTC1)と2バイト目(RTC2)の間にダミーデータを3バイト分挿入する。なお、イメージデータの総数は、挿入したダミーデータ分、すなわち1列分だけ増えることになる。したがって、横方向のドット数がnであった場合、ダミーデータ挿入後は(n+1)ドットとなり、全体のデータ数は3(n+1)バイトとなる。
【0089】
次に、リアルタイムコマンドと同様のデータ列の1バイト目RTC1を含むデータ列を最後列とする前段のデータ列と、その2バイト目RTC2を含むデータ列または挿入したすべてのダミーデータを含む列のいずれかを最前列とする後段のデータ列とに分割する(ステップS702)。この様子を図8(C)に示す。
【0090】
このとき、画像印刷コマンド「ESC * 32 n d(1) ・・・ RTC1 RTC2 ・・・ d(3n)」は、前記ステップS702における分割位置に応じて、長さパラメータnを変換生成し以下の二つのコマンドに分割されることとなる。
【0091】
前段:ESC * 32 (j-1) d1 ・・・ d(3j-5) RTC1 dummy1
後段:ESC * 32 (n-j+2) dummy2 dummy3 RTC2 d(3j+1) ・・・ d(3(n+1))
ここで、(j-1)が前段のデータの長さパラメータ、(n-j+2)が後段のデータの長さパラメータである。
【0092】
そして、ダミーデータを挿入することにより1列分(1ドット分)行方向に移動した後段のデータ列の印刷位置を、例えば、印刷位置指定コマンドにより補正し(ステップS703)、前段のデータ列の最後列と後段のデータ列の最前列とが重なるようにして印刷を実行すればよい。
【0093】
以上のように、リアルタイムコマンドのデータ列と同様のデータ列がイメージデータの中に存在する場合には、ダミーデータを挿入して当該イメージデータを分割するとともに、長さパラメータと印刷開始位置を補正することにより所望の印刷結果を得ることができる。
【0094】
なお、リアルタイムコマンドと同様のデータ列が最下行から、例えば、上記図8の例ではRTC1が3行目から位置する場合は、挿入したすべてのダミーデータが後段のデータ列の最前列に位置することになる。したがって、必ずしもダミーデータを用いる必要はなく、単にRTC1を含む列とRTC2を含む列との間でイメージデータを分割することもできる。この場合は印刷開始位置を補正する必要がないので、制御を容易にするとともにプリンタのスループットを向上させることができる。
【0095】
また、印刷開始位置を行と列とで指定し印刷することができる場合においては、ダミーデータを用いることなく、リアルタイムコマンドと同様のデータ列を含む行列部でイメージデータを分割し、後段のデータ列の印刷開始位置を行と列とで指定することにより所望の印字結果を得ることができる。
【0096】
なお、前記実施形態においては、前述のリアルタイムコマンドおよび画像印刷コマンドの例にしたがって説明したが、他のコマンド体系を採用した場合であっても同様の処理を採用することが可能であり、そのような実施形態も本発明の範囲に含まれる。
【0097】
また、前記実施形態においては、イメージデータを直接印刷させる通常コマンドを変換する技法について説明したが、ユーザによるフォント登録の場合においても同様の技法を適用することができる。またフォント登録による技法においても、同じイメージデータ(フォント形状)を印刷するコマンドのデータ列に変換することにかわりはないから、このような場合であっても本発明の範囲に含まれる。
【0098】
【発明の効果】
以上説明したように、本発明によれば、以下の効果を奏する。
【0099】
リアルタイムコマンドの処理を行うプリンタに対してリアルタイムコマンドのデータ列と同じデータ列を含むようなイメージデータを印刷させる場合であっても、プリンタの誤動作を防止することができるプリンタ制御装置、プリンタ制御方法を提供することができる。
【0100】
特に、従来から利用されているプリンタについて、何らの変更も加えずに、プリンタに対して印刷指令を送るホストコンピュータ側のプリンタドライバに本発明を適用することにより、プリンタの誤動作を防止することができる。従来は、エンドユーザやアプリケーションメーカーがリアルタイムコマンドのデータ列を含まないように印刷指令を構成しなければならなかったが、このような負担の大きい作業が不要になる。
【0101】
さらに、プログラムを記録した情報記録媒体をソフトウェア商品として、汎用コンピュータやプリンタのハードウェアと独立して容易に配布したり販売したりすることができるようになる。本発明の情報記録媒体に記録されたプログラムを汎用コンピュータなどの情報処理装置で実行すれば、当該情報処理装置により、上記の発明に係るプリンタ制御装置、プリンタ制御方法が実現できる。
【図面の簡単な説明】
【図1】本発明のプリンタ制御装置に制御されるプリンタの一実施形態の概要を示すブロック構成図。
【図2】本発明のプリンタ制御装置に制御されるプリンタの受信割り込み処理の流れのを示すフローチャート。
【図3】本発明のプリンタ制御装置に制御されるプリンタの受信割り込みにおける状態遷移を示す説明図。
【図4】本発明のプリンタ制御装置に制御されるプリンタの通常処理の流れを示すフローチャート。
【図5】本発明のプリンタ制御装置の一実施形態の概要を示すブロック構成図。
【図6】本発明のプリンタ制御装置で実行されるプリンタ制御方法の処理の流れを示すフローチャート。
【図7】本発明の第2の実施形態に係る分割生成変換処理の流れを示すフローチャート。
【図8】本発明の第2の実施形態に係る分割生成変換処理におけるデータ構造を視覚的に表わした模式図。
【符号の説明】
101 プリンタ
102 インターフェース
103 CPU
104 RAM
105 ROM
107 印刷機構
111 受信バッファ
112 プリントバッファ
113 現在のモード領域
120 ホストコンピュータ
501 CPU
502 ROM
503 不揮発性記憶装置
504 RAM
505 インターフェース[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a printer control device, a printer control method, and an information recording medium. In particular, even when printing image data that includes the same data sequence as the real-time command data sequence for a printer that performs real-time command processing, a printer control device and printer that can prevent printer malfunction The present invention relates to a control method and an information recording medium on which a program for realizing them is recorded.
[0002]
[Prior art]
Printers (printing apparatuses) are widely used as apparatuses for printing characters and figures on a printing medium such as paper. Such a printer is connected to a host computer (information processing apparatus), and the host computer transmits a data string for printing characters and graphics and a data string for controlling the printer itself to the printer. Therefore, such a host computer functions as a printer control device.
[0003]
The data sent from the host computer to the printer can be viewed as a bit string or a byte string. In particular, in a printer, a command system is constructed in units of 8 bits (1 byte), and each command is often constructed by a number of bits that is a multiple of 8, that is, a data string composed of a certain number of bytes.
[0004]
The data string for printing characters uses the same byte value as the ASCII code. On the other hand, when printing an image or defining a user-defined font, black and white (that is, each point forming an image or font) is represented by a byte string. Is used. In image printing, there is also a method of expressing the color of each point of an image by a plurality of bits included in each byte. Data representing such an image or font is called image data.
[0005]
When the printer receives 1-byte or several-byte data transmitted from the host computer via the interface unit, a reception interrupt is generated and the reception interrupt process is started. In the reception interrupt process, the following process is performed.
(1) It is determined whether or not the received data includes a real-time command. If the received data is included, processing corresponding to the real-time command is immediately executed.
(2) The received data is stored in a reception buffer composed of a RAM (Random Access Memory).
[0006]
Thus, normal commands and print data are processed in a FIFO (First-In-First-Out) manner after being stored in the reception buffer, whereas real-time commands are processed before being stored in the reception buffer. It is a highly urgent command to be processed, and is a command that is processed with priority over normal commands and print data.
When the above reception interrupt process ends, the process returns to the normal process. In the normal processing, the data string stored in the reception buffer is interpreted, and the print image is developed in the print buffer prepared in the RAM. In the print image, it is common to express which part of the print area is white and which part is black, that is, how to drive the print head, by bit values of 1 and 0. When a print image for one pass (for example, one line) can be developed, the print head is driven according to the contents of the print buffer to print characters and graphics.
[0007]
If the data string read from the reception buffer is a data string corresponding to a real-time command, the process corresponding to the command has already been performed in the reception interrupt process, and therefore is simply skipped in the normal process.
[0008]
Conventionally, the following are used as real-time commands. The following data byte strings are displayed using ASCII code mnemonics.
• “DLE EOT NUL”: Sends the printer status to the host computer in real time.
• “DLE EOT BEL”: Sends the printer ink status to the host computer in real time.
“DLE EOT BS”: Transmits the state of MICR (Magnetic Ink Character Recognition) to the host computer in real time.
・ "DLE ENQ": Real-time request to the printer.
• “DLE DC4 SOH”: Outputs the specified pulse in real time.
[0009]
Here, each mnemonic is defined in hexadecimal notation as follows, and “0x” is a prefix meaning a hexadecimal number.
Figure 0004320905
As described above, the data string of the real-time command does not include bytes other than NUL, SOH, EOT, ENQ, BEL, BS, DLE, and DC4.
[0010]
On the other hand, an image print command, which is one of normal commands conventionally used, has the following format.
・ "ESC 0x6d n d1… dn"
This is a command for printing an image having a height of 8 dots and a width of “n” dots in the row direction. Each of “d1... Dn” represents an 8-bit value indicating which of the eight dots arranged in the height direction is black and which is white. That is, d1... Dn is a data string of image data. Hereinafter, in this print command, n is referred to as a length parameter, and d1... Dn, which is a data string having an n-byte length, is referred to as an image data parameter. These parameters can take any byte value.
[0011]
[Problems to be solved by the invention]
However, the same data string as that of the real-time command may appear by chance in the data string of image data. Therefore, even if it should not be interpreted as a real-time command, there is a possibility that processing corresponding to the real-time command is executed in the reception interrupt processing as described above.
[0012]
In other words, unintentional real-time command processing is executed at an unintended timing by the host computer. For example, the host computer is not prepared to receive status data from the printer, making it inconsistent with the printer. There was a possibility that.
[0013]
Therefore, even if a data string of image data including the same data string as that of the real-time command is given, the same result as that obtained by printing the image data can be obtained without executing the processing of the real-time command. There was a request to do so.
[0014]
There may be a policy to cope with such a situation by changing / extending the command system for the printer. However, there is a great demand for distinguishing and processing real-time command data strings from other data strings in such a manner that resources of existing printers can be reused.
[0015]
The present invention has been made to solve the above-described problems, and is a case where image data including the same data string as the data string of the real-time command is printed by a printer that processes the real-time command. However, it is an object of the present invention to provide a printer control apparatus, a printer control method, and an information recording medium on which a program that realizes these can be prevented.
[0016]
[Means for Solving the Problems]
In order to achieve the above object, a printer control apparatus according to the present invention includes a reception unit, a first transmission unit, a generation unit, and a second transmission unit, and the reception unit transmits image data to the printer. When the command data string to be printed is received, the first transmission means transmits the command data string to the printer when the command data string received by the reception means does not include a predetermined data string. If the command data string received by the receiving means includes a predetermined data string, each of the command data strings does not include the predetermined data string, and the same image data as the image data is input to the printer. The second transmission unit transmits a data string of a plurality of commands generated by the generation unit to the printer.
[0017]
The printer control apparatus of the present invention further includes a receiving unit, a first transmitting unit, a generating unit, and a second transmitting unit. The receiving unit receives a data block to be transmitted to the printer, and When the data block received by the receiving unit does not include the predetermined data string, the transmitting unit transmits the data block to the printer, and the generating unit includes the data block received by the receiving unit including the predetermined data string. In this case, the predetermined data string is divided into a first part and a second part, and a first sub-block including the first part and a second sub-block including the second part are generated. The second transmission unit transmits the first sub-block and the second sub-block generated by the generation unit to the printer separately.
[0018]
In these cases, the predetermined data string processed by the printer control apparatus of the present invention can be a data string of a real-time command of the printer.
[0019]
Further, the printer control apparatus of the present invention determines whether or not a transmission data string (for example, a bit image print command) to be transmitted to the printer includes a predetermined data string (for example, a data string of a real-time command). And a generation unit that divides the transmission data sequence so as not to include the predetermined data sequence and generates a plurality of divided data sequence groups based on the determination result by the determination unit. The transmission data string and the plurality of data string groups have substantially the same function, and the transmission data string or the plurality of data string groups is transmitted to the printer based on the determination result by the determination unit. Part.
[0020]
In this case, the transmission data string and the divided data string group have a header part and a parameter part, and the generation part uses the header part of the transmission data string as the header part of the divided data string group, and the transmission data By generating the parameter portion of the divided data string group according to the number of divided columns, it is possible to easily realize that the plurality of data string groups have substantially the same function as that of the transmission data string.
[0021]
According to the present invention, the real-time command pattern can be detected on the host device side before transmitting data to the printer, and can be transmitted after being divided into a plurality of blocks so as to straddle the pattern. It is possible to prevent adverse effects caused by the execution of.
[0022]
The printer control apparatus of the present invention is a printer that transmits transmission data having a print data sequence arranged in a matrix and a length parameter indicating the length of the print data sequence in the row direction and the column direction to the printer. In the control device, a determination unit that determines whether the print data sequence includes a predetermined data sequence (for example, a data sequence similar to a data sequence of a specific command that controls the printer), and a determination result by the determination unit If the print data string includes a predetermined data string based on the above, the specific part for specifying the matrix in which the predetermined data string is located, and the predetermined data string is printed based on the specific result of the specific part. Split printing from dummy data inserted into the data string to generate multiple split print data string groups and the length parameter of the transmission data based on the specified result of the specified part A conversion unit for converting and generating a length parameter group suitable for each of the data sequence groups, a divided print data sequence group generated by the division unit based on a determination result by the determination unit, and a conversion unit generated by conversion And a transmission unit that transmits a transmission data string group including a length parameter group to a printer.
[0023]
According to the present invention, even if there is the same data string as the real-time command in the image data arranged in a matrix, dummy data is inserted and divided, and then transmitted to the printer. Can be prevented.
[0024]
In this case, when the predetermined data string is arranged from the bottom row in the image data matrix, the data up to the column including the first byte of the same data string as the predetermined data string is inserted without inserting dummy data. A similar effect can be obtained by dividing the data into the subsequent data.
[0025]
Moreover, it is desirable to determine the length of dummy data to be inserted based on the length parameter of transmission data. Further, it is desirable to generate data indicating the printing start position of the divided print data string group according to the division, and transmit the data to the printer together with the transmission data string group. Thereby, it is possible to prevent a malfunction of the printer and obtain a desired print result.
[0026]
Note that the column direction of the print data matrix can be substantially the same as the print medium conveyance direction of the printer.
[0027]
Further, it is appropriate to grasp the present invention as a printer control method, and even in that case, the same operation and effect can be obtained.
[0028]
The printer control apparatus, printer control method, and program for realizing them according to the present invention can be stored in an information recording medium such as a compact disk, floppy disk, hard disk, magneto-optical disk, digital video disk, magnetic tape, and semiconductor memory. Such a program is called a “printer driver”.
[0029]
Furthermore, the general-purpose computer can be used as the printer control apparatus of the present invention by executing the program for controlling the printer control apparatus of the present invention and realizing the printer control method on the general-purpose computer. Can be realized.
[0030]
In addition, the program of the present invention is arranged in a WWW (World Wide Web) server computer, and an operator can download and store it in an information processing apparatus from here, so that the program can be updated and executed.
[0031]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described below. The embodiments described below are for explanation, and do not limit the scope of the present invention. Accordingly, those skilled in the art can employ embodiments in which each of these elements or all of the elements are replaced with equivalent ones, and these embodiments are also included in the scope of the present invention.
[0032]
In the following, an overview of printers (including printers conventionally used) controlled by the printer control apparatus of the present invention will be described, and then description of the printer control apparatus of the present invention will be added.
[0033]
(Example of printer)
FIG. 1 is a block diagram of an embodiment of a printer controlled by a printer control apparatus (host computer) according to the present invention.
[0034]
The printer 101 is connected to the host computer 120 via the interface 102. When a data string transmitted by the host computer 120 is received via the interface 102, a reception interrupt is generated in a CPU (Central Processing Unit) 103, and reception interrupt processing is started. As described above, in the reception interrupt process, the CPU 103 determines whether or not a received real-time command is included in the received data string, and if included, executes a corresponding real-time process. Further, in the reception interrupt process, the received data string is stored in the reception buffer 111 provided in the RAM 104. When the reception interrupt process ends, the control of the CPU 103 returns to the normal process.
[0035]
In the normal processing, the CPU 103 interprets the data string stored in the reception buffer 111 of the RAM 104 as a print command, print data, or printer setting command, and acquires a font shape from a ROM (Read Only Memory) 105 that stores fonts. Or image data is generated, and the print image is developed in the print buffer 112 provided in the RAM 104.
[0036]
Further, when the print image developed in the print buffer 112 reaches a predetermined amount, for example, one line, the printing mechanism 106 is driven according to the print image to print characters and figures on a print medium such as paper. To do.
[0037]
When the data string stored in the reception buffer 111 is a font definition command, the definition of the font is stored in the RAM 104. When the ROM 105 is an EEPROM (Electrically Erasable Programmable ROM) or a flash memory, the contents of the ROM 105 can be updated according to the font definition command.
[0038]
In addition, the RAM 104 is provided with an area 113 for storing the current mode used in the reception interrupt process. As a result, it is possible to know whether a real-time command is being received or other data is being received.
[0039]
(Printer reception interrupt processing)
FIG. 2 is a flowchart showing an embodiment of the flow of reception interrupt processing of the printer 101 shown in FIG. This reception interrupt process is started when the interface 102 of the printer 101 receives a data string transmitted from the host computer 120. In the following, an embodiment in which a reception interrupt is generated every time the interface 102 receives 1 byte of data will be described, but the reception interrupt is activated every time data of an arbitrary number of bytes of 1 or more is received. However, similar control is possible, and the embodiment is also included in the scope of the present invention.
[0040]
As described above, the reception interrupt process is started when the interface 102 of the printer 101 receives data transmitted from the host computer 120.
[0041]
When the reception interrupt process is started, first, the CPU 103 stores 1-byte data received by the interface 102 in the reception buffer 111 in the RAM 104 (step S201). The reception buffer 111 is generally configured as a ring buffer.
[0042]
Next, the current reception interrupt mode stored in the mode area 113 of the RAM 104 is checked (step S202). The value of the reception interrupt mode indicates whether or not a real-time command is currently being received.
[0043]
Further, the value of the reception interrupt mode stored in the mode area 113 of the RAM 104 is updated according to the data value received in step S201 according to the state transition diagram shown in FIG. (Step S203), and this reception interrupt process is terminated.
[0044]
FIG. 3 is an explanatory diagram showing state transition in a reception interrupt. This state transition diagram is determined from the data string system of the real-time command described above.
[0045]
Mode A is a mode that means that commands other than real-time commands are currently being interpreted. When in mode A, if the value of the data received in step S201 is “DLE”, the mode is shifted to mode B.
[0046]
Mode B is a mode that means that the first byte (DLE) of the real-time command is currently received. When in mode B, transition is made as follows according to the value of the data received in step S201.
• If “EOT”, shift to Mode C.
In the case of “ENQ”, processing corresponding to the real-time request of the printer 101 is executed, and the mode is shifted to mode A.
・ If it is “DC4”, shift to mode D.
In other cases, the received data string is not the data string of the real-time command, so the mode is shifted to mode A.
[0047]
Mode C is a mode that means that a real-time command starting with “DLE EOT” is currently being received. When in mode C, transition is made as follows according to the value of the data received in step S201.
If “NUL”, the printer 101 transmits the status of the printer 101 to the host computer 120 in real time and shifts to mode A.
In the case of “BEL”, the state of the ink contained in the printing mechanism 106 of the printer 101 is transmitted to the host computer 120 in real time, and the mode is shifted to mode A.
If “BS”, the MICR status of the printer 101 is transmitted to the host computer 120 in real time, and the mode is shifted to mode A.
In other cases, the received data string is not the data string of the real-time command, so the mode is shifted to mode A.
[0048]
Mode D is a mode that means that a real-time command starting with “DLE DC4” is currently being received. When in mode D, transition is made as follows according to the value of the data received in step S201.
・ If it is “SOH”, execute real-time output of the specified pulse and shift to Mode A.
In other cases, the received data string is not the data string of the real-time command, so the mode is shifted to mode A.
[0049]
With relatively simple state transition processing, the time required for reception interrupt processing can be shortened.
[0050]
(Printer normal processing)
The normal process is a process for interpreting and printing data received by the printer 101 and stored in the reception buffer 111. FIG. 4 is a flowchart showing a control flow of normal processing of the printer 101 shown in FIG. Even during normal processing, the reception interrupt processing described above may be activated by an interrupt.
[0051]
Note that the CPU 103 acquires the data while the unprocessed data remains in the reception buffer 111, and when there is no remaining data, until the data is stored in the reception buffer 111 by the above-described reception interrupt processing. stand by. Although such coroutine processing is executed, in the following description, for the sake of simplicity, the above processing is performed once to acquire 1 byte of data from the reception buffer 111, and the processing is performed multiple times to perform multiple bytes. Together with the case of acquiring the data from the reception buffer 111, this is referred to as “acquiring data from the reception buffer”.
[0052]
First, the CPU 103 acquires data from the reception buffer 111 (step S401), and checks the type of the data (step S402).
[0053]
If it is determined that this data is a data string of a real-time command (step S402; real-time command), this is skipped and the process returns to step 401. This is because the real-time processing corresponding to the real-time command has already been executed in the above-described reception interrupt processing.
[0054]
On the other hand, if it is determined that the data is a command string other than that, that is, a data string of a normal process command (step S402; normal command), a normal process corresponding to the command is executed (step S403), and the process returns to step S401.
[0055]
The normal processing includes, for example, printing of characters and graphics, printing of images, font registration, setting of the printer 101, and the like. In particular, the present invention deals with a case where image data is transferred to the printer 101 in binary representation in image printing and font registration.
[0056]
The printer control apparatus of the present invention can control such already popular printers.
[0057]
(Example of printer control device)
FIG. 5 shows a block diagram of an embodiment of the printer control apparatus (host computer) of the present invention.
[0058]
The host computer 120 of the present invention is controlled by the CPU 501. When the host computer 120 is powered on, the CPU 501 executes an IPL (Initial Program Loader) stored at a predetermined location in the ROM 502, starts processing, and further, a hard disk, floppy disk, CD- A program stored in a nonvolatile storage device 503 such as a ROM (Compact Disk ROM) can be executed. When executing the program, the RAM 504 is used as a temporary storage device.
[0059]
When executing an application program for printing characters and graphics, a print command data string is transmitted to the printer via the interface 505.
[0060]
Further, the host computer 120 can include an input device such as a keyboard and a mouse (not shown) and a display device such as a display (not shown).
[0061]
An OS (Operating System) operating on the host computer 120 treats hardware connected thereto, for example, the printer 101 as a resource, and performs resource management when shared by a plurality of applications. A program for performing such resource management is the above-described printer driver.
[0062]
When such a printer driver operates as part of the OS in the host computer, the host computer can be regarded as the printer control apparatus of the present invention.
[0063]
From the application, image data is sent to the printer driver as a system call to the OS, and the printer driver accepts the image data. Therefore, the CPU 501 functions as an accepting unit in cooperation with the RAM 504.
[0064]
Further, the CPU 501 examines the image data stored in the RAM 504, processes this data, and transmits it to the printer 101 via the interface 505. Therefore, the CPU 501 functions as a first transmission unit, a generation unit, and a second transmission unit in cooperation with the RAM 504 and the interface 505. Similarly, it functions as a determination unit, a generation unit, and a transmission unit, and as a specification unit, a division unit, a conversion unit, and a print start position designation unit.
[0065]
The nonvolatile storage device 503 functions as an information recording medium that records a program (printer driver).
[0066]
FIG. 6 is a flowchart showing the flow of processing of the printer control method executed by the printer control apparatus shown in FIG.
[0067]
The printer control method according to the present invention is activated when an application managed by the OS operates and calls a system call for requesting printing to the OS. Also, there may be a mode in which it is started as a subroutine process inside the printer driver.
[0068]
When this process is started, the CPU 501 checks the address in the RAM 504 that stores data corresponding to the process desired to be printed designated by the call and the size of the data (step S601).
[0069]
Next, data is acquired in order from the address acquired in step S601 (step S602), and it is examined what processing the data corresponds to (step S603).
[0070]
If the data string is an image print command (step S603; image printing), it is checked whether or not the parameter part of the image print command includes the same data string as the above-described real-time command (step S604). . For example, when data in the format “ESC 0x6d n d1... Dn” as described above is specified as an image print command, the parameter portion “n d1. Find out if something is included.
[0071]
If not included, the data string of the print command is transmitted to the printer 101 (step S605), and the process proceeds to step S609.
[0072]
If included, the conversion process described below is performed, and the data sequence of the print command is divided into a plurality of data to generate a new print command data sequence (step S606).
[0073]
Further, with respect to each data string of the generated new print command, all the data strings are processed by recursively performing the processing from step S604 to step S606 (step S607), and the process proceeds to step S609.
[0074]
On the other hand, if the command is not an image print command in step S603 (step S603; other), processing corresponding to the command is executed (step S608), and the process proceeds to step S609.
[0075]
Further, it is checked whether all the data strings designated by the system call or the like have been processed (step S609). When all the data strings have been processed (step S609; Yes), this processing is terminated. If a data string that has not yet been processed remains, the process returns to step S602.
[0076]
Hereinafter, the first embodiment of the division generation conversion process in step S606 will be described using the above-described image print command “ESC 0x6d n d1... Dn” as an example. In this embodiment, when the same data string as that of the real-time command is included in the image print command, there are the following two possibilities.
(1) When the same data string as the data string of the real-time command starts from the length parameter.
(2) The image data parameter includes the same data string as that of the real-time command.
[0077]
For each of these, the division generation conversion process will be described. First, the same data string as the real-time command data string starts from the length parameter. This is when the length parameter is the byte value DLE = 0x10 = 16, that is, the image is 8 dots high and rows This is a case where the direction width is 16 dots. In this case, it may be divided into two image print commands such that the sum of the widths in the row direction is 16. For example, if the specified print command is as follows:
ESC 0x6d 16 d1 d2 d3… d16
It can be divided into the following two print commands.
ESC 0x6d 1 d1
ESC 0x6d 15 d2 d3… d16
Here, the image print command is divided so that the image image d1 is printed by 1 dot width first, and then the image images d2 d3... D16 are printed by 15 dot width. In addition, any division in which the sum is 16 can be considered. For example, it may be divided as follows.
ESC 0x6d 2 d1 d2
ESC 0x6d 14 d3… d16
By such division generation conversion processing, it is possible to prevent the same data string as the data string of the real-time command from starting from the length parameter.
[0078]
Next, a case where the image data parameter includes the same data string as that of the real-time command will be described. For example, the following cases.
ESC 0x6d (n + m + 2) d1… dn DLE ENQ e1… em
Here, d1 ... dn DLE ENQ e1 ... em is an image data parameter of length (n + m + 2) bytes. In such a case, as shown below, the image print command may be divided in the middle of the data string of the real-time command.
ESC 0x6d (n + 1) d1… dn DLE
ESC 0x6d (m + 1) ENQ e1 ... em
First, the image d1... Dn DLE can be printed for width (n + 1) dots, and then the image ENQ e1... Em can be printed for width (m + 1) dots.
[0079]
By repeating these divisions, the image print command can be converted into a plurality of image print commands that can print an equivalent image so that the data string of the real-time command does not appear.
[0080]
Next, a second embodiment of the division generation conversion process will be described using another image print command as an example. The image print command of this example has the following format.
[0081]
“ESC 0x2a mn d1 ・ ・ ・ dk”
Here, m specifies the number of dots in the height (vertical) direction as shown in Table 1, and also specifies the print dot density (unit DPI: Dots Per Inch) in the height (vertical) and width (horizontal) directions. It is a parameter to do.
[0082]
[Table 1]
Figure 0004320905
[0083]
n is a parameter that specifies the number of dots in the width (horizontal) direction. Also, k represents the total number of image data transmitted by the image print command. For example, when m = 0, 1, the number of dots in the height direction is 8 dots (corresponding to 1 byte). When n = m, m = 32, 33, the number of dots in the height direction is 24 dots (equivalent to 3 bytes), so when k = 3n bytes, m = 80, 81, the number of dots in the height direction is 48 Since it is a dot (equivalent to 6 bytes), k = 6n bytes. The image parameters d1... Dk are arranged in order from the column (height) direction to the row (width) direction (see FIG. 8).
[0084]
The possibility that the image print command of this example includes the same data string as the data string of the real-time command is two cases as described above. That is, (1) when the same data string as the data string of the real-time command starts from the length parameter n, and (2) when the same data string as the data string of the real-time command is included in the image data parameters d1. is there.
[0085]
(1) When the same data string as the real-time command data string starts from the length parameter n
This is the case where the length parameter n is the byte value DLE = 0x10 = 16 as in the first embodiment, and at least two images are obtained in the same manner as in the method described in the first embodiment. What is necessary is just to divide into print commands.
[0086]
(2) Image data parameter d1 ... When dk contains the same data string as that of the real-time command
In the case of this example, a plurality of byte sequences, that is, 3-byte or 6-byte data sequences may be arranged depending on the designation of the print dot density parameter m. Therefore, it becomes necessary to divide the image data in the middle of the column.
[0087]
The flow of division generation conversion processing in this case will be described with reference to FIGS. FIG. 7 is a flowchart showing the flow of split generation conversion processing according to the second embodiment of the present invention. FIG. 8 is a schematic diagram visually showing the data structure in the split generation conversion processing according to the second embodiment of the present invention.
[0088]
When a data sequence similar to the real-time command is found in step S604 shown in FIG. 6, dummy data corresponding to the number of dots (bytes) in the vertical direction specified by the parameter m of the image print command (for example, NUL data) (Blank data like this) is inserted between the data of the first byte and the second byte of the data string similar to the real-time command (step S701). For example, as shown in FIG. 8A, when m = 32 (vertical 3 bytes), a data column similar to the real-time command exists from the second row of a certain column ((j−1) column). As shown in FIG. 8B, three bytes of dummy data are inserted between the first byte (RTC1) and the second byte (RTC2). Note that the total number of image data increases by the amount of inserted dummy data, that is, by one column. Therefore, when the number of dots in the horizontal direction is n, after the dummy data is inserted, (n + 1) dots are obtained, and the total number of data is 3 (n + 1) bytes.
[0089]
Next, the previous data string including the data string including the first byte RTC1 of the same data string as that of the real-time command, and the data string including the second byte RTC2 or the column including all inserted dummy data Any one of them is divided into a subsequent data row (step S702). This is shown in FIG.
[0090]
At this time, the image print command “ESC * 32 nd (1)... RTC1 RTC2... D (3n)” converts the length parameter n according to the division position in step S702 and generates the following: It will be split into two commands.
[0091]
First stage: ESC * 32 (j-1) d1 ・ ・ ・ d (3j-5) RTC1 dummy1
Back: ESC * 32 (n-j + 2) dummy2 dummy3 RTC2 d (3j + 1) ・ ・ ・ d (3 (n + 1))
Here, (j-1) is the length parameter of the preceding data, and (n-j + 2) is the length parameter of the following data.
[0092]
Then, by inserting dummy data, the print position of the subsequent data string moved in the row direction by one column (one dot) is corrected by, for example, a print position designation command (step S703), and the data string of the previous data string is corrected. Printing may be performed so that the last row and the front row of the subsequent data row overlap.
[0093]
As described above, when a data string similar to the data string of the real-time command exists in the image data, dummy data is inserted to divide the image data, and the length parameter and the print start position are corrected. By doing so, a desired printing result can be obtained.
[0094]
Note that when the same data string as that of the real-time command is located from the bottom line, for example, when the RTC 1 is located from the third line in the example of FIG. It will be. Therefore, it is not always necessary to use dummy data, and image data can be simply divided between a column including RTC1 and a column including RTC2. In this case, since it is not necessary to correct the print start position, control can be facilitated and the throughput of the printer can be improved.
[0095]
In addition, when printing can be performed by specifying the print start position by row and column, image data is divided by a matrix portion including a data column similar to a real-time command without using dummy data, and the subsequent data A desired print result can be obtained by designating the print start position of the column by row and column.
[0096]
In the above-described embodiment, the description has been made according to the above-described examples of the real-time command and the image print command. However, similar processing can be adopted even when other command systems are adopted. Various embodiments are also included in the scope of the present invention.
[0097]
In the above-described embodiment, the technique for converting the normal command for directly printing the image data has been described. However, the same technique can be applied to the case of font registration by the user. Also, in the technique by font registration, since the same image data (font shape) is not converted to a command data string for printing, such a case is also included in the scope of the present invention.
[0098]
【The invention's effect】
As described above, the present invention has the following effects.
[0099]
Printer control apparatus and printer control method capable of preventing printer malfunction even when image data including the same data string as that of a real-time command is printed on a printer that performs real-time command processing Can be provided.
[0100]
In particular, by applying the present invention to a printer driver on the host computer side that sends a print command to a printer without making any changes to a printer that has been used conventionally, malfunction of the printer can be prevented. it can. Conventionally, an end user or an application manufacturer had to configure a print command so as not to include a data string of a real-time command. However, such a heavy work is unnecessary.
[0101]
Furthermore, the information recording medium on which the program is recorded can be easily distributed or sold as a software product independently of the general-purpose computer or printer hardware. When the program recorded on the information recording medium of the present invention is executed by an information processing apparatus such as a general-purpose computer, the information processing apparatus can realize the printer control apparatus and the printer control method according to the above invention.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an outline of an embodiment of a printer controlled by a printer control apparatus of the present invention.
FIG. 2 is a flowchart showing the flow of a printer reception interrupt process controlled by the printer control apparatus of the present invention.
FIG. 3 is an explanatory diagram showing a state transition in a reception interrupt of a printer controlled by the printer control apparatus of the present invention.
FIG. 4 is a flowchart showing a flow of normal processing of a printer controlled by the printer control apparatus of the present invention.
FIG. 5 is a block diagram showing an outline of an embodiment of a printer control apparatus of the present invention.
FIG. 6 is a flowchart showing a process flow of a printer control method executed by the printer control apparatus of the present invention.
FIG. 7 is a flowchart showing a flow of split generation conversion processing according to the second embodiment of the present invention.
FIG. 8 is a schematic diagram visually representing a data structure in divided generation conversion processing according to the second embodiment of the present invention.
[Explanation of symbols]
101 printer
102 interface
103 CPU
104 RAM
105 ROM
107 Printing mechanism
111 Receive buffer
112 Print buffer
113 Current mode area
120 Host computer
501 CPU
502 ROM
503 Nonvolatile memory device
504 RAM
505 interface

Claims (24)

以下の手段を有することを特徴とするプリンタ制御装置。
(a)プリンタにイメージデータを印刷させるコマンドのデータ列を受け付ける受付手段と、
(b)前記受付手段により受け付けられたコマンドのデータ列が所定のデータ列を含まない場合、当該コマンドのデータ列をプリンタに送信する第1の送信手段と、
(c)前記受付手段により受け付けられたコマンドのデータ列が所定のデータ列を含む場合、そのそれぞれが当該所定のデータ列を含まない複数のコマンドのデータ列であって、プリンタに当該イメージデータと同じイメージデータを印刷させるものを生成する生成手段と、
(d)前記生成手段により生成された複数のコマンドのデータ列をプリンタに送信する第2の送信手段。
A printer control apparatus comprising the following means.
(A) accepting means for accepting a command data string for causing the printer to print image data;
(B) a first transmission unit configured to transmit the command data string to the printer when the data string of the command received by the receiving unit does not include a predetermined data string;
(C) When the command data string received by the receiving means includes a predetermined data string, each of the command data strings does not include the predetermined data string, and the image data and Generating means for generating the same image data to be printed;
(D) Second transmission means for transmitting a data string of a plurality of commands generated by the generation means to the printer.
以下の手段を有することを特徴とするプリンタ制御装置。
(a)プリンタに送信するデータブロックを受け付ける受付手段と、
(b)前記受付手段により受け付けられたデータブロックが所定のデータ列を含まない場合、当該データブロックをプリンタに送信する第1の送信手段と、
(c)前記受付手段により受け付けられたデータブロックが所定のデータ列を含む場合、当該所定のデータ列を第1の部分と第2の部分とに分割し、前記第1の部分を含む第1のサブブロックと、前記第2の部分を含む第2のサブブロックとを生成する生成手段と、
(d)前記生成手段により生成された前記第1のサブブロックと前記第2のサブブロックとを別々にプリンタに送信する第2の送信手段。
A printer control apparatus comprising the following means.
(A) accepting means for accepting a data block to be transmitted to the printer;
(B) a first transmission unit configured to transmit the data block to the printer when the data block received by the reception unit does not include a predetermined data string;
(C) When the data block received by the receiving unit includes a predetermined data string, the predetermined data string is divided into a first part and a second part, and a first including the first part Generating means for generating a sub-block and a second sub-block including the second part;
(D) Second transmission means for separately transmitting the first sub-block and the second sub-block generated by the generation means to the printer.
プリンタに送信するための送信データ列が、所定のデータ列を含むか否かを判断する判断部と、
前記判断部による判断結果に基づいて、前記送信データ列が所定のデータ列を含む場合、当該所定のデータ列を含まないよう前記送信データ列を分割し複数の分割データ列群を生成する生成部であって、前記送信データ列と前記複数のデータ列群とは実質的に同じ機能を有し、
前記判断部による判断結果に基づいて、前記送信データ列または前記複数のデータ列群のいずれかをプリンタに送信する送信部とを有することを特徴とするプリンタ制御装置。
A determination unit that determines whether or not the transmission data string to be transmitted to the printer includes a predetermined data string;
A generation unit that divides the transmission data string so as not to include the predetermined data string and generates a plurality of divided data string groups when the transmission data string includes a predetermined data string based on a determination result by the determination unit The transmission data string and the plurality of data string groups have substantially the same function,
A printer control apparatus comprising: a transmission unit configured to transmit either the transmission data string or the plurality of data string groups to a printer based on a determination result by the determination unit.
請求項3記載のプリンタ制御装置において、
前記送信データ列および前記分割データ列群は、ヘッダ部とパラメータ部とを有し、
前記生成部は、前記送信データ列が有するヘッダ部を、前記分割データ列群のヘッダ部とすることを特徴とするプリンタ制御装置。
The printer control device according to claim 3.
The transmission data string and the divided data string group have a header part and a parameter part,
The printer control apparatus according to claim 1, wherein the generation unit uses a header portion of the transmission data sequence as a header portion of the divided data sequence group.
請求項4記載のプリンタ制御装置において、
前記生成部は、前記送信データ列の分割数に応じて、前記分割データ列群の前記パラメータ部を生成することを特徴とするプリンタ制御装置。
The printer control device according to claim 4.
The printer control apparatus, wherein the generation unit generates the parameter unit of the divided data string group according to the number of divisions of the transmission data string.
マトリクス状に配列される印刷データ列と、当該印刷データ列の行方向および列方向の長さを表わす長さパラメータとを有する送信データをプリンタに送信するプリンタ制御装置において、
前記印刷データ列が、所定のデータ列を含むか否かを判断する判断部と、
前記判断部による判断結果に基づいて、前記印刷データ列が前記所定のデータ列を含む場合、当該所定のデータ列が位置する行列を特定する特定部と、
前記特定部の特定結果に基づいて、前記所定のデータ列を分割すべく前記印刷データ列にダミーデータを挿入して複数の分割印刷データ列群を生成する分割部と、
前記特定部の特定結果に基づいて、前記送信データの前記長さパラメータから、前記分割印刷データ列群の各々に適合する長さパラメータ群を変換生成する変換部と、
前記判断部による判断結果に基づいて、前記分割部により生成された分割印刷データ列群と、前記変換部により変換生成された長さパラメータ群とからなる送信データ列群をプリンタに送信する送信部とを有することを特徴とするプリンタ制御装置。
In a printer control apparatus for transmitting transmission data having a print data sequence arranged in a matrix and a length parameter indicating the length in the row direction and the column direction of the print data sequence to the printer,
A determination unit that determines whether or not the print data string includes a predetermined data string;
Based on the determination result by the determination unit, when the print data string includes the predetermined data string, a specifying unit that specifies a matrix in which the predetermined data string is located;
A dividing unit that generates a plurality of divided print data string groups by inserting dummy data into the print data string to divide the predetermined data string based on the identification result of the identifying unit;
A conversion unit for converting and generating a length parameter group suitable for each of the divided print data string groups from the length parameter of the transmission data, based on a specification result of the specification unit;
A transmission unit that transmits a transmission data string group including a divided print data string group generated by the division unit and a length parameter group converted and generated by the conversion unit to a printer based on a determination result by the determination unit. A printer control device.
請求項6記載のプリンタ制御装置において、
前記分割部は、前記所定のデータ列が最下行から位置する場合を除いて、前印刷データ列にダミーデータを挿入することを特徴とするプリンタ制御装置。
The printer control device according to claim 6.
The printer control apparatus according to claim 1, wherein the dividing unit inserts dummy data into the preprint data sequence except when the predetermined data sequence is located from the bottom row.
請求項6記載のプリンタ制御装置において、
前記分割部は、前記送信データの長さパラメータに基づいて、前記挿入すべきダミーデータの長さを決定することを特徴とするプリンタ制御装置。
The printer control device according to claim 6.
The printer control apparatus according to claim 1, wherein the division unit determines a length of the dummy data to be inserted based on a length parameter of the transmission data.
請求項6乃至8記載のプリンタ制御装置において、
前記分割部により分割生成された分割印刷データ列群の印刷開始位置を示すデータを生成する印刷開始位置指定部を有し、
前記送信部は、前記送信データ列群とともに、前記指定部により指定された印刷開始位置データを前記プリンタに送信することを特徴とするプリンタ制御装置。
9. The printer control device according to claim 6, wherein:
A print start position designating unit that generates data indicating a print start position of the divided print data string group generated by the division unit;
The transmission unit transmits the print start position data designated by the designation unit to the printer together with the transmission data string group.
請求項6乃至9記載のプリンタ制御装置において、
前記印刷データ列の列方向は、前記プリンタの印刷媒体搬送方向と実質的に同一であることを特徴とするプリンタ制御装置。
The printer control device according to any one of claims 6 to 9,
The printer control apparatus according to claim 1, wherein the print data train has a column direction substantially the same as a print medium conveyance direction of the printer.
請求項1乃至10記載のプリンタ制御装置において、
前記所定のデータ列は、当該プリンタのリアルタイムコマンドのデータ列であることを特徴とするプリンタ制御装置。
The printer control device according to claim 1,
The printer control apparatus, wherein the predetermined data string is a data string of a real-time command of the printer.
以下のステップを有することを特徴とするプリンタ制御方法。
(a)プリンタにイメージデータを印刷させるコマンドのデータ列を受け付ける受付ステップと、
(b)前記受付ステップにおいて受け付けられたコマンドのデータ列が所定のデータ列を含まない場合、当該コマンドのデータ列をプリンタに送信する第1の送信ステップと、
(c)前記受付ステップにおいて受け付けられたコマンドのデータ列が所定のデータ列を含む場合、そのそれぞれが当該所定のデータ列を含まない複数のコマンドのデータ列であって、プリンタに当該イメージデータと同じイメージデータを印刷させるものを生成する生成ステップと、
(d)前記生成ステップにおいて生成された複数のコマンドのデータ列をプリンタに送信する第2の送信ステップ。
A printer control method comprising the following steps.
(A) a reception step for receiving a data string of commands for causing the printer to print image data;
(B) a first transmission step of transmitting the command data string to the printer when the data string of the command received in the receiving step does not include a predetermined data string;
(C) When the command data string received in the receiving step includes a predetermined data string, each of the command data strings does not include the predetermined data string, and the image data and A generation step for generating the same image data to be printed;
(D) A second transmission step of transmitting a data string of the plurality of commands generated in the generation step to the printer.
以下のステップを有することを特徴とするプリンタ制御方法。
(a)プリンタに送信するデータブロックを受け付ける受付ステップと、
(b)前記受付ステップにおいて受け付けられたデータブロックが所定のデータ列を含まない場合、当該データブロックをプリンタに送信する第1の送信ステップと、
(c)前記受付ステップにおいて受け付けられたデータブロックが所定のデータ列を含む場合、当該所定のデータ列を第1の部分と第2の部分とに分割し、前記第1の部分を含む第1のサブブロックと、前記第2の部分を含む第2のサブブロックとを生成する生成ステップと、
(d)前記生成ステップにおいて生成された前記第1のサブブロックと前記第2のサブブロックとを別々にプリンタに送信する第2の送信ステップ。
A printer control method comprising the following steps.
(A) a reception step for receiving a data block to be transmitted to the printer;
(B) a first transmission step of transmitting the data block to the printer when the data block received in the reception step does not include a predetermined data string;
(C) When the data block received in the receiving step includes a predetermined data string, the predetermined data string is divided into a first part and a second part, and a first including the first part Generating a sub-block and a second sub-block including the second portion;
(D) A second transmission step of separately transmitting the first sub block and the second sub block generated in the generation step to the printer.
プリンタに送信するための送信データ列が、所定のデータ列を含むか否かを判断する判断ステップと、
前記判断ステップによる判断結果に基づいて、前記送信データ列が所定のデータ列を含む場合、当該所定のデータ列を含まないよう前記送信データ列を分割し複数の分割データ列群を生成する生成ステップであって、前記送信データ列と前記複数のデータ列群とは実質的に同じ機能を有し、
前記判断ステップによる判断結果に基づいて、前記送信データ列または前記複数のデータ列群のいずれかをプリンタに送信する送信ステップとを有することを特徴とするプリンタ制御方法。
A determination step of determining whether or not the transmission data string to be transmitted to the printer includes a predetermined data string;
A generation step of generating a plurality of divided data string groups by dividing the transmission data string so as not to include the predetermined data string when the transmission data string includes a predetermined data string based on the determination result of the determining step The transmission data string and the plurality of data string groups have substantially the same function,
A printer control method comprising: a transmission step of transmitting either the transmission data string or the plurality of data string groups to a printer based on a determination result of the determination step.
請求項14記載のプリンタ制御方法において、
前記送信データ列および前記分割データ列群は、ヘッダ部とパラメータ部とを有し、
前記生成ステップは、前記送信データ列が有するヘッダ部を、前記分割データ列群のヘッダ部とすることを特徴とするプリンタ制御方法。
The printer control method according to claim 14.
The transmission data string and the divided data string group have a header part and a parameter part,
The printer control method according to claim 1, wherein the generating step uses a header part of the transmission data string as a header part of the divided data string group.
請求項15記載のプリンタ制御方法において、
前記生成ステップは、前記送信データ列の分割数に応じて、前記分割データ列群の前記パラメータ部を生成することを特徴とするプリンタ制御方法。
The printer control method according to claim 15.
The printer control method according to claim 1, wherein the generation step generates the parameter portion of the divided data string group according to the number of divisions of the transmission data string.
マトリクス状に配列される印刷データ列と、当該印刷データ列の行方向および列方向の長さを表わす長さパラメータとを有する送信データをプリンタに送信するプリンタ制御方法において、
前記印刷データ列が、所定のデータ列を含むか否かを判断する判断ステップと、
前記判断ステップにおける判断結果に基づいて、前記印刷データ列が前記所定のデータ列を含む場合、当該所定のデータ列が位置する行列を特定する特定ステップと、
前記特定ステップの特定結果に基づいて、前記所定のデータ列を分割すべく前記印刷データ列にダミーデータを挿入して複数の分割印刷データ列群を生成する分割ステップと、
前記特定ステップの特定結果に基づいて、前記送信データの前記長さパラメータから、前記分割印刷データ列群の各々に適合する長さパラメータ群を変換生成する変換ステップと、
前記判断ステップによる判断結果に基づいて、前記分割ステップにより生成された分割印刷データ列群と、前記変換ステップにより変換生成された長さパラメータ群とからなる送信データ列群をプリンタに送信する送信ステップとを有することを特徴とするプリンタ制御方法。
In a printer control method for transmitting transmission data having a print data sequence arranged in a matrix and a length parameter indicating the length in the row direction and the column direction of the print data sequence to a printer,
A determination step of determining whether the print data string includes a predetermined data string;
Based on the determination result in the determination step, when the print data string includes the predetermined data string, a specifying step for specifying a matrix in which the predetermined data string is located;
A dividing step of generating a plurality of divided print data string groups by inserting dummy data into the print data string to divide the predetermined data string based on the identification result of the identifying step;
A conversion step of converting and generating a length parameter group suitable for each of the divided print data string groups from the length parameter of the transmission data based on the identification result of the identification step;
A transmission step of transmitting, to the printer, a transmission data string group composed of the divided print data string group generated by the dividing step and the length parameter group converted and generated by the conversion step based on the determination result of the determination step. And a printer control method.
請求項17記載のプリンタ制御方法において、
前記分割ステップは、前記所定のデータ列が最下行から位置する場合を除いて、前印刷データ列にダミーデータを挿入することを特徴とするプリンタ制御方法。
The printer control method according to claim 17.
The printer control method according to claim 1, wherein, in the dividing step, dummy data is inserted into a preprint data sequence except when the predetermined data sequence is located from the bottom row.
請求項17記載のプリンタ制御方法において、
前記分割ステップは、前記送信データの長さパラメータに基づいて、前記挿入すべきダミーデータの長さを決定することを特徴とする印刷制御方法。
The printer control method according to claim 17.
The division control step determines a length of the dummy data to be inserted based on a length parameter of the transmission data.
請求項17乃至19記載のプリンタ制御方法において、
前記分割ステップにより分割生成された分割印刷データ列群の印刷開始位置を示すデータを生成する印刷開始位置指定ステップを有し、
前記送信ステップは、前記送信データ列群とともに、前記指定ステップにより指定された印刷開始位置データを前記プリンタに送信することを特徴とするプリンタ制御方法。
The printer control method according to claim 17 to 19, wherein
A print start position designation step for generating data indicating a print start position of the divided print data string group generated by the division step;
The transmitting step includes transmitting the print start position data specified in the specifying step together with the transmission data string group to the printer.
請求項17乃至20記載のプリンタ制御方法において、
前記印刷データ列の列方向は、前記プリンタの印刷媒体搬送方向と実質的に同一であることを特徴とするプリンタ制御方法。
21. The printer control method according to claim 17, wherein:
The printer control method according to claim 1, wherein the print data sequence is substantially the same as the print medium conveyance direction of the printer.
請求項12乃至21記載のプリンタ制御方法において、
前記所定のデータ列は、当該プリンタのリアルタイムコマンドのデータ列であることを特徴とするプリンタ制御方法。
The printer control method according to any one of claims 12 to 21.
The printer control method, wherein the predetermined data string is a data string of a real-time command of the printer.
請求項12乃至22いずれか1項に記載のプリンタ制御方法を実現するためのコンピュータプログラムを格納したコンピュータ読み取り可能な情報記録媒体。A computer-readable information recording medium storing a computer program for realizing the printer control method according to any one of claims 12 to 22. 請求項23記載の情報記録媒体において、
前記情報記録媒体は、コンパクトディスク、フロッピーディスク、ハードディスク、光磁気ディスク、ディジタルビデオディスク、磁気テープ、または、半導体メモリであることを特徴とする情報記録媒体。
The information recording medium according to claim 23, wherein
The information recording medium is a compact disk, floppy disk, hard disk, magneto-optical disk, digital video disk, magnetic tape, or semiconductor memory.
JP2000077109A 1999-03-25 2000-03-17 Printer control apparatus, printer control method, and information recording medium Expired - Fee Related JP4320905B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000077109A JP4320905B2 (en) 1999-03-25 2000-03-17 Printer control apparatus, printer control method, and information recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP11-82571 1999-03-25
JP8257199 1999-03-25
JP2000077109A JP4320905B2 (en) 1999-03-25 2000-03-17 Printer control apparatus, printer control method, and information recording medium

Publications (2)

Publication Number Publication Date
JP2000339124A JP2000339124A (en) 2000-12-08
JP4320905B2 true JP4320905B2 (en) 2009-08-26

Family

ID=26423599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000077109A Expired - Fee Related JP4320905B2 (en) 1999-03-25 2000-03-17 Printer control apparatus, printer control method, and information recording medium

Country Status (1)

Country Link
JP (1) JP4320905B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6551054B2 (en) * 2015-08-26 2019-07-31 セイコーエプソン株式会社 Driver program and control method

Also Published As

Publication number Publication date
JP2000339124A (en) 2000-12-08

Similar Documents

Publication Publication Date Title
US7903275B2 (en) Printer for communicating commands with host device and method of controlling said printer
US8953187B2 (en) Systems and methods for print resource management
KR100512666B1 (en) A printer controller, printer control method, and data storage medium for recording the controller and control method
US10043117B2 (en) Image processing system, method of controlling image processing system, and storage medium
JP4320905B2 (en) Printer control apparatus, printer control method, and information recording medium
JP2017024321A (en) Image processor, image formation device, and image processing time prediction method and program
US10649700B2 (en) Image generation-output control apparatus, method of controlling image generation-output control apparatus, and storage medium
US9952815B2 (en) Image generation-output control apparatus, image processing system, image processing method, and storage medium
EP0889434B1 (en) Printer system and method for sending data hints of upcoming data
JP5093576B2 (en) Printing control apparatus and image forming system
CN105138295B (en) File printing method and computer program product
US7196812B2 (en) Information processing apparatus and control code generation method
US8390827B2 (en) Drawing processing apparatus, image outputting apparatus, method for drawing processing and computer readable medium
JP3744276B2 (en) Printer, print control method, and recording medium recording program
JP3503470B2 (en) Printer, printer driver, printing system, and method of transmitting command data in printing system
JP3744275B2 (en) Printer, print control method, and recording medium recording program
JP4032575B2 (en) Printer, print control method, host device, and print system
JP2001086320A (en) Method for information processing and information processor
JP4325339B2 (en) Printing system, host computer and printer driver
JP2005258960A (en) Print control unit and method therefor
JP2008183780A (en) Image formation device, printing processing method and printing processing program
JP2010094853A (en) Printing apparatus, control method of printing apparatus and control program
JP2010211559A (en) Image processor, image processing method, and computer program for image processing
JP2020027476A (en) Image formation device, control method therefor, and program
JP2006085551A (en) Image processing device, control method for image processing device, image forming apparatus, control method for image forming apparatus, program for image processing device, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090422

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090512

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090525

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120612

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130612

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130612

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees