JP2004106553A - Communication terminal - Google Patents

Communication terminal Download PDF

Info

Publication number
JP2004106553A
JP2004106553A JP2003328363A JP2003328363A JP2004106553A JP 2004106553 A JP2004106553 A JP 2004106553A JP 2003328363 A JP2003328363 A JP 2003328363A JP 2003328363 A JP2003328363 A JP 2003328363A JP 2004106553 A JP2004106553 A JP 2004106553A
Authority
JP
Japan
Prior art keywords
host
busy
data
printer
interface
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
JP2003328363A
Other languages
Japanese (ja)
Other versions
JP3938123B2 (en
Inventor
Masayo Miyasaka
宮坂 昌代
Mitsuaki Teradaira
寺平 光明
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 JP2003328363A priority Critical patent/JP3938123B2/en
Publication of JP2004106553A publication Critical patent/JP2004106553A/en
Application granted granted Critical
Publication of JP3938123B2 publication Critical patent/JP3938123B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication terminal which can perform processing after errors and hold by application software operable on the operating system equipped with a versatile driver and the like. <P>SOLUTION: A busy parameter selecting part 82 is provided with mode 1 in which a host side is indicated that data processing has become impossible by the output of a busy signal at an error parameter 62a, a hold parameter 62b and buffer full 59a, and mode 2 in which the busy signal is not output at the error parameter 62a and the hold parameter 62b and the command to cope with these parameters can be received from the host side. The mode 2 is set to an application software 5 corresponding to a real-time command, so that the application software 5 can be involved in the solution of the problem of a communication terminal 10 at the time of errors and off-line. <P>COPYRIGHT: (C)2004,JPO

Description

 本発明は、POSシステムに用いられるターミナルプリンタやプロッタなどの通信端末に関するものである。 << The present invention relates to a communication terminal such as a terminal printer or a plotter used in a POS system.

 近年、ハードウェアおよびソフトウェアの処理速度および汎用性が増大している。このため、特定の目的を持った情報処理システムをその処理目的に合わせて開発された専用のハードウェアやソフトウェアを組み合わせて構築する代わりに、汎用性のあるハードウェアやソフトウェアを組み合わせることにが多くなっている。汎用性のあるハードウェアやソフトウェアを用いることにより、情報処理システムを安価に構築でき、さらに、その情報処理システムを多目的に用いることができる。また、市販されている多種多用のハードウェアやソフトウェアを組み合わせることにより、ユーザの目的や環境に合致した情報処理システムをフレキシブルに構築することができる。 In recent years, the processing speed and versatility of hardware and software have been increasing. For this reason, information processing systems with specific purposes are often combined with versatile hardware and software, instead of combining dedicated hardware and software developed for the processing purpose. Has become. By using general-purpose hardware and software, an information processing system can be constructed at low cost, and the information processing system can be used for multiple purposes. Further, by combining various types of hardware and software that are commercially available, it is possible to flexibly construct an information processing system that matches the purpose and environment of the user.

 POSシステムもその1例であり、従来のプリンタやキーボードなどが一体化されたPOS専用機から、パソコンを中心にプリンタ、ディスプレイあるいはドロワなどを接続したPOSシステムが開発され、ユーザに利用されている。 A POS system is also one example, and a POS system in which a printer, a display, a drawer, or the like is connected mainly to a personal computer has been developed from a conventional POS dedicated machine in which a printer, a keyboard, and the like are integrated, and used by users. .

 このようなパソコンを中心とした情報処理システムにおいては、カスタマーディスプレイ、ドロワ、プリンタ、プロッタ、モデム、バーコードリーダなどの多種多用なデータ処理端末が用いられる。これらのデータ処理端末の多くは、シリアル通信ポート(RS−232C)を介してパソコンに接続され、パソコンをホスト側としてデータ端末との間で処理用のデータあるいはコマンドデータが転送される。従って、転送されるデータやコマンドの互換性を保ち、これらを保護するためにインタフェースの仕様や制御方式は規格化されており、例えば、ホスト側からデータ端末に送られるデータやコマンドが転送途中で欠落するのを防止するためにデータ端末レディ(DTR)信号が用意されている。このDTR信号によって端末側がデータあるいはコマンドを受信可能な状態であるか否かをホスト側に指示できるようになっており、ホスト側は、DTR信号を受けるとデータセットレディ(DSR)信号を返し、双方が動作可能な状態であることを確認した後にデータやコマンドを送信することによりデータやコマンドが欠落するのを防止している。 情報 処理 In such an information processing system centered on a personal computer, various types of data processing terminals such as a customer display, a drawer, a printer, a plotter, a modem, and a barcode reader are used. Many of these data processing terminals are connected to a personal computer via a serial communication port (RS-232C), and processing data or command data is transferred between the personal computer and the data terminal using the personal computer as a host. Therefore, in order to maintain the compatibility of data and commands to be transferred and to protect them, the specifications and control method of the interface are standardized.For example, data and commands sent from the host to the data terminal are transferred during the transfer. A data terminal ready (DTR) signal is provided to prevent loss. The DTR signal allows the terminal to instruct the host whether the terminal is ready to receive data or a command, and upon receiving the DTR signal, the host returns a data set ready (DSR) signal, Data and commands are transmitted after confirming that both are operable, thereby preventing data and commands from being lost.

 POSシステムに多用されている通信端末であるターミナルプリンタにおいては、受信バッファが満杯状態、カバーオープンなどの原因によって受信バッファからのデータの取り出しが一時的に停止してしまうホールド状態、または、紙ジャムなどのエラー状態の要因によってDTR信号がビジィーになる。この信号を受けて、ホスト側のプリンタドライバはデータまたはコマンドの送信を一次停止してデータを保護すると共にディスプレイなどにエラーの発生を表示する。そして、プリンタ側におけるこれらの要因がオペレータなどによって解決され、プリンタの機能が正常な状態にリセットされると、オペレータがホスト側およびプリンタ側を操作してデータ通信が再開されて印刷が行われる。 2. Description of the Related Art In a terminal printer, which is a communication terminal frequently used in a POS system, a reception buffer is full, a hold state in which data extraction from the reception buffer is temporarily stopped due to a cover open, or a paper jam. The DTR signal becomes busy due to an error state factor such as the above. In response to this signal, the host-side printer driver temporarily stops transmission of data or commands to protect the data, and displays an error occurrence on a display or the like. When these factors on the printer side are resolved by an operator or the like, and the functions of the printer are reset to a normal state, the operator operates the host side and the printer side to resume data communication and perform printing.

 近年のPOSシステム用のターミナルプリンタとして、ロール紙を用いたレシート印字を行う機能に加えて、単票用紙を用いたスリップ印字を行う機能や磁気インク文字を読む機能などの複数の機能を備えたプリンタが登場している。このような複合的な機能を備えたプリンタにおいては、スリップ印字を行うために単票用紙待ちのホールド状態となってDTR信号がビジィーとなり、その後、レシート印字のデータがホスト側で用意できているにもかかわらず印刷処理が進行しないといった事態が発生する。また、プリンタ側で紙ジャムなどのエラーが起こるとDTR信号がビジィーとなりデータ転送を中止する。その後、オペレータがエラーを解決してプリンタをリセットとプリンタに送信されまま印刷されてないデータが欠落したり、データの2重に印刷されるなどに事態が発生する。 As a terminal printer for recent POS systems, in addition to the function of printing receipts using roll paper, it has multiple functions such as the function of slip printing using cut-sheet paper and the function of reading magnetic ink characters. Printers have appeared. In the printer having such a complex function, the slip-printing is performed, the cut-sheet paper wait state is held, the DTR signal becomes busy, and then the receipt printing data can be prepared on the host side. Nevertheless, a situation occurs in which the printing process does not proceed. If an error such as a paper jam occurs on the printer side, the DTR signal becomes busy and the data transfer is stopped. After that, when the operator resolves the error and resets the printer, data that has not been printed while being transmitted to the printer is lost, or data is printed twice.

 これらの事態は、例えばソフトウェアによってプリンタが用紙待ち状態であることを検出したり、プリンタに発生したエラーの種類を検出し、それに対応してデータを再送したり、あるいは、バッファ内のデータを消去するなどの処理を行うことにより解決することができる。しかしながら、汎用的なシルアルポートドライバやプリンタドライバにおいては、DTR信号がビジィーになるとコマンドを転送することができないので、ホスト側のソフトウェアでは対処できない。ホスト側のソフトウェアで対処するためには、DTR信号を無視してシリアル端末にアクセスできる特殊なドライバを作成する必要があり、汎用的なオペレーティングシステムを用いた情報処理システムが構築できなくなってしまう。さらに、ホスト側とシリアル端末との間でDTR信号などの規格化あるいは標準化されたインタフェース信号と異なる信号によって通信を制御するシステムでは、汎用性のあるハードウェアやソフトウェアを使用できないので、システムの拡張性が失われてしまう。また、DTR信号を単に無視してコマンドやデータを送るのでは、転送中にデータが欠落する危険があり、システムの信頼性が低下してしまうのでPOSシステムなどのデータの信頼性が必要とされるシステムは構築できない。 For example, the software detects that the printer is waiting for paper, detects the type of error that occurred in the printer, and resends the data accordingly, or erases the data in the buffer. The problem can be solved by performing a process such as performing. However, a general-purpose serial port driver or printer driver cannot transfer a command when the DTR signal becomes busy, and cannot be dealt with by software on the host side. In order to cope with the host software, it is necessary to create a special driver that can access the serial terminal ignoring the DTR signal, which makes it impossible to construct an information processing system using a general-purpose operating system. Furthermore, in a system in which communication between the host and the serial terminal is controlled by a signal different from a standardized or standardized interface signal such as a DTR signal, general-purpose hardware and software cannot be used, so the system is expanded. Sex is lost. Further, if commands and data are sent simply by ignoring the DTR signal, there is a risk that data will be lost during transfer and the reliability of the system will be reduced. Therefore, data reliability of a POS system or the like is required. System cannot be built.

 そこで、本発明においては、ホスト側と通信端末側との間のシリアル転送における規格化あるいは標準化された仕様を変更することなく、ホスト側のソフトウェアによってホールド状態やエラー状態に対処することが可能な通信端末を提供することを目的としている。また、通信端末の汎用性を犠牲にすることなく、ホスト側からホールド状態やエラー状態への関与を可能にした通信端末を提供することを目的としている。さらに、ホールド状態やエラー状態にホスト側が対処できると共に、ホスト側から端末へ転送されるデータの欠落を防止し、信頼性の高い情報処理システムを構築できる通信端末を提供することを目的としている。 Therefore, in the present invention, it is possible to deal with a hold state or an error state by software on the host side without changing the standardized or standardized specification in serial transfer between the host side and the communication terminal side. It aims to provide a communication terminal. It is another object of the present invention to provide a communication terminal that allows the host to participate in a hold state or an error state without sacrificing the versatility of the communication terminal. It is another object of the present invention to provide a communication terminal capable of coping with a hold state or an error state by a host, preventing a loss of data transferred from the host to a terminal, and constructing a highly reliable information processing system.

 このため、本発明の通信端末においては、
(1)ホストから送られてきたデータを受信するインタフェースと、
 該インタフェースを介して受信したデータを一時的に格納する受信バッファと、
 前記受信バッファに格納されたデータを取り出して処理する処理部と、
 前記ホストに対し、前記ホストから前記インタフェースを介してのデータ受信が可能かビジィーかを通知する通信許可手段と、
を有する通信端末において、
 エラー状態またはホールド状態のとき、前記通信許可手段により前記ビジィーを前記ホストに通知する第1のモードと、前記エラー状態または前記ホールド状態のときでも前記通信許可手段によるビジィーを前記ホストに通知しない第2のモードと、を選択するスイッチ手段を設けたことを特徴とする。
(2)ホストから送られてきたデータを受信するインタフェースと、
 該インタフェースを介して受信したデータを一時的に格納する受信バッファと、
 前記受信バッファに格納されたデータを取り出して処理する処理部と、
 前記ホストに対し、前記ホストから前記インタフェースを介してのデータ受信が可能かビジィーかを通知する通信許可手段と、
を有する通信端末において、
 エラー状態またはホールド状態のとき前記ホストに対し前記ビジィーを前記ホストに通知する第1のモードと、前記エラー状態またはホールド状態のときでも前記ビジィーを前記ホストに通知しない第2のモードと、を選択的にセットされるビジィー要因選択部を有し、
 前記ビジィー要因選択部が第2のモードがセットされたときは、前記ホストから前記状態に対処するリアルタイムコマンドを受信可能であることを特徴とする。
(3)ホストから送られてきたデータを受信するインタフェースと、
 該インタフェースを介して受信したデータを一時的に格納する受信バッファと、
 前記受信バッファに格納されたデータを取り出して処理する処理部と、
 前記ホストに対し、前記ホストから前記インタフェースを介してのデータ受信が可能かビジィーかを通知する通信許可手段と、
を有する通信端末において、
 前記ビジィー通知の出力要因を選択するビジィー要因選択部を備えたことを特徴とする。
(4)前記ビジィー要因選択部は、エラー状態またはホールド状態のときでも、前記通信許可手段が前記ビジィーを前記ホストに出力しないモードを選択可能なことを特徴とする。
(5)前記受信バッファに格納された前記データから順番にコマンドを解析する第1の解析手段と、
 前記インタフェースから前記受信バッファに渡される前記データからコマンドを解析可能な第2の解析手段と、
を備えることを特徴とする。
Therefore, in the communication terminal of the present invention,
(1) an interface for receiving data sent from the host;
A reception buffer for temporarily storing data received via the interface,
A processing unit that retrieves and processes the data stored in the reception buffer;
Communication permission means for notifying the host whether data reception from the host via the interface is possible or busy,
In a communication terminal having
A first mode in which the communication permission means notifies the host of the busy state in the error state or the hold state; and a first mode in which the communication permission means does not notify the host of the busy state in the error state or the hold state. A switch means for selecting between the second mode and the second mode is provided.
(2) an interface for receiving data sent from the host;
A reception buffer for temporarily storing data received via the interface,
A processing unit that retrieves and processes the data stored in the reception buffer;
Communication permission means for notifying the host whether data reception from the host via the interface is possible or busy,
In a communication terminal having
A first mode for notifying the host of the busy to the host when in the error state or the hold state, and a second mode for not notifying the host to the busy even in the error state or the hold state are selected. It has a busy factor selection section that is set
When the second mode is set by the busy factor selection unit, a real-time command corresponding to the state can be received from the host.
(3) an interface for receiving data sent from the host;
A reception buffer for temporarily storing data received via the interface,
A processing unit that retrieves and processes the data stored in the reception buffer;
Communication permission means for notifying the host whether data reception from the host via the interface is possible or busy,
In a communication terminal having
A busy factor selection unit for selecting an output factor of the busy notification is provided.
(4) The busy factor selection unit can select a mode in which the communication permission unit does not output the busy to the host even in an error state or a hold state.
(5) first analysis means for sequentially analyzing commands from the data stored in the reception buffer;
Second analysis means capable of analyzing a command from the data passed from the interface to the reception buffer;
It is characterized by having.

 以上説明したように、本発明の通信端末は、ビジィー通知の出力要因を選択するビジィー要因選択部を備えたため、受信バッファフル以外のビジィー要因に応じて、リアルタイムコマンドを実行するホスト・実行しないホストのそれぞれに対応することができるという効果を奏する。 As described above, since the communication terminal of the present invention includes the busy factor selection unit that selects the output factor of the busy notification, the host that executes the real-time command and the host that does not execute the real-time command according to the busy factor other than the reception buffer full Is achieved.

 以下に図面を参照して本発明の実施の形態を説明する。図1に、本発明に係る通信端末の例として、POSシステムを構築するのに好適なターミナルプリンタを示してある。本例のターミナルプリンタ10は、スリップ紙19、ジャーナル紙18およびレシート紙17を記録紙として印刷できるプリンタである。スリップ紙19は不定型の伝票用紙などの単票用紙であり、プリンタ10の手前のスリップ紙挿入口21から矢印19Aの方向に挿入すると、不図示の紙検出器がスリップ用紙を検出し、ケース15内の紙経路を通って印刷ヘッド1に導かれる。そして、印刷ヘッド1が左右の方向1Aに動いて印刷が行われ、さらに矢印19Bの方向に動いて排出される。本例のプリンタ10は、ワイヤドットタイプの印刷ヘッド1が採用されており、インクリボン3を介してスリップ紙19や、後述するジャーナル紙18およびレシート紙17に印刷を行う。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a terminal printer suitable for constructing a POS system as an example of a communication terminal according to the present invention. The terminal printer 10 of this embodiment is a printer that can print slip paper 19, journal paper 18, and receipt paper 17 as recording paper. The slip paper 19 is a cut sheet such as an irregular form slip paper. When the slip paper 19 is inserted in a direction of an arrow 19A from a slip paper insertion opening 21 in front of the printer 10, a paper detector (not shown) detects the slip paper, and 15 to the print head 1 through a paper path. Then, the print head 1 moves in the left-right direction 1A to perform printing, and further moves in the direction of arrow 19B to be discharged. The printer 10 of this embodiment employs a wire dot type print head 1 and performs printing on slip paper 19, journal paper 18 and receipt paper 17 to be described later via the ink ribbon 3.

 ジャーナル紙18およびレシート紙17は共に連続用紙であり、本例のプリンタ10ではロール紙の状態で供給されており、印刷ヘッド1に対してスリップ用紙19と反対の方向からケース15内を通って印刷ヘッド1に導かれる。レシート用紙17は領収書としての情報が印刷された後、カッターユニット14に導かれてカットされ客先に渡さるようになっている。ジャーナル紙18は、記録用紙としての情報が印刷され、不図示の巻き取り装置に巻き取られ保管される。それぞれのロール紙17および18には、ロール紙の終わりを検出するニアエンド検出器20が装着されている。ニアエンド検出器20は、ロール紙の外径により矢印20Aの方向に揺動する検出レバー20aと、この検出レバー20aによりオンオフするスイッチ20bを備えている。ロール紙が終わりに近づいて外径が小さくなると検出レバー20aが内側に揺動し、その結果、スイッチ20bがオフとなってロール紙の終わりが近いことを検出できる。 The journal paper 18 and the receipt paper 17 are both continuous paper, and are supplied in the form of roll paper in the printer 10 of this embodiment, and pass through the case 15 from the direction opposite to the slip paper 19 with respect to the print head 1. It is guided to the print head 1. After the information as a receipt is printed, the receipt paper 17 is guided by the cutter unit 14 to be cut and passed to the customer. The journal paper 18 is printed with information as recording paper, and is wound up and stored by a winding device (not shown). Each of the roll papers 17 and 18 is provided with a near-end detector 20 for detecting the end of the roll paper. The near-end detector 20 includes a detection lever 20a that swings in the direction of arrow 20A depending on the outer diameter of the roll paper, and a switch 20b that is turned on and off by the detection lever 20a. When the outer diameter of the roll paper approaches the end and the outer diameter decreases, the detection lever 20a swings inward, and as a result, the switch 20b is turned off and it can be detected that the end of the roll paper is near.

 プリンタ10のケース15には、図示されていないがカバーが装着されており、ロール紙17あるいは18、またはインクリボン3を交換するなどの場合を除きカバーをケース15に被せた状態で印刷が行われるようになっている。このため、カバーの開閉を検出するためのカバー検出器22がケース15に装着されており、カバーが開けられると自動的にホールド状態となって印刷機能を一時停止するなどの処理が取れるようになっている。 A cover (not shown) is attached to the case 15 of the printer 10, and printing is performed with the cover placed on the case 15 except when the roll paper 17 or 18 or the ink ribbon 3 is replaced. It has become to be. For this reason, the cover detector 22 for detecting the opening and closing of the cover is attached to the case 15, and when the cover is opened, the cover is automatically set to the hold state so that processing such as temporarily stopping the printing function can be performed. Has become.

 図2に、パソコン30をホスト側とし、本例のターミナルプリンタ10を通信端末として用いて構成したPOSシステムの一例を示してある。このPOSシステムにおいては、パソコン30のシリアル通信ポート(RS−232C)ドライバ31を介してカスタマディスプレイ40、ターミナルプリンタ10およびキャッシュドロワ45がシリアルに接続されており、RS−232Cを介してこれら3つのデータ端末にデータを送信して処理できるようになっている。このため、本例のパソコン30のオペレーティングシステム32は、シリアル通信ポートドライバ31に加え、POS用のオペレーティングシステム(OS)33と、キーボードやディスプレイなどのパソコン30を一般に構成する機器およびそれらを制御するアプリケーションソフトウェアを制御する基本OS34とを備えている。POS用のOS33は、プリンタ10、カスタマディスプレイ40およびキャッシュドロワ45の制御用のOS35と、プリンタ10をレシートあるいはジャーナル用紙といった連続用紙に印刷するレシート印刷用のドライバ36と、プリンタ10をスリップ用紙を用いて印刷するスリップ印刷用のドライバ37と、カスタマディスプレイ40を制御するためのドライバ38と、さらに、キャッシュドロワ45を制御するためのドライバ39を備えている。 FIG. 2 shows an example of a POS system in which the personal computer 30 is used as a host and the terminal printer 10 of this embodiment is used as a communication terminal. In this POS system, the customer display 40, the terminal printer 10, and the cash drawer 45 are serially connected via a serial communication port (RS-232C) driver 31 of the personal computer 30, and these three are connected via the RS-232C. Data can be sent to a data terminal for processing. For this reason, the operating system 32 of the personal computer 30 of the present embodiment controls the POS operating system (OS) 33 and devices such as a keyboard and a display which generally constitute the personal computer 30 and the devices in addition to the serial communication port driver 31. A basic OS 34 for controlling application software. The POS OS 33 includes an OS 35 for controlling the printer 10, the customer display 40, and the cash drawer 45, a receipt printing driver 36 for printing the printer 10 on continuous paper such as receipts or journal paper, and a slip paper for the printer 10. A driver 37 for slip printing used for printing, a driver 38 for controlling the customer display 40, and a driver 39 for controlling the cash drawer 45 are provided.

 パソコン30のPOS用アプリケーションソフトウェア5および表計算などのその他のアプリケーションソフト6は基本OS34およびPOS用OS33の制御の下で動作する。また、カスタマディスプレイ40、ターミナルプリンタ10およびキャッシュドロワ45との間のデータの送受信は、ドライバ36〜39、ポートドライバ31およびその他の汎用OS33を介して行われる。
RS−232Cポートドライバ31には、カスタマディスプレイ40のインタフェース41、ターミナルプリンタ10のインタフェース51およびキャッシュドロワ45のインタフェース46がこの順番に接続されている。ポートドライバ31から出力されたそれぞれの端末に対するデータあるいはコマンドは、これらのインタフェースによって選別される。カスタマディスプレイ40に対するデータおよびコマンドはディスプレイ処理部42によって処理され、ドロワ45に対するコマンドはドロワ処理部47によって処理される。
The POS application software 5 and other application software 6 such as a spreadsheet of the personal computer 30 operate under the control of the basic OS 34 and the POS OS 33. Transmission and reception of data between the customer display 40, the terminal printer 10, and the cash drawer 45 are performed via the drivers 36 to 39, the port driver 31, and the other general-purpose OS 33.
The interface 41 of the customer display 40, the interface 51 of the terminal printer 10, and the interface 46 of the cash drawer 45 are connected to the RS-232C port driver 31 in this order. The data or command for each terminal output from the port driver 31 is selected by these interfaces. Data and commands for the customer display 40 are processed by the display processing unit 42, and commands for the drawer 45 are processed by the drawer processing unit 47.

 ターミナルプリンタ10においては、インタフェース51に受信されたデータがプリンタ10に対するデータであると割り込みが発生してデータ受信部52がインタフェースからデータを取り出す。インタフェース51から取り出されたデータは同様の割り込み処理の中でリアルタイムコマンド解析部53を通ってリアルタイムコマンドが解析された後、受信バッファに格納される。リアルタイムコマンド解析部53は、データ受信部52から送られたデータの中に含まれたリアルタイムコマンドを認識すると、そのコマンドに基づき予め設定された処理を行う。リアルタイムコマンド解析部53を通って受信バッファ54に格納されたデータは、コマンド解析部55によって1データずつ取り出され、データコードが解析された後、コマンドデータであれば制御部57によってそのコマンドに従った処理が行われ、印刷データであればプリンタバッファ56に収納される。次に、制御部57は、コマンドに従って印刷処理部60の制御を行うと共に、プリンタバッファ56に記憶された印刷データを印刷処理部60に送って印刷を行う。 In the terminal printer 10, if the data received by the interface 51 is data for the printer 10, an interrupt occurs and the data receiving unit 52 takes out the data from the interface. The data extracted from the interface 51 is stored in the reception buffer after the real-time command is analyzed through the real-time command analyzer 53 in the same interrupt processing. When recognizing a real-time command included in the data transmitted from the data receiving unit 52, the real-time command analyzing unit 53 performs a preset process based on the command. The data stored in the reception buffer 54 through the real-time command analysis unit 53 is taken out one data at a time by the command analysis unit 55, and after the data code is analyzed, if the command data is command data, the control unit 57 follows the command. The print data is stored in the printer buffer 56. Next, the control unit 57 controls the print processing unit 60 according to the command, and sends the print data stored in the printer buffer 56 to the print processing unit 60 for printing.

 制御部57は、印刷処理部60の設定および制御、さらに印刷データの管理などの他に、プリンタ10の各部の状況を監視する機能も備えており、その結果がコモンステータス検出部59に出力される。例えば、受信バッファ54が満杯に近い状態であったり、単票用紙待ちの状態であるとその状況(ステータス)がコモンステータス検出部59に与えられる。また、印刷処理部60においても、プリンタ機構61の状態、例えば、カバーが開放されてデータ処理が一時的に中止されたホールド状態、紙ジャムなどのエラー状態、あるいはロール紙のニアエンド検出などのステータスがステータス検出部62に与えられるようになっている。 The control unit 57 has a function of monitoring the status of each unit of the printer 10 in addition to setting and controlling the print processing unit 60, managing print data, and the like. The result is output to the common status detection unit 59. You. For example, when the receiving buffer 54 is almost full or in a state of waiting for a cut sheet, the status is given to the common status detecting unit 59. Also in the print processing unit 60, the state of the printer mechanism 61, for example, a hold state in which the cover is opened and data processing is temporarily stopped, an error state such as a paper jam, or a status such as a near end detection of roll paper is performed. Is supplied to the status detection unit 62.

 コモンステータス検出部59およびプリンタ機構のステータス検出部62において検出されたステータスはステータス送信部70のステータスデータ生成部72に供給される。ステータス送信部70は、ステータスデータ生成部72に集められたプリンタ機構61のステータスおよび受信バッファの状況などのプリンタ10に係わるその他のステータスを自動ステータス送信部71によってホスト側に発信する機能を備えている。自動ステータス送信部71は、制御部57の制御の下に所定のステータスの状態が変化したときにそのステータスデータを送信するようになっており、状態が変化してステータスデータを送信するトリガとなるステータスは選択できるようになっている。自動ステータス送信部71から出力されたステータスデータはデータ送信部58を介してインタフェース51に供給され、ホスト側のRS−232Cポートドライバ31に送られる。そして、プリンタドライバなどを備えたPOS用OS33を介してアプリケーションソフト5に伝達され、アプリケーションソフト5がプリンタ10に発生した状況にマッチした処理を選択してプリンタ10に指示できるようになっている。 The statuses detected by the common status detection unit 59 and the status detection unit 62 of the printer mechanism are supplied to the status data generation unit 72 of the status transmission unit 70. The status transmission unit 70 has a function of transmitting the status of the printer mechanism 61 collected in the status data generation unit 72 and other statuses relating to the printer 10 such as the status of the reception buffer to the host by the automatic status transmission unit 71. I have. The automatic status transmission unit 71 transmits the status data when the status of the predetermined status changes under the control of the control unit 57, and the status changes and becomes a trigger for transmitting the status data. The status can be selected. The status data output from the automatic status transmission unit 71 is supplied to the interface 51 via the data transmission unit 58, and is transmitted to the RS-232C port driver 31 on the host side. Then, the process is transmitted to the application software 5 via the POS OS 33 having a printer driver and the like, so that the application software 5 can select a process matching the situation occurring in the printer 10 and instruct the printer 10.

 このようなステータス送信部70を設けておくことにより、プリンタ機構やターミナルプリンタ10の状況が変化するとステータスデータがアプリケーション5側に伝達されるのでアプリケーション側でターミナルプリンタ10の全体の状況を把握することができる。また、状況が変化したときにだけステータスデータを送信するようにできるので、ステータスデータの送受信に関わるホスト側およびターミナルプリンタ側における処理負荷が軽減され、シリアル転送におけるスループットを向上できる。 By providing such a status transmission unit 70, when the status of the printer mechanism or the terminal printer 10 changes, status data is transmitted to the application 5, so that the application can grasp the overall status of the terminal printer 10. Can be. Also, since status data can be transmitted only when the situation changes, the processing load on the host and terminal printers involved in transmitting and receiving status data can be reduced, and the throughput in serial transfer can be improved.

 コモンステータス検出部59における受信バッファが満杯であることを示すステータス(以降においてバッファフルステータス)59a、プリンタ機構61のステータス検出部62におけるエラー要因(エラーステータス)62aおよびホールド要因(ホールドステータス)62bは通信許可部80のビジィー要因選択部82にも供給される。そして、バッファフル59a、エラー62aあるいはホールド62bのいずれかの要因が検出されると、ビジィー設定部83がインタフェース51に対しビジィー信号を出力してホスト30の側にデータ送信の禁止を指示し、送信されたデータがデータ端末側、すなわちターミナルプリンタ10の側で処理されずに欠落するのを防止している。RS−232Cを介してデータをシリアル転送する場合は、DTR(データ端末レディー)信号がビジィー信号の機能を果たすために用意されており、ホスト側のRS−232Cポートドライバ31、あるいはプリンタドライバ36および37は、DTR信号が高レベルのときのみデータ送信を行い、ターミナルプリンタ10がビジィーになってDTR信号が低レベルになるとデータ送信を停止するようになっている。 The status (hereinafter, buffer full status) 59a indicating that the reception buffer is full in the common status detection unit 59, the error factor (error status) 62a and the hold factor (hold status) 62b in the status detection unit 62 of the printer mechanism 61 are: It is also supplied to the busy factor selection unit 82 of the communication permission unit 80. When any of the factors of the buffer full 59a, the error 62a and the hold 62b is detected, the busy setting unit 83 outputs a busy signal to the interface 51 to instruct the host 30 to prohibit data transmission. The transmitted data is prevented from being lost without being processed on the data terminal side, that is, the terminal printer 10 side. When data is serially transferred via the RS-232C, a DTR (data terminal ready) signal is prepared to fulfill the function of a busy signal, and the RS-232C port driver 31 or the printer driver 36 on the host side is provided. Reference numeral 37 indicates that data transmission is performed only when the DTR signal is at a high level, and data transmission is stopped when the terminal printer 10 is busy and the DTR signal is at a low level.

 ニアエンド検出などの所定のステータスが変化してステータスデータが送信されると、アプリケーション5からターミナルプリンタ10にステータスを確認するコマンドや、送られたステータス以外のプリンタの状況を把握するために全てのステータスデータの送信を指示するコマンドを出力するようにできる。従来のターミナルプリンタにおいては、このコマンドは受信バッファ54に印刷データと共に蓄えられ、データ処理が進んでコマンドを解析する順番になるとそのコマンドに従った処理が行われる。このため、受信バッファ54にデータが蓄積されているとコマンドの処理に非常に時間がかかる。さらに、受信バッファ54がフルのときにコマンドを送信しても受信バッファ54に受け入れられないのでコマンドは実施されない。 When status data is transmitted due to a change in a predetermined status such as near-end detection, a command for confirming the status from the application 5 to the terminal printer 10 and all statuses for grasping the status of the printer other than the transmitted status are provided. A command for instructing data transmission can be output. In a conventional terminal printer, this command is stored in the reception buffer 54 together with the print data, and when the data processing advances and the command is analyzed, the command is processed. Therefore, if data is stored in the reception buffer 54, it takes a very long time to process the command. Further, even if a command is transmitted when the reception buffer 54 is full, the command is not accepted by the reception buffer 54 and is not executed.

 そこで、本例のターミナルプリンタ10においては、リアルタイムコマンド解析部53を設けてあり、リアルタイムコマンドが送信された場合は、受信バッファ54に転送される前に解析してリアルタイムコマンドに従った処理が行えるようにしている。リアルタイムコマンドは、例えば、「GS」+「R」の2バイトの受信データによって判別され、この2バイトに続く1バイトの値nによりプリンタにおいて実行される処理内容が指示される。nにより指示される処理内容は、例えば次の表1に示されるようなものがある。 Therefore, the terminal printer 10 of the present embodiment is provided with a real-time command analysis unit 53, and when a real-time command is transmitted, it is analyzed before being transferred to the reception buffer 54, and processing according to the real-time command can be performed. Like that. The real-time command is determined based on, for example, 2-byte received data of “GS” + “R”, and the content of processing to be executed in the printer is indicated by a 1-byte value n following these 2 bytes. The processing contents indicated by n include, for example, those shown in Table 1 below.

Figure 2004106553
 このように、リアルタイムコマンド解析部53においては、コマンド解析部55と異なり、データ受信部52によって受信されたコマンドを直に解析して処理できる。従って、リアルタイムコマンドで指示された処理は、受信バッファ54において処理を待っているデータあるいはコマンドの順番とは係わりなくリアルタイムで行われる。また、受信バッファ54が満杯になって受信されたデータやコマンドが受信バッファ54に格納できない状況であっても、リアルタイムコマンドが解析されずに欠落することはないので、リアルタイムコマンドによって指示された処理は確実にターミナルプリンタ10の側において実行される。例えば、n=0のリアルタイムコマンドは、プリンタステータスの送信要求であり、リアルタイムコマンド解析部53は、ステータスデータ生成部72に集められた各ステータスデータをデータ送信部58を介してホスト30のアプリケーション5に送信する。もちろん、リアルタイムコマンド解析部53が自動ステータス送信部71を制御して同様の処理を行っても良い。このように、本例では、リアルタイムコマンドを用いてターミナルプリンタ10を制御することが可能であり、受信バッファ54を介してコマンド解析部55によって解析されたコマンドと同様の処理を時間遅れなく行うことができる。
さらに、リアルタイムコマンドはターミナルプリンタ10において受信バッファ54に起因する時間遅れなしに処理されるので、エラー要因を解除したり、あるいは、スリップ用紙がセットされていないためにホールド状態となっているときにスリップ印刷を解除してレシート印字を開始するなどといったフレキシブルな処理をアプリケーション5の側でコントロールすることが可能になる。
Figure 2004106553
As described above, unlike the command analysis unit 55, the real-time command analysis unit 53 can directly analyze and process the command received by the data reception unit 52. Therefore, the processing specified by the real-time command is performed in real time regardless of the order of the data or command waiting for processing in the reception buffer 54. Further, even in a situation where the received data or commands cannot be stored in the reception buffer 54 because the reception buffer 54 is full, the real-time commands are not analyzed and are not lost. Is securely executed on the side of the terminal printer 10. For example, the real-time command of n = 0 is a printer status transmission request, and the real-time command analysis unit 53 transmits the status data collected by the status data generation unit 72 to the application 5 of the host 30 via the data transmission unit 58. Send to Of course, the real-time command analyzing unit 53 may control the automatic status transmitting unit 71 to perform the same processing. As described above, in this example, it is possible to control the terminal printer 10 using the real-time command, and to perform the same processing as the command analyzed by the command analysis unit 55 via the reception buffer 54 without time delay. Can be.
Further, since the real-time command is processed in the terminal printer 10 without a time delay caused by the reception buffer 54, when the error cause is canceled or when the hold state is set because the slip sheet is not set. The application 5 can control flexible processing such as releasing slip printing and starting receipt printing.

 しかしながら、ターミナルプリンタ10でエラーが発生したり、ホールド状態となると、通信許可部80のビジィー要因選択部82においてビジィーと判断される。このため、通信許可部80においては、ビジィー信号設定部83においてDTR信号が低レベルとなる。従って、ホスト側のOS33はターミナルプリンタ10に対するデータ転送を中止するので、ホストのアプリケーション5がリアルタイムコマンドをターミナルプリンタ10に送信しようとしてもホスト30からターミナルプリンタ10に送信されず、ターミナルプリンタ10のリアルタイムコマンド解析部53にコマンドが到達しない。従って、アプリケーション5がリアルタイムコマンドを使用する機能を備えており、ターミナルプリンタ10がリアルタイムコマンドを解析する機能を備えていても、上記のようにビジィー要因と重なるとリアルタイムコマンドを用いた処理が行えず、リアルタイムコマンドの実質的な機能が制限される。 However, if an error occurs in the terminal printer 10 or the terminal printer 10 enters the hold state, the busy factor selection unit 82 of the communication permission unit 80 determines that the terminal is busy. For this reason, in the communication permission unit 80, the DTR signal becomes low in the busy signal setting unit 83. Therefore, since the host OS 33 stops the data transfer to the terminal printer 10, even if the host application 5 attempts to transmit a real-time command to the terminal printer 10, the host application 30 does not transmit the real-time command to the terminal printer 10. The command does not reach the command analysis unit 53. Therefore, even if the application 5 has a function of using a real-time command and the terminal printer 10 has a function of analyzing the real-time command, the processing using the real-time command cannot be performed if it overlaps with the busy factor as described above. However, the real function of real-time commands is limited.

 ホスト側のOS32を用いずに、アプリケーション5で直にシリアルポートを制御したり、あるいはリアルタイムコマンドを使用するアプリケーション5のために専用のOS(プリンタドライバなど)を作成してパソコンに導入することも可能である。しかしながら、OS32を用いずにアプリケーション5を作成するのは非常に手間と時間のかかる作業であり、特に、OS32の機能を利用しない場合は各メーカのパソコン用に独自のプログラムを開発する必要がある。また、ドライバなどの機能を取り込むとアプリケーション5自体が非常に大きく高価なものになる。従って、OS32を用いずに各メーカのパソコンでそれぞれ動くリアルタイムコマンド用対応のPOSアプリケーションソフトを作成することは現実的に無理である。また、特殊のOSを導入すると、表計算などの他のアプリケーションソフトが使用できないので、システムの拡張性がなくなり、ユーザの環境や目的に合わせてカスタマイズすることも難しくなってしまう。 The serial port can be directly controlled by the application 5 without using the OS 32 on the host side, or a dedicated OS (such as a printer driver) for the application 5 that uses real-time commands can be created and introduced into a personal computer. It is possible. However, creating the application 5 without using the OS 32 is a very laborious and time-consuming operation. In particular, when the functions of the OS 32 are not used, it is necessary to develop a unique program for each manufacturer's personal computer. . Also, if functions such as a driver are incorporated, the application 5 itself becomes very large and expensive. Therefore, it is practically impossible to create POS application software for real-time commands that can be operated on personal computers of each manufacturer without using the OS 32. In addition, if a special OS is introduced, other application software such as a spreadsheet cannot be used, so that system extensibility is lost, and it is difficult to customize the system according to the user's environment and purpose.

 また、ターミナルプリンタ10からDTR信号のビジィー機能を削除して、ステータス送信部70から送信されたステータスデータのみでターミナルプリンタに対するデータの信頼性を確保することも可能である。しかしながら、そのようなターミナルプリンタでは、ステータスデータを解析できないアプリケーションプログラムに対しては使用できず、汎用性がなくなってしまう。さらに、リアルタイムコマンドを用いないアプリケーションプログラムに対してはDTR信号の機能を削除するメリットは認められず、シリアル転送されるデータを保護するという点ではDTR信号の機能を保持しておく必要がある。 (4) It is also possible to eliminate the busy function of the DTR signal from the terminal printer 10 and to ensure the reliability of the data for the terminal printer only by the status data transmitted from the status transmission unit 70. However, such a terminal printer cannot be used for an application program that cannot analyze status data, and loses versatility. Further, there is no merit of eliminating the function of the DTR signal for an application program that does not use a real-time command, and it is necessary to maintain the function of the DTR signal from the viewpoint of protecting serially transferred data.

 そこで、本例のターミナルプリンタ10においては、通信許可部80のビジィー要因選択部82でビジィー信号を出力する要因を選択できるようにしており、エラー62a、ホールド62bおよびバッファフル59aのいずれかが発生するとビジィーと判断するモード1と、エラー62aおよびホールド62bはビジィーと判断せずに、バッファフル59aのみをビジィー要因とするモード2のいずれかを選択できるようにしてある。バッファフルの場合は、その後に送信されたデータが欠落する恐れがあるのでビジィー要因に残してあるが、自動ステータス送信部71によってバッファフルがホストのアプリケーション側に伝達され、リアルタイムコマンドなどを用いてデータの欠落を防止できるにすれば、モード2においてはビジィー信号を出力しないようにすることも可能である。 Therefore, in the terminal printer 10 of the present example, the factor for outputting the busy signal can be selected by the busy factor selection unit 82 of the communication permission unit 80, and any one of the error 62a, the hold 62b, and the buffer full 59a occurs. Then, it is possible to select one of the mode 1 in which the busy is determined and the mode 2 in which only the buffer full 59a is a busy factor without determining that the error 62a and the hold 62b are busy. In the case of buffer full, there is a possibility that data transmitted thereafter may be lost, so this is left as a busy factor, but the buffer full is transmitted to the application side of the host by the automatic status transmission unit 71, and the real time command is used. If the loss of data can be prevented, the busy signal may not be output in mode 2.

 本例のターミナルプリンタ10は、このようなモード1およびモード2をディップスイッチを用いたスイッチ部81で設定できるようになっている。さらに、本例のターミナルプリンタ10においては、ディップスイッチ81によってモード2を選択すると自動的に、自動ステータス送信部71の制御をホールド要因が発生したときにステータスデータを送信するように設定している。これにより、ホールド要因が発生してDTR信号が低レベルに変化、すなわちビジィーにならなくとも、ホストのアプリケーション5がステータスデータによってホールド状態であることを把握できるので、データの欠落などを防止する処理を取ることができる。従って、DTR信号の機能からホールド要因を削除してもデータ転送の信頼性を確保することができる。もちろん、エラー要因が発生した場合に自動ステータス送信部71からステータスをアプリケーション5に送り、エラー要因に応じた対処をリアルタイムコマンドによってプリンタに指示してデータの信頼性を高めた処置をとることも可能である。
このように、本例のターミナルプリンタ10は、リアルタイムコマンドに対応したアプリケーションの下では、ディップスイッチ81によってビジィー要因選択部82をモード2にセットし、ホールドやエラーではビジィー信号設定部83においてDTR信号が低レベルにならないようにすることが可能である。このため、ホールド中やエラー中にリアルタイムコマンドを有効に活用してアプリケーション5にいっそうフレキシブルな処理機能を持たせることができる。一方、リアルタイムコマンドに対応していないアプリケーションの下では、ディップスイッチ81によってビジィー要因選択部82をモード1にセットし、ホールド、エラーおよびバッファフルといった通常の要因でDTR信号を低レベルにし、転送データの保護を図ることができる。なお、モード1およびモード2の切替えは、ソフトスイッチによって行うことももちろん可能であり、ターミナルプリンタ10を用いるアプリケーションの種類によって、ホスト側からビジィー要因選択部82の設定を随時変えることも可能である。
In the terminal printer 10 of this example, such a mode 1 and a mode 2 can be set by the switch unit 81 using a dip switch. Further, in the terminal printer 10 of the present embodiment, when the mode 2 is selected by the DIP switch 81, the control of the automatic status transmitting unit 71 is set so that status data is transmitted when a hold factor occurs. . Accordingly, even if a hold cause occurs and the DTR signal changes to a low level, that is, does not become busy, the host application 5 can recognize that the hold state is being obtained from the status data, and thus a process for preventing data loss and the like. Can take. Therefore, even if the hold factor is deleted from the function of the DTR signal, the reliability of data transfer can be ensured. Of course, when an error factor occurs, the status can be sent from the automatic status transmission unit 71 to the application 5, and a response corresponding to the error factor can be given to the printer by a real-time command to take a measure for improving data reliability. It is.
As described above, the terminal printer 10 of this example sets the busy factor selection unit 82 to the mode 2 by the dip switch 81 under the application corresponding to the real-time command, and sets the DTR signal in the busy signal setting unit 83 for the hold or the error. Can be kept low. Therefore, the application 5 can be provided with a more flexible processing function by effectively utilizing the real-time command during the hold or the error. On the other hand, under an application that does not support a real-time command, the busy factor selection unit 82 is set to mode 1 by the DIP switch 81, and the DTR signal is set to a low level due to normal factors such as hold, error, and buffer full. Can be protected. The switching between the mode 1 and the mode 2 can of course be performed by a software switch, and the setting of the busy factor selection unit 82 can be changed at any time from the host depending on the type of application using the terminal printer 10. .

 図3に本例のターミナルプリンタ10の通信許可部80を用いてビジィー信号を出力する処理を示してある。通信許可部80においては、ステップ91、92および93でエラー要因、ホールド要因およびバッファフルを検出する。そして、ステップ91および92でエラー要因およびホールド要因を検出すると、ステップ94においてモード選択部81に設定されたモードを判断する。モード設定部81においてモード2がセットされていると、ステップ96において自動ステータス送信部71を用いてエラー要因あるいはホールド要因をホスト側に送る。 FIG. 3 shows a process of outputting a busy signal using the communication permission unit 80 of the terminal printer 10 of the present embodiment. The communication permitting section 80 detects an error factor, a hold factor, and a buffer full at steps 91, 92 and 93. When the error factor and the hold factor are detected in steps 91 and 92, the mode set in the mode selection unit 81 is determined in step 94. If mode 2 is set in the mode setting section 81, an error factor or a hold factor is sent to the host using the automatic status transmission section 71 in step 96.

 しかしながら、ビジィー信号は発生させない。一方、ステップ94においてモード1がセットされているか、あるいはステップ93においてバッファフルが検出されると、ステップ95に移行し、ビジィー信号を発生させてホスト側に送信し、ホスト側からのデータの転送を停止させる。 。 However, no busy signal is generated. On the other hand, if mode 1 is set in step 94, or if buffer full is detected in step 93, the process proceeds to step 95, where a busy signal is generated and transmitted to the host, and data transfer from the host is performed. To stop.

 このように、本例のターミナルプリンタ10は、RS−232Cを介して送信されたデータが印刷処理部60で処理できなくなった場合に、ビジィー信号であるDTR信号を低レベルにするモード(モード1)と、DTR信号を低レベルにしないモード(モード2)を切換できるようになっている。従って、ホスト側のアプリケーションソフトがリアルタイムコマンドなどの機能を有し、ターミナルプリンタ10でデータ処理ができない時に対処するコマンドを送信可能なソフトウェアであるときは、ターミナルプリンタをモード2に設定する。これによって、エラー要因やホールド要因が発生してもアプリケーションソフトによってターミナルプリンタを操作できるようになるので、アプリケーションソフトウェアによってエラー要因やホールド要因に対応した処置が安全に、そして確実に行うことができる。従って、オペレータの労力を軽減し、POSで管理される売上データなどの諸データの安全性を確保することができる。一方、リアルタイムコマンドなどの制御機能を持たないアプリケーションソフトによってターミナルプリンタを用いるときは、モード1に設定することによりDTR信号を用いてホスト側との通信を管理できデータの安全性を従来と同様に確保することができる。 As described above, the terminal printer 10 of this example sets the DTR signal, which is a busy signal, to a low level when the data transmitted via the RS-232C cannot be processed by the print processing unit 60 (mode 1). ) And a mode in which the DTR signal is not set to a low level (mode 2). Therefore, if the host-side application software has a function such as a real-time command and is capable of transmitting a command to cope with a case where data cannot be processed by the terminal printer 10, the terminal printer is set to mode 2. As a result, even if an error factor or a hold factor occurs, the terminal printer can be operated by the application software, so that a measure corresponding to the error factor or the hold factor can be performed safely and reliably by the application software. Accordingly, the labor of the operator can be reduced, and the security of various data such as sales data managed by the POS can be secured. On the other hand, when the terminal printer is used by application software that does not have a control function such as a real-time command, communication with the host can be managed by using the DTR signal by setting the mode to 1, and data security can be maintained as in the conventional case. Can be secured.

 さらに、DTR信号の要因をターミナルプリンタ側で設定できるようにすることにより、DTR信号に関連するホスト側のOSの仕様を変更しなくとも上記のようにリアルタイムコマンドの機能を十分に活用することができる。従って、POSシステムなどのシステムを構築する際にアプリケーションソフトの汎用性およびプリンタの汎用性を減じることなく、アプリケーションソフト側からエラーやホールドの状態となったターミナルプリンタに関与し処理できるシステムを構築することができる。 Further, by allowing the terminal printer to set the cause of the DTR signal, the function of the real-time command can be fully utilized as described above without changing the specification of the host OS related to the DTR signal. it can. Therefore, when constructing a system such as a POS system, a system is constructed in which the application software can participate in and process an error or hold state terminal printer without reducing the versatility of the application software and the versatility of the printer. be able to.

 なお、上記においては、POSシステムを構築する際に好適なターミナルプリンタ10を通信端末の例として本発明を説明してあるが、通信端末はターミナルプリンタに限定されることはなく、プロッタ、スキャナーさらにはモデムなどのシリアルインタフェースに接続可能な通信端末、また、パラレルインタフェースに接続されるプリンタなどに対し本発明を適用できることは勿論である。そして、これらの通信端末に対し本発明を適用することにより、送信されたデータの処理ができない状態になった場合でも、ホスト側のアプリケーションプログラムを通信端末の問題解決に関与させることが可能になる。従って、通信端末側にエラー要因などが発生した場合にオペレータに処理を一任するのではなく、アプリケーション側で対処することができる。そして、オペレータの労力を軽減すると共にミスオペレーションの危険をなくし、より安全で信頼性の高いシステムを、パソコンや汎用OSといった汎用性が高く、カスタマイズが容易で安価なハードウェアやソフトウェアを用いて構築することが可能になる。
