JP2002182798A - Terminal device - Google Patents

Terminal device

Info

Publication number
JP2002182798A
JP2002182798A JP2000380096A JP2000380096A JP2002182798A JP 2002182798 A JP2002182798 A JP 2002182798A JP 2000380096 A JP2000380096 A JP 2000380096A JP 2000380096 A JP2000380096 A JP 2000380096A JP 2002182798 A JP2002182798 A JP 2002182798A
Authority
JP
Japan
Prior art keywords
command
reader
writer
response
terminal device
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.)
Pending
Application number
JP2000380096A
Other languages
Japanese (ja)
Inventor
Hiroyuki Tanaka
宏之 田中
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2000380096A priority Critical patent/JP2002182798A/en
Publication of JP2002182798A publication Critical patent/JP2002182798A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a terminal device capable of synchronizing with a host device by notifying the host device that an instant service interruption and CPU resetting occur at its early stages. SOLUTION: A reader/writer 30 judges the rightfulness of a command telegraphic message at the time of receiving the command from a PC 20 (ST7). When the command telegraphic message is rightful, a first response flag is next read from a RAM 33 and whether the first response flag is '1' is confirmed (ST9 and 10). When the first response flag is 1, the reader/writer 30 is started and a reader first response showing that the first command is received is subsequently transmitted to the PC 20 (ST11). The value of the first response flag is changed to '0' (ST12). The PC 20 side can discriminate that the reader/ writer 30 receives the first command from the PC after being started from the reader first response.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、上位装置に接続さ
れ上位装置からのコマンドに応じた処理を行う端末装置
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a terminal device which is connected to a host device and performs processing according to a command from the host device.

【0002】[0002]

【従来の技術】上位装置からのコマンドに応じた処理を
行う端末装置としては種々の装置があり、例えば無線タ
グ/無線カードのリーダライタがある。
2. Description of the Related Art There are various types of terminal devices for performing processing according to commands from a host device, such as a reader / writer for a wireless tag / wireless card.

【0003】無線タグ(無線カード)はICカードの機
能にデータの無線通信機能を追加したものであり、無線
タグ自体にメモリを内蔵しているため無線タグ内に情報
を個別に持たせることが出来、流通、運送業における物
品に取り付けた無線タグによる物品管理のみならず、セ
キュリティの面でもリーダライタと無線タグとの間で認
証機能、暗号化などの技術を用いることによって入退室
などのセキュリティ装置、遊技場におけるプリペイドカ
ード装置などにも用いられ始めている。
A wireless tag (wireless card) is a device in which a data wireless communication function is added to the function of an IC card. Since the wireless tag itself has a built-in memory, information can be individually stored in the wireless tag. In addition to the management of goods using wireless tags attached to goods in the distribution, transportation and transportation industries, security such as entering and leaving the room by using technologies such as authentication function and encryption between reader / writer and wireless tag in terms of security. It has begun to be used for devices and prepaid card devices in game arcades.

【0004】また、無線通信を用いているため、リーダ
ライタを介して無線タグのデータ内容の変更、更新など
も非接触状態で随時行うことが出来、かつ、同じ読みと
り範囲内にある無線タグを、タイムスロットを用いたT
DMA(時分割多重)方式でマルチリード方式を用いる
ことにより、一度にまとめて読みとる通称マルチリード
方法に対応した無線タグも存在する。
[0004] Further, since wireless communication is used, data contents of the wireless tag can be changed or updated through a reader / writer in a non-contact state at any time, and a wireless tag within the same reading range can be read. , T using time slots
By using the multi-read method in the DMA (time-division multiplex) method, there is also a wireless tag corresponding to a so-called multi-read method in which reading is performed at one time.

【0005】無線タグシステムでは、上位装置(例えば
パーソナルコンピュータ、以下PCという)、上位装置
からの各コマンド命令によって、送信キャリアのON/
OFF制御、読みとりエリア内に存在する無線タグに対
して、起動、指定エリアへのリード/ライトコマンド命
令を実行する無線タグリーダライタ、そして無線タグ
(無線タグと無線カードの総称)とで構成される。
[0005] In the wireless tag system, an upper device (for example, a personal computer, hereinafter referred to as a PC), and ON / OFF of a transmission carrier are performed by command commands from the upper device.
It is composed of a wireless tag reader / writer that executes an OFF control, a read / write command instruction for a designated area, and a wireless tag existing in a read area, and a wireless tag (general term for a wireless tag and a wireless card). .

【0006】リーダライタと無線タグ間の通信方式の多
くは電磁誘導方式を用いた半二重通信方式であり、上述
した無線タグシステムにおけるリーダライタは特開20
00−187711号公報に示されている。
Most of the communication systems between the reader / writer and the wireless tag are half-duplex communication systems using an electromagnetic induction system.
No. 00-187711.

【0007】無線タグシステムにおいては、上位装置で
あるPCと端末装置であるリーダライタの設置場所など
が異なる場合があり、このような場合には電源が別々に
設置され、リーダライタ側の電源のみが一時的又は瞬間
的に停電となる状況が発生する場合がある。
[0007] In the wireless tag system, there are cases where the installation location of the PC, which is the upper device, and the reader / writer, which is the terminal device, are different. In such a case, the power supply is separately installed, and only the power supply on the reader / writer side There is a case where a power failure occurs temporarily or momentarily.

【0008】また、同様の状況としてノイズなどの影響
でリーダライタ側のCPUが暴走してウォッチドックタ
イマ動作によりCPUがリセットされる場合もある。
In a similar situation, there is a case where the CPU of the reader / writer runs away due to the influence of noise or the like and the CPU is reset by the watchdog timer operation.

【0009】このようにリーダライタにかかる電源が瞬
間停電などによって瞬間的に落ちた場合や、CPUがリ
セットされた場合、無線カードに給電されるべき送信ア
ンテナからの送信キャリアも落ちてしまうため、無線カ
ードは非活性化されてしまう。
As described above, when the power supply to the reader / writer is momentarily dropped due to a momentary power failure, or when the CPU is reset, the transmission carrier from the transmission antenna to be supplied with power to the wireless card also drops. The wireless card will be deactivated.

【0010】また、瞬間停電やCPUリセットなどから
の復帰後、リーダライタは再起動するが、上位装置であ
るPCは端末装置であるリーダライタ並びに無線タグの
状態を把握することができないため、リーダライタの復
帰後直ちに処理を再開することが困難であった。
[0010] In addition, the reader / writer is restarted after returning from a momentary power failure or CPU reset, etc., but the PC as the upper device cannot grasp the status of the reader / writer as the terminal device and the wireless tag. It was difficult to resume processing immediately after the writer returned.

【0011】電源の瞬間停電による処理の停止を防ぐた
めには、リーダライタにバックアップ用の電池を搭載す
る方法が考えられるが、コストの増大、並びに、電池寿
命後の交換処理といった新たなメンテナンス処理が必要
になってしまうという欠点がある。
In order to prevent the processing from being stopped due to an instantaneous power failure of the power supply, a method of mounting a backup battery in the reader / writer is conceivable. However, new maintenance processing such as an increase in cost and replacement processing after the life of the battery is considered. There is a disadvantage that it becomes necessary.

【0012】また、リーダライタがPCからのコマンド
による処理履歴を随時記憶しておき、瞬間停電やCPU
リセットからの復帰後に、リーダライタの状態を処理中
断前の状態まで戻すという方法も考えられる。
Further, the reader / writer stores a processing history according to a command from the PC as needed, so that a momentary power failure or CPU
After returning from the reset, a method of returning the state of the reader / writer to the state before the interruption of the processing is also conceivable.

【0013】しかしながら、この場合、処理履歴を随時
保管する処理、並び、復帰後に処理中断前の状態まで戻
すエラー処理のためリーダライタ側でにおける処理が複
雑化し、又、このための処理速時間が増大化してしまう
という問題がある。
However, in this case, the processing on the reader / writer side becomes complicated due to the processing for storing the processing history as needed, the error processing for returning to the state before the processing interruption after returning, and the processing speed for this is reduced. There is a problem that it increases.

【0014】さらに、復帰後のリーダライタの状態を処
理中断前の状態まで戻す処理を行っている間、リーダラ
イタの処理が上位装置であるPC側の状態に対して独立
した状態となってしまうため、上位装置であるPC側か
らはリーダライタ側の状態を把握できず、上位装置にお
いては処理が中断してしまうという問題もある。
Further, during the process of returning the state of the reader / writer after returning to the state before the interruption of the processing, the processing of the reader / writer becomes independent of the state of the PC which is the host device. Therefore, there is also a problem that the state of the reader / writer cannot be grasped from the PC which is the higher-level device, and the processing is interrupted in the higher-level device.

【0015】従って、端末装置において生じた瞬間停電
やCPUリセットが生じた場合、上位装置に対して端末
装置の状態を早期に通知し、上位装置と端末装置との同
期を得ることが必要とされている。
Therefore, when an instantaneous power failure or CPU reset occurs in the terminal device, it is necessary to notify the host device of the state of the terminal device at an early stage to obtain synchronization between the host device and the terminal device. ing.

【0016】[0016]

【発明が解決しようとする課題】本発明は上述したよう
に、瞬間停電やCPUリセットが生じたことを早期に上
位装置に対して通知することにより、上位装置との同期
を得ることのできる端末装置を提供することにある。
SUMMARY OF THE INVENTION As described above, according to the present invention, a terminal capable of synchronizing with a higher-level device by notifying an upper-level device of an instantaneous power failure or CPU reset at an early stage. It is to provide a device.

【0017】[0017]

【課題を解決するための手段】本発明は上記課題を解決
するために、上位装置に接続され上位装置からのコマン
ドに応じた処理を行う端末装置において、端末装置のリ
セット動作が働いたことを検出する手段と、リセット動
作後に最初上位装置からに受信したコマンドに対して端
末装置がリセットされたことを上位装置に認識させるた
めの特定のレスポンスを上位装置へ返す手段を備える。
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention relates to a terminal device connected to a higher-level device and performing a process according to a command from the higher-level device. A means for detecting, and means for returning a specific response to the higher-level device for causing the higher-level device to recognize that the terminal device has been reset in response to a command first received from the higher-level device after the reset operation.

【0018】[0018]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0019】図1は、本発明の第1の実施例に係る無線
タグリーダライタシステムのシステム構成図であり、無
線タグリーダライタシステムは上位装置であるパーソナ
ルコンピュータ(以下PCという)20、無線タグ1
0、PC20と無線タグ10とのインターフェイス装置
として機能するリーダライタ30とにより構成されてい
る。
FIG. 1 is a system configuration diagram of a wireless tag reader / writer system according to a first embodiment of the present invention. The wireless tag reader / writer system includes a personal computer (hereinafter, referred to as a PC) 20 as a host device and a wireless tag 1.
0, a reader / writer 30 functioning as an interface device between the PC 20 and the wireless tag 10.

