JP6343991B2 - Communication system, communication control method, and communication control program - Google Patents

Communication system, communication control method, and communication control program Download PDF

Info

Publication number
JP6343991B2
JP6343991B2 JP2014059409A JP2014059409A JP6343991B2 JP 6343991 B2 JP6343991 B2 JP 6343991B2 JP 2014059409 A JP2014059409 A JP 2014059409A JP 2014059409 A JP2014059409 A JP 2014059409A JP 6343991 B2 JP6343991 B2 JP 6343991B2
Authority
JP
Japan
Prior art keywords
data transmission
transmission request
identification number
slave
master 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.)
Active
Application number
JP2014059409A
Other languages
Japanese (ja)
Other versions
JP2015184844A (en
Inventor
裕照 山川
裕照 山川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2014059409A priority Critical patent/JP6343991B2/en
Publication of JP2015184844A publication Critical patent/JP2015184844A/en
Application granted granted Critical
Publication of JP6343991B2 publication Critical patent/JP6343991B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Debugging And Monitoring (AREA)
  • Bus Control (AREA)

Description

本発明は、通信システム、通信制御方法および通信制御プログラムに関する。特に、シリアルインタフェース通信方式を用いた通信システム、通信制御方法および通信制御プログラムに関する。   The present invention relates to a communication system, a communication control method, and a communication control program. In particular, the present invention relates to a communication system, a communication control method, and a communication control program using a serial interface communication method.

一般的なコンピュータシステムには、シリアル通信が広く使われている。シリアル通信の一つとして、スレーブ装置に設定されたIDをマスタ装置に登録する方式がある(ID:Identifier)。   Serial communication is widely used in general computer systems. As one of serial communications, there is a method of registering an ID set in a slave device in a master device (ID: Identifier).

特許文献1には、システムを構成する端末からの送信要求をポーリング方式によって受け付ける通信制御装置における制御方式において、端末を登録したテーブルを用いてポーリングを実行する方式が開示されている。   Japanese Patent Application Laid-Open No. 2004-151820 discloses a method of executing polling using a table in which terminals are registered in a control method in a communication control apparatus that accepts transmission requests from terminals constituting a system by a polling method.

特許文献1のポーリング方式では、システムを構成する端末をシステム構成端末テーブルに登録する。そして、システム構成端末テーブルに登録された各端末をポーリングした際に、機器準備完了の応答のあった端末のみを準備完了端末テーブルに登録する。さらに、準備完了端末テーブルに基づいて通常のポーリングを行うとともに、一定時間内に送信要求を発生させた端末のみを登録した活動端末テーブルを作成し、活動端末テーブルに基づいて通常のポーリングを実行する。特許文献1のポーリング方式によれば、各種テーブルを使い分けることによって、ポーリング頻度をバランスの取れた値に設定することができる。   In the polling method of Patent Document 1, the terminals constituting the system are registered in the system configuration terminal table. Then, when polling each terminal registered in the system configuration terminal table, only terminals that have responded with a device preparation completion are registered in the preparation completion terminal table. Furthermore, normal polling is performed based on the ready terminal table, and an active terminal table in which only terminals that have generated a transmission request within a certain period of time are created, and normal polling is performed based on the active terminal table. . According to the polling method of Patent Document 1, the polling frequency can be set to a balanced value by using various tables properly.

特許文献2には、固有のアドレスが設定された複数のモジュールが通信バスに接続され、設定された固有のアドレスを用いてモジュールを指定し、通信を行う通信システムについて開示されている。   Patent Document 2 discloses a communication system in which a plurality of modules set with unique addresses are connected to a communication bus, and the modules are designated using the set unique addresses to perform communication.

特許文献2の通信システムにおいて、各スレーブモジュールは、マスタモジュールからアドレスとコマンドを受信した際にプリレスポンスを出力し、所定時間内におけるプリレスポンスの受信状況に応じてレスポンスを出力するか、通信を中止するかを選択する。プリレスポンスを出力してから所定の時間内にプリレスポンスを受信した場合は、他のスレーブモジュールとアドレスが重複されていることになる。また、自身の出力したプリレスポンスが正しく検出できなければ、衝突が発生していることになる。そのため、特許文献2の通信システムによれば、異なるスレーブモジュールに同じアドレスが重複して設定された場合であっても、応答するスレーブモジュールが一定となるとともに、衝突が発生しても処理を続行することができる。   In the communication system of Patent Literature 2, each slave module outputs a pre-response when receiving an address and a command from the master module, and outputs a response according to the reception status of the pre-response within a predetermined time, or performs communication. Select whether to cancel. If a pre-response is received within a predetermined time after outputting the pre-response, the address is duplicated with other slave modules. If the pre-response output by itself cannot be detected correctly, a collision has occurred. Therefore, according to the communication system disclosed in Patent Document 2, even when the same address is set to be duplicated in different slave modules, the responding slave modules are constant and the process is continued even if a collision occurs. can do.

特開平3−135243号公報JP-A-3-135243

特許文献1のポーリング方式によれば、システムを構成する端末をテーブルで管理することによって、ポーリングの無駄を減らすことができる。ところで、複数のスレーブ装置に設定されたIDをマスタ装置に登録する方式に特許文献1のテーブル管理を適用すると、IDの設定・登録にミスがあった場合、マスタ装置によってどのスレーブ装置のIDに設定・登録ミスがあったかを検証する必要がある。しかしながら、多数のスレーブ装置でシステムが構成されている場合、全てのスレーブ装置のIDを検索することは現実的には不可能であるという問題点があった。また、スレーブ装置側がタイムアウト監視するのも、他のスレーブ装置の接続数や通信時間を制約しない限りは、設定が難しいという問題点があった。   According to the polling method of Patent Document 1, the waste of polling can be reduced by managing the terminals constituting the system with a table. By the way, when the table management of Patent Document 1 is applied to a method of registering IDs set in a plurality of slave devices in the master device, if there is a mistake in ID setting / registration, which slave device ID is set by the master device. It is necessary to verify whether there was a setting / registration error. However, when a system is configured with a large number of slave devices, there is a problem that it is practically impossible to search the IDs of all slave devices. In addition, the slave device side has a problem that time-out monitoring is difficult to set unless the number of connections and communication time of other slave devices are restricted.

また、特許文献2の通信システムによれば、各スレーブモジュールに固有の識別番号を付与する必要がなくなるため、マスタモジュールによる診断通信のための負荷を低減することができる。しかしながら、特許文献2の通信システムにおいては、プリレスポンスの検出または衝突が発生した際に、スレーブモジュールは通信を中止してしまう。そのため、マスタモジュール側からは、通信を中止させたスレーブモジュールを検証することができなくなるという問題点があった。   Further, according to the communication system of Patent Document 2, it is not necessary to assign a unique identification number to each slave module, so that the load for diagnostic communication by the master module can be reduced. However, in the communication system of Patent Document 2, when a pre-response is detected or a collision occurs, the slave module stops communication. For this reason, there is a problem in that it becomes impossible to verify the slave module whose communication has been stopped from the master module side.

本発明の目的は、上述した課題を解決する通信システムを提供することにある。   The objective of this invention is providing the communication system which solves the subject mentioned above.

本発明の通信システムは、マスタ装置と、マスタ装置とシリアルインタフェースによって接続された複数のスレーブ装置とを備え、マスタ装置は、複数のスレーブ装置のそれぞれに対応する識別番号を登録した登録テーブルを有し、複数のスレーブ装置のいずれかから受信したデータ送信要求に対して、登録テーブルに登録された識別番号を順次複数のスレーブ装置に送信し、複数のスレーブ装置のうちデータ送信要求を送信したスレーブ装置は、マスタ装置から受信した識別番号に基づいて登録テーブルに自装置が登録されているか否かを判定する。   The communication system of the present invention includes a master device and a plurality of slave devices connected to the master device by a serial interface, and the master device has a registration table in which identification numbers corresponding to the plurality of slave devices are registered. In response to a data transmission request received from one of the plurality of slave devices, the identification number registered in the registration table is sequentially transmitted to the plurality of slave devices, and the slave that has transmitted the data transmission request among the plurality of slave devices. The device determines whether or not its own device is registered in the registration table based on the identification number received from the master device.

本発明の通信制御方法は、マスタ装置と複数のスレーブ装置とがシリアルインタフェースによって接続された通信システムにおける通信制御方法であって、複数のスレーブ装置のいずれかから受信したデータ送信要求に対して、マスタ装置が有する登録テーブルに登録された複数のスレーブ装置のそれぞれに対応する識別番号を順次複数のスレーブ装置に送信し、複数のスレーブ装置のうちデータ送信要求を送信したスレーブ装置において、マスタ装置から受信した識別番号に基づいて登録テーブルに自装置が登録されているか否かを判定する通信制御方法。   The communication control method of the present invention is a communication control method in a communication system in which a master device and a plurality of slave devices are connected by a serial interface, and in response to a data transmission request received from any of the plurality of slave devices, The identification number corresponding to each of the plurality of slave devices registered in the registration table of the master device is sequentially transmitted to the plurality of slave devices, and in the slave device that has transmitted the data transmission request among the plurality of slave devices, from the master device A communication control method for determining whether or not the own apparatus is registered in a registration table based on a received identification number.

本発明の通信制御プログラムは、マスタ装置と複数のスレーブ装置とがシリアルインタフェースによって接続された通信システムにおける通信制御プログラムであって、複数のスレーブ装置のいずれかから受信したデータ送信要求に対して、マスタ装置が有する登録テーブルに登録された複数のスレーブ装置のそれぞれに対応する識別番号を順次複数のスレーブ装置に送信する処理と、複数のスレーブ装置のうちデータ送信要求を送信したスレーブ装置において、マスタ装置から受信した識別番号に基づいて登録テーブルに自装置が登録されているか否かを判定する処理とをコンピュータに実行させる。   The communication control program of the present invention is a communication control program in a communication system in which a master device and a plurality of slave devices are connected by a serial interface, and in response to a data transmission request received from any of a plurality of slave devices, In the process of sequentially transmitting identification numbers corresponding to each of the plurality of slave devices registered in the registration table of the master device to the plurality of slave devices, and the slave device that has transmitted the data transmission request among the plurality of slave devices, Based on the identification number received from the apparatus, the computer is caused to execute processing for determining whether or not the own apparatus is registered in the registration table.

本発明によれば、スレーブ装置の識別番号を登録した登録テーブルの登録情報と、実際の識別番号とスレーブ装置との対応付けとが異なっていることを、スレーブ装置側から速やかに検出することができる通信システムを提供することが可能になる。   According to the present invention, it is possible to quickly detect from the slave device side that the registration information of the registration table in which the identification number of the slave device is registered and the association between the actual identification number and the slave device are different. It is possible to provide a communication system that can be used.

本発明の第1の実施形態に係る通信システムの構成を示す概念図である。It is a conceptual diagram which shows the structure of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムで用いるIDテーブルの一例である。It is an example of the ID table used with the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのマスタ装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the master apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのスレーブ装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the slave apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのマスタ装置の動作に関するフローチャートである。It is a flowchart regarding operation | movement of the master apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのスレーブ装置の動作に関するフローチャートである。It is a flowchart regarding operation | movement of the slave apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムの動作に関するシーケンス図である。It is a sequence diagram regarding operation | movement of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムの構成を示す概念図である。It is a conceptual diagram which shows the structure of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムで用いるIDテーブルの一例である。It is an example of the ID table used with the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのマスタ装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the master apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのスレーブ装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the slave apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのマスタ装置の動作に関するフローチャートである。It is a flowchart regarding operation | movement of the master apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムのスレーブ装置の動作に関するフローチャートである。It is a flowchart regarding operation | movement of the slave apparatus of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る通信システムの動作に関するシーケンス図である。It is a sequence diagram regarding operation | movement of the communication system which concerns on the 1st Embodiment of this invention.

以下に、本発明を実施するための形態について図面を用いて説明する。ただし、以下に述べる実施形態には、本発明を実施するために技術的に好ましい限定がされているが、発明の範囲を以下に限定するものではない。   EMBODIMENT OF THE INVENTION Below, the form for implementing this invention is demonstrated using drawing. However, the preferred embodiments described below are technically preferable for carrying out the present invention, but the scope of the invention is not limited to the following.

(実施形態)
(構成)
まず、本発明の第1の実施形態に係る通信システム1について説明する。
(Embodiment)
(Constitution)
First, the communication system 1 according to the first embodiment of the present invention will be described.

図1は、本発明の第1の実施形態に係る通信システム1の構成を示すブロック図である。本実施形態に係る通信システム1は、マスタ装置10と、複数のスレーブ装置20−1〜Nと、シリアルインタフェース30とを備える(Nは自然数)。図1には、各スレーブ装置20のIDの値を2バイトの数値としている。ただし、各スレーブ装置20のIDの値は2バイトに限らず、任意のバイト数に設定することができる。   FIG. 1 is a block diagram showing a configuration of a communication system 1 according to the first embodiment of the present invention. The communication system 1 according to the present embodiment includes a master device 10, a plurality of slave devices 20-1 to N, and a serial interface 30 (N is a natural number). In FIG. 1, the ID value of each slave device 20 is a 2-byte numerical value. However, the ID value of each slave device 20 is not limited to 2 bytes and can be set to an arbitrary number of bytes.

本実施形態に係る通信システム1では、以下に述べていく構成・動作によって、スレーブ装置20のID設定ミスやマスタ装置10のID登録情報ミスが検出される。   In the communication system 1 according to the present embodiment, an ID setting error of the slave device 20 and an ID registration information error of the master device 10 are detected by the configuration and operation described below.

マスタ装置10は、シリアルインタフェースの制御を司る装置である。シリアルインタフェース30には、複数のスレーブ装置20(スレーブ装置1、2、・・・、N、・・・)が接続されている。スレーブ装置1のIDは0x0001、スレーブ装置2のIDは0x0002、・・・、スレーブ装置NのIDは0xNに設定されている。そして、マスタ装置10は、各スレーブ装置20の装置名とID番号との対応表(登録テーブルとも呼ぶ)であるIDテーブル101(図2)を格納する。   The master device 10 is a device that controls the serial interface. A plurality of slave devices 20 (slave devices 1, 2,..., N,...) Are connected to the serial interface 30. The ID of the slave device 1 is set to 0x0001, the ID of the slave device 2 is set to 0x0002,..., And the ID of the slave device N is set to 0xN. Then, the master device 10 stores an ID table 101 (FIG. 2) that is a correspondence table (also referred to as a registration table) between the device name and ID number of each slave device 20.

マスタ装置10は、スレーブ装置20のデータ送信要求に応じて、IDテーブル101を参照しながらデータ送信要求を送信したスレーブ装置20を装置検索する。マスタ装置10によるスレーブ装置20の装置検索順番は、スレーブ装置20のIDを登録した登録テーブルに記載された順番に基づく。なお、スレーブ装置20のデータ送信要求に対するマスタ装置10の装置検索順は、事前に決定しておけばよい。また、スレーブ装置によるデータ送信要求をブレーク(BREAK)と呼び、マスタ装置による装置検索をセンス(SENSE)と呼ぶ。   In response to the data transmission request from the slave device 20, the master device 10 searches for the slave device 20 that has transmitted the data transmission request while referring to the ID table 101. The device search order of the slave devices 20 by the master device 10 is based on the order described in the registration table in which the IDs of the slave devices 20 are registered. The device search order of the master device 10 for the data transmission request of the slave device 20 may be determined in advance. A data transmission request by the slave device is called a break (BREAK), and a device search by the master device is called a sense (SENSE).

図2のIDテーブル101は、スレーブ装置20のIDを登録する登録テーブルの一例である。なお、図2のIDテーブル101においては、スレーブ装置20−n(以下、スレーブ装置N)のIDが0xNと登録されるべきであるのに、誤って0xN’と登録されているものとする。すなわち、図2のIDテーブル101においては、スレーブ装置20のID設定ミスまたはマスタ装置10のID登録情報ミスがあるために、IDテーブル101に登録されたスレーブ装置NのIDが正しくないことになる。   The ID table 101 in FIG. 2 is an example of a registration table that registers the ID of the slave device 20. In the ID table 101 of FIG. 2, it is assumed that the ID of the slave device 20-n (hereinafter referred to as slave device N) should be registered as 0xN, but is erroneously registered as 0xN '. That is, in the ID table 101 of FIG. 2, the ID of the slave device N registered in the ID table 101 is not correct because there is an ID setting error of the slave device 20 or an ID registration information error of the master device 10. .

IDテーブル101には、スレーブ装置20の装置名と、対応するIDが登録されている。本実施形態に係る通信システム1では、IDテーブル101の検索方法を一方向に決定する。すなわち、各スレーブ装置20は、スレーブ装置1、スレーブ装置2、・・・、スレーブ装置N、・・・という順番で検索される。そして、IDテーブル101に従った検索が完了した段階において未だデータ送信要求を出したスレーブ装置20が検索されていない場合、マスタ装置10は、再度スレーブ1から検索を実行する。なお、スレーブ装置20の検索順は、IDテーブル101の上からの順番にかぎらず、任意の順番に設定することができる。   In the ID table 101, the device name of the slave device 20 and the corresponding ID are registered. In the communication system 1 according to the present embodiment, the search method of the ID table 101 is determined in one direction. That is, each slave device 20 is searched in the order of slave device 1, slave device 2,..., Slave device N,. When the slave device 20 that has issued the data transmission request has not been searched yet at the stage where the search according to the ID table 101 is completed, the master device 10 executes the search from the slave 1 again. Note that the search order of the slave devices 20 is not limited to the order from the top of the ID table 101, and can be set in any order.

スレーブ装置20は、マスタ装置10から送信された装置検索のIDを受信して読み取る。各スレーブ装置20は、同一IDが2回出現した段階、すなわちマスタ装置10によるIDテーブル101に基づいた検索が一巡した段階で、自身のIDが装置検索(SENSE)されなかったとしてID設定/登録ミスのエラー処理を行う。   The slave device 20 receives and reads the device search ID transmitted from the master device 10. Each slave device 20 sets / registers the ID as if its own ID was not searched (SENSE) when the same ID appeared twice, that is, when the search based on the ID table 101 by the master device 10 was completed. Perform error handling for mistakes.

なお、エラー処理とは、IDテーブル101の自装置の登録情報に誤りがあることを上位システムに通知する処理である。例えば、エラー処理実行手段23は、通信システム1を構成する装置の状態管理やログ収集をしている装置・サーバに対して、シリアルインタフェース30とは異なるインタフェースを経由させてエラーがあった旨を通知する構成とすることができる。また、例えば、エラー処理実行手段23は、エラーあった際に、自装置やマスタ装置10などに設けられたランプを点灯させる構成としてもよい。ただし、本実施形態に係る通信システム1におけるエラー処理はここで挙げた例に限定されず、種々のエラー処理を適用することができる。   The error process is a process for notifying the host system that there is an error in the registration information of its own device in the ID table 101. For example, the error processing execution unit 23 indicates that an error has occurred via a different interface from the serial interface 30 to the devices and servers that are managing the status of the devices constituting the communication system 1 and collecting logs. It can be set as the structure to notify. Further, for example, the error processing execution means 23 may be configured to light a lamp provided in its own device or the master device 10 when an error occurs. However, the error processing in the communication system 1 according to the present embodiment is not limited to the example given here, and various error processing can be applied.

次に、図3および図4を用いて、マスタ装置10およびスレーブ装置20の内部構成について説明する。   Next, the internal configuration of the master device 10 and the slave device 20 will be described with reference to FIGS. 3 and 4.

[マスタ装置]
図3に示すマスタ装置10は、通信手段11、検出手段12、格納手段13、検索手段14を備える。
[Master device]
The master device 10 shown in FIG. 3 includes a communication unit 11, a detection unit 12, a storage unit 13, and a search unit 14.

通信手段11は、スレーブ装置20からのデータ送信要求(以下、BREAK)を許可するBREAK許可通知を各スリーブ20に送信する。また、通信手段11は、BREAK許可通知に応答した各スレーブ装置20からのBREAKを受信する。また、通信手段11は、各スレーブ装置20に対して装置検索のIDを送信する。また、通信手段11は、装置検索のIDへの応答に関して、対応するスレーブ装置20とデータ通信を行う。   The communication unit 11 transmits to each sleeve 20 a BRAK permission notification that permits a data transmission request (hereinafter, “BRAK”) from the slave device 20. In addition, the communication unit 11 receives the BREAK from each slave device 20 in response to the BREAK permission notification. In addition, the communication unit 11 transmits an apparatus search ID to each slave apparatus 20. The communication unit 11 performs data communication with the corresponding slave device 20 regarding the response to the device search ID.

検出手段12は、通信手段11を介して取得されたBREAKを検出し、検索手段14に対して装置検索する指示を出す。   The detection unit 12 detects the break acquired through the communication unit 11 and issues an instruction to search the device to the search unit 14.

格納手段13は、IDテーブル101を格納する。   The storage unit 13 stores the ID table 101.

検索手段14は、検出手段12によって検出されたBREAKに応じて、各スレーブ装置20に送信するIDをIDテーブル101から一つ選び、選び出したIDを通信手段に出力する。なお、IDテーブル101に記載されたIDの検索順番は、任意に設定できる。   The search means 14 selects one ID to be transmitted to each slave device 20 from the ID table 101 in accordance with the break detected by the detection means 12, and outputs the selected ID to the communication means. The ID search order described in the ID table 101 can be arbitrarily set.

[スレーブ装置]
図4に示すスレーブ装置20は、送受信手段21、識別番号検出手段22、エラー処理実行手段23、記憶手段24を備える。
[Slave device]
The slave device 20 shown in FIG. 4 includes a transmission / reception unit 21, an identification number detection unit 22, an error processing execution unit 23, and a storage unit 24.

送受信手段21は、マスタ装置10からBREAK許可を受信した際に、必要に応じてデータ送信要求を送信する。そして、送受信手段21は、マスタ装置10から発信されたIDが自身のものである場合、マスタ装置10に対して応答し、データ通信を実行する。   The transmission / reception means 21 transmits a data transmission request as necessary when receiving a break permission from the master device 10. And the transmission / reception means 21 responds with respect to the master apparatus 10, and performs data communication, when ID transmitted from the master apparatus 10 is its own.

識別番号検出手段22は、マスタ装置10から発信されたIDを受信し、受信したIDが自身のものであるか否かを判定する。そして、識別番号検出手段22は、データ送信要求後に自身のIDを受信すると、マスタ装置への応答をする指示を送受信手段21に出す。識別番号検出手段22は、データ送信要求後に他のIDを受信すると、再度データ送信要求を出すように送受信手段21に指示する。また、識別番号検出手段22は、自身のIDが受信されないのに他のIDを2回受信した場合、エラー処理実行手段23にエラーがあることを通知する。   The identification number detection means 22 receives the ID transmitted from the master device 10 and determines whether or not the received ID is its own. When the identification number detection unit 22 receives its own ID after the data transmission request, the identification number detection unit 22 issues an instruction to respond to the master device to the transmission / reception unit 21. When the identification number detection unit 22 receives another ID after the data transmission request, the identification number detection unit 22 instructs the transmission / reception unit 21 to issue the data transmission request again. The identification number detection means 22 notifies the error processing execution means 23 that there is an error when the ID is not received but another ID is received twice.

エラー処理実行手段23は、識別番号検出手段22の通知に応じて、エラー処理を実行する。   The error processing execution unit 23 executes error processing in response to the notification from the identification number detection unit 22.

記憶手段24は、マスタ装置10とやり取りするデータを記憶するとともに、データ送信要求後に最初に受信したIDを記憶する。   The storage unit 24 stores data exchanged with the master device 10 and stores an ID received first after a data transmission request.

以上が本発明の第1の実施形態に係る通信システム1の構成に関する説明である。なお、以上の各構成要素は、コンピュータやサーバなどの情報処理装置を構成するハードウェア・ソフトウェアによって実現されるものである。   The above is description regarding the structure of the communication system 1 which concerns on the 1st Embodiment of this invention. Each component described above is realized by hardware / software constituting an information processing apparatus such as a computer or a server.

(動作)
次に、本発明の第1の実施形態に係る通信システム1の動作について説明する。マスタ装置10の動作については図5を、スレーブ装置20の動作については図6を、マスタ装置10とスレーブ装置20と間の動作関係については図7を用いて説明する。
(Operation)
Next, the operation of the communication system 1 according to the first embodiment of the present invention will be described. The operation of the master device 10 will be described with reference to FIG. 5, the operation of the slave device 20 will be described with reference to FIG. 6, and the operation relationship between the master device 10 and the slave device 20 will be described with reference to FIG.

[マスタ装置]
図5のフローチャートを用いてマスタ装置10の動作について説明する。なお、スレーブ装置20からのデータ送信要求(BREAK)に対するマスタ装置10による装置検索(SENSE)の順番は、IDテーブル101の登録順(上から順番)であるものとする。
[Master device]
The operation of the master device 10 will be described using the flowchart of FIG. It is assumed that the order of device search (SENSE) by the master device 10 in response to the data transmission request (BREAK) from the slave device 20 is the registration order (order from the top) of the ID table 101.

まず、図5において、マスタ装置10は、いずれかのスレーブ装置20から送信されたBREAKを検出する(ステップS10)。   First, in FIG. 5, the master device 10 detects the break transmitted from any of the slave devices 20 (step S <b> 10).

次に、マスタ装置10は、IDテーブル101に登録された装置のIDから一つを選択する(ステップS11)。   Next, the master device 10 selects one of the device IDs registered in the ID table 101 (step S11).

具体的には、データ送信要求(BREAK)を検出したマスタ装置10は、最初にIDテーブル101から装置検索(SENSE)するIDをひとつ選ぶ。そして、選んだIDに対して装置検索(SENSE)を実施する。   Specifically, the master device 10 that has detected the data transmission request (BREAK) first selects one ID for device search (SENSE) from the ID table 101. Then, a device search (SENSE) is performed on the selected ID.

なお、マスタ装置10によって装置検索(SENSE)されたスレーブ装置20がデータ送信要求元でない場合、データ送信要求の発行元であるスレーブ装置20から、再度データ送信要求(BREAK)がマスタ装置10に送信されてくる。その場合、データ送信要求(BREAK)を検出したマスタ装置10は、IDテーブル101を一つ進めて装置検索(SENSE)を行うIDを決定する。   If the slave device 20 that has been searched (SENSE) by the master device 10 is not the data transmission request source, the data transmission request (BREAK) is again transmitted to the master device 10 from the slave device 20 that issued the data transmission request. It will be. In that case, the master device 10 that has detected the data transmission request (BREAK) advances the ID table 101 and determines an ID for performing device search (SENSE).

次に、マスタ装置10は、選択したIDで装置検索(SENSE)を実行する。すなわち、マスタ装置10は、各スレーブ装置20に対して、選択したIDを含むSENSEコマンドを送信する(ステップS12)。   Next, the master device 10 performs a device search (SENSE) with the selected ID. That is, the master device 10 transmits a SENSE command including the selected ID to each slave device 20 (step S12).

ここで、マスタ装置10は、いずれかのスレーブ装置20からデータ送信要求の応答を受信すると(ステップS13でYes)、応答したスレーブ装置20とデータ通信処理を行う(ステップS14)。   Here, when the master device 10 receives a response to the data transmission request from any of the slave devices 20 (Yes in step S13), the master device 10 performs data communication processing with the responding slave device 20 (step S14).

一方、マスタ装置10は、データ送信要求がなければ(ステップS13でNo)、一旦処理を終了する。マスタ装置10は、データ送信要求を受信する度に、以上のステップS10〜S14の処理を繰り返す。   On the other hand, if there is no data transmission request (No in step S13), the master device 10 once ends the process. Each time the master device 10 receives a data transmission request, the master device 10 repeats the processes of steps S10 to S14.

以上がマスタ装置10の動作についての説明である。   The above is the description of the operation of the master device 10.

[スレーブ装置]
続いて、図6のフローチャートを用いてスレーブ装置1、2、・・・、nの動作について説明する。
[Slave device]
Subsequently, the operation of the slave devices 1, 2,..., N will be described using the flowchart of FIG.

まず、スレーブ装置20−n(以下、スレーブ装置N)においてデータ送信要求の必要性が生じたものとする(ステップS20)。   First, it is assumed that there is a need for a data transmission request in the slave device 20-n (hereinafter, slave device N) (step S20).

次に、データ送信要求の必要性が生じたスレーブ装置Nは、データ送信要求(BREAK)許可を検出すると(ステップS21でYes)、データ送信要求(BREAK)を送信する(ステップS22)。なお、データ送信要求の必要性が生じたスレーブ装置Nは、データ送信要求許可が検出されない場合(ステップS21でNo)、待機状態となる(ステップS20へ戻る)。   Next, when the slave device N in which the necessity of the data transmission request is generated detects permission of the data transmission request (BREAK) (Yes in step S21), the slave device N transmits the data transmission request (BREAK) (step S22). Note that the slave device N in which the necessity of the data transmission request has occurred becomes a standby state (No in step S21) when the data transmission request permission is not detected (return to step S20).

次に、スレーブ装置Nは、マスタ装置10の装置検索(SENSE)によって送信されてきたID(SENSE_ID)を受信する(ステップS23)。   Next, the slave device N receives the ID (SENSE_ID) transmitted by the device search (SENSE) of the master device 10 (step S23).

ここで、SENSE_IDが自身のIDである場合(ステップS24でYes)、スレーブ装置Nは、マスタ装置10とデータ通信処理を実行する(ステップS25)。   Here, when SENSE_ID is its own ID (Yes in Step S24), the slave device N executes data communication processing with the master device 10 (Step S25).

一方、SENSE_IDが自身のIDではない場合(ステップS24でNo)、スレーブ装置Nは、自身が送信したデータ送信要求が一回目であるか否かによって異なる処理をする(ステップS26)。   On the other hand, when SENSE_ID is not its own ID (No in step S24), the slave device N performs different processing depending on whether or not the data transmission request transmitted by itself is the first time (step S26).

ここで、スレーブ装置Nによるデータ送信要求が一回目である場合(ステップS26でYes)、スレーブ装置Nは、データ送信要求(BREAK)直後の装置検索(SENSE)のID(以下、first_ID)を記憶する(ステップS27)。   Here, when the data transmission request by the slave device N is the first time (Yes in step S26), the slave device N stores the ID (hereinafter, first_ID) of the device search (SENSE) immediately after the data transmission request (BREAK). (Step S27).

一方、スレーブ装置Nによるデータ送信要求が一回目ではない場合(ステップS26でNo)、SENSE_IDがfirst_IDと一致していれば(ステップS28でYes)、スレーブ装置Nはエラー処理を実行する(ステップS29)。すなわち、自身のIDが指定されずに再度first_IDの装置検索(SENSE)が実行された場合、マスタ装置10のIDテーブル101に、スレーブ装置NのIDが正しく登録されていないものとしてエラー処理を実行する。   On the other hand, if the data transmission request by the slave device N is not the first time (No in step S26), if SENSE_ID matches the first_ID (Yes in step S28), the slave device N executes error processing (step S29). ). That is, when the device search (SENSE) of first_ID is executed again without specifying its own ID, error processing is executed assuming that the ID of the slave device N is not correctly registered in the ID table 101 of the master device 10. To do.

