JP2008120094A - Printer - Google Patents

Printer Download PDF

Info

Publication number
JP2008120094A
JP2008120094A JP2008001145A JP2008001145A JP2008120094A JP 2008120094 A JP2008120094 A JP 2008120094A JP 2008001145 A JP2008001145 A JP 2008001145A JP 2008001145 A JP2008001145 A JP 2008001145A JP 2008120094 A JP2008120094 A JP 2008120094A
Authority
JP
Japan
Prior art keywords
paper
data indicating
real
printing apparatus
error
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
JP2008001145A
Other languages
Japanese (ja)
Other versions
JP4623097B2 (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 JP2008001145A priority Critical patent/JP4623097B2/en
Publication of JP2008120094A publication Critical patent/JP2008120094A/en
Application granted granted Critical
Publication of JP4623097B2 publication Critical patent/JP4623097B2/en
Expired - Lifetime legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a user-friendly printer which reduces a load on a host computer. <P>SOLUTION: Reception data is analyzed at the reception of the data from a host device, so that it can be determined whether or not the reception data is real-time control commands. When they are the real-time control commands, predetermined processing is performed. When they are not the real-time control commands, the reception data is stored in a reception buffer, and read out from the reception buffer in order of reception and processed. The real-time control commands include a plurality of kinds commands which demand the transmission of a printer status, that of an off-line factor status, that of an error factor status, that of a paper status, a return from an error, etc., respectively. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、ホストコンピュータに接続され、ホストコンピュータからの指令により印字を行う印字装置に関し、特にPOS/ECRなど金銭を扱う情報処理装置に最適な印字装置に関するものである。   The present invention relates to a printing apparatus that is connected to a host computer and performs printing in response to a command from the host computer, and more particularly to a printing apparatus that is optimal for an information processing apparatus that handles money, such as POS / ECR.

従来の印字装置においては、印字用紙がなくなった場合、印字装置のカバーが開けられた場合、エラーが発生した場合など、印字動作の続行が不適当な場合には、印字ヘッドを含む印字メカニズムを停止し、且つホストコンピュータとのインターフェースをオフライン(論理的な切断状態)とすることにより、印字装置および通信データの保全及び使用者の安全を確保しようとしている。この時、印字装置内部の制御が停止するため、すでに印字装置が受信済のデータはオフラインの発生した時点以降は処理されなくなる。また、オフライン発生以降はデータの受信を行わないのでこのデータは処理されなくなり、印字装置からの応答は全く無くなることになる。   In the conventional printing device, if the printing operation is inappropriate, such as when the printing paper runs out, the printing device cover is opened, or an error occurs, the printing mechanism including the print head is not used. By stopping and making the interface with the host computer offline (logically disconnected), the printing apparatus and communication data are maintained and the user is secured. At this time, since the internal control of the printing apparatus is stopped, data already received by the printing apparatus is not processed after the time when the offline occurs. In addition, since no data is received after the occurrence of offline, this data is not processed, and there is no response from the printing apparatus.

また、印字装置は紙送りスイッチが押され紙送り中の場合や、受信データを格納する受信バッファが満杯(以下、バッファフルという)になったりした場合にもオフラインとなり、前述の印字動作の続行が不適当な場合のオフライン状態とを区別するのは困難である。   The printing device also goes offline when the paper feed switch is pressed and paper is being fed, or when the reception buffer for storing received data is full (hereinafter referred to as buffer full), and the above printing operation continues. It is difficult to distinguish from the off-line state when it is inappropriate.

印字装置がオフラインになると、ホストコンピュータは印字データを送信できなくなり、POSやECRなどのシステム全体が停止することになる。この場合、ホストコンピュータは表示装置に「印字装置が異常です。点検してください。」などのメッセージを表示し、使用者が印字装置を調べてオフラインの原因を除去しなければならない。しかし、一般のPOSやECRの使用者には、この原因を調べることは困難であり、長時間を要する。   When the printing apparatus goes offline, the host computer cannot transmit print data, and the entire system such as POS and ECR is stopped. In this case, the host computer displays a message such as “Printer is abnormal. Check it” and the user must check the printer to eliminate the cause of the offline. However, it is difficult for general POS and ECR users 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 control command stored first), and the command processing is executed. Then, the processed control command is deleted from the reception buffer. Therefore, when control commands are continuously sent from the host computer, the control commands are stored one after another in the reception buffer, and the host computer processes the control commands in order from the oldest one of the stored control commands. There is a time difference (hereinafter referred to as a time lag) from when the printer is transmitted until the printer actually performs processing.

また、印字装置をリセットするか、もしくは電源を入れ直した場合には、それまで印字装置内に蓄えられた印字装置の状態を設定するためのデータが消去されてしまい、金銭を扱うPOS/ECR用の印字装置としては、非常に大きな問題であった。   In addition, when the printer is reset or the power is turned on again, the data for setting the status of the printer stored in the printer is erased, and the POS / ECR for handling money However, this was a very big problem.

このような不具合による影響を少なくするために、従来の印字装置を用いた情報処理システムにおいては、ホストコンピュータは複数行の印字データを送らずに、1行毎にステータス応答要求コマンドを添付して、印字装置の状態を確認していた。その為、ホストコンピュータにとって大きな負担となり、情報処理システムのスループットの低下を招いていた。   In order to reduce the effects of such problems, in an information processing system using a conventional printing apparatus, the host computer attaches a status response request command for each line without sending multiple lines of print data. The status of the printing device was confirmed. For this reason, a heavy burden is placed on the host computer, resulting in a decrease in throughput of the information processing system.

上記の事情から、従来POS/ECR分野においては、データ入力装置、処理装置及び印字装置が一体となった、スタンドアロン型の専用情報処理システムが広く用いられ、ホストコンピュータと印字装置とが汎用のインタフェースで接続されているシステムは、その高い柔軟性は評価されながらも、データの信頼性(いわゆるセキュリティ)への不安から普及が進んでいない。そして、当該データの信頼性を向上させ、同時に操作性を更に高めるために、印字装置の動作が停止している場合でも、その原因をホストコンピュータが知り、またその停止状態を速やかに解除できるような情報処理システムの実現が待望されている。   Due to the above circumstances, 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 between the host computer and the printing device. Although the system connected with the network is evaluated for its high flexibility, it has not been popularized due to concerns about data reliability (so-called security). In order to improve the reliability of the data and at the same time further improve the operability, even when the operation of the printing apparatus is stopped, the host computer can know the cause and can quickly cancel the stopped state. Realization of a simple information processing system is awaited.