In the above description, the present invention has been described with the terminal printer 10 suitable for constructing a POS system as an example of a communication terminal. However, the communication terminal is not limited to the terminal printer, and may be a plotter, a scanner, Of course, the present invention can be applied to a communication terminal connectable to a serial interface such as a modem, a printer connected to a parallel interface, and the like. By applying the present invention to these communication terminals, even when the transmitted data cannot be processed, the host-side application program can be involved in solving the problem of the communication terminal. . Therefore, when an error factor or the like occurs on the communication terminal side, the processing can be dealt with on the application side instead of leaving it to the operator. By reducing operator's labor and eliminating the risk of misoperation, a more secure and reliable system is built using highly versatile, easily customizable and inexpensive hardware and software such as personal computers and general-purpose OSs. It becomes possible to do.

本発明の実施の形態に係るターミナルプリンタの概略構成を示す斜視図である。FIG. 1 is a perspective view illustrating a schematic configuration of a terminal printer according to an embodiment of the present invention. 図1に示すターミナルプリンタおよびパソコンを用いたPOSシステムの概略構成を示すブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration of a POS system using the terminal printer and the personal computer illustrated in FIG. 1. 本例のターミナルプリンタの通信許可部を用いてビジィー信号を出力する処理を示すフローチャートである。5 is a flowchart illustrating a process of outputting a busy signal using the communication permission unit of the terminal printer of the present example.

