JP4577433B2 - printer - Google Patents

printer Download PDF

Info

Publication number
JP4577433B2
JP4577433B2 JP2008220797A JP2008220797A JP4577433B2 JP 4577433 B2 JP4577433 B2 JP 4577433B2 JP 2008220797 A JP2008220797 A JP 2008220797A JP 2008220797 A JP2008220797 A JP 2008220797A JP 4577433 B2 JP4577433 B2 JP 4577433B2
Authority
JP
Japan
Prior art keywords
application program
file
printer
memory
print data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2008220797A
Other languages
Japanese (ja)
Other versions
JP2010055447A (en
Inventor
元規 田中
隆夫 加藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2008220797A priority Critical patent/JP4577433B2/en
Priority to US12/378,554 priority patent/US8289548B2/en
Priority to EP09002263.3A priority patent/EP2093660B1/en
Priority to CN2009100047312A priority patent/CN101515222B/en
Publication of JP2010055447A publication Critical patent/JP2010055447A/en
Application granted granted Critical
Publication of JP4577433B2 publication Critical patent/JP4577433B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、USBを介してホストに接続されるプリンターに関するものである。   The present invention relates to a printer connected to a host via USB.

従来、パソコンでは、プリンターを接続して使用する際には、そのプリンターで印刷させる編集物をそのパソコンにインストールされているエディタで作成することが行われている。   Conventionally, in a personal computer, when a printer is connected and used, an edited material to be printed by the printer is created by an editor installed in the personal computer.

このとき、そのプリンターのデバイス・ドライバーは、パソコンにインストロールされ、パソコンのエディタとそのプリンターとの間に介在し、そのパソコンのエディタで作成された編集物を、出力先であるそのプリンターに応じたデータ形式に変換しながら、そのプリンターに出力する。これにより、そのパソコンのエディタで作成された編集物をそのプリンターにおいて印刷することができる(下記特許文献1参照)。
特開2007−140597号公報(第4頁)
At this time, the device driver of the printer is installed on the personal computer, and is interposed between the editor of the personal computer and the printer. Output to the printer while converting the data format. Thereby, the edited material created by the editor of the personal computer can be printed by the printer (see Patent Document 1 below).
JP 2007-140597 A (page 4)

従って、例えば、そのプリンターの多彩な機能を簡単に利用できる専用エディタがそのプリンターとともにアプリケーションプログラムとして提供されている場合は、その専用エディタを使用するためには、そのパソコンにその専用エディタをインストールしなくてはならない。
さらに、専用デバイスドライバーが提供されている場合にも、同様にして、その専用デバイスドライバーをパソコンにインストロールしなくてはならない。
Therefore, for example, when a dedicated editor that can easily use various functions of the printer is provided as an application program with the printer, the dedicated editor must be installed on the personal computer in order to use the dedicated editor. Must-have.
Further, when a dedicated device driver is provided, the dedicated device driver must be installed in the personal computer in the same manner.

もっとも、昨今のセキュリティ意識の高まり等によって、情報システムに管理責任者が設けられるようになり、その管理責任者の許可がなければ、そのパソコンにソフトのインストールができないケースが多くなってきている。このように、パソコンにソフトをインストールすることが気軽にできない状況では、そのパソコンで作成した編集物であっても、そのプリンターの多彩な機能を利用して印刷しようとすれば、そのパソコンにその専用エディタとその専用デバイスドライバーがインストールされていないと、大変に面倒なことであった。   However, due to the recent increase in security awareness, information managers have been established, and there are many cases where software cannot be installed on a personal computer without the permission of the manager. In this way, in situations where it is not easy to install software on a personal computer, even if it is an edited material created on that computer, if you try to print using the various functions of that printer, If the dedicated editor and its dedicated device driver were not installed, it was very troublesome.

特に、そのプリンターが持ち運びに便利なものであれば、その特徴が生かされないので、このような状況は、ユーザー・フレンドリーな製品の一般への浸透が進む現在では、そのユーザーに対し、使い勝手が悪い印象を強く与えてしまう。   In particular, if the printer is convenient to carry, its characteristics will not be utilized, so this situation is inconvenient for the user now that user-friendly products are becoming more popular. It gives a strong impression.

そこで、本発明は、上述した点を鑑みてなされたものであり、アプリケーションプログラムとデバイスドライバーがホストにインストールされなくとも、そのホストからそのアプリケーションプログラムを使用した印刷を可能とし、さらに、アプリケーションプログラムの動作保証が困難な状態でアプリケーションプログラムが動作することを防止し或いは、アプリケーションプログラムで印刷データを作成中に自動的に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることを可能とするプリンターを提供することを課題とする。   Therefore, the present invention has been made in view of the above-described points, and enables printing using the application program from the host even if the application program and the device driver are not installed on the host. Prevents the application program from operating when it is difficult to guarantee the operation, or even if the power is turned off automatically while creating print data in the application program, the print data created just before the power is turned off It is an object to provide a printer that can be reproduced when an application program is restarted.

この課題を解決するために成された請求項1に係る発明は、プリンターであって、USBポートと、通常記憶領域を有するメモリと、前記メモリの通常記憶領域外に置かれ、前記USBポートに接続されたPCに対し、前記メモリ内の通常記憶領域をリムーバブルドライブとして認識させるとともに前記メモリ内の通常記憶領域へのアクセスを管理するための管理テーブルと、前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、アプリケーションプログラムの実行ファイルが記憶された第1のメモリ領域と、前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、前記アプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルが書き込まれる第2のメモリ領域と、前記第2のメモリ領域に書き込まれた命令ファイル内の印刷データに基づいて印刷を行う印刷手段と、前記メモリと前記印刷手段とを制御するプロセッサとを備え、前記プロセッサは、(a)受信した命令ファイルに基づき前記第2のメモリ領域内の命令ファイルを更新し、(b) その更新された命令ファイルを解析して前記印刷データを取り出し、前記アプリケーションプログラムの実行ファイルが前記PCに読み出されて、前記PC上で実行されると、前記アプリケーションプログラムは、以下の制御を実行し、(1)前記メモリの通常記憶領域へ定期的にアクセスし、(2)前記アクセスに失敗したときに、当該アプリケーションプログラム自身を終了する、ことを特徴する。   The invention according to claim 1 to solve this problem is a printer, which is placed in a USB port, a memory having a normal storage area, and a normal storage area of the memory, and is connected to the USB port. A management table for allowing a connected PC to recognize the normal storage area in the memory as a removable drive and managing access to the normal storage area in the memory, and the normal storage area of the memory by the management table And a part of the normal memory area of the memory is assigned by the management table and created by the application program. A second memory area in which an instruction file capable of containing print data is written; A printing unit that performs printing based on print data in the instruction file written in the second memory area; and a processor that controls the memory and the printing unit, wherein the processor receives (a) Update the instruction file in the second memory area based on the instruction file, (b) analyze the updated instruction file to retrieve the print data, and the execution file of the application program is read to the PC When executed on the PC, the application program executes the following control, (1) regularly accesses the normal storage area of the memory, and (2) when the access fails, The application program itself is terminated.

また、請求項2に係る発明は、プリンターであって、USBポートと、通常記憶領域を有するメモリと、前記メモリの通常記憶領域外に置かれ、前記USBポートに接続されるとともにテンポラリフォルダとレジストリを有するPCに対し、前記メモリ内の通常記憶領域をリムーバブルドライブとして認識させるとともに前記メモリ内の通常記憶領域へのアクセスを管理するための管理テーブルと、前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、アプリケーションプログラムの実行ファイルが記憶された第1のメモリ領域と、前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、前記アプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルが書き込まれる第2のメモリ領域と、前記第2のメモリ領域に書き込まれた命令ファイル内の印刷データに基づいて印刷を行う印刷手段と、前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、当該プリンターのステータス情報を含む通知ファイルが書き込まれる第3のメモリ領域と、前記メモリ及び前記印刷手段を制御するプロセッサとを備え、前記プロセッサは、電池の残量が所定量未満になったときから所定時間後に前記電池からの電力供給をオフにする自動電源オフ処理を行い、前記プロセッサは、(a)受信した命令ファイルに基づき前記第2のメモリ領域内の命令ファイルを更新し、(b) その更新された命令ファイルを解析して前記印刷データを取り出し、前記アプリケーションプログラムの実行ファイルが前記PCに読み出されて、前記PC上で実行されると、前記アプリケーションプログラムは、前記通知ファイルを検出後は、以下の制御を実行し、(1)前記ステータス情報として前記自動電源オフ処理が開始した旨の情報が前記通知ファイルに含まれているか否かを判断し、(2)前記自動電源オフ処理が開始した旨の情報が前記通知ファイルに含まれていると判断した場合には、(2−1)前記テンポラリフォルダに前記印刷データをバックアップ印刷データとして記憶し、(2−2)前記アプリケーションプログラムが前記PCに次回読み出されて実行されるときに前記テンポラリフォルダから前記バックアップ印刷データを読み出す次回起動時読出情報を、前記レジストリに記憶する、ことを特徴する。   The invention according to claim 2 is a printer, which is a USB port, a memory having a normal storage area, and is placed outside the normal storage area of the memory, connected to the USB port, and a temporary folder and registry. A management table for recognizing the normal storage area in the memory as a removable drive and managing access to the normal storage area in the memory, and the management table in the normal storage area of the memory And a part of the normal storage area of the memory is assigned by the management table and created by the application program. An instruction file that can contain print data is written 2 memory area, printing means for printing based on the print data in the instruction file written in the second memory area, and a part of the normal storage area of the memory by the management table. A third memory area in which a notification file including status information of the printer is written, and a processor that controls the memory and the printing unit, and the processor is configured to output a remaining battery level less than a predetermined amount. The automatic power-off process is performed to turn off the power supply from the battery after a predetermined time, and the processor (a) updates the instruction file in the second memory area based on the received instruction file, and (b ) Analyzing the updated command file and retrieving the print data, the execution file of the application program is stored in the PC When it is read and executed on the PC, the application program executes the following control after detecting the notification file, and (1) that the automatic power-off process has started as the status information. Is determined to be included in the notification file. (2) When it is determined that the information indicating that the automatic power-off process has started is included in the notification file, (2- 1) Store the print data in the temporary folder as backup print data, and (2-2) read the backup print data from the temporary folder the next time the application program is read and executed by the PC. Read-out information at startup is stored in the registry.

また、請求項3に係る発明は、請求項2に記載するプリンターであって、前記アプリケーションプログラムは、以下の(I)〜(V)の制御を実行することにより、前記(1)〜(2)の制御を実現し、(I)前記通知ファイルを受信した際に、前記ステータス情報として前記自動電源オフ処理が開始した旨の情報が前記通知ファイルに含まれていると判断すれば、前記PCに「継続」・「保存して終了」・「終了」の選択肢を表示し、(II)前記選択肢のうち「継続」をユーザーが選択したと判断すれば、前記自動電源オフ処理を解除する旨の制御命令を当該プリンターへ送信し、(III)前記選択肢のうち「保存して終了」をユーザーが選択したと判断すれば、ファイル保存ダイアログを表示し、(IV)前記選択肢のうち「終了」をユーザーが選択したと判断すれば、当該アプリケーションプログラム自身を終了し、(V)前記3つの選択肢の処理が正常終了すれば、(V−1)前記テンポラリフォルダから前記バックアップ印刷データを削除し、(V−2)前記レジストリから前記次回起動時読出情報を削除する、
ことを特徴する。
According to a third aspect of the present invention, in the printer according to the second aspect, the application program executes the following controls (I) to (V), whereby the (1) to (2) And (I) when the notification file is received, if it is determined that the notification file includes information indicating that the automatic power-off process has started as the status information, the PC "Continue", "Save and exit", and "Exit" options are displayed on the screen. (II) If it is determined that the user has selected "Continue" among the above options, the automatic power-off process is canceled. (III) If it is determined that the user has selected “Save and Exit” among the options, a file save dialog is displayed, and (IV) “End” is selected among the options. The user If it is determined that the application program itself has been selected, the application program itself is terminated. (V) If the processing of the three options is completed normally, (V-1) the backup print data is deleted from the temporary folder, and (V -2) Delete the read information at the next startup from the registry,
It is characterized by that.

また、請求項4に係る発明は、請求項3に記載するプリンターであって、前記アプリケーションプログラムは、以下の(VI)〜(VII)の制御を実行し、(VI)ユーザーが前記選択肢のうち「保存して終了」を選択した後にファイル保存ダイアログをキャンセルしたと判断すれば、前記自動電源オフ処理を解除する旨の制御命令を当該プリンターへ送信し、(VI)前記選択肢のうち「継続」・「保存して終了」・「終了」のいずれもユーザーが選択することなく、前記(I)から前記所定時間が経過し、当該プリンターで前記電池からの電力供給がオフされる直前に当該アプリケーションプログラム自身を終了する、ことを特徴する。   The invention according to claim 4 is the printer according to claim 3, wherein the application program executes the following controls (VI) to (VII), and (VI) the user selects among the options. If it is determined that the file save dialog has been canceled after selecting “Save and Exit”, a control command for canceling the automatic power-off process is transmitted to the printer, and (VI) “Continue” is selected from the above options. -"Save and exit" and "Exit" are not selected by the user, and the application is executed immediately before the predetermined time has elapsed from (I) and the power supply from the battery is turned off by the printer. It is characterized by terminating the program itself.

また、請求項5に係る発明は、請求項2に記載するプリンターであって、前記アプリケーションプログラムは、以下の(i)〜(ii)の制御を実行することにより、前記(1)〜(2)の制御を実現し、(i)前記命令ファイルを印刷開始命令を含ませた状態で当該プリンターに送信するときに、(i−1)前記テンポラリフォルダに前記印刷データをバックアップ印刷データとして記憶し、(i−2)前記アプリケーションプログラムが前記PCに次回読み出されて実行されたときに前記バックアップ印刷データを前記テンポラリフォルダから読み出す次回起動時読出情報を、前記レジストリに記憶し、(ii)前記通知ファイルを受信したときに、前記ステータス情報として前記印刷開始命令による印刷が前記印刷手段によって正常に行われた旨の情報が当該受信通知ファイルに含まれていると判断すれば、(ii−1)前記テンポラリフォルダから前記バックアップ印刷データを削除し、(ii−2)前記レジストリから前記次回起動時読出情報を削除する、ことを特徴する。   The invention according to claim 5 is the printer according to claim 2, wherein the application program executes the following controls (i) to (ii), to thereby execute the above (1) to (2). (I) when the command file is transmitted to the printer with the print start command included, (i-1) the print data is stored as backup print data in the temporary folder. (I-2) The next startup read information that reads the backup print data from the temporary folder when the application program is read and executed next time by the PC is stored in the registry, and (ii) the When the notification file is received, printing by the print start command is normally performed by the printing unit as the status information. (Ii-1) delete the backup print data from the temporary folder, and (ii-2) read the next startup from the registry. It is characterized by deleting information.

すなわち、請求項1に係る本発明のプリンターでは、USBポートに接続されたPCに対し、メモリ内の通常記憶領域へのアクセスを管理するための管理テーブルにより、本発明のプリンター(のメモリ内の通常記憶領域)をUSBマス・ストレージ・クラスのデバイスであるリムーバブルドライブとして認識させる。従って、メモリの通常記憶領域内の一部である第1のメモリ領域に記憶されたアプリケーションプログラムの実行ファイルは、PCからの通常のアクセス操作でPCに読み出させることができる。よって、PCにアプリケーションプログラムがインストールされなくとも、そのPCでそのアプリケーションプログラムを実行することが可能となる。   That is, in the printer of the present invention according to claim 1, the management table for managing the access to the normal storage area in the memory for the PC connected to the USB port is used. The normal storage area) is recognized as a removable drive that is a USB mass storage class device. Therefore, the execution file of the application program stored in the first memory area that is a part of the normal storage area of the memory can be read by the PC by a normal access operation from the PC. Therefore, even if the application program is not installed on the PC, the application program can be executed on the PC.