本発明の目的は、上記の従来技術の有する課題を解決し、信頼性の高い情報処理装置を実現可能な印字装置を提供するとともに、ホストコンピュータの負担を軽減し、使用者に使いやすい印字装置を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems of the prior art and provide a printing apparatus capable of realizing a highly reliable information processing apparatus, reduce the burden on the host computer, and be easy for the 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 to determine whether the received real-time control command is received. Real-time command analysis means for executing predetermined processing in accordance with a control command; and reception buffer storage means for storing the reception data in a reception buffer when the reception data is determined not to be a real-time control command by the real-time command analysis means; A process execution means for reading out and analyzing the received data from the reception buffer in a first-come-first-served basis, determining whether the received data is command data or print data, and executing a process corresponding to each of the command data and the print data. Features.

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

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

好適な実施形態では、また、前記受信バッファ格納手段は、前記受信データがリアルタイム制御コマンドではないと判断された場合だけでなく、リアルタイム制御コマンドであると判断された場合にも、前記受信データを前記受信バッファに格納する。   In a preferred embodiment, the reception buffer storage means stores the reception data 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. Store in the reception buffer.

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

一般に流通業界で使用される記録紙としては単票用紙と連続紙が有り、単票用紙にはスリップ紙と呼ばれる不定形の伝票用紙や、バリデーション紙と呼ばれる比較的定形で何枚かの複写紙を有するものが有る。連続紙としては店舗の記録用として保存する為のジャーナル紙と、領収証としてのレシート紙がある。   In general, the recording paper used in the distribution industry includes single-cut paper and continuous paper. The single-cut paper is non-standard slip paper called slip paper, and a relatively fixed number of copy paper called validation paper. Some have There are two types of continuous paper: journal paper for storage for store records and receipt paper for 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はインクリボンである。   Reference numeral 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. Reference numeral 3 denotes an ink ribbon.

レシート紙17、ジャーナル紙18はロール紙の状態で、図の様に印字機構部の後ろから挿入し上部へ排出される。また、スリップ紙19は、印字機構部の前から挿入し(矢印19A)、上部へ排出される(矢印19B)。   Receipt paper 17 and journal paper 18 are in the form of roll paper, inserted from the back of the printing mechanism as shown in the figure, and discharged to the top. The slip paper 19 is inserted from the front of the printing mechanism (arrow 19A) and 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 that detects the end of the paper. The near-end detector 20 includes a near-end detection lever 20a that rotates in the direction of the arrow 20A according to 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. When the roll paper reaches the center of the roll paper, the near-end detection lever 20a rotates in the direction of the arrow 20B, and the push switch 20b turns off to detect the 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 apparatus is covered with 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 counter-type 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 the case of printing on continuous paper (receipt paper in the figure), and FIG. 2B shows the case of printing on cut sheet paper (slip paper).

印字ヘッド1は、ワイヤー支持部1aの中に図示しないワイヤーピンが有り、プラテン2との間にインクリボン3を介在してレシート紙17に印字を行う。   The print head 1 has a wire pin (not shown) in the wire support portion 1 a and prints 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 coupled to a drive source (not shown) such as a motor. A receipt paper detector 12 is disposed in the middle of the paper guide plates 4a and 4b. The receipt paper detector 12 is configured by a counter-type photo sensor or a lever switch. In the figure, an example of a counter-type photosensor is shown. The receipt paper 17 fed by the paper feed rollers 6 a and 6 b passes between the ink ribbon 3 and the platen 2 and is discharged to the upper part of the printing apparatus via the paper pressing rollers 7 a and 7 b and the cutter unit 14. The cutter unit 14 includes a cutter blade 14a and a cutter cover 14b. The cutter blade 14a is moved in the direction of arrow 14A by a driving source such as a motor (not shown) to cut the receipt paper 17.

図では、レシート紙の場合を示したが、ジャーナル紙の場合もカッタユニットを除いては同じ構成である。   Although the case of receipt paper is shown in the figure, the same configuration is also applied to journal paper 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 apparatus. During roll paper printing, the slip feed roller 9a is pulled in the direction of the arrow 10A by the plunger 10 as shown in FIG. 2A, and is separated from the opposing slip feed roller 9b. Therefore, the slip paper 19 can be inserted. When the slip paper 19 is inserted, the slip paper 19 abuts against the slip feed rollers 8a and 8b through the slip paper guides 11a and 11b. At this time, the slip paper detector 13 detects whether or not the paper is inserted. When the paper is inserted, the plunger 10 is released and the lever 10a rotates in the direction of the arrow 10B, the slip feed roller 9b is pressed against the slip feed roller 9a, and the slip paper 19 is held. The slip feed rollers 8b and 9b are coupled 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 to the paper. To do. When printing is completed, the slip sheet 19 is discharged in the direction of the arrow 19B, the plunger 10 is driven, the slip feed roller 9a is separated from the slip feed roller 9b, and the next slip sheet can be inserted.

レシート紙17は図のように装着したままスリップ紙19に印字可能であり、また、スリップ紙19に複写紙を添付すれば、スリップ紙19とレシート紙17を同時に、同じ内容を印字することも可能である。   The receipt paper 17 can be printed on the slip paper 19 as shown in the figure, and if the copy paper is attached to the slip paper 19, the slip paper 19 and the receipt paper 17 can be printed at the same time. Is possible.

スリップ紙検出器13は、レシート紙検出器12と同様に対向型のフォトセンサを用いている。   As with the receipt paper detector 12, the slip paper detector 13 uses a counter-type photosensor.

15は本体下ケースであり、16はヘッド機構を支持するケースである。   Reference numeral 15 denotes a main body lower case, and reference numeral 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.

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

ヘッド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 moves left and right by a carriage transmission belt 32 and carriage drive gears 31a and 31b. The carriage drive gear 31a is coupled 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 31 a rotates the rotation detection plate 34 via the transmission gear 33. A carriage detector 35 composed of a counter-type photosensor is disposed so as to sandwich the rotation detection plate 34, and the rotation detection plate 34 rotates as the head carriage 1b moves, and this is detected by the carriage detector 35. The rotation detection plate 34 is formed in a propeller shape, and when this rotates, the output of the carriage detector 35 is periodically turned on and off. That is, when the head carriage 1b is moved left and right by a head carriage drive motor (not shown), the carriage detector 35 detects the movement of the head carriage 1b.

