JP2004005758A - Printer - Google Patents

Printer Download PDF

Info

Publication number
JP2004005758A
JP2004005758A JP2003327726A JP2003327726A JP2004005758A JP 2004005758 A JP2004005758 A JP 2004005758A JP 2003327726 A JP2003327726 A JP 2003327726A JP 2003327726 A JP2003327726 A JP 2003327726A JP 2004005758 A JP2004005758 A JP 2004005758A
Authority
JP
Japan
Prior art keywords
data
paper
command
error
printing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003327726A
Other languages
Japanese (ja)
Other versions
JP4088226B2 (en
Inventor
Takaaki Akiyama
秋山 孝明
Naohiko Koakutsu
小圷 直彦
Mitsuaki Teradaira
寺平 光明
Masayo Miyasaka
宮坂 昌代
Takuya Heinaga
兵永 卓也
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 JP2003327726A priority Critical patent/JP4088226B2/en
Publication of JP2004005758A publication Critical patent/JP2004005758A/en
Application granted granted Critical
Publication of JP4088226B2 publication Critical patent/JP4088226B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce a burden on a host computer, and to allow easy and convenient use for a user. <P>SOLUTION: Received data is analyzed in a data reception time point from a host equipment to decide whether it is a real time control command or not, prescribed processing is executed when it is real time control command, the received data are stored in a reception buffer and read out of the buffer according to a reception order to be processed, when it is not the real time control command. The real time control command comprises commands of a plurality of kinds to require transmission of a printer status, transmission of off-line factor status, transmission of error factor status, transmission of a condition of a paper sheet, restoration from an error and the like respectively. <P>COPYRIGHT: (C)2004,JPO

Description

 本発明は、ホストコンピュータに接続され、ホストコンピュータからの指令により印字を行う印字装置に関し、特にPOS/ECRなど金銭を扱う情報処理装置に最適な印字装置に関するものである。 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.

 従来の印字装置においては、印字用紙がなくなった場合、印字装置のカバーが開けられた場合、エラーが発生した場合など、印字動作の続行が不適当な場合には、印字ヘッドを含む印字メカニズムを停止し、且つホストコンピュータとのインターフェースをオフライン(論理的な切断状態)とすることにより、印字装置および通信データの保全及び使用者の安全を確保しようとしている。この時、印字装置内部の制御が停止するため、すでに印字装置が受信済のデータはオフラインの発生した時点以降は処理されなくなる。また、オフライン発生以降はデータの受信を行わないのでこのデータは処理されなくなり、印字装置からの応答は全く無くなることになる。 In the conventional printing device, when it is inappropriate to continue the printing operation, such as when the printing paper runs out, when the cover of the printing device is opened, or when an error occurs, 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.

 また、印字装置は紙送りスイッチが押され紙送り中の場合や、受信データを格納する受信バッファが満杯(以下、バッファフルという)になったりした場合にもオフラインとなり、前述の印字動作の続行が不適当な場合のオフライン状態とを区別するのは困難である。 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.

 印字装置がオフラインになると、ホストコンピュータは印字データを送信できなくなり、POSやECRなどのシステム全体が停止することになる。この場合、ホストコンピュータは表示装置に「印字装置が異常です。点検してください。」などのメッセージを表示し、使用者が印字装置を調べてオフラインの原因を除去しなければならない。しかし、一般のPOSやECRの使用者には、この原因を調べることは困難であり、長時間を要する。 (4) When the printing device goes offline, the host computer cannot send 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.

 一方、受信バッファの中に格納されている制御コマンドは、古いもの(先に格納された制御コマンド)から順に解析され、コマンド処理が実行される。そして処理の終わった制御コマンドは、受信バッファから消去される。従って、連続してホストコンピュータから制御コマンドが送られてくる場合は、受信バッファに制御コマンドが次々に格納され、格納されている制御コマンドのうち古いものから順に処理されるのでホストコンピュータが制御コマンドを送信してから、印字装置が実際に処理を行うまでには、時差(以下、タイムラグという)が発生する。 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.

 また、印字装置をリセットするか、もしくは電源を入れ直した場合には、それまで印字装置内に蓄えられた印字装置の状態を設定するためのデータが消去されてしまい、金銭を扱うPOS/ECR用の印字装置としては、非常に大きな問題であった。 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.

 このような不具合による影響を少なくするために、従来の印字装置を用いた情報処理システムにおいては、ホストコンピュータは複数行の印字データを送らずに、1行毎にステータス応答要求コマンドを添付して、印字装置の状態を確認していた。その為、ホストコンピュータにとって大きな負担となり、情報処理システムのスループットの低下を招いていた。 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.

 上記の事情から、従来POS/ECR分野においては、データ入力装置、処理装置及び印字装置が一体となった、スタンドアロン型の専用情報処理システムが広く用いられ、ホストコンピュータと印字装置とが汎用のインタフェースで接続されているシステムは、その高い柔軟性は評価されながらも、データの信頼性(いわゆるセキュリティ)への不安から普及が進んでいない。そして、当該データの信頼性を向上させ、同時に操作性を更に高めるために、印字装置の動作が停止している場合でも、その原因をホストコンピュータが知り、またその停止状態を速やかに解除できるような情報処理システムの実現が待望されている。 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.

 本発明の目的は、上記の従来技術の有する課題を解決し、信頼性の高い情報処理装置を実現可能な印字装置を提供するとともに、ホストコンピュータの負担を軽減し、使用者に使いやすい印字装置を提供することにある。 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.

 本発明の一つの観点に従う印刷装置は、ホスト装置からのデータ受信時点で受信データを解析してリアルタイム制御コマンドであるかどうかを判断し、リアルタイム制御コマンドであると判断された場合、受信したリアルタイム制御コマンドに従って所定の処理を実行するリアルタイムコマンド解析手段と、前記リアルタイムコマンド解析手段により前記受信データがリアルタイム制御コマンドではないと判断された場合、前記受信データを受信バッファに格納する受信バッファ格納手段と、前記受信バッファから前記受信データを先着順に読み出し解析してコマンドデータであるか印字データであるかを判断し、コマンドデータと印字データにそれぞれ応じた処理を実行する処理実行手段とを有することを特徴とする。 The printing apparatus according to one aspect of the present invention analyzes the received data at the time of receiving data from the host apparatus and determines whether the received command is a real-time control command. Real-time command analyzing means for executing a predetermined process according to a control command, and receiving buffer storing means for storing the received data in a receiving buffer when the real-time command analyzing means determines that the received data is not a real-time control command. Processing execution means for reading and analyzing the received data from the reception buffer on a first-come-first-served basis, determining whether the received data is command data or print data, and executing a process corresponding to the command data and the print data, respectively. Features.

 好適な実施形態においては、前記リアルタイム制御コマンドには、複数種類の処理内容をそれぞれ選択する複数種類のコマンドがあり、前記リアルタイムコマンド解析手段は、受信したリアルタイム制御コマンドにより選択された内容の処理を実行する。 In a preferred embodiment, the real-time control command includes a plurality of types of commands for respectively selecting a plurality of types of processing contents, and the real-time command analysis unit performs processing of the contents selected by the received real-time control command. Execute.

 前記複数種類の内容には、例えば、
 (1) プリンタステータスの送信、
 (2) オフライン要因ステータスの送信、
 (3) エラー要因ステータスの送信、
 (4) 用紙の状態の送信、又は
 (5) エラーからの復帰
などが含まれ得る。
In the plurality of types of contents, for example,
(1) Send printer status,
(2) Offline factor status transmission,
(3) Transmission of error cause status,
(4) Transmission of paper status, or (5) Return from error.

 好適な実施形態では、また、前記受信バッファ格納手段は、前記受信データがリアルタイム制御コマンドではないと判断された場合だけでなく、リアルタイム制御コマンドであると判断された場合にも、前記受信データを前記受信バッファに格納する。 In a preferred embodiment, the reception buffer storage means stores the received data not only when it is determined that the received data is not a real-time control command but also when it is determined that the received data is a real-time control command. The data is stored in the reception buffer.

 以下、本発明による一実施例を、図面に従って説明する。 Hereinafter, an embodiment according to the present invention will be described with reference to the drawings.

 一般に流通業界で使用される記録紙としては単票用紙と連続紙が有り、単票用紙にはスリップ紙と呼ばれる不定形の伝票用紙や、バリデーション紙と呼ばれる比較的定形で何枚かの複写紙を有するものが有る。連続紙としては店舗の記録用として保存する為のジャーナル紙と、領収証としてのレシート紙がある。 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.

 図1は、これらの記録紙のスリップ紙、ジャーナル紙、レシート紙に印字可能な印字装置の全体図である。 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.

 1は印字ヘッド本体であり、複数本のワイヤーが縦に並んだいわゆるワイヤードットヘッドである。この印字ヘッド1が矢印1A、1B方向に往復移動しながら印字を行う。3はインクリボンである。 # 1 denotes a print head body, which is a so-called wire dot head in which a plurality of wires are arranged vertically. The print head 1 performs printing while reciprocating in the directions of arrows 1A and 1B. 3 is an ink ribbon.

 レシート紙17、ジャーナル紙18はロール紙の状態で、図の様に印字機構部の後ろから挿入し上部へ排出される。また、スリップ紙19は、印字機構部の前から挿入し(矢印19A)、上部へ排出される(矢印19B)。 The receipt paper 17 and the journal paper 18 are in the form of roll paper, inserted from behind the printing mechanism as shown in the figure, and discharged upward. The slip paper 19 is inserted from the front of the printing mechanism (arrow 19A), and is discharged upward (arrow 19B).

 レシート紙、ジャーナル紙ともに、紙の終りを検出するニアエンド検出器20が装備されている。ニアエンド検出器20は、ロール紙の外径により矢印20A方向に回動するニアエンド検出レバー20aとニアエンド検出レバー20aによりオン、オフするプッシュスイッチ20bで構成される。ロール紙が終わりに近づくとその外径が小さくなり、ロール紙の中心に達するとニアエンド検出レバー20aが矢印20B方向に回動し、プシュスイッチ20bがオフして紙の終わり間近を検出する。 と も に Both receipt paper and journal paper are equipped 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.

 レシート紙17は、印字後カッタユニット14によりカットされ、客に手渡される。 The receipt paper 17 is cut by the cutter unit 14 after printing and handed to the customer.

 印字装置は、図示しない本体ケースに覆われており、図示しないカバーと下ケース15とに分かれる。21は、カバー検出器であり、対向型のフォトセンサからなる。カバーが閉じているとカバー検出器21の光が遮断され、カバークローズが検出できる。 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.

 図2は、本発明の印字装置において、連続紙と単票用紙を印字する場合の動作を示す機構図である。図2において(a)は連続用紙(図ではレシート紙)に印字する場合、(b)は単票用紙(スリップ紙)に印字する場合を示す。 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).

 印字ヘッド1は、ワイヤー支持部1aの中に図示しないワイヤーピンが有り、プラテン2との間にインクリボン3を介在してレシート紙17に印字を行う。 (4) The print head 1 has a wire pin (not shown) in the wire support portion 1a, and performs printing on the receipt paper 17 with the ink ribbon 3 interposed between the print head 1 and the platen 2.

 レシート紙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を切断する。 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 composed of a facing photosensor or a lever switch. 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 part 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.

 図では、レシート紙の場合を示したが、ジャーナル紙の場合もカッタユニットを除いては同じ構成である。 In the drawing, the case of receipt paper is shown, but the case of journal paper has the same configuration except for the cutter unit.

 スリップ紙を印字する場合(図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と離れ、次のスリップ用紙が挿入可能となる。 When printing 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 driving 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.

 レシート紙17は図のように装着したままスリップ紙19に印字可能であり、また、スリップ紙19に複写紙を添付すれば、スリップ紙19とレシート紙17を同時に、同じ内容を印字することも可能である。 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.

 スリップ紙検出器13は、レシート紙検出器12と同様に対向型のフォトセンサを用いている。 The slip paper detector 13 uses a facing photo sensor like the receipt paper detector 12.

 15は本体下ケースであり、16はヘッド機構を支持するケースである。 Reference numeral 15 denotes a lower case of the main body, and 16 denotes a case for supporting the head mechanism.

 図3は、本発明の一実施例である印字装置の印字部構成図である。 FIG. 3 is a configuration diagram of a printing unit of a printing apparatus according to an embodiment of the present invention.

 図によりヘッドキャリッジ駆動モータの脱調を検出する方法を示す。 Fig. 5 shows a method for detecting step-out of the head carriage drive motor.

 ヘッド1は、ワイヤーホルダ1aとともに、ヘッドキャリッジ1b上に固定されていて、このヘッドキャリッジ1bは、キャリッジ伝達ベルト32とキャリッジ駆動歯車31a、31bにより左右に移動する。キャリッジ駆動歯車31aは図示しないヘッドキャリッジ駆動モータと結合している。このモータは、一般的にはパルスモータが用いられており、実施例でもパルスモータを使用している。キャリッジ駆動歯車31aは、伝達歯車33を介して回転検出板34を回転させる。回転検出板34を挟むように対向型のフォトセンサからなるキャリッジ検出器35が配置されており、ヘッドキャリッジ1bの移動に従って、回転検出板34が回転し、これをキャリッジ検出器35が検出する。回転検出板34はプロペラ状に形成され、これが回転すると、キャリッジ検出器35の出力が周期的にオン、オフする。すなわち、図示しないヘッドキャリッジ駆動モータによって、ヘッドキャリッジ1bが左右に移動すると、キャリッジ検出器35によって、ヘッドキャリッジ1bの移動を検出する。 The head 1 is fixed on the head carriage 1b together with the wire holder 1a, and the head carriage 1b is moved right and left by the carriage transmission belt 32 and the 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.

 印字ヘッド1とプラテン2の間にあるレシート紙、ジャーナル紙もしくはスリップ紙が、よれてワイヤーホルダ1aとプラテン2との間につまってしまうと紙ジャムとなり、ヘッドキャリッジ1bは、キャリッジ駆動モータの回転に追従せず、キャリッジ駆動モータは脱調する。これを、キャリッジ検出器35により検出する。これをキャリッジエラーと称す。 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, 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.

 印字ヘッド1は、印字位置の基準位置を特定する為、ホームポジションが必要である。ホームポジション検出器36は、対向型のフォトセンサであり、ヘッドキャリッジ1bを検出する。すなわち、ヘッドキャリッジ1bが左に移動し、ホームポジション検出器36の光を遮断する位置がホームポジションの基準位置となる。 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.

 ヘッドキャリッジ1bが、ホームポジションに移動しようとしたとき、紙ジャムなどによりホームポジションに到達しないことをホームポジション検出器36により検出することができる。これをホームポジションエラーと称す。 (4) 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 a paper jam or the like. This is called a home position error.

 図4は、本発明を実現する制御回路の回路ブロック図である。 FIG. 4 is a circuit block diagram of a control circuit for realizing the present invention.

 印字ヘッド40、モータ類41、プランジャ類42により上述の印字装置の機構部を成しており、これらの印字機構部を駆動する印字機構部駆動回路43を有している。また、印字機構部には、キャリッジ検出器44、ホームポジション検出器45、オートカッタ検出器46、各用紙検出器47、カバー検出器54などの検出器類が装備され中央制御装置(以下、CPUと称す)50と接続している。オートカッタ検出器46は、図2におけるカッタ刃14aのポジション検出を行う検出器であり、図示しないカッタ刃駆動モータを駆動し所定の位置で検出信号を発生する。カッタ刃において紙ジャムなどが発生するとカッタ刃が所定の位置に移動せず、検出信号が発生しないためエラーとなる。これをカッタエラーと称す。 The print head 40, the motors 41, and the plungers 42 constitute a mechanism of the above-described printing apparatus, and have a printing mechanism drive circuit 43 for driving these printing 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.

 用紙検出器47は、ニアエンド検出器20(図1)、レシート紙検出器12、スリップ紙検出器13(図2)などを含む。 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.

 印字装置全体を制御するCPU50には、LEDなどで構成する表示装置48、紙送りなどを手動で行う為のパネルスイッチ49、ホストコンピュータとの通信を行うインターフェース51、制御プログラムや印字文字パターンなどを格納するROM52、受信バッファや印字バッファなどを格納するRAM53が接続している。 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.

 印字データがインターフェース51から入力されるとRAM53内の受信バッファに格納され、CPU50はこのデータを解読し、データコードに対応した文字パターンをROM52から読みだし、印字機構駆動部制御回路43を介して印字ヘッド40、モータ類41、プランジャ類42を駆動し印字を実行する。 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 read character pattern via the print mechanism drive unit control circuit 43. The print head 40, motors 41, and plungers 42 are driven to execute printing.

 キャリッジエラー、ホームポジションエラー、カッタエラーなどが発生すると、CPU50は、表示装置48を駆動して使用者にエラーの発生を知らせることができる。 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.

 図5は、本発明の全体構成を示す機能ブロック図であり、各機能手段の関係を示している。 FIG. 5 is a functional block diagram showing the overall configuration of the present invention, and shows the relationship between each functional means.

 61はホストコンピュータであり、コマンドデータや印字データなどを印字装置に送信する。62は、インターフェイス51を介してホストコンピュータ61からのデータコードを受信するデータ受信手段であり、インターフェース51により起動される割込みである。64は受信した時点で受信データを解析し、実行するリアルタイムコマンド解析手段であり、データ受信手段62とともに割込みの中で処理される。リアルタイムコマンド解析手段64は、受信データがリアルタイム制御コマンドであるかどうかを判断し、リアルタイム制御コマンドであればそのコマンド指令に従って所定の処理を実行する。リアルタイムコマンド解析手段64を介した受信データは、全て一旦受信バッファ65に蓄えられる。受信バッファ65内の受信データは、コマンド解析手段66により1データづつ取り出され、このデータコードを解析し、印字データと印字装置に対して様々な指令を設定するコマンドデータとを判別する。コマンドデータであれば、それを制御手段68によって、そのコマンドコードに従って所定の設定もしくは、所定の動作を実行する。印字データであればそのデータコードに従って文字パターンを印字バッファ67内に格納する。制御手段68により印字実行を行う場合、この印字バッファ67から印字パターンを読み出して印字機構各機能部70を制御して印字を行う。 # 61 is a host computer that sends 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.

 本実施例では、インターフェースは双方向のシリアルインターフェースであるRS−232Cを用いており、RS−232Cではオフラインの状態でもホストコンピュータとの通信は可能である。一般にRS−232Cの双方向シリアルインターフェースでは、一方の装置がオフラインとなっても他方の装置がそれを検出し通信データの送信を停止するまでの間、数バイトのデータが回線上に乗っている可能性がある為、オフラインとした側の装置はオフライン後もデータを受信しなければならない。よって、受信バッファがいっぱいになる前にオフラインとすることが必要である。従って、印字装置にエラーが発生しオフラインとなっても受信バッファに空きが有る間、通信データは受信され、受信バッファに蓄えられる。そして、受信バッファがいっぱいになった場合、その後の受信データは捨てられてしまうことになる。しかし、本実施例では、受信割込みで起動されるリアルタイムコマンド解析手段64により受信バッファに記憶する前にコマンドの解析を行う為、たとえ捨てられても、コマンドとしての処理は行われる。 In this embodiment, the interface uses the 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.

 リアルタイムコマンドには、印字装置の状態を要求するコマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64により印字装置の状態をデータ送信手段63を介してホストコンピュータ61に回答する。エラー発生状態であっても、データ受信手段62とデータ送信手段63とリアルタイムコマンド解析手段64は動作しているため、印字装置の状態を送信することが可能である。 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.

 コマンド解析手段66で単票用紙選択コマンドであると判断された場合、制御手段68に通知する。制御手段68は、単票用紙が選択されたことを表示手段72に通知し、単票用紙挿入待ちの表示を行うと同時に、単票用紙状態記憶手段79により、RAM53内部に単票用紙が選択されたことと、単票用紙挿入待ちに入ったことを単票用紙情報として記憶する。単票用紙が選択されると単票用紙検出器73により単票用紙の挿入を検出し、制御手段68に通知する。制御手段68は単票用紙挿入待ち情報を監視し、単票用紙挿入待ち情報の内容が消去されるか、単票用紙の挿入が検出されるまで印字装置の駆動を停止する。コマンド解析手段66も制御手段68を起動できずに停止するが、リアルタイムコマンド解析手段64は、単票用紙挿入待ちに関係なく動作することができる。 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.

 リアルタイムコマンドには、単票用紙の挿入待ちを解除するコマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64によってRAM53内に記憶された単票用紙挿入待ち情報および単票用紙選択情報を消去する。この単票用紙挿入待ち状態を監視していた制御手段68は、単票用紙挿入待ち情報が消去されたことを確認すると、単票用紙挿入待ちを解除し印字バッファ67を消去し、初期値の用紙を選択する。単票用紙の挿入待ちを解除する方法としてタイムアウトがあり、制御手段68はタイマ78を制御する。 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.

 印字や紙送り、用紙のカットなどにおいて紙ジャムなどのエラーが発生した場合、エラー検出手段71によりエラーを検出し、制御手段68に通知するとともに、状態記憶手段77に記憶される。制御手段68は、エラーが発生したことを表示手段72に通知し、エラーの表示を行うと同時に、エラー状態記憶手段69によりRAM53内部にエラーの発生をエラー情報として記憶する。制御手段68は、エラー情報を監視し、この内容が消去されるまで印字装置の駆動を停止する。コマンド解析手段66も制御手段68を起動できずに停止するが、インターフェース51の受信割込みで起動されるリアルタイムコマンド解析手段64は、エラーの発生に関係なく動作することができる。ただし、コマンド解析手段65が停止しているため、インターフェース51で受信される受信データは、受信バッファ65内のデータは貯まっていく一方なので、エラー発生と同時に制御手段68によりインターフェースを制御して印字装置がデータを受け取れない事をホストコンピュータに通知する(いわゆるオフライン)。 (4) When an error such as a paper jam occurs during printing, paper feeding, paper cutting, or the like, the error is detected by the error detecting unit 71, notified to the control unit 68, and stored in the state storage unit 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).

 リアルタイムコマンドには、エラーのからの回復コマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64によってRAM内に記憶されたエラー情報を消去する。このエラー状態を監視していた制御手段68は、エラー情報が消去されたことを確認すると、印字装置を再度起動し印字を再開する。 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.

 エラーからの回復コマンドのもう1つに、受信済のデータを消去した後印字を再開するコマンドがあり、このコマンドが受信されるとリアルタイムコマンド解析手段により受信バッファ65、印字バッファ67が消去された後、RAM内に記憶されたエラー情報を消去する。 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.

 用紙検出器73による紙無し、カバー検出器74によるカバーオープンの検出、スイッチ検出器75による紙送りスイッチによる紙送り中の時も印字装置がオフラインとなって、その状態が状態記憶手段77に記憶され、リアルタイムコマンド解析手段64によってその情報をホストコンピュータ61に回答する。 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.

 図6は、リアルタイムコマンドの一実施例のコマンドコードを示す。 FIG. 6 shows a command code of one embodiment of the real-time command.

 図6において、「GS」「R」「n」はそれぞれ1バイトの受信データで、それぞれ16進表記で1Dh、52h、nを示す。「GS」「R」がリアルタイムコマンドであることを示し、nの値により実行する内容を選択する。 In FIG. 6, “GS”, “R”, and “n” are 1-byte received data, and indicate 1Dh, 52h, and n in hexadecimal notation, respectively. “GS” and “R” indicate real-time commands, and the content to be executed is selected according to the value of n.

 本実施例では、nの値により表1の様に実行する内容を定めている。 In this embodiment, the contents to be executed are determined as shown in Table 1 depending on the value of n.