そして、PC上のアプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルは、PCからの通常のアクセスで、メモリの通常記憶領域内の一部である第2のメモリ領域に書き込まれることができる。一方、プロセッサは、メモリの通常記憶領域内の一部である第2のメモリ領域に書き込まれた命令ファイル内の印刷データを取り出して印刷手段に印刷させる。   Then, the instruction file that can include the print data created by the application program on the PC is written to the second memory area that is a part of the normal storage area of the memory by the normal access from the PC. be able to. On the other hand, the processor takes out the print data in the instruction file written in the second memory area, which is a part of the normal storage area of the memory, and causes the printing means to print it.

この点、プロセッサは、PC上のアプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルをPCから受信すると、メモリの通常記憶領域内の一部である第2のメモリ領域内の命令ファイルを更新し、その更新された命令ファイルを解析して印刷データを取り出す。これにより、アプリケーションプログラム及びデバイスドライバーがPCにインストロールされなくても、PCからそのアプリケーションプログラムを使用した印刷を可能とする。   In this regard, when the processor receives from the PC an instruction file that can include print data created by an application program on the PC, the processor stores the instruction in the second memory area that is a part of the normal storage area of the memory. The file is updated, the updated instruction file is analyzed, and the print data is extracted. This enables printing using the application program from the PC even if the application program and device driver are not installed in the PC.

さらに、請求項1に係る本発明のプリンターでは、アプリケーションプログラムがPC上で実行されると、メモリの通常記憶領域へのアクセスが定期的に行われ、そのアクセスに失敗したときにそのアプリケーションプログラムが終了する。この点、その定期的なアクセスの失敗が起きた場合には、例えば、当該プリンターとPCの接続が外れていたり、当該プリンターの電源がオフされていたりすること等が想定され、少なくとも、アプリケーションプログラムの動作保証が困難な状態であると言える。因って、請求項1に係る本発明のプリンターでは、当該プリンターとPCの接続が外れていたり、当該プリンターの電源がオフされていたりした時点等に対して、アプリケーションプログラムの終了時点を同期させることができるので、アプリケーションプログラムの動作保証が困難な状態でアプリケーションプログラムが動作することを防止することが可能である。   Furthermore, in the printer of the present invention according to claim 1, when the application program is executed on the PC, the normal storage area of the memory is periodically accessed, and when the access fails, the application program is finish. In this regard, when the periodic access failure occurs, for example, it is assumed that the printer is disconnected from the PC or that the printer is turned off. It can be said that the operation guarantee is difficult. Therefore, in the printer of the present invention according to claim 1, the end point of the application program is synchronized with the time when the connection between the printer and the PC is disconnected or the power of the printer is turned off. Therefore, it is possible to prevent the application program from operating in a state where it is difficult to guarantee the operation of the application program.

また、請求項2に係る本発明のプリンターでは、USBポートに接続されたPCに対し、メモリ内の通常記憶領域へのアクセスを管理するための管理テーブルにより、本発明のプリンター(のメモリ内の通常記憶領域)をUSBマス・ストレージ・クラスのデバイスであるリムーバブルドライブとして認識させる。従って、メモリの通常記憶領域内の一部である第1のメモリ領域に記憶されたアプリケーションプログラムの実行ファイルは、PCからの通常のアクセス操作でPCに読み出させることができる。よって、PCにアプリケーションプログラムがインストールされなくとも、そのPCでそのアプリケーションプログラムを実行することが可能となる。   Further, in the printer of the present invention according to claim 2, the management table for managing the access to the normal storage area in the memory for the PC connected to the USB port is used. The normal storage area) is recognized as a removable drive that is a USB mass storage class device. Therefore, the execution file of the application program stored in the first memory area that is a part of the normal storage area of the memory can be read by the PC by a normal access operation from the PC. Therefore, even if the application program is not installed on the PC, the application program can be executed on the PC.

そして、PC上のアプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルは、PCからの通常のアクセスで、メモリの通常記憶領域内の一部である第2のメモリ領域に書き込まれることができる。一方、プロセッサは、メモリの通常記憶領域内の一部である第2のメモリ領域に書き込まれた命令ファイル内の印刷データを取り出して印刷手段に印刷させる。   Then, the instruction file that can include the print data created by the application program on the PC is written to the second memory area that is a part of the normal storage area of the memory by the normal access from the PC. be able to. On the other hand, the processor takes out the print data in the instruction file written in the second memory area, which is a part of the normal storage area of the memory, and causes the printing means to print it.

この点、プロセッサは、PC上のアプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルをPCから受信すると、メモリの通常記憶領域内の一部である第2のメモリ領域内の命令ファイルを更新し、その更新された命令ファイルを解析して印刷データを取り出す。これにより、アプリケーションプログラム及びデバイスドライバーがPCにインストロールされなくても、PCからそのアプリケーションプログラムを使用した印刷を可能とする。   In this regard, when the processor receives from the PC an instruction file that can include print data created by an application program on the PC, the processor stores the instruction in the second memory area that is a part of the normal storage area of the memory. The file is updated, the updated instruction file is analyzed, and the print data is extracted. This enables printing using the application program from the PC even if the application program and device driver are not installed in the PC.

また、請求項2に係る本発明のプリンターでは、USBマス・ストレージ・クラスのデバイスであるリムーバブルドライブとしてPCが認識している本発明のプリンターのメモリ内の通常記憶領域内の一部を、本発明のプリンターのステータス情報を含む通知ファイルが書き込まれる第3のメモリ領域としている。従って、メモリの通常記憶領域内の一部である第3のメモリ領域に書き込まれた通知ファイルは、PCからの通常のアクセスで、そのPCに読み出される。よって、本発明のプリンターの動作状況をPCに知らせることができる。   In the printer of the present invention according to claim 2, a part of the normal storage area in the memory of the printer of the present invention recognized by the PC as a removable drive that is a USB mass storage class device is stored in the printer. A third memory area in which a notification file including printer status information is written is provided. Therefore, the notification file written in the third memory area which is a part of the normal storage area of the memory is read to the PC by normal access from the PC. Therefore, the operation status of the printer of the present invention can be notified to the PC.

さらに、請求項2に係る本発明のプリンターでは、アプリケーションプログラムがPC上で実行されると、PC側において、当該プリンターのステータス情報を含む通知ファイルが検出された後に、そのステータス情報として自動電源オフ処理が開始した旨の情報がその通知ファイルに含まれているか否かが判断される。このとき、自動電源オフ処理が開始した旨の情報がその通知ファイルに含まれている場合には、PC側において、テンポラリフォルダに印刷データがバックアップ印刷データとして記憶され、レジストリに次回起動時読出情報が記憶される。   Furthermore, in the printer of the present invention according to claim 2, when the application program is executed on the PC, after the notification file including the status information of the printer is detected on the PC side, the automatic power off is performed as the status information. It is determined whether or not information indicating that processing has started is included in the notification file. At this time, if the notification file includes information indicating that the automatic power-off process has started, the print data is stored as backup print data in the temporary folder on the PC side, and the read information at the next start-up is stored in the registry. Is memorized.

従って、アプリケーションプログラムがPCに次回読み出されて実行されるときは、このレジストリに記憶された次回起動時読出情報に因って、テンポラリフォルダからバックアップ印刷データが読み出される。従って、アプリケーションプログラムで印刷データを作成中に自動的に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。   Therefore, when the application program is read and executed next time by the PC, the backup print data is read from the temporary folder based on the next startup read information stored in the registry. Therefore, even if the power is automatically turned off while creating the print data in the application program, the print data created immediately before the power is turned off can be reproduced when the application program is restarted.

また、請求項3に係る本発明のプリンターでは、アプリケーションプログラムがPC上で実行され、通知ファイルが受信された際に、ステータス情報として自動電源オフ処理が開始した旨の情報がその通知ファイルに含まれていれば、PCに「継続」・「保存して終了」・「終了」の選択肢が表示される。このとき、その選択肢のうち「継続」をユーザーが選択すれば、自動電源オフ処理を解除する旨の制御命令が当該プリンターに送信される。その選択肢のうち「保存して終了」をユーザーが選択すれば、ファイル保存ダイアログがPCに表示される。その選択肢のうち「終了」をユーザーが選択すれば、アプリケーションプログラムが終了する。因って、ユーザは、当該プリンターが自動的に電源がオフされる以前に、アプリケーションプログラムで印刷データを作成することを延長するかどうかを選択することが可能となる。   In the printer according to the third aspect of the present invention, when the application program is executed on the PC and the notification file is received, the notification file includes information indicating that the automatic power-off process has started as status information. If so, the options “Continue”, “Save and Exit”, and “End” are displayed on the PC. At this time, if the user selects “Continue” from the options, a control command for canceling the automatic power-off process is transmitted to the printer. If the user selects “save and exit” from the options, a file save dialog is displayed on the PC. If the user selects “Exit” from among the options, the application program ends. Therefore, the user can select whether to extend the creation of print data by the application program before the printer is automatically turned off.

さらに、PC側において、その3つの選択肢の処理が正常終了すれば、テンポラリフォルダからバックアップ印刷データが削除され、レジストリから次回起動時読出情報が削除される。因って、その3つの選択肢の処理が正常終了すれば、アプリケーションプログラムがPCに次回読み出されて実行されても、その通知ファイルを受信した際に作成していた印刷データがアプリケーションプログラム再開時に再現されてしまうような不都合は起きない。   Further, if the processing of the three options is normally completed on the PC side, the backup print data is deleted from the temporary folder, and the next startup read information is deleted from the registry. Therefore, if the processing of the three options ends normally, the print data created when the notification file is received will be restored when the application program is resumed even if the application program is read and executed next time by the PC. There is no inconvenience that will be reproduced.

また、請求項4に係る発明のプリンターでは、ユーザーが選択肢のうち「保存して終了」を選択した後にファイル保存ダイアログをキャンセルすれば、自動電源オフ処理を解除する旨の制御命令がPC側から当該プリンターに送信される。因って、ユーザは、当該プリンターが自動的に電源がオフされる際に、ファイル保存ダイアログを表示することを選択しても、その後に、アプリケーションプログラムで印刷データを作成することを延長することを選択することが可能となる。   In the printer of the invention according to claim 4, if the user cancels the file save dialog after selecting “Save and Exit” from the options, a control command for canceling the automatic power-off process is issued from the PC side. Sent to the printer. Therefore, even if the user selects to display a file save dialog when the printer is automatically turned off, the user can extend the creation of print data in the application program after that. Can be selected.

さらに、請求項4に係る発明のプリンターでは、選択肢のうち「継続」・「保存して終了」・「終了」のいずれもユーザーが選択することなく、その選択肢の表示から所定時間が経過すれば、当該プリンターで電池からの電力供給がオフされる直前に当該アプリケーションプログラムが終了する。   Furthermore, in the printer of the invention according to claim 4, if the user does not select any of “Continue”, “Save and Exit”, and “End” among the options, and if a predetermined time elapses from the display of the options The application program ends immediately before the power supply from the battery is turned off in the printer.

この点、請求項4に係る本発明のプリンターでは、上記請求項2に係る本発明のプリンターと同様にして、アプリケーションプログラムで印刷データを作成中に自動的に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。因って、ユーザーがその選択肢に気づかず、自動的に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。   In this respect, in the printer of the present invention according to claim 4, even when the power is automatically turned off during the creation of the print data by the application program, as in the printer of the present invention according to claim 2, Print data created immediately before turning off can be reproduced when the application program is restarted. Therefore, even if the user is not aware of the option and the power is automatically turned off, the print data created immediately before the power is turned off can be reproduced when the application program is restarted.

また、請求項5に係る発明のプリンターでは、命令ファイルが印刷開始命令を含ませた状態でPC側から当該プリンターに送信されるときに、テンポラリフォルダに印刷データがバックアップ印刷データとして記憶され、レジストリに次回起動時読出情報が記憶される。   In the printer of the invention according to claim 5, when the command file includes a print start command and is transmitted from the PC to the printer, the print data is stored in the temporary folder as backup print data, and the registry The read information at the next start-up is stored.