印字ヘッド1とプラテン2の間にあるレシート紙、ジャーナル紙もしくはスリップ紙が、よれてワイヤーホルダ1aとプラテン2との間につまってしまうと紙ジャムとなり、ヘッドキャリッジ1bは、キャリッジ駆動モータの回転に追従せず、キャリッジ駆動モータは脱調する。これを、キャリッジ検出器35により検出する。これをキャリッジエラーと称す。   If the receipt paper, journal paper, or slip paper between the print head 1 and the platen 2 is jammed 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 will step out. 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 in order to specify the reference position of the print position. The home position detector 36 is a facing 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により検出することができる。これをホームポジションエラーと称す。   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 form a mechanism part of the above-described printing apparatus, and has a print mechanism part drive circuit 43 that drives these print mechanism parts. The printing mechanism section is equipped with detectors such as a carriage detector 44, a home position detector 45, an auto cutter detector 46, each sheet detector 47, a cover detector 54, and the like. It is connected to 50). The auto 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 no detection signal is generated, resulting in an error. 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 constituted by LEDs, a panel switch 49 for manually feeding paper, an interface 51 for communicating with a host computer, a control program, a print character pattern, and the like. A ROM 52 for storing 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 the print data is input from the interface 51, it is stored in the reception buffer in the RAM 53. The CPU 50 decodes this data, reads the character pattern corresponding to the data code from the ROM 52, and passes through 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, home position error, 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 the functional means.

61はホストコンピュータであり、コマンドデータや印字データなどを印字装置に送信する。62は、インターフェイス51を介してホストコンピュータ61からのデータコードを受信するデータ受信手段であり、インターフェース51により起動される割込みである。64は受信した時点で受信データを解析し、実行するリアルタイムコマンド解析手段であり、データ受信手段62とともに割込みの中で処理される。リアルタイムコマンド解析手段64は、受信データがリアルタイム制御コマンドであるかどうかを判断し、リアルタイム制御コマンドであればそのコマンド指令に従って所定の処理を実行する。リアルタイムコマンド解析手段64を介した受信データは、全て一旦受信バッファ65に蓄えられる。受信バッファ65内の受信データは、コマンド解析手段66により1データづつ取り出され、このデータコードを解析し、印字データと印字装置に対して様々な指令を設定するコマンドデータとを判別する。コマンドデータであれば、それを制御手段68によって、そのコマンドコードに従って所定の設定もしくは、所定の動作を実行する。印字データであればそのデータコードに従って文字パターンを印字バッファ67内に格納する。制御手段68により印字実行を行う場合、この印字バッファ67から印字パターンを読み出して印字機構各機能部70を制御して印字を行う。   A host computer 61 transmits command data, print data, and the like to the printing apparatus. Reference numeral 62 denotes data receiving means for receiving a data code from the host computer 61 via the interface 51, and is an interrupt activated by the interface 51. Reference numeral 64 denotes real-time command analysis means for analyzing and executing the received data at the time of reception, and is processed in an interrupt together with the data reception means 62. The real-time command analysis means 64 determines whether or not the received data is a real-time control command, and if it is a real-time control command, executes a predetermined process according to the command 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 reception buffer 65 is taken out one by one by the command analysis means 66, and this data code is analyzed to discriminate between print data and command data for setting various commands for the printing apparatus. If it is command data, the control means 68 performs predetermined setting or predetermined operation according to the command code. If it is print data, the character pattern is stored in the print buffer 67 according to the data code. When printing is performed by the control means 68, the printing pattern is read from the printing buffer 67, and printing is performed by controlling each functional unit 70 of the printing mechanism.

本実施例では、インターフェースは双方向のシリアルインターフェースであるRS−232Cを用いており、RS−232Cではオフラインの状態でもホストコンピュータとの通信は可能である。一般にRS−232Cの双方向シリアルインターフェースでは、一方の装置がオフラインとなっても他方の装置がそれを検出し通信データの送信を停止するまでの間、数バイトのデータが回線上に乗っている可能性がある為、オフラインとした側の装置はオフライン後もデータを受信しなければならない。よって、受信バッファがいっぱいになる前にオフラインとすることが必要である。従って、印字装置にエラーが発生しオフラインとなっても受信バッファに空きが有る間、通信データは受信され、受信バッファに蓄えられる。そして、受信バッファがいっぱいになった場合、その後の受信データは捨てられてしまうことになる。しかし、本実施例では、受信割込みで起動されるリアルタイムコマンド解析手段64により受信バッファに記憶する前にコマンドの解析を行う為、たとえ捨てられても、コマンドとしての処理は行われる。   In this embodiment, RS-232C, which is a bidirectional serial interface, is used as the interface, and RS-232C can communicate with the host computer even in an offline state. In general, in the RS-232C bidirectional serial interface, even if one device goes offline, the other device detects it and stops transmitting communication data. Since there is a 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 is full. Therefore, even if an error occurs in the printing apparatus and the printer becomes offline, communication data is received and stored in the reception buffer while the reception buffer is empty. When the reception buffer becomes full, the subsequent received data is discarded. However, in this embodiment, since the command is analyzed before being stored in the reception buffer by the real-time command analysis means 64 activated by the reception interrupt, even if it is discarded, processing as a command is performed.

リアルタイムコマンドには、印字装置の状態を要求するコマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64により印字装置の状態をデータ送信手段63を介してホストコンピュータ61に回答する。エラー発生状態であっても、データ受信手段62とデータ送信手段63とリアルタイムコマンド解析手段64は動作しているため、印字装置の状態を送信することが可能である。   The real-time command includes a command for requesting the status of the printing apparatus. When this command is received, the real-time command analysis means 64 returns the status of the printing apparatus to the host computer 61 via the data transmission means 63. Even in the error occurrence state, the data receiving means 62, the data transmitting means 63, and the real-time command analyzing means 64 are operating, so that the status of the printing apparatus can be transmitted.

コマンド解析手段66で単票用紙選択コマンドであると判断された場合、制御手段68に通知する。制御手段68は、単票用紙が選択されたことを表示手段72に通知し、単票用紙挿入待ちの表示を行うと同時に、単票用紙状態記憶手段79により、RAM53内部に単票用紙が選択されたことと、単票用紙挿入待ちに入ったことを単票用紙情報として記憶する。単票用紙が選択されると単票用紙検出器73により単票用紙の挿入を検出し、制御手段68に通知する。制御手段68は単票用紙挿入待ち情報を監視し、単票用紙挿入待ち情報の内容が消去されるか、単票用紙の挿入が検出されるまで印字装置の駆動を停止する。コマンド解析手段66も制御手段68を起動できずに停止するが、リアルタイムコマンド解析手段64は、単票用紙挿入待ちに関係なく動作することができる。   When the command analysis unit 66 determines that the command is a cut sheet selection command, the control unit 68 is notified. The control means 68 notifies the display means 72 that a cut sheet has been selected, displays a waiting for insertion of a cut sheet, and at the same time selects a cut sheet within the RAM 53 by the cut sheet status storage means 79. It is memorized as cut sheet information that it has been entered and that it has entered the wait for insertion of cut sheet. When a cut sheet is selected, the cut sheet detector 73 detects the insertion of the cut sheet and notifies the control means 68 of it. The control means 68 monitors the cut sheet insertion waiting information, and stops driving the printing apparatus until the content of the cut sheet insertion waiting information is erased or the insertion of the cut sheet is detected. The command analysis means 66 also stops without being able to activate the control means 68, but the real-time command analysis means 64 can operate regardless of waiting for insertion of a cut sheet.

