JPH07105107A - Downloading method - Google Patents

Downloading method

Info

Publication number
JPH07105107A
JPH07105107A JP5277671A JP27767193A JPH07105107A JP H07105107 A JPH07105107 A JP H07105107A JP 5277671 A JP5277671 A JP 5277671A JP 27767193 A JP27767193 A JP 27767193A JP H07105107 A JPH07105107 A JP H07105107A
Authority
JP
Japan
Prior art keywords
data
block
download
terminal device
data terminal
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
JP5277671A
Other languages
Japanese (ja)
Inventor
Hirokimi Shimizu
裕公 清水
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP5277671A priority Critical patent/JPH07105107A/en
Publication of JPH07105107A publication Critical patent/JPH07105107A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

PURPOSE:To provide a downloading method which shortens the time of downloading to a data terminal equipment and correctly performs the downloading operation even in a large-scale system wherein many data terminal equipments are used. CONSTITUTION:One block of downloaded data from a high-order side is received (step S24) through an optical communication port 9. It is checked (step S26) whether the transmission ID number put in the header block matches the ID number of this data terminal equipment. When they match each other, a flag indicating downloaded data addressed to this data terminal equipment is set ON (step S28). The header block contains plural transmission destination ID numbers, so the header block is transferred in the following step S29 as it is to a low-order side through a general communication port 10.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、必要なデータやアプリ
ケーションプログラムを通信ポートを使って、ホスト装
置からダウンロードするデータ端末装置において、複数
のデータ端末装置に同じデータやデータ端末装置毎に異
なるアプリケーションプログラムをダウンロードする場
合のダウンロード方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data terminal device for downloading necessary data and application programs from a host device by using a communication port, and to the same data or a different application for each data terminal device to a plurality of data terminal devices. Regarding the download method when downloading the program.

【0002】[0002]

【従来の技術】ハンディターミナルのような小型の携帯
用データ端末装置は、ホスト装置とのデータ転送が必須
となっており、使用者は専門のコンピュータ・オペレー
タではないので、データ転送のためにコネクタを脱着す
る際の操作でトラブルが発生することが多くなってい
る。このため、ホスト装置との通信に操作が容易で、且
つ故障の少ない光インタフェースを採用することが増え
てきている。
2. Description of the Related Art In a small portable data terminal device such as a handy terminal, data transfer with a host device is indispensable and the user is not a specialized computer operator. Problems often occur during the operation of attaching and detaching. Therefore, an optical interface that is easy to operate and has few failures is increasingly used for communication with the host device.

【0003】この光インタフェースは、専用の光通信ポ
ートとホスト装置に接続される光カプラとから構成され
る。ホスト装置とのデータ転送は、この光通信ポートを
通して行われ、さらに、バーコードリーダ等のデータ入
力装置を接続する要求も多く、汎用通信ポートも組み込
まれている。すなわち、2つの通信ポートを装備するデ
ータ端末が一般的になってきている。
This optical interface comprises a dedicated optical communication port and an optical coupler connected to the host device. Data transfer with the host device is performed through this optical communication port, and there is also a large demand for connecting a data input device such as a bar code reader, and a general-purpose communication port is also incorporated. That is, data terminals equipped with two communication ports are becoming common.

【0004】図18に示すように、従来はホスト装置か
らデータ端末装置にダウンロードする場合は、光通信ポ
ートだけを使いホスト装置101とデータ端末装置10
2とを、電気信号を光信号に変換する光カプラ103を
経由して1対1で接続し、ダウンロードを行っていた。
即ち2つある通信ポートのうち、光通信ポートだけを使
い、1対1の通信しか実行していなかった。このため、
システムの規模が大きく多数のデータ端末装置がシステ
ム内に配置される場合、多数のデータ端末装置に同じデ
ータや、アプリケーションプログラムをダウンロードし
なければならなず、1台ずつダウンロードしているため
に多くの時間を必要としている。
As shown in FIG. 18, conventionally, when downloading from the host device to the data terminal device, only the optical communication port is used and the host device 101 and the data terminal device 10 are used.
2 and 1 are connected one-to-one via the optical coupler 103 that converts an electric signal into an optical signal, and downloading is performed.
That is, of the two communication ports, only the optical communication port was used and only one-to-one communication was performed. For this reason,
When the system is large and many data terminal devices are installed in the system, the same data and application programs must be downloaded to many data terminal devices, and many of them are downloaded one by one. Need time.

【0005】また、ダウンロードする内容がほとんど同
じであるが、使用する業務によって僅かに違う内容をダ
ウンロードしなければならない場合、間違えなく目的と
するデータ端末装置にダウンロードするには、システム
管理者が1台ずつデータ端末装置の番号を確認し、それ
に適合したダウンロードデータをホスト装置から1台ず
つダウンロードしなければならず、これにも多くの時間
を必要としている。その上、ダウンロードデータの間違
いを皆無とすることは不可能であった。
When the contents to be downloaded are almost the same but the contents to be downloaded are slightly different depending on the business to be used, it is necessary for the system administrator to download 1 to the target data terminal device without mistake. It is necessary to check the number of the data terminal device one by one and download the download data suitable for it from the host device one by one, which also requires a lot of time. Moreover, it was impossible to eliminate errors in downloaded data.

【0006】[0006]

【発明が解決しようとする課題】上記したように、従来
の1対1のダウンロード方法においては、多数のデータ
端末装置が使用される大規模なシステムとした場合は、
データ端末装置へのダウンロードに多くの時間が必要と
なるという問題があった。さらに、ダウンロード作業の
誤りも発生していた。
As described above, in the conventional one-to-one download method, when a large-scale system using a large number of data terminal devices is used,
There has been a problem that much time is required for downloading to the data terminal device. In addition, there was an error in the download work.

【0007】本発明は上記従来の問題点に鑑み、多数の
データ端末装置が使用される大規模なシステムであって
も、データ端末装置へのダウンロード時間を短縮化し、
しかもダウンロード作業を正確に行えるダウンロード方
法を提供することを目的とする。
In view of the above conventional problems, the present invention shortens the download time to a data terminal device even in a large-scale system in which a large number of data terminal devices are used,
Moreover, it is an object of the present invention to provide a download method that enables accurate download work.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に本発明は、各々2つの通信ポートを有する複数のデー
タ端末装置を直列に接続し、ホスト装置から該各データ
端末装置へアプリケーションプログラムまたはデータを
ダウンロードするダウンロード方法において、予め、前
記各データ端末装置に固有の番号を割り付けると共に、
前記ホスト装置から送信されるダウンロードデータに該
ダウンロードデータを格納すべきデータ端末装置の番号
を格納したヘッダを付加しておき、前記各データ端末装
置は、一方の通信ポートからダウンロードデータをそれ
ぞれ受信し、その受信したダウンロードデータのヘッダ
に格納されている格納先のデータ端末装置の番号を確認
し、このヘッダの番号が当該データ端末装置の番号と一
致するときに、該ヘッダが付加されたダウンロードデー
タを格納すると共に、受信したダウンロードデータを他
方の通信ポートから送信し、前記ヘッダの番号が当該デ
ータ端末装置の番号と不一致のときには、受信したダウ
ンロードデータをそのまま他方の通信ポートから送信す
るようにしたものである。
In order to achieve the above object, according to the present invention, a plurality of data terminal devices each having two communication ports are connected in series, and an application program or In the download method for downloading data, a unique number is assigned to each of the data terminal devices in advance,
A header storing the number of the data terminal device that should store the download data is added to the download data transmitted from the host device, and each data terminal device receives the download data from one communication port. , The number of the data terminal device of the storage destination stored in the header of the received download data is confirmed, and when the number of this header matches the number of the data terminal device, the download data with the header added The received download data is transmitted from the other communication port, and when the header number does not match the number of the data terminal device, the received download data is directly transmitted from the other communication port. It is a thing.

【0009】好ましくは、前記ダウンロードデータの送
信を1バイトずつ行い、送受信のタイミング制御も1バ
イトずつ行う。
Preferably, the download data is transmitted byte by byte, and the transmission / reception timing control is also performed byte by byte.

【0010】好ましくは、前記ダウンロードデータの送
信の単位である1バイト毎にエラー検出を行い、エラー
を検出したときには、一つ上位のデータ端末装置からエ
ラーの発生したダウンロードデータを再送させる。
Preferably, error detection is performed for each byte which is a unit of transmission of the download data, and when an error is detected, the download data in which an error has occurred is retransmitted from the data terminal device one level above.

【0011】好ましくは、前記ダウンロードデータの送
信をブロック化し、送受信のタイミング制御もブロック
単位で行う。
Preferably, transmission of the download data is divided into blocks, and transmission / reception timing control is also performed in block units.

【0012】好ましくは、前記ダウンロードデータの送
信の単位であるブロック毎にエラー検出を行い、エラー
を検出したときには一つ上位のデータ端末装置からエラ
ーの発生したブロックを再送させる。
[0012] Preferably, error detection is performed for each block which is a unit of transmission of the download data, and when an error is detected, the block in which the error has occurred is retransmitted from the data terminal device one level above.

【0013】好ましくは、1回のダウンロード操作で複
数のダウンロードデータをダウンロードする。
Preferably, a plurality of download data are downloaded by one download operation.

【0014】[0014]

【作用】本発明は、従来のダウンロード方法が一方の通
信ポート(例えば光通信ポート)のみを使い、1対1で
ダウンロードし、従ってダウンロード中は他方の通信ポ
ート(例えば汎用通信ポート)は使われずにいた点に着
目している。即ち、本発明によれば、新たな部品を追加
することなく、従来使われていなかった汎用通信ポート
を有効に使い、ホスト装置から1回のダウンロード操作
で多数のデータ端末装置に対して、同じアプリケーショ
ンプログラムやデータをダウンロードすることができ
る。
According to the present invention, the conventional download method uses only one communication port (for example, an optical communication port) to download one-to-one, and therefore the other communication port (for example, a general-purpose communication port) is not used during the download. I am paying attention to what I was in. That is, according to the present invention, a general-purpose communication port which has not been used conventionally can be effectively used without adding a new component, and the same operation can be performed for a large number of data terminal devices by one download operation from the host device. You can download application programs and data.

【0015】また、各データ端末装置に固有の番号を割
り当て、ダウンロードデータにもダウンロードすべきデ
ータ端末装置の番号情報を付加するようにしたので、自
動的に必要なデータ端末装置に必要な内容をダウンロー
ドすることができる。
Further, since a unique number is assigned to each data terminal device and the number information of the data terminal device to be downloaded is added to the download data, the contents required for the required data terminal device are automatically provided. It can be downloaded.

【0016】また、ダウンロードデータの送信をブロッ
ク化し、送受信のタイミング制御もブロック単位で行う
ので、結果的にデータ量が少なくなりダウンロード時間
がさらに短縮する。
Further, since transmission of download data is divided into blocks and transmission / reception timing control is performed in block units, the amount of data is reduced and the download time is further shortened.

【0017】さらに、1バイト毎にエラー検出を行い、
エラーを検出したときには一つ上位のデータ端末装置か
らエラーの発生したブロックを再送させるので、自動的
にエラーの訂正や再送が行われ、ダウンロードの信頼性
を向上させることができる。また、エラー再送が行われ
た場合には、ホスト装置まで溯らずに上位側のデータ端
末装置から再送が行われので、再送に要する時間も必要
最小限に抑えられる。
Further, error detection is performed for each byte,
When an error is detected, the block in which the error has occurred is retransmitted from the upper data terminal device, so that the error can be corrected or retransmitted automatically, and the reliability of the download can be improved. Further, when the error resending is performed, the resending is performed from the higher-order data terminal device without having to wait for the host device, so that the time required for the resending is also minimized.

【0018】[0018]

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

【0019】図1は、本発明の第1実施例に係るダウン
ロード方法が実施されるデータ端末装置のブロック図で
ある。
FIG. 1 is a block diagram of a data terminal device in which the download method according to the first embodiment of the present invention is implemented.