また、スレーブ装置Nによるデータ送信要求が一回目ではなく(ステップS26でNo)、SENSE_IDがfirst_IDと一致していなければ(ステップS28でYes)、スレーブ装置Nは再度データ送信要求の時期を待つ(ステップS20に戻る)。   Further, if the data transmission request by the slave device N is not the first time (No in step S26), and SENSE_ID does not match the first_ID (Yes in step S28), the slave device N waits for the data transmission request again (step S28). (Return to step S20).

以上が、スレーブ装置1、2、・・・、nの動作について説明についての説明である。   The above is the description of the operation of the slave devices 1, 2,..., N.

[シーケンス図]
最後に、マスタ装置10と各スレーブ装置20の動作関係について、図7のシーケンス図を用いて説明する。
[Sequence Diagram]
Finally, the operational relationship between the master device 10 and each slave device 20 will be described using the sequence diagram of FIG.

まず、図7のT11区間について説明する。マスタ装置10から各スレーブ装置20にBREAK許可が送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、マスタ装置10にデータ送信要求を送信する。マスタ装置10は、データ送信要求に応じて、SENSE_ID(0x0001)を送信する。スレーブ1は、マスタ装置10から送信されたSENSE_IDに応答し、マスタ装置10との間でデータ通信を行う。   First, the T11 section in FIG. 7 will be described. When the break permission is transmitted from the master device 10 to each slave device 20, each slave device 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 10. The master device 10 transmits SENSE_ID (0x0001) in response to the data transmission request. The slave 1 performs data communication with the master device 10 in response to the SENSE_ID transmitted from the master device 10.