符号の説明Explanation of reference numerals

1・・印刷ヘッド
5、6・・アプリケーションプログラム
3・・リボンカセット
10・・ターミナルプリンタ
17・・レシート用紙
18・・ジャーナル用紙
19・・スリップ用紙
20・・ニアエンド検出器
22・・カバー検出器
30・・パソコン(ホスト)
31・・シリアルポートドライバ
32・・オペレーティングシステム
33・・POS用OS
34・・基本OS
36〜39・・ドライバ
40・・カスタマディスプレイ
41、46・・インタフェース
42、47・・処理部
45・・キャッシュドロワ
51・・プリンタインタフェース
52・・データ受信部
53・・リアルタイムコマンド解析部
54・・受信バッファ
55・・コマンド解析部
56・・プリンタバッファ
57・・制御部
58・・データ送信部
59・・コモンステータス検出部
59a・・バッファフル要因
60・・印刷処理部
61・・プリンタ機構
62・・ステータス検出部
62a・・エラー要因
62b・・ホールド要因
70・・ステータス送信部
71・・自動ステータス送信部
72・・ステータスデータ生成部
80・・通信許可部
81・・モード選択部(スイッチ部)
82・・ビジィー要因選択部
83・・ビジィー信号設定部
1. Print heads 5, 6, application program 3, ribbon cassette 10, terminal printer 17, receipt paper 18, journal paper 19, slip paper 20, near-end detector 22, cover detector 30 ..PCs (hosts)
31, Serial port driver 32, Operating system 33, POS OS
34 Basic OS
36 to 39, driver 40, customer displays 41, 46, interfaces 42, 47, processing unit 45, cash drawer 51, printer interface 52, data reception unit 53, real-time command analysis unit 54, A receiving buffer 55, a command analyzing unit 56, a printer buffer 57, a control unit 58, a data transmitting unit 59, a common status detecting unit 59a, a buffer full cause 60, a print processing unit 61, a printer mechanism 62, Status detector 62a error cause 62b hold cause 70 status transmitter 71 automatic status transmitter 72 status data generator 80 communication permitter 81 mode selector (switch)
82 busy factor selection unit 83 busy signal setting unit