従って、アプリケーションプログラムがPCに次回読み出されて実行されるときは、このレジストリに記憶された次回起動時読出情報に因って、テンポラリフォルダからバックアップ印刷データが読み出される。従って、当該プリンターで印刷データを印刷中に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。   Therefore, when the application program is read and executed next time by the PC, the backup print data is read from the temporary folder based on the next startup read information stored in the registry. Therefore, even if the power is turned off while printing data is being printed by the printer, the print data created immediately before the power is turned off can be reproduced when the application program is restarted.

さらに、請求項5に係る本発明のプリンターでは、アプリケーションプログラムがPC上で実行され、通知ファイルが受信された際に、ステータス情報として印刷開始命令による印刷が印刷手段によって正常に行われた旨の情報をその受信通知ファイルに含んでいれば、テンポラリフォルダからバックアップ印刷データが削除され、レジストリから次回起動時読出情報が削除される。因って、当該プリンターで印刷データが正常に印刷されれば、アプリケーションプログラムがPCに次回読み出されて実行されても、その正常に印刷された印刷データがアプリケーションプログラム再開時に再現されてしまうような不都合は起きない。   Further, in the printer of the present invention according to claim 5, when the application program is executed on the PC and the notification file is received, the printing means that the printing by the print start command is normally performed as the status information. If the information is included in the reception notification file, the backup print data is deleted from the temporary folder, and the read information at the next startup is deleted from the registry. Therefore, if the print data is normally printed by the printer, even if the application program is read and executed next time by the PC, the normally printed print data is reproduced when the application program is restarted. There is no inconvenience.

[1.本発明のシステム構成]
以下、本発明の実施の形態を図面を参照にして説明する。図2は、本発明の一実施形態に係るプリンター1がパソコン111(「PC」に相当するもの)に接続された状態を示したものである。図2に示すように、本実施の形態に係るプリンター1は、USBケーブルLを介して、パソコン111に接続されることによって、印刷システム101を形成する。この点、本実施の形態に係るプリンター1は、印字テープ2に印刷を行う所謂ラベルプリンターであり、机周りに設置できるコンパクトサイズのものであるから、持ち運びが容易である。また、パソコン111は、印刷システム101のホストであり、本体112、ディスプレイ113、キーボード114、及びマウス115等を備えたデスクトップ・コンピュータである。
[1. System configuration of the present invention]
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 2 shows a state in which the printer 1 according to an embodiment of the present invention is connected to a personal computer 111 (corresponding to “PC”). As shown in FIG. 2, the printer 1 according to the present embodiment forms a printing system 101 by being connected to a personal computer 111 via a USB cable L. In this respect, the printer 1 according to the present embodiment is a so-called label printer that performs printing on the printing tape 2 and is a compact printer that can be installed around a desk, and thus is easy to carry. The personal computer 111 is a host of the printing system 101, and is a desktop computer including a main body 112, a display 113, a keyboard 114, a mouse 115, and the like.

尚、パソコン111には、後述する図3に示すように、レジストリ122やテンポラリファイル123が備えられている。   The personal computer 111 includes a registry 122 and a temporary file 123 as shown in FIG.

[2.本発明の内部構成]
次に、本実施の形態に係るプリンター1の内部構成について、図3を参照しつつ説明する。図3は、本実施の形態に係るプリンター1の内部構成を示したブロック図である。
[2. Internal configuration of the present invention]
Next, the internal configuration of the printer 1 according to the present embodiment will be described with reference to FIG. FIG. 3 is a block diagram showing an internal configuration of the printer 1 according to the present embodiment.

図3に示すように、本実施の形態に係るプリンター1では、入出力インターフェース31に対して、操作キー51、ディスプレイコントローラ(以下、「LCDC」という)52、2つの駆動回路54,56、USBポートP及び電源回路61等が接続されている。   As shown in FIG. 3, in the printer 1 according to the present embodiment, an operation key 51, a display controller (hereinafter referred to as “LCDC”) 52, two drive circuits 54 and 56, and a USB are connected to the input / output interface 31. The port P and the power supply circuit 61 are connected.

操作キー51は、ユーザの操作により、所望する様々な動作を起こさせるための制御信号をCPU32に入力させるものである。LCDC52には、LCD53が接続されており、そのLCD53に表示データを表示するための表示用RAMを備えている。駆動回路54は、サーマルヘッド55が接続されており、印字テープ2に印刷データを印刷する際にはそのサーマルヘッド55を駆動するものである。駆動回路56は、テープ送りモータ57が接続されており、印字テープ2を外部に送り出す際にはそのテープ送りモータ57を駆動するものである。   The operation key 51 allows the CPU 32 to input control signals for causing various desired operations according to user operations. An LCD 53 is connected to the LCDC 52, and a display RAM for displaying display data on the LCD 53 is provided. The drive circuit 54 is connected to a thermal head 55 and drives the thermal head 55 when printing data is printed on the print tape 2. The drive circuit 56 is connected to a tape feed motor 57, and drives the tape feed motor 57 when the print tape 2 is fed out.

USBポートPには、USBケーブルLのコネクタCが着脱される。従って、このUSBポートPにUSBケーブルLのコネクタCが差し込まれることによって、本実施の形態に係るプリンター1に対してパソコン111をUSB接続することができる。   The connector C of the USB cable L is attached to and detached from the USB port P. Therefore, by inserting the connector C of the USB cable L into the USB port P, the personal computer 111 can be USB-connected to the printer 1 according to the present embodiment.

電源回路61には、電池62が接続されている。電源回路61は、オン・オフ機能付き電源回路である。電池62は、本実施の形態に係るプリンター1の電源である。CPU32は、電池62の残量をA/D入力を通して常に監視する。電池62の残量が所定量未満になると、自動電源オフ処理を開始する。そのオフ処理の開始から第1所定時間が経過すると、CPU32は、電源回路61をオフし、電池62からの周辺回路部分の電源供給をオフする。ただし、CPU32、ROM33、及びRAM34は電源供給されており、スリープモードに入る。次回のプリンター1の電源キー押下によって、割り込みがかかり、CPU32が起動して、電源回路61をオンする。   A battery 62 is connected to the power supply circuit 61. The power supply circuit 61 is a power supply circuit with an on / off function. The battery 62 is a power source of the printer 1 according to the present embodiment. The CPU 32 constantly monitors the remaining amount of the battery 62 through the A / D input. When the remaining amount of the battery 62 becomes less than the predetermined amount, the automatic power-off process is started. When the first predetermined time has elapsed since the start of the off process, the CPU 32 turns off the power supply circuit 61 and turns off the power supply to the peripheral circuit portion from the battery 62. However, the CPU 32, the ROM 33, and the RAM 34 are supplied with power and enter a sleep mode. The next time the power key of the printer 1 is pressed, an interrupt is generated, the CPU 32 is activated, and the power circuit 61 is turned on.

また、本実施の形態に係るプリンター1では、入出力インターフェース31に対して、CPU32、ROM33、RAM34、及びFLASH・ROM36等が接続されている。   In the printer 1 according to this embodiment, a CPU 32, a ROM 33, a RAM 34, a FLASH / ROM 36, and the like are connected to the input / output interface 31.

CPU32は、後述する各プログラム等を実行するものであって、印刷関係以外の制御プログラムが記憶されるキャッシュメモリ等を内蔵するものである。   The CPU 32 executes each program and the like to be described later, and has a built-in cache memory or the like in which control programs other than those related to printing are stored.

また、CPU32は、下記の制御プログラム37を実行することにより、上記駆動回路54,56等を作動させ、下記の通常記憶領域40に記憶されている印刷データを印字テープ2に印刷しながら、その印字テープ2を外部に排出することができる。従って、2つの駆動回路54,56やサーマルヘッド55やテープ送りモータ57等により、「印刷手段」が構成される。   Further, the CPU 32 executes the following control program 37 to operate the drive circuits 54 and 56 and the like, while printing the print data stored in the normal storage area 40 below on the print tape 2, The printing tape 2 can be discharged outside. Accordingly, the “printing means” is constituted by the two drive circuits 54 and 56, the thermal head 55, the tape feed motor 57, and the like.

また、ROM33には、印刷関係以外の制御プログラム等が記憶されている。RAM34は、種々の制御プログラムをCPU32で実行するときの作業領域を提供する。   In addition, the ROM 33 stores control programs other than those related to printing. The RAM 34 provides a work area when the CPU 32 executes various control programs.

FLASH・ROM36には、印刷関係の制御プログラム37、及び管理テーブル39等が記憶されており、さらに、通常記憶領域40等が設けられている。さらに、通常記憶領域40には、アプリケーションプログラム記憶領域41、命令ファイル配置領域42、通知ファイル配置領域43、及び設定ファイル配置領域44等が設けられている。   The FLASH / ROM 36 stores a print-related control program 37, a management table 39, and the like, and further includes a normal storage area 40 and the like. Further, the normal storage area 40 is provided with an application program storage area 41, an instruction file arrangement area 42, a notification file arrangement area 43, a setting file arrangement area 44, and the like.

管理テーブル39は、FLASH・ROM36内の通常記憶領域40への書き込みをUSB規格で管理するものであって、USBポートPに接続されたパソコン111に対し、FLASH・ROM36内の通常記憶領域40をリムーバブルドライブとして認識させる。   The management table 39 manages writing to the normal storage area 40 in the FLASH / ROM 36 according to the USB standard. The management table 39 stores the normal storage area 40 in the FLASH / ROM 36 for the personal computer 111 connected to the USB port P. Make it recognized as a removable drive.

アプリケーションプログラム記憶領域41は、FLASH・ROM36内の通常記憶領域40の一部が固定的にあてがわれたものであって、アプリケーションプログラムの実行ファイル200(下記図1参照)が記憶されている。尚、アプリケーションプログラムとは、本実施の形態に係るプリンター1の専用エディタとして開発されたソフトウエアである。   In the application program storage area 41, a part of the normal storage area 40 in the FLASH ROM 36 is fixedly assigned, and an application program execution file 200 (see FIG. 1 below) is stored. The application program is software developed as a dedicated editor for the printer 1 according to the present embodiment.

命令ファイル配置領域42とは、FLASH・ROM36内の通常記憶領域40の一部が管理テーブル39によってあてがわれたものであって、命令ファイル202(下記図1参照)が格納される。尚、命令ファイル202(下記図1参照)とは、上記アプリケーションプログラムによって生成されるものであって、印刷命令コマンドを含み、さらに、上記アプリケーションプログラムで作成された印刷データを含むものである。   The instruction file allocation area 42 is a part of the normal storage area 40 in the FLASH ROM 36 assigned by the management table 39, and stores the instruction file 202 (see FIG. 1 below). The command file 202 (see FIG. 1 below) is generated by the application program, includes a print command, and further includes print data created by the application program.

通知ファイル配置領域43とは、FLASH・ROM36内の通常記憶領域40の一部が管理テーブル39によってあてがわれたものであって、通知ファイル203(下記図1参照)が格納される。尚、通知ファイル203(下記図1参照)とは、本実施の形態に係るプリンター1のステータス情報を含むものである。   The notification file arrangement area 43 is a part of the normal storage area 40 in the FLASH / ROM 36 assigned by the management table 39, and stores the notification file 203 (see FIG. 1 below). The notification file 203 (see FIG. 1 below) includes status information of the printer 1 according to the present embodiment.

設定ファイル配置領域44とは、FLASH・ROM36内の通常記憶領域40の一部が管理テーブル39によってあてがわれたものであって、設定ファイル201(下記図1参照)が格納される。尚、設定ファイル201(下記図1参照)とは、上記アプリケーションプログラムによって生成されものであって、上記アプリケーションプログラムでユーザーが設定した使用環境などを示す設定情報を含むものである。   The setting file arrangement area 44 is a part of the normal storage area 40 in the FLASH / ROM 36 assigned by the management table 39, and stores the setting file 201 (see FIG. 1 below). Note that the setting file 201 (see FIG. 1 below) is generated by the application program and includes setting information indicating a use environment set by the user using the application program.

従って、FLASH・ROM36では、管理テーブル39と通常記憶領域40とが、USB規格のマス・ストレージ・エリア45として機能する。   Therefore, in the FLASH ROM 36, the management table 39 and the normal storage area 40 function as a mass storage area 45 of the USB standard.

[3.本発明の動作(その1)]
次に、本実施の形態に係るプリンター1の動作について、図1を参照しつつ説明する。図1は、本実施の形態に係るプリンター1の動作をパソコン111の動作に合わせて制御するプログラムを示したフローチャート図である。そこで、先ず、パソコン111の動作について説明しておく。
[3. Operation of the present invention (part 1)]
Next, the operation of the printer 1 according to the present embodiment will be described with reference to FIG. FIG. 1 is a flowchart showing a program for controlling the operation of the printer 1 according to the present embodiment in accordance with the operation of the personal computer 111. First, the operation of the personal computer 111 will be described.

パソコン111は、本実施の形態に係るプリンター1でUSB接続されると、上述したように、本実施の形態に係るプリンター1のFLASH・ROM36内の通常記憶領域40をリムーバブルドライブとして認識する。   When the personal computer 111 is USB-connected by the printer 1 according to the present embodiment, as described above, the normal storage area 40 in the FLASH / ROM 36 of the printer 1 according to the present embodiment is recognized as a removable drive.

そこで、S10におけるパソコン111では、本実施の形態に係るプリンター1のFLASH・ROM36内の通常記憶領域40の一部があてがわれたアプリケーションプログラム記憶領域41に、ユーザーが通常の操作でアクセスして、そのアプリケーションプログラム記憶領域41に記憶されているアプリケーションプログラムの実行ファイル200を読み出して起動させる。   Therefore, in the personal computer 111 in S10, the user accesses the application program storage area 41 to which a part of the normal storage area 40 in the FLASH / ROM 36 of the printer 1 according to the present embodiment is assigned by a normal operation. The application program execution file 200 stored in the application program storage area 41 is read and activated.