T11区間では、スレーブ装置Nからデータ送信要求が出されたものの、マスタ装置10からスレーブ装置1に対応するSENSE_IDが送信された。そのため、スレーブ装置1がマスタ装置10に応答することになった。このとき、スレーブ装置Nは、受信したスレーブ装置1のSENSE_ID(0x0001)をfirst_IDとして記憶することになる。   In T11, although a data transmission request was issued from the slave device N, the master device 10 transmitted SENSE_ID corresponding to the slave device 1. Therefore, the slave device 1 responds to the master device 10. At this time, the slave device N stores the received SENSE_ID (0x0001) of the slave device 1 as first_ID.

次に、図7のT12区間について説明する。マスタ装置10から各スレーブ装置20にBREAK許可が送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、再度マスタ装置10にデータ送信要求を送信する。マスタ装置10は、データ送信要求に応じて、SENSE_ID(0x0002)を送信する。スレーブ装置2は、マスタ装置10から送信されたSENSE_IDに応答し、マスタ装置10との間でデータ通信を行う。   Next, the section T12 in FIG. 7 will be described. When the break permission is transmitted from the master device 10 to each slave device 20, each slave device 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 10 again. The master device 10 transmits SENSE_ID (0x0002) in response to the data transmission request. The slave device 2 performs data communication with the master device 10 in response to the SENSE_ID transmitted from the master device 10.