【0020】無線タグリーダライタ30は上位装置であ
るパーソナルコンピュータ(以下PCという)20とR
S−232Cケーブルなどの通信ライン31により接続
されており、この通信ラインを通じてPC20は各種コ
マンドを送信し、リーダライタ30は受信したコマンド
に基づいて無線タグ10に対する処理を行う。
The wireless tag reader / writer 30 is connected to a personal computer (hereinafter, referred to as a PC) 20 as an upper-level device.
The PC 20 transmits various commands through the communication line 31 such as an S-232C cable, and the reader / writer 30 performs processing for the wireless tag 10 based on the received command.

【0021】無線タグリーダライタ30はCPU32に
より制御され、処理プログラムを記憶したROM33、
並びに、処理中のデータを一時的に保持するRAM34
を有する。
The wireless tag reader / writer 30 is controlled by the CPU 32 and has a ROM 33 storing a processing program.
And a RAM 34 for temporarily storing data being processed.
Having.

【0022】CPU32には、受信回路35と送信回路
36とが接続されており、送信回路36は送信アンテナ
37を介して無線タグ10に対する送信を行い、受信回
路35は受信アンテナ38を介して無線タグ10から送
信されるデータの受信を行うものである。
A receiving circuit 35 and a transmitting circuit 36 are connected to the CPU 32. The transmitting circuit 36 performs transmission to the wireless tag 10 via a transmitting antenna 37, and the receiving circuit 35 transmits a radio signal via a receiving antenna 38. This is for receiving data transmitted from the tag 10.

【0023】リーダライタ30には停電時においても上
記RAM33を一定微少時間(2〜3秒)バックアップ
するバックアップ電源39が設けられており、このバッ
クアップ電源39としてはコンデンサなどが用いられて
いる。
The reader / writer 30 is provided with a backup power supply 39 for backing up the RAM 33 for a short period of time (2 to 3 seconds) even during a power failure, and a capacitor or the like is used as the backup power supply 39.

【0024】上記リーダライタ30はPC20とは独立
した装置であって、上位装置であるPC20とは別の独
立した電源(V)から電力の供給を受けるものであり、
電源コネクタ40により外部電源(V)に接続される。
The reader / writer 30 is a device independent of the PC 20, and receives power supply from a power source (V) independent of the PC 20 as a host device.
The power supply connector 40 connects to an external power supply (V).

【0025】また、上記リーダライタ30はタイムスロ
ットを用いたTDMA(時分割多重)方式で複数の無線
タグ10から一度にまとめてデータを読みとるマルチリ
ードタイプのものである。
The reader / writer 30 is of a multi-read type for reading data from a plurality of wireless tags 10 at a time by a TDMA (time division multiplex) method using time slots.

【0026】無線タグ10はリーダライタ30の送信ア
ンテナ37から送信されてきた電波を受信するとともに
リーダライタ30の受信アンテナ38に対してデータを
送信するための送受信アンテナ11を有し、送受信アン
テナ11により送信される送信データの変調並びに送受
信アンテナ11で受信した電波の復調を行う変調/復調
回路12が送受信アンテナ11に接続されている。
The wireless tag 10 has a transmitting / receiving antenna 11 for receiving radio waves transmitted from the transmitting antenna 37 of the reader / writer 30 and transmitting data to the receiving antenna 38 of the reader / writer 30. A modulation / demodulation circuit 12 that modulates transmission data transmitted by the transmission / reception and demodulates a radio wave received by the transmission / reception antenna 11 is connected to the transmission / reception antenna 11.

【0027】変調/復調回路12には制御回路13が接
続されていて送受信アンテナ11より受信したコマンド
に基づく処理を行い、かつ、処理結果を変調/復調回路
12に受け渡して送受信アンテナ11から送信する。制
御回路13にはコマンド処理に必要なデータ並びにプロ
グラムを記憶したメモリ14が接続されている。
A control circuit 13 is connected to the modulation / demodulation circuit 12, performs processing based on a command received from the transmission / reception antenna 11, and transfers the processing result to the modulation / demodulation circuit 12 for transmission from the transmission / reception antenna 11. . The control circuit 13 is connected to a memory 14 storing data and programs necessary for command processing.

【0028】無線タグ10は電池を内蔵しておらず、送
受信アンテナ11で受信した電波(送信キャリア)に基
づいて動作電源としての電力を内部的に発生するもので
あり、変調/復調回路12に接続された電源発生装置1
5により動作電源が生成される。
The wireless tag 10 does not have a built-in battery, and internally generates electric power as an operating power supply based on radio waves (transmission carriers) received by the transmission / reception antenna 11. Connected power generator 1
5 generates an operating power supply.

【0029】次に、PC20、リーダライタ30、無線
タグ10の一連の動作の概略を説明する。
Next, an outline of a series of operations of the PC 20, the reader / writer 30, and the wireless tag 10 will be described.

【0030】上位装置であるPC20はリーダライタ3
0に向けて各種コマンドを送信し、これに対して、リー
ダライタ30は送信アンテナ37を介して無線タグに対
して送信キャリアと共に、コマンドを送信する。
The PC 20, which is the host device, is a reader / writer 3
Various commands are transmitted toward 0, and in response, the reader / writer 30 transmits the command to the wireless tag via the transmission antenna 37 together with the transmission carrier.

【0031】無線タグ10は送受信アンテナ11を介し
て受信した送信キャリアによって活性化され、かつ、送
受信アンテナ11を介して受信したコマンドに対する処
理を行い、処理結果をレスポンスとして応答(送信)す
る。
The wireless tag 10 is activated by the transmission carrier received via the transmission / reception antenna 11, performs processing on the command received via the transmission / reception antenna 11, and responds (transmits) the processing result as a response.

【0032】リーダライタ30はこのレスポンスを受信
アンテナ38で受信し、受信回路36による復調を行
い、CPU32は通信ライン31を介してPC20へレ
スポンスとして送信する。
The reader / writer 30 receives this response with the receiving antenna 38 and demodulates the signal by the receiving circuit 36. The CPU 32 transmits the response to the PC 20 via the communication line 31.

【0033】図2は、図1に示したリーダライタ30の
起動時の動作を説明するものである。
FIG. 2 explains the operation at the time of starting the reader / writer 30 shown in FIG.

【0034】リーダライタ30は電源オンによる起動
時、CPU32のリセット処理が開始される。
When the reader / writer 30 is activated by turning on the power, a reset process of the CPU 32 is started.

【0035】このリセット処理においては、CPU32
の入出力ポート等の初期設定が行われる(ST1)。
In this reset processing, the CPU 32
The initial setting of the input / output ports is performed (ST1).

【0036】次に、自己診断としてROM34のチェッ
クサムの確認、RAM33のリードライト確認、RAM
33の初期化等の初期化処理が行われる(ST2)。
Next, as a self-diagnosis, the checksum of the ROM 34 is checked, the read / write of the RAM 33 is checked,
Initialization processing such as initialization of 33 is performed (ST2).

【0037】そして、リーダライタ30のCPU32は
リーダライタ30の初期設定として、PC20からの受
信許可を行う(ST3)。
Then, the CPU 32 of the reader / writer 30 permits reception from the PC 20 as an initial setting of the reader / writer 30 (ST3).

【0038】この後、RAM33の所定領域に初回レス
ポンスフラグとして“1”を設定する(ST4)。
Thereafter, "1" is set as an initial response flag in a predetermined area of the RAM 33 (ST4).

【0039】ここで、この初回レスポンスフラグとは、
リーダライタが、PCからのコマンドを受信した際に、
起動後最初のコマンド受信の状態であるか否かを判定す
るために用いるフラグである。
Here, the initial response flag is:
When the reader / writer receives a command from the PC,
This is a flag used to determine whether or not the state is the first command reception after activation.

【0040】その後、リーダライタはPCからのコマン
ド待ち状態となる(ST5)。
Thereafter, the reader / writer enters a state of waiting for a command from the PC (ST5).

【0041】図3は、図1に示したリーダライタ30の
コマンド処理時の動作を説明するものである。
FIG. 3 illustrates the operation of the reader / writer 30 shown in FIG. 1 during command processing.

【0042】PC20からのコマンドの受信待ち状態で
は、CPU32はコマンドを受信したかどうかを常時チ
ェックしている(ST6)。
While waiting for a command from the PC 20, the CPU 32 constantly checks whether or not a command has been received (ST6).

【0043】そして、PC20よりコマンドを受信した
際には、リーダライタ30のCPU32はコマンド電文
の正当性を判断する(ST7)。
When the command is received from the PC 20, the CPU 32 of the reader / writer 30 determines the validity of the command message (ST7).

【0044】ここで、PC20より送信されるコマンド
並びにPC20に送信されるレスポンスは図4に示すよ
うにプロローグ部、インフォメーション部、エピローグ
部から構成される所定フォーマットの形式を有してお
り、コマンド電文の正当性とは、電文のパリテイチェッ
クの異状の有無やコマンド長の異状の有無等の伝送チェ
ック並びに、そのコマンドがリーダライタ30でサポー
トされたコマンドであるか否かのチェックである。
Here, the command transmitted from the PC 20 and the response transmitted to the PC 20 have a predetermined format including a prologue section, an information section, and an epilogue section as shown in FIG. The validity of this is a transmission check such as the presence or absence of an abnormality in the parity check of the message or the presence or absence of an abnormality in the command length, and a check as to whether the command is a command supported by the reader / writer 30.

【0045】もし、PC20より受信したコマンドに正
当性がないと判断した際には、リーダライタのCPU3
2はエラー種類に応じたエラーレスポンスをPC20に
出力する(ST8)。
If it is determined that the command received from the PC 20 is not valid, the CPU 3 of the reader / writer
2 outputs an error response corresponding to the type of error to the PC 20 (ST8).

【0046】尚、この場合、RAM33中の初回レスポ
ンスフラグ値は変化しない。
In this case, the initial response flag value in the RAM 33 does not change.

【0047】一方、コマンド電文に正当性があると判断
した際には、CPU32は初回レスポンスフラグをRA
M33から読み出す(ST9)。
On the other hand, when determining that the command message is valid, the CPU 32 sets the initial response flag to RA.
Read from M33 (ST9).

【0048】そして、CPU32は初回レスポンスフラ
グが“1”であるか否かを確認する(ST10)。
Then, the CPU 32 checks whether or not the initial response flag is "1" (ST10).