Claims (5)

ホストから送られてきたデータを受信するインタフェースと、
 該インタフェースを介して受信したデータを一時的に格納する受信バッファと、
 前記受信バッファに格納されたデータを取り出して処理する処理部と、
 前記ホストに対し、前記ホストから前記インタフェースを介してのデータ受信が可能かビジィーかを通知する通信許可手段と、
を有する通信端末において、
 エラー状態またはホールド状態のとき、前記通信許可手段により前記ビジィーを前記ホストに通知する第1のモードと、前記エラー状態または前記ホールド状態のときでも前記通信許可手段によるビジィーを前記ホストに通知しない第2のモードと、を選択するスイッチ手段を設けたことを特徴とする通信端末。
An interface for receiving data sent from the host,
A reception buffer for temporarily storing data received via the interface,
A processing unit that retrieves and processes the data stored in the reception buffer;
Communication permission means for notifying the host whether data reception from the host via the interface is possible or busy,
In a communication terminal having
A first mode in which the communication permission means notifies the host of the busy state in the error state or the hold state; and a first mode in which the communication permission means does not notify the host of the busy state in the error state or the hold state. 2. A communication terminal, comprising: switch means for selecting one of two modes.
ホストから送られてきたデータを受信するインタフェースと、
 該インタフェースを介して受信したデータを一時的に格納する受信バッファと、
 前記受信バッファに格納されたデータを取り出して処理する処理部と、
 前記ホストに対し、前記ホストから前記インタフェースを介してのデータ受信が可能かビジィーかを通知する通信許可手段と、