T12区間では、再度スレーブ装置Nからデータ送信要求が出されたものの、マスタ装置10からスレーブ装置2に対応するSENSE_IDが送信された。そのため、スレーブ装置2がマスタ装置10に応答することになった。   In the T12 section, although the data transmission request is issued again from the slave device N, the SENSE_ID corresponding to the slave device 2 is transmitted from the master device 10. Therefore, the slave device 2 responds to the master device 10.

次に、図7のT13区間について説明する。マスタ装置10からBREAK許可が各スレーブ装置20に送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、再度マスタ装置10にデータ送信要求を送信する。マスタ装置10は、データ送信要求に応じて、SENSE_ID(0xN’)を送信する。しかしながら、T13区間においてマスタ装置10から送信されたSENSE_IDに応答する装置は存在しない。そのため、いずれのスレーブ装置20もマスタ装置10に対して応答しないことになる。   Next, the T13 section in FIG. 7 will be described. When the break permission is transmitted from the master device 10 to each slave device 20, each of the slave devices 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 10 again. The master device 10 transmits SENSE_ID (0xN ′) in response to the data transmission request. However, no device responds to the SENSE_ID transmitted from the master device 10 in the T13 period. Therefore, none of the slave devices 20 responds to the master device 10.

次に、T14区間について説明する。マスタ装置10から各スレーブ装置20にBREAK許可が送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、再度マスタ装置10にデータ送信要求を送信する。マスタ装置10は、データ送信要求に応じて、SENSE_ID(0x0001)を送信する。このとき、マスタ装置10は、IDテーブル101に登録された装置が一巡しているため、再度スレーブ装置1のIDを送信している。ここで、スレーブNは、記憶しているfirst_IDと一致するSENSE_IDを受信することになる。すなわち、スレーブ装置Nは、IDテーブル101に登録された自身のIDが正しくないことを認識することになる。そのため、スレーブ装置Nは、エラー処理を実行することになる。   Next, the T14 section will be described. When the break permission is transmitted from the master device 10 to each slave device 20, each slave device 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 10 again. The master device 10 transmits SENSE_ID (0x0001) in response to the data transmission request. At this time, the master device 10 transmits the ID of the slave device 1 again because the devices registered in the ID table 101 have made a round. Here, the slave N receives SENSE_ID that matches the stored first_ID. That is, the slave device N recognizes that its own ID registered in the ID table 101 is incorrect. Therefore, the slave device N performs error processing.

以上が、本発明の第1の実施形態に係る通信システム1の動作の説明である。   The above is the description of the operation of the communication system 1 according to the first embodiment of the present invention.

(効果)
以上説明したように、本実施形態に係る通信システムによれば、マスタ装置の装置検索アルゴリズムおよびスレーブ装置の検索ID読み取りによって、ID設定/登録ミスをスレーブ装置側で速やかに検出することができる。
(effect)
As described above, according to the communication system according to the present embodiment, an ID setting / registration error can be quickly detected on the slave device side by reading the device search algorithm of the master device and reading the search ID of the slave device.

本発明の実施形態に係る通信システムが対象とする1台のインタフェースの制御の主導権を握るマスタ装置に複数台のスレーブ装置がつながる形態のデータ通信は、特にシリアル通信において用いられる。   Data communication in a form in which a plurality of slave devices are connected to a master device that takes the initiative in controlling one interface targeted by the communication system according to the embodiment of the present invention is used particularly in serial communication.

一般的な方式では、スレーブ装置のID番号設定ミスやマスタ装置のスレーブID登録情報の設定ミスがある場合、以下に示すような状況となる。
1)スレーブ装置は、データ送信要求(BREAK)をマスタ装置に上げる。
2)マスタ装置は、ID登録情報から1台ずつ装置を検索(SENSE)するが、ID設定/登録ミスによりマスタ装置は要求元スレーブ装置を見つけることができない。
3)スレーブ装置は、他のスレーブ装置のデータ転送が発生する可能性があるためにタイムアウト監視ができない。また、スレーブ装置からは他のスレーブ装置が何台接続されているか分からないため、データ送信要求(BREAK)を上げ続ける。
In a general system, when there is an ID number setting error of the slave device or a setting error of the slave ID registration information of the master device, the following situation occurs.
1) The slave device raises a data transmission request (BREAK) to the master device.
2) The master device searches for devices one by one from the ID registration information (SENSE), but the master device cannot find the requesting slave device due to an ID setting / registration error.
3) The slave device cannot monitor the timeout because there is a possibility that data transfer of other slave devices may occur. In addition, since the slave device does not know how many other slave devices are connected, it continues to raise the data transmission request (BREAK).

以上のように、一般的な方式では、マスタ装置/スレーブ装置共に設定ミスを容易に検出できず、マスタ装置の通信処理およびインタフェースに余計な負荷がかかってしまう。   As described above, in a general method, setting errors cannot be easily detected in both the master device and the slave device, and an extra load is imposed on the communication processing and interface of the master device.

それに対し、本実施形態に係る通信システムによれば、スレーブ装置のID番号を予めマスタ装置のID登録情報に設定するデータ通信において、スレーブ装置のID設定ミスまたはマスタ装置のID登録情報設定ミスを速やかに検出することが可能となる。   On the other hand, according to the communication system according to the present embodiment, in data communication in which the ID number of the slave device is previously set in the ID registration information of the master device, an ID setting error of the slave device or an ID registration information setting error of the master device is detected. It becomes possible to detect promptly.

(第2の実施形態)
次に、本発明の第2の実施形態に係る通信システムについて説明する。
(Second Embodiment)
Next, a communication system according to the second embodiment of the present invention will be described.

図8は、本発明の第2の実施形態に係る通信システム2の構成を示すブロック図である。本実施形態に係る通信システム2は、マスタ装置40と、複数のスレーブ装置50−1〜Nと、シリアルインタフェース60とを備える(Nは自然数)。なお、図8のマスタ装置40、複数のスレーブ装置50−1〜Nおよびシリアルインタフェース60は、一部の機能構成を除いて図1のマスタ装置10、複数のスレーブ装置20−1〜Nおよびシリアルインタフェース30と同様の機能構成をもつ。   FIG. 8 is a block diagram showing the configuration of the communication system 2 according to the second embodiment of the present invention. The communication system 2 according to the present embodiment includes a master device 40, a plurality of slave devices 50-1 to N, and a serial interface 60 (N is a natural number). The master device 40, the plurality of slave devices 50-1 to N and the serial interface 60 in FIG. 8 are the same as the master device 10, the plurality of slave devices 20-1 to 20-N and the serial interface 60 in FIG. It has the same functional configuration as the interface 30.

本実施形態に係る通信システム2において、マスタ装置40は、各スレーブ装置50の装置名とID番号との対応表(登録テーブルとも呼ぶ)であるIDテーブル102(図9)を格納する。図9のIDテーブル102は、図2のIDテーブル101に送信済みフラグの列が追加されている。なお、図2のIDテーブル101と同様に、図9のIDテーブル102におけるスレーブ装置NのIDは、Nx0と登録されるべきであるのに、誤ってN’x0と登録されている。   In the communication system 2 according to the present embodiment, the master device 40 stores an ID table 102 (FIG. 9) that is a correspondence table (also referred to as a registration table) between the device name and ID number of each slave device 50. The ID table 102 in FIG. 9 has a transmitted flag column added to the ID table 101 in FIG. Similar to the ID table 101 in FIG. 2, the ID of the slave device N in the ID table 102 in FIG. 9 should be registered as Nx0, but is erroneously registered as N′x0.