【0049】ここで、初回レスポンスフラグが1の場合
には、リーダライタ30が起動された後、最初のコマン
ドを受信した状態であり、CPU32は初回レスポンス
フラグが1の場合には、リーダ初回レスポンスを送信す
る(ST11)。
Here, when the initial response flag is 1, the first command is received after the reader / writer 30 is activated, and when the initial response flag is 1, the CPU 32 reads the first response. Is transmitted (ST11).

【0050】このリーダ初回レスポンスとしては図4に
示したコマンド/レスポンスフォーマット中のインフォ
メーション部に他のコマンドに対するレスポンスとは全
く異なる“AAAA”が用いられる。
As the first response to the reader, "AAAAA" which is completely different from the response to other commands is used in the information section in the command / response format shown in FIG.

【0051】PC20側ではレスポンス中のインフォメ
ーション部が“AAAA”の場合、リーダライタ30が
起動後にPCからの最初のコマンドを受信した状態であ
ることを識別することが可能となる。
When the information part in the response is "AAAAA", the PC 20 can identify that the reader / writer 30 has received the first command from the PC after the activation.

【0052】上記初回レスポンスの送信(ST11)と
同時、又はその後に、CPU32はRAM33の初回レ
スポンスフラグ値を“O”(“1”以外)に変更し(S
T12)、再び、PCからのコマンド受信待ち状態(S
T5)に戻る。
Simultaneously with or after the transmission of the first response (ST11), the CPU 32 changes the first response flag value of the RAM 33 to "O" (other than "1") (S11).
T12), again waiting for a command from the PC (S12)
Return to T5).

【0053】また、上記確認ステップ(ST10)にお
いて、初回レスポンスフラグが“1”以外の場合には、
CPU32は受信したコマンドに応じた処理を行い(S
T13)、通常のレスポンス処理として当該コマンドの
処理結果をPC20へ送信する(ST14)。
In the above confirmation step (ST10), if the initial response flag is other than "1",
The CPU 32 performs a process according to the received command (S
T13), the processing result of the command is transmitted to the PC 20 as normal response processing (ST14).

【0054】図5は、図1乃至図3にて示したリーダラ
イタ30を使用した無線タグリーダライタシステムにお
ける上位装置20、リーダライタ30、無線タグ10の
間のコマンド/レスポンスの流れと時間の経過の一例を
示すシーケンス図である。
FIG. 5 shows the flow of command / response between the host device 20, the reader / writer 30, and the wireless tag 10 and the passage of time in the wireless tag reader / writer system using the reader / writer 30 shown in FIGS. FIG. 6 is a sequence diagram showing an example of the above.

【0055】尚、図3にて示したフローチャートではリ
ーダライタ起動後PCからの最初のコマンド受信した際
に初回レスポンスを送信することとなっているが、図5
のシーケンス図では、リーダライタ30が起動後PCか
らの最初のコマンドを受信して、初回レスポンスを送信
した後のコマンド処理から説明する。
In the flowchart shown in FIG. 3, the first response is transmitted when the first command is received from the PC after the activation of the reader / writer.
In the sequence diagram of FIG. 7, the command processing after the reader / writer 30 receives the first command from the PC after activation and transmits the first response will be described.

【0056】まず、上位装置20は、送信キャリア開始
コマンドをリーダライタ30に送信し、リーダライタ3
0は当該コマンドに基づき無線タグ10に対する送信キ
ャリア(搬送波)をオン状態とし、その後、正常受信の
レスポンスを上位装置20に送信する。送信キャリアが
ONとなることにより無線タグ10は起動可能状態とさ
れる(状態S1)。
First, the host device 20 transmits a transmission carrier start command to the reader / writer 30, and the
0 turns on a transmission carrier (carrier) for the wireless tag 10 based on the command, and then transmits a response of normal reception to the host device 20. When the transmission carrier is turned on, the wireless tag 10 is set in a startable state (state S1).

【0057】次に、上位装置20はカード起動コマンド
をリーダライタ30に送信し、リーダライタ30は当該
コマンドに基づき、無線タグ10に対するリセット信号
を送信し、このリセット信号に対するカードからの応答
信号を受信することによりその場に無線タグ10が存在
するか否かを判断する。その後、リーダライタ30は起
動正常終了のレスポンスを上位装置20に送信する(状
態S2)。
Next, the host device 20 transmits a card activation command to the reader / writer 30, and the reader / writer 30 transmits a reset signal to the wireless tag 10 based on the command, and transmits a response signal from the card to the reset signal. By receiving the information, it is determined whether or not the wireless tag 10 exists at the place. Thereafter, the reader / writer 30 transmits a response of the normal termination of the startup to the higher-level device 20 (state S2).

【0058】続いて、上位装置20は、カードID読取
りコマンドをリーダライタ30に送信し、リーダライタ
30は当該コマンドに基づきアンチコリジョンコマンド
を無線タグ10に送信し、受信アンテナ38の読みとり
エリアに複数枚ある無線タグ10から少なくとも1枚以
上の無線タグ10のIDを取得する。その後、リーダラ
イタ30は取得した無線タグ10のIDをレスポンスデ
ータとして上位装置20に送信する(状態S3)。
Subsequently, the higher-level device 20 transmits a card ID read command to the reader / writer 30, and the reader / writer 30 transmits an anti-collision command to the wireless tag 10 based on the command, and a plurality of The IDs of at least one wireless tag 10 are obtained from the wireless tags 10. Thereafter, the reader / writer 30 transmits the acquired ID of the wireless tag 10 to the host device 20 as response data (state S3).

【0059】その後、上位装置20は、取得したカード
のIDを用いて、リード若しくはライと処理を行う対象
となるカードを指定するカード指定コマンドをリーダラ
イタ30に送信し、リーダライタ30は当該コマンドを
無線タグ10に送信してリード/ライトアクセスの対象
となる無線タグ(カード)10のIDを指定する。その
後、リーダライタ30は無線タグ(カード)10からの
レスポンスをレスポンスデータとして上位装置20に送
信する。(状態S4)。
Thereafter, using the acquired card ID, the higher-level device 20 transmits to the reader / writer 30 a card designation command for designating a card to be subjected to read / write processing. To the wireless tag 10 to specify the ID of the wireless tag (card) 10 to be read / written. After that, the reader / writer 30 transmits a response from the wireless tag (card) 10 to the host device 20 as response data. (State S4).

【0060】続いて、上位装置20は、カードKEY認
証コマンドをリーダライタ30に送信し、リーダライタ
30は当該コマンドを無線タグ10に送信し、状態S4
において指定された無線タグに対して、リードライトア
クセスの権限確認のためのKEY認証を行わせる。その
後、リーダライタ30は無線タグ(カード)10からの
レスポンスをレスポンスデータとして上位装置20に送
信する(状態S5)。
Subsequently, the higher-level device 20 transmits a card KEY authentication command to the reader / writer 30, and the reader / writer 30 transmits the command to the wireless tag 10, and the state S4
KEY authentication for confirming read / write access authority is performed on the wireless tag specified in the above step. Thereafter, the reader / writer 30 transmits a response from the wireless tag (card) 10 to the host device 20 as response data (state S5).

【0061】ここで、無線タグ10における認証が正常
に終了した場合には、その後の無線タグ10とのリード
ライトアクセス動作が可能になる。
Here, when the authentication in the wireless tag 10 is completed normally, a read / write access operation with the wireless tag 10 becomes possible thereafter.

【0062】そして、上位装置20は、カードデータリ
ードコマンドをリーダライタ30に送信し、リーダライ
タ30は当該コマンドを無線タグ10に送信し、認証済
みの無線タグ10にからリードデータを受信する。
Then, the higher-level device 20 transmits a card data read command to the reader / writer 30, and the reader / writer 30 transmits the command to the wireless tag 10, and receives read data from the authenticated wireless tag 10.

【0063】しかし、上位装置20が、カードデータリ
ードコマンドをリーダライタ30に送信した後にリーダ
ライタ30に対する電源(V)の瞬間停止が生じた場
合、リーダライタ30は動作不能となる。従って、リー
ダライタ30は機能せず、無線タグ(カード)10に対
するコマンド送信処理及び、上位装置20に対するレス
ポンスの送信が成されないこととなる。(状態S6)こ
の場合、リーダライタ30からレスポンスがないため、
上位装置20はコマンドを送信してから予め定義されて
いるタイムアウト時間T2を経過した後、再び、リーダ
ライタに向けてカードデータリードコマンドを送信する
(状態S7)。
However, if the power supply (V) for the reader / writer 30 is momentarily stopped after the host device 20 transmits the card data read command to the reader / writer 30, the reader / writer 30 becomes inoperable. Therefore, the reader / writer 30 does not function, and the command transmission processing to the wireless tag (card) 10 and the transmission of the response to the higher-level device 20 are not performed. (State S6) In this case, since there is no response from the reader / writer 30,
After a predetermined timeout time T2 has elapsed since the transmission of the command, the host device 20 transmits a card data read command again to the reader / writer (state S7).

【0064】一方、リーダライタ30では、リーダライ
タ30における瞬間停電時間Tの経過後、電源Vが復帰
すると再起動し、図2のフローチャートに示したCPU
リセット処理を実行した後、上位装置20からのコマン
ド待ちの状態となる。
On the other hand, the reader / writer 30 is restarted when the power supply V is restored after the elapse of the instantaneous power failure time T in the reader / writer 30, and the CPU shown in the flowchart of FIG.
After executing the reset process, the system is in a state of waiting for a command from the host device 20.

【0065】ここで、電源の瞬間停止の時間をT、リー
ダが再起動に要する時間をT1とするとT2>(T+T
I)の関係が成立すれば、上位装置20のタイムアウト
時間T2を経過してコマンドを再送信した時点で、リー
ダライタ30はコマンド待ちの状態となっていることと
なる。
Here, assuming that the time of the instantaneous stop of the power supply is T and the time required for the reader to restart is T1, T2> (T + T
If the relationship of I) is established, the reader / writer 30 is in a command waiting state at the time when the command is retransmitted after the timeout time T2 of the higher-level device 20 has elapsed.

【0066】リーダライタ30が復帰後にコマンドを受
信した場合、リーダライタ30は図3に示したフローチ
ャートに示したコマンド処理を行う。即ち、コマンド電
文を解析し、その正当性、すなわち、パリティチェッ
ク、コマンド長チェックを実施して、当リーダライタで
サポートされたコマンドであることを判定する。
When the reader / writer 30 receives a command after returning, the reader / writer 30 performs the command processing shown in the flowchart shown in FIG. That is, the command message is analyzed and its validity, that is, a parity check and a command length check are performed, and it is determined that the command is a command supported by the reader / writer.