を有する通信端末において、
 エラー状態またはホールド状態のとき前記ホストに対し前記ビジィーを前記ホストに通知する第1のモードと、前記エラー状態またはホールド状態のときでも前記ビジィーを前記ホストに通知しない第2のモードと、を選択的にセットされるビジィー要因選択部を有し、
 前記ビジィー要因選択部が第2のモードがセットされたときは、前記ホストから前記状態に対処するリアルタイムコマンドを受信可能であることを特徴とする通信端末。
An interface for receiving data sent from the host,
A reception buffer for temporarily storing data received via the interface,
A processing unit that retrieves and processes the data stored in the reception buffer;
Communication permission means for notifying the host whether data reception from the host via the interface is possible or busy,
In a communication terminal having
A first mode for notifying the host of the busy to the host when in the error state or the hold state, and a second mode for not notifying the host to the busy even in the error state or the hold state are selected. It has a busy factor selection section that is set
The communication terminal according to claim 1, wherein when the second mode is set by the busy factor selection unit, a real-time command corresponding to the state can be received from the host.
ホストから送られてきたデータを受信するインタフェースと、
 該インタフェースを介して受信したデータを一時的に格納する受信バッファと、
 前記受信バッファに格納されたデータを取り出して処理する処理部と、
 前記ホストに対し、前記ホストから前記インタフェースを介してのデータ受信が可能かビジィーかを通知する通信許可手段と、