【0020】図中1は、当該データ端末装置の制御を司
るCPUであり、このCPU1には、バスを介して、ア
プリケーションプログラムやデータを格納する読み書き
可能な記憶装置であるRAM2と、アプリケーションプ
ログラムからの情報を表示する表示器であるLCD3
と、アプリケーションプログラムからの情報を印字する
プリンタ4と、電池である電源6を制御する電源制御回
路5と、システムプログラム等が格納される読み出し専
用記憶装置であるROM7と、アプリケーションプログ
ラへのデータを入力するキーボード8と、ホスト装置と
通信するための光通信ポート9と、外部データ入力機器
と通信するための汎用通信ポート10とが接続されてい
る。
In FIG. 1, reference numeral 1 denotes a CPU which controls the data terminal device. The CPU 1 includes a RAM 2 which is a readable / writable storage device for storing application programs and data via a bus, and an application program. LCD3 which is a display for displaying information of
A printer 4 that prints information from an application program; a power supply control circuit 5 that controls a power supply 6 that is a battery; a ROM 7 that is a read-only storage device that stores system programs and the like; and data to an application program. A keyboard 8 for inputting, an optical communication port 9 for communicating with a host device, and a general-purpose communication port 10 for communicating with an external data input device are connected.

【0021】図2は、本発明によるダウンロード方法に
従ったホスト装置とデータ端末装置との接続状態を示す
図である。
FIG. 2 is a diagram showing a connection state between the host device and the data terminal device according to the download method of the present invention.

【0022】このシステムは、ホスト装置11から電気
信号による通信情報をデータ端末装置の光通信ポート9
へ送るため、ホスト装置11が、電気信号を光に変換す
る光カプラ12を介して1台目のデータ端末装置13の
光ポート9に接続されている。さらに、データ端末装置
13の汎用通信ポート10が、2台目の光カプラ14を
介して2台目のデータ端末装置15の光ポート9に接続
されている。同様にして、データ端末装置15が光カプ
ラ16を介して3台目のデータ端末装置17に接続され
いる。
In this system, communication information by an electric signal is transmitted from a host device 11 to an optical communication port 9 of a data terminal device.
In order to send the data to the host device 11, the host device 11 is connected to the optical port 9 of the first data terminal device 13 via the optical coupler 12 that converts an electric signal into light. Further, the general-purpose communication port 10 of the data terminal device 13 is connected to the optical port 9 of the second data terminal device 15 via the second optical coupler 14. Similarly, the data terminal device 15 is connected to the third data terminal device 17 via the optical coupler 16.

【0023】このように、図18に示す従来の接続方式
では使用されなかった汎用通信ポート10から下位のデ
ータ端末装置にダウンロードデータを転送するために、
データ端末装置が下位の光カプラを経由して下位のデー
タ端末装置に接続されている。すなわち、ホスト装置に
複数のデータ端末装置が、1番目の装置13の光通信ポ
ート9→1番目の装置13の汎用通信ポート10→2番
目の装置15の光通信ポート9→2番目の装置15の汎
用通信ポート10→……というように直列に接続されて
いる。
As described above, in order to transfer the download data from the general-purpose communication port 10 not used in the conventional connection system shown in FIG. 18 to the lower data terminal device,
The data terminal device is connected to the lower data terminal device via the lower optical coupler. That is, a plurality of data terminal devices are provided in the host device as the optical communication port 9 of the first device 13 → the general communication port 10 of the first device 13 → the optical communication port 9 of the second device 15 → the second device 15 General-purpose communication port 10 → ... is connected in series.

【0024】図3は、本発明によるダウンロード方法を
実現するためのダウンロードデータのフォーマットの一
例を示す図である。
FIG. 3 is a diagram showing an example of a format of download data for realizing the download method according to the present invention.

【0025】ダウンロードデータはヘッダブロック、デ
ータブロック、及び終了ブロックに分割され、ブロック
の先頭にはブロックの内容を示すIDが付されている。
ヘッダブロックは、本発明を実現するための特徴的なブ
ロックであり、このダウンロードデータをデータ端末装
置上に格納するために必要な情報だけでなく、どのID
番号を持ったデータ端末装置にそのダウンロードデータ
を送ろうとしているのかの情報も記述されている。
The download data is divided into a header block, a data block, and an end block, and an ID indicating the contents of the block is attached to the beginning of the block.
The header block is a characteristic block for realizing the present invention, and not only the information necessary for storing this download data on the data terminal device but also which ID
Information about whether the download data is to be sent to the data terminal device having the number is also described.

【0026】また、この送り先ID番号を複数記述して
おけば、複数のデータ端末装置に選択的にダウンロード
データを送ることができる。さらに、このID番号に例
えば“0”が指定されているダウンロードデータは、接
続される全てのデータ端末装置に格納すべきダウンロー
ドデータであると決めれば、全てのデータ端末装置に同
時に同じダウンロードデータを送ることができる。この
ID番号を有効に使って以下に説明する処理フローによ
り本発明によるダウンロード方法が実現される。
If a plurality of destination ID numbers are described, download data can be selectively transmitted to a plurality of data terminal devices. Further, if it is determined that the download data whose ID number is designated as "0", for example, is the download data to be stored in all the connected data terminal devices, the same download data is simultaneously downloaded to all the data terminal devices. Can be sent. By effectively using this ID number, the download method according to the present invention is realized by the processing flow described below.

【0027】図4は、図2で説明した本発明のダウンロ
ード方式に従った場合のダウンロード方法の処理を示す
フローチャートである。
FIG. 4 is a flow chart showing the processing of the download method when the download method of the present invention described in FIG. 2 is followed.

【0028】この処理は、図2に示した直列接続された
データ端末装置のうち、中間に置かれたデータ端末装置
13,15に共通の処理である。
This process is common to the data terminal devices 13 and 15 placed in the middle among the series-connected data terminal devices shown in FIG.

【0029】まず、ステップS21では、これから受信
するダウンロードデータを格納するためのファイルをオ
ープンし、続いて上位側から送られてくるダウンロード
データを受信するために光通信ポート9をオープンする
(ステップS22)。さらに、光通信ポート9から受信
したダウンロードデータを下位側へ転送するために汎用
通信ポート10をオープンした後(ステップS23)、
上位側からのダウンロードデータを光通信ポート9を通
して1ブロック受信する(ステップS24)。そして、
受信したブロックがヘッダブロックか否かを調べ(ステ
ップS25)、ヘッダブロックであると判断したときに
はステップS26へ進む。このステップS26以降の処
理が本発明の特徴の1つである。
First, in step S21, a file for storing the download data to be received is opened, and subsequently, the optical communication port 9 is opened for receiving the download data sent from the host side (step S22). ). Further, after opening the general-purpose communication port 10 to transfer the download data received from the optical communication port 9 to the lower side (step S23),
One block of download data from the upper side is received through the optical communication port 9 (step S24). And
It is checked whether the received block is a header block (step S25), and if it is determined that it is a header block, the process proceeds to step S26. The processing after step S26 is one of the features of the present invention.

【0030】ステップS26及びステップS27では、
ヘッダブロックに格納されている送り先ID番号が自デ
ータ端末装置のID番号と一致するかを調べる。一致し
たと確認した時には自データ端末装置宛のダウンロード
データである旨を示すフラグをオンする(ステップS2
8)。ヘッダブロックには複数の送り先ID番号が格納
されているので、続くステップS29では、ヘッダブロ
ックをそのまま汎用通信ポート10を経由して下位側へ
転送し、次のブロックを受信するために前記ステップS
24へ戻る。
In steps S26 and S27,
It is checked whether the destination ID number stored in the header block matches the ID number of the own data terminal device. When it is confirmed that they match, a flag indicating that the download data is addressed to the own data terminal device is turned on (step S2).
8). Since a plurality of destination ID numbers are stored in the header block, in the subsequent step S29, the header block is transferred as it is to the lower side via the general-purpose communication port 10, and the step S29 is performed in order to receive the next block.
Return to 24.

【0031】また前記ステップS27で、ID番号と一
致しないと判断されたときには、ステップS30で自デ
ータ端末装置宛のダウンロードデータである旨を示すフ
ラグをオフし、ヘッダブロックを下位側へ転送するため
に前記ステップS29へ進む。
When it is determined in step S27 that the ID number does not match, the flag indicating that the download data is addressed to the own data terminal device is turned off in step S30, and the header block is transferred to the lower side. Then, the process proceeds to step S29.

【0032】一方、前記ステップS25において、受信
したブロックがヘッダブロックではないと判断された場
合には、ステップS31へ進み、それがデータブロック
か否かを判断する。データブロックであると判断された
ときにはステップS32へ進み、前記ステップS28及
びステップS30で設定された自データ端末装置宛であ
るか否かのフラグを調べる。自データ端末装置宛のダウ
ンロードデータであると判断したときにはステップS3
3へ進み、受信したブロックを前記ステップS21でオ
ープンしたファイルに格納する。
On the other hand, if it is determined in step S25 that the received block is not the header block, the process proceeds to step S31 to determine whether or not it is a data block. When it is determined that the data block is a data block, the process proceeds to step S32, and the flag, which is set in steps S28 and S30 and is addressed to the own data terminal device, is checked. When it is determined that the download data is addressed to the own data terminal device, step S3
3, the received block is stored in the file opened in step S21.

【0033】ステップS34では、受信したブロックを
汎用通信ポート10を通して下位側へ転送する。前記ス
テップS32で自データ端末装置宛のダウンロードデー
タではないと判断されたときには、受信したブロックの
格納はせずに前記ステップS34へ進む。ステップS3
4で下位側への転送が終了したときには、次のブロック
を受信するために前記ステップS24へ戻る。
In step S34, the received block is transferred to the lower side through the general-purpose communication port 10. When it is determined in step S32 that the data is not the download data addressed to the own data terminal device, the received block is not stored and the process proceeds to step S34. Step S3
When the transfer to the lower side is completed in step 4, the process returns to step S24 to receive the next block.

【0034】前記ステップS31で、受信したブロック
がデータブロックではないと判断したときにはステップ
S35へ進み、受信したブロックが終了ブロックか否か
を判断する。終了ブロックであると判断されたときに
は、ステップS36で、受信した終了ブロックをそのま
ま汎用通信ポート10を経由して下位側へ転送する。
When it is determined in step S31 that the received block is not the data block, the process proceeds to step S35, and it is determined whether the received block is the end block. When it is determined that the received block is the end block, the received end block is transferred as it is to the lower side via the general-purpose communication port 10 in step S36.

【0035】ステップS37では、前記ステップS21
でオープンして前記ステップS33で自データ端末装置
宛のダウンロードデータを格納したファイルをクローズ
し、次のステップS38では、前記ステップS22で上
位側からダウンロードデータを受信するためにオープン
した光通信ポート9をクローズする。そして、ステップ
S39では、前記ステップS23で下位側へダウンロー
ドデータを転送するためにオープンした汎用通信ポート
10をクローズして、処理を終了する。また、前記ステ
ップS35で終了ブロックではないと判断されたときに
はそのブロックを無視して次のブロックを受信するため
に前記ステップS24へ戻る。
At step S37, the step S21 is executed.
In step S33, the file storing the download data addressed to the own data terminal device is closed, and in step S38, the optical communication port 9 opened in step S22 for receiving the download data from the host side is closed. Close. Then, in step S39, the general-purpose communication port 10 opened to transfer the download data to the lower side in step S23 is closed, and the process ends. When it is determined in step S35 that the block is not the end block, the block is ignored and the process returns to step S24 to receive the next block.

【0036】図5は、図2に示した直列接続されたデー
タ端末装置のうち、最終端に接続されたデータ端末装置
17のダウンロード方法の処理を示すフローチャートで
ある。
FIG. 5 is a flow chart showing the processing of the download method of the data terminal device 17 connected to the final end of the data terminal devices connected in series shown in FIG.

【0037】まず、ステップS41では、これから受信
するダウンロードデータを格納するためのファイルをオ
ープンし、続くステップS42では、上位側から送られ
てくるダウンロードデータを受信するために光通信ポー
ト9をオープンする。そして、ステップS43で上位側
からのダウンロードデータを光通信ポート9を通して1
ブロック受信する。
First, in step S41, the file for storing the download data to be received is opened, and in the following step S42, the optical communication port 9 is opened for receiving the download data sent from the upper side. . Then, in step S43, the download data from the upper side is sent to the optical communication port 9 for 1
Receive a block.