Figure 2004005758
 nが0の場合、表2に従う印字装置ステータス情報1バイトをホストコンピュータに送信する。
Figure 2004005758
When n is 0, one byte of printer status information according to Table 2 is transmitted to the host computer.

Figure 2004005758
 印字装置ステータス情報によりドロワの状態、印字装置のオンライン/オフラインの状態がホストコンピュータ側で判断できる。また、印字装置がオフラインの場合には、nを1としてさらに詳細なオフライン情報を取得することができる。
Figure 2004005758
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, more detailed off-line information can be obtained by setting n to 1.

 nが1の場合、表3に従うオフライン情報1バイトをホストコンピュータに送信する。 When n is 1, one byte of offline information according to Table 3 is transmitted to the host computer.

Figure 2004005758
 これにより、オフラインの情報をホストコンピュータ側で識別できる。
Figure 2004005758
As a result, offline information can be identified on the host computer side.

 ホストコンピュータは識別した結果によって、使用者に注意を促すことができる。また、エラーの場合には、nを2として引き続き詳細なエラー情報を取得することができる。 The host computer can alert the user based on the result of identification. Further, in the case of an error, it is possible to continue to obtain detailed error information by setting n to 2.

 nが2の場合、表4に従うエラー情報1バイトをホストコンピュータに送信する。 When n is 2, 1 byte of error information according to Table 4 is transmitted to the host computer.