【0067】従って、送信時のノイズ等により正当性が
ないコマンドに対しては通常時と同じエラーレスポンス
コードを返すまた、この時、リーダライタは、本レスポ
ンスを起動後、最初のコマンドに対するレスポンスとカ
ウントしない。(状態S8)。
Therefore, for a command that is not valid due to noise or the like at the time of transmission, the same error response code is returned as in normal operation. At this time, the reader / writer activates this response, and then returns a response to the first command. Do not count. (State S8).

【0068】一方、カードデータリードコマンドを正常
に受信した場合、すなわち、コマンドの正当性を確認出
来た場合、リーダライタはRAM33の初回レスポンス
フラグを確認し、このレスポンスフラグが1であるた
め、リーダライタ起動後最初のコマンドに対するレスポ
ンスコード(AAAA)を上位装置20へ出力する(状
態S9)。
On the other hand, when the card data read command is normally received, that is, when the validity of the command can be confirmed, the reader / writer checks the initial response flag of the RAM 33, and since this response flag is 1, After the writer is activated, a response code (AAAAA) for the first command is output to the host device 20 (state S9).

【0069】上位装置20は受信したレスポンスコード
がリーダライタ起動後最初のコマンドに対するレスポン
スコード(AAAA)であることにより、リーダライタ
が電源の瞬間停止などの発生等により、リセットしたこ
とを容易に認識し(状態9)、無線タグ(カード)10
を起動状態とするため、状態S1からの処理を再開する
(状態10)。
Since the received response code is the response code (AAAAA) for the first command after the activation of the reader / writer, the host device 20 can easily recognize that the reader / writer has been reset due to an instantaneous stop of the power supply or the like. (State 9), wireless tag (card) 10
Is set to the active state, the processing from the state S1 is restarted (state 10).

【0070】以上説明した第1の実施例では、リーダラ
イタ起動後最初のコマンドに対するレスポンスとして特
定のレスポンスコード(AAAA)を出力することによ
って、上位装置20ではリーダライタ30が電源の瞬間
停止などの発生によりリセットしたことを容易に認識可
能である。
In the first embodiment described above, a specific response code (AAAAA) is output as a response to the first command after the activation of the reader / writer. It can be easily recognized that the reset has occurred due to the occurrence.

【0071】従って、上位装置20側では、コマンドに
対するレスポンスとして特定のレスポンスコード(AA
AA)を追加するのみで良い。
Therefore, on the host device 20 side, a specific response code (AA) is used as a response to the command.
It is only necessary to add AA).

【0072】又、リーダライタ30ではRAM33の初
回レスポンスフラグの記憶ステップ(ST4)並びに確
認ステップ(ST9,10,11)を追加するのみで良
いため、リーダライタ30側の処理を複雑にすること無
く、リーダライタ30が電源の瞬間停止などの発生によ
りリセットしたことを上位装置20に認識させることが
可能となる。
In addition, the reader / writer 30 only needs to add the storage step (ST4) of the initial response flag in the RAM 33 and the confirmation step (ST9, 10, 11), so that the processing on the reader / writer 30 side is not complicated. Then, the host device 20 can recognize that the reader / writer 30 has been reset due to an instantaneous stop of the power supply or the like.

【0073】次に、本発明の第2の実施例を図6及び図
7に基づき説明する。
Next, a second embodiment of the present invention will be described with reference to FIGS.

【0074】図6は、本発明の第2の実施例に係るリー
ダライタ30のリセット処理を説明するためのフローチ
ャートである。
FIG. 6 is a flowchart for explaining the reset processing of the reader / writer 30 according to the second embodiment of the present invention.

【0075】尚、第2の実施例では図1に示した第1の
実施例に係る無線タグリーダライタシステムのシステム
構成と全く同一の構成であり、リーダライタ30のリセ
ット処理が異なるのみであるため、第2の実施例におけ
るリーダライタ30のリセット処理について説明するこ
ととし、他の説明は省略する。
In the second embodiment, the configuration is exactly the same as the system configuration of the wireless tag reader / writer system according to the first embodiment shown in FIG. 1, and only the reset processing of the reader / writer 30 is different. In the following, the reset process of the reader / writer 30 in the second embodiment will be described, and other description will be omitted.

【0076】リーダライタ30は電源ONによる起動
時、又は、ウォッチドッグタイマによるリセットにより
CPU32中のCPUのリセット処理が開始される。
When the reader / writer 30 is activated by turning on the power or by a reset by a watchdog timer, the reset processing of the CPU in the CPU 32 is started.

【0077】このリセット処理においては、まず、CP
U32の入出力ポート等の初期設定が行われる(ST2
1)。
In this reset processing, first, the CP
Initial setting of input / output ports of U32 is performed (ST2).
1).

【0078】CPU32の初期設定を行った後、RAM
33の指定アドレス値をリードする(ST22)。
After the initial setting of the CPU 32, the RAM
The designated address value of 33 is read (ST22).

【0079】このアドレス値のリード値が規定値(OX
AA55H)であるか否かによってリーダライタが通常
起動時か、電源の瞬間停電、又は、ウォッチドッグタイ
マによるリセットなどによる復帰なのかを判断する(S
T23)。
The read value of this address value is the specified value (OX
AA55H), it is determined whether the reader / writer is in a normal start-up, an instantaneous power outage of the power supply, or a return due to a reset by a watchdog timer or the like (S).
T23).

【0080】ここで、RAM33の指定アドレスの期待
値とは、リーダライタが起動された際に書き込まれた値
(OXAA55H)であり、RAM33の指定アドレス
の値が期待値ということはリーダライタが前回起動され
た際の値を保持していることを意味している。
Here, the expected value of the specified address of the RAM 33 is a value (OXAA55H) written when the reader / writer is activated, and the fact that the value of the specified address of the RAM 33 is the expected value means that It means that it retains the value when it was started.

【0081】RAM33はバックアップ電源39により
所定時間は記憶内容が消失しないように保持されている
ため、バックアップ電源39による保証時間範囲内の電
源の瞬間停止やウォッチドッグタイマーによるCPUリ
セット開始時にはRAM33には以前のデータが保持さ
れている。又、バックアップ電源39による保証時間範
囲を超えた時間の電源断の場合にはRAM33には以前
のデータは保持されていない。
The RAM 33 is held by the backup power supply 39 so that the stored contents are not lost for a predetermined period of time. Therefore, when the power supply is momentarily stopped within the guaranteed time range by the backup power supply 39 or when the CPU reset by the watchdog timer is started, the RAM 33 is stored in the RAM 33. Previous data is retained. In the case where the power is cut off for a time exceeding the guaranteed time range by the backup power supply 39, the previous data is not held in the RAM 33.

【0082】従って、RAM33の指定アドレスの値が
期待値であるか否かにより、通常起動時か、又は、電源
の瞬間停電及びウォッチドッグタイマーによるリセット
なのかを判断することが可能となる。
Therefore, it is possible to determine whether the power supply is normally activated or whether the power supply is momentarily shut down or reset by a watchdog timer, depending on whether or not the value of the designated address in the RAM 33 is an expected value.

【0083】従って、このRAM33の指定アドレス値
が規定値(OXAA55H)でない場合、通常起動と判
断し、自己診断としてROM34のチェックサムの確
認、RAM33のリードライト確認、RAM33の初期
化等の初期化処理が行われる(ST24)。
Therefore, when the specified address value of the RAM 33 is not the specified value (OXAA55H), it is determined that the RAM 33 is normally started, and the self-diagnosis checksum of the ROM 34, read / write of the RAM 33, initialization of the RAM 33, and the like are initialized. Processing is performed (ST24).

【0084】一方、上記RAM33の指定アドレス値が
規定値(OXAA55H)である場合、電源の瞬間停止
後の復帰、又は、ウオッチドッグタイマによるCPUリ
セットと判断して、RAM33の所定領域に初回レスポ
ンスフラグ、即ち、リーダライタ30が起動後にPCか
らの最初のコマンドを受信した状態か否かを判断するた
めのフラグとして“1”を設定し、自己診断を行うこと
なく、リーダ初期設定処理へ移行する(ST25)。
On the other hand, if the specified address value of the RAM 33 is the specified value (OXAA55H), it is determined that the power supply is restored after an instantaneous stop or the CPU is reset by a watchdog timer, and the first response flag is stored in a predetermined area of the RAM 33. That is, "1" is set as a flag for determining whether or not the reader / writer 30 has received the first command from the PC after activation, and the process proceeds to the reader initial setting process without performing self-diagnosis. (ST25).

【0085】ここで、この初回レスポンスフラグとは、
リーダライタが、PCからのコマンド受信時に、起動後
最初のコマンドを受信した状態であるか否かを判定する
ために用いるフラグである。
Here, the initial response flag is
This flag is used by the reader / writer to determine whether or not it is in the state of receiving the first command after startup when receiving a command from the PC.

【0086】次に、リーダライタ30のCPUはリーダ
ライタ30の初期設定として、PC20からの受信許可
を行い(ST26)、そして、CPU32はRAM33
の指定アドレスに規定値(OXAA55H)を書き込む
(ST27)。
Next, the CPU of the reader / writer 30 permits reception from the PC 20 as an initial setting of the reader / writer 30 (ST26).
The specified value (OXAA55H) is written to the specified address (ST27).

【0087】その後、リーダライタはPCからのコマン
ド待ち状態となる(ST28)。
Thereafter, the reader / writer enters a state of waiting for a command from the PC (ST28).

【0088】尚、第2の実施例におけるリーダライタ3
0のコマンド処理時の動作は図3に示したフローチャー
トと同じであるため説明を省略する。
The reader / writer 3 in the second embodiment
The operation at the time of command processing of 0 is the same as that of the flowchart shown in FIG.

【0089】図7は、図6にて示した第2の実施例にお
けるリーダライタ30を使用した無線タグリーダライタ
システムにおける上位装置20、リーダライタ30、無
線タグ10の間のコマンド/レスポンスの流れと時間の
経過の一例を示すシーケンス図である。
FIG. 7 shows the flow of a command / response between the host device 20, the reader / writer 30, and the wireless tag 10 in the wireless tag reader / writer system using the reader / writer 30 in the second embodiment shown in FIG. It is a sequence diagram showing an example of the passage of time.

【0090】まず、図5(第1の実施例)のシーケンス
図では、リーダライタ起動後PCからの最初のコマンド
受信ではなく初回レスポンスを送信した後のコマンド処
理から説明しているが、図7に示したシーケンス図は最
初のコマンド受信時からのシーケンスを示している。
First, in the sequence diagram of FIG. 5 (first embodiment), the command processing after transmitting the first response rather than receiving the first command from the PC after the activation of the reader / writer is described. The sequence diagram shown in FIG. 7 shows a sequence from the time of receiving the first command.