【0038】ステップS44では、受信したブロックが
ヘッダブロックか否かを調べる。ヘッダブロックである
と判断されたときにはステップS45へ進む。ステップ
S45以降の処理は、図4のステップS26以降の処理
と同じである。即ち、ステップS45及びステップS4
6では、ヘッダブロックに格納されている送り先ID番
号が自データ端末装置のID番号と一致するかを調べ
る。一致したと確認した時には自データ端末装置宛のダ
ウンロードデータである旨を示すフラグをオンし(ステ
ップS47)、次のブロックを受信するために前記ステ
ップS43へ戻る。なお、図4のフローでは、下位側に
他のデータ端末装置が接続されているので、このデータ
端末装置にヘッダブロックを転送する必要があり、この
転送のための処理(前記ステップS29)が入っていた
が、ここでは直列接続の最終端に接続される場合なの
で、下位側への転送処理は不要である。
In step S44, it is checked whether the received block is a header block. If it is determined to be the header block, the process proceeds to step S45. The processing after step S45 is the same as the processing after step S26 in FIG. That is, step S45 and step S4
In step 6, it is checked whether the destination ID number stored in the header block matches the ID number of the own data terminal device. When it is confirmed that they match, a flag indicating that the download data is addressed to the own data terminal device is turned on (step S47), and the process returns to step S43 to receive the next block. In the flow of FIG. 4, since another data terminal device is connected to the lower side, it is necessary to transfer the header block to this data terminal device, and the processing for this transfer (step S29) is entered. However, since it is connected to the final end of the series connection here, transfer processing to the lower side is unnecessary.

【0039】前記ステップS46でID番号と一致しな
いと判断されたときにはステップS48で自データ端末
装置宛のダウンロードデータである旨を示すフラグをオ
フし、次のブロックを受信するために前記ステップS4
3へ戻る。
When it is determined in step S46 that the ID number does not match, the flag indicating that the download data is addressed to the own data terminal device is turned off in step S48, and the step S4 is performed to receive the next block.
Return to 3.

【0040】一方、前記ステップS44において、受信
したブロックがヘッダブロックではないと判断された場
合には、ステップS49へ進み、それがデータブロック
か否かを判断する。データブロックであると判断された
ときにはステップS50へ進み、前記ステップS47及
びステップS48で設定したフラグを調べる。自データ
端末装置宛のダウンロードデータであると判断したとき
にはステップS51へ進み、自データ端末装置宛のダウ
ンロードデータではないと判断したときにはそのブロッ
クを読み捨てて前記ステップS43へ戻り、次のブロッ
クの受信を行う。ステップS51では、自データ端末装
置宛のダウンロードデータを前記ステップS41でオー
プンしたファイルに格納し、次のブロックを受信すべく
前記ステップS43へ戻る。なお、ここでも先に説明し
たように図4のフローと比べて下位側のデータ端末装置
にデータブロックを転送する処理がない。
On the other hand, if it is determined in step S44 that the received block is not the header block, the process proceeds to step S49 to determine whether it is a data block. When it is determined that the block is a data block, the process proceeds to step S50, and the flag set in steps S47 and S48 is checked. If it is determined that the download data is for the own data terminal device, the process proceeds to step S51. If it is determined that the download data is not for the own data terminal device, the block is discarded and the process returns to step S43 to receive the next block. To do. In step S51, the download data addressed to the own data terminal device is stored in the file opened in step S41, and the process returns to step S43 to receive the next block. Here, as described above, there is no process of transferring the data block to the lower data terminal device as compared with the flow of FIG.

【0041】前記ステップS49で、受信したブロック
がデータブロックではないと判断したときにはステップ
S52へ進み、受信したブロックが終了ブロックか否か
を判断する。終了ブロックであると判断されたときに
は、ステップS53へ進む。ここでも先に説明したよう
に図4のフローと比べて下位側のデータ端末装置に終了
ブロックを転送する処理がない。
When it is determined in step S49 that the received block is not the data block, the process proceeds to step S52, and it is determined whether the received block is the end block. When it is determined that the block is the end block, the process proceeds to step S53. Here again, as described above, there is no processing of transferring the end block to the lower data terminal device as compared with the flow of FIG.

【0042】ステップS53では、前記ステップS41
でオープンして前記ステップS51で自データ端末装置
宛のダウンロードデータを格納したファイルをクローズ
し、次のステップS54では、上位側からダウンロード
データを受信するために前記42でオープンした光通信
ポート9をクローズし、処理を終了する。また、前記ス
テップS52で終了ブロックではないと判断されたとき
にはそのブロックを無視して前記ステップS43へ戻
り、次のブロックを受信する。
At step S53, the step S41 is performed.
In step S51, the file storing the download data addressed to the own data terminal device is closed, and in the next step S54, the optical communication port 9 opened in step 42 for receiving the download data from the upper side is opened. Close and end the process. When it is determined in step S52 that the block is not the end block, the block is ignored and the process returns to step S43 to receive the next block.

【0043】このように、従来のダウンロードデータ時
には使われなかった汎用通信ポート10を有効に活用
し、上位側から受信したダウンロードデータを下位側へ
転送することで1回のダウンロード操作でホスト装置か
ら複数のデータ端末装置にダウンロードすることができ
る。また、ヘッダブロックに送り先ID番号を付加する
ことで、多数のデータ端末装置の中から選択的に特定の
複数のデータ端末装置に固有のダウンロードデータを1
回のダウンロード操作で転送することができる。
As described above, by effectively utilizing the general-purpose communication port 10 which has not been used for the conventional download data, and transferring the download data received from the upper side to the lower side, the host device can perform one download operation. It can be downloaded to multiple data terminal devices. Also, by adding the destination ID number to the header block, the download data unique to a plurality of specific data terminal devices can be selectively selected from a large number of data terminal devices.
It can be transferred in one download operation.

【0044】図6及び図7は、本発明の第2実施例を示
すダウンロード方法の処理を示すフローチャートであ
り、本実施例においても図1及び図2に示す構成は同一
である。
6 and 7 are flowcharts showing the processing of the download method showing the second embodiment of the present invention, and the configurations shown in FIGS. 1 and 2 are the same in this embodiment as well.

【0045】上記第1実施例における図4及び図5に示
す処理フローでは、データ転送中のエラーに付いては考
慮していない。すなわち、転送経路が短い場合は問題は
ないが、転送経路が長くなった場合、エラーが発生する
確率は高くなり、ダウンロードの信頼性を向上するため
にはエラー発生に付いて考慮する必要がある。図18に
示す従来のダウンロード方式では転送中にエラーを検出
した場合、1対1の通信であるので、転送の親元である
ホスト装置から再送する。図2に説明した接続方法の場
合、転送経路のいずれかでエラーが発生したときに、ホ
スト装置まで遡ってデータを再送信するのは無駄であ
る。
In the processing flow shown in FIGS. 4 and 5 in the first embodiment, an error during data transfer is not taken into consideration. That is, if the transfer path is short, there is no problem, but if the transfer path is long, the probability of error occurrence is high, and in order to improve the reliability of download, it is necessary to consider the error occurrence. . In the conventional download method shown in FIG. 18, when an error is detected during transfer, the communication is one-to-one, so the host device that is the parent of the transfer retransmits the error. In the case of the connection method described in FIG. 2, it is useless to retransmit the data back to the host device when an error occurs in any of the transfer paths.

【0046】そこで、本実施例では、エラー再送をホス
ト装置まで遡らずにエラーが発生した転送系にだけ限定
して、再送の影響を最小限に抑えている。
Therefore, in the present embodiment, the error retransmission is limited to only the transfer system in which the error has occurred without going back to the host device, and the influence of the retransmission is minimized.

【0047】図6及び図7はその処理フローの例を示す
ものである。
6 and 7 show an example of the processing flow.

【0048】まず、ステップS61では、これから受信
するダウンロードデータを格納するためのファイルをオ
ープンし、続いて上位側から送られてくるダウンロード
データを受信するために光通信ポート9をオープンする
(ステップS62)。さらに、光通信ポート9から受信
したダウンロードデータを下位側へ転送するために汎用
通信ポート10をオープンした後(ステップS63)、
上位側から送られてくるダウンロードデータを光通信ポ
ート9を通して受信する(ステップS64)。
First, in step S61, a file for storing the download data to be received is opened, and subsequently, the optical communication port 9 is opened for receiving the download data sent from the host side (step S62). ). Further, after the general-purpose communication port 10 is opened to transfer the download data received from the optical communication port 9 to the lower side (step S63),
The download data sent from the upper side is received through the optical communication port 9 (step S64).

【0049】そして、ステップS65では、受信動作に
エラーがないかを確認し、エラーがないと判断されたと
きにはステップS66へ進み、エラーがあればステップ
S66′へ進む。ステップS66′では、異常応答の制
御コードを光通信ポート9を経由して上位側へ送信し、
上位側からの再送を待つために前記ステップS64へ戻
る。ステップS66では、正常応答の制御コードを光通
信ポート9を経由して上位側へ送信し、次のステップS
67で、受信したブロックがヘッダブロックか否かを調
べ、ヘッダブロックであると判断したときにはステップ
S68へ進み、ヘッダブロックでないと判断したときに
はステップS69へ進む。
Then, in step S65, it is confirmed whether or not there is an error in the receiving operation. If it is determined that there is no error, the process proceeds to step S66, and if there is an error, the process proceeds to step S66 '. In step S66 ', the control code of the abnormal response is transmitted to the upper side via the optical communication port 9,
The process returns to step S64 to wait for the retransmission from the upper side. In step S66, the control code of the normal response is transmitted to the upper side via the optical communication port 9, and the next step S66
In 67, it is checked whether the received block is a header block. If it is determined that the block is a header block, the process proceeds to step S68, and if it is determined that it is not the header block, the process proceeds to step S69.

【0050】ステップS68では、ヘッダブロックに格
納されている送り先ID番号を確認し、ステップS70
ではヘッダブロックに格納されていた送り先ID番号が
自データ端末装置のID番号と一致するかを調べる。一
致しているときにはステップS71へ進み、一致してい
ないときにはステップS72へ進む。ステップS71で
は、受信中のダウンロードデータが自データ端末装置宛
である旨を示すフラグをオンする。また、ステップS7
2では、自データ端末装置宛のダウンロードデータであ
る旨を示すフラグをオフし、フラグの設定が終わったな
ら、受信したヘッダブロックの内容を下位側へ転送する
ために前記ステップS73へ進む。
In step S68, the destination ID number stored in the header block is confirmed, and in step S70
Then, it is checked whether the destination ID number stored in the header block matches the ID number of the own data terminal device. If they match, the process proceeds to step S71, and if they do not match, the process proceeds to step S72. In step S71, a flag indicating that the download data being received is addressed to the own data terminal device is turned on. Also, step S7
In 2, the flag indicating that it is the download data addressed to the own data terminal device is turned off, and when the setting of the flag is completed, the process proceeds to step S73 in order to transfer the content of the received header block to the lower side.

【0051】一方、ステップS69では、受信したブロ
ックがデータブロックか否かを判断する。データブロッ
クであると判断されたときにはステップS74へ進み、
データブロックでないときにはステップS75へ進む。
ステップS74では、前記ステップS71及びステップ
S72で設定されたデータブロックが自データ端末装置
宛のデータであるか否かを示すフラグを調べる。自デー
タ端末装置宛のダウンロードデータであると判断したと
きにはステップS76へ進み、受信したブロックを前記
ステップS61でオープンしたファイルに格納する。ま
た、自データ端末装置宛のダウンロードデータではない
と判断したときには前記ステップS76をスキップして
前記ステップS73の処理を経た後、ステップS77
(図6)へ進む。
On the other hand, in step S69, it is determined whether the received block is a data block. When it is determined that the block is a data block, the process proceeds to step S74,
If it is not a data block, the process proceeds to step S75.
In step S74, a flag indicating whether or not the data block set in steps S71 and S72 is data addressed to the own data terminal device is checked. When it is determined that the downloaded data is addressed to the own data terminal device, the process proceeds to step S76, and the received block is stored in the file opened in step S61. When it is determined that the download data is not for the own data terminal device, the step S76 is skipped, the process of the step S73 is performed, and then the step S77.
Proceed to (Fig. 6).