Figure 2004005758
 表4の中でメカニカルエラーとは、主に紙ジャムによるエラーの場合であって、キャリッジエラー、ホームポジションエラーを含む。これらは、印字ヘッド回りの紙ジャムであり、オートカッタエラーと区別している。これにより、印字ヘッド回りでの紙ジャムか、オートカッタでの紙ジャムかをホストコンピュータ側で識別することができる。識別した結果により、ホストコンピュータの表示手段によって使用者にエラー発生の箇所を的確に指示し、紙ジャムの除去を促す事ができる。
Figure 2004005758
In Table 4, the mechanical error is mainly an error caused by paper jam, and includes a carriage error and a home position error. These are paper jams around the print head and are distinguished from auto 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 result of the identification, 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.

 紙ジャムなどのエラーの場合には、原因となる紙ジャムを取り除けば印字再開が可能である。しかし、外部電源の異常や印字ヘッドのヘッド温度検出器の破損など印字再開が困難なエラーもあるため、これらを識別する必要がある。紙ジャム以外で発生したエラーは回復不可能エラーとしてビット5に割り当てている。 エ ラ ー In the case of an error such as a paper jam, printing can be resumed by removing the paper jam that caused 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.

 nが3の場合、表5に従うレシートやジャーナルなどの連続用紙検出器情報1バイトをホストコンピュータに送信する。 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.