リアルタイムコマンドには、単票用紙の挿入待ちを解除するコマンドがあり、このコマンドが受信されると、リアルタイムコマンド解析手段64によってRAM53内に記憶された単票用紙挿入待ち情報および単票用紙選択情報を消去する。この単票用紙挿入待ち状態を監視していた制御手段68は、単票用紙挿入待ち情報が消去されたことを確認すると、単票用紙挿入待ちを解除し印字バッファ67を消去し、初期値の用紙を選択する。単票用紙の挿入待ちを解除する方法としてタイムアウトがあり、制御手段68はタイマ78を制御する。   The real-time command includes a command for canceling the waiting for insertion of a cut sheet, and when this command is received, the cut sheet insertion waiting information and the cut sheet selection information stored in the RAM 53 by the real-time command analysis unit 64 are received. Erase. When the control means 68 monitoring the cut sheet insertion wait state confirms that the cut sheet insertion wait information has been erased, it cancels the cut sheet insertion wait, erases the print buffer 67, and sets the initial value. Select the paper. There is a time-out as a method of canceling the waiting for inserting 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によりインターフェースを制御して印字装置がデータを受け取れない事をホストコンピュータに通知する(いわゆるオフライン)。   When an error such as a paper jam occurs in printing, paper feeding, paper cutting, etc., the error detection means 71 detects the error, notifies the control means 68, and stores it in the status storage means 77. The control means 68 notifies the display means 72 that an error has occurred and displays the error, and at the same time, the error state storage means 69 stores the error occurrence in the RAM 53 as error information. The control means 68 monitors the error information and stops driving the printing apparatus until the contents are erased. The command analysis means 66 also stops without starting the control means 68, but the real-time command analysis means 64 activated by the reception interrupt of the interface 51 can operate regardless of the occurrence of an error. However, since the command analysis means 65 is stopped, the received data received by the interface 51 is only stored in the reception buffer 65. Therefore, when the error occurs, the control means 68 controls the interface and prints. 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 real-time command analysis means 64 erases the error information stored in the RAM. When the control means 68 that has been monitoring this error state confirms that the error information has been erased, it restarts the printing apparatus and resumes printing.

エラーからの回復コマンドのもう1つに、受信済のデータを消去した後印字を再開するコマンドがあり、このコマンドが受信されるとリアルタイムコマンド解析手段により受信バッファ65、印字バッファ67が消去された後、RAM内に記憶されたエラー情報を消去する。   Another command for recovering from an error is a command to resume printing after erasing received data. When this command is received, the reception buffer 65 and the print buffer 67 are erased by the real-time command analysis means. Thereafter, the error information stored in the RAM is erased.

用紙検出器73による紙無し、カバー検出器74によるカバーオープンの検出、スイッチ検出器75による紙送りスイッチによる紙送り中の時も印字装置がオフラインとなって、その状態が状態記憶手段77に記憶され、リアルタイムコマンド解析手段64によってその情報をホストコンピュータ61に回答する。   Even when the paper detector 73 detects no paper, the cover detector 74 detects a cover open, or the paper detector switch feeds the switch detector 75, the printer goes offline, and the state is stored in the state storage means 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 an 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, respectively, 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 by the value of n.

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

Figure 2008120094
印字装置ステータス情報によりドロワの状態、印字装置のオンライン/オフラインの状態がホストコンピュータ側で判断できる。また、印字装置がオフラインの場合には、nを1としてさらに詳細なオフライン情報を取得することができる。
Figure 2008120094
The status of the drawer and the online / offline status of the printing apparatus can be determined on the host computer side by the printing apparatus status information. Further, when the printing apparatus is off-line, more detailed off-line information can be acquired by setting n to 1.

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

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

ホストコンピュータは識別した結果によって、使用者に注意を促すことができる。また、エラーの場合には、nを2として引き続き詳細なエラー情報を取得することができる。   The host computer can alert the user based on the identified result. In the case of an error, detailed error information can be continuously acquired 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 2008120094
表4の中でメカニカルエラーとは、主に紙ジャムによるエラーの場合であって、キャリッジエラー、ホームポジションエラーを含む。これらは、印字ヘッド回りの紙ジャムであり、オートカッタエラーと区別している。これにより、印字ヘッド回りでの紙ジャムか、オートカッタでの紙ジャムかをホストコンピュータ側で識別することができる。識別した結果により、ホストコンピュータの表示手段によって使用者にエラー発生の箇所を的確に指示し、紙ジャムの除去を促す事ができる。
Figure 2008120094
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 auto cutter errors. Thereby, it is possible to identify on the host computer side whether the paper jam occurs around the print head or the paper jam occurs in the auto cutter. Depending on the identified result, the display means of the host computer can 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 causes the error. However, there are errors that make it difficult to resume printing, such as abnormal external power supplies and damage to the print head temperature detector, so these need to be identified. An error that occurs other than a paper jam is assigned to bit 5 as an unrecoverable error.

nが3の場合、表5に従うレシートやジャーナルなどの連続用紙検出器情報1バイトをホストコンピュータに送信する。   If n is 3, 1 byte of continuous paper detector information such as a receipt or journal according to Table 5 is transmitted to the host computer.

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

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

Figure 2008120094
表7において、バリデーション用紙の選択により、連続用紙やスリップ用紙が選択されているかバリデーション用紙が選択されているかが判断できる。また、バリデーション用紙選択中において、用紙の挿入待ちであるか、すでに用紙があり印字可能な状態であるかが判断できる。
Figure 2008120094
In Table 7, it is possible to determine whether continuous paper or slip paper or validation paper is selected by selecting the validation paper. In addition, during validation paper selection, it can be determined whether paper is waiting to be inserted or whether there is already paper and printing is possible.

次に、図7、図8でリアルタイムコマンドのデータ受信手段とリアルタイムコマンド解析手段について説明する。   Next, the data receiving means and the real time command analyzing means for the real time command will be described 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 process is started simultaneously with the power-on (step 120). In initialization, all information in the RAM 53 is generally initialized, including initialization of the printing mechanism (step 121), cut sheet status flag, error information, buffer clear flag, GS flag, and GSR flag. (Step 122). The buffer clear flag, GS flag, and GSR flag are flags used in the reception interrupt process, and are used by the real-time command analysis means. Finally, in step 124, the interface reception interrupt is permitted and the initialization process is terminated (step 124).