【0052】ステップS77では下位側からの応答を待
ち、次のステップS78で下位側からの応答の内容を判
断する。この処理の流れは、同じ図6のステップS6
4、ステップS65、ステップS66、及びステップS
67の処理の流れに対応する。図2に示す直列接続の例
で中間部に接続されるデータ端末装置13,15では、
この図6及び図7に示す処理フローが同様に実行され
る。
In step S77, the response from the lower side is waited, and in the next step S78, the content of the response from the lower side is judged. The flow of this processing is the same as step S6 in FIG.
4, step S65, step S66, and step S
This corresponds to the processing flow of 67. In the data terminal devices 13 and 15 connected to the intermediate part in the example of serial connection shown in FIG.
The processing flows shown in FIGS. 6 and 7 are similarly executed.

【0053】前記ステップS78で下位側からの応答が
異常でなければ次のデータブロックを受信するために前
記ステップS64へ進む。応答が異常であれば、転送し
たデータブロックを再送するために前記ステップS73
へ戻る。
If the response from the lower side is abnormal in step S78, the process proceeds to step S64 to receive the next data block. If the response is abnormal, in order to retransmit the transferred data block, the above step S73
Return to.

【0054】前記ステップS69において、受信したブ
ロックがデータブロックではないと判断されたときに実
行されるステップS75では、受信したブロックが終了
ブロックか否かを判断する。終了ブロックであると判断
されたときには、ステップS79へ進み、終了ブロック
ではないと判断されたときには、そのブロックを読み飛
ばして前記ステップS64へ戻り、次のブロックの受信
を継続する。
In step S75 executed when it is determined in step S69 that the received block is not the data block, it is determined whether the received block is the end block. When it is determined that the block is the end block, the process proceeds to step S79. When it is determined that the block is not the end block, the block is skipped and the process returns to step S64 to continue the reception of the next block.

【0055】ステップS79では、受信した終了ブロッ
クを汎用通信ポート10を通して下位側へ転送し、次の
ステップS80では、終了ブロックの転送に対する下位
側からの応答を待つ。そして、ステップS81では下位
側からの応答を判断する。応答が異常であれば、前記ス
テップS79へ戻り、終了ブロックを再び下位側へ転送
する。ステップS81で異常でなければステップS82
へ進み、ダウンロードデータを格納したファイルをクロ
ーズし、次のステップS83では、上位側からダウンロ
ードデータを受信していた光通信ポート9をクローズす
る。そして、ステップS84では、受信したダウンロー
ドデータを下位側へ転送するためにオープンした汎用通
信ポート10をクローズして、処理を終了する。
In step S79, the received end block is transferred to the lower side through the general-purpose communication port 10, and in the next step S80, a response from the lower side to the transfer of the end block is waited for. Then, in step S81, the response from the lower side is judged. If the response is abnormal, the process returns to step S79, and the end block is transferred to the lower side again. If it is not abnormal in step S81, step S82
Then, the file storing the download data is closed, and in the next step S83, the optical communication port 9 receiving the download data from the upper side is closed. Then, in step S84, the general-purpose communication port 10 opened to transfer the received download data to the lower side is closed, and the process is ended.

【0056】図8は、図2に示す直列接続の最終端に接
続されるデータ端末装置17におけるエラー再送を考慮
した場合のダウンロード方法を実現する処理のフローチ
ャートである。図6及び図7のフローチャートに比べ
て、下位側へ転送するための処理がないのが特徴であ
る。
FIG. 8 is a flow chart of a process for realizing the download method in the case where the data terminal device 17 connected to the final end of the serial connection shown in FIG. 2 takes error retransmission into consideration. As compared with the flowcharts of FIGS. 6 and 7, it is characterized in that there is no processing for transferring to the lower side.

【0057】まず、ステップS91では、受信したダウ
ンロードデータを格納するためのファイルをオープン
し、続くステップS92では、ダウンロードデータを受
信するために光通信ポート9をオープンする。さらにス
テップS93では、光通信ポート9からダウンロードデ
ータを受信し、ステップS94では、受信動作にエラー
が発生しているか否かを判断する。エラーが発生してい
ると判断したときにはステップS95へ進み、異常が発
生した旨を上位側のデータ端末装置に知らせるため、異
常応答の制御コードを光通信ポート9に返し、上位側か
らの再送を待つために前記ステップS93へ戻る。
First, in step S91, a file for storing the received download data is opened, and in the following step S92, the optical communication port 9 is opened for receiving the download data. Further, in step S93, the download data is received from the optical communication port 9, and in step S94, it is determined whether or not an error has occurred in the receiving operation. When it is determined that an error has occurred, the process proceeds to step S95, in order to notify the higher-order side data terminal device of the occurrence of the abnormality, the control code of the abnormality response is returned to the optical communication port 9 and retransmitted from the higher-order side. The process returns to step S93 to wait.

【0058】エラーが発生していなければステップS9
6へ進み、ダウンロードデータが正常に受信できた旨を
上位側のデータ端末装置に知らせるために、正常応答の
制御コードを光通信ポート9に返す。次のステップS9
7では、受信したブロックがヘッダブロックか否かを調
べ、ヘッダブロックであると判断したときにはステップ
S98へ進む。ステップS98では、ヘッダブロックに
格納されている送り先ID番号を確認し、ステップS9
9で自データ端末装置のID番号と一致するかを調べ
る。一致しているときにはステップS100へ進み、自
データ端末装置宛のダウンロードデータであることを示
すフラグをオンし、再び上位側からのデータを受信する
ために前記ステップS93へ戻る。
If no error has occurred, step S9.
6, the control code of the normal response is returned to the optical communication port 9 in order to notify the upper data terminal device that the download data has been normally received. Next step S9
In step 7, it is checked whether the received block is a header block. If it is determined that the block is a header block, the process proceeds to step S98. In step S98, the destination ID number stored in the header block is confirmed, and in step S9
At 9 it is checked whether it matches the ID number of the own data terminal device. When they match, the process proceeds to step S100, the flag indicating that the download data is addressed to the own data terminal device is turned on, and the process returns to step S93 in order to receive the data from the upper side again.

【0059】前記ステップS99でID番号と一致しな
いと判断したときには、ステップS101で自データ端
末装置宛のダウンロードデータである旨を示すフラグを
オフし、再び上位側からのデータを受信するために前記
ステップS93へ戻る。
If it is determined in step S99 that the ID number does not match, the flag indicating that it is the download data addressed to the own data terminal device is turned off in step S101, and the data is received again from the upper side in order to receive it. Return to step S93.

【0060】一方、ステップS97でデータブロックで
はないと判断されたときにはステップS102へ進み、
受信したブロックがデータブロックか否かを判断する。
データブロックであると判断されたときにはステップS
103へ進み、そのデータブロックが自データ端末装置
宛のデータブロックであるか否かを、前記ステップS1
00及びステップS101で設定したフラグを参照して
判断する。自データ端末装置宛のデータブロックではな
いと判断されたときには、そのブロックを読み飛ばし、
前記ステップS93へ戻り、次のブロックの受信を待
つ。
On the other hand, if it is determined in step S97 that the data block is not a data block, the process proceeds to step S102.
It is determined whether the received block is a data block.
If it is determined to be a data block, step S
The process proceeds to step 103 to check whether the data block is a data block addressed to the own data terminal device or not, in the step S1.
00 and the flag set in step S101 to determine. When it is determined that the data block is not addressed to the own data terminal device, the block is skipped,
The process returns to step S93 and waits for the reception of the next block.

【0061】前記ステップS103で自データ端末装置
宛のデータブロックであると判断したときにはステップ
S104へ進み、受信したデータブロックの内容をステ
ップS91でオープンしたファイルに格納し、前記ステ
ップS93へ戻り、次のブロックの受信を待つ。
When it is determined in step S103 that the data block is addressed to the own data terminal device, the process proceeds to step S104, the content of the received data block is stored in the file opened in step S91, and the process returns to step S93. Wait for the block to be received.

【0062】また、前記ステップS102でデータブロ
ックではないと判断されたときには、ステップS105
へ進み、受信したブロックが終了ブロックであるか否か
を判断する。終了ブロックではないと判断されたときに
はそのブロックを読み飛ばし、前記ステップS93へ戻
り、次のブロックの受信を待つ。前記ステップS105
で、受信したブロックが終了ブロックであると判断した
ときにはステップS106へ進み、前記ステップS91
でオープンし前記ステップS104で受信したデータブ
ロックを格納したファイルをクローズする。ステップS
107では前記ステップS92でオープンした光通信ポ
ート9をクローズし、処理を終了する。
If it is determined in step S102 that the block is not a data block, step S105.
Then, it is determined whether or not the received block is the end block. When it is determined that the block is not the end block, the block is skipped and the process returns to step S93 to wait for the reception of the next block. Step S105
If it is determined that the received block is the end block, the process proceeds to step S106, and the step S91 is performed.
And the file storing the data block received in step S104 is closed. Step S
In 107, the optical communication port 9 opened in step S92 is closed, and the process ends.

【0063】以上のように、本実施例の図6〜図8のフ
ローに従えば、データ転送時のエラーを検出してダウン
ロードデータを再送し、ダウンロードの信頼性を向上さ
せることができる。また、エラー発生時のダウンロード
データの再送もホスト装置まで遡らずにエラーの発生し
た通信系だけに限定することができる。
As described above, according to the flow charts of FIGS. 6 to 8 of the present embodiment, it is possible to detect an error at the time of data transfer and retransmit the download data to improve the reliability of the download. Further, the resending of the download data when an error occurs can be limited to only the communication system in which the error occurred without going back to the host device.

【0064】次に、本発明の第3実施例を説明する。Next, a third embodiment of the present invention will be described.

【0065】上記第1及び第2実施例では、データブロ
ックが一つであり、転送も1バイトずつ行っているが、
本実施例のようにデータブロックをある長さで分割し、
エラー確認をブロック単位で行うことで、転送制御のた
めの制御コードの転送量を少なくすることができ、これ
によって、転送が高速化される。また、ブロック毎にエ
ラー訂正用の情報を付加し、受信側でのエラー訂正を可
能し、結果的にエラー再送の数を減らすこともできる。
In the first and second embodiments, the number of data blocks is one and the transfer is also performed byte by byte.
As in this embodiment, the data block is divided by a certain length,
By performing the error confirmation on a block-by-block basis, it is possible to reduce the transfer amount of the control code for the transfer control, which speeds up the transfer. Further, it is possible to add error correction information to each block, enable error correction on the receiving side, and consequently reduce the number of error retransmissions.

【0066】図9は、本発明の第3実施例におけるダウ
ンロードデータの内容の一例を示す図である。
FIG. 9 is a diagram showing an example of the contents of download data in the third embodiment of the present invention.

【0067】図中31は、ブロックの種類を示すIDで
あり、本例では、01はヘッダブロック、02はデータ
ブロック、03は終了ブロックを示す。また、図中32
は、ブロックの長さを示す。33はブロックの内容その
ものであり、IDにより示された内容を持つ。さらに、
34は、ブロック毎に付加されたエラー訂正用の情報で
ある。なお、本例では、データブロックが複数存在して
いる。
In the figure, 31 is an ID indicating the type of block. In this example, 01 is a header block, 02 is a data block, and 03 is an end block. In addition, 32 in the figure
Indicates the block length. 33 is the contents of the block itself, which has the contents indicated by the ID. further,
Reference numeral 34 is error correction information added to each block. In this example, there are a plurality of data blocks.

【0068】図10及び図11は、本実施例のダウンロ
ード方法を実現する処理のフローチャートである。この
処理は、図2に示すデータ端末装置のうちの中間部に接
続されたデータ端末装置13または15で実行される。
FIG. 10 and FIG. 11 are flowcharts of processing for realizing the download method of this embodiment. This process is executed by the data terminal device 13 or 15 connected to the intermediate part of the data terminal devices shown in FIG.