を有する通信端末において、
 前記ビジィー通知の出力要因を選択するビジィー要因選択部を備えたことを特徴とする通信端末。
An interface for receiving data sent from the host,
A reception buffer for temporarily storing data received via the interface,
A processing unit that retrieves and processes the data stored in the reception buffer;
Communication permission means for notifying the host whether data reception from the host via the interface is possible or busy,
In a communication terminal having
A communication terminal comprising a busy factor selection unit for selecting an output factor of the busy notification.
前記ビジィー要因選択部は、エラー状態またはホールド状態のときでも、前記通信許可手段が前記ビジィーを前記ホストに出力しないモードを選択可能なことを特徴とする請求項3記載の通信端末。 4. The communication terminal according to claim 3, wherein the busy factor selection unit can select a mode in which the communication permission unit does not output the busy to the host even in an error state or a hold state. 前記受信バッファに格納された前記データから順番にコマンドを解析する第1の解析手段と、
 前記インタフェースから前記受信バッファに渡される前記データからコマンドを解析可能な第2の解析手段と、
を備えることを特徴とする請求項1乃至4記載の内1に通信端末。
First analysis means for sequentially analyzing commands from the data stored in the reception buffer;
Second analysis means capable of analyzing a command from the data passed from the interface to the reception buffer;
The communication terminal according to any one of claims 1 to 4, further comprising:
JP2003328363A 2003-09-19 2003-09-19 Data processing terminal and control method thereof Expired - Lifetime JP3938123B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003328363A JP3938123B2 (en) 2003-09-19 2003-09-19 Data processing terminal and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003328363A JP3938123B2 (en) 2003-09-19 2003-09-19 Data processing terminal and control method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP14335296A Division JPH09323463A (en) 1996-06-05 1996-06-05 Communication terminal and control method thereof