さらに、パソコン111では、S11において、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、本実施の形態に係るプリンター1のFLASH・ROM36内の通常記憶領域40の一部があてがわれた設定ファイル配置領域42から、設定ファイル201を読み出す。その読み出された設定ファイル201に含まれているアプリケーションプログラムの設定情報に基づいて、そのアプリケーションプログラムの使用環境等の設定を行う。   Further, in S11, the personal computer 111 performs the following operation according to the application program. That is, the setting file 201 is read from the setting file arrangement area 42 to which a part of the normal storage area 40 in the FLASH / ROM 36 of the printer 1 according to the present embodiment is assigned. Based on the setting information of the application program included in the read setting file 201, the usage environment of the application program is set.

S12におけるパソコン111では、ユーザーは、そのアプリケーションプログラムである専用エディタを使用して、本実施の形態に係るプリンター1で印刷させるための印刷データを作成する。   In the personal computer 111 in S12, the user creates print data to be printed by the printer 1 according to the present embodiment, using the dedicated editor that is the application program.

S13では、パソコン111は、そのアプリケーションプログラムを終了するか否かを判定する。この判定は、そのアプリケーションプログラムにおけるユーザーの操作に基づく。ここで、そのアプリケーションプログラムを終了する場合には(S13:YES)、下記S19に進む。一方、そのアプリケーションプログラムを続行する場合には(S13:NO)、S14に進む。   In S13, the personal computer 111 determines whether or not to end the application program. This determination is based on a user operation in the application program. If the application program is to be terminated (S13: YES), the process proceeds to S19 below. On the other hand, when the application program is continued (S13: NO), the process proceeds to S14.

S14では、パソコン111は、本実施の形態に係るプリンター1に印刷させるか否かを判定する。この判定も、そのアプリケーションプログラムにおけるユーザーの操作に基づく。ここで、本実施の形態に係るプリンター1に未だ印刷させない場合には(S14:NO)、上記S12に戻る。一方、本実施の形態に係るプリンター1に印刷させる場合には(S14:YES)、S15に進む。   In S14, the personal computer 111 determines whether to cause the printer 1 according to the present embodiment to print. This determination is also based on a user operation in the application program. Here, when the printer 1 according to the present embodiment has not yet been printed (S14: NO), the process returns to S12. On the other hand, when printing is to be performed by the printer 1 according to the present embodiment (S14: YES), the process proceeds to S15.

S15では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、本実施の形態に係るプリンター1に対する印刷命令コマンドや、そのアプリケーションプログラムで作成された印刷データ等を含んだ命令ファイル202を生成する。さらに、その生成された命令ファイル202を本実施の形態に係るプリンター1に送信する。   In S15, the personal computer 111 performs the following operation according to the application program. That is, a command file 202 including a print command command for the printer 1 according to the present embodiment and print data created by the application program is generated. Further, the generated instruction file 202 is transmitted to the printer 1 according to the present embodiment.

S16では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、本実施の形態に係るプリンター1のFLASH・ROM36内の通常記憶領域40の一部があてがわれた通知ファイル配置領域42から、通知ファイル203を読み出す。その後は、S16の2に進む。   In S16, the personal computer 111 performs the following operation according to the application program. That is, the notification file 203 is read from the notification file arrangement area 42 to which a part of the normal storage area 40 in the FLASH / ROM 36 of the printer 1 according to the present embodiment is assigned. Thereafter, the process proceeds to S16-2.

S16の2では、その通知ファイル203の中に印刷エラーのステータス情報があるか否かを判定する。ここで、その通知ファイル203の中に印刷エラーのステータス情報がある場合には(S16の2:YES)、S16の3に進む。S16の3では、印刷エラーの表示をLCD53において行う。その後は、下記S18に進む。   In step S16-2, it is determined whether or not the notification file 203 includes status information indicating a printing error. If there is print error status information in the notification file 203 (S16-2: YES), the process proceeds to S16-3. In step S16-3, a print error is displayed on the LCD 53. Thereafter, the process proceeds to S18 below.

一方、その通知ファイル203の中に印刷エラーのステータス情報がない場合には(S16の2:NO)、S17に進む。   On the other hand, if there is no print error status information in the notification file 203 (S16-2: NO), the process proceeds to S17.

S17では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、上記S16で読み出した通知ファイル203に含まれているステータス情報から検知される本実施の形態に係るプリンター1の状況に基づいて、上記S15で送信した命令ファイル202に含まれている印刷データの印刷が本実施の形態に係るプリンター1で正常に行われて終了したか否かを判定する。ここで、印刷が正常に行われて終了していない場合には(S17:NO)、上記S16に戻る。一方、印刷が正常に行われて終了した場合には(S17:YES)、S18に進む。   In S17, the personal computer 111 performs the following operation according to the application program. That is, based on the status of the printer 1 according to the present embodiment detected from the status information included in the notification file 203 read in S16, the print data included in the command file 202 transmitted in S15. It is determined whether or not printing has been normally completed by the printer 1 according to the present embodiment. If the printing has been normally performed and has not been completed (S17: NO), the process returns to S16. On the other hand, when the printing is normally performed and finished (S17: YES), the process proceeds to S18.

S18では、パソコン111は、そのアプリケーションプログラムを継続するか否かを判定する。この判定は、そのアプリケーションプログラムにおけるユーザーの操作に基づく。ここで、そのアプリケーションプログラムを継続する場合には(S18:YES)、上記S12に戻る。一方、そのアプリケーションプログラムを終了する場合には(S18:NO)、S19に進む。   In S18, the personal computer 111 determines whether or not to continue the application program. This determination is based on a user operation in the application program. If the application program is to be continued (S18: YES), the process returns to S12. On the other hand, when ending the application program (S18: NO), the process proceeds to S19.

S19では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、そのアプリケーションの起動中にユーザーが設定したそのアプリケーションの使用環境などを示す設定情報等を含む設定ファイル201を作成する。さらに、その作成された設定ファイル201を本実施の形態に係るプリンター1に送信する。   In S19, the personal computer 111 performs the following operation according to the application program. That is, the setting file 201 including setting information indicating the use environment of the application set by the user while the application is running is created. Further, the created setting file 201 is transmitted to the printer 1 according to the present embodiment.

S20では、パソコン111は、そのアプリケーションプログラムを終了させ、そのアプリケーションプログラムを削除する。これにより、パソコン111には、そのアプリケーションプログラムが残らない。   In S20, the personal computer 111 terminates the application program and deletes the application program. Thereby, the application program does not remain in the personal computer 111.

一方、本実施形態に係るプリンター1では、パソコン111にUSB接続されると、S101〜S108の各動作を制御するプログラムが実行される。尚、このプログラムは、ROM33に記憶されており、CPU32が自身のキャッシュメモリに読み込んで実行する。   On the other hand, in the printer 1 according to the present embodiment, when the personal computer 111 is connected by USB, a program for controlling each operation of S101 to S108 is executed. This program is stored in the ROM 33, and the CPU 32 reads it into its own cache memory and executes it.

先ず、CPU32は、S101において、パソコン111から命令ファイル202を受信したか否かを判定する。ここで、パソコン111から命令ファイル202を受信していない場合には(S101:NO)、下記S107に進む。一方、パソコン111から命令ファイル202を受信した場合には(S101:YES)、S102に進む。   First, the CPU 32 determines whether or not the command file 202 has been received from the personal computer 111 in S101. If the command file 202 has not been received from the personal computer 111 (S101: NO), the process proceeds to S107 below. On the other hand, when the command file 202 is received from the personal computer 111 (S101: YES), the process proceeds to S102.

S102では、CPU32は、FLASH・ROM36内の通常記憶領域40の一部があてがわれた命令ファイル配置領域42に、その命令ファイル202を上書きで記憶させる。   In S102, the CPU 32 causes the instruction file 202 to be overwritten and stored in the instruction file arrangement area 42 to which a part of the normal storage area 40 in the FLASH ROM 36 is assigned.

S103では、CPU32は、FLASH・ROM36内の通常記憶領域40の一部があてがわれた命令ファイル配置領域42に上書きされた命令ファイル202の解析を行う。この解析では、命令ファイル202に含まれている印刷データが取り出される。   In S <b> 103, the CPU 32 analyzes the instruction file 202 overwritten in the instruction file arrangement area 42 to which a part of the normal storage area 40 in the FLASH / ROM 36 is assigned. In this analysis, print data included in the command file 202 is extracted.

S104では、CPU32は、上記S103で命令ファイル202から取り出された印刷データの印刷を、FLASH・ROM36に記憶されている印刷関係の制御プログラム37に従って行う。このとき、CPU32は、駆動回路54,56等を作動させる。   In S <b> 104, the CPU 32 prints the print data extracted from the instruction file 202 in S <b> 103 according to the print-related control program 37 stored in the FLASH / ROM 36. At this time, the CPU 32 operates the drive circuits 54 and 56 and the like.

S105では、CPU32は、現在の印刷状況を示すステータス情報を含んだ通知ファイル203を作成し、その作成した通知ファイル203をFLASH・ROM36内の通常記憶領域40の一部があてがわれた通知ファイル配置領域43に上書きで記憶する。   In S105, the CPU 32 creates a notification file 203 including status information indicating the current printing status, and the created notification file 203 is assigned to a part of the normal storage area 40 in the FLASH / ROM 36. Store in the arrangement area 43 by overwriting.

S106では、CPU32は、印刷が終了したか否かを判定する。ここで、印刷が終了していない場合には(S106:NO)、上記S105に進む。一方、印刷が終了した場合には(S106:YES)、S107に進む。   In S <b> 106, the CPU 32 determines whether printing has ended. If printing has not been completed (S106: NO), the process proceeds to S105. On the other hand, when printing is completed (S106: YES), the process proceeds to S107.

S107では、CPU32は、パソコン111から設定ファイル201を受信したか否かを判定する。ここで、パソコン111から設定ファイル201を受信していない場合には(S107:NO)、上記S101に戻る。一方、パソコン111から設定ファイル201を受信した場合には(S107:YES)、S108に進む。   In S <b> 107, the CPU 32 determines whether the setting file 201 has been received from the personal computer 111. If the setting file 201 has not been received from the personal computer 111 (S107: NO), the process returns to S101. On the other hand, when the setting file 201 is received from the personal computer 111 (S107: YES), the process proceeds to S108.

S108では、CPU32は、FLASH・ROM36内の通常記憶領域40の一部があてがわれた設定ファイル配置領域44に、その設定ファイル202を上書きで記憶させる。その後、CPU32は、本プログラムを終了する。   In S <b> 108, the CPU 32 stores the setting file 202 by overwriting in the setting file arrangement area 44 to which a part of the normal storage area 40 in the FLASH / ROM 36 is assigned. Thereafter, the CPU 32 ends this program.

[4.本発明の動作(その2)]
また、パソコン111では、上記図1のS11の直後の時点Rにおいて、図8に示す動作が行われる。図8は、パソコン111の動作を制御するプログラムを示したフローチャート図である。
[4. Operation of the present invention (part 2)]
Further, in the personal computer 111, the operation shown in FIG. 8 is performed at a time point R immediately after S11 in FIG. FIG. 8 is a flowchart showing a program for controlling the operation of the personal computer 111.

図8のS61では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、後述する次回起動時読出情報がレジストリ122に記憶されているか否かを判定する。ここで、次回起動時読出情報がレジストリ122に記憶されていない場合には(S61:NO)、上記図1のS12に進む。一方、次回起動時読出情報がレジストリ122に記憶されている場合には(S61:YES)、S62に進む。   In S61 of FIG. 8, the personal computer 111 performs the following operation according to the application program. That is, it is determined whether or not read information at the next startup described later is stored in the registry 122. If the next startup read information is not stored in the registry 122 (S61: NO), the process proceeds to S12 in FIG. On the other hand, when the next startup read information is stored in the registry 122 (S61: YES), the process proceeds to S62.

S62では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、後述するバックアップ印刷データをテンポラリフォルダ123から読み出す。その読み出されたバックアップ印刷データは、そのアプリケーションプログラムである専用エディタにて再現される。その後は、上記図1のS12に進む。   In S62, the personal computer 111 performs the following operation according to the application program. That is, backup print data to be described later is read from the temporary folder 123. The read backup print data is reproduced by a dedicated editor which is the application program. Thereafter, the process proceeds to S12 of FIG.

また、パソコン111では、上記図1のS15の直前の時点Sにおいて、図9に示す動作が行われる。図9は、パソコン111の動作を制御するプログラムを示したフローチャート図である。   Further, in the personal computer 111, the operation shown in FIG. 9 is performed at a time point S immediately before S15 in FIG. FIG. 9 is a flowchart showing a program for controlling the operation of the personal computer 111.

図9のS71では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、そのアプリケーションプログラムで作成された印刷データをバックアップ印刷データとしてテンポラリフォルダ123に記憶する。その後は、S72に進む。   In S71 of FIG. 9, the personal computer 111 performs the following operation according to the application program. That is, the print data created by the application program is stored in the temporary folder 123 as backup print data. Thereafter, the process proceeds to S72.

S72では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、次回起動時読出情報をレジストリ122に記憶する。この次回起動時読出情報には、そのアプリケーションプログラムがパソコン111に次回読み出されて実行されたときに、バックアップ印刷データをテンポラリフォルダ123から読み出す制御命令が含まれている。従って、そのアプリケーションプログラムがパソコン111に次回読み出されて実行されたときに、次回起動時読出情報がレジストリ122に記憶されていれば、バックアップ印刷データがテンポラリフォルダ123から読み出されるように設定される。その後は、上記図1のS15に進む。   In S72, the personal computer 111 performs the following operation according to the application program. That is, the read information at the next startup is stored in the registry 122. The read information at the next startup includes a control command for reading the backup print data from the temporary folder 123 when the application program is read and executed next time by the personal computer 111. Accordingly, when the application program is read and executed next time by the personal computer 111 and the read information at the time of next startup is stored in the registry 122, the backup print data is set to be read from the temporary folder 123. . Thereafter, the process proceeds to S15 of FIG.

また、パソコン111では、上記図1のS17の直後の時点Tにおいて、図10に示す動作が行われる。図10は、パソコン111の動作を制御するプログラムを示したフローチャート図である。   In the personal computer 111, the operation shown in FIG. 10 is performed at a time T immediately after S17 in FIG. FIG. 10 is a flowchart showing a program for controlling the operation of the personal computer 111.