Figure 2004005758
 nが4の場合、表6に従うスリップ用紙検出器情報1バイトをホストコンピュータに送信する。
Figure 2004005758
When n is 4, one byte of slip paper detector information according to Table 6 is transmitted to the host computer.

Figure 2004005758
 表6において、スリップ用紙の選択により、連続用紙やバリデーション用紙が選択されているかスリップ用紙が選択されているかが判断できる。また、スリップ用紙選択中において、用紙の挿入待ちであるか、すでに用紙があり印字可能な状態であるかが判断できる。
nが5の場合、表7に従うバリデーション用紙検出器情報1バイトをホストコンピュータに送信する。
Figure 2004005758
In Table 6, by selecting the slip paper, it can be determined whether the continuous paper, the validation paper, or the slip paper is 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.
If n is 5, one byte of validation paper detector information according to Table 7 is transmitted to the host computer.

Figure 2004005758
 表7において、バリデーション用紙の選択により、連続用紙やスリップ用紙が選択されているかバリデーション用紙が選択されているかが判断できる。また、バリデーション用紙選択中において、用紙の挿入待ちであるか、すでに用紙があり印字可能な状態であるかが判断できる。
Figure 2004005758
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.

 次に、図7、図8でリアルタイムコマンドのデータ受信手段とリアルタイムコマンド解析手段について説明する。 Next, a description will be given of the real-time command data receiving means and the real-time command analyzing means with reference to FIGS.

 図7は、印字装置の初期化行程を示し、電源オンと同時に処理が開始される(ステップ120)。初期化においては、印字機構の初期化(ステップ121)、単票用紙状態フラグ、エラー情報、バッファクリアフラグ、GSフラグ、GSRフラグなどを含め、一般的にはRAM53内の全ての情報を初期化する(ステップ122)。バッファクリアフラグ、GSフラグ、GSRフラグは、受信割込み処理で使用するフラグで、リアルタイムコマンド解析手段で用いる。最後にステップ124でインターフェースの受信割込みを許可して初期化行程を終了する(ステップ124)。 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).

 図8は、インターフェースの受信割込み処理の行程を示し、データ受信手段とリアルタイムコマンド解析手段を示している。インターフェースを介して、ホストコンピュータからの受信データは、1バイトづつ受信されるため、各バイト受信毎に図8の処理が起動される。リアルタイムコマンドは、図6に示した様に「GS」「R」「n」の3バイトで構成されるため、「GS」を受信した時にセットされるGSフラグ、GSがセットされている場合に「R」を受信した時にセットされるGSRフラグ、GSRフラグがセットされている時に受信した「n」によって制御される。また、「n」の値によってバッファをクリアするかどうかを記憶するバッファクリアフラグがある。 FIG. 8 shows the process of the interface receiving interrupt process, showing the data receiving means and the 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”.

 ステップ125でデータが受信され受信割込みが起動される。ステップ126で受信データをインターフェースから読みだし、ステップ127でGSRフラグがセットされているかどうかを判断する。GSRフラグがセットされている場合、すなわち既に「GS」「R」まで受信済の場合、受信データ(ここではCとする)を「n」として処理を行う。ステップ136でGSRフラグをクリアし、受信データ(C)の値により、以下の動作を行う(ステップ137)。 (4) 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, processing 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).

 C=0の時、送信手段63によりRAM53内に記憶したプリンタ情報をインターフェースを介してホストコンピュータに送信する(ステップ138)。 When C = 0, the transmitting unit 63 transmits the printer information stored in the RAM 53 to the host computer via the interface (step 138).

 C=1の時、送信手段63によりRAM53内に記憶したオフライン情報をインターフェースを介してホストコンピュータに送信する(ステップ139)。 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).

 C=2の時、送信手段63によりRAM53内に記憶したエラー情報をインターフェースを介してホストコンピュータに送信する(ステップ140)。 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).

 C=3の時、送信手段63によりRAM53内に記憶した連続用紙情報をインターフェースを介してホストコンピュータに送信する(ステップ141)。 When C = 3, the transmitting means 63 transmits the continuous paper information stored in the RAM 53 to the host computer via the interface (step 141).

 C=4の時、送信手段63によりRAM53内に記憶したスリップ状態情報をインターフェースを介してホストコンピュータに送信する(ステップ142)。 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).

 C=5の時、送信手段63によりRAM53内に記憶したバリデーション状態情報をインターフェースを介してホストコンピュータに送信する(ステップ143)。 When C = 5, the transmitting unit 63 transmits the validation status information stored in the RAM 53 to the host computer via the interface (step 143).

 C=6の場合、単票用紙待ち状態かどうかを判断し(ステップ144)、待ち状態であれば、単票用紙待ちフラグをクリアする(ステップ145)。図9で示すように、単票用紙待ちフラグをクリアすることにより、単票用紙待ち状態から回復することができる。 If C = 6, it is determined whether or not a cut-sheet paper waiting state is set (step 144). If it is a 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.

 C=8の場合バッファクリアフラグをセットし(ステップ146)、RAM53内のエラー情報をクリアする(ステップ147)。バッファクリアフラグをクリアすると、図10で示すようにエラーからの回復時に受信バッファと印字バッファをクリアされる。C=7の場合、単にエラー情報をクリアする(ステップ147)。 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).

 受信データは、リアルタイムコマンドであっても、一旦受信バッファに記憶される(ステップ132)。 (4) Even if the received data is a real-time command, it is temporarily stored in the reception buffer (step 132).

 ステップ127においてGSRフラグがクリアされている場合、ステップ128でGSフラグがセットされているかを判断する。すなわち、既に「GS」まで受信済の場合GSフラグがセットされており、ステップ129でGSフラグをクリアし、受信データ(C)が「R」かどうかを判断する(ステップ129)。C=「R」の場合GSRフラグをセットし(ステップ131)、受信バッファに受信データを記憶する(ステップ132)。 (4) 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).

 ステップ128においてGSフラグがクリアされている場合、ステップ134において受信データ(C)が「GS」コードかどうか判断する。C=「GS」の場合、GSフラグをセットし、そうでなければそのまま受信バッファに記憶して(ステップ132)、受信割込み処理を終了する(ステップ133)。 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).

 次に、図9で単票用紙の設定を行う制御手段について説明する。図9で単票用紙が選択されてから設定されるまでと、単票用紙解除の行程を示す。コマンド解釈手段66で単票用紙選択コマンドであると判断されたときに処理が開始する(ステップ151)。単票用紙選択フラグをセットし、単票用紙挿入待ちフラグをセットする(ステップ152)。メカ動作が停止したのを確認してから(ステップ153)、単票用紙挿入待ちタイマ78を起動し、表示手段72により表示装置48を点滅させる(ステップ155)。ステップ156で単票用紙挿入待ちフラグがクリアされているか判断する。単票用紙挿入待ちフラグがクリアされている場合、すなわちリアルタイムコマンド「GS」「R」「6」により単票用紙の挿入待ちをキャンセルした場合、単票用紙挿入待ちタイマを停止し(ステップ157)、表示示手段72により表示装置48を消灯する(ステップ158)。単票用紙選択フラグと、単票用紙挿入待ちフラグをクリアし(ステップ159)、初期値の用紙をセットし(ステップ160)、単票用紙選択処理を終了する(ステップ161)。 Next, the control means for setting the 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).

 ステップ156で単票用紙挿入待ちフラグがクリアされていない場合、単票用紙挿入待ち時間がすぎていないか判断し(ステップ162)、単票用紙待ち時間がすぎていた場合、ステップ158の処理へ飛ぶ。 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.

 ステップ162で単票用紙挿入待ち時間が過ぎていない場合、ステップ163で単票用紙が挿入されたか判断する。単票用紙が挿入されていないと判断された場合、再び単票用紙挿入待ちフラグがクリアされているかステップ156に判断にいき、単票用紙挿入待ちフラグがクリアされるか、単票用紙挿入待ち時間が切れるか、単票用紙が挿入されるまで以上の動作が繰り返される。 If it is determined in step 162 that the cut sheet insertion waiting time has not elapsed, 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.

 ステップ163で単票用紙が挿入さたと判断された場合、単票用紙挿入待ちタイマ78を停止し(ステップ164)、表示装置48を点灯し(ステップ165)、動作開始待ち時間待つ(ステップ166)。ステップ167で単票用紙が挿入されていないと判断された場合、ステップ154の処理へに戻り、以上の動作を繰り返す。 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.

 ステップ167で単票用紙が挿入されていると判断された場合、単票用紙挿入待ちフラグをクリアし(ステップ168)、単票用紙を正位置にセットし(ステップ169)、単票用紙選択の処理を終了する(ステップ161)。 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).

 以上述べた様に、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、印字装置が単票用紙挿入待ちにより停止した場合でも、コマンドを解析し、単票用紙挿入待ちを解除できる。 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.

 図10に、エラーを検出する一実施例としてキャリッジエラーを検出する場合について説明する。 FIG. 10 illustrates a case where a carriage error is detected as an embodiment for detecting an error.

 ステップ101で印字指令が開始され、ステップ102で1行印字分の印字装置の初期化を行う。ステップ103から105において1行分の印字を行う。ステップ103では、1ドット列の印字を行い印字キャリッジを1ドット列分移動する。104では、キャリッジが移動することにより、キェリッジ検出器35からの検出パルスがあるかどうかを調べる。通常は、キャリッジが正常に移動するため検出パルスが周期的に発生する。ステップ105において、1行分の印字が終了したかどうかを調べ、終了していない場合ステップ103から繰り返す。1行分の印字が終了していれば、ステップ106で印字終了となる。 (4) In step 101, a print command is started, and in step 102, the printing apparatus for one-line printing 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.

 ここで紙ジャムなどによりキャリッジが停止した場合、ステップ104において、検出パルスが検出されず、ステップ107に移行する。すなわち、ステップ107以降は、キャリッッジエラーが発生した場合の処理となり、まず、ステップ107において、印字装置が通信データを受け取れないことをホストコンピュータに通知する、いわゆるオフラインとする。ステップ108においてキャリッジエラーが発生した事をRAM53内に記憶する。キャリッッジエラーは回復可能なエラーであるから、回復可能エラーとして情報を記憶する。同時に109において印字機構を停止する。その後、ステップ111において上記エラー情報が消去されるまで、ステップ110においてエラー表示装置にエラーが発生した事を表示する。リアルタイムコマンドが受信されると、エラー情報が消去されステップ112において、受信したリアルタイムコマンドがバッファクリアを指令しているかにより、指令している場合、113においてバッファをクリアする。この場合のバッファとは、受信バッファと印字バッファの両方を示す。その後、ステップ114で印字装置の回復処理を行い、ステップ115で印字装置が受信可能になったことをホストコンピュータに知らせる、いわゆるオンラインとする。 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 processing after step 107 is performed when a carriage error occurs. First, in step 107, the host computer is notified that the printing apparatus cannot receive communication data, that is, the processing 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. After that, until the above 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 device is performed, and in step 115, the host computer is notified that the printing device is ready to receive data, that is, the device is brought online.

 以上述べた様に、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、印字装置がエラー発生により停止した場合でも、コマンドを解析し、エラーからの回復が可能となる。 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, it is possible to analyze the command and recover from the error.

 次にホストコンピュータ側から見た場合の印字装置の制御について説明する。 Next, control of the printing device as viewed from the host computer will be described.

 図11は、本発明の情報処理装置の概念図であって、印字装置300はホストコンピュータ61とRS−232Cの通信ケーブル305により接続している。ホストコンピュータ61内には、通信手段304としてRS−232Cインターフェース制御回路が組み込まれている。また、CRTなどの表示装置302とキーボードなどの入力装置303がホストコンピュータ61に接続している。 FIG. 11 is a conceptual diagram of the information processing apparatus of the present invention. The printing apparatus 300 is connected to the host computer 61 by 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.

 図12は、ホストコンピュータにおいて、単票用紙挿入待ちを解除することを考慮した制御行程を示すフローチャート図である。ここでは、単票用紙の例としてスリップ紙に印字する場合を示す。 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.

 スリップ用紙に印字する場合(ステップ250)、まず、スリップ用紙選択コマンドを送信する(ステップ251)。次に、スリップ用紙の状態を調べるためリアルタイムコマンド「GS」「R」「4」を送信し(ステップ252)、これに対する応答を受信する(ステップ253)。この応答は、表6に示した情報が含まれている。この情報により、スリップ用紙が選択されたかどうかを判断する(ステップ254)。 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).

 スリップ用紙が選択された場合、ステップ253における情報により、スリップの挿入待ちかどうかを判断する(ステップ255)。挿入待ちでない場合、スリップ用紙のありを確認後(ステップ256)、印字データを送信して(ステップ257)、スリップ用紙の印字を終了する(ステップ258)。 If slip paper is selected, it is determined from the information in step 253 whether or not it is waiting for slip insertion (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).

 ステップ255において、スリップ挿入待ちのとき、入力装置303の特定のキー、たとえば「スリップキャンセルキー」を監視しこのキーが押されているかどうかを判断する(ステップ259)。このキーは、スリップ挿入待ちキャンセルの機能を割り当てられたキーであり、オペレータにより操作される。 In step 255, when waiting for slip insertion, a specific key of the input device 303, for example, a "slip cancel key" is monitored and it is determined 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.

 キーが押されている場合、スリップ挿入待ちキャンセルコマンド「GS」「R」「6」を送信することによりスリップ挿入待ちを解除することができる(ステップ260)。 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).

 また、ステップ254とステップ256において、それぞれスリップが非選択の場合と用紙がない場合においても、このキーを監視することにより、スリップ印字を終了することができる(ステップ259)。この場合、スリップキャンセルコマンド「GS」「R」「6」を送信しても、印字装置側では単票用紙の挿入待ち状態でないため無視される(ステップ260)。キーが押されていない場合、ステップ252に戻り、スリップの選択(ステップ254)もしくは、用紙あり(ステップ256)を待つことになる。 Also, 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).

 図13は、ホストコンピュータにおいて、エラーからの回復を考慮した印字行程を示すフローチャート図である。 FIG. 13 is a flowchart showing a printing process in the host computer in consideration of recovery from an error.

 印字開始後(ステップ200)、1行分の印字データを送信する毎に(ステップ201)、印字装置がオフラインになったかどうかを監視する(ステップ202)。一般に、RS−232Cインターフェースでは、受信側(ここでは印字装置)がオフラインになると、CTS(Clear
To Send)信号もしくは、DSR(Data Set Ready)信号、もしくはXOFFコードにより知ることができる。印字装置がオンラインであれば、印字データを送信し続け、印字データが終了すれば(ステップ203)、印字終了となる(ステップ204)。
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, CTS (Clear) is used.
To Send) signal, DSR (Data Set Ready) signal, or 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).

 ステップ202において、印字装置がオフラインになると、印字装置がエラーを発生したか、その他の原因(たとえば、印字用紙が無くなったなど)により印字ができなくなったと考えられる。そこで、エラーが発生したかどうかを確認するため、ステップ205でリアルタイムコマンド「GS」「R」「2」を送信する。これに対する応答をステップ206で受信し、エラーが発生しているかを判断する(ステップ207)。エラーが発生していない場合、エラー以外の原因でオフラインになったと考えれるので、その他の原因を調べ(ステップ208)、それに対する処理を行う(ステップ209)。その他の原因の取得は、「GS」「R」「1」により、カバーが開いている、印字用紙が無くなったなどの情報を取得することによる。ホストコンピュータは、「カバーを閉じてください」とか「紙をセットしてください」などと表示装置302に表示し、使用者に注意を促すことができる。 {Circle around (2)} In step 202, when the printing device goes offline, it is considered that printing has become impossible due to an error occurring 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.

 これを印字装置がオンラインになるまで繰り返し(ステップ210)、オンラインになったところで、印字を再開する(ステップ201)。 (4) This is repeated until the printing device is online (step 210), and when the printing device is online, printing is resumed (step 201).

 ステップ207でエラーが発生した場合、そのエラーが回復可能かどうかを判断する(ステップ211)。回復可能エラーかどうかは、表4に示したビット5で判断できる。回復可能エラーの場合、エラーが発生したことを使用者に知らせ、エラーの原因と予想される紙ジャムなどを取り除くことを指示する。この時、紙ジャムの発生箇所を表4のビット2とビット3により、キャリッジかオートカッタかを使用者に知らせる事ができる。使用者が紙ジャムを取り除いた後、ホストコンピュータの入力装置303(たとえばキーボード)により、確認の入力を行なわせることにより、エラー原因の除去を確認する(ステップ213)。その後、リアルタイムコマンド「GS」「R」「6」もしくは「7」により、印字装置をエラーから回復させる。使用者が、エラーの原因を完全に取り除いていない場合や、複数のエラーが同時に発生している場合を考慮して、再度ステップ205から、エラーの発生を確認することが望ましい。 If an error has occurred in step 207, it is determined whether the error can be recovered (step 211). Whether the error is a recoverable error 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 an instruction is given to remove a paper jam or the like that is expected to cause the error. At this time, the user can be informed of the position where the paper jam has occurred 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 causes a confirmation input to be performed, thereby confirming the elimination of the error cause (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.

 ステップ211において回復不可能なエラーの場合は、印字装置に異常が有り、使用者では修復できない場合である。この場合は、印字装置が異常であることを使用者に知らせて(ステップ215)、印字処理を中止する(ステップ216)。 If the error is unrecoverable in step 211, the printing device 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).

 金銭を扱うPOS/ECRなどの情報処理装置としては、データの欠落、重複は絶対あってはなならい。印字装置にエラーが発生した場合、受信済のデータを抹消すること無くエラーから回復し、印字を再開することは重要である。ただし、従来の印字装置を用いた情報処理装置にも対応するため、受信済のデータを抹消してから回復するモードを可能にし、ホストコンピュータからの制御コマンドにより選択可能とした。すなわち、従来の印字装置を用いた情報処理装置では、印字装置がエラーから回復した後は必ず受信済データは抹消していた為、エラー発生前と同一データを印字する場合は、2度目の印字データであることを明示するために特殊な文字を行の先頭などに印字させていた。これに対応するため、受信済データを抹消してから回復するモードが必要であった。 情報 処理 Data processing devices such as POS / ECR that handle money must have no data loss or duplication. 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 correspond to an information processing apparatus using a conventional printing apparatus, a mode in which received data is deleted and then recovered is made possible, and the mode can be selected by a control command from a host computer. That is, in the information processing device using the 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.

 以上述べた本発明の実施例によれば、印字装置がオフラインになった時でも、その原因をホストコンピュータ側で知る事ができる。また、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、印刷装置側はコマンドを解析することができる。これにより、金銭を扱う流通業界の印字装置として、信頼性の高い高スループットの印字装置を提供するとともに、ホストコンピュータの負担を軽減し、使用者に扱い易い印字装置およびこれを用いた情報処理装置を提供することができる。 According to the embodiment of the present invention described above, even when the printing device goes offline, the cause can be known on the host computer side. In addition, by including the data receiving means and the real-time command analyzing means in the reception interrupt processing, the printing apparatus can analyze the command. Accordingly, as a printing apparatus in the distribution industry dealing with money, a printing apparatus with high reliability and high throughput is provided, and a burden 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.