【0091】即ち、図6にて説明したようにCPUのリ
セット処理ではRAM33の指定アドレス値が規定値
(OXAA55H)である場合にRAM33の所定領域
に初回レスポンスフラグを設定するようになっているの
で、通常起動時には初回レスポンスフラグは設定されな
い。
That is, as described with reference to FIG. 6, when the designated address value of the RAM 33 is the specified value (OXAA55H) in the reset processing of the CPU, the first response flag is set in a predetermined area of the RAM 33. However, at the time of normal startup, the first response flag is not set.

【0092】従って、図7に示しように、リーダライタ
30は通常起動時には上位装置20から受信した最初の
コマンド(送信キャリア開始コマンド)から処理が開始
される。
Therefore, as shown in FIG. 7, at the time of normal startup, the reader / writer 30 starts processing from the first command (transmission carrier start command) received from the host device 20.

【0093】尚、図7において、状態S21から状態S
25までのシーケンスの内容は図5に示した状態S1か
ら状態S5までのシーケンスと同じであるため、説明を
省略する。
In FIG. 7, from state S21 to state S
The contents of the sequence up to 25 are the same as those of the sequence from the state S1 to the state S5 shown in FIG.

【0094】状態S25の後、上位装置20が、カード
データリードコマンドをリーダライタ30に送信し後に
リーダライタ30に対する電源(V)の瞬間停止が生じ
た場合、リーダライタ30は動作不能となる。従って、
リーダライタ30は機能せず、無線タグ(カード)10
に対するコマンド送信処理及び、上位装置20に対する
レスポンスの送信が成されないこととなる。(状態S2
6)この場合、リーダライタ30からレスポンスがない
ため、上位装置20はコマンド送信から予め定義されて
いるタイムアウト時間T2を経過した後、再び、リーダ
ライタに向けてカードデータリードコマンドを送信する
(状態S27)。
After the state S25, if the power supply (V) for the reader / writer 30 is momentarily stopped after the host device 20 transmits the card data read command to the reader / writer 30, the reader / writer 30 becomes inoperable. Therefore,
The reader / writer 30 does not function, and the wireless tag (card) 10
Command transmission processing to the host device 20 and transmission of a response to the host device 20 are not performed. (State S2
6) In this case, since there is no response from the reader / writer 30, the host device 20 transmits a card data read command again to the reader / writer after a predetermined timeout time T2 has elapsed from the command transmission (state). S27).

【0095】一方、リーダライタ30では、リーダライ
タ30における瞬間停電時間Tの経過後、電源復帰する
と再起動して、図6のフローチャートに示したCPUリ
セット処理を実行した後、上位装置20からのコマンド
待ちの状態となる。
On the other hand, the reader / writer 30 is restarted when the power is restored after the elapse of the instantaneous power failure time T in the reader / writer 30, executes the CPU reset process shown in the flowchart of FIG. The command waits.

【0096】ここで、電源の瞬間停止の時間をT、リー
ダが再起動に要する時間をT3とするとT2>(T+T
3)の関係が成立すれば、上位装置20のタイムアウト
時間T2を経過してコマンドを再送信した時点で、リー
ダライタ30がコマンド待ちの状態となる。
Here, assuming that the time of the momentary stop of the power supply is T and the time required for the reader to restart is T3, T2> (T + T
If the relationship of 3) is established, the reader / writer 30 will be in a command waiting state when the command is retransmitted after the timeout period T2 of the higher-level device 20 has elapsed.

【0097】さらに、この第2の実施例では、電源の瞬
間停止時間をT、バックアップ電源39による保証時間
をTmaxとした場合、T<Tmaxの瞬間停電が発生
した場合には、電源の瞬間停止後リーダライタ30がP
C20からのコマンドを受信可能になるまでの時間の短
縮化が計れる。
Further, in the second embodiment, when the instantaneous power stop time of the power supply is T and the guaranteed time by the backup power supply 39 is Tmax, when an instantaneous power failure of T <Tmax occurs, Rear reader / writer 30
The time required until the command from C20 can be received can be reduced.

【0098】即ち、リーダライタ30が起動した後、通
常起動時には自己診断(ST24)を行い、電源の瞬間
停電などによる復帰時には自己診断を行うことなくリー
ダライタ30の初期設定を行うので、電源の瞬間停止な
どによる復帰時には、自己診断が省略されて、通常起動
時に比べPC20からのコマンドを受信可能になるまで
の時間の短縮化が計れる。
That is, after the reader / writer 30 is started, the self-diagnosis (ST24) is performed at the time of normal startup, and the initialization of the reader / writer 30 is performed without performing the self-diagnosis at the time of recovery due to a momentary power failure of the power supply. At the time of return due to an instantaneous stop or the like, the self-diagnosis is omitted, and the time required for receiving a command from the PC 20 can be reduced as compared with the time of normal startup.

【0099】リーダライタ30が復帰後にコマンドを受
信した場合、リーダライタ30は図3に示したフローチ
ャートに示したコマンド処理を行う。即ち、コマンド電
文を解析し、その正当性、すなわち、パリティチェッ
ク、コマンド長チェックを実施して、当リーダライタで
サポートされたコマンドであることを判定する。そして
正当性がないコマンドに対しては通常時と同じエラーレ
スポンスコードを返すまた、この時、リーダライタ30
は、本レスポンスを起動後、最初のコマンドに対するレ
スポンスとカウントしない。(状態S28)。
When the command is received after the reader / writer 30 returns, the reader / writer 30 performs the command processing shown in the flowchart shown in FIG. That is, the command message is analyzed and its validity, that is, a parity check and a command length check are performed, and it is determined that the command is a command supported by the reader / writer. In response to the invalid command, the same error response code as in the normal case is returned.
Does not count as a response to the first command after starting this response. (State S28).

【0100】一方、カードデータリードコマンドを正常
に受信した場合、すなわち、コマンドの正当性を確認出
来た場合、リーダライタはRAM33の初回レスポンス
フラグを確認し、T<Tmaxの瞬間停電の場合にはレ
スポンスフラグは1となっているため、リーダライタ起
動後最初のコマンドに対するレスポンスコード(AAA
A)を上位装置20へ出力する(状態S29)。
On the other hand, when the card data read command is normally received, that is, when the validity of the command can be confirmed, the reader / writer checks the initial response flag in the RAM 33, and when T <Tmax momentary power failure, Since the response flag is 1, the response code (AAA) for the first command after the reader / writer is activated
A) is output to the host device 20 (state S29).

【0101】上位装置20は受信したレスポンスコード
がリーダライタ起動後最初のコマンドに対するレスポン
スコード(AAAA)であることにより、上位装置20
はリーダライタが電源の瞬間停止などの発生により、リ
セットしたことを容易に認識し(状態9)、無線タグ
(カード)10を起動状態とするため、状態S1からの
処理を再開する(状態30)。
The host device 20 determines that the received response code is a response code (AAAAA) for the first command after the reader / writer has been activated, and
Easily recognizes that the reader / writer has been reset due to an instantaneous stop of the power supply or the like (state 9), and restarts the process from state S1 to activate the wireless tag (card) 10 (state 30). ).

【0102】以上説明した第2の実施例では、リーダラ
イタ30が電源の瞬間停止などの発生によりリセットし
た後の最初のコマンドに対するレスポンスとして特定の
レスポンスコード(AAAA)を出力することによっ
て、上位装置20ではリーダライタ30が電源の瞬間停
止などの発生によりリセットしたことを容易に認識可能
である。
In the second embodiment described above, the specific response code (AAAAA) is output as a response to the first command after the reader / writer 30 has been reset due to an instantaneous stop of the power supply or the like. In 20, it is possible to easily recognize that the reader / writer 30 has been reset due to an instantaneous stop of the power supply or the like.

【0103】従って、上位装置20側では、コマンドに
対するレスポンスとして特定のレスポンスコード(AA
AA)を追加するのみで良い。
Therefore, on the host device 20 side, a specific response code (AA) is used as a response to the command.
It is only necessary to add AA).

【0104】又、リーダライタ30ではRAM33の指
定アドレスの確認ステップ(ST22,23)、初回レ
スポンスフラグの記憶ステップ(ST26)並びに確認
ステップ(ST9,10,11)を追加するのみで良い
ため、リーダライタ30側の処理を複雑にすること無
く、リーダライタ30が電源の瞬間停止などの発生によ
りリセットしたことを上位装置20に認識させることが
可能となる。
The reader / writer 30 only needs to add a confirmation step (ST22, 23) of the designated address in the RAM 33, a storage step (ST26) of the initial response flag, and a confirmation step (ST9, 10, 11). Without complicating the processing on the writer 30 side, the host device 20 can recognize that the reader / writer 30 has been reset due to an instantaneous stop of the power supply or the like.

【0105】上記第2の実施例では、T>Tmaxの停
電が発生した場合には、初回レスポンスフラグが設定さ
れていないので、停電後の復帰時に特定のレスポンスコ
ード(AAAA)が出力されず、上位装置20はリーダ
ライタ30が停電後によりリセットしたことは認識でき
ない。この場合、上位装置20から送られるコマンドと
リーダライタ30から得られるレスポンスとが一致しな
いため、コマンド/レスポンスを繰り返した後にリーダ
ライタのエラーとなる。
In the second embodiment, when a power failure of T> Tmax occurs, a specific response code (AAAAA) is not output when returning after a power failure because the first response flag is not set. The host device 20 cannot recognize that the reader / writer 30 has been reset after the power failure. In this case, since the command sent from the host device 20 does not match the response obtained from the reader / writer 30, an error of the reader / writer occurs after the command / response is repeated.

【0106】次に、本発明の第3の実施例を図8乃至図
9に基づいて説明する。
Next, a third embodiment of the present invention will be described with reference to FIGS.

【0107】この第3の実施例では、第1実施例並びに
第2実施例において説明したレスポンスフラグに相当す
るフラグを2種類使用するとともに、一方のフラグを不
揮発性メモリに記憶するものである。
In the third embodiment, two types of flags corresponding to the response flags described in the first and second embodiments are used, and one of the flags is stored in the nonvolatile memory.

【0108】図8は、本発明の第3の実施例に係る無線
タグリーダライタシステムのシステム構成図であり、図
8のシステム構成図ではリーダライタ30に不揮発性メ
モリとしてEEPROM41が設けられている点で図1
の構成図と相違しており、他の部分は同じである(同一
符号を付与)ためその説明は省略する。
FIG. 8 is a system configuration diagram of a wireless tag reader / writer system according to a third embodiment of the present invention. In the system configuration diagram of FIG. 8, the reader / writer 30 is provided with an EEPROM 41 as a nonvolatile memory. Figure 1
And the other parts are the same (the same reference numerals are given), and the description thereof will be omitted.

