JP3755673B2 - Printer - Google Patents
Printer Download PDFInfo
- Publication number
- JP3755673B2 JP3755673B2 JP14016595A JP14016595A JP3755673B2 JP 3755673 B2 JP3755673 B2 JP 3755673B2 JP 14016595 A JP14016595 A JP 14016595A JP 14016595 A JP14016595 A JP 14016595A JP 3755673 B2 JP3755673 B2 JP 3755673B2
- Authority
- JP
- Japan
- Prior art keywords
- command
- error
- mode
- printer
- received
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Accessory Devices And Overall Control Thereof (AREA)
Description
【0001】
【産業上の利用分野】
本発明は、ホスト機から無線送信されるコマンドを受信してこのコマンドに応じた印字を行うプリンタに関する。
【0002】
【従来の技術】
ホスト機から電波あるいは光等の無線通信により送信されるコマンドを受信し、この受信したコマンドに応じてラベル等の用紙に印字するプリンタが知られている。このようなプリンタにおけるホスト機との間の送受信の一般的なシーケンスチャートを図6に基づいて説明する。まず、プリンタが受信可能状態になるとホスト機に対してコマンド要求を送信し、これに応じて、ホスト機はプリンタにコマンドパケットを送信する。そして、プリンタとホスト機との間の送受信は、ホスト機からEOT(End Of Transmission)が送信されるまで繰り返される。
【0003】
ホスト機からEOTが送信されると、プリンタでは受信したコマンドの解析を開始する。そして、このコマンド解析中にコマンド中の文法上のエラー(コマンドエラー)を検出した場合には、プリンタの動作モードがエラーモードに切り替えられると共にエラーモードとなったことを表示するLEDが点灯され、受信したコマンドが捨てられる。
【0004】
動作モードがエラーモードに切り替わった場合に、そのエラーモードを解除して通常モードに回復させる方法としては、エラーモード解除キーを操作する方法もあるが、小型化や軽量化を図るようにした携帯用のプリンタ等においては、ラベル用紙等を覆っているカバーを一旦オープンしてクローズさせる操作を行うことにより、エラーモードを解除するようにしたものがある。
【0005】
エラーモードが解除されて通常モードに回復した後には、プリンタからの新たなコマンド要求に応じた新たなコマンドパケットがホスト機から送信される。
【0006】
ここで、プリンタの動作モードがエラーモードに切り替えられる場合としては、上述したように受信したコマンド中の文法上のエラーを検出した場合のほか、ラベル用紙が終了した場合や、ラベル用紙が紙詰まりした場合である。
【0007】
【発明が解決しようとする課題】
ラベル用紙が終了したりラベル用紙が紙詰まりした場合には、ラベル用紙の補給や紙詰まり解除のためにプリンタのカバーをオープンさせるため、ラベル用紙の補給や紙詰まりの解除が終了してカバーをクローズさせることによりエラーモードを解除して通常モードに回復させるということは煩雑ではない。
【0008】
しかし、受信したコマンド中に文法上のエラーが存在したことによりエラーモードに切り替わった場合に、そのエラーモードを解除するためにカバーのオープン,クローズ操作を行うことは非常に煩雑である。
【0009】
【課題を解決するための手段】
請求項1記載の発明のプリンタは、無線送信されるコマンドを受信する受信部と、受信したコマンドに応じた印字を行う印字部と、受信したコマンド中の文法上のエラーを検出するエラー検出手段と、このエラー検出手段がエラーを検出した場合に動作モードをエラーモードに切り替えるエラーモード切替手段と、エラーモード時にEOT( End Of Transmission )を受信したことを検出する所定コマンド検出手段と、この所定コマンド検出手段の検出結果に基づいてエラーモードを自動的に解除するエラーモード解除手段とを有する。
【0010】
【作用】
受信したコマンド中の文法上のエラーをエラー検出手段が検出すると、プリンタの動作モードがエラーモードに切り替わる。なお、このエラーモード時にはコマンドの受信は可能であり、このエラーモード中に所定のコマンドを受信したことを所定コマンド検出手段が検出すると、その検出結果に基づいてエラーモードが自動的に解除される。
【0011】
【実施例】
本発明の第一の実施例を図1及び図2に基づいて説明する。図2は感熱ラベル(図示せず)に印字する携帯型のプリンタ全体の回路構造を示すもので、各種のデータ処理を実行するCPU1に対し、制御プログラム等の固定データを記憶したROM2、可変データを記憶するRAM3、ハンディーターミナルからなるホスト機(図示せず)との間で赤外線による送受信を行うと共にホスト機から送信されるコマンドを受信する受信部である光I/F4、印字部であるサーマルヘッド5を駆動するサーマルヘッドドライバ6、ラベル用紙を紙送りするパルスモータ7を駆動するモータドライバ8、ラベル用紙の有無を検出する透過センサ9が接続されたセンサ回路10、カバーオープンスイッチ11が接続されたスイッチ回路12等をバスライン13で接続した構造となっている。
【0012】
つぎに、前記プリンタには、受信したコマンド中の文法上のエラーを検出するエラー検出手段、このエラー検出手段がエラーを検出した場合にプリンタの動作モードを通常モードからエラーモードに切り替えるエラーモード切替手段、エラーモード時に所定のコマンド、具体的にはコマンドの一つであるEOTを受信したことを検出する所定コマンド検出手段、この所定コマンド検出手段の検出結果に基づいてエラーモードを自動的に解除して通常モードへ戻すエラーモード解除手段等が設けられている。なお、これらの各手段は、前記ROM2内に記憶されたプログラムに従って前記CPU1により実行される処理である。
【0013】
ここで、受信したコマンド中の文法上のエラーとは、例えば、コマンド中の値で最大“3”となっている箇所が“4”となっていたり、コマンド中の数字が入る箇所にアルファベットが入っていたりした場合等である。また、プリンタの動作モードがエラーモードに切り替えられた場合においては、印字動作や紙送り動作等は停止されるが、プリンタからホスト機へのコマンド要求の送信、ホスト機から送信されたコマンドの受信等は可能である。
【0014】
このような構成において、プリンタが受信可能状態になると、図6において説明した従来例と同様に、ホスト機に対してコマンド要求を送信し、これに応じて、ホスト機はプリンタにコマンドパケットを送信し、プリンタとホスト機との間の送受信は、ホスト機からコマンドの一つであるEOTが送信されるまで繰り返される。
【0015】
ホスト機からEOTが送信されると、プリンタでは受信したコマンドの解析を開始する。そして、このコマンド解析中にコマンド中の文法上のエラー(コマンドエラー)をエラー検出手段が検出すると、プリンタの動作モードがエラーモード切替手段によってエラーモードに切り替えられると共にエラーモードとなったことを表示するLED(図示せず)が点灯され、受信したコマンドが捨てられる。
【0016】
ここで、プリンタはエラーモード時であってもホスト機に対してコマンド要求を新たに送信することができ、このコマンド要求をすることによりホスト機からはコマンドパケットが送信され、プリンタとホスト機との間の送受信は上述した送受信の場合と同様に、ホスト機からコマンドの一つであるEOTが送信されるまで繰り返される。
【0017】
そして、エラーモード時に所定のコマンドであるEOTを受信したことを所定コマンド検出手段が検出すると、その検出結果に基づき、エラーモード解除手段によりエラーモードが自動的に解除され、プリンタの動作モードは通常モードに回復すると共に受信した新たなコマンドの解析が開始される。
【0018】
従って、コマンドエラーが原因となってエラーモードに切り替わった場合には、携帯型のプリンタでキーを設けることができないものでも、カバーのオープン,クローズ操作を行わずに、新たにコマンド要求を出して所定のコマンドを受信することによりエラーモードを自動的に解除することができる。なお、コマンドエラーが検出されたコマンドに関しては、コマンド補正を行う。
【0019】
ついで、本発明の第二の実施例を図3ないし図5に基づいて説明する。なお、本実施例のプリンタの構造は図2に示した第一の実施例のプリンタと同じである。異なる点は、第一の実施例のプリンタがコマンドの受信を終了した後にコマンド解析を開始するのに対し、本実施例のプリンタは、最初のコマンドパケットを受信した時点でコマンド解析を開始する点である。
【0020】
本実施例のプリンタのホスト機との間の送受信のシーケンスチャートを図3に基づいて説明する。プリンタが受信可能状態になると、ホスト機に対してコマンド要求を送信し、これに応じて、ホスト機はプリンタにコマンドパケットを送信し、プリンタとホスト機との間の送受信は、ホスト機からコマンドの一つであるEOTが送信されるまで繰り返される。
【0021】
ここで、プリンタでは、ホスト機からの1回目のコマンドパケットを受信すると、ホスト機との間の送受信と並行してコマンド解析を開始する。そして、このコマンド解析中にエラー検出手段がコマンドエラーを検出すると、プリンタの動作モードがエラーモード切替手段によってエラーモードに切り替えられると共にエラーモードとなったことを表示するLED(図示せず)が点灯され、受信したコマンドが捨てられる。さらに、コマンド読み捨てフラグがセットされ、このフラグをセットした後に受信したコマンド(コマンドパケット)を読み捨てる。そして、EOTを受信することによりコマンド読み捨てフラグがクリアされる。
【0022】
つぎに、EOTの受信に伴ってコマンド読み捨てフラグをクリアした後に、プリンタからホスト機に対して新たにコマンド要求をすると、そのコマンド要求に応じた1回目のコマンドパケットがホスト機から送信される。そして、コマンドエラーが検出されたコマンドのEOTとその後に受信した1回目のコマンドパケットとを所定コマンド検出手段が連続して検出すると、これらのEOTとコマンドパケットとが所定のコマンドとされ、その検出結果に基づいてエラーモード解除手段によりエラーモードが解除され、再びコマンド解析が開始される。
【0023】
図4は、コマンド解析中にコマンドエラーを検出した場合の制御を説明するフローチャートであり、コマンドエラーを検出しない場合にはコマンド解析が継続され、コマンドエラーを検出した場合にはコマンド読み捨てフラグがセットされる。
【0024】
図5は、受信に対する割込み処理フローチャートである。コマンド読み捨てフラグがセットされた後にコマンド(コマンドパケット)を受信すると、ホスト機からEOTが送信されるまでは受信したコマンドが全て捨てられる。そして、EOTを受信した場合にコマンド読み捨てフラグがクリアされ、このコマンド読み捨てフラグをクリアした後にコマンドを受信した場合に、エラーモードが解除される。
【0025】
ここで、本実施例においては、コマンドの受信が終了する以前にコマンド解析を開始しているため、コマンド受信が終了してからコマンド解析が終了するまでの時間が短縮されると共にコマンド受信を開始してから印字を終了するまでの時間が短縮され、印字作業の作業能率を向上させることができる。
【0026】
また、第一の実施例のプリンタと同様に、コマンドエラーが原因となってエラーモードに切り替わった場合には、カバーのオープン,クローズの操作を行わなくても、新たにコマンド要求を出して所定のコマンドを受信することによりエラーモードを自動的に解除することができる。
【0027】
【発明の効果】
本発明のプリンタによれば、受信したコマンド中に存在する文法上のエラーが原因となって動作モードがエラーモードに切り替えられた場合には、このエラーモード中にEOT( End Of Transmission )を受信したことを所定コマンド検出手段が検出することによりその検出結果に基づいてエラーモードを自動的に解除することができ、従って、コマンドの文法上のエラーが原因となったエラーモードの解除のためには特別な解除操作を行う必要がなくなり、プリンタの取扱性を向上させることができる。
【図面の簡単な説明】
【図1】本発明の第一の実施例のプリンタにおけるシーケンスチャートである。
【図2】プリンタ全体の回路構造を示すブロック図である。
【図3】本発明の第二の実施例のプリンタにおけるシーケンスチャートである。
【図4】コマンド解析中にコマンドエラーを検出した場合の制御を説明するフローチャートである。
【図5】コマンド読み捨てフラグがセットされた後の制御を説明するフローチャートである。
【図6】従来例のプリンタにおけるシーケンスチャートである。
【符号の説明】
4 受信部
5 印字部[0001]
[Industrial application fields]
The present invention relates to a printer that receives a command wirelessly transmitted from a host machine and performs printing in accordance with the command.
[0002]
[Prior art]
2. Description of the Related Art There is known a printer that receives a command transmitted from a host machine through wireless communication such as radio waves or light and prints on a sheet such as a label in accordance with the received command. A general sequence chart of transmission / reception with a host device in such a printer will be described with reference to FIG. First, when the printer is ready to receive, a command request is transmitted to the host device, and in response to this, the host device transmits a command packet to the printer. The transmitting and receiving between the printer and the host machine are repeated from the host machine to EOT (End Of Transmiss i on) is transmitted.
[0003]
When EOT is transmitted from the host machine, the printer starts analyzing the received command. When a grammatical error in the command (command error) is detected during the command analysis, the printer operation mode is switched to the error mode and the LED indicating that the error mode is set is turned on. Received commands are discarded.
[0004]
When the operation mode is switched to the error mode, there is a method of operating the error mode release key to cancel the error mode and restore it to the normal mode. In some printers, the error mode is canceled by performing an operation of once opening and closing a cover covering the label paper or the like.
[0005]
After the error mode is canceled and the normal mode is restored, a new command packet corresponding to a new command request from the printer is transmitted from the host machine.
[0006]
Here, when the printer operation mode is switched to the error mode, in addition to detecting a grammatical error in the received command as described above, when the label paper is finished or the label paper is jammed. This is the case.
[0007]
[Problems to be solved by the invention]
When the label paper is finished or the label paper is jammed, the printer cover is opened to replenish the label paper or clear the paper jam. It is not complicated to cancel the error mode and restore the normal mode by closing.
[0008]
However, when switching to the error mode due to a grammatical error in the received command, it is very complicated to open and close the cover in order to cancel the error mode.
[0009]
[Means for Solving the Problems]
The printer according to claim 1 is a receiving unit that receives a command transmitted wirelessly, a printing unit that performs printing according to the received command, and an error detection unit that detects a grammatical error in the received command. An error mode switching means for switching the operation mode to an error mode when the error detection means detects an error, a predetermined command detection means for detecting that an EOT ( End Of Transmission ) has been received in the error mode, and the predetermined Error mode canceling means for automatically canceling the error mode based on the detection result of the command detection means.
[0010]
[Action]
When the error detection means detects a grammatical error in the received command, the printer operation mode is switched to the error mode. In this error mode, commands can be received. When the predetermined command detection means detects that a predetermined command has been received during the error mode, the error mode is automatically canceled based on the detection result. .
[0011]
【Example】
A first embodiment of the present invention will be described with reference to FIGS. FIG. 2 shows the overall circuit structure of a portable printer that prints on a thermal label (not shown). A ROM 2 that stores fixed data such as a control program and variable data for a CPU 1 that executes various data processing. RAM 3 for storing data, optical I / F 4 serving as a receiving unit that receives and transmits commands transmitted from the host machine and transmits / receives to / from a host machine (not shown) including a handy terminal, and thermal serving as a printing unit A
[0012]
Next, the printer includes error detection means for detecting a grammatical error in the received command, and error mode switching for switching the printer operation mode from the normal mode to the error mode when the error detection means detects an error. Means, a predetermined command detecting means for detecting the reception of a predetermined command in error mode, specifically, EOT which is one of the commands, and automatically canceling the error mode based on the detection result of the predetermined command detecting means An error mode canceling means for returning to the normal mode is provided. Each of these means is processing executed by the CPU 1 in accordance with a program stored in the ROM 2.
[0013]
Here, a grammatical error in the received command means that, for example, the maximum value of “3” in the command is “4”, or an alphabetical character is entered at the location where the number in the command is entered. This is the case when it enters. In addition, when the printer operation mode is switched to the error mode, the printing operation and paper feeding operation are stopped, but the command request is transmitted from the printer to the host device, and the command transmitted from the host device is received. Etc. are possible.
[0014]
In such a configuration, when the printer is in a receivable state, a command request is transmitted to the host device as in the conventional example described with reference to FIG. 6, and the host device transmits a command packet to the printer accordingly. Transmission / reception between the printer and the host device is repeated until EOT, which is one of commands, is transmitted from the host device.
[0015]
When EOT is transmitted from the host machine, the printer starts analyzing the received command. If the error detection means detects a grammatical error (command error) in the command during the command analysis, the printer operation mode is switched to the error mode by the error mode switching means and the error mode is displayed. The LED (not shown) to be turned on is turned on, and the received command is discarded.
[0016]
Here, even in the error mode, the printer can newly send a command request to the host machine. By making this command request, a command packet is sent from the host machine. As in the case of the above-described transmission / reception, the transmission / reception between is repeated until EOT which is one of the commands is transmitted from the host machine.
[0017]
When the predetermined command detecting means detects that the EOT as the predetermined command is received in the error mode, the error mode is automatically canceled by the error mode releasing means based on the detection result, and the printer operation mode is normally set. As soon as the mode is restored, analysis of a new command received is started.
[0018]
Therefore, when the mode is switched to the error mode due to a command error, a new command request is issued without opening and closing the cover even if the key cannot be provided on the portable printer. The error mode can be automatically canceled by receiving a predetermined command. Note that command correction is performed for a command in which a command error is detected.
[0019]
Next, a second embodiment of the present invention will be described with reference to FIGS. The structure of the printer of this embodiment is the same as that of the printer of the first embodiment shown in FIG. The difference is that the command analysis is started after the printer of the first embodiment finishes receiving the command, whereas the printer of this embodiment starts the command analysis when the first command packet is received. It is.
[0020]
A sequence chart of transmission / reception with the host machine of the printer of this embodiment will be described with reference to FIG. When the printer is ready to receive data, it sends a command request to the host machine. In response to this, the host machine sends a command packet to the printer. It repeats until EOT which is one of is transmitted.
[0021]
Here, when the printer receives the first command packet from the host machine, the printer starts command analysis in parallel with transmission / reception with the host machine. If the error detection means detects a command error during the command analysis, the printer operation mode is switched to the error mode by the error mode switching means and an LED (not shown) indicating that the error mode has been entered is lit. The received command is discarded. Further, a command reading discard flag is set, and a command (command packet) received after setting this flag is discarded. Then, when the EOT is received, the command discard flag is cleared.
[0022]
Next, after clearing the command discard flag along with the reception of EOT, when a new command request is made from the printer to the host machine, the first command packet corresponding to the command request is transmitted from the host machine. When the predetermined command detecting means continuously detects the EOT of the command in which the command error is detected and the first command packet received thereafter, these EOT and the command packet are determined as the predetermined command, and the detection is performed. Based on the result, the error mode is canceled by the error mode canceling means, and the command analysis is started again.
[0023]
FIG. 4 is a flowchart for explaining control when a command error is detected during command analysis. When no command error is detected, command analysis is continued, and when a command error is detected, a command discard flag is set. Is done.
[0024]
FIG. 5 is a flowchart of interrupt processing for reception. When a command (command packet) is received after the command discard flag is set, all received commands are discarded until an EOT is transmitted from the host machine. When the EOT is received, the command discard flag is cleared. When the command is received after the command discard flag is cleared, the error mode is canceled.
[0025]
Here, in this embodiment, since the command analysis is started before the command reception is completed, the time from the command reception to the command analysis is shortened and the command reception is started. The time from printing to completion of printing can be shortened, and the work efficiency of printing work can be improved.
[0026]
Similarly to the printer of the first embodiment, when the error mode is switched due to a command error, a new command request is issued and a predetermined command is issued even if the cover is not opened or closed. The error mode can be automatically canceled by receiving the command.
[0027]
【The invention's effect】
According to the printer of the present invention, when the operation mode is switched to the error mode due to a grammatical error existing in the received command, an EOT ( End Of Transmission ) is received during the error mode. When the predetermined command detection means detects that the error mode has been detected, the error mode can be automatically canceled based on the detection result. Eliminates the need for a special release operation and improves the handling of the printer.
[Brief description of the drawings]
FIG. 1 is a sequence chart in a printer according to a first embodiment of the present invention.
FIG. 2 is a block diagram illustrating a circuit structure of the entire printer.
FIG. 3 is a sequence chart in a printer according to a second embodiment of the present invention.
FIG. 4 is a flowchart illustrating control when a command error is detected during command analysis.
FIG. 5 is a flowchart illustrating control after a command discard flag is set.
FIG. 6 is a sequence chart in a conventional printer.
[Explanation of symbols]
4 Receiving part 5 Printing part
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14016595A JP3755673B2 (en) | 1995-06-07 | 1995-06-07 | Printer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14016595A JP3755673B2 (en) | 1995-06-07 | 1995-06-07 | Printer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08332761A JPH08332761A (en) | 1996-12-17 |
| JP3755673B2 true JP3755673B2 (en) | 2006-03-15 |
Family
ID=15262397
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP14016595A Expired - Fee Related JP3755673B2 (en) | 1995-06-07 | 1995-06-07 | Printer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3755673B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6639617B2 (en) * | 2018-11-05 | 2020-02-05 | キヤノン株式会社 | Printing apparatus, control method, and program |
-
1995
- 1995-06-07 JP JP14016595A patent/JP3755673B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH08332761A (en) | 1996-12-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5722781A (en) | Printing apparatus | |
| JPH09323463A (en) | Communication terminal and control method thereof | |
| JP3755673B2 (en) | Printer | |
| US8472058B2 (en) | Image processing device, image processing method, and program | |
| JP4779390B2 (en) | Image forming apparatus control system and image forming apparatus | |
| JP3179695B2 (en) | Image forming apparatus and control method thereof | |
| US8947705B2 (en) | Non-transitory recording medium and print processing method | |
| JP3931868B2 (en) | Image recording device | |
| JP2003155160A (en) | Interface device | |
| JP2002308517A (en) | Image forming device with partition paper mode | |
| JP3469388B2 (en) | Image forming device | |
| JPH09305339A (en) | Printer spooler | |
| JP6907966B2 (en) | Information processing device | |
| JP2005229514A (en) | Cut sheet reading processing system, cut sheet reading apparatus, and combined processing apparatus | |
| JP2994709B2 (en) | Facsimile machine | |
| JPH08216484A (en) | Jam recovery method and apparatus for printer | |
| JPH0496565A (en) | High performance facsimile equipment | |
| JPH06155820A (en) | Data management system for printer | |
| JPH06210936A (en) | Printing control device of printer | |
| JPH1031643A (en) | Reception information processing device and information processing device | |
| JPH08198514A (en) | Printer | |
| JPH04351578A (en) | Office printer | |
| JPH06278342A (en) | Printer | |
| JPH08310058A (en) | Printer | |
| JPH07137364A (en) | Printer device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040609 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040805 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050519 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050711 |
|
| 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: 20051214 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20051215 |
|
| 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: 20100106 Year of fee payment: 4 |
|
| LAPS | Cancellation because of no payment of annual fees |