図10のS71では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、バックアップ印刷データをテンポラリフォルダ123から削除する。その後は、S82に進む。   In S71 of FIG. 10, the personal computer 111 performs the following operation according to the application program. That is, the backup print data is deleted from the temporary folder 123. Thereafter, the process proceeds to S82.

S82では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、次回起動時読出情報をレジストリ122から削除する。その後は、上記図1のS18に進む。   In S82, the personal computer 111 performs the following operation according to the application program. That is, the next startup read information is deleted from the registry 122. Thereafter, the process proceeds to S18 of FIG.

[5.本発明の動作(その3)]
図4は、パソコン111の動作を本実施の形態に係るプリンター1の動作に合わせて制御するプログラムを示したフローチャート図である。尚、このプログラムは、そのアプリケーションプログラムによって、上記図1のS10〜S18内のいずれかの時点で定期的な割込処理として行われる。
[5. Operation of the present invention (part 3)]
FIG. 4 is a flowchart showing a program for controlling the operation of the personal computer 111 in accordance with the operation of the printer 1 according to the present embodiment. This program is executed as a periodic interrupt process at any point in S10 to S18 in FIG. 1 by the application program.

図4のS21では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、第2所定時間が経過したか否かを判定する。ここで、第2所定時間を経過した場合に限って(S21:YES)、S22に進む。   In S21 of FIG. 4, the personal computer 111 performs the following operation according to the application program. That is, it is determined whether the second predetermined time has elapsed. Here, only when the second predetermined time has elapsed (S21: YES), the process proceeds to S22.

S22では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、本実施の形態に係るプリンター1のFLASH・ROM36内の通常記憶領域40にアクセスし、その通常記憶領域40に記憶されたいずれかのファイルにアクセスすることを試みる。その後は、S23に進む。   In S22, the personal computer 111 performs the following operation according to the application program. That is, the normal storage area 40 in the FLASH / ROM 36 of the printer 1 according to the present embodiment is accessed, and an attempt is made to access any file stored in the normal storage area 40. Thereafter, the process proceeds to S23.

S23では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、上記S22のアクセスに失敗したか否かを判定する。この判定では、上記S22でアクセスできなかった場合に上記S22のアクセスに失敗したと判定し、上記S22でアクセスできた場合に上記S22のアクセスに失敗しなかったと判定する。   In S23, the personal computer 111 performs the following operation according to the application program. That is, it is determined whether or not the access in S22 has failed. In this determination, it is determined that the access in S22 has failed when access has not been made in S22, and it has been determined that the access in S22 has not failed if access has been made in S22.

ここで、上記S22のアクセスに失敗しなかった場合には(S23:NO)、S24に進む。S24では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、上記S21の判断対象の時間をリセットし、上記S21の判断対象の時間の計時を再スタートさせる。尚、上記S21の判断対象の時間の計時は、上記S10でアプリケーションプログラムの実行ファイル200が起動された際にスタートされる。   If the access in S22 has not failed (S23: NO), the process proceeds to S24. In S24, the personal computer 111 performs the following operation according to the application program. That is, the determination target time in S21 is reset, and the time measurement in S21 is restarted. Note that the time to be determined in S21 is started when the application program execution file 200 is activated in S10.

一方、上記S22のアクセスに失敗した場合には(S23:YES)、S25に進む。S25では、パソコン111は、そのアプリケーションプログラムを終了させ、そのアプリケーションプログラムを削除する。これにより、パソコン111には、そのアプリケーションプログラムが残らない。   On the other hand, if the access in S22 fails (S23: YES), the process proceeds to S25. In S25, the personal computer 111 terminates the application program and deletes the application program. Thereby, the application program does not remain in the personal computer 111.

[6.本発明の動作(その4)]
図5は、パソコン111の動作を本実施の形態に係るプリンター1の動作に合わせて制御するプログラムを示したフローチャート図である。尚、このプログラムのうちパソコン111の動作に関するプログラムは、そのアプリケーションプログラムによって、上記図1のS10〜S18内のいずれかの時点で定期的な割込処理として行われる。また、このプログラムのうち本実施の形態に係るプリンター1の動作に関するプログラムは、上記図1のS108までのいずれかの時点で定期的な割込処理として行われる。
[6. Operation of the present invention (part 4)]
FIG. 5 is a flowchart showing a program for controlling the operation of the personal computer 111 in accordance with the operation of the printer 1 according to the present embodiment. Of these programs, a program relating to the operation of the personal computer 111 is performed as a periodic interrupt process at any point in S10 to S18 in FIG. 1 by the application program. Of these programs, the program relating to the operation of the printer 1 according to the present embodiment is performed as a periodic interrupt process at any point up to S108 in FIG.

先ず、本実施の形態に係るプリンター1の動作について説明する。図5のS111では、CPU32は、電池62の残量が所定量未満であるか否を判定する。この判定は、CPU32によって監視されている電池62の残量に基づいて行われる。ここで、電池62の残量が所定量未満である場合に限って(S111:YES)、S112に進む。   First, the operation of the printer 1 according to the present embodiment will be described. In S111 of FIG. 5, the CPU 32 determines whether or not the remaining amount of the battery 62 is less than a predetermined amount. This determination is made based on the remaining amount of the battery 62 monitored by the CPU 32. Here, only when the remaining amount of the battery 62 is less than the predetermined amount (S111: YES), the process proceeds to S112.

S112では、CPU32は、自動電源オフ処理を開始させる。その後は、S113に進む。   In S112, the CPU 32 starts an automatic power-off process. Thereafter, the process proceeds to S113.

S113では、CPU32は、自動電源オフ処理が開始したことを示すステータス情報を含んだ通知ファイル203を作成し、その作成した通知ファイル203をFLASH・ROM36内の通常記憶領域40の一部があてがわれた通知ファイル配置領域43に上書きで記憶する。   In S113, the CPU 32 creates a notification file 203 including status information indicating that the automatic power-off process has started, and assigns the created notification file 203 to a part of the normal storage area 40 in the FLASH / ROM 36. The notification file placement area 43 is overwritten and stored.

一方、パソコン111では、S31において、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、第3所定時間が経過したか否かを判定する。ここで、第3所定時間を経過した場合に限って(S31:YES)、S32に進む。   On the other hand, the personal computer 111 performs the following operation according to the application program in S31. That is, it is determined whether the third predetermined time has elapsed. Here, only when the third predetermined time has elapsed (S31: YES), the process proceeds to S32.

S32では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、本実施の形態に係るプリンター1のFLASH・ROM36内の通常記憶領域40の一部があてがわれた通知ファイル配置領域42から、通知ファイル203を読み出す。その後は、S33に進む。   In S32, the personal computer 111 performs the following operation according to the application program. That is, the notification file 203 is read from the notification file arrangement area 42 to which a part of the normal storage area 40 in the FLASH / ROM 36 of the printer 1 according to the present embodiment is assigned. Thereafter, the process proceeds to S33.

S33では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、その通知ファイル203に自動電源オフ処理が開始したことを示すステータス情報があるか否かを判定する。ここで、その通知ファイル203に自動電源オフ処理が開始したことを示すステータス情報がない場合には(S33:NO)、S37に進む。   In S33, the personal computer 111 performs the following operation according to the application program. That is, it is determined whether or not the notification file 203 has status information indicating that the automatic power-off process has started. If there is no status information indicating that the automatic power-off process has started in the notification file 203 (S33: NO), the process proceeds to S37.

S37では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、上記S31の判断対象の時間をリセットし、上記S31の判断対象の時間の計時を再スタートさせる。尚、上記S31の判断対象の時間の計時は、上記S10でアプリケーションプログラムの実行ファイル200が起動された際にスタートされる。   In S37, the personal computer 111 performs the following operation according to the application program. That is, the determination target time in S31 is reset, and the measurement of the determination target time in S31 is restarted. Note that the time to be determined in S31 is started when the application program execution file 200 is started in S10.

一方、その通知ファイル203に自動電源オフ処理が開始したことを示すステータス情報がある場合には(S33:YES)、S34に進む。S34では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、そのアプリケーションプログラムで作成中の印刷データをバックアップ印刷データとしてテンポラリフォルダ123に記憶する。その後は、S35に進む。   On the other hand, if the notification file 203 has status information indicating that the automatic power-off process has started (S33: YES), the process proceeds to S34. In S34, the personal computer 111 performs the following operation according to the application program. That is, the print data being created by the application program is stored in the temporary folder 123 as backup print data. Thereafter, the process proceeds to S35.

S35では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、次回起動時読出情報をレジストリ122に記憶する。従って、そのアプリケーションプログラムがパソコン111に次回読み出されて実行されたときに、次回起動時読出情報がレジストリ122に記憶されていれば、バックアップ印刷データがテンポラリフォルダ123から読み出されるように設定される。その後は、S36に進む。   In S35, the personal computer 111 performs the following operation according to the application program. That is, the read information at the next startup is stored in the registry 122. Accordingly, when the application program is read and executed next time by the personal computer 111 and the read information at the time of next startup is stored in the registry 122, the backup print data is set to be read from the temporary folder 123. . Thereafter, the process proceeds to S36.

S36では、パソコン111は、そのアプリケーションプログラムを終了させ、そのアプリケーションプログラムを削除する。これにより、パソコン111には、そのアプリケーションプログラムが残らない。   In S36, the personal computer 111 terminates the application program and deletes the application program. Thereby, the application program does not remain in the personal computer 111.

[7.本発明の動作(その5)]
また、パソコン111は、上記図5のS35の直後の時点Pにおいて、図6に示す動作が行われる。図6は、パソコン111の動作を本実施の形態に係るプリンター1の動作に合わせて制御するプログラムを示したフローチャート図である。
[7. Operation of the present invention (part 5)]
Further, the personal computer 111 performs the operation shown in FIG. 6 at a time point P immediately after S35 in FIG. FIG. 6 is a flowchart showing a program for controlling the operation of the personal computer 111 in accordance with the operation of the printer 1 according to the present embodiment.

図6のS41では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、選択肢の表示を行う。具体的には、図7に示すウィンドウ300をディスプレイ113に表示する。ウィンドウ300には、「継続」、「保存して終了」及び「終了」の各選択ボタン301,302,303が表示される。   In S41 of FIG. 6, the personal computer 111 performs the following operation according to the application program. That is, options are displayed. Specifically, the window 300 shown in FIG. In the window 300, “Continue”, “Save and Exit”, and “Exit” selection buttons 301, 302, and 303 are displayed.

S42では、パソコン111は、ユーザーが「継続」の選択ボタン301を選択したか否かを判定する。この判定は、そのアプリケーションプログラムにおけるユーザーの操作に基づく。   In S <b> 42, the personal computer 111 determines whether or not the user has selected the “continue” selection button 301. This determination is based on a user operation in the application program.

ここで、ユーザーが「継続」の選択ボタン301を選択した場合には(S42:YES)、後述するS51に進む。一方、ユーザーが「継続」の選択ボタン301を選択していない場合には(S42:NO)、S43に進む。S43では、パソコン111は、ユーザーが「保存して終了」の選択ボタン302を選択したか否かを判定する。この判定は、そのアプリケーションプログラムにおけるユーザーの操作に基づく。   If the user selects the “Continue” selection button 301 (S42: YES), the process proceeds to S51 described below. On the other hand, if the user has not selected the “Continue” selection button 301 (S42: NO), the process proceeds to S43. In S <b> 43, the personal computer 111 determines whether or not the user has selected the “save and exit” selection button 302. This determination is based on a user operation in the application program.

ここで、ユーザーが「保存して終了」の選択ボタン302を選択した場合には(S43:YES)、S44に進む。S44では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、ファイル保存ダイアログをディスプレイ113に表示する。これにより、ファイル保存に必要な情報をユーザーに入力させながら、そのアプリケーションプログラムで作成中の印刷データを保存させることができる。その後は、S45に進む。   If the user selects the “save and exit” selection button 302 (S43: YES), the process proceeds to S44. In S44, the personal computer 111 performs the following operation according to the application program. That is, a file save dialog is displayed on the display 113. Thus, the print data being created by the application program can be saved while allowing the user to input information necessary for saving the file. Thereafter, the process proceeds to S45.

S45では、パソコン111は、ユーザーがファイル保存ダイアログをキャンセルしたか否かを判定する。この判定は、そのアプリケーションプログラムにおけるユーザーの操作に基づく。ここで、ユーザーがファイル保存ダイアログをキャンセルしなかった場合には(S45:NO)、後述するS48に進む。一方、ユーザーがファイル保存ダイアログをキャンセルした場合には(S45:YES)、後述するS51に進む。   In S45, the personal computer 111 determines whether or not the user cancels the file save dialog. This determination is based on a user operation in the application program. If the user does not cancel the file save dialog (S45: NO), the process proceeds to S48 described later. On the other hand, when the user cancels the file saving dialog (S45: YES), the process proceeds to S51 described later.

一方、ユーザーが「保存して終了」の選択ボタン302を選択していない場合には(S43:NO)、S46に進む。S46では、パソコン111は、ユーザーが「終了」の選択ボタン303を選択したか否かを判定する。この判定は、そのアプリケーションプログラムにおけるユーザーの操作に基づく。   On the other hand, if the user has not selected the “Save and End” selection button 302 (S43: NO), the process proceeds to S46. In S <b> 46, the personal computer 111 determines whether or not the user has selected the “end” selection button 303. This determination is based on a user operation in the application program.

ここで、ユーザーが「終了」の選択ボタン303を選択した場合には(S46:YES)、後述するS48に進む。一方、ユーザーが「終了」の選択ボタン303を選択していない場合には(S46:NO)、S47に進む。   If the user selects the “END” selection button 303 (S46: YES), the process proceeds to S48 described later. On the other hand, if the user has not selected the “end” selection button 303 (S46: NO), the process proceeds to S47.