[マスタ装置]
図10に示すように、マスタ装置40は、通信手段41、検出手段42、格納手段43、検索手段44、フラグ設定手段45、予約識別番号設定手段46を備える。すなわち、第2の実施形態に係るマスタ装置40は、第1の実施形態に係るマスタ装置10に、フラグ設定手段45と予約識別番号設定手段46とが追加された構成となっている。なお、図10の通信手段41、検出手段42、格納手段43および検索手段44は、それぞれ、図3の通信手段11、検出手段12、格納手段13および検索手段14と同様の機能構成をもつため、詳細な説明は省略する。
[Master device]
As shown in FIG. 10, the master device 40 includes a communication unit 41, a detection unit 42, a storage unit 43, a search unit 44, a flag setting unit 45, and a reservation identification number setting unit 46. That is, the master device 40 according to the second embodiment has a configuration in which a flag setting unit 45 and a reservation identification number setting unit 46 are added to the master device 10 according to the first embodiment. The communication means 41, detection means 42, storage means 43, and search means 44 in FIG. 10 have the same functional configuration as the communication means 11, detection means 12, storage means 13, and search means 14 in FIG. Detailed description will be omitted.

フラグ設定手段45は、IDテーブル102において、装置検索(SENSE)を行ったIDに対して送信済みフラグをセットする。   In the ID table 102, the flag setting unit 45 sets a transmitted flag for the ID for which the device search (SENSE) has been performed.

予約識別番号設定手段46は、設定されたスレーブ装置50に対する装置検索(SENSE)をデータ通信処理なしに一通り完了したことを送信済みフラグにより確認すると、予約ID(予約識別番号とも呼ぶ)を使って装置検索(SENSE)を発行する。   The reservation identification number setting means 46 uses a reservation ID (also referred to as a reservation identification number) when it is confirmed by the transmitted flag that the device search (SENSE) for the set slave device 50 has been completed without data communication processing. Issue a device search (SENSE).

[スレーブ装置]
図11に示すように、スレーブ装置50は、送受信手段51、予約識別番号検出手段52、エラー処理実行手段53、記憶手段54を備える。すなわち、第2の実施形態に係るスレーブ装置50は、第1の実施形態に係るスレーブ装置20の識別番号検出手段22を予約識別番号検出手段52に置換した構成を持つ。なお、図11の送受信手段51およびエラー処理実行手段53は、それぞれ、図4の送受信手段21およびエラー処理実行手段23と同様の機能構成をもつため、詳細な説明は省略する。
[Slave device]
As shown in FIG. 11, the slave device 50 includes a transmission / reception unit 51, a reservation identification number detection unit 52, an error process execution unit 53, and a storage unit 54. That is, the slave device 50 according to the second embodiment has a configuration in which the identification number detection unit 22 of the slave device 20 according to the first embodiment is replaced with a reservation identification number detection unit 52. The transmission / reception means 51 and error processing execution means 53 in FIG. 11 have the same functional configuration as the transmission / reception means 21 and error processing execution means 23 in FIG.

予約識別番号検出手段52は、装置検索(SENSE)において予約IDを2回検出したら、自装置のIDがマスタ装置0に正しく登録されていないと判断し、エラー処理実行手段にエラー処理を行うことを指示する。   When the reservation ID is detected twice in the device search (SENSE), the reservation identification number detection unit 52 determines that the ID of the own device is not correctly registered in the master device 0 and performs error processing in the error processing execution unit. Instruct.

記憶手段54は、マスタ装置40とやり取りするデータを記憶するとともに、予約識別番号検出手段52によって検出された予約IDを記憶する。   The storage unit 54 stores data exchanged with the master device 40 and stores the reservation ID detected by the reservation identification number detection unit 52.

以上が、本発明の第2の実施形態に係る通信システム2の構成に関する説明である。なお、以上の各構成要素は、コンピュータやサーバなどの情報処理装置を構成するハードウェア・ソフトウェアによって実現されるものである。   The above is description regarding the structure of the communication system 2 which concerns on the 2nd Embodiment of this invention. Each component described above is realized by hardware / software constituting an information processing apparatus such as a computer or a server.

(動作)
次に、本発明の第2の実施形態に係る通信システム2の動作について説明する。マスタ装置40の動作については図12を、スレーブ装置50の動作については図13を、マスタ装置40とスレーブ装置50と間の動作関係については図14を用いて説明する。
(Operation)
Next, the operation of the communication system 2 according to the second embodiment of the present invention will be described. The operation of the master device 40 will be described with reference to FIG. 12, the operation of the slave device 50 will be described with reference to FIG. 13, and the operation relationship between the master device 40 and the slave device 50 will be described with reference to FIG.

[マスタ装置]
図12のフローチャートを用いてマスタ装置40の動作について説明する。なお、スレーブ装置50からのデータ送信要求(BREAK)に対するマスタ装置40による装置検索(SENSE)の順番は、IDテーブル102の登録順に限らず、任意の順番で実行するものとする。
[Master device]
The operation of the master device 40 will be described using the flowchart of FIG. Note that the order of the device search (SENSE) by the master device 40 in response to the data transmission request (BREAK) from the slave device 50 is not limited to the registration order of the ID table 102, and is executed in an arbitrary order.

まず、図12において、マスタ装置40は、いずれかのスレーブ装置50から送信されたBREAKを検出する(ステップS40)。   First, in FIG. 12, the master device 40 detects BRAKE transmitted from any slave device 50 (step S40).

次に、マスタ装置40は、IDテーブル102の送信フラグを参照し、SENSE_IDが一通り送信済みであるか否かを判定する(ステップS41)。   Next, the master device 40 refers to the transmission flag in the ID table 102, and determines whether or not the SENSE_ID has already been transmitted (step S41).

送信フラグが設定されていないIDがある場合(ステップS41でNo)、マスタ装置40は、IDテーブル102に登録された装置のIDから一つを選択する(ステップS42)。   If there is an ID for which the transmission flag is not set (No in step S41), the master device 40 selects one of the device IDs registered in the ID table 102 (step S42).

具体的には、データ送信要求(BREAK)を検出したマスタ装置40は、IDテーブル102から、送信フラグが設定されていないIDを装置検索(SENSE)の対象としてひとつ選ぶ。そして、選んだIDに対して装置検索(SENSE)を実施する。   Specifically, the master device 40 that has detected the data transmission request (BREAK) selects from the ID table 102 one ID for which the transmission flag is not set as a device search (SENSE) target. Then, a device search (SENSE) is performed on the selected ID.

なお、マスタ装置40によって装置検索(SENSE)されたスレーブ装置50がデータ送信要求元でない場合、データ送信要求の発行元であるスレーブ装置50から、再度データ送信要求(BREAK)がマスタ装置40に送信されてくる。その場合、データ送信要求(BREAK)を検出したマスタ装置40は、IDテーブル102から、送信フラグが設定されていない別のIDを装置検索(SENSE)の対象として一つ決定する。   If the slave device 50 that has been searched (SENSE) by the master device 40 is not a data transmission request source, a data transmission request (BREAK) is transmitted again to the master device 40 from the slave device 50 that issued the data transmission request. It will be. In this case, the master device 40 that has detected the data transmission request (BREAK) determines one other ID for which no transmission flag is set from the ID table 102 as a device search (SENSE) target.

次に、マスタ装置40は、選択したIDで装置検索(SENSE)を実行する。すなわち、マスタ装置40は、各スレーブ装置50に対して、選択したIDを含むSENSEコマンドを送信する(ステップS43)。   Next, the master device 40 performs a device search (SENSE) with the selected ID. That is, the master device 40 transmits a SENSE command including the selected ID to each slave device 50 (step S43).

ここで、マスタ装置40は、いずれかのスレーブ装置50からデータ送信要求の応答を受信すると(ステップS44でYes)、既にIDを送信した装置に対して付与していた送信済みフラグを全てクリアする(ステップS45)。   Here, when receiving a response to the data transmission request from any of the slave devices 50 (Yes in step S44), the master device 40 clears all the transmitted flags that have been assigned to the device that has already transmitted the ID. (Step S45).

そして、マスタ装置40は、応答したスレーブ装置50とデータ通信処理を行う(ステップS46)。   Then, the master device 40 performs data communication processing with the responding slave device 50 (step S46).

一方、マスタ装置40は、データ送信要求がなければ(ステップS44でNo)、今回のSENSE_IDの送信先の装置の送信フラグをセットする(ステップS47)し、一旦処理を終了する。   On the other hand, if there is no data transmission request (No in step S44), the master device 40 sets the transmission flag of the transmission destination device of this SENSE_ID (step S47), and once ends the process.

ところで、ステップS41において、送信フラグが設定されていないIDがない場合(ステップS41でYes)、マスタ装置40は、IDテーブル102に登録された予約IDで装置検索(SENSE)を実行する(ステップS48)。なお、予約IDの送信は、IDテーブル102の中に登録された全てのIDに対して装置検索(SENSE)を行ったことを意味する。   By the way, if there is no ID for which the transmission flag is not set in step S41 (Yes in step S41), the master device 40 executes device search (SENSE) with the reservation ID registered in the ID table 102 (step S48). ). The transmission of the reservation ID means that a device search (SENSE) has been performed for all IDs registered in the ID table 102.

マスタ装置40は、予約IDによる装置検索(SENSE)を実行すると、既にIDを送信した装置に対して付与していた送信済みフラグを全てクリアし(ステップS49)、一旦処理を終了する。   When executing the device search (SENSE) based on the reservation ID, the master device 40 clears all the transmitted flags that have been assigned to the device that has already transmitted the ID (step S49), and once ends the processing.

マスタ装置40は、データ送信要求を受信する度に、以上のステップS40〜S49の処理を繰り返す。   Each time the master device 40 receives a data transmission request, the master device 40 repeats the processes of steps S40 to S49.

以上がマスタ装置40の動作についての説明である。   The above is the description of the operation of the master device 40.

[スレーブ装置]
続いて、図13のフローチャートを用いてスレーブ装置1、2、・・・、nの動作について説明する。なお、図13に示す第2の実施形態に係るスレーブ装置50の動作は、図6に示した第1の実施形態に係るスレーブ装置20と同様のフローとなる。
[Slave device]
Next, the operation of the slave devices 1, 2,..., N will be described using the flowchart of FIG. The operation of the slave device 50 according to the second embodiment shown in FIG. 13 is the same flow as that of the slave device 20 according to the first embodiment shown in FIG.

まず、スレーブ装置50−n(以下、スレーブ装置N)においてデータ送信要求の必要性が生じたものとする(ステップS50)。   First, it is assumed that there is a need for a data transmission request in the slave device 50-n (hereinafter, slave device N) (step S50).