本発明の一実施例を説明する印字装置の全体図。FIG. 1 is an overall view of a printing apparatus illustrating one embodiment of the present invention. 本発明の一実施例を説明する印字装置の機構図。FIG. 1 is a mechanism diagram of a printing apparatus illustrating one embodiment of the present invention. 本発明の一実施例を説明する印字装置の印字部構成図。FIG. 1 is a configuration diagram of a printing unit of a printing apparatus illustrating one embodiment of the present invention. 本発明の一実施例を説明する制御回路の回路ブロック図。FIG. 2 is a circuit block diagram of a control circuit illustrating one embodiment of the present invention. 本発明の一実施例を説明する機能ブロック図。FIG. 2 is a functional block diagram illustrating an embodiment of the present invention. 本発明に用いるコマンドの一実施例の説明図。FIG. 4 is an explanatory diagram of an embodiment of a command used in the present invention. 本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。FIG. 4 is a flowchart illustrating a process of a printing apparatus control method according to an embodiment of the present invention. 本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。FIG. 4 is a flowchart illustrating a process of a printing apparatus control method according to an embodiment of the present invention. 本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。FIG. 4 is a flowchart illustrating a process of a printing apparatus control method according to an embodiment of the present invention. 本発明の印字装置の制御方法の一実施例の行程を示すフローチャート図。FIG. 4 is a flowchart illustrating a process of a printing apparatus control method according to an embodiment of the present invention. 本発明の情報処理装置の概念図。FIG. 1 is a conceptual diagram of an information processing apparatus according to the present invention. 本発明の印字装置を用いたホストコンピュータの制御行程の一実施例を示すフローチャート図。FIG. 4 is a flowchart showing an embodiment of a control process of a host computer using the printing apparatus of the present invention. 本発明の印字装置を用いたホストコンピュータの制御行程の一実施例を示すフローチャート図。FIG. 4 is a flowchart showing an embodiment of a control process of a host computer using the printing apparatus of the present invention.