【0109】上記EEPROM41は後述するように、
リーダライタ30が上位装置20から受信したコマンド
の処理中であったかどうかを識別するための第2のフラ
グを所定のアドレスに記憶するものであり、不揮発性メ
モリであるためこの第2のフラグは電源断に係らず保持
されるものである。
As described later, the EEPROM 41 has
A second flag for identifying whether or not the reader / writer 30 is processing a command received from the higher-level device 20 is stored at a predetermined address. Since the second flag is a nonvolatile memory, the second flag is It is held regardless of the interruption.

【0110】次に、リーダライタ30の起動時又はウォ
ッチドッグタイマによるリセット時のCPU32のリセ
ット処理について図9により説明する。
Next, a reset process of the CPU 32 at the time of starting the reader / writer 30 or resetting by the watchdog timer will be described with reference to FIG.

【0111】リセット処理においては、CPU32の入
出力ポート等の初期設定が行われ、(ST31)、次
に、自己診断としてROM34のチェックサムの確認、
RAM33のリードライト確認、RAM33の初期化等
の初期化処理が行われる(ST32)。そして、リーダ
ライタ30のCPU32はリーダライタ30の初期設定
として、PC20からの受信許可を行う(ST33)。
In the reset processing, the initial settings of the input / output ports of the CPU 32 and the like are performed (ST31). Next, the checksum of the ROM 34 is confirmed as a self-diagnosis.
Initialization processing such as read / write confirmation of the RAM 33 and initialization of the RAM 33 is performed (ST32). Then, the CPU 32 of the reader / writer 30 permits reception from the PC 20 as an initial setting of the reader / writer 30 (ST33).

【0112】この後、RAM33の所定領域に第1のフ
ラグ(FL1)として“1”を設定する(ST34)。
ここで、この第1のフラグとは、リーダライタが、起動
後の状態であるか否かを判定するために用いるフラグで
ある。
Thereafter, "1" is set as a first flag (FL1) in a predetermined area of the RAM 33 (ST34).
Here, the first flag is a flag used by the reader / writer to determine whether or not the state is after activation.

【0113】その後、リーダライタはPCからのコマン
ド待ち状態となる(ST35)。
Thereafter, the reader / writer enters a state of waiting for a command from the PC (ST35).

【0114】図10は、第3の実施例におけるリーダラ
イタ30のコマンド処理時の動作を説明するものであ
る。
FIG. 10 illustrates the operation of the reader / writer 30 during command processing in the third embodiment.

【0115】PC20からのコマンドの受信待ち状態で
は、CPU32はコマンドを受信したかどうかを常時チ
ェックしている(ST36)。そして、PC20よりコ
マンドを受信した際には、リーダライタ30のCPU3
2はコマンド電文の正当性を判断する(ST37)。
In the state of waiting for reception of a command from PC 20, CPU 32 constantly checks whether or not a command has been received (ST36). When a command is received from the PC 20, the CPU 3 of the reader / writer 30
2 judges the validity of the command message (ST37).

【0116】第1の実施例と同様のチェックを行いPC
20より受信したコマンドに正当性がないと判断した際
には、リーダライタのCPU32はエラー種類に応じた
エラーレスポンスをPC20に出力する(ST38)。
A check similar to that of the first embodiment is performed and the PC
When it is determined that the received command is not valid, the CPU 32 of the reader / writer outputs an error response corresponding to the type of error to the PC 20 (ST38).

【0117】一方、コマンド電文に正当性があると判断
した際には、CPU32は第1のフラグ(FL1)をR
AM33から又、第2のフラグ(FL2)をEEPRO
M41から読み出す(ST39)。
On the other hand, when determining that the command message is valid, the CPU 32 sets the first flag (FL1) to R
AM33 also sets the second flag (FL2) to EEPRO
It is read from M41 (ST39).

【0118】そして、CPU32は第1のフラグ(FL
1)と第2のフラグ(FL2)の双方が1に設定されて
いるかを判定する(ST40)。
Then, the CPU 32 sets the first flag (FL)
It is determined whether both 1) and the second flag (FL2) are set to 1 (ST40).

【0119】ここで、第1のフラグ(FL1)は上述し
たようにCPU32のリセット時に設定されるものであ
るから、起動直後の状態では1が設定されている。又、
第2のフラグ(FL2)はリーダライタにおける以前の
コマンド処理が完結していれば0、電源断等によりコマ
ンド処理の途中で中断していれば1が設定されている。
Since the first flag (FL1) is set at the time of resetting the CPU 32 as described above, 1 is set immediately after the activation. or,
The second flag (FL2) is set to 0 if the previous command processing in the reader / writer has been completed, and set to 1 if the command processing has been interrupted in the middle of the command processing due to power-off or the like.

【0120】従って、第1のフラグ(FL1)と第2の
フラグ(FL2)の双方が1に設定されているというの
は電源断等によりコマンド処理の途中で中断した後に起
動された状態を意味しており、第1のフラグ(FL1)
と第2のフラグ(FL2)の双方が1の場合には、CP
U32は初回レスポンスを送信する(ST41)。
Therefore, the fact that both the first flag (FL1) and the second flag (FL2) are set to 1 means a state in which the command is started after being interrupted in the middle of command processing due to power cutoff or the like. And the first flag (FL1)
If both the flag and the second flag (FL2) are 1, CP
U32 transmits an initial response (ST41).

【0121】このリーダ初回レスポンスの内容は第1並
びに第2実施例と同様である。
The contents of the reader first response are the same as in the first and second embodiments.

【0122】そして初回レスポンスの送信の後に、CP
U32はRAM33の第1のフラグ(FL1)の値を
“O”(“1”以外)に変更し(ST42)、再び、P
Cからのコマンド受信待ち状態(ST35)に戻る。
After the transmission of the initial response, the CP
U32 changes the value of the first flag (FL1) of the RAM 33 to "O" (other than "1") (ST42),
The process returns to the command reception waiting state from C (ST35).

【0123】PC20側ではレスポンス中のインフォメ
ーション部が“AAAA”の場合、リーダライタ30が
再起動後にPCからの最初のコマンドを受信した状態で
あることを識別することが可能となる。
When the information part in the response is "AAAAA", the PC 20 can identify that the reader / writer 30 has received the first command from the PC after the restart.

【0124】また、上記確認ステップ(ST40)にお
いて、第1のフラグ(FL1)と第2のフラグ(FL
2)の双方が1で無い場合には、受信したコマンドが最
終処理コマンドであるか否かが確認される(ST4
3)。
In the confirmation step (ST40), the first flag (FL1) and the second flag (FL)
If both of 2) are not 1, it is confirmed whether or not the received command is the final processing command (ST4).
3).

【0125】ここで、第1のフラグ(FL1)と第2の
フラグ(FL2)の双方が1で無い場合とは、上述した
初回レスポンスの送信後、又は、正常起動時であること
を意味している。
Here, the case where both the first flag (FL1) and the second flag (FL2) are not 1 means after transmission of the above-described first response or at the time of normal startup. ing.

【0126】又、最終処理コマンドとは上位装置20が
リーダライタ30に対して送る一連のコマンド中で一番
最後に送信するコマンド(例えば送信キャリアオフのコ
マンド)である。
The final processing command is the last command to be transmitted (for example, a transmission carrier off command) in a series of commands sent from the host device 20 to the reader / writer 30.

【0127】そして、上記確認ステップ(ST43)に
おいて、受信したコマンドが最終処理コマンドで無いと
確認された場合は、CPU32は受信したコマンドに応
じた処理を行い(ST44)、通常のレスポンス処理と
して当該コマンドの処理結果をPC20へ送信する(S
T45)。
If it is determined in the confirmation step (ST43) that the received command is not the final processing command, the CPU 32 performs a process according to the received command (ST44), and performs the process as a normal response process. The processing result of the command is transmitted to the PC 20 (S
T45).

【0128】次に、EEPROMの所定アドレスに記憶
されている第2のフラグFL2を1に設定する。尚、第
2のフラグFL2が既に1に設定されていれば変更を要
さず、その値を維持する。
Next, the second flag FL2 stored at a predetermined address of the EEPROM is set to 1. If the second flag FL2 has already been set to 1, no change is required, and the value is maintained.

【0129】一方、上記確認ステップ(ST43)にお
いて、受信したコマンドが最終処理コマンドであると確
認された場合は、CPU32は受信したコマンドに応じ
た処理を行い(ST44)、通常のレスポンス処理とし
て当該コマンドの処理結果をPC20へ送信する(ST
45)。
On the other hand, in the confirmation step (ST43), when the received command is confirmed to be the final processing command, the CPU 32 performs a process according to the received command (ST44), and performs the process as a normal response process. The processing result of the command is transmitted to the PC 20 (ST
45).

【0130】続いて、EEPROMの所定アドレスに記
憶されている第2のフラグFL2を0に設定する。尚、
第2のフラグFL2が既に0に設定されていれば変更を
要さず、その値を維持する。
Subsequently, the second flag FL2 stored at a predetermined address of the EEPROM is set to 0. still,
If the second flag FL2 has already been set to 0, no change is required and that value is maintained.

【0131】以上のような動作においては、コマンド処
理の途中においてはEEPROM41の第2のフラグ
(FL2)は1に設定されており、電源断等によりコマ
ンド処理の途中で中断した場合でも第2のフラグは消失
していない。
In the above operation, the second flag (FL2) of the EEPROM 41 is set to 1 during the command processing, and the second flag (FL2) is set even if the command processing is interrupted during the command processing due to power cutoff or the like. The flag has not been lost.

【0132】従って、電源が復帰して再起動された際に
は、第1のフラグと第2のフラグの双方を確認すること
により、正常起動の状態であるのか、電源断等によりコ
マンド処理の途中で中断した後に起動された状態である
のかが、識別可能となり、後者の場合には最初に受信し
たコマンドに対してレスポンス中のインフォメーション
部が“AAAA”の初回レスポンスを送信することが可
能となる。
Therefore, when the power is restored and the power is restarted, both the first flag and the second flag are checked to determine whether the power supply is in the normal start-up state or to execute the command processing due to the power-off or the like. It is possible to identify whether the state has been started after being interrupted halfway, and in the latter case, the information part in the response to the first received command can transmit the first response of “AAAAA”. Become.

【0133】また、この第3の実施例では、不揮発性メ
モリを用いることにより瞬間停電のみならず、あらゆる
停電に対しても第2のフラグが保持されているので、コ
マンド処理の途中で中断した後に再起動された場合には
必ず初回レスポンスを送信することとなり、リーダライ
タ30と上位装置20との同期をスムーズに得ることが
出来る。
In the third embodiment, since the second flag is held not only for an instantaneous power failure but also for any power failure by using the nonvolatile memory, the command processing is interrupted in the middle of the command processing. When restarted later, an initial response is always transmitted, and synchronization between the reader / writer 30 and the host device 20 can be smoothly obtained.