Publications (2)

Publication Number Publication Date
JP2004106553A true JP2004106553A (en) 2004-04-08
JP3938123B2 JP3938123B2 (en) 2007-06-27

Family

ID=32290763

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003328363A Expired - Lifetime JP3938123B2 (en) 2003-09-19 2003-09-19 Data processing terminal and control method thereof

Country Status (1)

Country Link
JP (1) JP3938123B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011180648A (en) * 2010-02-26 2011-09-15 Seiko Epson Corp Printer, control method for the same and printer system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011180648A (en) * 2010-02-26 2011-09-15 Seiko Epson Corp Printer, control method for the same and printer system

Also Published As

Publication number Publication date
JP3938123B2 (en) 2007-06-27

Similar Documents

Publication Publication Date Title
JPH09323463A (en) Communication terminal and control method thereof
US7869063B2 (en) Printing apparatus, printer control method, printer control program, and printing system
US5594653A (en) Printing apparatus, a control method therefor, and a data processing apparatus using said printing apparatus
US6362896B1 (en) Printing apparatus with a cash drawer control function, and a control method therefor
CN101638009B (en) Printing device, control method for a printing device
US20080212125A1 (en) Printer control apparatus and method
JP4924748B2 (en) Printer and received data processing method
KR100535442B1 (en) Printing appratus, method of the printing appratus, and data processing apparatus using the printing apparatus
US6886050B2 (en) Method for controlling a communication terminal device and rewritable storage medium having initialization setting data
JPH10333856A (en) Communication terminal and its control method, and computer readable recording medium recorded with control program
JP2004106553A (en) Communication terminal
JP3992022B2 (en) Printer control method
JP4865140B2 (en) Printer, received data processing method and program
JP3856341B2 (en) Interface control method
US8279475B2 (en) Printing apparatus and method for processing real-time command using the printing apparatus
JP3985135B2 (en) Device initialization method in control system, control system, program for causing computer to execute device initialization method, and recording medium recording this program
JP2001282394A (en) Communication terminal equipment, its control method and its recording medium
US7966434B2 (en) Detailed description of the preferred embodiments
JP4380219B2 (en) Printing apparatus, printing apparatus control method, and printing apparatus control program
JPH10161826A (en) Printer controller
JP2010105230A (en) Printing apparatus and method for controlling the same
JP2002200804A (en) Printing apparatus, controlling method therefor, and information processing system, using the printing apparatus
JPH04142956A (en) Printer controller

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050906

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060808

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061006

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070319

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120406

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140406

Year of fee payment: 7

EXPY Cancellation because of completion of term