符号の説明Explanation of reference numerals

61 ホストコンピュータ
62 データ受信手段
63 データ送信手段
64 リアルタイムコマンド解析手段
66 制御コマンド解析手段
68 制御手段
69 エラー状態記憶手段
79 単票用紙状態記憶手段
71 エラー検出手段
72 表示手段
73 用紙検出手段
74 カバー検出手段
75 スイッチ検出手段
76 周辺機器状態検出手段
77 状態記憶手段
300 印字装置
302 表示装置
303 入力装置
61 Host computer 62 Data receiving means 63 Data transmitting means 64 Real-time command analyzing means 66 Control command analyzing means 68 Control means 69 Error status storage means 79 Cut sheet status storage means 71 Error detection means 72 Display means 73 Paper detection means 74 Cover detection Means 75 Switch detection means 76 Peripheral device state detection means 77 State storage means 300 Printing device 302 Display device 303 Input device

Claims (4)

ホスト装置からのデータ受信時点で受信データを解析してリアルタイム制御コマンドであるかどうかを判断し、リアルタイム制御コマンドであると判断された場合、受信したリアルタイム制御コマンドに従って所定の処理を実行するリアルタイムコマンド解析手段と、
 前記リアルタイムコマンド解析手段により前記受信データがリアルタイム制御コマンドではないと判断された場合、前記受信データを受信バッファに格納する受信バッファ格納手段と、
 前記受信バッファから前記受信データを先着順に読み出し解析してコマンドデータであるか印字データであるかを判断し、コマンドデータと印字データにそれぞれ応じた処理を実行する処理実行手段と