【0134】図11は、第1乃至第3の実施例における
無線タグリーダライタシステムにおいて上位装置20が
初回レスポンスを受領した後の、リーダライタ30との
間で行われるコマンド/レスポンスの流れと時間の経過
の一例を示すシーケンス図である。
FIG. 11 shows the flow and time of a command / response performed with the reader / writer 30 after the host device 20 receives the initial response in the wireless tag reader / writer system in the first to third embodiments. It is a sequence diagram showing an example of progress.

【0135】上位装置20は上述したように、コマンド
に対するレスポンス中のインフォメーション部が“AA
AA”の初回レスポンスである場合、リーダライタ30
が停電後に再起動(リセット)した状態であることを認
識する(状態S10)。
As described above, the upper level device 20 sets the information part in the response to the command to “AA”.
If the response is the first response of “AA”, the reader / writer 30
Is recognized as being in a state of restart (reset) after a power failure (state S10).

【0136】リーダライタ30の再起動(リセット)を
認識すると、上位装置20は、送信キャリア開始コマン
ドをリーダライタ30に送信し、無線タグ10を起動可
能状態とする(状態S11)。
When the restart (reset) of the reader / writer 30 is recognized, the upper-level device 20 transmits a transmission carrier start command to the reader / writer 30, and sets the wireless tag 10 to a startable state (state S11).

【0137】次に、上位装置20はカード起動コマンド
をリーダライタ30に送信し、リーダライタ30は当該
コマンドに基づき、無線タグ10に対するリセット信号
を送信し、このリセット信号に対するカードからの応答
信号を受信することによりその場に無線タグ10が存在
するか否かを判断する。その後、リーダライタ30は起
動正常終了のレスポンスを上位装置20に送信する(状
態S12)。
Next, the host device 20 transmits a card activation command to the reader / writer 30, and the reader / writer 30 transmits a reset signal to the wireless tag 10 based on the command, and transmits a response signal from the card to the reset signal. By receiving the information, it is determined whether or not the wireless tag 10 exists at the place. After that, the reader / writer 30 transmits a response of the normal startup completion to the host device 20 (state S12).

【0138】続いて、上位装置20は、カードID読取
りコマンドをリーダライタ30に送信し、リーダライタ
30は当該コマンドに基づきアンチコリジョンコマンド
を無線タグ10に送信し、受信アンテナ38の読みとり
エリアに複数枚ある無線タグ10から少なくとも1枚以
上の無線タグ10のIDを取得する。その後、リーダラ
イタ30は取得した無線タグ10のIDをレスポンスデ
ータとして上位装置20に送信する(状態S13)。
Subsequently, the higher-level device 20 transmits a card ID read command to the reader / writer 30, and the reader / writer 30 transmits an anti-collision command to the wireless tag 10 based on the command, and a plurality of The IDs of at least one wireless tag 10 are obtained from the wireless tags 10. Thereafter, the reader / writer 30 transmits the acquired ID of the wireless tag 10 to the host device 20 as response data (state S13).

【0139】その後、上位装置20は、取得したカード
のIDと、過去に処理したデータとからアクセス未完了
の無線タグが存在しているか否かを判定する。
Thereafter, the host device 20 determines whether or not there is a wireless tag whose access has not been completed, based on the acquired card ID and the data processed in the past.

【0140】取得したカードのID中にアクセス未完了
の無線タグが含まれていた場合、リード若しくはライト
処理を行う対象となるカードを指定するカード指定コマ
ンドをリーダライタ30を介して無線タグ10に送信
し、リード/ライトアクセスの対象となる無線タグ(カ
ード)10のIDを指定する。その後、リーダライタ3
0を介して無線タグ(カード)10からのレスポンスを
レスポンスデータを受信する。(状態S14)。
When the ID of the obtained card includes an inaccessible wireless tag, a card specifying command for specifying a card to be subjected to read or write processing is transmitted to the wireless tag 10 via the reader / writer 30. The ID of the wireless tag (card) 10 to be transmitted and read / written is specified. After that, reader / writer 3
0, the response data from the wireless tag (card) 10 is received. (State S14).

【0141】続いて、上位装置20は、リーダライタ3
0を介して無線タグ10ににカードKEY認証コマンド
を送信し、指定済みの無線タグに対して、リードライト
アクセスの権限確認のためのKEY認証を行わせる。そ
の後、リーダライタ30を介して無線タグ(カード)1
0からのレスポンスを受信する(状態S15)。
Subsequently, the host device 20 is connected to the reader / writer 3
A card KEY authentication command is transmitted to the wireless tag 10 via “0”, and the specified wireless tag is subjected to KEY authentication for confirming read / write access authority. After that, the wireless tag (card) 1 via the reader / writer 30
A response from 0 is received (state S15).

【0142】ここで、無線タグ10における認証が正常
に終了した場合には、その後の無線タグ10とのリード
ライトアクセス動作が可能になる。
Here, when the authentication in the wireless tag 10 is completed normally, a read / write access operation with the wireless tag 10 becomes possible thereafter.

【0143】そして、上位装置20は、リーダライタ3
0を介してカードデータリードコマンドを無線タグ10
に送信し、認証済みの無線タグ10からリードデータを
受信する(状態S16)。
[0143] Then, the host device 20 communicates with the reader / writer 3
0 via the wireless tag 10
, And receives the read data from the authenticated wireless tag 10 (state S16).

【0144】又、無線タグ10への書込みが必要な場合
には、上位装置20は、リーダライタ30を介してカー
ドデータライとコマンドを無線タグ10に送信し、認証
済みの無線タグ10にデータの書込みを行う(状態S1
7)。
When writing to the wireless tag 10 is necessary, the host device 20 transmits a card data write and a command to the wireless tag 10 via the reader / writer 30 and sends the data to the authenticated wireless tag 10. (State S1)
7).

【0145】無線タグ10からの読み出し並びに書込み
終了すると上位装置20は、リーダライタ30を介して
アクセス終了コマンドを無線タグ10に送信し、認証済
みの無線タグ10を非活性化させる(状態S18)。
When reading and writing from the wireless tag 10 are completed, the host device 20 transmits an access end command to the wireless tag 10 via the reader / writer 30, and deactivates the authenticated wireless tag 10 (state S18). .

【0146】その後、上位装置20は、先に取得したカ
ードのIDからアクセス未完了の無線タグが存在してい
るか否かを判定する。
Thereafter, the host device 20 determines whether or not there is a wireless tag whose access has not been completed, based on the ID of the previously acquired card.

【0147】アクセス未完了の無線タグ10が含まれて
いた場合、状態S16に戻り、アクセス未完了の無線タ
グ10に対するリード若しくはライト処理を行う。
If the inaccessible wireless tag 10 is included, the process returns to the state S16, and the read or write processing for the inaccessible wireless tag 10 is performed.

【0148】一方、アクセス未完了の無線タグ10が無
い場合は、全ての処理が完了しているので、上位装置2
0はリーダライタ30に対して送信キャリア停止コマン
ドを送信し、リーダライタ30は送信キャリアを停止す
ることにより、無線タグ10は非活性化される(状態S
19)。
On the other hand, if there is no wireless tag 10 for which access has not been completed, since all the processing has been completed, the host apparatus 2
0 transmits a transmission carrier stop command to the reader / writer 30, and the reader / writer 30 stops the transmission carrier, whereby the wireless tag 10 is deactivated (state S
19).

【0149】尚、送信キャリア停止コマンドは第3の実
施例における最終処理コマンドに相当する。
Incidentally, the transmission carrier stop command corresponds to the final processing command in the third embodiment.

【0150】以上のように、上位装置20は端末装置で
あるリーダライタ30から初回レスポンスを受領した後
には、処理を再開し、未処理の無線タグに対するリード
又はライト処理を行うことが可能である。
As described above, after receiving the initial response from the reader / writer 30 as the terminal device, the host device 20 can resume the process and perform the read or write process on the unprocessed wireless tag. .

【0151】[0151]

【発明の効果】以上の様に、本発明によれば、設置環境
などの条件によって、リーダライタの電源が瞬間的に落
ちてしまったり、ノイズなどの影響によってCPUのリ
セット動作が発生した際に、PCはリーダライタへの各
コマンドに対するレスポンスによって、リーダライタに
発生した上記現象を容易に認識することが可能となる。
このことによって、上位装置はそのときの処理経過によ
って、次に行うべき処理を容易に決定することが可能と
なる。
As described above, according to the present invention, when the power supply of the reader / writer is momentarily turned off or the reset operation of the CPU occurs due to the influence of noise or the like, depending on the conditions such as the installation environment. The PC can easily recognize the above-mentioned phenomenon occurring in the reader / writer by responding to each command to the reader / writer.
Thus, the host device can easily determine the next process to be performed according to the progress of the process at that time.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施形態に係る無線タグリーダ
ライタシステムのシステム構成図。
FIG. 1 is a system configuration diagram of a wireless tag reader / writer system according to a first embodiment of the present invention.

【図2】リーダライタ30の起動時の動作を説明する
図。
FIG. 2 is a diagram for explaining an operation at the time of starting a reader / writer 30;

【図3】リーダライタ30のコマンド処理時の動作を説
明する図。
FIG. 3 is a view for explaining the operation of the reader / writer 30 during command processing.

【図4】PC20より送信されるコマンド並びにPC2
0に送信されるレスポンスのフォーマットを説明する
図。
FIG. 4 shows a command transmitted from PC 20 and PC 2
The figure explaining the format of the response transmitted to 0.

【図5】リーダライタ30を使用した無線タグリーダラ
イタシステムにおける上位装置20、リーダライタ3
0、無線タグ10の間のコマンド/レスポンスの流れと
時間の経過の一例を示すシーケンス図。
FIG. 5 shows a host device 20 and a reader / writer 3 in a wireless tag reader / writer system using the reader / writer 30.
0, a sequence diagram showing an example of a command / response flow between the wireless tags 10 and an elapse of time.

【図6】本発明の第2の実施例に係るリーダライタ30
のリセット処理を説明するためのフローチャート図。
FIG. 6 shows a reader / writer 30 according to a second embodiment of the present invention.
FIG. 4 is a flowchart for explaining reset processing of FIG.

【図7】第2の実施例におけるリーダライタ30を使用
した無線タグリーダライタシステムにおける上位装置2
0、リーダライタ30、無線タグ10の間のコマンド/
レスポンスの流れと時間の経過の一例を示すシーケンス
図。
FIG. 7 shows a high-order device 2 in a wireless tag reader / writer system using the reader / writer 30 in the second embodiment.
0, command between reader / writer 30 and wireless tag 10
FIG. 4 is a sequence diagram showing an example of a response flow and the passage of time.