【0069】まず、ステップS111では、これから受
信するダウンロードデータを格納するファイルをオープ
ンし、続いて上位側からダウンロードデータを受信する
ために光通信ポート9をオープンする(ステップS11
2)。さらに、受信したダウンロードデータを下位側へ
転送するために汎用通信ポート10をオープンした後
(ステップS113)、光通信ポート9から1ブロック
を受信する(ステップS114)。
First, in step S111, a file that stores download data to be received is opened, and then the optical communication port 9 is opened to receive the download data from the host side (step S11).
2). Further, after opening the general-purpose communication port 10 to transfer the received download data to the lower side (step S113), one block is received from the optical communication port 9 (step S114).

【0070】そして、ステップS115では、受信動作
にエラーがないかを確認し、エラーがあればステップS
116へ進み、異常応答の制御コードを光通信ポート9
を経由して上位側へ送信し、前記ステップS114へ戻
り、ダウンロードデータの再送を待つ。エラーがないと
判断されたときにはステップS117へ進み、受信した
ブロックの内容に誤りがないかを判断する。この判断は
図9に示すダウンロードデータ内の各ブロック33に付
加されているエラー訂正用情報34を基に行う。誤りが
あったと判断したときには、ステップS118へ進んで
エラー訂正を行う。
Then, in step S115, it is confirmed whether or not there is an error in the receiving operation.
Proceed to 116, and set the control code for the abnormal response to the optical communication port 9
To the upper side, and returns to step S114 to wait for the resending of the download data. When it is determined that there is no error, the process proceeds to step S117, and it is determined whether or not there is an error in the content of the received block. This determination is made based on the error correction information 34 added to each block 33 in the download data shown in FIG. When it is determined that there is an error, the process proceeds to step S118 to correct the error.

【0071】続くステップS119ではエラー訂正が可
能であるか否かを判断し、訂正ができなければ前記ステ
ップS116へ進み、異常応答の制御コードを上位側へ
送って前記ステップS114へ戻り、ダウンロードデー
タの再送を待つ。訂正が可能であればステップS120
へ進む。また、ステップS117で、受信したブロック
の内容に誤りがないと判断したときにも、ステップS1
20へ進む。ステップS120では、上位側へ正常応答
の制御コードを光通信ポート9へ送り、次いでステップ
S121で、受信したブロックのIDを調べ、ヘッダブ
ロックであるか否かを判断する。ヘッダブロックである
と判断したときにはステップS122へ進み、ヘッダブ
ロック内に記述されているダウンロードデータの送り先
ID番号を調べる。
In the following step S119, it is determined whether or not the error can be corrected. If the error cannot be corrected, the process proceeds to the step S116, the control code of the abnormal response is sent to the upper side, the process returns to the step S114, and the download data is returned. Wait for resend. If correction is possible, step S120
Go to. In addition, when it is determined in step S117 that the content of the received block is correct, step S1
Go to 20. In step S120, a control code of a normal response is sent to the upper side to the optical communication port 9, and in step S121, the ID of the received block is checked to determine whether it is a header block. If it is determined to be the header block, the process proceeds to step S122, and the destination ID number of the download data described in the header block is checked.

【0072】ステップS123では、そのID番号が自
データ端末装置のID番号と一致するかを調べる。一致
しているときにはステップS124へ進み、自データ端
末装置宛のダウンロードデータである旨を示すフラグを
オンする。前記ステップS123で自データ端末装置の
ID番号と一致しないと判断されたときにはステップS
125へ進み、次データ端末装置宛のダウンロードデー
タである旨を示すフラグをオフし、ステップS126
(図11)へ進む。
In step S123, it is checked whether the ID number matches the ID number of the own data terminal device. If they match, the process proceeds to step S124, and a flag indicating that the download data is addressed to the own data terminal device is turned on. When it is determined in step S123 that the ID number of the own data terminal device does not match, step S123
In step S126, the flag indicating that the download data is addressed to the next data terminal device is turned off, and the process proceeds to step S126.
Proceed to (Fig. 11).

【0073】また、前記ステップS121でヘッダブロ
ックではないと判断されたときにはステップS127
(図11)へ進み、受信したブロックがデータブロック
か否かを判断する。データブロックであると判断したと
きには、ステップS128へ進み、そのデータブロック
が自データ端末装置宛のデータブロックであるか否かを
前記ステップS124及びステップS125で設定した
フラグを参照して判断する。自データ端末装置宛のデー
タブロックであると判断されたときにはステップS12
9へ進み、受信したデータブロックをステップS111
でオープンしたファイルに格納する。
If it is determined in step S121 that the block is not the header block, step S127.
(FIG. 11), it is determined whether the received block is a data block. When it is determined that the data block is a data block, the process proceeds to step S128, and it is determined whether the data block is a data block addressed to the own data terminal device by referring to the flags set in the steps S124 and S125. When it is determined that the data block is addressed to the own data terminal device, step S12
9, the received data block is processed in step S111.
Store in the file opened by.

【0074】その後のステップS126では、受信した
データブロックを下位側へ送るため、そのまま汎用通信
ポート10へ転送し、次いでステップS130で下位側
からの応答を待つ。そして、ステップS131で下位側
からの応答が異常であるか否かを判断し、異常であると
判断したときには、前記ステップS126へ戻り、デー
タブロックを再送する。異常でないと判断されたときに
は前記ステップS114へ戻り、次ぎのブロックの受信
を待つ。
In the subsequent step S126, the received data block is sent to the lower side, so that it is transferred to the general-purpose communication port 10 as it is, and then in step S130, the response from the lower side is waited for. Then, in step S131, it is determined whether or not the response from the lower side is abnormal. When it is determined that the response is abnormal, the process returns to step S126 to retransmit the data block. When it is determined that there is no abnormality, the process returns to step S114 and waits for reception of the next block.

【0075】この処理の流れは、同じ図10のステップ
S114、ステップS115、ステップS116、ステ
ップS117、ステップS118、ステップS119、
及びステップS120の処理の流れに対応する。即ち、
前記ステップS116で返された異常応答の制御コード
を上位側データ端末装置のステップS130の処理で受
信され、ステップS131で異常応答と判断されたとき
には前記ステップS126でデータブロックが再送さ
れ、その再送された内容が下位側データ端末装置の前記
ステップS114の処理で受信され、処理が継続され
る。
The flow of this process is the same as that of step S114, step S115, step S116, step S117, step S118, step S119 of FIG.
And the processing flow of step S120. That is,
The control code of the abnormal response returned in step S116 is received in the process of step S130 of the higher-order data terminal device, and when the abnormal response is determined in step S131, the data block is retransmitted in step S126 and retransmitted. The received contents are received in the process of step S114 of the lower data terminal device, and the process is continued.

【0076】一方、前記ステップS127において、受
信したブロックがデータブロックではないと判断された
ときにはステップS132へ進み、受信したブロックが
終了ブロックか否かを判断する。終了ブロックではない
と判断されたときには、そのブロックを読み飛ばして前
記ステップS114へ戻り、再びブロックが送られてく
るのを待つ。終了ブロックであると判断されたときには
ステップS133へ進み、受信した終了ブロックを汎用
通信ポート10を通して下位側へ送信し、次のステップ
S134で、下位側からの応答を待つ。
On the other hand, when it is determined in step S127 that the received block is not the data block, the process proceeds to step S132, and it is determined whether the received block is the end block. When it is determined that the block is not the end block, the block is skipped and the process returns to step S114 to wait for the block to be sent again. When it is determined that the block is the end block, the process proceeds to step S133, the received end block is transmitted to the lower side through the general-purpose communication port 10, and the next step S134 waits for a response from the lower side.

【0077】そして、ステップS135では下位側から
の応答を判断し、異常応答であれば前記ステップS13
3へ戻り、下位側へ終了ブロックを再送する。ステップ
S135で異常応答ではないと判断されたときにはステ
ップS136へ進み、受信したデータブロックを格納し
たファイルをクローズし、次のステップS137で、前
記ステップS112及び前記ステップS113でオープ
ンした光通信ポート9と汎用通信ポート10をクローズ
し処理を終了する。
Then, in step S135, the response from the lower side is judged.
Returning to 3, the end block is retransmitted to the lower side. When it is determined in step S135 that the response is not an abnormal response, the process proceeds to step S136, the file storing the received data block is closed, and in the next step S137, the optical communication port 9 opened in steps S112 and S113 is set. The general-purpose communication port 10 is closed and the process ends.

【0078】図12は、本実施例における最終端に接続
されるデータ端末装置17(図2)の処理を示すフロー
チャートである。
FIG. 12 is a flow chart showing the processing of the data terminal device 17 (FIG. 2) connected to the final end in this embodiment.

【0079】まず、ステップS141では、これから受
信するダウンロードデータを格納するファイルをオープ
ンし、続いてステップS142で上位側からダウンロー
ドデータを受信するための光通信ポート9をオープンす
る。さらに、ステップS143では、上位側から1ブロ
ックのダウンロードデータを受信する。ステップS14
4では、ダウンロードデータの受信動作にエラーがない
かを確認し、受信エラーが発生していれば、ステップS
145へ進み、受信エラーが発生していなければ、ステ
ップS146へ進む。
First, in step S141, the file for storing the download data to be received is opened, and subsequently, in step S142, the optical communication port 9 for receiving the download data from the upper side is opened. Further, in step S143, one block of download data is received from the upper side. Step S14
In step 4, it is confirmed whether there is an error in the download data reception operation. If a reception error occurs, step S
The process proceeds to step 145, and if there is no reception error, the process proceeds to step S146.

【0080】ステップS146では、受信したブロック
の内容に誤りがないかを判断する。誤りがあると判断し
たときには、ステップS147へ進み、エラー訂正用情
報34を使用してエラー訂正を行う。その後は、ステッ
プS148で、エラー訂正が正しく行われたか否かを判
断し、エラー訂正が正しく行われたときにはステップS
149へ進み、上位側へ正常応答の制御コードを返す。
エラー訂正が正しく行われなかったときには前記ステッ
プS145へ進み、上位側へ異常応答の制御コードを送
り、前記ステップS143へ戻り、ブロックの再送を待
つ。
In step S146, it is determined whether or not there is an error in the content of the received block. When it is determined that there is an error, the process proceeds to step S147 and error correction is performed using the error correction information 34. After that, in step S148, it is determined whether or not the error correction is correctly performed. If the error correction is correctly performed, the step S148 is performed.
Proceeding to 149, the control code of normal response is returned to the upper side.
If the error is not corrected correctly, the process proceeds to step S145, the control code of the abnormal response is sent to the upper side, the process returns to step S143, and the block is retransmitted.

【0081】前記ステップS146で、受信したブロッ
クの内容が正しいと判断したときには前記ステップS1
49へ進み、ブロックが正しく受信できた旨を上位側に
通知するために正常応答の制御コードを光通信ポート9
へ送る。続くステップS150では、ブロックのID3
1を調べる。ヘッダブロックであると判断されたときに
はステップS151へ進み、ヘッダブロック内に格納さ
れているダウンロードデータの送り先ID番号を確認す
る。
If it is determined in step S146 that the content of the received block is correct, then step S1
In step 49, the control code of normal response is sent to the optical communication port 9 to notify the upper side that the block has been correctly received.
Send to. In the following step S150, the block ID3
Examine 1. If it is determined to be the header block, the process proceeds to step S151 to confirm the destination ID number of the download data stored in the header block.

【0082】ステップS152では、そのID番号が自
データ端末装置のID番号と一致するかを調べる。一致
しているときにはステップS153へ進み、自データ端
末装置宛のダウンロードデータである旨を示すフラグを
オンし、前記ステップS143へ戻って次のブロックの
受信を待つ。また、前記ステップS152で自データ端
末装置のID番号と一致しないと判断されたときにはス
テップS154へ進み、次データ端末装置宛のダウンロ
ードデータである旨を示すフラグをオフし、前記ステッ
プS143へ戻って再びブロックの受信を待つ。
In step S152, it is checked whether the ID number matches the ID number of the own data terminal device. If they match, the process proceeds to step S153, the flag indicating that the data is the download data addressed to the own data terminal device is turned on, and the process returns to step S143 to wait for reception of the next block. If it is determined in step S152 that the ID number of the data terminal device does not match, the process proceeds to step S154, the flag indicating that the download data is addressed to the next data terminal device is turned off, and the process returns to step S143. Wait for the block to be received again.