図8は、インターフェースの受信割込み処理の行程を示し、データ受信手段とリアルタイムコマンド解析手段を示している。インターフェースを介して、ホストコンピュータからの受信データは、1バイトづつ受信されるため、各バイト受信毎に図8の処理が起動される。リアルタイムコマンドは、図6に示した様に「GS」「R」「n」の3バイトで構成されるため、「GS」を受信した時にセットされるGSフラグ、GSがセットされている場合に「R」を受信した時にセットされるGSRフラグ、GSRフラグがセットされている時に受信した「n」によって制御される。また、「n」の値によってバッファをクリアするかどうかを記憶するバッファクリアフラグがある。   FIG. 8 shows the process of interface reception interrupt processing, and shows data reception means and real-time command analysis means. Since the received data from the host computer is received one byte at a time via the interface, the processing of FIG. 8 is activated for each byte received. Since the real-time command is composed of 3 bytes “GS”, “R”, and “n” as shown in FIG. 6, when the GS flag and GS that are set when “GS” is received are set. The GSR flag is set when “R” is received, and is controlled by “n” received when the GSR flag is set. There is also a buffer clear flag that stores whether to clear the buffer according to the value of “n”.

ステップ125でデータが受信され受信割込みが起動される。ステップ126で受信データをインターフェースから読みだし、ステップ127でGSRフラグがセットされているかどうかを判断する。GSRフラグがセットされている場合、すなわち既に「GS」「R」まで受信済の場合、受信データ(ここではCとする)を「n」として処理を行う。ステップ136でGSRフラグをクリアし、受信データ(C)の値により、以下の動作を行う(ステップ137)。   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 received data (here, C) is set to “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 printer information stored in the RAM 53 is transmitted by the transmission means 63 to the host computer via the interface (step 138).

C=1の時、送信手段63によりRAM53内に記憶したオフライン情報をインターフェースを介してホストコンピュータに送信する(ステップ139)。   When C = 1, the offline information stored in the RAM 53 is transmitted to the host computer via the interface by the transmission means 63 (step 139).

C=2の時、送信手段63によりRAM53内に記憶したエラー情報をインターフェースを介してホストコンピュータに送信する(ステップ140)。   When C = 2, the error information stored in the RAM 53 by the transmission means 63 is transmitted to the host computer via the interface (step 140).