【図8】本発明の第3の実施例に係る無線タグリーダラ
イタシステムのシステム構成図。
FIG. 8 is a system configuration diagram of a wireless tag reader / writer system according to a third embodiment of the present invention.

【図9】リーダライタ30の起動時又はウォッチドッグ
タイマによるリセット時のCPU32のリセット処理に
ついて説明する図。
FIG. 9 is a view for explaining reset processing of the CPU 32 at the time of activation of the reader / writer 30 or at the time of reset by the watchdog timer.

【図10】第3の実施例におけるリーダライタ30のコ
マンド処理時の動作を説明する図。
FIG. 10 is a diagram for explaining the operation of the reader / writer 30 in command processing according to the third embodiment.

【図11】第1乃至第3の実施例におれる無線タグリー
ダライタシステムにおいて上位装置20が初回レスポン
スを受領した後の、リーダライタ30との間で行われる
コマンド/レスポンスの流れと時間の経過の一例を示す
シーケンス図。
FIG. 11 shows the flow of a command / response performed with the reader / writer 30 and the lapse of time after the host device 20 receives the initial response in the wireless tag reader / writer system according to the first to third embodiments. FIG. 4 is a sequence diagram showing an example of the embodiment.

【符号の説明】[Explanation of symbols]

10 無線タグ 20 パーソナルコンピュータ(PC) 30 リーダライタ 10 wireless tag 20 personal computer (PC) 30 reader / writer

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) G06K 19/07 G06K 19/00 N ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification symbol FI Theme coat ゛ (Reference) G06K 19/07 G06K 19/00 N

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 上位装置に接続され上位装置からのコマ
ンドに応じた処理を行う端末装置において、 端末装置のリセット動作が働いたことを検出する手段
と、 リセット動作後に上位装置から最初に受信したコマンド
に対するレスポンスとして端末装置がリセットされたこ
とを上位装置に認識させるための特定のレスポンスを上
位装置へ出力することを特徴とする端末装置。
1. A terminal device connected to a higher-level device and performing processing according to a command from the higher-level device, means for detecting that a reset operation of the terminal device has acted, and first receiving from the higher-level device after the reset operation. A terminal device for outputting a specific response to a host device as a response to a command for causing the host device to recognize that the terminal device has been reset.
【請求項2】 上記請求項1の端末装置において、 端末装置のリセット動作後上位装置からの最初のコマン
ドを受信した際に受信したコマンド電文の正当性を判断
する手段を有し、正当性が確認された最初のコマンドに
対して上記特定のレスポンスコードを上位装置へ返すこ
とを特徴とする端末装置。
2. The terminal device according to claim 1, further comprising: means for judging the validity of the command message received when receiving the first command from the host device after the reset operation of the terminal device. A terminal device for returning the specific response code to the host device in response to the confirmed first command.
【請求項3】 上位装置と接続され上位装置からのコマ
ンドに応じた処理を行う端末装置において、 データを保持する揮発性メモリと、 端末装置の起動時に上記揮発性メモリに所定のデータを
記憶させる第1の手段と、 上位装置からのコマンド受信時に上記揮発性メモリに所
定のデータが保持されているか否かにより電源断が生じ
たか否かを検出する第2の手段と、 上記検出手段により電源断が生じたことが検出された場
合は上位装置から受信したコマンドに対するレスポンス
として端末装置に電源断が生じたことを上位装置に認識
させるための特定のレスポンスを上位装置へ出力する第
3の手段と、 上記検出手段により電源断が生じたことが検出されなか
った場合は上位装置から受信したコマンドに対するレス
ポンスとして上位装置からのコマンドに対する処理結果
を上位装置へ出力する第4の手段とを有することを特徴
とする端末装置。
3. A terminal device connected to a higher-level device and performing a process according to a command from the higher-level device, wherein a volatile memory for holding data and a predetermined data are stored in the volatile memory when the terminal device starts up. First means, second means for detecting whether or not power has been cut off based on whether or not predetermined data is held in the volatile memory when a command is received from a higher-level device; A third means for outputting, to the higher-level device, a specific response for causing the higher-level device to recognize that the terminal device has lost power as a response to a command received from the higher-level device when the disconnection is detected If the detection means does not detect that a power failure has occurred, the higher-level device responds to the command received from the higher-level device. Terminal device; and a fourth means for outputting a processing result to the command to the host device.
【請求項4】 上記請求項3の端末装置において、上記
第3の手段により特定のレスポンスを上位装置へ返した
後に上記揮発性メモリに保持されている所定のデータを
他のデータに変更する手段を有することを特徴とする端
末装置。
4. The terminal device according to claim 3, wherein said third means returns a specific response to a higher-level device, and then changes predetermined data held in said volatile memory to another data. A terminal device comprising:
【請求項5】 上記請求項3の端末装置において、 上記揮発性メモリに保持されたデータが電源断状態にお
いても一定時間保持させるバックアップ電源と、 端末装置の起動時に上記メモリの特定アドレスの値を読
み出しその値の正当性によって、電源の瞬間停止による
復帰起動か、電源オフ状態からの起動かを判断する第1
の手段と、 上記判断手段により電源オフ状態からの起動と判断され
た場合には上記メモリの初期化を含む自己診断を行う第
2の手段と、 上記判断手段により電源の瞬間停止からの復帰起動と判
断された場合には上記揮発性メモリに所定のデータを記
憶させる第3の手段と、 上位装置からのコマンド受信時に上記揮発性メモリに上
記所定のデータが保持されている場合には電源断後の最
初のコマンド受信であることを上位装置に認識させるた
めの特定のレスポンスを上位装置へ出力する第4の手段
と、 上位装置からのコマンド受信時に上記揮発性メモリに上
記所定のデータが保持されていない場合には上位装置か
らのコマンドに対する処理結果を上位装置へ出力する第
5の手段とを有することを特徴とする端末装置。
5. The terminal device according to claim 3, wherein a backup power supply that retains data held in the volatile memory for a certain period of time even when the power supply is turned off, A first method for judging, based on the validity of the read value, whether to start up from an instantaneous stop of the power supply or to start up from a power off state
Means for performing a self-diagnosis including initialization of the memory when the determination means determines that the power supply is to be started from a power-off state; and recovery and activation from an instantaneous stop of the power supply by the determination means. A third means for storing predetermined data in the volatile memory when it is determined that the power supply is turned off when the predetermined data is held in the volatile memory when a command is received from a host device. Fourth means for outputting a specific response to the higher-level device for causing the higher-level device to recognize that the command has been received later, and when the command is received from the higher-level device, the predetermined data is held in the volatile memory. And a fifth means for outputting a processing result for a command from the higher-level device to the higher-level device if the processing has not been performed.
JP2000380096A 2000-12-14 2000-12-14 Terminal device Pending JP2002182798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000380096A JP2002182798A (en) 2000-12-14 2000-12-14 Terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000380096A JP2002182798A (en) 2000-12-14 2000-12-14 Terminal device

Publications (1)

Publication Number Publication Date
JP2002182798A true JP2002182798A (en) 2002-06-26

Family

ID=18848350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000380096A Pending JP2002182798A (en) 2000-12-14 2000-12-14 Terminal device

Country Status (1)

Country Link
JP (1) JP2002182798A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005303750A (en) * 2004-04-14 2005-10-27 Nec Infrontia Corp Photograph print system, photographing apparatus, image print designating apparatus, and image print designating method used therefor
US7140713B2 (en) 2002-10-28 2006-11-28 Seiko Epson Corporation Recording apparatus and communication method
JP2007094773A (en) * 2005-09-29 2007-04-12 Nec Electronics Corp Ic tag, ic tag system, and data communication method
CN102222208A (en) * 2011-05-31 2011-10-19 飞天诚信科技股份有限公司 Controllable CCID (Charge Coupled Imaging Device) card reader and working method thereof
JP2012055385A (en) * 2010-09-06 2012-03-22 Olympia:Kk Game machine
GB2622253A (en) * 2022-09-08 2024-03-13 Advanced Risc Mach Ltd Data communication apparatus and method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7140713B2 (en) 2002-10-28 2006-11-28 Seiko Epson Corporation Recording apparatus and communication method
JP2005303750A (en) * 2004-04-14 2005-10-27 Nec Infrontia Corp Photograph print system, photographing apparatus, image print designating apparatus, and image print designating method used therefor
JP2007094773A (en) * 2005-09-29 2007-04-12 Nec Electronics Corp Ic tag, ic tag system, and data communication method
JP2012055385A (en) * 2010-09-06 2012-03-22 Olympia:Kk Game machine
CN102222208A (en) * 2011-05-31 2011-10-19 飞天诚信科技股份有限公司 Controllable CCID (Charge Coupled Imaging Device) card reader and working method thereof
CN102222208B (en) * 2011-05-31 2014-03-26 飞天诚信科技股份有限公司 Controllable CCID (Charge Coupled Imaging Device) card reader and working method thereof
GB2622253A (en) * 2022-09-08 2024-03-13 Advanced Risc Mach Ltd Data communication apparatus and method

Similar Documents

Publication Publication Date Title
EP1916616B1 (en) Method for response control of an RFID tag, corresponding RFID system, reader/wrtiter and computer porgram
US6272628B1 (en) Boot code verification and recovery
US6415387B1 (en) Low power mode computer with simplified power supply
US6820208B2 (en) IC card, IC chip, data assuring method and power supply monitor method
US6289449B1 (en) Creating boot code image on a storage medium
JP2006195983A (en) Replaceable unit monitor reader with auto polling capability
JP2002123806A (en) Ic card, data update control method, data/message restoration control method, and storage medium with control program recorded thereon
US20150371066A1 (en) Radiofrequency transponder circuit
WO2001091046A1 (en) Ic card
JP2002182798A (en) Terminal device
US6450832B1 (en) Network connector for reduced EMI effects
JP4450692B2 (en) USB connection system, USB device, and host
CN115956236A (en) Host device and memory system
US20020018001A1 (en) Non-contact communication apparatus and control method for non-contact communication apparatus
US6470457B1 (en) Local permanent storage in network computer
CN101799861A (en) Software upgrading method and device of card reader and card reader
JP4426820B2 (en) Non-contact IC card
JP3696796B2 (en) Electromagnetic induction interrogation device and communication method
KR101351703B1 (en) Terminal device and power control device
JP2917381B2 (en) Power interruption processing device
JP2004528663A (en) Data carrier with memory means for storing important information of an intermediate operating state
JP3593818B2 (en) Non-contact IC card
CN111831074B (en) Expansion system and server host and operation method thereof
CN115665714B (en) Near field communication method and device, master control equipment, NFC chip and NFC equipment
JP2012027667A (en) Portable electronic device, ic card, and control method for portable electronic device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050414

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20050606