【0083】一方、前記ステップS150でヘッダブロ
ックではないと判断されたときにはステップS155へ
進み、ブロックIDを調べ、データブロックか否かを判
断する。データブロックであると判断したときには、ス
テップS156へ進み、前記ステップS153及びステ
ップS154で設定された自データ端末装置宛のダウン
ロードデータである旨のフラグを調べる。自データ端末
装置宛のデータブロックであると判断されたときにはス
テップS157へ進み、受信したデータブロックを前記
ステップS141でオープンしたファイルに格納する。
自データ端末装置宛のデータブロックではないと判断さ
れたときには、そのダウンロードデータを読み飛ばし、
前記ステップS143へ戻って次のブロックの受信を待
つ。
On the other hand, when it is determined in step S150 that the block is not the header block, the process proceeds to step S155, the block ID is checked, and it is determined whether the block is a data block. When it is determined that the data block is a data block, the process proceeds to step S156, and the flag indicating that the data is the download data destined for the own data terminal device set in steps S153 and S154 is checked. When it is determined that the data block is addressed to the own data terminal device, the process proceeds to step S157, and the received data block is stored in the file opened in step S141.
When it is determined that the data block is not addressed to the own data terminal device, the download data is skipped,
The process returns to step S143 and waits for reception of the next block.

【0084】また、前記ステップS155でデータブロ
ックではないと判断されたときには、ステップS158
へ進み、受信したブロックが終了ブロックか否かを判断
する。終了ブロックではないと判断されたときには、そ
のブロックを読み飛ばして前記ステップS143へ戻
り、次のブロックの受信を待つ。終了ブロックであると
判断されたときにはステップS159へ進み、前記ステ
ップS141でオープンしたファイルをクローズする。
そして、ステップS160で前記ステップS142でオ
ープンした光通信ポート9をクローズし、処理を終わら
せる。
If it is determined in step S155 that the block is not a data block, step S158.
Then, it is determined whether the received block is the end block. If it is determined that the block is not the end block, the block is skipped and the process returns to step S143 to wait for reception of the next block. When it is determined that the block is the end block, the process proceeds to step S159, and the file opened in step S141 is closed.
Then, in step S160, the optical communication port 9 opened in step S142 is closed, and the process ends.

【0085】図10〜図12のフローに従えば、複数に
分割したブロック毎に通信の確認が行われるので、通信
確認のための制御コードの受け渡しを減らすことができ
る。また、ブロック内のデータの正当性を検証できる情
報34を付加することができ、ブロック内容の正当性の
確認も行われる。さらに、ブロックにエラーが発生した
ときは、ブロック内容のエラー訂正も行われるので、エ
ラー再生を減少することができる。
According to the flow charts of FIGS. 10 to 12, since the communication is confirmed for each block divided into a plurality of blocks, it is possible to reduce the passing of the control code for confirming the communication. Further, information 34 that can verify the correctness of the data in the block can be added, and the correctness of the block contents can be confirmed. Furthermore, when an error occurs in a block, error correction of the block contents is also performed, so error reproduction can be reduced.

【0086】図13は、ダウンロードデータのフォーマ
ットの他の例である。本例は、図3及び図9のフォーマ
ット例に比べ、複数のヘッダブロックを持っている。図
中に示すヘッダブロック41に続くデータブロック41
−1〜41−3がヘッダブロック41に示されるファイ
ルAに格納すべき内容である。以下同様にヘッダブロッ
ク42に示されるファイルBにデータブロック42−1
〜42−3の内容を格納し、ヘッダブロック43に示さ
れるファイルCにデータブロック43−1〜43−3の
内容を格納する。また、図中44は、データ端末装置へ
ダウンロード動作の終了を指示する終了ブロックであ
る。
FIG. 13 shows another example of the format of download data. This example has a plurality of header blocks as compared with the format examples of FIGS. 3 and 9. Data block 41 following header block 41 shown in the figure
-1 to 41-3 are contents to be stored in the file A shown in the header block 41. Similarly, the data block 42-1 is added to the file B shown in the header block 42.
To 42-3 are stored, and the contents of the data blocks 43-1 to 43-3 are stored in the file C shown in the header block 43. In addition, reference numeral 44 in the drawing denotes an end block for instructing the data terminal device to end the download operation.

【0087】本実施例によれば、1回のダウンロード操
作で複数のファイルを選択的に任意のデータ端末装置に
ダウンロードすることができる。
According to this embodiment, a plurality of files can be selectively downloaded to any data terminal device by one download operation.

【0088】図14は、本実施例のヘッダブロックの内
容の例である。
FIG. 14 shows an example of the contents of the header block of this embodiment.

【0089】図中51は、ブロックの種別を表すブロッ
クIDである。図9の例ではヘッダブロックに01が割
り当ててある。52はブロックの長さが記入されてい
る。53はこのヘッダブロックに続くデータブロックを
格納すべきデータ端末装置のID番号が記入されてい
る。ここには、記入されているID番号の数と実際のI
D番号を記述する。ID番号の数が0の時は図2に示す
接続例のすべてのデータ端末装置に対するダウンロード
データであると定義することもできる。54は、このヘ
ッダブロックの次に続くデータブロックを格納すべきデ
ータ端末装置上のファイル名が記述されている。55は
そのファイルの長さが記述されている。56は、上記第
2実施例で説明したブロック単位でブロック内容の確認
とエラー訂正をするために必要なエラー訂正用の情報が
記述されている。
In the figure, reference numeral 51 is a block ID representing the type of block. In the example of FIG. 9, 01 is assigned to the header block. The block length 52 is filled in. 53, the ID number of the data terminal device that stores the data block following this header block is entered. Here, the number of ID numbers entered and the actual I
Describe the D number. When the number of ID numbers is 0, it can be defined as download data for all data terminal devices in the connection example shown in FIG. 54, the file name on the data terminal device in which the data block following the header block is to be stored is described. In 55, the length of the file is described. Reference numeral 56 describes error correction information necessary for confirming the block contents and error correction in block units described in the second embodiment.

【0090】このようなヘッダを使って次に説明する処
理フローに従えば、複数のダウンロードデータを図2に
示す接続方法で接続されているデータ端末装置に選択的
にダウンロードすることができる。
According to the processing flow described below using such a header, a plurality of download data can be selectively downloaded to the data terminal device connected by the connection method shown in FIG.

【0091】図15及び図16は、本実施例による図2
に示す接続例の中間に接続されるデータ端末装置13及
び15で実行される処理を示すフローチャートである。
FIG. 15 and FIG. 16 are shown in FIG.
11 is a flowchart showing processing executed by the data terminal devices 13 and 15 connected in the middle of the connection example shown in FIG.

【0092】まず、ステップS171では、上位側から
ダウンロードデータを受信するために光通信ポート9を
オープンし、続くステップS172では、上位側から受
信したダウンロードデータを下位側へ転送するために汎
用通信ポート10をオープンし、さらに、ステップS1
73では、上位側から光通信ポート9を経由して1ブロ
ックのダウンロードデータを受信する。
First, in step S171, the optical communication port 9 is opened to receive the download data from the upper side, and in the subsequent step S172, the general communication port is used to transfer the download data received from the upper side to the lower side. Open 10 and step S1
At 73, one block of download data is received from the upper side via the optical communication port 9.

【0093】そして、ステップS174では、受信動作
にエラーが発生したか否かを判断し、エラーがあればス
テップS175へ進み、上位側へブロックの再送を促す
ために異常応答の制御コードを光通信ポート9に返し、
前記ステップS173へ戻り、上位側からのダウンロー
ドデータの再送を待つ。前記ステップS174でエラー
がないと判断されたときにはステップS176へ進む。
ブロック内には図14に示すエラー訂正用の情報56が
付加されている。ステップS176では、このエラー訂
正用の情報56を調べ、受信したブロックの内容が正し
いか否かを判断する。ブロックの内容にエラーが発生し
ていると判断されたときにはステップS177へ進み、
エラー訂正用情報56を使ってブロックのエラーを訂正
する。
Then, in step S174, it is determined whether or not an error has occurred in the receiving operation, and if there is an error, the process proceeds to step S175, and an abnormal response control code is transmitted by optical communication to prompt the upper side to retransmit the block. Return to port 9,
The process returns to step S173 and waits for the resending of the download data from the upper side. If it is determined in step S174 that there is no error, the process proceeds to step S176.
The error correction information 56 shown in FIG. 14 is added to each block. In step S176, the error correction information 56 is checked to determine whether or not the content of the received block is correct. If it is determined that an error has occurred in the contents of the block, the process proceeds to step S177,
The error in the block is corrected using the error correction information 56.

【0094】エラーが多発するとエラー訂正ができない
場合があるので、ステップS178ではエラーの訂正が
可能か否かを判断する。エラー訂正が可能であれば前記
ステップS179へ進み、正常の場合のルートに戻る。
ステップS178で訂正が不可能であればステップS1
75へ進む。上位側にブロックの再送を促すために異常
応答の制御コードを光通信ポート9に返し、前記ステッ
プS173へ戻り、上位側からのブロックの再送を待
つ。
Since error correction may not be possible if many errors occur, it is determined in step S178 whether the error can be corrected. If the error can be corrected, the process proceeds to step S179 to return to the normal route.
If correction is impossible in step S178, step S1
Proceed to 75. A control code of an abnormal response is returned to the optical communication port 9 in order to prompt the upper side to retransmit the block, and the process returns to step S173 to wait for the block to be retransmitted from the upper side.

【0095】ステップS179では、上位側へブロック
が正常に受信できた旨を通知するために正常応答の制御
コードを光通信ポート9へ返す。さらに、ステップS1
80では、図14に示すブロックID51を調べ、受信
したブロックがヘッダブロックか否かを判断する。ヘッ
ダブロックであると判断されたときにはステップS18
1へ進み、ヘッダブロックではないと判断されたときに
はステップS182へ進む。ステップS182では、受
信したブロックがデータブロックであるか否かを判断
し、データブロックではないと判断されたときにはステ
ップS183へ進み、終了ブロックであるか否かを判断
し、終了ブロックではないと判断されたときにはそのブ
ロックを読み飛ばし、前記ステップS173へ戻り、次
のブロックの受信を待つ。
In step S179, a normal response control code is returned to the optical communication port 9 to notify the upper side that the block has been successfully received. Further, step S1
At 80, the block ID 51 shown in FIG. 14 is checked to determine whether the received block is a header block. If it is determined to be a header block, step S18
If it is determined that the block is not the header block, the process proceeds to step S182. In step S182, it is determined whether or not the received block is a data block, and if it is determined that it is not a data block, the process proceeds to step S183, it is determined whether or not it is an end block, and it is determined that it is not an end block. If so, the block is skipped and the process returns to step S173 to wait for reception of the next block.

【0096】ステップS183で終了ブロックであると
判断されたときにはステップS184へ進み、受信した
終了ブロックを下位側へ転送するためにそのブロックを
汎用通信ポート10へ送信する。ステップS185では
終了ブロックの転送に対する下位側からの応答を待つ。
ステップS186では、下位側の応答が異常応答である
か否かを判断し、異常応答であればステップS184へ
戻り終了ブロックを下位側へ再送する。異常応答でなけ
ればステップS187へ進み、受信ブロックを格納した
ファイルをクローズする。
When it is determined in step S183 that the block is the end block, the process proceeds to step S184, and the block is transmitted to the general-purpose communication port 10 in order to transfer the received end block to the lower side. In step S185, a response from the lower side to the transfer of the end block is waited for.
In step S186, it is determined whether or not the response from the lower side is an abnormal response. If the response is abnormal, the process returns to step S184 and the end block is retransmitted to the lower side. If it is not an abnormal response, the process proceeds to step S187, and the file storing the reception block is closed.