C=3の時、送信手段63によりRAM53内に記憶した連続用紙情報をインターフェースを介してホストコンピュータに送信する(ステップ141)。   When C = 3, the continuous sheet information stored in the RAM 53 is transmitted to the host computer via the interface by the transmission means 63 (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 validation means information stored in the RAM 53 is transmitted to the host computer via the interface by the transmission means 63 (step 143).

C=6の場合、単票用紙待ち状態かどうかを判断し(ステップ144)、待ち状態であれば、単票用紙待ちフラグをクリアする(ステップ145)。図9で示すように、単票用紙待ちフラグをクリアすることにより、単票用紙待ち状態から回復することができる。   If C = 6, it is determined whether or not a single sheet is in a waiting state (step 144), and if it is in a waiting state, a single sheet waiting flag is cleared (step 145). As shown in FIG. 9, it is possible to recover from the cut sheet waiting state by clearing the cut sheet waiting flag.

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 print buffer are cleared upon recovery from the error as shown in FIG. If C = 7, the error information is simply cleared (step 147).

受信データは、リアルタイムコマンドであっても、一旦受信バッファに記憶される(ステップ132)。   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)。   If the GSR flag is cleared in step 127, it is determined in step 128 whether the GS flag is set. That is, if the GS flag has already been received up to “GS”, the GS flag is set, and it is determined whether the received data (C) is “R” at step 129 (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 it is stored in the reception buffer as it is (step 132), and the reception interrupt 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. FIG. 9 shows a process for canceling a cut sheet from when a cut sheet is selected until it is set. The process starts when the command interpretation unit 66 determines that it is a cut sheet selection command (step 151). A cut sheet selection flag is set, and a cut sheet insertion waiting flag is set (step 152). After confirming that the mechanical operation has stopped (step 153), the cut sheet insertion waiting timer 78 is activated, and the display device 72 is caused to blink by the display means 72 (step 155). In step 156, it is determined whether the cut sheet insertion wait flag is cleared. When the cut sheet insertion waiting flag is cleared, that is, when the waiting for insertion of the cut sheet is canceled by the real time commands “GS”, “R”, and “6”, the cut sheet insertion waiting timer is stopped (step 157). Then, the display device 48 is turned off by the display display means 72 (step 158). The cut sheet selection flag and the cut sheet insertion waiting flag are cleared (step 159), the initial sheet is set (step 160), and the cut sheet selection process is terminated (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 waiting time has passed (step 162). If the cut sheet waiting time has passed, the process proceeds to step 158. jump.

ステップ162で単票用紙挿入待ち時間が過ぎていない場合、ステップ163で単票用紙が挿入されたか判断する。単票用紙が挿入されていないと判断された場合、再び単票用紙挿入待ちフラグがクリアされているかステップ156に判断にいき、単票用紙挿入待ちフラグがクリアされるか、単票用紙挿入待ち時間が切れるか、単票用紙が挿入されるまで以上の動作が繰り返される。   If the cut sheet insertion waiting time has not passed in step 162, it is determined in step 163 whether a cut sheet has been inserted. If it is determined that the cut sheet paper has not been inserted, the process again proceeds to step 156 to determine whether the cut sheet insertion wait flag has been cleared. The above operation is repeated until the time expires or a cut sheet is inserted.

ステップ163で単票用紙が挿入さたと判断された場合、単票用紙挿入待ちタイマ78を停止し(ステップ164)、表示装置48を点灯し(ステップ165)、動作開始待ち時間待つ(ステップ166)。ステップ167で単票用紙が挿入されていないと判断された場合、ステップ154の処理へに戻り、以上の動作を繰り返す。   If it is determined in step 163 that a cut sheet has been inserted, the cut sheet insertion waiting timer 78 is stopped (step 164), the display device 48 is turned on (step 165), and an operation start waiting time is waited (step 166). . If it is determined in step 167 that the cut sheet is not inserted, the process returns to step 154 and the above operation is repeated.

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

以上述べた様に、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、印字装置が単票用紙挿入待ちにより停止した場合でも、コマンドを解析し、単票用紙挿入待ちを解除できる。   As described above, by including data reception means and real-time command analysis means in the reception interrupt processing, even if the printing device stops due to the insertion of the cut sheet, the command is analyzed and the waiting for the insertion of the cut sheet is made. Can be canceled.

図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で印字終了となる。   In step 101, a printing command is started, and in step 102, the printing apparatus for one line printing is initialized. In steps 103 to 105, one line is printed. In step 103, one dot row is printed and the print carriage is moved by one dot row. In 104, it is checked whether there is a detection pulse from the carriage detector 35 by moving the carriage. Normally, detection pulses are generated periodically because the carriage moves normally. In step 105, it is checked whether or not printing for one line has been completed. 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, the detection pulse is not detected in step 104, and the routine proceeds to step 107. That is, the processing after step 107 is processing when a carriage error has occurred. First, in step 107, the printer is set to be offline so as to notify the host computer that it cannot receive communication data. 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, information is stored as a recoverable error. At the same time, at 109, the printing mechanism is stopped. Thereafter, until the error information is erased in step 111, it is displayed in step 110 that an error has occurred on the error display device. When the real-time command is received, the error information is erased, and in step 112, if the received real-time command instructs to clear the buffer, the buffer is cleared in step 113. In this case, the buffer indicates both a reception buffer and a print buffer. Thereafter, recovery processing of the printing apparatus is performed in step 114, and in step 115, the host computer is informed that the printing apparatus can be received, so-called online.

以上述べた様に、受信割込み処理の中にデータ受信手段とリアルタイムコマンド解析手段を含めることにより、印字装置がエラー発生により停止した場合でも、コマンドを解析し、エラーからの回復が可能となる。   As described above, by including the data reception means and the real-time command analysis means in the reception interrupt process, even when the printing apparatus stops due to an error, the command can be analyzed and recovery from the error can be performed.

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

図11は、本発明の情報処理装置の概念図であって、印字装置300はホストコンピュータ61とRS−232Cの通信ケーブル305により接続している。ホストコンピュータ61内には、通信手段304としてRS−232Cインターフェース制御回路が組み込まれている。また、CRTなどの表示装置302とキーボードなどの入力装置303がホストコンピュータ61に接続している。   FIG. 11 is a conceptual diagram of an information processing apparatus according to the present invention, in which a printing apparatus 300 is connected to a host computer 61 via an RS-232C communication cable 305. 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 consideration of canceling the waiting state for inserting a cut sheet in the host computer. 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, real-time commands “GS”, “R”, and “4” are transmitted to check the slip sheet status (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 or not a slip sheet has been selected (step 254).

スリップ用紙が選択された場合、ステップ253における情報により、スリップの挿入待ちかどうかを判断する(ステップ255)。挿入待ちでない場合、スリップ用紙のありを確認後(ステップ256)、印字データを送信して(ステップ257)、スリップ用紙の印字を終了する(ステップ258)。   When the slip sheet 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, the presence of slip paper is confirmed (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 to determine whether or not this key is pressed (step 259). This key is assigned with a slip insertion waiting cancel function, and is operated by an operator.

キーが押されている場合、スリップ挿入待ちキャンセルコマンド「GS」「R」「6」を送信することによりスリップ挿入待ちを解除することができる(ステップ260)。   When the key is pressed, the slip insertion waiting can be canceled by transmitting the slip insertion waiting cancel commands “GS”, “R”, and “6” (step 260).

また、ステップ254とステップ256において、それぞれスリップが非選択の場合と用紙がない場合においても、このキーを監視することにより、スリップ印字を終了することができる(ステップ259)。この場合、スリップキャンセルコマンド「GS」「R」「6」を送信しても、印字装置側では単票用紙の挿入待ち状態でないため無視される(ステップ260)。キーが押されていない場合、ステップ252に戻り、スリップの選択(ステップ254)もしくは、用紙あり(ステップ256)を待つことになる。   Further, in step 254 and step 256, slip printing can be ended by monitoring this key even when slip is not selected and when there is no sheet (step 259). In this case, even if the slip cancel commands “GS”, “R”, and “6” are transmitted, they are ignored because they are not waiting for insertion of the cut sheet on the printing apparatus side (step 260). If the key is not pressed, the process returns to step 252 to wait for slip selection (step 254) or presence of paper (step 256).

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

印字開始後(ステップ200)、1行分の印字データを送信する毎に(ステップ201)、印字装置がオフラインになったかどうかを監視する(ステップ202)。一般に、RS−232Cインターフェースでは、受信側(ここでは印字装置)がオフラインになると、CTS(ClearTo Send)信号もしくは、DSR(DataSet Ready)信号、もしくはXOFFコードにより知ることができる。印字装置がオンラインであれば、印字データを送信し続け、印字データが終了すれば(ステップ203)、印字終了となる(ステップ204)。   After printing is started (step 200), every time print data for one line is transmitted (step 201), it is monitored whether or not the printing apparatus is offline (step 202). Generally, in the RS-232C interface, when the receiving side (printing apparatus 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 apparatus is online, the printing data is continuously transmitted. If the printing data is finished (step 203), the printing is finished (step 204).

ステップ202において、印字装置がオフラインになると、印字装置がエラーを発生したか、その他の原因(たとえば、印字用紙が無くなったなど)により印字ができなくなったと考えられる。そこで、エラーが発生したかどうかを確認するため、ステップ205でリアルタイムコマンド「GS」「R」「2」を送信する。これに対する応答をステップ206で受信し、エラーが発生しているかを判断する(ステップ207)。エラーが発生していない場合、エラー以外の原因でオフラインになったと考えれるので、その他の原因を調べ(ステップ208)、それに対する処理を行う(ステップ209)。その他の原因の取得は、「GS」「R」「1」により、カバーが開いている、印字用紙が無くなったなどの情報を取得することによる。ホストコンピュータは、「カバーを閉じてください」とか「紙をセットしてください」などと表示装置302に表示し、使用者に注意を促すことができる。   In step 202, when the printing apparatus goes off-line, it is considered that the printing apparatus has generated an error or that printing has become impossible due to other causes (for example, the printing paper has run out). Therefore, in order to confirm whether or not an error has occurred, 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 user has gone offline due to a cause other than the error. Therefore, other causes are examined (step 208), and a process for the cause is performed (step 209). Other causes are acquired by acquiring information such as that the cover is open or that the printing paper has run out by “GS”, “R”, and “1”. The host computer can display a message such as “Please close the cover” or “Please set paper” on the display device 302 to alert the user.

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

ステップ207でエラーが発生した場合、そのエラーが回復可能かどうかを判断する(ステップ211)。回復可能エラーかどうかは、表4に示したビット5で判断できる。回復可能エラーの場合、エラーが発生したことを使用者に知らせ、エラーの原因と予想される紙ジャムなどを取り除くことを指示する。この時、紙ジャムの発生箇所を表4のビット2とビット3により、キャリッジかオートカッタかを使用者に知らせる事ができる。使用者が紙ジャムを取り除いた後、ホストコンピュータの入力装置303(たとえばキーボード)により、確認の入力を行なわせることにより、エラー原因の除去を確認する(ステップ213)。その後、リアルタイムコマンド「GS」「R」「6」もしくは「7」により、印字装置をエラーから回復させる。使用者が、エラーの原因を完全に取り除いていない場合や、複数のエラーが同時に発生している場合を考慮して、再度ステップ205から、エラーの発生を確認することが望ましい。   If an error occurs in step 207, it is determined whether or not 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 informed that an error has occurred and instructed to remove the paper jam that is expected to cause the error. At this time, the user can be notified of the occurrence of paper jam by using bits 2 and 3 in Table 4 as to whether the carriage is an auto cutter. After the user removes the paper jam, the error input is confirmed by causing the input device 303 (for example, a keyboard) of the host computer to input confirmation (step 213). Thereafter, the printer is recovered from the error by a real time command “GS”, “R”, “6” or “7”. 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, it is desirable to confirm the occurrence of the error from step 205 again.

ステップ211において回復不可能なエラーの場合は、印字装置に異常が有り、使用者では修復できない場合である。この場合は、印字装置が異常であることを使用者に知らせて(ステップ215)、印字処理を中止する(ステップ216)。   If the error cannot be recovered in step 211, the printing apparatus has an abnormality and cannot be repaired by the user. In this case, the user is notified that the printing apparatus is abnormal (step 215), and the printing process is stopped (step 216).

金銭を扱うPOS/ECRなどの情報処理装置としては、データの欠落、重複は絶対あってはなならい。印字装置にエラーが発生した場合、受信済のデータを抹消すること無くエラーから回復し、印字を再開することは重要である。ただし、従来の印字装置を用いた情報処理装置にも対応するため、受信済のデータを抹消してから回復するモードを可能にし、ホストコンピュータからの制御コマンドにより選択可能とした。すなわち、従来の印字装置を用いた情報処理装置では、印字装置がエラーから回復した後は必ず受信済データは抹消していた為、エラー発生前と同一データを印字する場合は、2度目の印字データであることを明示するために特殊な文字を行の先頭などに印字させていた。これに対応するため、受信済データを抹消してから回復するモードが必要であった。   For an information processing apparatus such as POS / ECR that handles money, there should be absolutely no missing or duplicated data. When an error occurs in the printing apparatus, 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 for recovering after erasing received data is made possible and selectable by a control command from the host computer. That is, in the information processing apparatus using the conventional printing apparatus, the received data is always deleted after the printing apparatus recovers from the error. Therefore, when printing the same data as before the error occurrence, the second printing is performed. A special character was printed at the beginning of a line to clearly indicate that it was data. In order to cope with this, a mode in which the received data is deleted and then recovered is necessary.

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

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

符号の説明Explanation of symbols

61 ホストコンピュータ
62 データ受信手段
63 データ送信手段
64 リアルタイムコマンド解析手段
66 制御コマンド解析手段
68 制御手段
69 エラー状態記憶手段
79 単票用紙状態記憶手段
71 エラー検出手段
72 表示手段
73 用紙検出手段
74 カバー検出手段
75 スイッチ検出手段
76 周辺機器状態検出手段
77 状態記憶手段
300 印字装置
302 表示装置
303 入力装置
61 Host computer 62 Data reception means 63 Data transmission means 64 Real-time command analysis means 66 Control command analysis means 68 Control means 69 Error status storage means 79 Single sheet paper 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 Status storage means 300 Printing device 302 Display device 303 Input device

Claims (8)

ホスト装置からのデータ受信時に受信データを解析して、複数種類の処理内容をそれぞれ選択する複数種類のリアルタイム制御コマンドであるかどうかを判断し、リアルタイム制御コマンドであると判断された場合、受信したリアルタイム制御コマンドに従って所定の処理を実行するリアルタイムコマンド解析手段と、
前記リアルタイムコマンド解析手段を介した受信データを先着順に解析して、印字装置に対して様々な指令を設定するコマンドデータであるか印字データであるかを判断するコマンド解析手段とを有する印刷装置であって、
前記リアルタイム制御コマンドは、リアルタイム制御コマンドであることを示すデータと、前記印刷装置が実行する内容を示す1バイトのデータとを含むことを特徴とする印刷装置。
When receiving data from the host device, the received data is analyzed to determine whether it is a plurality of types of real-time control commands for selecting a plurality of types of processing contents, respectively. Real-time command analysis means for executing predetermined processing in accordance with a real-time control command;
A printing apparatus having command analysis means for analyzing received data through the real-time command analysis means on a first-come-first-served basis and determining whether the data is command data or print data for setting various commands to the printing apparatus; There,
The printing apparatus, wherein the real-time control command includes data indicating a real-time control command and 1-byte data indicating contents executed by the printing apparatus.
前記印刷装置が実行する内容を示すデータは、(1)〜(9)のいずれか一つを示すデータである請求項1記載の印刷装置。
(1)前記印刷装置のステータスを送信する
(2)前記印刷装置のオフライン要因を送信する
(3)前記印刷装置のエラー要因を送信する
(4)連続用紙検出器の状態を送信する
(5)スリップ用紙検出器及びスリップ用紙の状態を送信する
(6)バリデーション用紙検出器及びバリデーション用紙の状態を検出する
(7)単票用紙待ちをキャンセルする
(8)エラーから復帰して印字を再開する
(9)エラーから復帰してバッファをクリアする
The printing apparatus according to claim 1, wherein the data indicating the content executed by the printing apparatus is data indicating any one of (1) to (9).
(1) Transmit the status of the printing device (2) Transmit the offline factor of the printing device (3) Transmit the error factor of the printing device (4) Transmit the status of the continuous paper detector (5) Send slip paper detector and slip paper status (6) Detect validation paper detector and validation paper status (7) Cancel single sheet wait (8) Recover from error and resume printing ( 9) Return from error and clear buffer
前記印刷装置が実行する内容を示すデータが、前記印刷装置のステータスを送信することを示すデータであるとき、
前記リアルタイムコマンド解析手段は、ドロワーキックコネクタの状態を示すデータ、またはオンラインであるか否かを示すデータのいずれか一つ以上を前記ホスト装置へ送信する請求項1記載の印刷装置。
When the data indicating the contents executed by the printing device is data indicating that the status of the printing device is transmitted,
The printing apparatus according to claim 1, wherein the real-time command analysis unit transmits at least one of data indicating a state of the drawer kick connector and data indicating whether or not the drawer kick connector is online to the host device.
前記印刷装置が実行する内容を示すデータが、前記印刷装置のオフライン要因を送信することを示すデータであるとき、
前記リアルタイムコマンド解析手段は、カバーの状態、紙送りスイッチによる紙送りの状態、紙なしによる印字停止、またはエラー状態のいずれか一つ以上を示すデータを前記ホスト装置へ送信する請求項1記載の印刷装置。
When the data indicating the contents executed by the printing device is data indicating that the offline factor of the printing device is transmitted,
2. The real-time command analysis means transmits data indicating at least one of a cover state, a paper feed state by a paper feed switch, a print stop due to no paper, or an error state to the host device. Printing device.
前記印刷装置が実行する内容を示すデータが、前記印刷装置のエラー要因を送信することを示すデータであるとき、
前記リアルタイムコマンド解析手段は、メカニカルエラー、オートカッターエラー、復帰不可能エラー、または自動復帰エラーのいずれか一つ以上を示すデータを前記ホスト装置へ送信する請求項1記載の印刷装置。
When the data indicating the content executed by the printing device is data indicating that the error factor of the printing device is transmitted,
The printing apparatus according to claim 1, wherein the real-time command analysis unit transmits data indicating any one or more of a mechanical error, an auto cutter error, an unrecoverable error, and an automatic return error to the host device.
前記印刷装置が実行する内容を示すデータが、連続用紙検出器の状態を送信することを示すデータであるとき、
前記リアルタイムコマンド解析手段は、ジャーナルニアエンド検出器の出力、レシートニアエンド検出器の出力、ジャーナルエンド検出器の出力、またはレシートエンド検出器の出力のいずれか一つ以上を示すデータを前記ホスト装置へ送信する請求項1記載の印刷装置。
When the data indicating the contents executed by the printing apparatus is data indicating that the state of the continuous paper detector is transmitted,
The real-time command analyzing means transmits data indicating at least one of an output of a journal near end detector, an output of a receipt near end detector, an output of a journal end detector, or an output of a receipt end detector to the host device. The printing apparatus according to claim 1.
前記印刷装置が実行する内容を示すデータが、スリップ用紙検出器及びスリップ用紙の状態を送信することを示すデータであるとき、
前記リアルタイムコマンド解析手段は、スリップの選択状態、スリップの挿入待ち状態、またはスリップ用紙検出器の出力のいずれか一つ以上を示すデータを前記ホスト装置へ送信する請求項1記載の印刷装置。
When the data indicating the contents executed by the printing apparatus is data indicating that the slip sheet detector and slip sheet status are transmitted,
The printing apparatus according to claim 1, wherein the real-time command analysis unit transmits data indicating at least one of a slip selection state, a slip insertion waiting state, and an output of a slip sheet detector to the host device.
前記印刷装置が実行する内容を示すデータが、バリデーション用紙検出器及びバリデーション用紙の状態を検出することを示すデータであるとき、
前記リアルタイムコマンド解析手段は、バリデーションの選択状態、バリデーションの挿入待ち状態、またはバリデーション用紙検出器の出力のいずれか一つ以上を示すデータを前記ホスト装置へ送信する請求項1記載の印刷装置。
When the data indicating the contents executed by the printing apparatus is data indicating that the state of the validation paper detector and the validation paper is detected,
2. The printing apparatus according to claim 1, wherein the real-time command analysis unit transmits data indicating at least one of a validation selection state, a validation insertion wait state, and an output of a validation paper detector to the host device.
JP2008001145A 1993-11-08 2008-01-08 Printing device Expired - Lifetime JP4623097B2 (en)

Priority Applications (1)

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

Applications Claiming Priority (4)

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

Related Parent Applications (1)

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

Publications (2)

Publication Number Publication Date
JP2008120094A true JP2008120094A (en) 2008-05-29
JP4623097B2 JP4623097B2 (en) 2011-02-02

Family

ID=39505362

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP4623097B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013210886A (en) * 2012-03-30 2013-10-10 Seiko Epson Corp Print system and control method for the same
US8769215B2 (en) 2011-04-15 2014-07-01 Seiko Epson Corporation Recording device, recording device control method, and storage medium
US10019204B2 (en) 2012-03-30 2018-07-10 Seiko Epson Corporation Print control device, printing system, and print control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04189162A (en) * 1990-10-02 1992-07-07 Canon Inc Image forming apparatus
JPH05131724A (en) * 1991-11-08 1993-05-28 Canon Inc Recording device and its method
JPH05162409A (en) * 1991-12-11 1993-06-29 Fujitsu Ltd Printing apparatus equipped with recovery function
JPH05193234A (en) * 1992-01-22 1993-08-03 Ricoh Co Ltd Image forming apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04189162A (en) * 1990-10-02 1992-07-07 Canon Inc Image forming apparatus
JPH05131724A (en) * 1991-11-08 1993-05-28 Canon Inc Recording device and its method
JPH05162409A (en) * 1991-12-11 1993-06-29 Fujitsu Ltd Printing apparatus equipped with recovery function
JPH05193234A (en) * 1992-01-22 1993-08-03 Ricoh Co Ltd Image forming apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8769215B2 (en) 2011-04-15 2014-07-01 Seiko Epson Corporation Recording device, recording device control method, and storage medium
JP2013210886A (en) * 2012-03-30 2013-10-10 Seiko Epson Corp Print system and control method for the same
US10019204B2 (en) 2012-03-30 2018-07-10 Seiko Epson Corporation Print control device, printing system, and print control method
US10459668B2 (en) 2012-03-30 2019-10-29 Seiko Epson Corporation Print control device, printing system, and print control method for generating image print commands from print data in markup language

Also Published As

Publication number Publication date
JP4623097B2 (en) 2011-02-02

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
KR100245432B1 (en) Printer control with monitor function
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
JPH09323463A (en) Communication terminal and control method thereof
JP4623097B2 (en) Printing device
JP4088226B2 (en) Printing device
US6104496A (en) Printer and control method therefor
JP3544366B2 (en) PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS
JP3544365B2 (en) PRINTING APPARATUS, CONTROL METHOD THEREOF, AND INFORMATION PROCESSOR USING THE PRINTING APPARATUS
JP4865140B2 (en) Printer, received data processing method and program
JP3678293B2 (en) Printing apparatus, printing system, and status change detection method
JP2007018127A (en) Printing system, control method therefor and program
JP3659285B2 (en) Printer and printer control method
JPH10119391A (en) Composite printer with plural printer mechanisms and is controlling method
JPS6327287A (en) Printer

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100423

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100618

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101018

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131112

Year of fee payment: 3

EXPY Cancellation because of completion of term