S47では、パソコン111は、上記S41の選択肢の表示から第4所定時間が経過したか否かを判定する。尚、この第4所定時間については、上記S41の選択肢の表示からこの第4所定時間が経過しても、上記S112の自動電源オフ処理開始に因って本実施の形態に係るプリンター1の電源がオフされないような時間に予め設定されている。ここで、上記S41の選択肢の表示から第4所定時間が経過していない場合には(S47:NO)、上記S42に戻る。一方、上記S41の選択肢の表示から第4所定時間が経過した場合には(S47:YES)、後述するS50に進む。   In S47, the personal computer 111 determines whether or not a fourth predetermined time has elapsed from the display of the options in S41. As for the fourth predetermined time, the power supply of the printer 1 according to the present embodiment is caused by the start of the automatic power-off process in S112 even after the fourth predetermined time has elapsed from the display of the option in S41. Is preset in such a time that is not turned off. Here, when the fourth predetermined time has not elapsed since the display of the option of S41 (S47: NO), the process returns to S42. On the other hand, when the fourth predetermined time has elapsed from the display of the option in S41 (S47: YES), the process proceeds to S50 described later.

一方、上述したように、ユーザーがファイル保存ダイアログをキャンセルしなかった場合や(S45:NO)、ユーザーが「終了」の選択ボタン303を選択した場合には(S46:YES)には、S48に進む。S48では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、バックアップ印刷データをテンポラリフォルダ123から削除する。その後は、S49に進む。     On the other hand, as described above, when the user does not cancel the file saving dialog (S45: NO), or when the user selects the “end” selection button 303 (S46: YES), the process proceeds to S48. move on. In S48, the personal computer 111 performs the following operation according to the application program. That is, the backup print data is deleted from the temporary folder 123. Thereafter, the process proceeds to S49.

S49では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、次回起動時読出情報をレジストリ122から削除する。その後は、S50に進む。   In S49, the personal computer 111 performs the following operation according to the application program. That is, the next startup read information is deleted from the registry 122. Thereafter, the process proceeds to S50.

S50では、パソコン111は、そのアプリケーションプログラムを終了させ、そのアプリケーションプログラムを削除する。これにより、パソコン111には、そのアプリケーションプログラムが残らない。   In S50, the personal computer 111 terminates the application program and deletes the application program. Thereby, the application program does not remain in the personal computer 111.

一方、上述したように、ユーザーが「継続」の選択ボタン301を選択した場合や(S42:YES)、ユーザーがファイル保存ダイアログをキャンセルした場合には(S45:YES)、S51に進む。S51では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、解除制御命令を本実施の形態に係るプリンター1に送信する。その解除制御命令とは、自動電源オフ処理を解除する命令である。その後は、S52に進む。   On the other hand, as described above, when the user selects the “Continue” selection button 301 (S42: YES) or when the user cancels the file saving dialog (S45: YES), the process proceeds to S51. In S51, the personal computer 111 performs the following operation according to the application program. That is, a release control command is transmitted to the printer 1 according to the present embodiment. The release control command is a command for canceling the automatic power-off process. Thereafter, the process proceeds to S52.

S52では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、バックアップ印刷データをテンポラリフォルダ123から削除する。その後は、S53に進む。   In S52, the personal computer 111 performs the following operations according to the application program. That is, the backup print data is deleted from the temporary folder 123. Thereafter, the process proceeds to S53.

S53では、パソコン111は、そのアプリケーションプログラムによって、以下の動作を行う。すなわち、次回起動時読出情報をレジストリ122から削除する。その後は、上記図5のS37に進む。   In S53, the personal computer 111 performs the following operation according to the application program. That is, the next startup read information is deleted from the registry 122. Thereafter, the process proceeds to S37 in FIG.

これに対して、本実施形態に係るプリンター1では、CPU32は、S121において、解除制御命令を受信したか否かを判定する。ここで、解除制御命令を受信した場合に限って(S121:YES)、S122に進む。S122では、CPU32は、自動電源オフ処理を解除させる。その後は、S123に進む。   On the other hand, in the printer 1 according to the present embodiment, the CPU 32 determines whether or not a release control command is received in S121. Here, only when the release control command is received (S121: YES), the process proceeds to S122. In S122, the CPU 32 cancels the automatic power-off process. Thereafter, the process proceeds to S123.

S123では、CPU32は、自動電源オフ処理が解除したことを示すステータス情報を含んだ通知ファイル203を作成し、その作成した通知ファイル203をFLASH・ROM36内の通常記憶領域40の一部があてがわれた通知ファイル配置領域43に上書きで記憶する。   In S123, the CPU 32 creates a notification file 203 including status information indicating that the automatic power-off process has been canceled, and assigns the created notification file 203 to a part of the normal storage area 40 in the FLASH / ROM 36. The notification file placement area 43 is overwritten and stored.

[8.まとめ]
以上詳細に説明したように、本実施の形態に係るプリンター1は、図3に示すように、FLASH・ROM36内の通常記憶領域40への書き込みをUSB規格で管理する管理テーブル39を、FLASH・ROM36内の通常記憶領域40外に置いている。その管理テーブル39によって、USBポートPに接続されたパソコン111に対し、本実施の形態に係るプリンター1(のFLASH・ROM36内の通常記憶領域40)をUSBマス・ストレージ・クラスのデバイスであるリムーバブルドライブとして認識させている。
[8. Summary]
As described in detail above, as shown in FIG. 3, the printer 1 according to the present embodiment has a management table 39 for managing writing to the normal storage area 40 in the FLASH ROM 36 according to the USB standard. It is placed outside the normal storage area 40 in the ROM 36. The management table 39 allows the personal computer 111 connected to the USB port P to connect the printer 1 according to the present embodiment (the normal storage area 40 in the FLASH ROM 36) as a USB mass storage class device. It is recognized as a drive.

従って、FLASH・ROM36の通常記憶領域40内の一部であるアプリケーションプログラム記憶領域41に記憶されたアプリケーションプログラムの実行ファイル200は、パソコン111におけるユーザーの通常のアクセス操作で、パソコン111に読み出させることができる(S10)。よって、そのアプリケーションプログラムは、パソコン111にインストールされることなく、パソコン111で実行することが可能となる(S10)。   Therefore, the execution file 200 of the application program stored in the application program storage area 41 which is a part of the normal storage area 40 of the FLASH / ROM 36 is read by the personal computer 111 by the user's normal access operation in the personal computer 111. (S10). Therefore, the application program can be executed on the personal computer 111 without being installed on the personal computer 111 (S10).

そして、パソコン111上のアプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイル202は、そのアプリケーションプログラムによって生成され、パソコン111からの通常のアクセスで、FLASH・ROM36の通常記憶領域40内の一部である命令ファイル配置領域42に書き込まれる(S15,S102)。   An instruction file 202 that can include print data created by an application program on the personal computer 111 is generated by the application program and is stored in the normal storage area 40 of the FLASH ROM 36 by normal access from the personal computer 111. Are written in the instruction file placement area 42 which is a part of the file (S15, S102).

一方、CPU32は、FLASH・ROM36の通常記憶領域40内の一部である命令ファイル配置領域42に書き込まれた命令ファイル202内の印刷データを取り出す。CPU32は、その取り出された印刷データを、駆動回路54,56等を作動させることによって、印字テープ2に印刷しながら、その印字テープ2を外部に排出する(S104)。   On the other hand, the CPU 32 takes out the print data in the instruction file 202 written in the instruction file arrangement area 42 which is a part of the normal storage area 40 of the FLASH ROM 36. The CPU 32 ejects the print tape 2 to the outside while printing the extracted print data on the print tape 2 by operating the drive circuits 54, 56 and the like (S104).

この点、CPU32は、パソコン111上のアプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイル202をパソコン111から受信すると(S101:YES)、FLASH・ROM36の通常記憶領域40内の一部である命令ファイル配置領域42に命令ファイル202を上書きして更新し(S102)、その更新された命令ファイル202を解析して印刷データを取り出す(S103)。これにより、アプリケーションプログラム及びデバイスドライバーがパソコン111にインストールされなくても、パソコン111からそのアプリケーションプログラムを使用した印刷が可能となる。   In this regard, when the CPU 32 receives from the personal computer 111 an instruction file 202 that can include print data created by an application program on the personal computer 111 (S101: YES), the CPU 32 stores the command file 202 in the normal storage area 40 of the FLASH ROM 36. The instruction file 202 is overwritten and updated in the instruction file placement area 42 (S102), and the updated instruction file 202 is analyzed and print data is taken out (S103). Thereby, even if the application program and the device driver are not installed in the personal computer 111, printing using the application program from the personal computer 111 becomes possible.

また、本実施の形態に係るプリンター1では、USBマス・ストレージ・クラスのデバイスであるリムーバブルドライブとしてパソコン111が認識している本実施の形態に係るプリンター1のFLASH・ROM36の通常記憶領域40内の一部を、通知ファイル配置領域43としている。その通知ファイル配置領域43には、本実施の形態に係るプリンター1のステータス情報を含む通知ファイル203が書き込まれる。従って、FLASH・ROM36の通常記憶領域40内の一部である通知ファイル配置領域43に書き込まれた通知ファイル203は、パソコン111からの通常のアクセスで、そのパソコン111に読み出される(S16)。よって、本実施の形態に係るプリンター1の動作状況をパソコン111に知らせることができる。   In the printer 1 according to the present embodiment, the PC 111 recognizes the removable drive that is a USB mass storage class device in the normal storage area 40 of the FLASH ROM 36 of the printer 1 according to the present embodiment. Is a notification file placement area 43. In the notification file arrangement area 43, a notification file 203 including status information of the printer 1 according to the present embodiment is written. Accordingly, the notification file 203 written in the notification file arrangement area 43 which is a part of the normal storage area 40 of the FLASH / ROM 36 is read out to the personal computer 111 by normal access from the personal computer 111 (S16). Therefore, it is possible to notify the personal computer 111 of the operation status of the printer 1 according to the present embodiment.

さらに、本実施の形態に係るプリンター1では、アプリケーションプログラムがパソコン111上で実行されると(S10)、本実施の形態に係るプリンター1のFLASH・ROM36の通常記憶領域40へ定期的なアクセスが行われ(S22)、そのアクセスに失敗したときに(S23:YES)、そのアプリケーションプログラムが終了する(S25)。この点、その定期的なアクセスの失敗が起きた場合には(S23:YES)、例えば、本実施の形態に係るプリンター1とパソコン111を接続するUSBケーブルLがUSBポートPから外れていたり、本実施の形態に係るプリンター1の電源がオフされていたりすること等が想定され、少なくとも、そのアプリケーションプログラムの動作保証が困難な状態であると言える。因って、本実施の形態に係るプリンター1では、本実施の形態に係るプリンター1とパソコン111の接続が外れていたり、本実施の形態に係るプリンター1の電源がオフされていたりした時点等に対して、そのアプリケーションプログラムの終了時点を同期させることができるので、そのアプリケーションプログラムの動作保証が困難な状態でそのアプリケーションプログラムが動作することを防止することが可能である。   Further, in the printer 1 according to the present embodiment, when the application program is executed on the personal computer 111 (S10), the regular storage area 40 of the FLASH / ROM 36 of the printer 1 according to the present embodiment is periodically accessed. When the access fails (S23: YES), the application program ends (S25). In this regard, when the periodic access failure occurs (S23: YES), for example, the USB cable L connecting the printer 1 and the personal computer 111 according to the present embodiment is disconnected from the USB port P, It is assumed that the printer 1 according to the present embodiment is powered off, and at least it can be said that it is difficult to guarantee the operation of the application program. Therefore, in the printer 1 according to the present embodiment, when the connection between the printer 1 according to the present embodiment and the personal computer 111 is disconnected, or when the power of the printer 1 according to the present embodiment is turned off, etc. On the other hand, since the end point of the application program can be synchronized, it is possible to prevent the application program from operating in a state where it is difficult to guarantee the operation of the application program.

さらに、本実施の形態に係るプリンター1では、アプリケーションプログラムがパソコン111上で実行されると(S10)、パソコン111側において、本実施の形態に係るプリンター1のステータス情報を含む通知ファイル203が読み出された後に(S32)、その通知ファイル203に自動電源オフ処理が開始したことを示すステータス情報が含まれているか否かが判断される(S33)。ここで、その通知ファイル203に自動電源オフ処理が開始したことを示すステータス情報が含まれている場合には(S33:YES)、そのアプリケーションプログラムで作成中の印刷データがバックアップ印刷データとしてテンポラリフォルダ123に記憶される(S34)。さらに、次回起動時読出情報がレジストリ122に記憶される(S35)。   Further, in the printer 1 according to the present embodiment, when the application program is executed on the personal computer 111 (S10), the notification file 203 including the status information of the printer 1 according to the present embodiment is read on the personal computer 111 side. After being issued (S32), it is determined whether or not the notification file 203 includes status information indicating that the automatic power-off process has started (S33). If the notification file 203 includes status information indicating that the automatic power-off process has started (S33: YES), the print data being created by the application program is stored in the temporary folder as backup print data. 123 (S34). Further, the read information at the next activation is stored in the registry 122 (S35).

従って、本実施の形態に係るプリンター1では、アプリケーションプログラムがパソコン111に次回読み出されて実行されるときは(S10)、このレジストリ122に記憶された次回起動時読出情報に因って(S61:YES)、テンポラリフォルダ133からバックアップ印刷データが読み出される(S62)。従って、アプリケーションプログラムで印刷データを作成中に自動的に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。   Therefore, in the printer 1 according to the present embodiment, when the application program is read and executed next time on the personal computer 111 (S10), it is based on the next-time startup read information stored in the registry 122 (S61). : YES), the backup print data is read from the temporary folder 133 (S62). Therefore, even if the power is automatically turned off while creating the print data in the application program, the print data created immediately before the power is turned off can be reproduced when the application program is restarted.

