JP3544365B2 - PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS - Google Patents

PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS Download PDF

Info

Publication number
JP3544365B2
JP3544365B2 JP2001321171A JP2001321171A JP3544365B2 JP 3544365 B2 JP3544365 B2 JP 3544365B2 JP 2001321171 A JP2001321171 A JP 2001321171A JP 2001321171 A JP2001321171 A JP 2001321171A JP 3544365 B2 JP3544365 B2 JP 3544365B2
Authority
JP
Japan
Prior art keywords
printing
cut
control command
state
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.)
Expired - Lifetime
Application number
JP2001321171A
Other languages
Japanese (ja)
Other versions
JP2002200804A (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 JP2001321171A priority Critical patent/JP3544365B2/en
Publication of JP2002200804A publication Critical patent/JP2002200804A/en
Application granted granted Critical
Publication of JP3544365B2 publication Critical patent/JP3544365B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Handling Of Cut Paper (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Controlling Sheets Or Webs (AREA)
  • Delivering By Means Of Belts And Rollers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、ホストコンピュータに接続され、ホストコンピュータからの指令により印字を行う印字装置に関し、特にPOS/ECRなど金銭を扱う情報処理装置に最適な印字装置に関するものである。
【0002】
【従来の技術】
従来の印字装置においては、印字用紙がなくなった場合、印字装置のカバーが開けられた場合、エラーが発生した場合など、印字動作の続行が不適当な場合には、印字ヘッドを含む印字メカニズムを停止し、且つホストコンピュータとのインターフェースをオフライン(論理的な切断状態)とすることにより、印字装置および通信データの保全及び使用者の安全を確保しようとしている。この時、印字装置内部の制御が停止するため、すでに印字装置が受信済のデータはオフラインの発生した時点以降は処理されなくなる。また、オフライン発生以降はデータの受信を行わないのでこのデータは処理されなくなり、印字装置からの応答は全く無くなることになる。
【0003】
また、印字装置は紙送りスイッチが押され紙送り中の場合や、受信データを格納する受信バッファが満杯(以下、バッファフルという)になったりした場合にもオフラインとなり、前述の印字動作の続行が不適当な場合のオフライン状態とを区別するのは困難である。
【0004】
印字装置がオフラインになると、ホストコンピュータは印字データを送信できなくなり、POSやECRなどのシステム全体が停止することになる。この場合、ホストコンピュータは表示装置に「印字装置が異常です。点検してください。」などのメッセージを表示し、使用者が印字装置を調べてオフラインの原因を除去しなければならない。しかし、一般のPOSやECRの使用者には、この原因をを調べることは困難であり、長時間を要する。
【0005】
一方、受信バッファの中に格納されている制御コマンドは、古いもの(先に格納された制御コマンド)から順に解析され、コマンド処理が実行される。そして処理の終わった制御コマンドは、受信バッファから消去される。従って、連続してホストコンピュータから制御コマンドが送られてくる場合は、受信バッファに制御コマンドが次々に格納され、格納されている制御コマンドのうち古いものから順に処理されるのでホストコンピュータが制御コマンドを送信してから、印字装置が実際に処理を行うまでには、時差(以下、タイムラグという)が発生する。
【0006】
また、単票紙を扱う従来の印字装置においては、ホストコンピュータが単票用紙を選択して印字を実行させようとすると、印字ヘッド等の印字メカニズムを停止し単票用紙挿入待ちとなる。この時、印字装置内部の制御が停止するため単票用紙選択以降の受信データは、単票用紙が挿入されるか、あるいは所定の単票用紙挿入待ち時間が満了するまで処理されなくなり、印字装置からの応答は全く無くなることになる。従って、使用者が誤って単票用紙を選択してしまうと、当該時間の間レジの精算処理ができなくなり遅くなり、利用者を長時間待たせてしまうことにもなった。また、印字装置をリセットするか、もしくは電源を入れ直した場合には、それまで印字装置内に蓄えられた印字装置の状態を設定するためのデータが消去されてしまい、金銭を扱うPOS/ECR用の印字装置としては、非常に大きな問題であった。
【0007】
このような不具合による影響を少なくするために、従来の印字装置を用いた情報処理システムにおいては、ホストコンピュータは複数行の印字データを送らずに、1行毎にステータス応答要求コマンドを添付して、印字装置の状態を確認していた。その為、ホストコンピュータにとって大きな負担となり、情報処理システムのスループットの低下を招いていた。
【0008】
【発明が解決しようとする課題】
上記の事情から、従来POS/ECR分野においては、データ入力装置、処理装置及び印字装置が一体となった、スタンドアロン型の専用情報処理システムが広く用いられ、ホストコンピュータと印字装置とが汎用のインタフェースで接続されているシステムは、その高い柔軟性は評価されながらも、データの信頼性(いわゆるセキュリティ)への不安から普及が進んでいない。そして、当該データの信頼性を向上させ、同時に操作性を更に高めるために、印字装置の動作が停止している場合でも、その原因をホストコンピュータが知り、またその停止状態を速やかに解除できるような情報処理システムの実現が待望されている。
【0009】
本発明の目的は、上記の従来技術の有する課題を解決し、信頼性の高い情報処理装置を実現可能な印字装置を提供するとともに、ホストコンピュータの負担を軽減し、使用者に使いやすい印字装置を提供することにある。
【0010】
【課題を解決するための手段】
以上の目的を達成するため、本発明の原理にしたがって、下記の発明を開示する。
【0011】
本発明の第1の態様にかかる印刷装置は、ホスト装置に接続され、ホスト装置から送信される制御コマンドと印刷データとに従って印刷手段を制御し、印刷媒体に印刷を行う印刷装置において、制御コマンド及び印刷データを受信するデータ受信手段と、少なくとも制御コマンドを格納する受信データ格納手段と、受信データ格納手段に格納された制御コマンドを先着順に読みだして制御コマンドに応じた処理を実行する処理実行手段と、データ受信手段で受信されると直ちに制御コマンドを解析して、制御コマンドが所定のリアルタイム制御コマンドであるとき当該リアルタイム制御コマンドに対応する処理を実行する制御コマンド解析手段と、単票紙を搬送し、印刷手段に供給する単票紙搬送手段と、単票紙搬送手段への単票紙の供給を待って、単票紙搬送手段による搬送を開始せしめる単票紙搬送制御手段と、単票紙搬送制御手段の状態を検出する単票用紙状態記憶手段とを有し、単票用紙状態記憶手段により単票紙搬送制御手段の単票紙供給待ち状態が検出された場合において、制御コマンド解析手段は、リアルタイム制御コマンドに応じて単票紙搬送制御手段の動作をキャンセルする処理を実行し、データ受信手段及び制御コマンド解析手段は、回復可能なエラーの発生状態でも回復不可能なエラーの発生状態でも動作することを特徴とする。これにより、単票用紙の挿入待ちになった時、使用者がホストコンピュータから単票用紙挿入待ち解除のためのリアルタイム制御コマンドを送信することにより、単票用紙の挿入待ちを解除することができる。
【0012】
さらに本発明の他の態様にかかる印刷装置は、印刷装置の状態を検出する装置状態検出手段と、ホスト装置にデータを送信するデータ送信手段とを更に有し、制御コマンド解析手段は、リアルタイム制御コマンドに応じて、装置状態検出手段によって得られたデータをデータ送信手段に渡す装置状態報告手段を含み、データ送信手段は、回復可能なエラーの発生状態でも回復不可能なエラーの発生状態でも動作することを特徴とする。
【0013】
さらに本発明の他の態様にかかる印刷装置は、装置状態検出手段は、印刷媒体の有無を検出する用紙検出手段を含むことを特徴とする。
【0014】
さらに本発明の他の態様にかかる印刷装置は、装置状態検出手段は、印刷媒体の残量を検出する用紙検出手段を含むことを特徴とする。
【0015】
さらに本発明の他の態様にかかる印刷装置は、装置状態検出手段は、印刷装置の設定状態を検出する設定状態検出手段を含むことを特徴とする。
【0016】
さらに本発明の他の態様にかかる印刷装置は、印刷装置は、連続紙を搬送し、印刷手段に供給する連続紙搬送手段と、単票紙を搬送し、印刷手段に供給する単票紙搬送手段と、単票紙搬送手段の動作を禁止又は許可する単票紙選択手段とを有し、設定状態検出手段は、単票紙選択手段の状態を検出する単票紙選択検出手段を含むことを特徴とする。
【0017】
さらに本発明の他の態様にかかる印刷装置は、装置状態検出手段は、印刷装置の動作状態を検出する動作状態検出手段を含むことを特徴とする。
【0018】
さらに本発明の他の態様にかかる印刷装置は、動作状態検出手段は、単票紙搬送制御手段の状態を検出する単票用紙状態記憶手段を含むことを特徴とする。
【0019】
さらに本発明の他の態様にかかる印刷装置は、印刷装置は、制御コマンドと独立に前記印刷媒体の搬送動作の実行を指示するためのパネルスイッチを有し、動作状態検出手段は、印刷媒体搬送スイッチの状態を検出するスイッチ検出手段を含むことを特徴とする。
【0020】
本発明の第1の態様にかかる印刷装置の制御方法は、ホスト装置に接続され、ホスト装置から送信される制御コマンドと印刷データとに従って印刷手段を制御し、単票紙に印刷を行う印刷装置の制御方法において、制御コマンド及び印刷データを受信するデータ受信工程と、少なくとも制御コマンドを格納する受信データ格納工程と、格納された制御コマンドを先着順に読みだして制御コマンドに応じた処理を実行する処理実行工程と、データ受信工程で受信されると直ちに制御コマンドを解析して、制御コマンドが所定のリアルタイム制御コマンドであるとき当該リアルタイム制御コマンドに対応する処理を実行する制御コマンド解析工程と、単票紙の供給を待って単票紙の搬送を開始し、印刷手段に供給する単票紙搬送工程とを有し、単票紙搬送工程が単票紙供給待ち状態となっている場合において、制御コマンド解析工程は、リアルタイム制御コマンドに応じて単票紙搬送工程をキャンセルする処理を実行することを特徴とする。これにより、単票用紙の挿入待ちになった時、使用者がホストコンピュータから単票用紙挿入待ち解除のためのリアルタイム制御コマンドを送信することにより、単票用紙の挿入待ちを解除することができる。
【0021】
さらに本発明の他の態様にかかる印刷装置の制御方法は、印刷装置の状態を検出する装置状態検出工程を有し制御コマンド解析工程は、装置状態検出工程において得られたデータをホスト装置に送信するデータ送信工程を含むことを特徴とする。
【0022】
本発明の第1の態様にかかる情報処理装置は、印刷装置と、印刷装置に制御コマンド及び印刷データを含むデータを送信するホスト装置とを有し、印刷装置がデータに従って印刷手段を制御し、印刷媒体に印刷を行う、情報処理装置において、印刷装置は、ホスト装置にデータを送信するデータ送信手段と、制御コマンド及び印刷データを受信するデータ受信手段と、少なくとも制御コマンドを格納する受信データ格納手段と、印刷装置の状態を検出する装置状態検出手段と、データ受信手段で受信されると直ちに制御コマンドを解析して、制御コマンドが所定のリアルタイム制御コマンドであるとき当該リアルタイム制御コマンドに対応する処理を実行する制御コマンド解析手段と、受信データ格納手段に格納された制御コマンドを先着順に読みだして制御コマンドに応じた処理を実行する処理実行手段と、単票紙を搬送し、印刷手段に供給する単票紙搬送手段と、単票紙搬送手段への前記単票紙の供給を待って、単票紙搬送手段による搬送を開始せしめる単票紙搬送制御手段と、単票紙搬送制御手段の状態を検出する単票用紙状態記憶手段とを有すると共に、
単票用紙状態記憶手段により単票紙搬送制御手段の単票紙供給待ち状態が検出された場合において、制御コマンド解析手段は、リアルタイム制御コマンドに応じて単票紙搬送制御手段の動作をキャンセルする処理を実行し、データ受信手段及び制御コマンド解析手段は、回復可能なエラーの発生状態でも回復不可能なエラーの発生状態でも動作し、ホスト装置は、印字装置にリアルタイム制御コマンドを送信するコマンド送信手段とを有することを特徴とする。これにより、単票用紙の挿入待ちになった時、ホストコンピュータから単票用紙挿入待ち解除のためのリアルタイム制御コマンドを送信することにより、単票用紙の挿入待ちを解除することができる情報処理装置を提供できる。
【0023】
【発明の実施の形態】
以下、本発明による一実施例を、図面に従って説明する。
【0024】
一般に流通業界で使用される記録紙としては単票用紙と連続紙が有り、単票用紙にはスリップ紙と呼ばれる不定形の伝票用紙や、バリデーション紙と呼ばれる比較的定形で何枚かの複写紙を有するものが有る。連続紙としては店舗の記録用として保存する為のジャーナル紙と、領収証としてのレシート紙がある。
【0025】
図1は、これらの記録紙のスリップ紙、ジャーナル紙、レシート紙に印字可能な印字装置の全体図である。
【0026】
1は印字ヘッド本体であり、複数本のワイヤーが縦に並んだいわゆるワイヤードットヘッドである。この印字ヘッド1が矢印1A、1B方向に往復移動しながら印字を行う。3はインクリボンである。
【0027】
レシート紙17、ジャーナル紙18はロール紙の状態で、図の様に印字機構部の後ろから挿入し上部へ排出される。また、スリップ紙19は、印字機構部の前から挿入し(矢印19A)、上部へ排出される(矢印19B)。
【0028】
レシート紙、ジャーナル紙ともに、紙の終りを検出するニアエンド検出器20が装備されている。ニアエンド検出器20は、ロール紙の外径により矢印20A方向に回動するニアエンド検出レバー20aとニアエンド検出レバー20aによりオン、オフするプッシュスイッチ20bで構成される。ロール紙が終わりに近づくとその外径が小さくなり、ロール紙の中心に達するとニアエンド検出レバー20aが矢印20B方向に回動し、プシュスイッチ20bがオフして紙の終わり間近を検出する。
【0029】
レシート紙17は、印字後カッタユニット14によりカットされ、客に手渡される。
【0030】
印字装置は、図示しない本体ケースに覆われており、図示しないカバーと下ケース15とに分かれる。21は、カバー検出器であり、対向型のフォトセンサからなる。カバーが閉じているとカバー検出器21の光が遮断され、カバークローズが検出できる。
【0031】
図2は、本発明の印字装置において、連続紙と単票用紙を印字する場合の動作を示す機構図である。図2において(a)は連続用紙(図ではレシート紙)に印字する場合、(b)は単票用紙(スリップ紙)に印字する場合を示す。
【0032】
印字ヘッド1は、ワイヤー支持部1aの中に図示しないワイヤーピンが有り、プラテン2との間にインクリボン3を介在してレシート紙17に印字を行う。
【0033】
レシート紙17は、ガイドローラ5を介して紙案内板4a、4bの間に挿入され、紙送りローラ6a、6bにより紙送りされる。紙送りローラ6aはモータ等の駆動源(図示しない)と結合している。紙案内板4a,4bの途中にレシート紙検出器12が配置されている。レシート紙検出器12は、対向型のフォトセンサもしくは、レバースイッチなどで構成される。図では対向型のフォトセンサの例を示す。紙送りローラ6a,6bにより送られたレシート紙17は、インクリボン3とプラテン2の間を通り、紙押さえローラ7a,7b、カッタユニット14を介して印字装置上部へ排出される。カッタユニット14は、カッタ刃14aとカッタカバー14bから構成され、カッタ刃14aが図示しないモータなどの駆動源により矢印14A方向へ移動し、レシート紙17を切断する。
【0034】
図では、レシート紙の場合を示したが、ジャーナル紙の場合もカッタユニットを除いては同じ構成である。
【0035】
スリップ紙を印字する場合(図2(b))、スリップ紙19は、印字装置の手前のスリップ紙挿入開口部21から用紙を矢印19A方向に挿入する。ロール紙印字中は、スリップ送りローラ9aは、図2(a)の様にプランジャ10により矢印10A方向に引っ張られており、対向するスリップ送りローラ9bとは離れている。よって、スリップ紙19が挿入可能である。スリップ紙19を挿入すると、スリップ紙19はスリップ紙案内11a,11bを経てスリップ送りローラ8a,8bに突き当たる。この時スリップ紙検出器13によって紙が挿入されたかどうかを検出する。紙が挿入されたら、プランジャ10が解除されレバー10aは、矢印10B方向に回動し、スリップ送りローラ9bがスリップ送りローラ9aに押圧され、スリップ紙19が保持される。スリップ送りローラ8b,9bは図示しないモータなどの駆動源と結合しており、対向するスリップ送りローラ8a,9aとともに、矢印8A,8B,9A,9B方向にそれぞれ回転し、スリップ紙19を紙送りする。印字が終了すると、スリップ紙19は矢印19B方向に排出され、プランジャ10が駆動されてスリップ送りローラ9aはスリップ送りローラ9bと離れ、次のスリップ用紙が挿入可能となる。
【0036】
レシート紙17は図のように装着したままスリップ紙19に印字可能であり、また、スリップ紙19に複写紙を添付すれば、スリップ紙19とレシート紙17を同時に、同じ内容を印字することも可能である。
【0037】
スリップ紙検出器13は、レシート紙検出器12と同様に対向型のフォトセンサを用いている。
【0038】
15は本体下ケースであり、16はヘッド機構を支持するケースである。
【0039】
図3は、本発明の一実施例である印字装置の印字部構成図である。
【0040】
図によりヘッドキャリッジ駆動モータの脱調を検出する方法を示す。
【0041】
ヘッド1は、ワイヤーホルダ1aとともに、ヘッドキャリッジ1b上に固定されていて、このヘッドキャリッジ1bは、キャリッジ伝達ベルト32とキャリッジ駆動歯車31a、31bにより左右に移動する。キャリッジ駆動歯車31aは図示しないヘッドキャリッジ駆動モータと結合している。このモータは、一般的にはパルスモータが用いられており、実施例でもパルスモータを使用している。キャリッジ駆動歯車31aは、伝達歯車33を介して回転検出板34を回転させる。回転検出板34を挟むように対向型のフォトセンサからなるキャリッジ検出器35が配置されており、ヘッドキャリッジ1bの移動に従って、回転検出板34が回転し、これをキャリッジ検出器35が検出する。回転検出板34はプロペラ状に形成され、これが回転すると、キャリッジ検出器35の出力が周期的にオン、オフする。すなわち、図示しないヘッドキャリッジ駆動モータによって、ヘッドキャリッジ1bが左右に移動すると、キャリッジ検出器35によって、ヘッドキャリッジ1bの移動を検出する。
【0042】
印字ヘッド1とプラテン2の間にあるレシート紙、ジャーナル紙もしくはスリップ紙が、よれてワイヤーホルダ1aとプラテン2との間につまってしまうと紙ジャムとなり、ヘッドキャリッジ1bは、キャリッジ駆動モータの回転に追従せず、キャリッジ駆動モータは脱調する。これを、キャリッジ検出器35により検出する。これをキャリッジエラーと称す。
【0043】
印字ヘッド1は、印字位置の基準位置を特定する為、ホームポジションが必要である。ホームポジション検出器36は、対向型のフォトセンサであり、ヘッドキャリッジ1bを検出する。すなわち、ヘッドキャリッジ1bが左に移動し、ホームポジション検出器36の光を遮断する位置がホームポジションの基準位置となる。
【0044】
ヘッドキャリッジ1bが、ホームポジションに移動しようとしたとき、紙ジャムなどによりホームポジションに到達しないことをホームポジション検出器36により検出することができる。これをホームポジションエラーと称す。
【0045】
図4は、本発明を実現する制御回路の回路ブロック図である。
【0046】
印字ヘッド40、モータ類41、プランジャ類42により上述の印字装置の機構部を成しており、これらの印字機構部を駆動する印字機構部駆動回路43を有している。また、印字機構部には、キャリッジ検出器44、ホームポジション検出器45、オートカッタ検出器46、各用紙検出器47、カバー検出器54などの検出器類が装備され中央制御装置(以下、CPUと称す)50と接続している。オートカッタ検出器46は、図2におけるカッタ刃14aのポジション検出を行う検出器であり、図示しないカッタ刃駆動モータを駆動し所定の位置で検出信号を発生する。カッタ刃において紙ジャムなどが発生するとカッタ刃が所定の位置に移動せず、検出信号が発生しないためエラーとなる。これをカッタエラーと称す。
【0047】
用紙検出器47は、ニアエンド検出器20(図1)、レシート紙検出器12、スリップ紙検出器13(図2)などを含む。
【0048】
印字装置全体を制御するCPU50には、LEDなどで構成する表示装置48、紙送りなどを手動で行う為のパネルスイッチ49、ホストコンピュータとの通信を行うインターフェース51、制御プログラムや印字文字パターンなどを格納するROM52、受信バッファや印字バッファなどを格納するRAM53が接続している。
【0049】
印字データがインターフェース51から入力されるとRAM53内の受信バッファに格納され、CPU50はこのデータを解読し、データコードに対応した文字パターンをROM52から読みだし、印字機構駆動部制御回路43を介して印字ヘッド40、モータ類41、プランジャ類42を駆動し印字を実行する。
【0050】
キャリッジエラー、ホームポジションエラー、カッタエラーなどが発生すると、CPU50は、表示装置48を駆動して使用者にエラーの発生を知らせることができる。
【0051】
図5は、本発明の全体構成を示す機能ブロック図であり、各機能手段の関係を示している。
【0052】
61はホストコンピュータであり、コマンドデータや印字データなどを印字装置に送信する。62は、インターフェイス51を介してホストコンピュータ61からのデータコードを受信するデータ受信手段であり、インターフェース51により起動される割込みである。64は受信した時点で受信データを解析し、実行するリアルタイムコマンド解析手段であり、データ受信手段62とともに割込みの中で処理される。リアルタイムコマンド解析手段64は、受信データがリアルタイム制御コマンドであるかどうかを判断し、リアルタイム制御コマンドであればそのコマンド指令に従って所定の処理を実行する。リアルタイムコマンド解析手段64を介した受信データは、全て一旦受信バッファ65に蓄えられる。受信バッファ65内の受信データは、コマンド解析手段66により1データづつ取り出され、このデータコードを解析し、印字データと印字装置に対して様々な指令を設定するコマンドデータとを判別する。コマンドデータであれば、それを制御手段68によって、そのコマンドコードに従って所定の設定もしくは、所定の動作を実行する。印字データであればそのデータコードに従って文字パターンを印字バッファ67内に格納する。制御手段68により印字実行を行う場合、この印字バッファ67から印字パターンを読み出して印字機構各機能部70を制御して印字を行う。
【0053】
本実施例では、インターフェースは双方向のシリアルインターフェースであるRS−232Cを用いており、RS−232Cではオフラインの状態でもホストコンピュータとの通信は可能である。一般にRS−232Cの双方向シリアルインターフェースでは、一方の装置がオフラインとなっても他方の装置がそれを検出し通信データの送信を停止するまでの間、数バイトのデータが回線上に乗っている可能性がある為、オフラインとした側の装置はオフライン後もデータを受信しなければならない。よって、受信バッファがいっぱいになる前にオフラインとすることが必要である。従って、印字装置にエラーが発生しオフラインとなっても受信バッファに空きが有る間、通信データは受信され、受信バッファに蓄えられる。そして、受信バッファがいっぱいになった場合、その後の受信データは捨てられてしまうことになる。しかし、本実施例では、受信割込みで起動されるリアルタイムコマンド解析手段64により受信バッファに記憶する前にコマンドの解析を行う為、たとえ捨てられても、コマンドとしての処理は行われる。
【0054】
リアルタイムコマンドには、印字装置の状態を要求するコマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64により印字装置の状態をデータ送信手段63を介してホストコンピュータ61に回答する。エラー発生状態であっても、データ受信手段62とデータ送信手段63とリアルタイムコマンド解析手段64は動作しているため、印字装置の状態を送信することが可能である。
【0055】
コマンド解析手段66で単票用紙選択コマンドであると判断された場合、制御手段68に通知する。制御手段68は、単票用紙が選択されたことを表示手段72に通知し、単票用紙挿入待ちの表示を行うと同時に、単票用紙状態記憶手段79により、RAM53内部に単票用紙が選択されたことと、単票用紙挿入待ちに入ったことを単票用紙情報として記憶する。単票用紙が選択されると単票用紙検出器73により単票用紙の挿入を検出し、制御手段68に通知する。制御手段68は単票用紙挿入待ち情報を監視し、単票用紙挿入待ち情報の内容が消去されるか、単票用紙の挿入が検出されるまで印字装置の駆動を停止する。コマンド解析手段66も制御手段68を起動できずに停止するが、リアルタイムコマンド解析手段64は、単票用紙挿入待ちに関係なく動作することができる。
【0056】
リアルタイムコマンドには、単票用紙の挿入待ちを解除するコマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64によってRAM53内に記憶された単票用紙挿入待ち情報および単票用紙選択情報を消去する。この単票用紙挿入待ち状態を監視していた制御手段68は、単票用紙挿入待ち情報が消去されたことを確認すると、単票用紙挿入待ちを解除し印字バッファ67を消去し、初期値の用紙を選択する。単票用紙の挿入待ちを解除する方法としてタイムアウトがあり、制御手段68はタイマ78を制御する。
【0057】
印字や紙送り、用紙のカットなどにおいて紙ジャムなどのエラーが発生した場合、エラー検出手段71によりエラーを検出し、制御手段68に通知するとともに、状態記憶手段77に記憶される。制御手段68は、エラーが発生したことを表示手段72に通知し、エラーの表示を行うと同時に、エラー状態記憶手段69によりRAM53内部にエラーの発生をエラー情報として記憶する。制御手段68は、エラー情報を監視し、この内容が消去されるまで印字装置の駆動を停止する。コマンド解析手段66も制御手段68を起動できずに停止するが、インターフェース51の受信割込みで起動されるリアルタイムコマンド解析手段64は、エラーの発生に関係なく動作することができる。ただし、コマンド解析手段65が停止しているため、インターフェース51で受信される受信データは、受信バッファ65内のデータは貯まっていく一方なので、エラー発生と同時に制御手段68によりインターフェースを制御して印字装置がデータを受け取れない事をホストコンピュータに通知する(いわゆるオフライン)。
【0058】
リアルタイムコマンドには、エラーのからの回復コマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64によってRAM内に記憶されたエラー情報を消去する。このエラー状態を監視していた制御手段68は、エラー情報が消去されたことを確認すると、印字装置を再度起動し印字を再開する。
【0059】
エラーからの回復コマンドのもう1つに、受信済のデータを消去した後印字を再開するコマンドがあり、このコマンドが受信されるとリアルタイムコマンド解析手段により受信バッファ65、印字バッファ67が消去された後、RAM内に記憶されたエラー情報を消去する。
【0060】
用紙検出器73による紙無し、カバー検出器74によるカバーオープンの検出、スイッチ検出器75による紙送りスイッチによる紙送り中の時も印字装置がオフラインとなって、その状態が状態記憶手段77に記憶され、リアルタイムコマンド解析手段64によってその情報をホストコンピュータ61に回答する。
【0061】
図6は、リアルタイムコマンドの一実施例のコマンドコードを示す。
【0062】
図6において、「GS」「R」「n」はそれぞれ1バイトの受信データで、それぞれ16進表記で1Dh、52h、nを示す。「GS」「R」がリアルタイムコマンドであることを示し、nの値により実行する内容を選択する。
【0063】
本実施例では、nの値により表1の様に実行する内容を定めている。
【0064】
【表1】

Figure 0003544365
【0065】
nが0の場合、表2に従う印字装置ステータス情報1バイトをホストコンピュータに送信する。
【0066】
【表2】
Figure 0003544365
【0067】
印字装置ステータス情報によりドロワの状態、印字装置のオンライン/オフラインの状態がホストコンピュータ側で判断できる。また、印字装置がオフラインの場合には、nを1としてさらに詳細なオフライン情報を取得することができる。
【0068】
nが1の場合、表3に従うオフライン情報1バイトをホストコンピュータに送信する。
【0069】
【表3】
Figure 0003544365
【0070】
これにより、オフラインの情報をホストコンピュータ側で識別できる。
【0071】
ホストコンピュータは識別した結果によって、使用者に注意を促すことができる。また、エラーの場合には、nを2として引き続き詳細なエラー情報を取得することができる。
【0072】
nが2の場合、表4に従うエラー情報1バイトをホストコンピュータに送信する。
【0073】
【表4】
Figure 0003544365
【0074】
表4の中でメカニカルエラーとは、主に紙ジャムによるエラーの場合であって、キャリッジエラー、ホームポジションエラーを含む。これらは、印字ヘッド回りの紙ジャムであり、オートカッタエラーと区別している。これにより、印字ヘッド回りでの紙ジャムか、オートカッタでの紙ジャムかをホストコンピュータ側で識別することができる。識別した結果により、ホストコンピュータの表示手段によって使用者にエラー発生の箇所を的確に指示し、紙ジャムの除去を促す事ができる。
【0075】
紙ジャムなどのエラーの場合には、原因となる紙ジャムを取り除けば印字再開が可能である。しかし、外部電源の異常や印字ヘッドのヘッド温度検出器の破損など印字再開が困難なエラーもあるため、これらを識別する必要がある。紙ジャム以外で発生したエラーは回復不可能エラーとしてビット5に割り当てている。
【0076】
nが3の場合、表5に従うレシートやジャーナルなどの連続用紙検出器情報1バイトをホストコンピュータに送信する。
【0077】
【表5】
Figure 0003544365
【0078】
nが4の場合、表6に従うスリップ用紙検出器情報1バイトをホストコンピュータに送信する。
【0079】
【表6】
Figure 0003544365
【0080】
表6において、スリップ用紙の選択により、連続用紙やバリデーション用紙が選択されているかスリップ用紙が選択されているかが判断できる。また、スリップ用紙選択中において、用紙の挿入待ちであるか、すでに用紙があり印字可能な状態であるかが判断できる。
【0081】
nが5の場合、表7に従うバリデーション用紙検出器情報1バイトをホストコンピュータに送信する。
【0082】
【表7】
Figure 0003544365
【0083】
表7において、バリデーション用紙の選択により、連続用紙やスリップ用紙が選択されているかバリデーション用紙が選択されているかが判断できる。また、バリデーション用紙選択中において、用紙の挿入待ちであるか、すでに用紙があり印字可能な状態であるかが判断できる。
【0084】
次に、図7、図8でリアルタイムコマンドのデータ受信手段とリアルタイムコマンド解析手段について説明する。
【0085】
図7は、印字装置の初期化行程を示し、電源オンと同時に処理が開始される(ステップ120)。初期化においては、印字機構の初期化(ステップ121)、単票用紙状態フラグ、エラー情報、バッファクリアフラグ、GSフラグ、GSRフラグなどを含め、一般的にはRAM53内の全ての情報を初期化する(ステップ122)。バッファクリアフラグ、GSフラグ、GSRフラグは、受信割込み処理で使用するフラグで、リアルタイムコマンド解析手段で用いる。最後にステップ124でインターフェースの受信割込みを許可して初期化行程を終了する(ステップ124)。
【0086】
図8は、インターフェースの受信割込み処理の行程を示し、データ受信手段とリアルタイムコマンド解析手段を示している。インターフェースを介して、ホストコンピュータからの受信データは、1バイトづつ受信されるため、各バイト受信毎に図8の処理が起動される。リアルタイムコマンドは、図6に示した様に「GS」「R」「n」の3バイトで構成されるため、「GS」を受信した時にセットされるGSフラグ、GSがセットされている場合に「R」を受信した時にセットされるGSRフラグ、GSRフラグがセットされている時に受信した「n」によって制御される。また、「n」の値によってバッファをクリアするかどうかを記憶するバッファクリアフラグがある。
【0087】
ステップ125でデータが受信され受信割込みが起動される。ステップ126で受信データをインターフェースから読みだし、ステップ127でGSRフラグがセットされているかどうかを判断する。GSRフラグがセットされている場合、すなわち既に「GS」「R」まで受信済の場合、受信データ(ここではCとする)を「n」として処理を行う。ステップ136でGSRフラグをクリアし、受信データ(C)の値により、以下の動作を行う(ステップ137)。
【0088】
C=0の時、送信手段63によりRAM53内に記憶したプリンタ情報をインターフェースを介してホストコンピュータに送信する(ステップ138)。
【0089】
C=1の時、送信手段63によりRAM53内に記憶したオフライン情報をインターフェースを介してホストコンピュータに送信する(ステップ139)。
【0090】
C=2の時、送信手段63によりRAM53内に記憶したエラー情報をインターフェースを介してホストコンピュータに送信する(ステップ140)。
【0091】
C=3の時、送信手段63によりRAM53内に記憶した連続用紙情報をインターフェースを介してホストコンピュータに送信する(ステップ141)。
【0092】
C=4の時、送信手段63によりRAM53内に記憶したスリップ状態情報をインターフェースを介してホストコンピュータに送信する(ステップ142)。
【0093】
C=5の時、送信手段63によりRAM53内に記憶したバリデーション状態情報をインターフェースを介してホストコンピュータに送信する(ステップ143)。
【0094】
C=6の場合、単票用紙待ち状態かどうかを判断し(ステップ144)、待ち状態であれば、単票用紙待ちフラグをクリアする(ステップ145)。図9で示すように、単票用紙待ちフラグをクリアすることにより、単票用紙待ち状態から回復することができる。
【0095】
C=8の場合バッファクリアフラグをセットし(ステップ146)、RAM53内のエラー情報をクリアする(ステップ147)。バッファクリアフラグをクリアすると、図10で示すようにエラーからの回復時に受信バッファと印字バッファをクリアされる。C=7の場合、単にエラー情報をクリアする(ステップ147)。
【0096】
受信データは、リアルタイムコマンドであっても、一旦受信バッファに記憶される(ステップ132)。
【0097】
ステップ127においてGSRフラグがクリアされている場合、ステップ128でGSフラグがセットされているかを判断する。すなわち、既に「GS」まで受信済の場合GSフラグがセットされており、ステップ129でGSフラグをクリアし、受信データ(C)が「R」かどうかを判断する(ステップ129)。C=「R」の場合GSRフラグをセットし(ステップ131)、受信バッファに受信データを記憶する(ステップ132)。
【0098】
ステップ128においてGSフラグがクリアされている場合、ステップ134において受信データ(C)が「GS」コードかどうか判断する。C=「GS」の場合、GSフラグをセットし、そうでなければそのまま受信バッファに記憶して(ステップ132)、受信割込み処理を終了する(ステップ133)。
【0099】
次に、図9で単票用紙の設定を行う制御手段について説明する。
図9で単票用紙が選択されてから設定されるまでと、単票用紙解除の行程を示す。
コマンド解釈手段66で単票用紙選択コマンドであると判断されたときに処理が開始する(ステップ151)。単票用紙選択フラグをセットし、単票用紙挿入待ちフラグをセットする(ステップ152)。メカ動作が停止したのを確認してから(ステップ153)、単票用紙挿入待ちタイマ78を起動し、表示手段72により表示装置48を点滅させる(ステップ155)。ステップ156で単票用紙挿入待ちフラグがクリアされているか判断する。単票用紙挿入待ちフラグがクリアされている場合、すなわちリアルタイムコマンド「GS」「R」「6」により単票用紙の挿入待ちをキャンセルした場合、単票用紙挿入待ちタイマを停止し(ステップ157)、表示示手段72により表示装置48を消灯する(ステップ158)。単票用紙選択フラグと、単票用紙挿入待ちフラグをクリアし(ステップ159)、初期値の用紙をセットし(ステップ160)、単票用紙選択処理を終了する(ステップ161)。
【0100】
ステップ156で単票用紙挿入待ちフラグがクリアされていない場合、単票用紙挿入待ち時間がすぎていないか判断し(ステップ162)、単票用紙待ち時間がすぎていた場合、ステップ158の処理へ飛ぶ。
【0101】
ステップ162で単票用紙挿入待ち時間が過ぎていない場合、ステップ163で単票用紙が挿入されたか判断する。単票用紙が挿入されていないと判断された場合、再び単票用紙挿入待ちフラグがクリアされているかステップ156に判断にいき、単票用紙挿入待ちフラグがクリアされるか、単票用紙挿入待ち時間が切れるか、単票用紙が挿入されるまで以上の動作が繰り返される。
【0102】
ステップ163で単票用紙が挿入さたと判断された場合、単票用紙挿入待ちタイマ78を停止し(ステップ164)、表示装置48を点灯し(ステップ165)、動作開始待ち時間待つ(ステップ166)。ステップ167で単票用紙が挿入されていないと判断された場合、ステップ154の処理へに戻り、以上の動作を繰り返す。
【0103】
ステップ167で単票用紙が挿入されていると判断された場合、単票用紙挿入待ちフラグをクリアし(ステップ168)、単票用紙を正位置にセットし(ステップ169)、単票用紙選択の処理を終了する(ステップ161)。
【0104】
以上述べた様に、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、印字装置が単票用紙挿入待ちにより停止した場合でも、コマンドを解析し、単票用紙挿入待ちを解除できる。
【0105】
図10に、エラーを検出する一実施例としてキャリッジエラーを検出する場合について説明する。
【0106】
ステップ101で印字指令が開始され、ステップ102で1行印字分の印字装置の初期化を行う。ステップ103から105において1行分の印字を行う。ステップ103では、1ドット列の印字を行い印字キャリッジを1ドット列分移動する。104では、キャリッジが移動することにより、キェリッジ検出器35からの検出パルスがあるかどうかを調べる。通常は、キャリッジが正常に移動するため検出パルスが周期的に発生する。ステップ105において、1行分の印字が終了したかどうかを調べ、終了していない場合ステップ103から繰り返す。1行分の印字が終了していれば、ステップ106で印字終了となる。
【0107】
ここで紙ジャムなどによりキャリッジが停止した場合、ステップ104において、検出パルスが検出されず、ステップ107に移行する。すなわち、ステップ107以降は、キャリッッジエラーが発生した場合の処理となり、まず、ステップ107において、印字装置が通信データを受け取れないことをホストコンピュータに通知する、いわゆるオフラインとする。ステップ108においてキャリッジエラーが発生した事をRAM53内に記憶する。キャリッッジエラーは回復可能なエラーであるから、回復可能エラーとして情報を記憶する。同時に109において印字機構を停止する。その後、ステップ111において上記エラー情報が消去されるまで、ステップ110においてエラー表示装置にエラーが発生した事を表示する。リアルタイムコマンドが受信されると、エラー情報が消去されステップ112において、受信したリアルタイムコマンドがバッファクリアを指令しているかにより、指令している場合、113においてバッファをクリアする。この場合のバッファとは、受信バッファと印字バッファの両方を示す。その後、ステップ114で印字装置の回復処理を行い、ステップ115で印字装置が受信可能になったことをホストコンピュータに知らせる、いわゆるオンラインとする。
【0108】
以上述べた様に、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、印字装置がエラー発生により停止した場合でも、コマンドを解析し、エラーからの回復が可能となる。
【0109】
次にホストコンピュータ側から見た場合の印字装置の制御について説明する。
【0110】
図11は、本発明の情報処理装置の概念図であって、印字装置300はホストコンピュータ61とRS−232Cの通信ケーブル305により接続している。ホストコンピュータ61内には、通信手段304としてRS−232Cインターフェース制御回路が組み込まれている。また、CRTなどの表示装置302とキーボードなどの入力装置303がホストコンピュータ61に接続している。
【0111】
図12は、ホストコンピュータにおいて、単票用紙挿入待ちを解除することを考慮した制御行程を示すフローチャート図である。ここでは、単票用紙の例としてスリップ紙に印字する場合を示す。
【0112】
スリップ用紙に印字する場合(ステップ250)、まず、スリップ用紙選択コマンドを送信する(ステップ251)。次に、スリップ用紙の状態を調べるためリアルタイムコマンド「GS」「R」「4」を送信し(ステップ252)、これに対する応答を受信する(ステップ253)。この応答は、表6に示した情報が含まれている。この情報により、スリップ用紙が選択されたかどうかを判断する(ステップ254)。
【0113】
スリップ用紙が選択された場合、ステップ253における情報により、スリップの挿入待ちかどうかを判断する(ステップ255)。挿入待ちでない場合、スリップ用紙のありを確認後(ステップ256)、印字データを送信して(ステップ257)、スリップ用紙の印字を終了する(ステップ258)。
【0114】
ステップ255において、スリップ挿入待ちのとき、入力装置303の特定のキー、たとえば「スリップキャンセルキー」を監視しこのキーが押されているかどうかを判断する(ステップ259)。このキーは、スリップ挿入待ちキャンセルの機能を割り当てられたキーであり、オペレータにより操作される。
【0115】
キーが押されている場合、スリップ挿入待ちキャンセルコマンド「GS」「R」「6」を送信することによりスリップ挿入待ちを解除することができる(ステップ260)。
【0116】
また、ステップ254とステップ256において、それぞれスリップが非選択の場合と用紙がない場合においても、このキーを監視することにより、スリップ印字を終了することができる(ステップ259)。この場合、スリップキャンセルコマンド「GS」「R」「6」を送信しても、印字装置側では単票用紙の挿入待ち状態でないため無視される(ステップ260)。キーが押されていない場合、ステップ252に戻り、スリップの選択(ステップ254)もしくは、用紙あり(ステップ256)を待つことになる。
【0117】
図13は、ホストコンピュータにおいて、エラーからの回復を考慮した印字行程を示すフローチャート図である。
【0118】
印字開始後(ステップ200)、1行分の印字データを送信する毎に(ステップ201)、印字装置がオフラインになったかどうかを監視する(ステップ202)。一般に、RS−232Cインターフェースでは、受信側(ここでは印字装置)がオフラインになると、CTS(Clear To Send)信号もしくは、DSR(Data Set Ready)信号、もしくはXOFFコードにより知ることができる。印字装置がオンラインであれば、印字データを送信し続け、印字データが終了すれば(ステップ203)、印字終了となる(ステップ204)。
【0119】
ステップ202において、印字装置がオフラインになると、印字装置がエラーを発生したか、その他の原因(たとえば、印字用紙が無くなったなど)により印字ができなくなったと考えられる。そこで、エラーが発生したかどうかを確認するため、ステップ205でリアルタイムコマンド「GS」「R」「2」を送信する。これに対する応答をステップ206で受信し、エラーが発生しているかを判断する(ステップ207)。エラーが発生していない場合、エラー以外の原因でオフラインになったと考えれるので、その他の原因を調べ(ステップ208)、それに対する処理を行う(ステップ209)。その他の原因の取得は、「GS」「R」「1」により、カバーが開いている、印字用紙が無くなったなどの情報を取得することによる。ホストコンピュータは、「カバーを閉じてください」とか「紙をセットしてください」などと表示装置302に表示し、使用者に注意を促すことができる。
【0120】
これを印字装置がオンラインになるまで繰り返し(ステップ210)、オンラインになったところで、印字を再開する(ステップ201)。
【0121】
ステップ207でエラーが発生した場合、そのエラーが回復可能かどうかを判断する(ステップ211)。回復可能エラーかどうかは、表4に示したビット5で判断できる。回復可能エラーの場合、エラーが発生したことを使用者に知らせ、エラーの原因と予想される紙ジャムなどを取り除くことを指示する。この時、紙ジャムの発生箇所を表4のビット2とビット3により、キャリッジかオートカッタかを使用者に知らせる事ができる。使用者が紙ジャムを取り除いた後、ホストコンピュータの入力装置303(たとえばキーボード)により、確認の入力を行なわせることにより、エラー原因の除去を確認する(ステップ213)。その後、リアルタイムコマンド「GS」「R」「6」もしくは「7」により、印字装置をエラーから回復させる。使用者が、エラーの原因を完全に取り除いていない場合や、複数のエラーが同時に発生している場合を考慮して、再度ステップ205から、エラーの発生を確認することが望ましい。
【0122】
ステップ211において回復不可能なエラーの場合は、印字装置に異常が有り、使用者では修復できない場合である。この場合は、印字装置が異常であることを使用者に知らせて(ステップ215)、印字処理を中止する(ステップ216)。
【0123】
金銭を扱うPOS/ECRなどの情報処理装置としては、データの欠落、重複は絶対あってはなならい。印字装置にエラーが発生した場合、受信済のデータを抹消すること無くエラーから回復し、印字を再開することは重要である。ただし、従来の印字装置を用いた情報処理装置にも対応するため、受信済のデータを抹消してから回復するモードを可能にし、ホストコンピュータからの制御コマンドにより選択可能とした。すなわち、従来の印字装置を用いた情報処理装置では、印字装置がエラーから回復した後は必ず受信済データは抹消していた為、エラー発生前と同一データを印字する場合は、2度目の印字データであることを明示するために特殊な文字を行の先頭などに印字させていた。これに対応するため、受信済データを抹消してから回復するモードが必要であった。
【0124】
【発明の効果】
以上述べた様に本発明によれば、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、単票用紙挿入待ちのときでも、コマンドを解析し、単票用紙挿入待ちからの回復が可能となる。
【0125】
これにより、金銭を扱う流通業界の印字装置として、信頼性の高い高スループットの印字装置を提供するとともに、ホストコンピュータの負担を軽減し、使用者に扱い易い印字装置およびこれを用いた情報処理装置を提供することができる。
【図面の簡単な説明】
【図1】本発明の一実施例を説明する印字装置の全体図。
【図2】本発明の一実施例を説明する印字装置の機構図。
【図3】本発明の一実施例を説明する印字装置の印字部構成図。
【図4】本発明の一実施例を説明する制御回路の回路ブロック図。
【図5】本発明の一実施例を説明する機能ブロック図。
【図6】本発明に用いるコマンドの一実施例の説明図。
【図7】本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。
【図8】本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。
【図9】本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。
【図10】本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。
【図11】本発明の情報処理装置の概念図。
【図12】本発明の印字装置を用いたホストコンピュータの制御行程の一実施例を示すフローチャート図。
【図13】本発明の印字装置を用いたホストコンピュータの制御行程の一実施例を示すフローチャート図。
【符号の説明】
61 ホストコンピュータ
62 データ受信手段
63 データ送信手段
64 リアルタイムコマンド解析手段
66 制御コマンド解析手段
68 制御手段
69 エラー状態記憶手段
79 単票用紙状態記憶手段
71 エラー検出手段
72 表示手段
73 用紙検出手段
74 カバー検出手段
75 スイッチ検出手段
76 周辺機器状態検出手段
77 状態記憶手段
300 印字装置
302 表示装置
303 入力装置[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a printing apparatus which is connected to a host computer and performs printing in accordance with a command from the host computer, and particularly to a printing apparatus which is optimal for an information processing apparatus which handles money such as POS / ECR.
[0002]
[Prior art]
In the conventional printing device, when it is inappropriate to continue the printing operation, such as when the printing paper is exhausted, when the cover of the printing device is opened, when an error occurs, etc., the printing mechanism including the print head is used. By shutting down and taking the interface with the host computer offline (logically disconnected), it is intended to ensure the security of the printing device and communication data and the safety of the user. At this time, since the control inside the printing apparatus is stopped, data already received by the printing apparatus is not processed after the time when the off-line occurs. Further, since the data is not received after the occurrence of the off-line, the data is not processed, and the response from the printing device is completely lost.
[0003]
The printing apparatus is also offline when the paper feed switch is pressed and the paper is being fed, or when the reception buffer for storing the received data becomes full (hereinafter referred to as buffer full), and the printing operation is continued. Is difficult to distinguish from the off-line state when the password is inappropriate.
[0004]
When the printing apparatus goes offline, the host computer cannot transmit print data, and the entire system such as POS and ECR stops. In this case, the host computer displays a message such as "Printer is abnormal. Check it" on the display device, and the user must check the printer and eliminate the cause of the offline. However, it is difficult for a general POS or ECR user to investigate the cause, and it takes a long time.
[0005]
On the other hand, the control commands stored in the reception buffer are analyzed in order from the oldest (the previously stored control command), and the command processing is executed. Then, the control command after the processing is deleted from the reception buffer. Therefore, when control commands are continuously sent from the host computer, the control commands are stored in the reception buffer one after another, and the stored control commands are processed in order from the oldest one. , A time difference (hereinafter, referred to as a time lag) occurs from when the printing apparatus actually performs the processing.
[0006]
In a conventional printing apparatus that handles cut sheets, when the host computer selects cut sheets and starts printing, the printing mechanism such as the print head is stopped and the cut sheet is inserted. At this time, since the control inside the printing apparatus is stopped, the received data after the selection of the cut sheet is not processed until the cut sheet is inserted or the predetermined cut sheet insertion waiting time expires. Will no longer respond. Therefore, if the user erroneously selects the cut sheet, the settlement process of the cash register cannot be performed during the time, and the operation is delayed, and the user has to wait for a long time. If the printing device is reset or the power is turned on again, the data for setting the status of the printing device stored in the printing device up to that point is deleted, and the POS / ECR for handling money is used. This was a very big problem for the printing device of the above.
[0007]
In order to reduce the influence of such a problem, in an information processing system using a conventional printing device, the host computer sends a status response request command to each line without sending print data of a plurality of lines. The state of the printing device was checked. For this reason, a heavy load is imposed on the host computer, and the throughput of the information processing system is reduced.
[0008]
[Problems to be solved by the invention]
Under the circumstances described above, in the conventional POS / ECR field, a stand-alone dedicated information processing system in which a data input device, a processing device, and a printing device are integrated is widely used, and a general-purpose interface is used between the host computer and the printing device. Although the system is connected with, although it is evaluated for its high flexibility, it is not widely used because of concerns about data reliability (so-called security). Then, in order to improve the reliability of the data and at the same time further enhance the operability, even when the operation of the printing apparatus is stopped, the host computer can know the cause and promptly cancel the stopped state. The realization of a simple information processing system is expected.
[0009]
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems of the prior art, provide a printing device capable of realizing a highly reliable information processing device, reduce a load on a host computer, and use a printing device that is easy for a user to use. Is to provide.
[0010]
[Means for Solving the Problems]
To achieve the above object, the following invention is disclosed in accordance with the principle of the present invention.
[0011]
A printing device according to a first aspect of the present invention is a printing device that is connected to a host device, controls a printing unit in accordance with a control command transmitted from the host device and print data, and performs printing on a print medium. A data receiving unit for receiving print data, a received data storage unit for storing at least a control command, and a process execution for reading out the control commands stored in the received data storage unit on a first-come, first-served basis and executing a process according to the control command Means and when received by the data receiving means Immediately Analysis of control commands And executes a process corresponding to the real-time control command when the control command is a predetermined real-time control command. Control command analyzing means, a cut-sheet paper conveying means for conveying cut-sheet paper and supplying it to the printing means, and waiting for supply of cut-sheet paper to the cut-sheet paper conveying means, and then conveying the cut-sheet paper. A cut-sheet paper transport control means for starting, and a cut-sheet paper state storage means for detecting a state of the cut-sheet paper transfer control means; When a wait state is detected, Control command analysis means Is Real-time control command Executes processing to cancel the operation of the cut sheet transport control means according to However, the data receiving means and the control command analyzing means operate in a state where a recoverable error has occurred or in a state where an unrecoverable error has occurred. It is characterized by the following. This allows the user to release the wait for cut sheet insertion from the host computer when waiting for cut sheet insertion. Real-time control for By transmitting the command, the waiting for insertion of the cut sheet can be released.
[0012]
Further, a printing apparatus according to another aspect of the present invention further includes an apparatus state detecting unit that detects a state of the printing apparatus, and a data transmitting unit that transmits data to the host apparatus. Control command analysis means Is Depending on the real-time control command, And a device status reporting unit for passing data obtained by the device status detecting unit to the data transmitting unit. Only, the data transmission means operates in a state where a recoverable error has occurred or in a state where an unrecoverable error has occurred. It is characterized by the following.
[0013]
Further, in a printing apparatus according to another aspect of the present invention, the apparatus state detecting means includes a paper detecting means for detecting the presence or absence of a print medium.
[0014]
A printing apparatus according to another aspect of the present invention is characterized in that the apparatus state detecting means includes a paper detecting means for detecting the remaining amount of the print medium.
[0015]
Further, in a printing apparatus according to another aspect of the present invention, the apparatus state detecting means includes a setting state detecting means for detecting a setting state of the printing apparatus.
[0016]
Further, in a printing apparatus according to another aspect of the present invention, the printing apparatus transports continuous paper and supplies the printing paper to the continuous paper transporting means, and transports the cut paper and supplies the printing paper to the printing means. Means, and cut sheet selection means for prohibiting or permitting operation of the cut sheet transport means, and the setting state detecting means includes cut sheet selection detecting means for detecting a state of the cut sheet selection means. It is characterized.
[0017]
Further, a printing apparatus according to another aspect of the present invention is characterized in that the apparatus state detecting means includes an operating state detecting means for detecting an operating state of the printing apparatus.
[0018]
Further, in a printing apparatus according to another aspect of the present invention, the operation state detecting means includes a cut-sheet paper state storage means for detecting a state of the cut-sheet paper transport control means.
[0019]
Further, in a printing apparatus according to another aspect of the present invention, the printing apparatus has a panel switch for instructing execution of the printing medium transport operation independently of a control command, and the operation state detecting means includes a print medium transporting unit. It is characterized by including switch detection means for detecting the state of the switch.
[0020]
A printing apparatus control method according to a first aspect of the present invention is a printing apparatus that is connected to a host apparatus, controls printing means in accordance with a control command and print data transmitted from the host apparatus, and performs printing on cut sheets. In the control method, a data receiving step of receiving a control command and print data, a receiving data storing step of storing at least a control command, and reading out the stored control commands on a first-come-first-served basis and executing a process corresponding to the control commands When received in the processing execution step and the data receiving step Immediately Analysis of control commands And executes a process corresponding to the real-time control command when the control command is a predetermined real-time control command. And a control command analyzing step for waiting for supply of cut sheets and a cut sheet transfer step for starting transfer of cut sheets and supplying the printing means to the printing means. When it is in the state, Control command analysis process Is Real-time control command And executing a process of canceling the cut sheet transport process in accordance with This allows the user to release the wait for cut sheet insertion from the host computer when waiting for cut sheet insertion. Real-time control for By transmitting the command, the waiting for insertion of the cut sheet can be released.
[0021]
The method for controlling a printing apparatus according to another aspect of the present invention includes an apparatus state detecting step of detecting a state of the printing apparatus. Has , Control command analysis process Is characterized by including a data transmitting step of transmitting data obtained in the apparatus state detecting step to the host apparatus.
[0022]
An information processing device according to a first aspect of the present invention includes a printing device, a host device that transmits data including a control command and print data to the printing device, and the printing device controls a printing unit according to the data, In an information processing apparatus that performs printing on a print medium, the printing apparatus includes a data transmission unit that transmits data to a host device, a data reception unit that receives a control command and print data, and a reception data storage that stores at least a control command. Means, an apparatus state detecting means for detecting the state of the printing apparatus, and data received by the data receiving means. As soon as Analyze control commands And executes a process corresponding to the real-time control command when the control command is a predetermined real-time control command. Control command analysis means, a control execution means for reading out the control commands stored in the reception data storage means on a first-come, first-served basis, and executing processing in accordance with the control commands; The state of the cut-sheet transport means, the cut-sheet transport control means for starting the transfer by the cut-sheet transport means after waiting for the supply of the cut-sheet paper to the cut-sheet transport means, and the state of the cut-sheet transport control means. Having a cut-sheet paper state storage means for detecting
In the case where the cut sheet supply waiting state of the cut sheet transport control means is detected by the cut sheet state storage means, Control command analysis means Is Real-time control command Executes the processing of canceling the operation of the cut sheet transport control means in accordance with The data receiving means and the control command analyzing means operate in a state where a recoverable error has occurred or in a state where an unrecoverable error has occurred, The host device is Real-time control Command transmission means for transmitting a command. By this, when waiting for insertion of cut sheet paper, release of cut sheet insertion wait from host computer Real-time control for By transmitting the command, it is possible to provide an information processing apparatus capable of canceling the waiting for insertion of a cut sheet.
[0023]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0024]
Generally, there are two types of recording paper used in the distribution industry: cut-sheet paper and continuous paper.The cut-sheet paper is an irregular form of slip paper called slip paper or a relatively fixed number of copy paper called validation paper. Some have. As continuous paper, there are journal paper to be stored for store records and receipt paper as a receipt.
[0025]
FIG. 1 is an overall view of a printing apparatus capable of printing on slip paper, journal paper, and receipt paper of these recording papers.
[0026]
Reference numeral 1 denotes a print head main body, which is a so-called wire dot head in which a plurality of wires are vertically arranged. The print head 1 performs printing while reciprocating in the directions of arrows 1A and 1B. 3 is an ink ribbon.
[0027]
The receipt paper 17 and the journal paper 18 are inserted in the state of a roll paper from behind the printing mechanism as shown in the figure, and are discharged to the upper part. The slip paper 19 is inserted from the front of the printing mechanism (arrow 19A), and is discharged upward (arrow 19B).
[0028]
Both the receipt paper and the journal paper are provided with a near-end detector 20 for detecting the end of the paper. The near-end detector 20 includes a near-end detection lever 20a that rotates in the direction of arrow 20A depending on the outer diameter of the roll paper, and a push switch 20b that is turned on and off by the near-end detection lever 20a. When the roll paper approaches the end, its outer diameter decreases, and when it reaches the center of the roll paper, the near-end detection lever 20a rotates in the direction of arrow 20B, and the push switch 20b turns off to detect the near end of the paper.
[0029]
After printing, the receipt paper 17 is cut by the cutter unit 14 and handed to the customer.
[0030]
The printing device is covered by a main body case (not shown), and is divided into a cover (not shown) and a lower case 15. Reference numeral 21 denotes a cover detector, which is composed of a facing photosensor. When the cover is closed, the light of the cover detector 21 is blocked, and the cover close can be detected.
[0031]
FIG. 2 is a mechanism diagram showing an operation when printing continuous paper and cut-sheet paper in the printing apparatus of the present invention. 2A shows a case where printing is performed on continuous paper (receipt paper in the figure), and FIG. 2B shows a case where printing is performed on cut sheet paper (slip paper).
[0032]
The print head 1 has a wire pin (not shown) in the wire support portion 1a, and prints on the receipt paper 17 with the ink ribbon 3 interposed between the print head 1 and the platen 2.
[0033]
The receipt paper 17 is inserted between the paper guide plates 4a and 4b via the guide roller 5, and is fed by the paper feed rollers 6a and 6b. The paper feed roller 6a is connected to a drive source (not shown) such as a motor. A receipt paper detector 12 is arranged in the middle of the paper guide plates 4a and 4b. The receipt paper detector 12 is configured by a facing photosensor, a lever switch, or the like. The figure shows an example of a facing photosensor. The receipt paper 17 sent by the paper feed rollers 6a and 6b passes between the ink ribbon 3 and the platen 2 and is discharged to the upper portion of the printing apparatus via the paper holding rollers 7a and 7b and the cutter unit 14. The cutter unit 14 includes a cutter blade 14a and a cutter cover 14b. The cutter blade 14a moves in the direction of arrow 14A by a driving source such as a motor (not shown), and cuts the receipt paper 17.
[0034]
Although the figure shows the case of receipt paper, the case of journal paper has the same configuration except for the cutter unit.
[0035]
When printing on slip paper (FIG. 2B), slip paper 19 is inserted in the direction of arrow 19A from slip paper insertion opening 21 in front of the printing device. During roll paper printing, the slip feed roller 9a is pulled by the plunger 10 in the direction of arrow 10A as shown in FIG. 2A, and is separated from the opposing slip feed roller 9b. Therefore, slip paper 19 can be inserted. When the slip paper 19 is inserted, the slip paper 19 strikes the slip feed rollers 8a and 8b via the slip paper guides 11a and 11b. At this time, the slip paper detector 13 detects whether or not paper has been inserted. When the paper is inserted, the plunger 10 is released, the lever 10a rotates in the direction of arrow 10B, the slip feed roller 9b is pressed by the slip feed roller 9a, and the slip paper 19 is held. The slip feed rollers 8b and 9b are connected to a drive source such as a motor (not shown), and rotate in the directions of arrows 8A, 8B, 9A and 9B together with the opposing slip feed rollers 8a and 9a to feed the slip paper 19. I do. When printing is completed, the slip paper 19 is discharged in the direction of arrow 19B, the plunger 10 is driven, the slip feed roller 9a is separated from the slip feed roller 9b, and the next slip paper can be inserted.
[0036]
The receipt paper 17 can be printed on the slip paper 19 while being attached as shown in the figure, and if copy paper is attached to the slip paper 19, the same content can be printed simultaneously on the slip paper 19 and the receipt paper 17. It is possible.
[0037]
The slip paper detector 13 uses a facing photosensor like the receipt paper detector 12.
[0038]
Reference numeral 15 denotes a lower case of the main body, and 16 denotes a case for supporting the head mechanism.
[0039]
FIG. 3 is a configuration diagram of a printing unit of the printing apparatus according to one embodiment of the present invention.
[0040]
A method for detecting a step-out of the head carriage drive motor is shown in FIG.
[0041]
The head 1 is fixed on a head carriage 1b together with a wire holder 1a, and the head carriage 1b is moved right and left by a carriage transmission belt 32 and carriage driving gears 31a and 31b. The carriage drive gear 31a is connected to a head carriage drive motor (not shown). As this motor, a pulse motor is generally used, and a pulse motor is also used in the embodiment. The carriage drive gear 31a rotates the rotation detection plate 34 via the transmission gear 33. A carriage detector 35 composed of an opposing photo sensor is arranged so as to sandwich the rotation detection plate 34. The rotation detection plate 34 rotates according to the movement of the head carriage 1b, and the carriage detector 35 detects this. The rotation detection plate 34 is formed in a propeller shape, and when it rotates, the output of the carriage detector 35 is periodically turned on and off. That is, when the head carriage 1b moves left and right by a head carriage driving motor (not shown), the movement of the head carriage 1b is detected by the carriage detector 35.
[0042]
If the receipt paper, journal paper, or slip paper between the print head 1 and the platen 2 gets caught between the wire holder 1a and the platen 2, a paper jam occurs, and the head carriage 1b rotates the carriage drive motor. , The carriage drive motor loses synchronism. This is detected by the carriage detector 35. This is called a carriage error.
[0043]
The print head 1 needs a home position to specify the reference position of the print position. The home position detector 36 is a facing type photo sensor, and detects the head carriage 1b. That is, the position where the head carriage 1b moves to the left and blocks the light of the home position detector 36 becomes the reference position of the home position.
[0044]
When the head carriage 1b attempts to move to the home position, the home position detector 36 can detect that the head carriage 1b does not reach the home position due to paper jam or the like. This is called a home position error.
[0045]
FIG. 4 is a circuit block diagram of a control circuit for realizing the present invention.
[0046]
The print head 40, the motors 41, and the plungers 42 constitute a mechanism of the above-described printing apparatus, and have a print mechanism drive circuit 43 for driving these print mechanisms. The printing mechanism is provided with detectors such as a carriage detector 44, a home position detector 45, an automatic cutter detector 46, each paper detector 47, and a cover detector 54, and is provided with a central control unit (hereinafter, CPU). 50). The automatic cutter detector 46 is a detector that detects the position of the cutter blade 14a in FIG. 2, and drives a cutter blade drive motor (not shown) to generate a detection signal at a predetermined position. If a paper jam or the like occurs in the cutter blade, the cutter blade does not move to a predetermined position, and an error occurs because no detection signal is generated. This is called a cutter error.
[0047]
The paper detector 47 includes the near-end detector 20 (FIG. 1), the receipt paper detector 12, the slip paper detector 13 (FIG. 2), and the like.
[0048]
The CPU 50 for controlling the entire printing apparatus includes a display device 48 composed of an LED or the like, a panel switch 49 for manually performing paper feeding, an interface 51 for communicating with a host computer, a control program, a print character pattern, and the like. A ROM 52 for storing data and a RAM 53 for storing a reception buffer, a print buffer, and the like are connected.
[0049]
When print data is input from the interface 51, the print data is stored in a reception buffer in the RAM 53, the CPU 50 decodes the data, reads a character pattern corresponding to the data code from the ROM 52, and outputs the character pattern via the printing mechanism drive control circuit 43. The print head 40, motors 41, and plungers 42 are driven to execute printing.
[0050]
When a carriage error, a home position error, a cutter error, or the like occurs, the CPU 50 can drive the display device 48 to notify the user of the occurrence of the error.
[0051]
FIG. 5 is a functional block diagram showing the overall configuration of the present invention, and shows the relationship between each functional means.
[0052]
A host computer 61 transmits command data, print data, and the like to the printing device. Reference numeral 62 denotes a data receiving unit that receives a data code from the host computer 61 via the interface 51, and is an interrupt activated by the interface 51. Numeral 64 denotes a real-time command analyzing means for analyzing and executing received data at the time of reception, and is processed together with the data receiving means 62 in an interrupt. The real-time command analysis unit 64 determines whether the received data is a real-time control command, and if the received data is a real-time control command, executes a predetermined process according to the command. All the data received via the real-time command analysis means 64 is temporarily stored in the reception buffer 65. The received data in the receiving buffer 65 is taken out one by one by the command analyzing means 66, and the data code is analyzed to determine print data and command data for setting various commands to the printing device. If it is command data, the control means 68 executes predetermined setting or predetermined operation according to the command code. If it is print data, a character pattern is stored in the print buffer 67 according to the data code. When printing is performed by the control means 68, a printing pattern is read out from the printing buffer 67, and the printing mechanism is controlled by controlling each functional unit 70 of the printing mechanism.
[0053]
In this embodiment, the interface uses RS-232C, which is a bidirectional serial interface, and the RS-232C can communicate with the host computer even in an offline state. Generally, in the RS-232C bidirectional serial interface, even if one device goes offline, several bytes of data are on the line until the other device detects it and stops transmitting communication data. Because of the possibility, the device on the off-line side must receive data even after the off-line. Therefore, it is necessary to go offline before the reception buffer becomes full. Therefore, even if an error occurs in the printing device and the printer goes offline, the communication data is received and stored in the reception buffer as long as the reception buffer has a free space. When the reception buffer becomes full, the subsequent reception data is discarded. However, in this embodiment, since the command is analyzed by the real-time command analysis means 64 activated by the reception interrupt before the command is stored in the reception buffer, even if the command is discarded, the command is processed.
[0054]
The real-time command includes a command for requesting the status of the printing device. When this command is received, the real-time command analyzing unit 64 returns the status of the printing device to the host computer 61 via the data transmitting unit 63. Even in the error occurrence state, since the data receiving means 62, the data transmitting means 63 and the real-time command analyzing means 64 are operating, it is possible to transmit the state of the printing apparatus.
[0055]
If the command analysis means 66 determines that the command is a cut sheet selection command, it notifies the control means 68. The control means 68 notifies the display means 72 that the cut sheet has been selected, and displays a wait for the cut sheet to be inserted. At the same time, the cut sheet state storage means 79 selects the cut sheet in the RAM 53. The fact that the operation has been performed and the waiting for insertion of cut-sheet paper are stored as cut-sheet paper information. When the cut sheet is selected, the cut sheet detector 73 detects the insertion of the cut sheet and notifies the controller 68 of the cut sheet. The control means 68 monitors the cut-sheet insertion wait information, and stops the driving of the printing apparatus until the contents of the cut-sheet insertion wait information are deleted or the insertion of the cut-sheet paper is detected. The command analyzing means 66 also stops because the control means 68 cannot be started, but the real-time command analyzing means 64 can operate irrespective of the waiting for the insertion of the cut sheet.
[0056]
The real-time command includes a command for canceling the cut-sheet insertion wait. When this command is received, the cut-sheet insert wait information and cut-sheet selection information stored in the RAM 53 by the real-time command analyzing means 64. To delete. Upon confirming that the cut sheet insertion wait information has been deleted, the control means 68 monitoring the cut sheet insertion wait state cancels the cut sheet insertion wait, deletes the print buffer 67, and resets the initial value. Select paper. There is a time-out as a method of canceling the waiting for the insertion of the cut sheet, and the control means 68 controls the timer 78.
[0057]
When an error such as a paper jam occurs in printing, paper feeding, paper cutting, or the like, the error is detected by the error detecting means 71, notified to the control means 68, and stored in the state storage means 77. The control means 68 notifies the display means 72 that an error has occurred, displays the error, and stores the occurrence of the error as error information in the RAM 53 by the error state storage means 69. The control means 68 monitors the error information and stops driving of the printing apparatus until the error information is deleted. The command analysis means 66 also stops because the control means 68 cannot be activated, but the real-time command analysis means 64 activated by the reception interrupt of the interface 51 can operate irrespective of occurrence of an error. However, since the command analysis unit 65 is stopped, the received data received by the interface 51 is data stored in the reception buffer 65, and the interface is controlled by the control unit 68 at the same time when an error occurs. Notify the host computer that the device cannot receive data (so-called offline).
[0058]
The real-time command includes an error recovery command. When this command is received, the error information stored in the RAM is erased by the real-time command analyzing means 64. When confirming that the error information has been erased, the control means 68 monitoring the error state restarts the printing device and resumes printing.
[0059]
Another command for recovering from the error is a command to restart printing after deleting received data. When this command is received, the reception buffer 65 and print buffer 67 are deleted by the real-time command analysis means. Thereafter, the error information stored in the RAM is erased.
[0060]
When the paper detector 73 detects that there is no paper, the cover detector 74 detects the cover open, and the paper detector is being fed by the paper feed switch by the switch detector 75, the printer is offline and the status is stored in the status storage unit 77. Then, the information is returned to the host computer 61 by the real-time command analysis means 64.
[0061]
FIG. 6 shows a command code of one embodiment of the real-time command.
[0062]
In FIG. 6, “GS”, “R”, and “n” are each 1-byte received data, which indicate 1Dh, 52h, and n, respectively, in hexadecimal notation. “GS” and “R” indicate real-time commands, and the content to be executed is selected according to the value of n.
[0063]
In this embodiment, the contents to be executed are determined as shown in Table 1 by the value of n.
[0064]
[Table 1]
Figure 0003544365
[0065]
If n is 0, one byte of printer status information according to Table 2 is transmitted to the host computer.
[0066]
[Table 2]
Figure 0003544365
[0067]
The host computer can determine the status of the drawer and the online / offline status of the printing device based on the printing device status information. Further, when the printing apparatus is off-line, n can be set to 1 to obtain more detailed off-line information.
[0068]
When n is 1, one byte of offline information according to Table 3 is transmitted to the host computer.
[0069]
[Table 3]
Figure 0003544365
[0070]
As a result, off-line information can be identified on the host computer side.
[0071]
The host computer can alert the user based on the identification result. Further, in the case of an error, it is possible to continue to obtain detailed error information by setting n to 2.
[0072]
When n is 2, one byte of error information according to Table 4 is transmitted to the host computer.
[0073]
[Table 4]
Figure 0003544365
[0074]
In Table 4, the mechanical error is mainly an error caused by a paper jam, and includes a carriage error and a home position error. These are paper jams around the print head and are distinguished from automatic cutter errors. As a result, the host computer can identify whether the paper jam has occurred around the print head or the automatic cutter. Based on the identification result, the display means of the host computer can accurately instruct the user where the error has occurred, and prompt the user to remove the paper jam.
[0075]
In the case of an error such as a paper jam, printing can be resumed by removing the paper jam causing the error. However, there are some errors that make it difficult to restart printing, such as abnormalities in the external power supply and damage to the head temperature detector of the print head. An error that has occurred outside the paper jam is assigned to bit 5 as an unrecoverable error.
[0076]
When n is 3, one byte of continuous paper detector information such as a receipt or a journal according to Table 5 is transmitted to the host computer.
[0077]
[Table 5]
Figure 0003544365
[0078]
When n is 4, one byte of slip paper detector information according to Table 6 is transmitted to the host computer.
[0079]
[Table 6]
Figure 0003544365
[0080]
In Table 6, by selecting the slip paper, it can be determined whether continuous paper, validation paper, or slip paper has been selected. In addition, during the selection of the slip sheet, it can be determined whether the sheet is waiting for insertion or whether the sheet is already present and ready for printing.
[0081]
If n is 5, one byte of validation paper detector information according to Table 7 is transmitted to the host computer.
[0082]
[Table 7]
Figure 0003544365
[0083]
In Table 7, by selecting the validation paper, it can be determined whether the continuous paper or the slip paper is selected or the validation paper is selected. In addition, during the selection of the validation sheet, it can be determined whether the sheet is waiting for insertion or whether the sheet is already present and ready for printing.
[0084]
Next, a real-time command data receiving unit and a real-time command analyzing unit will be described with reference to FIGS.
[0085]
FIG. 7 shows the initialization process of the printing apparatus, and the processing is started at the same time when the power is turned on (step 120). In the initialization, generally, all information in the RAM 53 is initialized, including initialization of the printing mechanism (step 121), cut sheet status flag, error information, buffer clear flag, GS flag, GSR flag, and the like. (Step 122). The buffer clear flag, the GS flag, and the GSR flag are flags used in the reception interrupt processing and used by the real-time command analysis unit. Finally, in step 124, the reception interrupt of the interface is permitted to end the initialization process (step 124).
[0086]
FIG. 8 shows a process of the reception interrupt processing of the interface, and shows a data receiving means and a real-time command analyzing means. Since the received data from the host computer is received one byte at a time via the interface, the process of FIG. 8 is started every time each byte is received. As shown in FIG. 6, the real-time command is composed of three bytes of “GS”, “R”, and “n”. Therefore, when the GS flag and GS are set when “GS” is received, GSR flag set when "R" is received, controlled by "n" received when GSR flag is set. There is also a buffer clear flag that stores whether or not to clear the buffer according to the value of “n”.
[0087]
In step 125, data is received and a reception interrupt is activated. In step 126, the received data is read from the interface, and in step 127, it is determined whether the GSR flag is set. If the GSR flag is set, that is, if “GS” and “R” have already been received, the process is performed with the received data (here, C) as “n”. In step 136, the GSR flag is cleared, and the following operation is performed according to the value of the received data (C) (step 137).
[0088]
When C = 0, the transmission unit 63 transmits the printer information stored in the RAM 53 to the host computer via the interface (step 138).
[0089]
When C = 1, the transmission unit 63 transmits the offline information stored in the RAM 53 to the host computer via the interface (step 139).
[0090]
When C = 2, the transmission unit 63 transmits the error information stored in the RAM 53 to the host computer via the interface (step 140).
[0091]
When C = 3, the continuous paper information stored in the RAM 53 is transmitted to the host computer via the interface by the transmission means 63 (step 141).
[0092]
When C = 4, the transmission means 63 transmits the slip state information stored in the RAM 53 to the host computer via the interface (step 142).
[0093]
When C = 5, the transmission means 63 transmits the validation status information stored in the RAM 53 to the host computer via the interface (step 143).
[0094]
If C = 6, it is determined whether or not a cut-sheet paper waiting state is set (step 144). If it is a cut-sheet paper waiting state, the cut-sheet paper waiting flag is cleared (step 145). As shown in FIG. 9, by clearing the cut-sheet paper waiting flag, it is possible to recover from the cut-sheet paper waiting state.
[0095]
If C = 8, the buffer clear flag is set (step 146), and the error information in the RAM 53 is cleared (step 147). When the buffer clear flag is cleared, the reception buffer and the print buffer are cleared at the time of recovery from an error as shown in FIG. If C = 7, the error information is simply cleared (step 147).
[0096]
The received data is temporarily stored in the reception buffer even if it is a real-time command (step 132).
[0097]
If the GSR flag has been cleared in step 127, it is determined in step 128 whether the GS flag has been set. That is, when the reception has been completed up to “GS”, the GS flag has been set, the GS flag is cleared in step 129, and it is determined whether the received data (C) is “R” (step 129). When C = “R”, the GSR flag is set (step 131), and the received data is stored in the reception buffer (step 132).
[0098]
If the GS flag is cleared in step 128, it is determined in step 134 whether the received data (C) is a "GS" code. If C = “GS”, the GS flag is set; otherwise, the GS flag is stored in the reception buffer as it is (step 132), and the reception interruption process is terminated (step 133).
[0099]
Next, a control means for setting a cut sheet will be described with reference to FIG.
In FIG. 9, the process from the selection of the cut sheet to the setting thereof is shown.
The processing starts when the command interpreting means 66 determines that the command is a cut sheet selection command (step 151). The cut sheet selection flag is set, and the cut sheet insertion wait flag is set (step 152). After confirming that the mechanical operation has stopped (step 153), the cut-sheet paper insertion waiting timer 78 is started, and the display device 48 is caused to blink by the display means 72 (step 155). At step 156, it is determined whether the cut-sheet insertion waiting flag is cleared. If the cut-sheet insertion wait flag is cleared, that is, if the cut-sheet insertion wait is canceled by the real-time command "GS", "R", or "6", the cut-sheet insertion wait timer is stopped (step 157). Then, the display device 48 is turned off by the display indicating means 72 (step 158). The cut sheet selection flag and the cut sheet insertion wait flag are cleared (step 159), the sheet of the initial value is set (step 160), and the cut sheet selection process ends (step 161).
[0100]
If the cut sheet insertion waiting flag is not cleared in step 156, it is determined whether the cut sheet insertion waiting time has passed (step 162). If the cut sheet paper waiting time has passed, the process proceeds to step 158. jump.
[0101]
If the cut sheet insertion waiting time has not elapsed in step 162, it is determined in step 163 whether the cut sheet has been inserted. If it is determined that the cut sheet has not been inserted, the flow proceeds to step 156 to determine whether the cut sheet insertion wait flag has been cleared again, and whether the cut sheet insertion wait flag has been cleared or the cut sheet insertion wait has been completed. The above operation is repeated until the time expires or until the cut sheet is inserted.
[0102]
If it is determined in step 163 that the cut sheet has been inserted, the cut sheet insertion wait timer 78 is stopped (step 164), the display device 48 is turned on (step 165), and the operation start waiting time is waited (step 166). . If it is determined in step 167 that the cut sheet has not been inserted, the process returns to step 154, and the above operation is repeated.
[0103]
If it is determined in step 167 that the cut sheet is inserted, the cut sheet insertion waiting flag is cleared (step 168), the cut sheet is set at the correct position (step 169), and the cut sheet is selected. The process ends (step 161).
[0104]
As described above, by including the data receiving means and the real-time command analyzing means in the reception interrupt processing, even when the printing apparatus is stopped by waiting for the cut sheet insertion, the command is analyzed and the waiting for the cut sheet insertion is performed. Can be released.
[0105]
FIG. 10 illustrates a case where a carriage error is detected as an embodiment of detecting an error.
[0106]
In step 101, a print command is started, and in step 102, the printing apparatus for printing one line is initialized. In steps 103 to 105, printing for one line is performed. In step 103, printing of one dot row is performed, and the print carriage is moved by one dot row. At 104, it is checked whether or not there is a detection pulse from the carriage detector 35 by moving the carriage. Normally, the detection pulse is periodically generated because the carriage normally moves. In step 105, it is checked whether printing for one line has been completed. If not completed, the processing is repeated from step 103. If printing for one line has been completed, printing ends in step 106.
[0107]
If the carriage stops due to a paper jam or the like, no detection pulse is detected in step 104, and the process proceeds to step 107. That is, the process after step 107 is a process in the case where a carriage error has occurred. First, in step 107, the host computer is notified that the printing device cannot receive communication data, that is, the process is so-called offline. In step 108, the fact that a carriage error has occurred is stored in the RAM 53. Since the carriage error is a recoverable error, the information is stored as a recoverable error. At the same time, at 109, the printing mechanism is stopped. Thereafter, until the error information is deleted in step 111, the fact that an error has occurred is displayed on the error display device in step 110. When the real-time command is received, the error information is erased, and in step 112, depending on whether the received real-time command instructs buffer clear, if so, the buffer is cleared in 113. The buffer in this case indicates both the reception buffer and the print buffer. Thereafter, in step 114, a recovery process of the printing apparatus is performed, and in step 115, the host computer is notified that the printing apparatus is ready to receive, that is, the apparatus is set to be online.
[0108]
As described above, by including the data receiving means and the real-time command analyzing means in the reception interrupt processing, even if the printing apparatus is stopped due to the occurrence of an error, the command can be analyzed and the error can be recovered.
[0109]
Next, control of the printing apparatus as viewed from the host computer will be described.
[0110]
FIG. 11 is a conceptual diagram of an information processing apparatus according to the present invention. The printing apparatus 300 is connected to a host computer 61 via a communication cable 305 of RS-232C. In the host computer 61, an RS-232C interface control circuit is incorporated as the communication means 304. A display device 302 such as a CRT and an input device 303 such as a keyboard are connected to the host computer 61.
[0111]
FIG. 12 is a flowchart showing a control process in the host computer in consideration of canceling the waiting for insertion of a cut sheet. Here, a case of printing on slip paper is shown as an example of cut sheet paper.
[0112]
When printing on slip paper (step 250), first, a slip paper selection command is transmitted (step 251). Next, a real-time command "GS""R""4" is transmitted to check the state of the slip sheet (step 252), and a response to this is received (step 253). This response includes the information shown in Table 6. Based on this information, it is determined whether slip paper has been selected (step 254).
[0113]
When slip paper is selected, it is determined whether or not a slip is to be inserted based on the information in step 253 (step 255). If it is not waiting for insertion, after confirming the presence of slip paper (step 256), print data is transmitted (step 257), and printing of the slip paper is terminated (step 258).
[0114]
In step 255, when waiting for slip insertion, a specific key of the input device 303, for example, a "slip cancel key" is monitored to determine whether or not this key has been pressed (step 259). This key is a key to which a function of canceling slip insertion waiting is assigned, and is operated by an operator.
[0115]
If the key is pressed, the slip insertion wait can be canceled by transmitting the slip insertion wait cancel command "GS""R""6" (step 260).
[0116]
In steps 254 and 256, even when slip is not selected and when there is no paper, slip printing can be terminated by monitoring this key (step 259). In this case, even if the slip cancel commands “GS”, “R”, and “6” are transmitted, they are ignored because the printing apparatus is not in a state of waiting for the insertion of the cut sheet (step 260). If the key has not been pressed, the process returns to step 252 to wait for the selection of slip (step 254) or the presence of paper (step 256).
[0117]
FIG. 13 is a flowchart showing a printing process in the host computer in consideration of recovery from an error.
[0118]
After the start of printing (step 200), each time one line of print data is transmitted (step 201), it is monitored whether or not the printing apparatus has gone offline (step 202). Generally, in the RS-232C interface, when the receiving side (printing device in this case) goes offline, it can be known by a CTS (Clear To Send) signal, a DSR (Data Set Ready) signal, or an XOFF code. If the printing device is online, the printing data is continuously transmitted, and if the printing data is completed (step 203), the printing is completed (step 204).
[0119]
If the printing device goes offline in step 202, it is considered that printing has become impossible due to an error in the printing device or other causes (for example, running out of printing paper). Then, in order to confirm whether or not an error has occurred, the real-time commands “GS”, “R”, and “2” are transmitted in step 205. A response to this is received in step 206, and it is determined whether an error has occurred (step 207). If no error has occurred, it is considered that the device has gone offline due to a cause other than the error, and the other causes are examined (step 208), and processing is performed for the cause (step 209). The other causes are obtained by obtaining information such as the cover being opened or the print paper running out by “GS”, “R”, and “1”. The host computer displays “Close the cover” or “Please set paper” on the display device 302 to alert the user.
[0120]
This is repeated until the printing device is online (step 210), and when it is online, printing is resumed (step 201).
[0121]
If an error has occurred in step 207, it is determined whether the error can be recovered (step 211). Whether it is a recoverable error or not can be determined by bit 5 shown in Table 4. In the case of a recoverable error, the user is notified that the error has occurred, and is instructed to remove a paper jam or the like which is expected to cause the error. At this time, the user can be informed of the occurrence of the paper jam by using the bits 2 and 3 in Table 4 as to whether the carriage or the auto cutter is used. After the user removes the paper jam, the input device 303 (for example, a keyboard) of the host computer makes a confirmation input to confirm that the cause of the error has been eliminated (step 213). Thereafter, the printing device is recovered from the error by the real-time command “GS” “R” “6” or “7”. It is desirable to confirm the occurrence of the error again from step 205 in consideration of the case where the user has not completely removed the cause of the error or the case where a plurality of errors have occurred at the same time.
[0122]
If the error is unrecoverable in step 211, the printing apparatus has an error and cannot be repaired by the user. In this case, the user is notified that the printing device is abnormal (step 215), and the printing process is stopped (step 216).
[0123]
For an information processing apparatus such as a POS / ECR that handles money, data should not be missing or duplicated. When an error occurs in the printing device, it is important to recover from the error without erasing the received data and restart printing. However, in order to cope with an information processing apparatus using a conventional printing apparatus, a mode in which received data is deleted and then recovered is made possible, and can be selected by a control command from a host computer. That is, in an information processing device using a conventional printing device, the received data is always deleted after the printing device recovers from the error. Therefore, when printing the same data as before the error occurred, the second printing is performed. Special characters were printed at the beginning of the line to clearly indicate that they were data. In order to cope with this, a mode in which the received data is deleted and then recovered is required.
[0124]
【The invention's effect】
As described above, according to the present invention, by including the data receiving means and the real-time command analyzing means in the reception interrupt processing, the command is analyzed even when waiting for the cut sheet insertion, and the processing from the cut sheet insertion wait is started. Recovery is possible.
[0125]
As a result, as a printing apparatus in the distribution industry dealing with money, a printing apparatus with high reliability and high throughput is provided, and a load on a host computer is reduced, and a printing apparatus which is easy for a user to handle and an information processing apparatus using the same. Can be provided.
[Brief description of the drawings]
FIG. 1 is an overall view of a printing apparatus for explaining an embodiment of the present invention.
FIG. 2 is a mechanism diagram of a printing apparatus illustrating one embodiment of the present invention.
FIG. 3 is a configuration diagram of a printing unit of a printing apparatus for explaining an embodiment of the present invention.
FIG. 4 is a circuit block diagram of a control circuit illustrating one embodiment of the present invention.
FIG. 5 is a functional block diagram illustrating an embodiment of the present invention.
FIG. 6 is an explanatory diagram of an embodiment of a command used in the present invention.
FIG. 7 is a flowchart showing the steps of an embodiment of the control method of the printing apparatus according to the present invention.
FIG. 8 is a flowchart showing the steps of an embodiment of the control method of the printing apparatus according to the present invention.
FIG. 9 is a flowchart illustrating the steps of an embodiment of the control method of the printing apparatus according to the present invention.
FIG. 10 is a flowchart showing the steps of an embodiment of the control method of the printing apparatus according to the present invention.
FIG. 11 is a conceptual diagram of an information processing apparatus according to the present invention.
FIG. 12 is a flowchart showing one embodiment of a control process of a host computer using the printing apparatus of the present invention.
FIG. 13 is a flowchart showing one embodiment of a control process of a host computer using the printing apparatus of the present invention.
[Explanation of symbols]
61 Host computer
62 Data receiving means
63 Data transmission means
64 Real-time command analysis means
66 Control command analysis means
68 control means
69 Error state storage means
79 Cut sheet status storage means
71 Error detection means
72 display means
73 Paper detection means
74 Cover detecting means
75 Switch detection means
76 Peripheral device status detection means
77 State storage means
300 printing device
302 display device
303 input device

Claims (12)

ホスト装置に接続され、前記ホスト装置から送信される制御コマンドと印刷データとに従って印刷手段を制御し、印刷媒体に印刷を行う印刷装置において、
前記制御コマンド及び前記印刷データを受信するデータ受信手段と、
少なくとも前記制御コマンドを格納する受信データ格納手段と、
該受信データ格納手段に格納された制御コマンドを先着順に読みだして当該制御コマンドに応じた処理を実行する処理実行手段と、
前記データ受信手段で受信されると直ちに前記制御コマンドを解析して、前記制御コマンドが所定のリアルタイム制御コマンドであるとき当該リアルタイム制御コマンドに対応する処理を実行する制御コマンド解析手段と、
単票紙を搬送し、前記印刷手段に供給する単票紙搬送手段と、
該単票紙搬送手段への前記単票紙の供給を待って、前記単票紙搬送手段による搬送を開始せしめる単票紙搬送制御手段と、
該単票紙搬送制御手段の状態を検出する単票用紙状態記憶手段とを有し、
前記単票用紙状態記憶手段により前記単票紙搬送制御手段の単票紙供給待ち状態が検出された場合において、前記制御コマンド解析手段は、前記リアルタイム制御コマンドに応じて前記単票紙搬送制御手段の動作をキャンセルする処理を実行し、
前記データ受信手段及び前記制御コマンド解析手段は、回復可能なエラーの発生状態でも回復不可能なエラーの発生状態でも動作することを特徴とする印刷装置。
A printing device connected to a host device, controlling a printing unit in accordance with a control command and print data transmitted from the host device, and performing printing on a print medium.
Data receiving means for receiving the control command and the print data,
Receiving data storage means for storing at least the control command;
Processing execution means for reading out the control commands stored in the received data storage means on a first-come-first-served basis and executing processing in accordance with the control commands;
By analyzing the control command in the received immediately by the data receiving means, a control command analyzing means for executing a process corresponding to the real-time control command when the control command is a predetermined real-time control command,
Cut sheet transport means for transporting cut sheets and supplying the printing means,
A cut-sheet paper transport control means for waiting for the supply of the cut-sheet paper to the cut-sheet paper transport means, and starting transport by the cut-sheet paper transport means;
Having a cut-sheet paper state storage means for detecting the state of the cut-sheet paper transport control means,
When the cut sheet supply waiting state of the cut sheet transport control unit is detected by the cut sheet state storage unit, the control command analyzing unit is configured to execute the cut sheet transport control unit in response to the real-time control command. run the process to cancel the operation,
The printing apparatus according to claim 1, wherein the data receiving unit and the control command analyzing unit operate in a state where a recoverable error has occurred or in a state where an unrecoverable error has occurred .
請求項1記載の印刷装置において、
前記印刷装置は、
印刷装置の状態を検出する装置状態検出手段と、
前記ホスト装置にデータを送信するデータ送信手段とを更に有し、
前記制御コマンド解析手段は、前記リアルタイム制御コマンドに応じて、前記装置状態検出手段によって得られたデータを前記データ送信手段に渡す装置状態報告手段を含み、
前記データ送信手段は、回復可能なエラーの発生状態でも回復不可能なエラーの発生状態でも動作することを特徴とする印刷装置。
The printing device according to claim 1,
The printing device,
A device state detecting means for detecting a state of the printing apparatus;
Data transmission means for transmitting data to the host device,
The control command analyzing means, in response to the real-time control command, see contains a device status report means for passing the obtained data to the data transmitting means by the device state detection means,
The printing apparatus according to claim 1, wherein the data transmission unit operates in a state where a recoverable error has occurred or in a state where an unrecoverable error has occurred .
請求項記載の印刷装置において、
前記印刷手段はエラー発生状態において停止することを特徴とする印刷装置。
The printing device according to claim 1 ,
The printing apparatus according to claim 1 , wherein the printing unit stops in an error occurrence state .
請求項2記載の印刷装置において、
前記装置状態検出手段は、前記印刷媒体の有無又は残量を検出する用紙検出手段を含むことを特徴とする印刷装置。
The printing device according to claim 2,
The printing apparatus according to claim 1, wherein the apparatus state detecting unit includes a sheet detecting unit that detects the presence or absence or the remaining amount of the print medium.
請求項2記載の印刷装置において、
前記装置状態検出手段は、印刷装置の設定状態を検出する設定状態検出手段を含むことを特徴とする印刷装置。
The printing device according to claim 2,
The printing apparatus according to claim 1, wherein said apparatus state detecting means includes a setting state detecting means for detecting a setting state of the printing apparatus.
請求項5記載の印刷装置において、
前記印刷装置は、
連続紙を搬送し、前記印刷手段に供給する連続紙搬送手段と、
単票紙を搬送し、前記印刷手段に供給する単票紙搬送手段と、
前記単票紙搬送手段の動作を禁止又は許可する単票紙選択手段とを有し、
前記設定状態検出手段は、前記単票紙選択手段の状態を検出する単票紙選択検出手段を含むことを特徴とする印刷装置。
The printing apparatus according to claim 5,
The printing device,
Continuous paper transport means for transporting continuous paper and supplying the printing means,
Cut sheet transport means for transporting cut sheets and supplying the printing means,
Having a cut-sheet paper selecting means for prohibiting or permitting the operation of the cut-sheet paper conveying means,
The printing apparatus, wherein the setting state detecting means includes a cut sheet selection detecting means for detecting a state of the cut sheet selecting means.
請求項2記載の印刷装置において、
前記装置状態検出手段は、印刷装置の動作状態を検出する動作状態検出手段を含むことを特徴とする印刷装置。
The printing device according to claim 2,
The printing apparatus according to claim 1, wherein said apparatus state detecting means includes an operating state detecting means for detecting an operating state of the printing apparatus.
請求項7記載の印刷装置において、
前記動作状態検出手段は、前記単票紙搬送制御手段の状態を検出する単票用紙状態記憶手段を含むことを特徴とする印刷装置。
The printing apparatus according to claim 7,
The printing apparatus according to claim 1, wherein said operation state detecting means includes a cut sheet state storage means for detecting a state of said cut sheet transport control means.
請求項7記載の印刷装置において、
前記印刷装置は、前記制御コマンドと独立に前記印刷媒体の搬送動作の実行を指示するためのパネルスイッチを有し、
前記動作状態検出手段は、前記印刷媒体搬送スイッチの状態を検出するスイッチ検出手段を含むことを特徴とする印刷装置。
The printing apparatus according to claim 7,
The printing apparatus has a panel switch for instructing execution of the transport operation of the print medium independently of the control command,
The printing apparatus according to claim 1, wherein the operation state detection unit includes a switch detection unit that detects a state of the print medium transport switch.
ホスト装置に接続され、前記ホスト装置から送信される制御コマンドと印刷データとに従って印刷手段を制御し、単票紙に印刷を行う印刷装置の制御方法において、
前記制御コマンド及び前記印刷データを受信するデータ受信工程と、
少なくとも前記制御コマンドを格納する受信データ格納工程と、
格納された制御コマンドを先着順に読みだして当該制御コマンドに応じた処理を実行する処理実行工程と、
前記データ受信工程で受信されると直ちに前記制御コマンドを解析して、前記制御コマンドが所定のリアルタイム制御コマンドであるとき当該リアルタイム制御コマンドに対応する処理を実行する制御コマンド解析工程と、
単票紙の供給を待って単票紙の搬送を開始し、前記印刷手段に供給する単票紙搬送工程とを有し、
前記単票紙搬送工程が単票紙供給待ち状態となっている場合において、前記制御コマンド解析工程は、前記リアルタイム制御コマンドに応じて前記単票紙搬送工程をキャンセルする処理を実行し、
前記データ受信工程及び前記制御コマンド解析工程は、回復可能なエラーの発生状態でも回復不可能なエラーの発生状態でも動作することを特徴とする印刷装置の制御方法。
A method of controlling a printing apparatus connected to a host apparatus, controlling a printing unit in accordance with a control command and print data transmitted from the host apparatus, and performing printing on a cut sheet.
A data receiving step of receiving the control command and the print data,
A received data storing step of storing at least the control command,
A process execution step of reading out the stored control commands on a first-come-first-served basis and executing a process according to the control commands;
By analyzing the control command in the received immediately by the data receiving step, a control command analyzing step of executing a process corresponding to the real-time control command when it is the control command is a predetermined real-time control command,
Waiting for the supply of cut sheets, starting the transfer of cut sheets, having a cut sheet transfer step of supplying to the printing means,
In the case where the cut-sheet paper transport step is in a cut-sheet paper supply waiting state, the control command analyzing step executes processing of canceling the cut-sheet paper transport step in accordance with the real-time control command ,
The method of controlling a printing apparatus, wherein the data receiving step and the control command analyzing step operate in a state where a recoverable error has occurred or in a state where an unrecoverable error has occurred .
請求項10記載の印刷装置の制御方法において、
印刷装置の状態を検出する装置状態検出工程を有し
前記制御コマンド解析工程は、前記装置状態検出工程において得られたデータを前記ホスト装置に送信するデータ送信工程を含むことを特徴とする印刷装置の制御方法。
The control method for a printing apparatus according to claim 10,
Has a device state detection step of detecting a state of the printing device,
The method of controlling a printing apparatus, wherein the control command analysis step includes a data transmission step of transmitting data obtained in the apparatus state detection step to the host device.
印刷装置と、該印刷装置に制御コマンド及び印刷データを含むデータを送信するホスト装置とを有し、前記印刷装置が前記データに従って印刷手段を制御し、印刷媒体に印刷を行う、情報処理装置において、
前記印刷装置は、
前記ホスト装置にデータを送信するデータ送信手段と、
前記制御コマンド及び前記印刷データを受信するデータ受信手段と、
少なくとも前記制御コマンドを格納する受信データ格納手段と、
印刷装置の状態を検出する装置状態検出手段と、
前記データ受信手段で受信されると直ちに制御コマンドを解析して、前記制御コマンドが所定のリアルタイム制御コマンドであるとき当該リアルタイム制御コマンドに対応する処理を実行する制御コマンド解析手段と、
前記受信データ格納手段に格納された制御コマンドを先着順に読みだして当該制御コマンドに応じた処理を実行する処理実行手段と、
単票紙を搬送し、前記印刷手段に供給する単票紙搬送手段と、
該単票紙搬送手段への前記単票紙の供給を待って、前記単票紙搬送手段による搬送を開始せしめる単票紙搬送制御手段と、
該単票紙搬送制御手段の状態を検出する単票用紙状態記憶手段とを有すると共に、
前記単票用紙状態記憶手段により前記単票紙搬送制御手段の単票紙供給待ち状態が検出された場合において、前記制御コマンド解析手段は、前記リアルタイム制御コマンドに応じて前記単票紙搬送制御手段の動作をキャンセルする処理を実行し、
前記データ受信手段及び前記制御コマンド解析手段は、回復可能なエラーの発生状態でも回復不可能なエラーの発生状態でも動作し、
前記ホスト装置は、
前記印字装置に前記リアルタイム制御コマンドを送信するコマンド送信手段を有することを特徴とする情報処理装置。
An information processing apparatus, comprising: a printing apparatus; and a host apparatus for transmitting data including a control command and print data to the printing apparatus, wherein the printing apparatus controls a printing unit according to the data and performs printing on a print medium. ,
The printing device,
Data transmission means for transmitting data to the host device;
Data receiving means for receiving the control command and the print data,
Receiving data storage means for storing at least the control command;
A device state detecting means for detecting a state of the printing apparatus;
Analyzes the control immediately command when Ru is received by the data receiving means, a control command analyzing means for executing a process corresponding to the real-time control command when the control command is a predetermined real-time control command,
Processing execution means for reading out the control commands stored in the reception data storage means on a first-come-first-served basis and executing processing in accordance with the control commands;
Cut sheet transport means for transporting cut sheets and supplying the printing means,
A cut-sheet paper transport control means for waiting for the supply of the cut-sheet paper to the cut-sheet paper transport means, and starting transport by the cut-sheet paper transport means;
Having a cut sheet state storage means for detecting a state of the cut sheet transport control means,
When the cut sheet supply waiting state of the cut sheet transport control unit is detected by the cut sheet state storage unit, the control command analyzing unit is configured to execute the cut sheet transport control unit in response to the real-time control command. Execute the process to cancel the operation of
The data receiving means and the control command analysis means operate even in a state of occurrence of a recoverable error or in a state of occurrence of an unrecoverable error,
The host device includes:
An information processing apparatus comprising command transmission means for transmitting the real-time control command to the printing device.
JP2001321171A 1993-11-08 2001-10-18 PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS Expired - Lifetime JP3544365B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001321171A JP3544365B2 (en) 1993-11-08 2001-10-18 PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP27863993 1993-11-08
JP5-278637 1993-11-08
JP5-278639 1993-11-08
JP5-278638 1993-11-08
JP27863793 1993-11-08
JP27863893 1993-11-08
JP2001321171A JP3544365B2 (en) 1993-11-08 2001-10-18 PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP25250694A Division JP3552066B2 (en) 1993-11-08 1994-10-18 PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS

Publications (2)

Publication Number Publication Date
JP2002200804A JP2002200804A (en) 2002-07-16
JP3544365B2 true JP3544365B2 (en) 2004-07-21

Family

ID=27479169

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001321171A Expired - Lifetime JP3544365B2 (en) 1993-11-08 2001-10-18 PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS

Country Status (1)

Country Link
JP (1) JP3544365B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4251029B2 (en) 2003-07-28 2009-04-08 セイコーエプソン株式会社 Printing apparatus and control method thereof
JP5691335B2 (en) 2010-09-17 2015-04-01 セイコーエプソン株式会社 Medium processing apparatus, method for controlling medium processing apparatus, and program

Also Published As

Publication number Publication date
JP2002200804A (en) 2002-07-16

Similar Documents

Publication Publication Date Title
EP0652533B1 (en) Detection of the condition of a printer
JP3483044B2 (en) Printing apparatus, printing system, and status change detection method
US6205363B1 (en) Printer and control method for obtaining printer status
US7869063B2 (en) Printing apparatus, printer control method, printer control program, and printing system
EP0834828B1 (en) Hybrid printer equipped with a plurality of printing mechanisms and method of controlling it
JP3552066B2 (en) PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS
CN107053874B (en) The control method and printer of printer
JP4924748B2 (en) Printer and received data processing method
US20110119415A1 (en) Recording device, method of controlling recording device, program, and recording medium
JP4623097B2 (en) Printing device
JP4088226B2 (en) Printing device
JP3544366B2 (en) PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS
US6104496A (en) Printer and control method therefor
JP3544365B2 (en) PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS
JP4865140B2 (en) Printer, received data processing method and program
JPH10119391A (en) Composite printer with plural printer mechanisms and is controlling method
JP2007018127A (en) Printing system, control method therefor and program
JP2001282394A (en) Communication terminal equipment, its control method and its recording medium
JPH071802A (en) Printer for label
JPS6327287A (en) Printer
JP2004030685A (en) Printer, printing system, and status change detection method

Legal Events

Date Code Title Description
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: 20040319

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040401

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: 20080416

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100416

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140416

Year of fee payment: 10

EXPY Cancellation because of completion of term