JP6343991B2 - Communication system, communication control method, and communication control program - Google Patents
Communication system, communication control method, and communication control program Download PDFInfo
- 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
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.
特許文献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.
以下に、本発明を実施するための形態について図面を用いて説明する。ただし、以下に述べる実施形態には、本発明を実施するために技術的に好ましい限定がされているが、発明の範囲を以下に限定するものではない。 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
本実施形態に係る通信システム1では、以下に述べていく構成・動作によって、スレーブ装置20のID設定ミスやマスタ装置10のID登録情報ミスが検出される。
In the communication system 1 according to the present embodiment, an ID setting error of the
マスタ装置10は、シリアルインタフェースの制御を司る装置である。シリアルインタフェース30には、複数のスレーブ装置20(スレーブ装置1、2、・・・、N、・・・)が接続されている。スレーブ装置1のIDは0x0001、スレーブ装置2のIDは0x0002、・・・、スレーブ装置NのIDは0xNに設定されている。そして、マスタ装置10は、各スレーブ装置20の装置名とID番号との対応表(登録テーブルとも呼ぶ)であるIDテーブル101(図2)を格納する。
The
マスタ装置10は、スレーブ装置20のデータ送信要求に応じて、IDテーブル101を参照しながらデータ送信要求を送信したスレーブ装置20を装置検索する。マスタ装置10によるスレーブ装置20の装置検索順番は、スレーブ装置20のIDを登録した登録テーブルに記載された順番に基づく。なお、スレーブ装置20のデータ送信要求に対するマスタ装置10の装置検索順は、事前に決定しておけばよい。また、スレーブ装置によるデータ送信要求をブレーク(BREAK)と呼び、マスタ装置による装置検索をセンス(SENSE)と呼ぶ。
In response to the data transmission request from the
図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
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
スレーブ装置20は、マスタ装置10から送信された装置検索のIDを受信して読み取る。各スレーブ装置20は、同一IDが2回出現した段階、すなわちマスタ装置10によるIDテーブル101に基づいた検索が一巡した段階で、自身のIDが装置検索(SENSE)されなかったとしてID設定/登録ミスのエラー処理を行う。
The
なお、エラー処理とは、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
次に、図3および図4を用いて、マスタ装置10およびスレーブ装置20の内部構成について説明する。
Next, the internal configuration of the
[マスタ装置]
図3に示すマスタ装置10は、通信手段11、検出手段12、格納手段13、検索手段14を備える。
[Master device]
The
通信手段11は、スレーブ装置20からのデータ送信要求(以下、BREAK)を許可するBREAK許可通知を各スリーブ20に送信する。また、通信手段11は、BREAK許可通知に応答した各スレーブ装置20からのBREAKを受信する。また、通信手段11は、各スレーブ装置20に対して装置検索のIDを送信する。また、通信手段11は、装置検索のIDへの応答に関して、対応するスレーブ装置20とデータ通信を行う。
The
検出手段12は、通信手段11を介して取得されたBREAKを検出し、検索手段14に対して装置検索する指示を出す。
The
格納手段13は、IDテーブル101を格納する。
The
検索手段14は、検出手段12によって検出されたBREAKに応じて、各スレーブ装置20に送信するIDをIDテーブル101から一つ選び、選び出したIDを通信手段に出力する。なお、IDテーブル101に記載されたIDの検索順番は、任意に設定できる。
The search means 14 selects one ID to be transmitted to each
[スレーブ装置]
図4に示すスレーブ装置20は、送受信手段21、識別番号検出手段22、エラー処理実行手段23、記憶手段24を備える。
[Slave device]
The
送受信手段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
識別番号検出手段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
エラー処理実行手段23は、識別番号検出手段22の通知に応じて、エラー処理を実行する。
The error
記憶手段24は、マスタ装置10とやり取りするデータを記憶するとともに、データ送信要求後に最初に受信したIDを記憶する。
The
以上が本発明の第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
[マスタ装置]
図5のフローチャートを用いてマスタ装置10の動作について説明する。なお、スレーブ装置20からのデータ送信要求(BREAK)に対するマスタ装置10による装置検索(SENSE)の順番は、IDテーブル101の登録順(上から順番)であるものとする。
[Master device]
The operation of the
まず、図5において、マスタ装置10は、いずれかのスレーブ装置20から送信されたBREAKを検出する(ステップS10)。
First, in FIG. 5, the
次に、マスタ装置10は、IDテーブル101に登録された装置のIDから一つを選択する(ステップS11)。
Next, the
具体的には、データ送信要求(BREAK)を検出したマスタ装置10は、最初にIDテーブル101から装置検索(SENSE)するIDをひとつ選ぶ。そして、選んだIDに対して装置検索(SENSE)を実施する。
Specifically, the
なお、マスタ装置10によって装置検索(SENSE)されたスレーブ装置20がデータ送信要求元でない場合、データ送信要求の発行元であるスレーブ装置20から、再度データ送信要求(BREAK)がマスタ装置10に送信されてくる。その場合、データ送信要求(BREAK)を検出したマスタ装置10は、IDテーブル101を一つ進めて装置検索(SENSE)を行うIDを決定する。
If the
次に、マスタ装置10は、選択したIDで装置検索(SENSE)を実行する。すなわち、マスタ装置10は、各スレーブ装置20に対して、選択したIDを含むSENSEコマンドを送信する(ステップS12)。
Next, the
ここで、マスタ装置10は、いずれかのスレーブ装置20からデータ送信要求の応答を受信すると(ステップS13でYes)、応答したスレーブ装置20とデータ通信処理を行う(ステップS14)。
Here, when the
一方、マスタ装置10は、データ送信要求がなければ(ステップS13でNo)、一旦処理を終了する。マスタ装置10は、データ送信要求を受信する度に、以上のステップS10〜S14の処理を繰り返す。
On the other hand, if there is no data transmission request (No in step S13), the
以上がマスタ装置10の動作についての説明である。
The above is the description of the operation of the
[スレーブ装置]
続いて、図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
また、スレーブ装置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
まず、図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
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
次に、図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
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
次に、図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
次に、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
以上が、本発明の第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
本実施形態に係る通信システム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
[マスタ装置]
図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
フラグ設定手段45は、IDテーブル102において、装置検索(SENSE)を行ったIDに対して送信済みフラグをセットする。
In the ID table 102, the
予約識別番号設定手段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
[スレーブ装置]
図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
予約識別番号検出手段52は、装置検索(SENSE)において予約IDを2回検出したら、自装置のIDがマスタ装置0に正しく登録されていないと判断し、エラー処理実行手段にエラー処理を行うことを指示する。
When the reservation ID is detected twice in the device search (SENSE), the reservation identification
記憶手段54は、マスタ装置40とやり取りするデータを記憶するとともに、予約識別番号検出手段52によって検出された予約IDを記憶する。
The
以上が、本発明の第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
[マスタ装置]
図12のフローチャートを用いてマスタ装置40の動作について説明する。なお、スレーブ装置50からのデータ送信要求(BREAK)に対するマスタ装置40による装置検索(SENSE)の順番は、IDテーブル102の登録順に限らず、任意の順番で実行するものとする。
[Master device]
The operation of the
まず、図12において、マスタ装置40は、いずれかのスレーブ装置50から送信されたBREAKを検出する(ステップS40)。
First, in FIG. 12, the
次に、マスタ装置40は、IDテーブル102の送信フラグを参照し、SENSE_IDが一通り送信済みであるか否かを判定する(ステップS41)。
Next, the
送信フラグが設定されていない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
具体的には、データ送信要求(BREAK)を検出したマスタ装置40は、IDテーブル102から、送信フラグが設定されていないIDを装置検索(SENSE)の対象としてひとつ選ぶ。そして、選んだIDに対して装置検索(SENSE)を実施する。
Specifically, the
なお、マスタ装置40によって装置検索(SENSE)されたスレーブ装置50がデータ送信要求元でない場合、データ送信要求の発行元であるスレーブ装置50から、再度データ送信要求(BREAK)がマスタ装置40に送信されてくる。その場合、データ送信要求(BREAK)を検出したマスタ装置40は、IDテーブル102から、送信フラグが設定されていない別のIDを装置検索(SENSE)の対象として一つ決定する。
If the
次に、マスタ装置40は、選択したIDで装置検索(SENSE)を実行する。すなわち、マスタ装置40は、各スレーブ装置50に対して、選択したIDを含むSENSEコマンドを送信する(ステップS43)。
Next, the
ここで、マスタ装置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
そして、マスタ装置40は、応答したスレーブ装置50とデータ通信処理を行う(ステップS46)。
Then, the
一方、マスタ装置40は、データ送信要求がなければ(ステップS44でNo)、今回のSENSE_IDの送信先の装置の送信フラグをセットする(ステップS47)し、一旦処理を終了する。
On the other hand, if there is no data transmission request (No in step S44), the
ところで、ステップ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
マスタ装置40は、予約IDによる装置検索(SENSE)を実行すると、既にIDを送信した装置に対して付与していた送信済みフラグを全てクリアし(ステップS49)、一旦処理を終了する。
When executing the device search (SENSE) based on the reservation ID, the
マスタ装置40は、データ送信要求を受信する度に、以上のステップS40〜S49の処理を繰り返す。
Each time the
以上がマスタ装置40の動作についての説明である。
The above is the description of the operation of the
[スレーブ装置]
続いて、図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
まず、スレーブ装置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
また、予約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
まず、図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
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
なお、図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
次に、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
次に、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
以上が、本発明の第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
また、送信済みフラグにより、設定されたスレーブ装置50に対する装置検索(SENSE)をデータ通信処理なしに一通り完了したら、マスタ装置40は、予約ID(図9では0xFFFF)を使って装置検索(SENSE)を発行する(図12)。このときも、マスタ装置40は、IDテーブル102の送信済みフラグを全てクリアする。
When the device search (SENSE) for the set
一方、スレーブ装置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
第1の実施形態では、マスタ装置10の装置検索(SENSE)はIDテーブル101の登録順で行われた。それに対し、第2の実施形態では、送信済みフラグと予約IDとを利用するためにIDテーブル102の検索順は固定されない。例えば、直前にデータ通信処理を行ったスレーブ装置50が続けてデータ通信要求を上げる可能性が高いと期待される場合は、続けて同装置の装置検索(SENSE)を行うことが効率的である。このようなとき、装置検索(SENSE)順にとらわれない第2の実施形態が有効となる。
In the first embodiment, the device search (SENSE) of the
以上のように、本発明の実施形態に係る通信システムによれば、スレーブ装置の識別番号を登録した登録テーブルの登録情報と、実際の識別番号とスレーブ装置との対応付けとが異なっていることを、スレーブ装置側から速やかに検出することができる。 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
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.
前記スレーブ装置からのデータ送信要求を許可するデータ送信要求許可通知を前記複数のスレーブ装置に送信し、前記データ送信要求許可通知に応答した前記スレーブ装置からの前記データ送信要求を受信し、前記複数のスレーブ装置に装置検索のための前記識別番号を送信し、前記識別番号への応答に関して対応する前記スレーブ装置とデータ通信を行う通信手段と、
前記通信手段を介して取得された前記データ送信要求を検出し、前記データ送信要求を送信したスレーブ装置を検索する指示を出す検出手段と、
前記登録テーブルを格納する格納手段と、
前記検出手段によって検出された前記データ送信要求に応じて、前記複数のスレーブ装置に送信する前記識別番号を前記登録テーブルから一つ選び、選び出した前記識別番号を前記通信手段に出力する検索手段とを有し、
前記スレーブ装置は、
前記マスタ装置から前記データ送信要求許可通知を受信した際に必要に応じて前記データ送信要求を送信し、前記マスタ装置から受信した前記識別番号が自装置のものである場合には前記マスタ装置に応答してデータ通信を実行する送受信手段と、
前記マスタ装置から送信された前記識別番号を受信し、受信した前記識別番号が自装置のものであるか否かを判定し、前記データ送信要求を出した後に自装置の前記識別番号を受信した際には前記マスタ装置に応答をする指示を前記送受信手段に出し、前記データ送信要求を出した後に他の前記スレーブ装置の前記識別番号を受信した場合には前記データ送信要求を送信する指示を前記送受信手段に出す識別番号検出手段と、
前記マスタ装置とやり取りするデータを記憶するとともに、前記データ送信要求の送信後に最初に受信した前記識別番号を記憶する記憶手段とを有する請求項2に記載の通信システム。 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度受信した段階で前記登録テーブルに自装置が登録されていないと判定する処理とをコンピュータに実行させる通信制御プログラム。 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.
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)
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)
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 |
-
2014
- 2014-03-24 JP JP2014059409A patent/JP6343991B2/en active Active
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 |