【0097】ステップS188では、上位側からダウン
ロードデータを受信していた光通信ポート9をクローズ
する。次いでステップS189で下位側にダウンロード
データを転送していた汎用通信ポート10をクローズ
し、処理を終了する。前記ステップS180で上位側か
ら受信したブロックがヘッダブロックであると判断した
ときにはステップS181へ進み、図14に示すヘッダ
ブロックの53に記述されている送り先ID番号を取り
出し調べる。ステップS190では、送り先ID番号が
自データ端末装置のID番号と一致しているか否かを判
断する。一致していればステップS191へ進み、一致
していなければステップS192へ進む。ステップS1
91では、自データ端末装置宛のダウンロードデータで
ある旨のフラグをオンし、ステップS192では自デー
タ端末装置宛のダウンロードデータである旨のフラグを
オフし、ステップS193へ進み、受信したヘッダブロ
ックを下位側へ転送する。
In step S188, the optical communication port 9 receiving the download data from the upper side is closed. Next, in step S189, the general-purpose communication port 10 that has transferred the download data to the lower side is closed, and the process ends. When it is determined in step S180 that the block received from the upper side is the header block, the process proceeds to step S181, and the destination ID number described in 53 of the header block shown in FIG. 14 is extracted and checked. In step S190, it is determined whether the destination ID number matches the ID number of the own data terminal device. If they match, the process proceeds to step S191, and if they do not match, the process proceeds to step S192. Step S1
At 91, the flag indicating that the download data is addressed to the own data terminal device is turned on, at step S192 the flag indicating that the download data is addressed to the own data terminal device is turned off, the process proceeds to step S193, and the received header block is Transfer to lower side.

【0098】ステップS194では、それまでに受信し
ていたダウンロードデータがあったならば、それを格納
していたファイルをクローズする。ステップS195で
は、自データ端末装置宛のダウンロードデータであると
判断したヘッダブロックの図14の54及び55に記述
されている格納ファイル名とファイル長の情報を基に、
以後受信されるダウンロードデータを格納するためのフ
ァイルをオープンし、ステップS193へ進み、受信し
たヘッダブロックを下位側へ転送する。
In step S194, if there is download data that has been received by then, the file that stores it is closed. In step S195, based on the storage file name and file length information described in 54 and 55 of FIG. 14 of the header block determined to be the download data addressed to the own data terminal device,
After that, a file for storing the received download data is opened, and the process proceeds to step S193 to transfer the received header block to the lower side.

【0099】ステップS182で受信したブロックがデ
ータブロックであると判断されたときにはステップS1
96へ進み、ステップS191及びステップS192で
セットされた自データ端末装置宛のダウンロードデータ
か否かを示すフラグを参照する。自データ端末装置宛の
データではないと判断されたときにはステップS193
へ進み、自データ端末装置宛のデータてあると判断され
たときにはステップS197へ進み、受信したデータブ
ロックを前記ステップS195でオープンしたファイル
に格納する。ステップS193では、受信したデータブ
ロックを下位側へ転送するために受信したブロックをそ
のまま汎用通信ポート10へ送信する。
When it is determined that the block received in step S182 is a data block, step S1
96, reference is made to the flag which is set in steps S191 and S192 and which indicates whether or not the download data is for the own data terminal device. If it is determined that the data is not addressed to the own data terminal device, step S193
When it is determined that the data is addressed to the own data terminal device, the process proceeds to step S197, and the received data block is stored in the file opened in step S195. In step S193, the received block is directly transmitted to the general-purpose communication port 10 in order to transfer the received data block to the lower side.

【0100】ステップS198では、ブロック送信に対
する下位側からの応答を待つ。ステップS199では、
応答が異常応答か否かを判断する。異常応答であれば前
記ステップS193へ戻り、下位側へ転送したブロック
を再送する。ステップS199で、異常応答ではないと
判断されたときにはステップS173へ進み、次のブロ
ックの受信を待つ。
In step S198, a response from the lower side to the block transmission is waited for. In step S199,
Determine if the response is an abnormal response. If it is an abnormal response, the process returns to step S193, and the block transferred to the lower side is retransmitted. If it is determined in step S199 that the response is not an abnormal response, the process advances to step S173 to wait for reception of the next block.

【0101】図17は、本実施例における図2に示す接
続例の最も下位側に接続されるデータ端末装置17で実
行される処理を示すフローチャートである。
FIG. 17 is a flow chart showing the processing executed by the data terminal device 17 connected to the lowermost side of the connection example shown in FIG. 2 in this embodiment.

【0102】まず、ステップS201では、上位側から
ダウンロードデータを受信するために光通信ポート9を
オープンし、続くステップS202では、光通信ポート
9から1ブロック受信する。そして、ステップS203
では、受信動作にエラーが発生したか否かを判断し、エ
ラーがあればステップS204へ進み、受信エラーが発
生していなければステップS205へ進む。ブロック内
には図14の56に示すエラー訂正用の情報が付加され
ている。ステップS205では、このエラー訂正用の情
報を調べ、受信したブロックの内容が正しいか否かを判
断する。
First, in step S201, the optical communication port 9 is opened to receive the download data from the upper side, and in the following step S202, one block is received from the optical communication port 9. Then, step S203
Then, it is determined whether or not an error has occurred in the reception operation, and if there is an error, the process proceeds to step S204, and if no reception error has occurred, the process proceeds to step S205. Information for error correction shown by 56 in FIG. 14 is added in the block. In step S205, the error correction information is checked to determine whether the content of the received block is correct.

【0103】ブロックの内容にエラーが発生していると
判断したときにはステップS206へ進み、エラー訂正
用情報56を使ってブロックのエラーを訂正する。エラ
ーが多発するとエラー訂正ができない場合があるので、
ステップS207ではエラーの訂正が可能か否かを判断
する。エラー訂正が可能であれば前記ステップS208
へ進み、正常の場合のルートに戻る。ステップS207
で訂正が不可能であればステップS204へ進み、上位
側にブロックの再送を促すために異常応答の制御コード
を光通信ポート9に返し、前記ステップS202へ戻
り、上位側からのブロックの再送を待つ。
When it is determined that an error has occurred in the contents of the block, the process proceeds to step S206 and the error of the block is corrected using the error correction information 56. If there are many errors, error correction may not be possible, so
In step S207, it is determined whether the error can be corrected. If the error can be corrected, the above step S208
Go to and return to the normal route. Step S207
If the correction is impossible in step S204, the process proceeds to step S204, the control code of the abnormal response is returned to the optical communication port 9 to prompt the upper side to retransmit the block, and the process returns to step S202 to retransmit the block from the upper side. wait.

【0104】ステップS208では、上位側へブロック
が正常に受信できた旨を通知するために正常応答の制御
コードを光通信ポート9へ返す。さらに、ステップS2
09では、図14の53に示すブロックIDを調べ、受
信したブロックがヘッダブロックか否かを判断する。ヘ
ッダブロックであると判断されたときにはステップS2
10へ進み、ヘッダブロックではないと判断されたとき
にはステップS211へ進む。ステップS211では、
受信したブロックがデータブロックであるか否かを判断
する。データブロックではないと判断されたときにはス
テップS212へ進み、終了ブロックであるか否かを判
断する。終了ブロックではないと判断されたときにはそ
のブロックを読み飛ばし、ステップS202へ進み、次
のブロックの受信を待つ。ステップS212で終了ブロ
ックであると判断されたときにはステップS213へ進
み、受信ブロックを格納したファイルをクローズし、次
いでステップS214で、上位側からダウンロードデー
タを受信していた光通信ポート9をクローズし、処理を
終了する。
In step S208, a control code for normal response is returned to the optical communication port 9 in order to notify the upper side that the block has been normally received. Further, step S2
At 09, the block ID shown at 53 in FIG. 14 is checked to determine whether the received block is a header block. If it is determined to be a header block, step S2
10. If it is determined that the block is not the header block, the process proceeds to step S211. In step S211,
It is determined whether the received block is a data block. When it is determined that the block is not the data block, the process proceeds to step S212, and it is determined whether the block is the end block. When it is determined that the block is not the end block, the block is skipped and the process proceeds to step S202 to wait for the reception of the next block. When it is determined that the block is the end block in step S212, the process proceeds to step S213, the file storing the reception block is closed, and then, in step S214, the optical communication port 9 that has received the download data from the upper side is closed, The process ends.

【0105】ステップS209では、上位側から受信し
たブロックがヘッダブロックであると判断されたときに
はステップS210へ進み、図14に示すヘッダブロッ
クの53に記述されている送り先ID番号を取り出し調
べる。
In step S209, when it is determined that the block received from the upper side is the header block, the process proceeds to step S210, and the destination ID number described in 53 of the header block shown in FIG. 14 is extracted and checked.

【0106】ステップS215では、送り先ID番号が
自データ端末装置のID番号と一致しているか否かを判
断する。一致しているときにはステップS216へ進
み、一致していなければステップS217へ進む。
In step S215, it is determined whether the destination ID number matches the ID number of the own data terminal device. If they match, the process proceeds to step S216, and if they do not match, the process proceeds to step S217.

【0107】ステップS216では、自データ端末装置
宛のダウンロードデータである旨のフラグをオンし、ス
テップS217では、自データ端末装置宛のダウンロー
ドデータである旨のフラグをオフし、前記ステップS2
02へ戻り、次のフロックの受信を待つ。ステップS2
18では、それまでに受信していたダウンロードデータ
があったならば、それを格納していたファイルをクロー
ズする。ステップS219では、自データ端末装置宛の
ダウンロードデータであると判断したヘッダブロックの
54及び55に記述されている格納ファイル名とファイ
ル長の情報を基に、以後受信されるダウンロードデータ
を格納するためのファイルをオープンし、ステップS2
02へ進み、次のブロックの受信を待つ。
In step S216, the flag indicating that the download data is addressed to the own data terminal device is turned on, and in step S217, the flag indicating that the download data is addressed to the own data terminal device is turned off.
Return to 02 and wait for reception of the next floc. Step S2
In 18, if there is download data that has been received up to that point, the file that stores it is closed. In step S219, the download data to be subsequently received is stored based on the information about the storage file name and the file length described in the header blocks 54 and 55 that are determined to be the download data destined for the own data terminal device. File is opened, step S2
Proceed to 02 to wait for reception of the next block.

【0108】ステップS211で受信したブロックがデ
ータブロックであると判断されたときにはステップS2
20へ進み、前記ステップS216及びステップS21
7でセットされた自データ端末装置宛のダウンロードデ
ータか否かを示すフラグを参照する。自データ端末装置
宛のデータではないと判断されたときにはステップS2
02へ進む。自データ端末装置宛のデータであると判断
されたときにはステップS221へ進み、受信したデー
タブロックをステップS219でオープンしたファイル
に格納しステップS202へ戻り、次のブロックの受信
を待つ。
When it is determined that the block received in step S211 is a data block, step S2
20 and proceeds to step S216 and step S21.
Reference is made to the flag which is set in step 7 and indicates whether or not the download data is for the own data terminal device. When it is determined that the data is not addressed to the own data terminal device, step S2
Go to 02. When it is determined that the data is addressed to the own data terminal device, the process proceeds to step S221, the received data block is stored in the file opened in step S219, the process returns to step S202, and the next block is received.

【0109】[0109]

【発明の効果】以上詳細に説明したように、本発明によ
れば、予め、各データ端末装置に固有の番号を割り付け
ると共に、ホスト装置から送信されるダウンロードデー
タに該ダウンロードデータを格納すべきデータ端末装置
の番号を格納したヘッダを付加しておき、前記各データ
端末装置は、一方の通信ポートからダウンロードデータ
をそれぞれ受信し、その受信したダウンロードデータの
ヘッダに格納されている格納先のデータ端末装置の番号
を確認し、このヘッダの番号が当該データ端末装置の番
号と一致するときに、該ヘッダが付加されたダウンロー
ドデータを格納すると共に、受信したダウンロードデー
タを他方の通信ポートから送信し、前記ヘッダの番号が
当該データ端末装置の番号と不一致のときには、受信し
たダウンロードデータをそのまま他方の通信ポートから
送信するようにしたので、ホスト装置から1回のダウン
ロード操作で多数のデータ端末装置に対して、同じアプ
リケーションプログラムやデータをダウンロードするこ
とが可能となり、また、選択したデータ端末装置にだけ
個別のダウンロードデータを自動的に格納することがで
きる。
As described in detail above, according to the present invention, a unique number is assigned to each data terminal device in advance, and the data to be stored in the download data transmitted from the host device. A header storing the number of the terminal device is added, and each of the data terminal devices receives the download data from one communication port, and the data terminal of the storage destination stored in the header of the received download data. Check the device number, and when the header number matches the data terminal device number, store the download data with the header added and send the received download data from the other communication port, If the header number does not match the data terminal device number, the received download data Since the data is transmitted from the other communication port as it is, it becomes possible to download the same application program and data from a host device to a large number of data terminal devices with one download operation. Individual download data can be automatically stored only in the data terminal device.