また、本実施の形態に係るプリンター1では、アプリケーションプログラムがパソコン111上で実行されると(S10)、パソコン111側において、通知ファイル203が読み出された際に(S32)、その通知ファイル203に自動電源オフ処理が開始したことを示すステータス情報が含まれている場合には(S33:YES)、パソコン111のディスプレイ113に「継続」・「保存して終了」・「終了」の各選択ボタン301,302,303を含んだウィンドウ300が表示される(S41)。このとき、自動電源オフ処理によって本実施の形態に係るプリンター1の電源がオフされる以前までに(S47:NO)、パソコン111側において、「継続」・「保存して終了」・「終了」の各選択ボタン301,302,303をユーザーが選択できる。「継続」の選択ボタン301をユーザーが選択すれば(S42:YES)自動電源オフ処理を解除する解除制御命令が本実施の形態に係るプリンター1に送信される(S51)。「保存して終了」の選択ボタン302をユーザーが選択すれば(S43:YES)、ファイル保存ダイアログがパソコン111のディスプレイ113に表示される(S44)。「終了」の選択ボタン303をユーザーが選択すれば(S46:YES)、アプリケーションプログラムが終了する(S50)。因って、本実施の形態に係るプリンター1は、本実施の形態に係るプリンター1が自動的に電源がオフされる以前に、そのアプリケーションプログラムで印刷データを作成することを延長するかどうかを選択することが可能となる。   In the printer 1 according to the present embodiment, when the application program is executed on the personal computer 111 (S10), the notification file 203 is read when the notification file 203 is read on the personal computer 111 side (S32). If the status information indicating that the automatic power-off process has been started is included (S33: YES), “continue”, “save and exit”, and “end” are selected on the display 113 of the personal computer 111. A window 300 including buttons 301, 302, and 303 is displayed (S41). At this time, until the power of the printer 1 according to the present embodiment is turned off by the automatic power-off process (S47: NO), on the personal computer 111 side, “continue”, “save and end”, “end” The selection buttons 301, 302, and 303 can be selected by the user. If the user selects the “Continue” selection button 301 (S42: YES), a release control command for canceling the automatic power-off process is transmitted to the printer 1 according to the present embodiment (S51). If the user selects the “Save and Exit” selection button 302 (S43: YES), a file save dialog is displayed on the display 113 of the personal computer 111 (S44). If the user selects the “END” selection button 303 (S46: YES), the application program ends (S50). Therefore, the printer 1 according to the present embodiment determines whether to extend the creation of print data with the application program before the printer 1 according to the present embodiment is automatically turned off. It becomes possible to select.

さらに、本実施の形態に係るプリンター1では、パソコン111側において、「継続」・「保存して終了」・「終了」の各選択ボタン301,302,303の各処理が正常終了すれば、テンポラリフォルダ123からバックアップ印刷データが削除され(S48)、レジストリ122から次回起動時読出情報が削除される(S49)。因って、「継続」・「保存して終了」・「終了」の各選択ボタン301,302,303の各処理が正常終了すれば、そのアプリケーションプログラムが、パソコン111に次回読み出されて実行されても、その通知ファイル203を受信した際に作成していた印刷データ(S34でバックアップ印刷データとして記憶されたもの)がアプリケーションプログラム再開時に再現されてしまうような不都合は起きない。   Furthermore, in the printer 1 according to the present embodiment, if the processing of the “Continue”, “Save and Exit”, and “Exit” selection buttons 301, 302, and 303 is normally completed on the personal computer 111 side, The backup print data is deleted from the folder 123 (S48), and the read information at the next activation is deleted from the registry 122 (S49). Therefore, if the processing of each of the “Continue”, “Save and Exit”, and “Exit” selection buttons 301, 302, and 303 ends normally, the application program is read to the PC 111 next time and executed. However, there is no inconvenience that the print data created when the notification file 203 is received (stored as backup print data in S34) is reproduced when the application program is restarted.

また、本実施の形態に係るプリンター1では、パソコン111側において、「保存して終了」の選択ボタン302をユーザーが選択した後で(S43:YES)、ファイル保存ダイアログをユーザーがキャンセルすれば(S45:YES)、自動電源オフ処理を解除する解除制御命令が本実施の形態に係るプリンター1に送信される(S51)。因って、ユーザは、本実施の形態に係るプリンター1が自動的に電源がオフされる際に、ファイル保存ダイアログを表示することを選択しても(S43:YES)、その後に、アプリケーションプログラムで印刷データを作成することを延長することを選択することが可能となる。   In the printer 1 according to the present embodiment, after the user selects the “Save and Exit” selection button 302 on the personal computer 111 side (S43: YES), the user cancels the file save dialog ( (S45: YES), a release control command for canceling the automatic power-off process is transmitted to the printer 1 according to the present embodiment (S51). Therefore, even when the user selects to display a file save dialog when the printer 1 according to the present embodiment is automatically turned off (S43: YES), the application program is subsequently displayed. It is possible to select to extend the creation of print data.

さらに、本実施の形態に係るプリンター1では、パソコン111側において、「継続」・「保存して終了」・「終了」の各選択ボタン301,302,303のいずれもユーザーが選択することなく、その各選択ボタン301,302,303の表示から第4所定時間が経過すると(S47:YES)、バックアップ印刷データや次回起動時読出情報が削除されることなく、本実施の形態に係るプリンター1で電池62からの電力供給がオフされる前までに、当該アプリケーションプログラムが終了する(S50)。   Furthermore, in the printer 1 according to the present embodiment, on the personal computer 111 side, none of the “Continue”, “Save and exit”, and “Exit” selection buttons 301, 302, and 303 is selected by the user. When the fourth predetermined time has elapsed from the display of each of the selection buttons 301, 302, and 303 (S47: YES), the printer 1 according to the present embodiment does not delete the backup print data or the next startup read information. The application program ends before the power supply from the battery 62 is turned off (S50).

この点、本実施の形態に係るプリンター1では、上述したように、アプリケーションプログラムで印刷データを作成中に自動的に電源がオフされても、アプリケーションプログラムがパソコン111に次回読み出されて実行されるときは(S10)、レジストリ122に記憶された次回起動時読出情報に因って(S61:YES)、テンポラリフォルダ133からバックアップ印刷データが読み出され(S62)、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。因って、ユーザーが「継続」・「保存して終了」・「終了」の各選択ボタン301,302,303に気づかず、自動的に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。   In this regard, in the printer 1 according to the present embodiment, as described above, even if the power is automatically turned off while the print data is being created by the application program, the application program is next read by the personal computer 111 and executed. (S10), the backup print data is read from the temporary folder 133 (S62) and created immediately before the power is turned off, based on the next startup read information stored in the registry 122 (S61: YES). The print data that has been printed can be reproduced when the application program is restarted. Therefore, even if the power is automatically turned off without being aware of the “Continue”, “Save and Exit”, and “Exit” selection buttons 301, 302, 303, it is created immediately before the power is turned off. The print data that has been printed can be reproduced when the application program is restarted.

また、本実施の形態に係るプリンター1では、パソコン111側において、命令ファイル202を印刷開始命令を含ませた状態で本実施の形態に係るプリンター1に送信する(S15)直前に、そのアプリケーションプログラムで作成中の印刷データがバックアップ印刷データとしてテンポラリフォルダ123に記憶され(S71)、次回起動時読出情報がレジストリ122に記憶される(S72)。   Further, in the printer 1 according to the present embodiment, on the personal computer 111 side, the application program 202 is transmitted immediately before the command file 202 is transmitted to the printer 1 according to the present embodiment with the print start command included (S15). In step S71, the print data being created is stored as backup print data in the temporary folder 123 (S71), and read information at the next startup is stored in the registry 122 (S72).

従って、本実施の形態に係るプリンター1では、アプリケーションプログラムがパソコン111に次回読み出されて実行されるときは(S10)、レジストリ122に記憶された次回起動時読出情報に因って(S61:YES)、テンポラリフォルダ133からバックアップ印刷データが読み出される(S62)。従って、本実施の形態に係るプリンター1で印刷データを印刷中に電源がオフされても、その電源オフの直前に作成していた印刷データをアプリケーションプログラム再開時に再現させることが可能である。   Therefore, in the printer 1 according to the present embodiment, when the application program is read and executed next time by the personal computer 111 (S10), it is based on the next startup read information stored in the registry 122 (S61: YES), the backup print data is read from the temporary folder 133 (S62). Therefore, even if the printer 1 according to the present embodiment is turned off while printing data is being printed, the print data created immediately before the power is turned off can be reproduced when the application program is resumed.

さらに、本実施の形態に係るプリンター1では、アプリケーションプログラムがパソコン111上で実行されると(S10)、パソコン111側において、通知ファイル203が読み出された際に(S16)、その通知ファイル203に含まれているステータス情報から検知される本実施の形態に係るプリンター1の状況に基づいて、上記S15で送信した命令ファイル202に含まれている印刷データの印刷が本実施の形態に係るプリンター1で正常に行われて終了したと判断された場合に(S17:YES)、テンポラリフォルダ123からそのバックアップ印刷データが削除され(S81)、レジストリ122からその次回起動時読出情報が削除される(S82)。因って、本実施の形態に係るプリンター1で印刷データが正常に印刷されれば、アプリケーションプログラムが、パソコン111に次回読み出されて実行されても、その正常に印刷された印刷データ(S71でバックアップ印刷データとして記憶されたもの)がアプリケーションプログラム再開時に再現されてしまうような不都合は起きない。   Furthermore, in the printer 1 according to the present embodiment, when the application program is executed on the personal computer 111 (S10), when the notification file 203 is read on the personal computer 111 side (S16), the notification file 203 is displayed. The printer according to the present embodiment prints the print data included in the command file 202 transmitted at S15 based on the status of the printer 1 according to the present embodiment detected from the status information included in the printer. If it is determined in step 1 that the process has been completed normally (S17: YES), the backup print data is deleted from the temporary folder 123 (S81), and the next startup read information is deleted from the registry 122 (S81). S82). Therefore, if the print data is normally printed by the printer 1 according to the present embodiment, even if the application program is read and executed next time by the personal computer 111, the normally printed print data (S71). In this case, there is no inconvenience that the data stored in the backup print data is reproduced when the application program is restarted.

[9.その他]
尚、本発明は上記実施の形態に限定されるものでなく、その趣旨を逸脱しない範囲で様々な変更が可能である。
例えば、本実施の形態に係るプリンター1は、印字テープ2に印刷を行う所謂ラベルプリンターであったが、ロール状又はシート状の印刷用紙に印刷行うプリンター等であってもよい。
また、レジストリ122に記憶される次回起動時読出情報に代えて、テンポラリフォルダ123に記憶されるバックアップ印刷データの有無に因り、テンポラリフォルダ123からバックアップ印刷データを読み出す又は読み出さないを、アプリケーションプログラムがパソコン111に次回読み出されて実行されるときに判断してもよい。
[9. Others]
In addition, this invention is not limited to the said embodiment, A various change is possible in the range which does not deviate from the meaning.
For example, the printer 1 according to the present embodiment is a so-called label printer that performs printing on the printing tape 2, but may be a printer that performs printing on a roll-shaped or sheet-shaped printing paper.
Further, instead of reading information at the time of next startup stored in the registry 122, the application program may read or not read the backup print data from the temporary folder 123 depending on the presence or absence of the backup print data stored in the temporary folder 123. It may be determined when it is read and executed next time at 111.

また、本実施の形態に係るプリンター1とUSBポートPを介して接続されたパソコン111は、タワー型、オール・イン・ワン型、又はノート型のパソコンや、大型のコンピュータであってもよく、さらに、他のパソコンとLAN等で接続されていてもよい。   Further, the personal computer 111 connected to the printer 1 according to the present embodiment via the USB port P may be a tower type, an all-in-one type, a notebook type personal computer, or a large computer, Further, it may be connected to another personal computer via a LAN or the like.

本発明は、USBを介してホストに接続されたプリンターの制御技術に関する。   The present invention relates to a control technique for a printer connected to a host via a USB.

本発明の一実施の形態に係るプリンターの動作をパソコンの動作に合わせて制御するプログラムを示したフローチャート図である。FIG. 6 is a flowchart showing a program for controlling the operation of the printer according to the embodiment of the present invention in accordance with the operation of the personal computer. 同プリンターがパソコンに接続された状態を示した図である。FIG. 2 is a diagram illustrating a state where the printer is connected to a personal computer. 同プリンターの内部構成を示したブロック図である。FIG. 2 is a block diagram illustrating an internal configuration of the printer. パソコンの動作を同プリンターの動作に合わせて制御するプログラムを示したフローチャート図である。FIG. 6 is a flowchart showing a program for controlling the operation of the personal computer in accordance with the operation of the printer. パソコンの動作を同プリンターの動作に合わせて制御するプログラムを示したフローチャート図である。FIG. 6 is a flowchart showing a program for controlling the operation of the personal computer in accordance with the operation of the printer. パソコンの動作を同プリンターの動作に合わせて制御するプログラムを示したフローチャート図である。FIG. 6 is a flowchart showing a program for controlling the operation of the personal computer in accordance with the operation of the printer. 同プリンターの専用エディタで使用されるウインドウを示した図である。It is the figure which showed the window used with the exclusive editor of the printer. パソコンの動作を制御するプログラムを示したフローチャート図である。It is the flowchart figure which showed the program which controls operation | movement of a personal computer. パソコンの動作を制御するプログラムを示したフローチャート図である。It is the flowchart figure which showed the program which controls operation | movement of a personal computer. パソコンの動作を制御するプログラムを示したフローチャート図である。It is the flowchart figure which showed the program which controls operation | movement of a personal computer.

符号の説明Explanation of symbols

1 プリンター
32 CPU
34 RAM
36 FLASH・ROM
39 管理テーブル
40 通常記憶領域
41 アプリケーションプログラム記憶領域
42 命令ファイル記憶領域
43 通知ファイル配置領域
44 設定ファイル配置領域
45 マス・ストレージ・エリア
54 駆動回路
55 サーマルヘッド
56 駆動回路
57 テープ送りモータ
61 電源回路
62 電池
111 パソコン
122 レジストリ
123 テンポラリフォルダ
200 アプリケーションプログラムの実行ファイル
201 設定ファイル
202 命令ファイル
203 通知ファイル
301 ウインドウ
302 「継続」の選択ボタン
303 「保存して終了」の選択ボタン
303 「終了」ボタン
P USBポート
1 Printer 32 CPU
34 RAM
36 FLASH ROM
39 Management Table 40 Normal Storage Area 41 Application Program Storage Area 42 Instruction File Storage Area 43 Notification File Placement Area 44 Setting File Placement Area 45 Mass Storage Area 54 Drive Circuit 55 Thermal Head 56 Drive Circuit 57 Tape Feed Motor 61 Power Supply Circuit 62 Battery 111 Personal computer 122 Registry 123 Temporary folder 200 Application program execution file 201 Setting file 202 Command file 203 Notification file 301 Window 302 “Continue” selection button 303 “Save and exit” selection button 303 “Exit” button P USB port