次に、データ送信要求の必要性が生じたスレーブ装置Nは、データ送信要求(BREAK)許可を検出すると(ステップS51でYes)、データ送信要求(BREAK)を送信する(ステップS52)。なお、データ送信要求の必要性が生じたスレーブ装置Nは、データ送信要求許可が検出されない場合(ステップS51でNo)、待機状態となる(ステップS50へ戻る)。   Next, when the slave device N that has generated the necessity for the data transmission request detects permission of the data transmission request (BREAK) (Yes in step S51), the slave device N transmits the data transmission request (BREAK) (step S52). Note that the slave device N in which the necessity of the data transmission request has occurred becomes a standby state (No in step S51) when the data transmission request permission is not detected (return to step S50).

次に、スレーブ装置Nは、マスタ装置40の装置検索(SENSE)によって送信されてきたID(SENSE_ID)を受信する(ステップS53)。   Next, the slave device N receives the ID (SENSE_ID) transmitted by the device search (SENSE) of the master device 40 (step S53).

ここで、SENSE_IDが自身のIDである場合(ステップS54でYes)、スレーブ装置Nは、マスタ装置40とデータ通信処理を実行する(ステップS55)。   Here, when SENSE_ID is its own ID (Yes in Step S54), the slave device N executes data communication processing with the master device 40 (Step S55).

一方、SENSE_IDが自身のIDではない場合(ステップS54でNo)、スレーブ装置Nは、SENSE_IDが予約IDであるか否かによって異なる動作をする(ステップS56)。   On the other hand, when SENSE_ID is not its own ID (No in step S54), the slave device N performs different operations depending on whether or not SENSE_ID is a reservation ID (step S56).

ここで、スレーブ装置Nが受信したSENSE_IDが予約IDではなかった場合(ステップS56でNo)、スレーブ装置Nは再度データ送信要求のタイミングを待つ(ステップS50に戻る)。   Here, when the SENSE_ID received by the slave device N is not the reservation ID (No in step S56), the slave device N waits for the timing of the data transmission request again (returns to step S50).

ここで、スレーブ装置Nが受信した予約IDの回数によって、スレーブ装置Nは異なる動作をする(ステップS57)。   Here, the slave device N performs different operations depending on the number of reservation IDs received by the slave device N (step S57).

予約IDの受信が2回目であった場合(ステップS57でYes)、スレーブ装置Nはエラー処理を実行する(ステップS59)。すなわち、自身のIDが指定されずに再度予約IDの装置検索(SENSE)が実行された場合、マスタ装置40のIDテーブル101に、スレーブ装置NのIDが正しく登録されていないものとしてエラー処理を実行する。   If the reservation ID has been received for the second time (Yes in step S57), the slave device N executes error processing (step S59). That is, when the device search (SENSE) of the reservation ID is executed again without specifying its own ID, the error processing is performed assuming that the ID of the slave device N is not correctly registered in the ID table 101 of the master device 40. Run.

また、予約IDの受信が1回目であった場合(ステップS57でNo)、スレーブ装置Nは再度データ送信要求のタイミングを待つ(ステップS50に戻る)。   If the reservation ID is received for the first time (No in step S57), the slave device N again waits for the timing of the data transmission request (returns to step S50).

以上がスレーブ装置1、2、・・・、nの動作についての説明である。   The above is the description of the operations of the slave devices 1, 2,.

[シーケンス図]
最後に、マスタ装置40と各スレーブ装置50の動作関係について、図14のシーケンス図を用いて説明する。
[Sequence Diagram]
Finally, the operational relationship between the master device 40 and each slave device 50 will be described using the sequence diagram of FIG.

まず、図14のT21区間について説明する。マスタ装置40から各スレーブ装置50にBREAK許可が送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、マスタ装置40にデータ送信要求を送信する。マスタ装置40は、データ送信要求に応じて、SENSE_ID(0x0001)を送信する。スレーブ1は、マスタ装置40から送信されたSENSE_IDに応答し、マスタ装置40との間でデータ通信を行う。   First, the T21 section in FIG. 14 will be described. When the break permission is transmitted from the master device 40 to each slave device 50, each of the slave devices 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 40. The master device 40 transmits SENSE_ID (0x0001) in response to the data transmission request. The slave 1 performs data communication with the master device 40 in response to the SENSE_ID transmitted from the master device 40.

T21区間では、スレーブ装置Nからデータ送信要求が出されたものの、マスタ装置40からスレーブ装置1に対応するSENSE_IDが送信された。そのため、スレーブ装置1がマスタ装置40に応答することになった。このとき、マスタ装置40は、IDテーブル102のID0x0001に送信済みフラグを設定する。なお、第1の実施形態とは異なり、スレーブ装置Nは、受信したスレーブ装置1のSENSE_ID(0x0001)をfirst_IDとして記憶しなくてもよい。   In T21, a data transmission request was issued from the slave device N, but the SENSE_ID corresponding to the slave device 1 was transmitted from the master device 40. Therefore, the slave device 1 responds to the master device 40. At this time, the master device 40 sets a transmitted flag to ID0x0001 of the ID table 102. Unlike the first embodiment, the slave device N does not have to store the received SENSE_ID (0x0001) of the slave device 1 as the first_ID.

なお、図14の第2の実施形態に係るシーケンス図では、図7の第1の実施形態に係るシーケンス図で示したT12区間については省略している。そして、図14のT22区間とT23区間が、それぞれ図7のT13区間とT14区間に相当する。   In the sequence diagram according to the second embodiment in FIG. 14, the T12 section shown in the sequence diagram according to the first embodiment in FIG. 7 is omitted. 14 correspond to the T13 section and the T14 section in FIG. 7, respectively.

次に、図14のT22区間について説明する。マスタ装置40からBREAK許可が各スレーブ装置50に送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、再度マスタ装置40にデータ送信要求を送信する。マスタ装置40は、データ送信要求に応じて、SENSE_ID(0xN’)を送信する。しかしながら、T22区間においてマスタ装置40から送信されたSENSE_IDに応答する装置は存在しない。そのため、いずれのスレーブ装置50もマスタ装置40に対して応答しないことになる。このとき、マスタ装置40は、IDテーブル102のID0xN’に送信済みフラグを設定する。   Next, the T22 section in FIG. 14 will be described. When the break permission is transmitted from the master device 40 to each slave device 50, each of the slave devices 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 40 again. The master device 40 transmits SENSE_ID (0xN ′) in response to the data transmission request. However, no device responds to SENSE_ID transmitted from the master device 40 in the T22 section. Therefore, no slave device 50 responds to the master device 40. At this time, the master device 40 sets a transmitted flag to ID0xN ′ of the ID table 102.

次に、T23区間について説明する。T23区間の段階で、マスタ装置40は、IDテーブル102に登録されたIDの装置検索(SENSE)をデータ通信処理なしに一通り完了したことになる。そのため、マスタ装置40は、予約ID(図9では0xFFFF)を使って装置検索(SENSE)を発行する。ここで、マスタ装置からBREAK許可が各スレーブ装置50に送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、再度マスタ装置40にデータ送信要求を送信する。マスタ装置40は、データ送信要求に応じて、予約ID(0xFFFF)を送信する。しかしながら、T23区間においてマスタ装置40から送信された予約IDに応答する装置は存在しない。そのため、いずれのスレーブ装置50もマスタ装置40に対して応答しないことになる。   Next, the T23 section will be described. At the stage of the T23 interval, the master device 40 has completed the device search (SENSE) for the ID registered in the ID table 102 without any data communication processing. Therefore, the master device 40 issues a device search (SENSE) using the reservation ID (0xFFFF in FIG. 9). Here, when a break permission is transmitted from the master device to each slave device 50, each of the slave devices 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 40 again. The master device 40 transmits the reservation ID (0xFFFF) in response to the data transmission request. However, no device responds to the reservation ID transmitted from the master device 40 in the T23 section. Therefore, no slave device 50 responds to the master device 40.

次に、T24区間について説明する。マスタ装置40から各スレーブ装置50にBREAK許可が送信されると、各スレーブ装置1〜NはBREAK許可を受信する。ここで、スレーブ装置Nは、再度マスタ装置40にデータ送信要求を送信する。マスタ装置40は、データ送信要求に応じて、予約ID(0xFFFF)を送信する。このとき、スレーブ装置Nは、既に記憶している予約ID(0xFFFF)を受信していることになる。そのため、スレーブ装置Nは、IDテーブル102に登録された自身のIDが正しくないことを認識することになる。すなわち、スレーブ装置側からは、BREAKを上げてから2回目の予約IDを検出することは、マスタ装置40のIDテーブル102の中に自装置のIDが登録されていないことを確認できる。その結果を受けて、スレーブ装置Nは、エラー処理を実行する。   Next, the T24 section will be described. When the break permission is transmitted from the master device 40 to each slave device 50, each of the slave devices 1 to N receives the break permission. Here, the slave device N transmits a data transmission request to the master device 40 again. The master device 40 transmits the reservation ID (0xFFFF) in response to the data transmission request. At this time, the slave device N has received the reservation ID (0xFFFF) that has already been stored. Therefore, the slave device N recognizes that its own ID registered in the ID table 102 is incorrect. That is, from the slave device side, detecting the reservation ID for the second time after raising BRAK can confirm that the ID of the own device is not registered in the ID table 102 of the master device 40. In response to the result, the slave device N executes error processing.

以上が、本発明の第2の実施形態に係る通信システム2の動作の説明である。   The above is the description of the operation of the communication system 2 according to the second embodiment of the present invention.

以上のように、本実施形態に係る通信システムでは、マスタ装置40が持つIDテーブル102に送信済みフラグを設け、装置検索(SENSE)を行ったIDに対しては送信済みフラグをセットする。データ送信要求(BREAK)を上げたスレーブ装置50が見つかり、データ通信処理が行われた場合、マスタ装置40はIDテーブル102の送信済みフラグを全てクリアする。   As described above, in the communication system according to the present embodiment, the transmitted flag is provided in the ID table 102 of the master device 40, and the transmitted flag is set for the ID for which the device search (SENSE) has been performed. When the slave device 50 that has raised the data transmission request (BREAK) is found and the data communication process is performed, the master device 40 clears all the transmitted flags in the ID table 102.

また、送信済みフラグにより、設定されたスレーブ装置50に対する装置検索(SENSE)をデータ通信処理なしに一通り完了したら、マスタ装置40は、予約ID(図9では0xFFFF)を使って装置検索(SENSE)を発行する(図12)。このときも、マスタ装置40は、IDテーブル102の送信済みフラグを全てクリアする。   When the device search (SENSE) for the set slave device 50 is completed without data communication processing by the transmitted flag, the master device 40 uses the reservation ID (0xFFFF in FIG. 9) to search for the device (SENSE). ) Is issued (FIG. 12). Also at this time, the master device 40 clears all the transmitted flags in the ID table 102.