【0110】従って、データ端末装置の導入初期のダウ
ンロードに要する時間を大幅に短縮することができると
共に、多数のデータ端末装置に同じアプリケーションプ
ログラムまたはデータをダウンロードしたり、特定のデ
ータ端末装置に固有のダウンロードデータをオペレータ
の操作なしに自動的にダウンロードすることができるの
で、操作ミスも防ぐことができる。
Therefore, the time required for the initial download of the data terminal device can be greatly shortened, and the same application program or data can be downloaded to a large number of data terminal devices, or the data terminal device is unique to a specific data terminal device. Since the download data can be automatically downloaded without operator's operation, operation mistakes can be prevented.

【0111】また、前記ダウンロードデータの送信をブ
ロック化し、送受信のタイミング制御もブロック単位で
行うようにしたので、結果的にデータ量が少なくなりダ
ウンロード時間がさらに短縮する。
Further, since the transmission of the download data is divided into blocks and the transmission / reception timing control is also performed on a block-by-block basis, the amount of data is consequently reduced and the download time is further shortened.

【0112】さらに、ダウンロードデータの送信の単位
であるブロック毎にエラー検出を行い、エラーを検出し
たときには一つ上位のデータ端末装置からエラーの発生
したブロックを再送させるので、自動的にエラーの訂正
や再送が行われ、ダウンロードの信頼性を向上させるこ
とができる。また、エラー再送が行われた場合には、ホ
スト装置まで溯らずに上位側で確実にデータを受信した
と確認できるデータ端末装置から再送が行われるので、
再送に要する時間も必要最小限に抑えることができる。
Further, error detection is performed for each block that is a unit of transmission of download data, and when an error is detected, the block in which the error has occurred is retransmitted from the data terminal device that is one level higher, so the error is automatically corrected. And re-sending is performed, and the reliability of download can be improved. Further, when the error resending is performed, since resending is performed from the data terminal device that can confirm that the data has been surely received on the upper side without delaying to the host device,
The time required for retransmission can also be suppressed to the necessary minimum.

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

【図1】本発明の第1実施例に係るダウンロード方法が
実施されるデータ端末装置のブロック図である。
FIG. 1 is a block diagram of a data terminal device in which a download method according to a first embodiment of the present invention is implemented.

【図2】第1実施例のダウンロード方法に従ったホスト
装置とデータ端末装置の接続状態を示す図である。
FIG. 2 is a diagram showing a connection state between a host device and a data terminal device according to the download method of the first embodiment.

【図3】第1実施例によるダウンロード方法を実現する
ためのダウンロードデータのフォーマットの一例を示す
図である。
FIG. 3 is a diagram showing an example of a format of download data for realizing the download method according to the first embodiment.

【図4】図2で説明したダウンロード方式に従った場合
のダウンロード方法の処理を示すフローチャートであ
る。
FIG. 4 is a flowchart showing the processing of the download method when the download method described in FIG. 2 is followed.

【図5】図2に示した直列接続されたデータ端末装置の
うち、最終端に接続されたデータ端末装置17のダウン
ロード方法の処理を示すフローチャートである。
5 is a flowchart showing a process of a download method of the data terminal device 17 connected to the final end of the data terminal devices connected in series shown in FIG.

【図6】本発明の第2実施例を示すダウンロード方法の
処理を示すフローチャートである。
FIG. 6 is a flowchart showing a process of a download method showing a second embodiment of the present invention.

【図7】図6の続きのフローチャートである。FIG. 7 is a continuation of the flowchart of FIG.

【図8】図2に示す直列接続の最終端に接続されるデー
タ端末装置17におけるエラー再送を考慮した場合のダ
ウンロード方法を実現する処理のフローチャートであ
る。
FIG. 8 is a flowchart of a process for realizing a download method in the case where error retransmission is considered in the data terminal device 17 connected to the last end of the serial connection shown in FIG.

【図9】本発明の第3実施例におけるダウンロードデー
タの内容の一例を示す図である。
FIG. 9 is a diagram showing an example of contents of download data according to the third embodiment of the present invention.

【図10】第3実施例のダウンロード方法を実現する処
理を示すフローチャートである。
FIG. 10 is a flowchart showing a process for realizing the download method of the third embodiment.

【図11】図10の続きのフローチャートである。FIG. 11 is a flowchart continued from FIG. 10;

【図12】第3実施例における最終端に接続されるデー
タ端末装置17の処理を示すフローチャートである。
FIG. 12 is a flowchart showing the processing of the data terminal device 17 connected to the final end in the third embodiment.

【図13】ダウンロードデータのフォーマットの他の例
である。
FIG. 13 is another example of the format of download data.

【図14】第3実施例のヘッダブロックの内容の例であ
る。
FIG. 14 is an example of contents of a header block of the third embodiment.

【図15】第3実施例における図2に示す接続例の中間
に接続されるデータ端末装置13及び15で実行される
処理を示すフローチャートである。
FIG. 15 is a flowchart showing a process executed by the data terminal devices 13 and 15 connected in the middle of the connection example shown in FIG. 2 in the third embodiment.

【図16】図15の続きのフローチャートである。FIG. 16 is a continuation of the flowchart of FIG.

【図17】第3実施例における図2に示す接続例の最も
下位側に接続されるデータ端末装置17で実行される処
理を示すフローチャートである。
FIG. 17 is a flowchart showing processing executed by the data terminal device 17 connected to the lowermost side of the connection example shown in FIG. 2 in the third embodiment.

【図18】従来のホスト装置とデータ端末装置との接続
例を示す図である。
FIG. 18 is a diagram showing an example of connection between a conventional host device and a data terminal device.

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

1 CPU 2 RAM 3 LCD 4 プリンタ 7 ROM 8 キーボード 9 光通信ポート 10 汎用通信ポート 11 ホスト装置 12,14,16 光カプラ 13,15,17 データ端末装置 1 CPU 2 RAM 3 LCD 4 Printer 7 ROM 8 Keyboard 9 Optical Communication Port 10 General-purpose Communication Port 11 Host Device 12, 14, 16 Optical Coupler 13, 15, 17 Data Terminal Device

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 各々2つの通信ポートを有する複数のデ
ータ端末装置を直列に接続し、ホスト装置から該各デー
タ端末装置へアプリケーションプログラムまたはデータ
をダウンロードするダウンロード方法において、 予め、前記各データ端末装置に固有の番号を割り付ける
と共に、前記ホスト装置から送信されるダウンロードデ
ータに該ダウンロードデータを格納すべきデータ端末装
置の番号を格納したヘッダを付加しておき、 前記各データ端末装置は、一方の通信ポートからダウン
ロードデータを受信し、その受信したダウンロードデー
タのヘッダに格納されている格納先のデータ端末装置の
番号を確認し、 このヘッダの番号が当該データ端末装置の番号と一致す
るときに、該ヘッダが付加されたダウンロードデータを
格納すると共に、受信したダウンロードデータを他方の
通信ポートから送信し、 前記ヘッダの番号が当該データ端末装置の番号と不一致
のときには、受信したダウンロードデータをそのまま他
方の通信ポートから送信することを特徴とするダウンロ
ード方法。
1. A download method in which a plurality of data terminal devices each having two communication ports are connected in series, and an application program or data is downloaded from a host device to each of the data terminal devices, wherein each of the data terminal devices is provided in advance. To the download data transmitted from the host device, a header storing the number of the data terminal device that should store the download data is added, When the download data is received from the port, the number of the data terminal device of the storage destination stored in the header of the received download data is confirmed, and when the number of this header matches the number of the data terminal device, Store the download data with the header added and A download method, wherein the received download data is transmitted from the other communication port, and when the header number does not match the number of the data terminal device, the received download data is directly transmitted from the other communication port.
【請求項2】 前記ダウンロードデータの送信を1バイ
トずつ行い、送受信のタイミング制御も1バイトずつ行
うことを特徴とする請求項1記載のダウンロード方法。
2. The download method according to claim 1, wherein the download data is transmitted byte by byte, and transmission / reception timing control is also performed byte by byte.
【請求項3】 前記ダウンロードデータの送信の単位で
ある1バイト毎にエラー検出を行い、エラーを検出した
ときには一つ上位のデータ端末装置からエラーの発生し
たダウンロードデータを再送させることを特徴とする請
求項2記載のダウンロード方法。
3. The error detection is performed for each byte which is a unit of transmission of the download data, and when the error is detected, the download data in which the error has occurred is retransmitted from the data terminal device of one higher rank. The download method according to claim 2.
【請求項4】 前記ダウンロードデータの送信をブロッ
ク化し、送受信のタイミング制御もブロック単位で行う
ことを特徴とする請求項1記載のダウンロード方法。
4. The download method according to claim 1, wherein transmission of the download data is divided into blocks, and transmission / reception timing control is also performed in block units.
【請求項5】 前記ダウンロードデータの送信の単位で
あるブロック毎にエラー検出を行い、エラーを検出した
ときには一つ上位のデータ端末装置からエラーの発生し
たブロックを再送させることを特徴とする請求項4記載
のダウンロード方法。
5. The error detection is performed for each block which is a unit of transmission of the download data, and when the error is detected, the block in which the error has occurred is retransmitted from the data terminal device which is one level higher. Downloading method described in 4.
【請求項6】 1回のダウンロード操作で複数のダウン
ロードデータをダウンロードすることを特徴とする請求
項4記載のダウンロード方法。
6. The download method according to claim 4, wherein a plurality of download data are downloaded by one download operation.
JP5277671A 1993-10-08 1993-10-08 Downloading method Pending JPH07105107A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5277671A JPH07105107A (en) 1993-10-08 1993-10-08 Downloading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5277671A JPH07105107A (en) 1993-10-08 1993-10-08 Downloading method

Publications (1)

Publication Number Publication Date
JPH07105107A true JPH07105107A (en) 1995-04-21

Family

ID=17586684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5277671A Pending JPH07105107A (en) 1993-10-08 1993-10-08 Downloading method

Country Status (1)

Country Link
JP (1) JPH07105107A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015023372A (en) * 2013-07-18 2015-02-02 セイコーエプソン株式会社 Communication control program, information processing device, and communication control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015023372A (en) * 2013-07-18 2015-02-02 セイコーエプソン株式会社 Communication control program, information processing device, and communication control method

Similar Documents

Publication Publication Date Title
US4507782A (en) Method and apparatus of packet switching
CN109768970B (en) Configurable universal protocol generation method
JPH0652515B2 (en) Logical channel path mechanism in computer input / output device and method of establishing the logical channel path
CN109976767B (en) Software burning method and device
JPS59106063A (en) Updating of file
CN101123485B (en) iSCSI packet processing method and device, error recovery method and device
WO1984003192A1 (en) Data network interface
CN101304362B (en) Retransmission buffering apparatus and data transmission method
US5752251A (en) Method and apparatus for recovering aborted file (or data) transmission
JPH07105107A (en) Downloading method
JP3569149B2 (en) Communication control device
JP4112717B2 (en) Data processing device
CN113722770B (en) End-to-end protection method and system based on hierarchical data integrity
CN112905206A (en) Circuit upgrading method based on serial port
CN113326219A (en) Communication method based on burning system, burning method and computer storage medium
CN114579166A (en) Component module upgrading method, component module and financial robot
CN113360162A (en) Multi-chip device and chip upgrading method
JP3377420B2 (en) Communication processing device
CN112601267B (en) Routing pairing method and device, computer equipment and router
CN116150078B (en) Inter-board data communication transmission method, electronic device, and computer-readable storage medium
EP4300908A1 (en) Base station management system and method
JPH1065762A (en) Automatic testing simulator for communication software and automatic testing method therefor
JP2954062B2 (en) Email system
JPH0832645A (en) Data communication controller and checking method for its data transfer
JP2003018240A (en) Communication monitor system