を有することを特徴とする印刷装置。
At the time of receiving data from the host device, the received data is analyzed to determine whether the received command is a real-time control command. Analysis means;
When the real-time command analysis unit determines that the received data is not a real-time control command, a reception buffer storage unit that stores the reception data in a reception buffer,
Processing execution means for reading and analyzing the received data from the reception buffer on a first-come-first-served basis, determining whether the received data is command data or print data, and executing processing corresponding to the command data and print data, respectively. Printing device.
前記リアルタイム制御コマンドには、複数種類の処理内容をそれぞれ選択する複数種類のコマンドがあり、
 前記リアルタイムコマンド解析手段は、受信したリアルタイム制御コマンドにより選択された内容の処理を実行することを特徴とする請求項1記載の印刷装置。
The real-time control command includes a plurality of types of commands for respectively selecting a plurality of types of processing contents,
The printing apparatus according to claim 1, wherein the real-time command analysis unit executes a process of a content selected by the received real-time control command.
前記複数種類の内容には、
 (1) プリンタステータスの送信、
 (2) オフライン要因ステータスの送信、
 (3) エラー要因ステータスの送信、
 (4) 用紙の状態の送信、又は
 (5) エラーからの復帰
が含まれることを特徴とする請求項2記載の印刷装置。
The plurality of types of contents include:
(1) Send printer status,
(2) Offline factor status transmission,
(3) Transmission of error cause status,
3. The printing apparatus according to claim 2, further comprising: (4) transmitting a state of the sheet, or (5) returning from an error.
前記受信バッファ格納手段は、前記受信データがリアルタイム制御コマンドではないと判断された場合だけでなく、リアルタイム制御コマンドであると判断された場合にも、前記受信データを前記受信バッファに格納することを特徴とする請求項1記載の印刷装置。 The reception buffer storage unit stores the reception data in the reception buffer not only when it is determined that the reception data is not a real-time control command but also when it is determined that the reception data is a real-time control command. The printing device according to claim 1, wherein
JP2003327726A 1993-11-08 2003-09-19 Printing device Expired - Lifetime JP4088226B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003327726A JP4088226B2 (en) 1993-11-08 2003-09-19 Printing device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP27863993 1993-11-08
JP27863793 1993-11-08
JP27863893 1993-11-08
JP2003327726A JP4088226B2 (en) 1993-11-08 2003-09-19 Printing device

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

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2008001145A Division JP4623097B2 (en) 1993-11-08 2008-01-08 Printing device