一方、スレーブ装置Nは、データ送信要求が発生するごとにデータ送信要求(BREAK)を発行する。第1の実施形態と異なる点は、装置検索(SENSE)で予約IDを2回検出したら自装置のIDがマスタ装置40に正しく登録されていないと判断してエラー処理を行う点である。   On the other hand, the slave device N issues a data transmission request (BREAK) every time a data transmission request is generated. The difference from the first embodiment is that if the reservation ID is detected twice by device search (SENSE), it is determined that the ID of the own device is not correctly registered in the master device 40 and error processing is performed.

第1の実施形態では、マスタ装置10の装置検索(SENSE)はIDテーブル101の登録順で行われた。それに対し、第2の実施形態では、送信済みフラグと予約IDとを利用するためにIDテーブル102の検索順は固定されない。例えば、直前にデータ通信処理を行ったスレーブ装置50が続けてデータ通信要求を上げる可能性が高いと期待される場合は、続けて同装置の装置検索(SENSE)を行うことが効率的である。このようなとき、装置検索(SENSE)順にとらわれない第2の実施形態が有効となる。   In the first embodiment, the device search (SENSE) of the master device 10 is performed in the registration order of the ID table 101. On the other hand, in the second embodiment, the search order of the ID table 102 is not fixed because the transmitted flag and the reservation ID are used. For example, if it is expected that there is a high possibility that the slave device 50 that has performed data communication processing immediately before will continue to raise data communication requests, it is efficient to perform device search (SENSE) of the same device continuously. . In such a case, the second embodiment that is not limited to the device search (SENSE) order is effective.

以上のように、本発明の実施形態に係る通信システムによれば、スレーブ装置の識別番号を登録した登録テーブルの登録情報と、実際の識別番号とスレーブ装置との対応付けとが異なっていることを、スレーブ装置側から速やかに検出することができる。   As described above, according to the communication system according to the embodiment of the present invention, the registration information of the registration table in which the identification number of the slave device is registered and the correspondence between the actual identification number and the slave device are different. Can be promptly detected from the slave device side.

本発明の実施形態において説明した通信制御方法は、本実施形態の構成によらなくても、上述の手法・方式を適用したもの、あるいは上述の手法・方式から類推されるであれば、本発明の範囲に含まれるものである。また、本発明の実施形態に係る通信制御方法をコンピュータに実行させるプログラムも、本発明の範囲に含まれるものである。さらに、本発明のプログラムを記憶させたプログラム記憶媒体も本発明の範囲に含まれるものである。   The communication control method described in the embodiment of the present invention is not limited to the configuration of the present embodiment, but may be applied to the above-described method / method or the analogy from the above-described method / method. It is included in the range. A program for causing a computer to execute the communication control method according to the embodiment of the present invention is also included in the scope of the present invention. Further, a program storage medium storing the program of the present invention is also included in the scope of the present invention.

また、本発明の実施形態に係る通信システムを適用したコンピュータなどの情報処理装置を本発明の範囲に含まれる。また、本発明の実施形態に係る通信システムを、情報処理装置と外部機器との接続に適用したコンピュータシステムも本発明の範囲に含まれる。本発明の実施形態に係る通信システムを、ホスト機器と複数のゲスト機器との接続に適用したサーバシステムも本発明の範囲に含まれる。   Further, an information processing apparatus such as a computer to which the communication system according to the embodiment of the present invention is applied is included in the scope of the present invention. A computer system in which the communication system according to the embodiment of the present invention is applied to the connection between the information processing apparatus and the external device is also included in the scope of the present invention. A server system in which the communication system according to the embodiment of the present invention is applied to connection between a host device and a plurality of guest devices is also included in the scope of the present invention.

以上、実施形態を参照して本発明を説明してきたが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   Although the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

1 通信システム
10 マスタ装置
11 通信手段
12 検出手段
13 格納手段
14 検索手段
20 スレーブ装置
21 送受信手段
22 識別番号検出手段
23 エラー処理実行手段
24 記憶手段
30 シリアルインタフェース
40 マスタ装置
41 通信手段
42 検出手段
43 格納手段
44 検索手段
45 フラグ設定手段
46 予約識別番号設定手段
50 スレーブ装置
51 送受信手段
52 予約識別番号検出手段
53 エラー処理実行手段
54 記憶手段
60 シリアルインタフェース
DESCRIPTION OF SYMBOLS 1 Communication system 10 Master apparatus 11 Communication means 12 Detection means 13 Storage means 14 Search means 20 Slave apparatus 21 Transmission / reception means 22 Identification number detection means 23 Error processing execution means 24 Storage means 30 Serial interface 40 Master apparatus 41 Communication means 42 Detection means 43 Storage means 44 Search means 45 Flag setting means 46 Reservation identification number setting means 50 Slave device 51 Transmission / reception means 52 Reservation identification number detection means 53 Error processing execution means 54 Storage means 60 Serial interface

Claims (9)