Claims (5)

USBポートと、
通常記憶領域を有するメモリと、
前記メモリの通常記憶領域外に置かれ、前記USBポートに接続されたPCに対し、前記メモリ内の通常記憶領域をリムーバブルドライブとして認識させるとともに前記メモリ内の通常記憶領域へのアクセスを管理するための管理テーブルと、
前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、アプリケーションプログラムの実行ファイルが記憶された第1のメモリ領域と、
前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、前記アプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルが書き込まれる第2のメモリ領域と、
前記第2のメモリ領域に書き込まれた命令ファイル内の印刷データに基づいて印刷を行う印刷手段と、
前記メモリと前記印刷手段とを制御するプロセッサとを備え、
前記プロセッサは、
(a)受信した命令ファイルに基づき前記第2のメモリ領域内の命令ファイルを更新し、
(b) その更新された命令ファイルを解析して前記印刷データを取り出し、
前記アプリケーションプログラムの実行ファイルが前記PCに読み出されて、前記PC上で実行されると、前記アプリケーションプログラムは、以下の制御を実行し、
(1)前記メモリの通常記憶領域へ定期的にアクセスし、
(2)前記アクセスに失敗したときに、当該アプリケーションプログラム自身を終了する、
ことを特徴するプリンター。
USB port,
A memory having a normal storage area;
To allow a PC placed outside the normal storage area of the memory and connected to the USB port to recognize the normal storage area in the memory as a removable drive and to manage access to the normal storage area in the memory Management table,
A first memory area in which a part of the normal storage area of the memory is assigned by the management table, and an execution file of an application program is stored;
A second memory area in which a part of the normal storage area of the memory is assigned by the management table, and an instruction file capable of including print data created by the application program is written;
Printing means for performing printing based on print data in the instruction file written in the second memory area;
A processor for controlling the memory and the printing means;
The processor is
(A) updating the instruction file in the second memory area based on the received instruction file;
(B) Analyzing the updated command file to retrieve the print data;
When the execution file of the application program is read by the PC and executed on the PC, the application program executes the following control:
(1) Regular access to the normal storage area of the memory,
(2) Terminate the application program itself when the access fails.
A printer characterized by that.
USBポートと、
通常記憶領域を有するメモリと、
前記メモリの通常記憶領域外に置かれ、前記USBポートに接続されるとともにテンポラリフォルダとレジストリを有するPCに対し、前記メモリ内の通常記憶領域をリムーバブルドライブとして認識させるとともに前記メモリ内の通常記憶領域へのアクセスを管理するための管理テーブルと、
前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、アプリケーションプログラムの実行ファイルが記憶された第1のメモリ領域と、
前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、前記アプリケーションプログラムで作成された印刷データを含むことが可能な命令ファイルが書き込まれる第2のメモリ領域と、
前記第2のメモリ領域に書き込まれた命令ファイル内の印刷データに基づいて印刷を行う印刷手段と、
前記管理テーブルによって前記メモリの通常記憶領域内の一部があてがわれ、当該プリンターのステータス情報を含む通知ファイルが書き込まれる第3のメモリ領域と、
前記メモリ及び前記印刷手段を制御するプロセッサとを備え、
前記プロセッサは、電池の残量が所定量未満になったときから所定時間後に前記電池からの電力供給をオフにする自動電源オフ処理を行い、
前記プロセッサは、
(a)受信した命令ファイルに基づき前記第2のメモリ領域内の命令ファイルを更新し、
(b) その更新された命令ファイルを解析して前記印刷データを取り出し、
前記アプリケーションプログラムの実行ファイルが前記PCに読み出されて、前記PC上で実行されると、前記アプリケーションプログラムは、前記通知ファイルを検出後は、以下の制御を実行し、
(1)前記ステータス情報として前記自動電源オフ処理が開始した旨の情報が前記通知ファイルに含まれているか否かを判断し、
(2)前記自動電源オフ処理が開始した旨の情報が前記通知ファイルに含まれていると判断した場合には、
(2−1)前記テンポラリフォルダに前記印刷データをバックアップ印刷データとして記憶し、
(2−2)前記アプリケーションプログラムが前記PCに次回読み出されて実行されるときに前記テンポラリフォルダから前記バックアップ印刷データを読み出す次回起動時読出情報を、前記レジストリに記憶する、
ことを特徴するプリンター。
USB port,
A memory having a normal storage area;
A normal storage area in the memory, which is placed outside the normal storage area of the memory, connected to the USB port and having a temporary folder and registry, recognizes the normal storage area in the memory as a removable drive. A management table to manage access to
A first memory area in which a part of the normal storage area of the memory is assigned by the management table, and an execution file of an application program is stored;
A second memory area in which a part of the normal storage area of the memory is assigned by the management table, and an instruction file capable of including print data created by the application program is written;
Printing means for performing printing based on print data in the instruction file written in the second memory area;
A third memory area in which a part of the normal storage area of the memory is assigned by the management table, and a notification file including status information of the printer is written;
A processor for controlling the memory and the printing means,
The processor performs an automatic power-off process to turn off the power supply from the battery after a predetermined time from when the remaining amount of the battery becomes less than a predetermined amount,
The processor is
(A) updating the instruction file in the second memory area based on the received instruction file;
(B) Analyzing the updated command file to retrieve the print data;
When the execution file of the application program is read by the PC and executed on the PC, the application program executes the following control after detecting the notification file,
(1) It is determined whether or not information indicating that the automatic power-off process has started is included in the notification file as the status information;
(2) If it is determined that the information that the automatic power-off process has started is included in the notification file,
(2-1) storing the print data as backup print data in the temporary folder;
(2-2) When the application program is read to the PC next time and executed, the next startup read information for reading the backup print data from the temporary folder is stored in the registry.
A printer characterized by that.
請求項2に記載するプリンターであって、
前記アプリケーションプログラムは、以下の(I)〜(V)の制御を実行することにより、前記(1)〜(2)の制御を実現し、
(I)前記通知ファイルを受信した際に、前記ステータス情報として前記自動電源オフ処理が開始した旨の情報が前記通知ファイルに含まれていると判断すれば、前記PCに「継続」・「保存して終了」・「終了」の選択肢を表示し、
(II)前記選択肢のうち「継続」をユーザーが選択したと判断すれば、前記自動電源オフ処理を解除する旨の制御命令を当該プリンターへ送信し、
(III)前記選択肢のうち「保存して終了」をユーザーが選択したと判断すれば、ファイル保存ダイアログを表示し、
(IV)前記選択肢のうち「終了」をユーザーが選択したと判断すれば、当該アプリケーションプログラム自身を終了し、
(V)前記3つの選択肢の処理が正常終了すれば、
(V−1)前記テンポラリフォルダから前記バックアップ印刷データを削除し、
(V−2)前記レジストリから前記次回起動時読出情報を削除する、
ことを特徴するプリンター。
A printer according to claim 2, wherein
The application program realizes the controls (1) to (2) by executing the following controls (I) to (V):
(I) When the notification file is received, if it is determined that the notification file includes information indicating that the automatic power-off process has been started as the status information, “continue” / “store” is stored in the PC. And exit ”and“ Exit ”options.
(II) If it is determined that the user has selected “Continue” among the options, a control command for canceling the automatic power-off process is transmitted to the printer,
(III) If it is determined that the user has selected “Save and Exit” from the above options, a file save dialog is displayed,
(IV) If it is determined that the user has selected “Exit” among the options, the application program itself is terminated,
(V) If the processing of the three options ends normally,
(V-1) deleting the backup print data from the temporary folder,
(V-2) deleting the read information at the next startup from the registry;
A printer characterized by that.
請求項3に記載するプリンターであって、
前記アプリケーションプログラムは、以下の(VI)〜(VII)の制御を実行し、
(VI)ユーザーが前記選択肢のうち「保存して終了」を選択した後にファイル保存ダイアログをキャンセルしたと判断すれば、前記自動電源オフ処理を解除する旨の制御命令を当該プリンターへ送信し、
(VI)前記選択肢のうち「継続」・「保存して終了」・「終了」のいずれもユーザーが選択することなく、前記(I)から前記所定時間が経過し、当該プリンターで前記電池からの電力供給がオフされる直前に当該アプリケーションプログラム自身を終了する、
ことを特徴するプリンター。
A printer according to claim 3,
The application program executes the following controls (VI) to (VII):
(VI) If the user determines that the file save dialog is canceled after selecting “Save and Exit” from among the options, a control command for canceling the automatic power-off process is transmitted to the printer,
(VI) Among the options, “Continue”, “Save and exit”, and “Exit” are not selected by the user, and the predetermined time has elapsed from (I), and the printer Close the application program itself just before the power supply is turned off.
A printer characterized by that.
請求項2に記載するプリンターであって、
前記アプリケーションプログラムは、以下の(i)〜(ii)の制御を実行することにより、前記(1)〜(2)の制御を実現し、
(i)前記命令ファイルを印刷開始命令を含ませた状態で当該プリンターに送信するときに、
(i−1)前記テンポラリフォルダに前記印刷データをバックアップ印刷データとして記憶し、
(i−2)前記アプリケーションプログラムが前記PCに次回読み出されて実行されたときに前記バックアップ印刷データを前記テンポラリフォルダから読み出す次回起動時読出情報を、前記レジストリに記憶し、
(ii)前記通知ファイルを受信したときに、前記ステータス情報として前記印刷開始命令による印刷が前記印刷手段によって正常に行われた旨の情報が当該受信通知ファイルに含まれていると判断すれば、
(ii−1)前記テンポラリフォルダから前記バックアップ印刷データを削除し、
(ii−2)前記レジストリから前記次回起動時読出情報を削除する、
ことを特徴するプリンター。
A printer according to claim 2, wherein
The application program realizes the controls (1) to (2) by executing the following controls (i) to (ii):
(I) When sending the command file to the printer with a print start command included,
(I-1) storing the print data as backup print data in the temporary folder;
(I-2) When the application program is read and executed next time on the PC, the backup print data is read from the temporary folder when the next startup information is stored in the registry.
(Ii) When the notification file is received, if it is determined that the reception information file includes information indicating that the printing according to the print start command has been normally performed by the printing unit as the status information,
(Ii-1) deleting the backup print data from the temporary folder;
(Ii-2) deleting the read information at the next startup from the registry;
A printer characterized by that.
JP2008220797A 2008-02-21 2008-08-29 printer Active JP4577433B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2008220797A JP4577433B2 (en) 2008-08-29 2008-08-29 printer
US12/378,554 US8289548B2 (en) 2008-02-21 2009-02-17 Printer having first and second memory regions and non-transitory computer-readable recording medium storing control program of printer
EP09002263.3A EP2093660B1 (en) 2008-02-21 2009-02-18 Printer and computer-readable recording medium
CN2009100047312A CN101515222B (en) 2008-02-21 2009-02-20 Printer and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008220797A JP4577433B2 (en) 2008-08-29 2008-08-29 printer

Publications (2)

Publication Number Publication Date
JP2010055447A JP2010055447A (en) 2010-03-11
JP4577433B2 true JP4577433B2 (en) 2010-11-10

Family

ID=42071278

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008220797A Active JP4577433B2 (en) 2008-02-21 2008-08-29 printer

Country Status (1)

Country Link
JP (1) JP4577433B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6167711B2 (en) 2013-07-12 2017-07-26 ブラザー工業株式会社 Print processing program
CN112506451B (en) * 2020-12-08 2023-04-07 西安雷风电子科技有限公司 Printer information management toolkit and management method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004302658A (en) * 2003-03-28 2004-10-28 Brother Ind Ltd Information processor, terminal device and program
JP2007034467A (en) * 2005-07-25 2007-02-08 Media Logic:Kk Device controller

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004302658A (en) * 2003-03-28 2004-10-28 Brother Ind Ltd Information processor, terminal device and program
JP2007034467A (en) * 2005-07-25 2007-02-08 Media Logic:Kk Device controller

Also Published As

Publication number Publication date
JP2010055447A (en) 2010-03-11

Similar Documents

Publication Publication Date Title
US8289548B2 (en) Printer having first and second memory regions and non-transitory computer-readable recording medium storing control program of printer
JP5460167B2 (en) Information processing apparatus, control method for information processing apparatus, and control program
JP5264431B2 (en) Information processing apparatus, print control method, and program
JP5025101B2 (en) Image forming apparatus, program, recording medium, control method for image forming apparatus, image forming system, and operation method for image forming system
JP2011161774A (en) Printer and method of controlling the same
US20110051166A1 (en) Image processing device having plurality of control units
JP2007001090A (en) Data backup system for image forming apparatus, image forming apparatus, and data backup method
JP4513849B2 (en) printer
JP4577433B2 (en) printer
US8145857B2 (en) Control of access to an external storage device
JP4544356B2 (en) printer
JP5025514B2 (en) Information processing apparatus, information processing apparatus control method, and computer program
JP6768425B2 (en) Information processing equipment, its control method, and programs
US8380892B2 (en) Apparatus, method and program
JP5596376B2 (en) Peripheral device
TW201431347A (en) Image forming apparatus, and method of connecting with external device thereof
US8432573B2 (en) Printer, dedicated USB flash drive and printing system
JP4899646B2 (en) Image forming system
JP6107231B2 (en) Image processing device
JP5800861B2 (en) Information processing apparatus, control method for information processing apparatus, and control program
JP2009100103A (en) Printing device
JP2007004245A (en) Installation method for software
JP4968224B2 (en) Image reading device
JP5088399B2 (en) Printing system
JP2004127314A (en) Peripheral apparatus control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100715

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

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

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

Free format text: PAYMENT UNTIL: 20130903

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4577433

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150