Publications (2)

Publication Number Publication Date
JP2004005758A true JP2004005758A (en) 2004-01-08
JP4088226B2 JP4088226B2 (en) 2008-05-21

Family

ID=30449466

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003327726A Expired - Lifetime JP4088226B2 (en) 1993-11-08 2003-09-19 Printing device

Country Status (1)

Country Link
JP (1) JP4088226B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006321130A (en) * 2005-05-19 2006-11-30 Seiko Epson Corp Control method of printer and printer
JP2010115928A (en) * 2010-02-19 2010-05-27 Brother Ind Ltd Printing apparatus
US8130393B2 (en) 2005-04-18 2012-03-06 Bixolon Co. Ltd. Printing apparatus, control method therefor, and data processing apparatus using the printing apparatus
US8270016B2 (en) 2007-11-28 2012-09-18 Brother Kogyo Kabushiki Kaisha Printing device, method and computer readable medium for print process
US8279475B2 (en) 2008-05-27 2012-10-02 Bixolon Co., Ltd. Printing apparatus and method for processing real-time command using the printing apparatus
US8769215B2 (en) 2011-04-15 2014-07-01 Seiko Epson Corporation Recording device, recording device control method, and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8130393B2 (en) 2005-04-18 2012-03-06 Bixolon Co. Ltd. Printing apparatus, control method therefor, and data processing apparatus using the printing apparatus
JP2006321130A (en) * 2005-05-19 2006-11-30 Seiko Epson Corp Control method of printer and printer
US8270016B2 (en) 2007-11-28 2012-09-18 Brother Kogyo Kabushiki Kaisha Printing device, method and computer readable medium for print process
US8279475B2 (en) 2008-05-27 2012-10-02 Bixolon Co., Ltd. Printing apparatus and method for processing real-time command using the printing apparatus
JP2010115928A (en) * 2010-02-19 2010-05-27 Brother Ind Ltd Printing apparatus
US8769215B2 (en) 2011-04-15 2014-07-01 Seiko Epson Corporation Recording device, recording device control method, and storage medium

Also Published As

Publication number Publication date
JP4088226B2 (en) 2008-05-21

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
JP3552066B2 (en) PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS
EP0834828B1 (en) Hybrid printer equipped with a plurality of printing mechanisms and method of controlling it
CN107053874B (en) The control method and printer of printer
JP4924748B2 (en) Printer and received data processing method
JPH09323463A (en) Communication terminal and control method thereof
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
JP2007018127A (en) Printing system, control method therefor and program
JPH10119391A (en) Composite printer with plural printer mechanisms and is controlling method
JP2001282394A (en) Communication terminal equipment, its control method and its recording medium
JPS6327287A (en) Printer
JPH071802A (en) Printer for label
JP2004030685A (en) Printer, printing system, and status change detection method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050204

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050204

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050512

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050628

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050713

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20050812

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080222

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

Free format text: PAYMENT UNTIL: 20110228

Year of fee payment: 3

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120229

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130228

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130228

Year of fee payment: 5

EXPY Cancellation because of completion of term