マスタ装置と、
前記マスタ装置とシリアルインタフェースによって接続された複数のスレーブ装置とを備え、
前記マスタ装置は、
前記複数のスレーブ装置のそれぞれに対応する識別番号を登録した登録テーブルを有し、
前記複数のスレーブ装置のいずれかから受信したデータ送信要求に対して、前記登録テーブルに登録された前記識別番号を順次前記複数のスレーブ装置に送信し、
前記複数のスレーブ装置のうち前記データ送信要求を送信したスレーブ装置は、
前記マスタ装置から受信した前記識別番号に基づいて前記登録テーブルに自装置が登録されているか否かを判定し、前記データ送信要求を送信後に同じ前記識別番号を2度受信した段階で前記登録テーブルに自装置が登録されていないと判定する通信システム。
A master device;
A plurality of slave devices connected by a serial interface with the master device,
The master device is
A registration table in which identification numbers corresponding to the plurality of slave devices are registered;
In response to a data transmission request received from any of the plurality of slave devices, the identification numbers registered in the registration table are sequentially transmitted to the plurality of slave devices,
Of the plurality of slave devices, the slave device that transmitted the data transmission request,
Based on the identification number received from the master device, it is determined whether or not the device is registered in the registration table, and the registration table is received when the same identification number is received twice after transmitting the data transmission request. A communication system that determines that the own device is not registered in the network.
前記マスタ装置は、
前記データ送信要求を受信するごとに、前記登録テーブルに設定された順番で前記識別番号を前記複数のスレーブ装置に送信し、
前記複数のスレーブ装置のうち前記データ送信要求を送信したスレーブ装置は、
前記データ送信要求を送信した後に最初に受信した前記識別番号を記録し、前記記録した識別番号が2度受信された段階で前記登録テーブルに自装置が登録されていないと判定する請求項1に記載の通信システム。
The master device is
Each time the data transmission request is received, the identification numbers are transmitted to the plurality of slave devices in the order set in the registration table,
Of the plurality of slave devices, the slave device that transmitted the data transmission request,
The identification number received first after transmitting the data transmission request is recorded, and when the recorded identification number is received twice, it is determined that the own device is not registered in the registration table. The communication system described.
前記マスタ装置は、
前記スレーブ装置からのデータ送信要求を許可するデータ送信要求許可通知を前記複数のスレーブ装置に送信し、前記データ送信要求許可通知に応答した前記スレーブ装置からの前記データ送信要求を受信し、前記複数のスレーブ装置に装置検索のための前記識別番号を送信し、前記識別番号への応答に関して対応する前記スレーブ装置とデータ通信を行う通信手段と、
前記通信手段を介して取得された前記データ送信要求を検出し、前記データ送信要求を送信したスレーブ装置を検索する指示を出す検出手段と、
前記登録テーブルを格納する格納手段と、
前記検出手段によって検出された前記データ送信要求に応じて、前記複数のスレーブ装置に送信する前記識別番号を前記登録テーブルから一つ選び、選び出した前記識別番号を前記通信手段に出力する検索手段とを有し、
前記スレーブ装置は、
前記マスタ装置から前記データ送信要求許可通知を受信した際に必要に応じて前記データ送信要求を送信し、前記マスタ装置から受信した前記識別番号が自装置のものである場合には前記マスタ装置に応答してデータ通信を実行する送受信手段と、
前記マスタ装置から送信された前記識別番号を受信し、受信した前記識別番号が自装置のものであるか否かを判定し、前記データ送信要求を出した後に自装置の前記識別番号を受信した際には前記マスタ装置に応答をする指示を前記送受信手段に出し、前記データ送信要求を出した後に他の前記スレーブ装置の前記識別番号を受信した場合には前記データ送信要求を送信する指示を前記送受信手段に出す識別番号検出手段と、
前記マスタ装置とやり取りするデータを記憶するとともに、前記データ送信要求の送信後に最初に受信した前記識別番号を記憶する記憶手段とを有する請求項に記載の通信システム。
The master device is
Transmitting a data transmission request permission notification permitting a data transmission request from the slave device to the plurality of slave devices, receiving the data transmission request from the slave device in response to the data transmission request permission notification, and Communication means for transmitting the identification number for device search to a slave device of the device and performing data communication with the corresponding slave device regarding a response to the identification number;
Detecting means for detecting the data transmission request acquired via the communication means and issuing an instruction to search for a slave device that has transmitted the data transmission request;
Storage means for storing the registration table;
Search means for selecting one of the identification numbers to be transmitted to the plurality of slave devices from the registration table in response to the data transmission request detected by the detection means, and outputting the selected identification number to the communication means; Have
The slave device is
When the data transmission request permission notification is received from the master device, the data transmission request is transmitted as necessary. When the identification number received from the master device is that of the own device, the master device A transmission / reception means for executing data communication in response;
Receiving the identification number transmitted from the master device, determining whether the received identification number is that of the own device, and receiving the identification number of the own device after issuing the data transmission request In response, an instruction to respond to the master device is issued to the transmission / reception means, and an instruction to transmit the data transmission request is received when the identification number of another slave device is received after issuing the data transmission request. An identification number detecting means for sending to the transmitting / receiving means;
The communication system according to claim 2 , further comprising storage means for storing data exchanged with the master device and storing the identification number received first after transmission of the data transmission request.
エラー処理を実行するエラー処理実行手段を備え、
前記識別番号検出手段は、
自装置の前記識別番号が受信されていないのに他装置の前記識別番号を2回受信した場合、前記エラー処理実行手段に対して前記エラー処理を実行する指示を出し、
前記エラー処理実行手段は、
前記識別番号検出手段からの指示に応じて前記エラー処理を実行する請求項3に記載の通信システム。
An error processing execution means for executing error processing is provided,
The identification number detecting means includes
When the identification number of the other device is received twice even though the identification number of the own device is not received, an instruction to execute the error processing is issued to the error processing execution means,
The error processing execution means includes
The communication system according to claim 3, wherein the error processing is executed in response to an instruction from the identification number detection unit.
前記マスタ装置は、
前記登録テーブルにおいて、送信した前記識別番号に送信済みフラグを設定し、
前記登録テーブルに登録された前記識別番号の全てに前記送信済みフラグが設定されると、前記登録テーブルに登録された前記識別番号の全てに前記送信済みフラグが設定されたことを示す予約識別番号を前記複数のスレーブ装置に送信し、
前記複数のスレーブ装置のうち前記データ送信要求を送信したスレーブ装置は、
前記マスタ装置から送信された前記予約識別番号を記憶し、前記予約識別番号が再度受信された段階で前記登録テーブルに自装置が登録されていないと判定する請求項1に記載の通信システム。
The master device is
In the registration table, set a transmitted flag to the transmitted identification number,
When the transmitted flag is set for all of the identification numbers registered in the registration table, a reservation identification number indicating that the transmitted flag is set for all of the identification numbers registered in the registration table To the plurality of slave devices,
Of the plurality of slave devices, the slave device that transmitted the data transmission request,
The communication system according to claim 1, wherein the reservation identification number transmitted from the master device is stored, and it is determined that the own device is not registered in the registration table when the reservation identification number is received again.
前記マスタ装置は、
前記スレーブ装置からのデータ送信要求を許可するデータ送信要求許可通知を前記複数のスレーブ装置に送信し、前記データ送信要求許可通知に応答した前記スレーブ装置から前記データ送信要求を受信するとともに、前記複数のスレーブ装置に装置検索のための前記識別番号を送信し、前記識別番号への応答に関して対応する前記スレーブ装置とデータ通信を行う通信手段と、
前記通信手段を介して取得された前記データ送信要求を検出し、前記データ送信要求を送信した装置を検索する指示を出す検出手段と、
前記登録テーブルを格納する格納手段と、
前記検出手段によって検出された前記データ送信要求に応じて、前記複数のスレーブ装置に送信する前記識別番号を前記登録テーブルから一つ選び、選び出した前記識別番号を前記通信手段に出力する検索手段と、
前記登録テーブルにおいて前記識別番号に前記送信済みフラグを設定するフラグ設定手段と、
前記予約識別番号を前記複数のスレーブ装置に送信する予約識別番号設定手段とを有し、
前記スレーブ装置は、
前記マスタ装置から前記データ送信要求許可通知を受信した際に必要に応じてデータ送信要求を送信し、前記マスタ装置から受信した前記識別番号が自装置のものである場合には前記マスタ装置に応答してデータ通信を実行する送受信手段と、
前記予約識別番号が2度受信された段階で前記登録テーブルに自装置が登録されていないことを判定し、エラー処理を行うことを指示する予約識別番号検出手段と、
前記予約識別番号検出手段の指示に応じて前記エラー処理を実行するエラー処理実行手段と、
前記マスタ装置とやり取りするデータを記憶するとともに、前記マスタ装置から送信された前記予約識別番号を記憶する記憶手段とを有する請求項5に記載の通信システム。
The master device is
A data transmission request permission notification for permitting a data transmission request from the slave device is transmitted to the plurality of slave devices, and the data transmission request is received from the slave device in response to the data transmission request permission notification. Communication means for transmitting the identification number for device search to a slave device of the device and performing data communication with the corresponding slave device regarding a response to the identification number;
Detecting means for detecting the data transmission request acquired via the communication means and issuing an instruction to search for a device that has transmitted the data transmission request;
Storage means for storing the registration table;
Search means for selecting one of the identification numbers to be transmitted to the plurality of slave devices from the registration table in response to the data transmission request detected by the detection means, and outputting the selected identification number to the communication means; ,
Flag setting means for setting the transmitted flag to the identification number in the registration table;
Reservation identification number setting means for transmitting the reservation identification number to the plurality of slave devices,
The slave device is
When the data transmission request permission notification is received from the master device, a data transmission request is transmitted as necessary. When the identification number received from the master device is that of the own device, the master device responds to the master device. Transmitting and receiving means for performing data communication,
Reservation identification number detection means for determining that the device is not registered in the registration table when the reservation identification number is received twice, and instructing error processing;
Error processing execution means for executing the error processing in response to an instruction from the reservation identification number detection means;
The communication system according to claim 5, further comprising storage means for storing data exchanged with the master device and storing the reservation identification number transmitted from the master device.
マスタ装置と複数のスレーブ装置とがシリアルインタフェースによって接続された通信システムにおける通信制御方法であって、
前記複数のスレーブ装置のいずれかから受信したデータ送信要求に対して、前記マスタ装置が有する登録テーブルに登録された前記複数のスレーブ装置のそれぞれに対応する識別番号を順次前記複数のスレーブ装置に送信し、
前記複数のスレーブ装置のうち前記データ送信要求を送信したスレーブ装置において、前記マスタ装置から受信した前記識別番号に基づいて前記登録テーブルに自装置が登録されているか否かを判定し、前記データ送信要求を送信後に同じ前記識別番号を2度受信した段階で前記登録テーブルに自装置が登録されていないと判定する通信制御方法。
A communication control method in a communication system in which a master device and a plurality of slave devices are connected by a serial interface,
In response to a data transmission request received from any of the plurality of slave devices, identification numbers corresponding to each of the plurality of slave devices registered in the registration table of the master device are sequentially transmitted to the plurality of slave devices. And
In the slave device that has transmitted the data transmission request among the plurality of slave devices, it is determined whether the device is registered in the registration table based on the identification number received from the master device, and the data transmission A communication control method for determining that the own device is not registered in the registration table when the same identification number is received twice after transmitting a request.
前記スレーブ装置による前記データ送信要求の送信後に、前記スレーブ装置によって同じ前記識別番号が2度受信された段階で前記登録テーブルに自装置が登録されていないと判定する請求項7に記載の通信制御方法。   The communication control according to claim 7, wherein after the data transmission request is transmitted by the slave device, it is determined that the own device is not registered in the registration table when the same identification number is received twice by the slave device. Method. マスタ装置と複数のスレーブ装置とがシリアルインタフェースによって接続された通信システムにおける通信制御プログラムであって、
前記複数のスレーブ装置のいずれかから受信したデータ送信要求に対して、前記マスタ装置が有する登録テーブルに登録された前記複数のスレーブ装置のそれぞれに対応する識別番号を順次前記複数のスレーブ装置に送信する処理と、
前記複数のスレーブ装置のうち前記データ送信要求を送信したスレーブ装置において、前記マスタ装置から受信した前記識別番号に基づいて前記登録テーブルに自装置が登録されているか否かを判定し、前記データ送信要求を送信後に同じ前記識別番号を2度受信した段階で前記登録テーブルに自装置が登録されていないと判定する処理とをコンピュータに実行させる通信制御プログラム。
A communication control program in a communication system in which a master device and a plurality of slave devices are connected by a serial interface,
In response to a data transmission request received from any of the plurality of slave devices, identification numbers corresponding to each of the plurality of slave devices registered in the registration table of the master device are sequentially transmitted to the plurality of slave devices. Processing to
In the slave device that has transmitted the data transmission request among the plurality of slave devices, it is determined whether the device is registered in the registration table based on the identification number received from the master device, and the data transmission A communication control program for causing a computer to execute a process of determining that its own device is not registered in the registration table when the same identification number is received twice after transmitting a request.
JP2014059409A 2014-03-24 2014-03-24 Communication system, communication control method, and communication control program Active JP6343991B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014059409A JP6343991B2 (en) 2014-03-24 2014-03-24 Communication system, communication control method, and communication control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014059409A JP6343991B2 (en) 2014-03-24 2014-03-24 Communication system, communication control method, and communication control program

Publications (2)

Publication Number Publication Date
JP2015184844A JP2015184844A (en) 2015-10-22
JP6343991B2 true JP6343991B2 (en) 2018-06-20

Family

ID=54351319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014059409A Active JP6343991B2 (en) 2014-03-24 2014-03-24 Communication system, communication control method, and communication control program

Country Status (1)

Country Link
JP (1) JP6343991B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102167621B1 (en) * 2018-11-07 2020-10-20 에스앤즈 주식회사 Data transfer apparatus using serial interface

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3334211B2 (en) * 1993-02-10 2002-10-15 株式会社日立製作所 display
JP4999006B2 (en) * 2008-04-21 2012-08-15 独立行政法人産業技術総合研究所 Serial bus transmission system
JP5845462B2 (en) * 2011-11-07 2016-01-20 パナソニックIpマネジメント株式会社 Communication system and transmission unit used therefor

Also Published As

Publication number Publication date
JP2015184844A (en) 2015-10-22

Similar Documents

Publication Publication Date Title
US9900385B2 (en) Connection management device, communication system, connection management method, and computer program product
TW201339969A (en) Management method and system for start servers in data center
RU2568096C1 (en) Device of printing control, printing system and method of controlling printing
US20120271645A1 (en) Automated replacement part ordering based on service thresholds
EP4030776A1 (en) Method and apparatus for triggering vomci function from olt to send omci messages
US20150058491A1 (en) Information processing apparatus, information processing method, and program
JP5558279B2 (en) MONITORING / CONTROL SYSTEM, MONITORING / CONTROL DEVICE USED FOR SAME, AND MONITORING / CONTROL METHOD
JP6343991B2 (en) Communication system, communication control method, and communication control program
US20160285673A1 (en) Client side host machine backup system and its implementing method
JP2015097331A (en) Network management server and restoring method
CN112751724B (en) Method and device for detecting link state
JP6475852B2 (en) Method, apparatus and system for processing service data
US20140241212A1 (en) System and method for storage and retrieval of neighboring switch tokens
US10459816B2 (en) Communication setting notification apparatus
JP2013025765A (en) Master/slave system, control device, master/slave switching method and master/slave switching program
US10862759B2 (en) Communication network determination apparatus, communication network determination method, and recording medium having communication network determination program recorded therein
US20150142960A1 (en) Information processing apparatus, information processing method and information processing system
JP6222358B2 (en) Information processing system, connection support method, and program
JP6428273B2 (en) Command processing system and command processing method
JP2015057685A (en) Monitoring system
JP6289214B2 (en) Information processing system and method
US11137958B2 (en) Electronic apparatus, method of controlling electronic apparatus, and non-transitory computer readable recording medium
JP2018028782A (en) Device connection apparatus and device connection method
CN114172904B (en) Jenkins information processing method and device, electronic equipment and storage medium
US11895200B2 (en) Access to an operator panel over an out-of-band local network domain

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180227

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180406

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180424

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180507

R150 Certificate of patent or registration of utility model

Ref document number: 6343991

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150