JP2016010137A - Termination resistance value setting device - Google Patents
Termination resistance value setting device Download PDFInfo
- Publication number
- JP2016010137A JP2016010137A JP2014131714A JP2014131714A JP2016010137A JP 2016010137 A JP2016010137 A JP 2016010137A JP 2014131714 A JP2014131714 A JP 2014131714A JP 2014131714 A JP2014131714 A JP 2014131714A JP 2016010137 A JP2016010137 A JP 2016010137A
- Authority
- JP
- Japan
- Prior art keywords
- resistance value
- value
- unit
- response signal
- node
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は複数のノードが接続されるネットワークの終端に接続する終端抵抗の抵抗値を最適に決定できる終端抵抗値設定装置に関する。 The present invention relates to a termination resistance value setting device that can optimally determine the resistance value of a termination resistor connected to the end of a network to which a plurality of nodes are connected.
接続ノードが1対N(Nは自然数)となるネットワークの終端には、信号の反射による反射波の影響を抑えるために終端抵抗が必要となる。しかし、終端抵抗の抵抗値が規格等で決められた固定値である場合、実際に構築された通信環境に終端抵抗が適合しないことがあり、そのため通信エラーが発生するなどの問題がある。 A termination resistor is required at the end of the network where the number of connection nodes is 1: N (N is a natural number) in order to suppress the influence of reflected waves due to signal reflection. However, when the resistance value of the termination resistor is a fixed value determined by a standard or the like, the termination resistor may not be adapted to the actually established communication environment, and thus there is a problem that a communication error occurs.
そこで、従来、個々の通信環境に合わせて終端抵抗を変化させる様々な試みがなされている。例えば、特許文献1には、接続される負荷の数により終端抵抗を変化させるバスライン終端回路が開示されている。このバスライン終端回路は、バスラインに接続された負荷の数を検出する検出手段と、複数の抵抗と、上記バスラインを終端するのに最適な合成抵抗値を得るため上記検出された接続負荷の数に従って上記複数の抵抗とバスラインとの間の接続状態を切り替える抵抗切り替え手段と、を具備する。 Thus, various attempts have been made to change the termination resistance in accordance with individual communication environments. For example, Patent Literature 1 discloses a bus line termination circuit that changes a termination resistance depending on the number of connected loads. The bus line termination circuit includes a detecting means for detecting the number of loads connected to the bus line, a plurality of resistors, and the detected connected load for obtaining an optimum combined resistance value for terminating the bus line. Resistance switching means for switching the connection state between the plurality of resistors and the bus line in accordance with the number of resistors.
しかしながら、上述のような従来技術は、接続される負荷の数のみにより終端抵抗の抵抗値を変化させるものであり、上記抵抗値の決定に、配線の長さ、配線の種類等の通信環境が考慮されていない。そのため、実際にネットワークを構築する際、終端抵抗が当該ネットワークに適合せず、通信エラーが発生してしまうという問題がある。本願発明は、上記問題に鑑み、実際の通信環境に適合した終端抵抗の抵抗値を決定する終端抵抗値設定装置を提供することを目的とする。 However, the prior art as described above changes the resistance value of the termination resistor only by the number of connected loads, and the communication environment such as the length of the wiring, the type of wiring, etc. is used to determine the resistance value. Not considered. For this reason, when the network is actually constructed, there is a problem in that the terminating resistor does not match the network and a communication error occurs. In view of the above problems, an object of the present invention is to provide a termination resistance value setting device that determines a resistance value of a termination resistance suitable for an actual communication environment.
上記の課題を解決するために、本発明の一態様に係る終端抵抗値設定装置は、複数のノードが接続されるネットワークに設置された可変抵抗と、上記可変抵抗の抵抗値を決定する抵抗値決定部と、各上記ノードにコマンドを送信する送信部と、上記送信部が送信する上記コマンドに対する各上記ノードからの応答信号を受信する受信部と、上記受信部が上記応答信号を受信するごとに段階的に上記抵抗値を増加する動作を上記受信部が上記応答信号を受信可能な範囲で上記可変抵抗に続けさせる第1制御と、上記受信部が上記応答信号を受信するごとに段階的に上記抵抗値を減少する動作を上記受信部が上記応答信号を受信可能な範囲で上記可変抵抗に続けさせる第2制御とを、いずれかが先になるように行い、かつ上記ノードごとに行う抵抗値変更部と、上記応答信号が受信可能であるときの上記抵抗値の最大値および最小値を各上記ノードについて記憶する記憶部とを備え、上記抵抗値決定部は、上記記憶部に記憶された各上記ノードについての上記最大値のうちの最も小さい値を上限値とするとともに、上記記憶部に記憶された各上記ノードについての上記最小値のうちの最も大きい値を下限値とし、上記上限値以下である上記最小値および上記下限値以上である上記最大値が得られた上記ノードについて上記上限値と上記下限値との間で上記抵抗値を決定することを特徴とする。 In order to solve the above problem, a terminal resistance value setting device according to an aspect of the present invention includes a variable resistor installed in a network to which a plurality of nodes are connected, and a resistance value that determines a resistance value of the variable resistor. A determination unit, a transmission unit that transmits a command to each of the nodes, a reception unit that receives a response signal from each of the nodes in response to the command transmitted by the transmission unit, and every time the reception unit receives the response signal A first control for continuously increasing the resistance value in a range in which the receiving unit can receive the response signal in a range in which the receiving unit can receive the response signal, and stepwise each time the receiving unit receives the response signal. In addition, the second control for causing the receiving unit to continue the variable resistor within the range in which the receiving unit can receive the response signal is performed so that one of them is first and for each of the nodes. Resistance A value change unit, and a storage unit that stores a maximum value and a minimum value of the resistance value when the response signal is receivable for each of the nodes, and the resistance value determination unit is stored in the storage unit. In addition, the smallest value among the maximum values for each of the nodes is set as an upper limit value, and the largest value among the minimum values for each of the nodes stored in the storage unit is set as a lower limit value. The resistance value is determined between the upper limit value and the lower limit value for the node where the minimum value that is less than or equal to the value and the maximum value that is greater than or equal to the lower limit value are obtained.
上記構成によれば、終端抵抗値設定装置は、受信部が応答信号を受信するごとに段階的に可変抵抗の抵抗値を増加する動作を、受信部が応答信号を受信可能な範囲で可変抵抗に続けさせる第1制御と、受信部が応答信号を受信するごとに段階的に可変抵抗の抵抗値を減少する動作を、受信部が応答信号を受信可能な範囲で可変抵抗に続けさせる第2制御とを、いずれかが先になるようにノードごとに行う。また、第1制御および第2制御による可変抵抗の抵抗値を増減する動作により、応答信号が受信可能な各ノードにおける可変抵抗の抵抗値の最大値と最小値とを得て記憶部に記憶させる。そのため、通信ネットワークが実際に構築された状態で、可変抵抗の抵抗値の可変範囲内に通信環境に適合しない抵抗値が含まれおり、かつ通信可能範囲が重複している各ノードにおいて、通信が正常に行える可変抵抗の抵抗値の最大値と最小値とを把握することができる。 According to the above configuration, the terminal resistance value setting device increases the resistance value of the variable resistor stepwise every time the receiving unit receives the response signal, and the variable resistance within the range in which the receiving unit can receive the response signal. And a second control for allowing the receiving unit to continue to reduce the resistance value of the variable resistor stepwise every time the receiving unit receives the response signal. Control is performed for each node so that either one comes first. In addition, by the operation of increasing or decreasing the resistance value of the variable resistor by the first control and the second control, the maximum value and the minimum value of the resistance value of the variable resistor at each node capable of receiving the response signal are obtained and stored in the storage unit. . Therefore, in a state where the communication network is actually constructed, a resistance value that does not match the communication environment is included in the variable range of the resistance value of the variable resistor, and communication is performed at each node where the communication range is overlapped. It is possible to grasp the maximum and minimum resistance values of the variable resistor that can be normally performed.
また、終端抵抗値設定装置は、可変抵抗の抵抗値の最大値の最も小さい値(上限値)と最小値の最も大きい値(下限値)との間で可変抵抗の抵抗値を決定する。そのため、通信ネットワークに接続される各ノードが正常に通信できる範囲内で可変抵抗の抵抗値を決定することができる。その結果、実際の通信環境に適合した可変抵抗の抵抗値を決定することができる。これにより、従来の決められた終端抵抗の抵抗値を採用した場合のように、その終端抵抗の抵抗値が通信ネットワークに適合しないことに起因する通信エラーを防止することができる。 Further, the termination resistance value setting device determines the resistance value of the variable resistor between the smallest value (upper limit value) of the maximum resistance value of the variable resistor and the largest value (lower limit value) of the minimum value. Therefore, the resistance value of the variable resistor can be determined within a range in which each node connected to the communication network can normally communicate. As a result, the resistance value of the variable resistor suitable for the actual communication environment can be determined. Thereby, it is possible to prevent a communication error caused by the fact that the resistance value of the termination resistor is not suitable for the communication network, as in the case where the resistance value of the conventionally determined termination resistor is adopted.
上記の課題を解決するために、本発明の一態様に係る終端抵抗値設定装置は、複数のノードが接続されるネットワークの終端に設置された可変抵抗と、上記可変抵抗の抵抗値を決定する抵抗値決定部と、各上記ノードに一度にコマンドを送信する送信部と、上記送信部が送信する上記コマンドに対する各上記ノードからの応答信号を受信する受信部と、上記コマンドの送信から一定時間経過するごとに段階的に上記抵抗値を増加する動作を上記可変抵抗の抵抗値の可変範囲で上記可変抵抗に続けさせる第1制御と、上記コマンドの送信から一定時間経過するごとに段階的に上記抵抗値を減少する動作を上記可変抵抗の抵抗値の可変範囲で上記可変抵抗に続けさせる第2制御とを、いずれかが先になるように行い、かつ各上記ノードについて並行して行う抵抗値変更部と、上記応答信号が受信可能であるときの上記抵抗値を各上記ノードについて記憶する記憶部とを備え、上記抵抗値決定部は、上記記憶部に記憶された各上記ノードについての上記抵抗値の最大値のうちの最も小さい値を上限値とするとともに、上記記憶部に記憶された各上記ノードについての上記抵抗値の最小値のうちの最も大きい値を下限値とし、上記上限値以下である上記最小値および上記下限値以上である上記最大値が得られた上記ノードについて上記上限値と上記下限値との間で上記抵抗値を決定することを特徴とする。 In order to solve the above-described problem, a terminal resistance value setting device according to an aspect of the present invention determines a variable resistor installed at a terminal of a network to which a plurality of nodes are connected, and a resistance value of the variable resistor. A resistance value determination unit; a transmission unit that transmits a command to each of the nodes at a time; a reception unit that receives a response signal from each of the nodes in response to the command transmitted by the transmission unit; and a predetermined time from the transmission of the command The first control for causing the variable resistor to continue the operation of increasing the resistance value step by step every time the variable resistor is in a variable range of the resistance value of the variable resistor, and stepwise every time a certain time has elapsed from the transmission of the command. The second control for causing the variable resistor to continue the operation of decreasing the resistance value in the variable range of the resistance value of the variable resistor is performed so that one of them is first, and for each of the nodes in parallel. A resistance value changing unit, and a storage unit that stores the resistance value when the response signal is receivable for each of the nodes, and the resistance value determining unit is stored in the storage unit. The smallest value among the maximum resistance values for the node is set as the upper limit value, and the largest value among the minimum resistance values for the nodes stored in the storage unit is set as the lower limit value. The resistance value is determined between the upper limit value and the lower limit value for the node from which the minimum value equal to or lower than the upper limit value and the maximum value equal to or higher than the lower limit value are obtained. .
上記の構成によれば、終端抵抗値設定装置は、送信部からのコマンドの送信から一定時間経過するごとに段階的に可変抵抗の抵抗値を増加する動作を、受信部が応答信号を受信可能な範囲で可変抵抗に続けさせる第1制御と、送信部からのコマンドの送信から一定時間経過するごとに段階的に可変抵抗の抵抗値を減少する動作を、受信部が応答信号を受信可能な範囲で可変抵抗に続けさせる第2制御とを、いずれかが先になるように全てのノードについて並行して行う。また、第1制御および第2制御による可変抵抗の抵抗値を増減する動作により、応答信号が受信可能な各ノードにおける可変抵抗の抵抗値を得て記憶部に記憶させる。そのため、通信ネットワークが実際に構築された状態で、通信可能範囲が重複している各ノードにおいて、通信が正常に行える可変抵抗の抵抗値を把握することができる。 According to the above configuration, the termination resistance value setting device can receive the response signal when the receiving unit performs an operation of increasing the resistance value of the variable resistor stepwise every time a certain time has elapsed since the transmission of the command from the transmitting unit. The receiving unit can receive the response signal in the first control for allowing the variable resistor to continue within a certain range and the operation of decreasing the resistance value of the variable resistor stepwise every time a certain time has elapsed since the transmission of the command from the transmitting unit. The second control in which the variable resistance is continued in the range is performed in parallel for all the nodes so that one of them comes first. Further, the resistance value of the variable resistor at each node capable of receiving the response signal is obtained and stored in the storage unit by the operation of increasing or decreasing the resistance value of the variable resistor by the first control and the second control. Therefore, in the state where the communication network is actually constructed, the resistance value of the variable resistor that can normally perform communication can be grasped at each node where the communicable ranges overlap.
また、終端抵抗値設定装置は、可変抵抗の抵抗値の最大値の最も小さい値(上限値)と最小値の最も大きい値(下限値)との間で可変抵抗の抵抗値を決定する。そのため、通信ネットワークに接続される各ノードが正常に通信できる範囲内で可変抵抗の抵抗値を決定することができる。その結果、実際の通信環境に適合した可変抵抗の抵抗値を決定することができる。これにより、従来の決められた終端抵抗の抵抗値を採用した場合のように、その終端抵抗の抵抗値が通信ネットワークに適合しないことに起因する通信エラーを防止することができる。 Further, the termination resistance value setting device determines the resistance value of the variable resistor between the smallest value (upper limit value) of the maximum resistance value of the variable resistor and the largest value (lower limit value) of the minimum value. Therefore, the resistance value of the variable resistor can be determined within a range in which each node connected to the communication network can normally communicate. As a result, the resistance value of the variable resistor suitable for the actual communication environment can be determined. Thereby, it is possible to prevent a communication error caused by the fact that the resistance value of the termination resistor is not suitable for the communication network, as in the case where the resistance value of the conventionally determined termination resistor is adopted.
また、終端抵抗値設定装置は、各ノードへのコマンドの送信を並行して行う。このため、可変抵抗の抵抗値を増加および減少させる動作をノードごとに繰り返す必要がないので、処理が軽減される。 In addition, the termination resistance value setting device transmits a command to each node in parallel. For this reason, it is not necessary to repeat the operation of increasing and decreasing the resistance value of the variable resistor for each node, so that the processing is reduced.
本発明の各態様に係る終端抵抗値設定装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記抵抗装置が備える各手段として動作させることにより上記抵抗装置をコンピュータにて実現させる抵抗装置の制御プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。 The terminal resistance value setting device according to each aspect of the present invention may be realized by a computer. In this case, the resistance device is realized by a computer by causing the computer to operate as each unit included in the resistance device. A control program for the resistance device and a computer-readable recording medium in which the control program is recorded also fall within the scope of the present invention.
本発明は、実際の通信環境に適合した終端抵抗の抵抗値を決定することができるという効果を奏する。 The present invention has an effect that it is possible to determine a resistance value of a termination resistor suitable for an actual communication environment.
〔実施形態1〕
本発明に係る実施形態1について、図1および図2に基づいて以下に説明する。図1は、本実施形態に係る終端抵抗値設定装置2の構成を示すブロック図である。まず、図1を用いて本実施形態に係る通信ネットワーク50の概要を説明する。ここで、本実施形態では、バス規格がマスタースレーブ方式である場合について説明する。
Embodiment 1
Embodiment 1 according to the present invention will be described below with reference to FIGS. 1 and 2. FIG. 1 is a block diagram showing a configuration of a termination resistance
図1に示すように、通信ネットワーク50は、通信ネットワーク50に接続された複数のノード7と、複数のノード7に必要なデータを送信するマスター装置として動作する終端抵抗値設定装置2と、各ノード7と終端抵抗値設定装置2とを接続するバスライン6と、を備えている。
As shown in FIG. 1, the
終端抵抗値設定装置2は、可変終端抵抗3(後述)の抵抗値を決定する終端抵抗値設定部1、および終端抵抗値設定装置2と各ノード7とのデータの送受信を行う入出力部8を備え、マスタースレーブ方式のマスターとして設定されている。
The termination resistance
入出力部8は、可変終端抵抗3、差動ドライバ4、および差動レシーバ5を備えている。
The input /
差動ドライバ4は、終端抵抗値設定部1のコマンド送信部11(後述)からの信号により、二本の信号線を用い、互いに逆相の電流を流し信号線間の電位差で伝送する差動伝送形式により各ノード7にコマンドを送信する。コマンドは、ノード7が応答信号を返すコマンドであればよく、例えばpingでもよい。
The differential driver 4 uses two signal lines in response to a signal from a command transmission unit 11 (described later) of the termination resistance value setting unit 1 to transmit currents of opposite phases to each other and transmit with a potential difference between the signal lines. A command is transmitted to each
差動レシーバ5は、差動伝送形式により送信される差動ドライバ4が送信したコマンドに対して各ノード7から差動伝送形式により送信された応答信号を合成する。また、差動レシーバ5は、合成した上記応答信号を終端抵抗値設定部1の応答信号受信部12(後述)に出力する。
The differential receiver 5 synthesizes a response signal transmitted from each
可変終端抵抗3(可変抵抗)は、通信ネットワーク50の終端に設置され、終端における通信ネットワーク50で伝送される信号の反射による反射波の影響を抑える。また、可変終端抵抗3は、抵抗値変更部13(後述)による制御により抵抗値が変化する。可変終端抵抗3は、本実施形態においては、デジタルポテンショメータが用いられている。デジタルポテンショメータは、図示はしないが、例えば、多数の抵抗が直列に接続された抵抗アレイと、各抵抗の両端に接続された半導体スイッチと、抵抗値変更部13から送信される制御信号をカウントするカウンタと、カウンタのカウント値をデコードした値を各半導体スイッチの制御信号として与えるデコーダとを有している。このようなデジタルポテンショメータにおいては、デコーダのデコード値に応じて、オンした半導体スイッチに接続される抵抗の両端がショートし、オフした半導体スイッチに接続される抵抗の両端がショートしないので、オンした半導体スイッチに接続される抵抗の総数に応じた抵抗値が得られる。
The variable termination resistor 3 (variable resistor) is installed at the end of the
なお、可変終端抵抗として、必ずしもデジタルポテンションメータを用いる必要はない。 It is not always necessary to use a digital potentiometer as the variable termination resistor.
図1に示すように可変終端抵抗3は2つ設けられており、一方は差動ドライバ4の正極出力端(差動レシーバ5の正極入力端)に接続され、他方は、差動ドライバ4の負極出力端(差動レシーバ5の負極入力端)に接続される。2つの可変終端抵抗3の抵抗値は同じであり、抵抗値変更部13により抵抗値が変化するときも同じ変化量で同時に変化する。
As shown in FIG. 1, two variable termination resistors 3 are provided. One is connected to the positive output terminal of the differential driver 4 (positive input terminal of the differential receiver 5), and the other is connected to the differential driver 4. Connected to the negative output terminal (negative input terminal of the differential receiver 5). The resistance values of the two variable termination resistors 3 are the same, and when the resistance value is changed by the resistance
ノード7は、通信ネットワーク50に接続される端末であり、マスタースレーブ方式のスレーブとして設定されている。ノード7は、終端抵抗値設定部1のコマンド送信部11から送信されるコマンドを受信すると、応答信号を差動伝送形式により差動レシーバ5へ送信する。
The
バスライン6は、終端抵抗値設定装置2および各ノード7を接続する。また、バスライン6は、二本の伝送線を有する半二重構成のバスであり、差動ドライバ4から送信されるコマンドを各ノード7に伝送し、上記コマンドに対する各ノード7からの応答信号を差動レシーバ5に伝送する。
The
続いて、終端抵抗値設定部1について詳しく説明する。 Next, the termination resistance value setting unit 1 will be described in detail.
終端抵抗値設定部1は、可変終端抵抗3の抵抗値を調整して、通信ネットワーク50における最適な可変終端抵抗3の抵抗値を自動的に設定する装置である。
The termination resistance value setting unit 1 is a device that automatically sets the optimum resistance value of the variable termination resistor 3 in the
図1に示すように、終端抵抗値設定部1は、制御部10と記憶部20とを備える。
As shown in FIG. 1, the termination resistance value setting unit 1 includes a
制御部10は、例えば記憶部20に記憶されたデータに基づき、可変終端抵抗3の抵抗値を設定するための制御を行う。このために制御部10は、各ノード7へコマンドを送信するコマンド送信部11と、各ノード7からの応答信号を受信する応答信号受信部12と、可変終端抵抗3の抵抗値を変更する抵抗値変更部13と、可変終端抵抗3の抵抗値を決定する抵抗値決定部14とを備える。
The
コマンド送信部11は、抵抗値変更部13からのコマンドの送信を指示する信号に基づき、差動ドライバ4に信号を出力し、所定のノード7へコマンドを送信する。また、コマンド送信部11は、抵抗値変更部13からのノード7の移行を指示する信号に基づき、コマンドの送信を次のコマンド未送信のノード7に移行する。
The
応答信号受信部12(受信部)は、コマンド送信部11がコマンドを送信してから当該コマンドに対するノード7の応答信号を所定時間以内に受信した場合、第1受信信号、もしくは第2受信信号を抵抗値変更部13に出力する。また、応答信号受信部12は、コマンド送信部11がコマンドを送信してから当該コマンドに対する応答信号を所定時間以内に受信しなかった場合、第1非受信信号、もしくは第2受信信号を抵抗値変更部13に出力する。なお、所定時間は任意に設定できる。
The response signal reception unit 12 (reception unit) receives the first reception signal or the second reception signal when the
抵抗値変更部13は、応答信号受信部12が応答信号を受信するごと(第1受信信号を出力するごと)に段階的に可変終端抵抗3の抵抗値を増加する動作を応答信号受信部12が応答信号を受信しなくなるまで(第1非受信信号を出力するまで)可変終端抵抗3に続けさせる。一方、抵抗値変更部13は、応答信号受信部12が応答信号を受信するごと(第2受信信号を出力するごと)に段階的に抵抗値を減少する動作を応答信号受信部12が応答信号を受信しなくなるまで(第2非受信信号を出力するまで)可変終端抵抗3に続けさせる。
The resistance
記憶部20は、各ノード7について、コマンド送信部11から送信されたコマンドに対する各ノード7からの応答信号を応答信号受信部12が所定時間以内に受信されなくなるときの一つ前の可変終端抵抗3の抵抗値の最大値、および最小値を記憶する。
For each
抵抗値決定部14は、記憶部20に記憶された各ノード7の最大値のうちの最も小さい値を上限値とするとともに、記憶部20に記憶された各ノード7の最小値のうちの最も大きい値を下限値とし、上記上限値と上記下限値との間で可変終端抵抗3の抵抗値を決定する。
The resistance
次に、上記のように構成される終端抵抗値設定部1の抵抗値決定処理について図2を用いて説明する。図2は、実施形態1に係る可変終端抵抗3の抵抗値決定処理の一例を示すフローチャートである。 Next, the resistance value determination process of the termination resistance value setting unit 1 configured as described above will be described with reference to FIG. FIG. 2 is a flowchart illustrating an example of resistance value determination processing of the variable termination resistor 3 according to the first embodiment.
終端抵抗値設定部1による上記抵抗値の決定処理は、終端抵抗値設定装置2および各ノード7が接続された通信ネットワーク50の構築後、通信ネットワーク50でデータ通信を行う前に実行する。
The determination process of the resistance value by the termination resistance value setting unit 1 is executed after the
なお、上記フローチャートは、可変終端抵抗3の抵抗値が可変範囲内の値であるとき通信可能なノード7を通信ネットワーク50に用いる場合に適応するものである。そのため、上記フローチャートの処理を始める前に、可変終端抵抗3の抵抗値の可変範囲における全ての値に対して、応答信号受信部12がコマンドに対する応答信号を受信できるか否かを各ノード7について確認し、受信することができないノード7については処理対象から除外する。
The above flow chart is applicable to the case where the
詳しくは、可変終端抵抗3の抵抗値を可変範囲の最も小さい値から最も大きい値に段階的に変化させ、抵抗値を段階的に変化させるごとに、通信ネットワーク50に接続されている全てのノード7にコマンドを送信する。その間、応答信号受信部12が当該コマンドに対する応答信号を受信することができないノード7を処理対象から除外する。なお、応答信号を受信することができないノード7を取換えて再度上記の処理を行う場合もある。
Specifically, every time the resistance value of the variable termination resistor 3 is changed stepwise from the smallest value in the variable range to the largest value, and every time the resistance value is changed stepwise, all nodes connected to the communication network 50 A command is transmitted to 7. Meanwhile, the
ここで、ノード7は、コマンド送信部11からのコマンドを受信すると、受信したコマンドに対する応答信号を終端抵抗値設定装置2に送信する。コマンド送信時に設定されている可変終端抵抗3の抵抗値が通信可能な抵抗値の範囲内であれば、通信ネットワーク50は正常に機能し、応答信号受信部12は当該ノード7から送信された応答信号を受信する。これに対して、コマンド送信時に設定されている可変終端抵抗3の抵抗値が通信可能な抵抗値の範囲外であれば、通信ネットワーク50は伝送される信号(コマンド、応答信号)の反射波の影響を受け、応答信号受信部12は当該コマンドに対する応答信号を受信しない。
Here, when receiving a command from the
また、応答信号受信部12は、コマンド送信部11が所定のノード7にコマンド送信を開始してから、コマンド送信部11から送信されたコマンドに対する当該ノード7からの応答信号が初めて所定時間以内に受信されなくなったときに、抵抗値変更部13に第1非受信信号を出力する。応答信号受信部12は、コマンド送信部11が当該ノード7にコマンド送信を開始してから第1非受信信号を出力するまでの間に、コマンド送信部11から送信されたコマンドに対する当該ノード7からの応答信号を所定時間以内に受信した場合、抵抗値変更部13に第1受信信号を出力する。
In addition, the response
そして、応答信号受信部12は、当該ノード7において第1非受信信号を抵抗値変更部13に出力した後、コマンド送信部11から送信されたコマンドに対する当該ノード7からの応答信号が再度所定時間以内に受信されなくなったときに、抵抗値変更部13に第2非受信信号を出力する。応答信号受信部12は、第1非受信信号を抵抗値変更部13に出力してから第2非受信信号を出力するまでの間に、コマンド送信部11から送信されたコマンドに対する当該ノード7からの応答信号を所定時間以内に受信した場合、第2受信信号を抵抗値変更部13に出力する。
The response
図2に示すフローチャートの処理においては、まず、抵抗値変更部13は、可変終端抵抗3の抵抗値を初期値(カウンタのプリセット値)に設定する(S1)。可変終端抵抗3の抵抗値の初期値は任意に設定でき、例えば従来の規格で採用されてきた抵抗値を用いてもよい。その後、コマンド送信部11は所定のノード7、すなわち複数のノード7のうちの一つにコマンドを送信し(S2)、抵抗値変更部13は、コマンド送信部11から当該ノード7にコマンドを送信してから所定時間以内に当該コマンドに対する応答信号を応答信号受信部12が受信したか否かを判定する(S3)。
In the process of the flowchart shown in FIG. 2, the resistance
S3において、応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信した場合(S3でYES)、すなわち、抵抗値変更部13が応答信号受信部12から第1受信信号を受信した場合、抵抗値変更部13は、可変終端抵抗3の抵抗値を一定量増加し、コマンド送信部11はコマンドを送信する(S4)。詳しくは、抵抗値変更部13は、抵抗値を一定量増加するために、少なくとも一つのパルス信号を出力するとともに、最初の増加時にカウンタに対してアップカウントするアップカウント信号を与える。可変終端抵抗3のカウンタが、与えられたパルス信号をプリセット値からアップカウントすると、デコーダのデコード値がカウンタのカウント値に応じて、オンしている一部の半導体スイッチをオフ状態に変更する。これにより、抵抗アレイにおいて直列接続される抵抗数が増加して、可変終端抵抗3の抵抗値が増加する。さらに、抵抗値変更部13は、当該ノード7にコマンドの送信を指示する信号をコマンド送信部11に出力し、コマンド送信部11は抵抗値変更部13からの上記信号を受信すると、当該ノード7にコマンドを再度送信する。
In S3, when the response
その後、抵抗値変更部13は所定時間以内に当該コマンドに対する応答信号を応答信号受信部12が受信したか否かを判定する(S5)。
Thereafter, the resistance
S5において、応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信しなかった場合(S5でNO)、すなわち、抵抗値変更部13が応答信号受信部12から第1非受信信号を受信した場合、抵抗値変更部13は、当該ノード7における通信可能な可変終端抵抗3の抵抗値の範囲の最大値として、一つ前の可変終端抵抗3の抵抗値を記憶部20に記憶させる(S6)。その後、抵抗値変更部13は、可変終端抵抗3の抵抗値を初期値に戻す(S7)。なお、S7における初期値とは、ノードへのコマンド送信に対する応答信号の受信があった初期値、すなわちS3において応答信号を受信した初期値であるのは勿論である。
In S5, when the response
続いて、抵抗値変更部13は、可変終端抵抗3の抵抗値を一定量減少し、コマンド送信部11はコマンドを送信する(S9)。詳しくは、抵抗値変更部13は、抵抗値を一定量減少するために、少なくとも一つのパルス信号を出力するとともに、最初の減少時にカウンタに対してダウンカウントするダウンカウント信号を与える。可変終端抵抗3のカウンタが、与えられたパルス信号をプリセット値からダウンカウントすると、デコーダのデコード値がカウンタのカウント値に応じて、オフしている一部の半導体スイッチをオン状態に変更する。これにより、抵抗アレイにおいて直列接続される抵抗数が減少して、可変終端抵抗3の抵抗値が減少する。さらに、抵抗値変更部13は、当該ノード7にコマンドの送信を指示する信号をコマンド送信部11に出力し、コマンド送信部11は、抵抗値変更部13からの上記信号を受信すると、当該ノード7にコマンドを再度送信する。
Subsequently, the resistance
その後、抵抗値変更部13は、所定時間以内に当該コマンドに対する応答信号を応答信号受信部12が受信したか否かを判定する(S10)。
Thereafter, the resistance
S10において、応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信しなかった場合(S10でNO)、すなわち、抵抗値変更部13が応答信号受信部12から第2非受信信号を受信した場合、抵抗値変更部13は、当該ノード7における通信可能な可変終端抵抗3の抵抗値の範囲の最小値として、一つ前の可変終端抵抗3の抵抗値を記憶部20に記憶させる(S11)。
In S10, when the response
次に、抵抗値変更部13は、通信ネットワーク50に接続される全てのノード7について、最大値および最小値の記憶が終了したか否かを判定する(S12)。抵抗値変更部13は、上記判定において、例えば、第2非受信信号が最後のノード7のものであれば、終了と判定し、第2非受信信号が最後のものでなければ終了ではないと判定する。
Next, the resistance
S12において、全てのノード7について最大値および最小値の記憶が終了していた場合(S12でYES)、抵抗値変更部13は、抵抗値決定部14に全てのノード7へのコマンド送信の終了を示す信号を出力する。抵抗値決定部14は、抵抗値変更部13からの当該信号を受信すると、各ノード7についての抵抗値の最大値のうちの最も小さい値(上限値)より大きい最小値が得られたノード7または各ノード7についての抵抗値の最小値のうちの最も大きい値(下限値)より小さい最大値が得られたノード7があるか否かを判定する(S14)。この判定において、抵抗値決定部14は、記憶部20に記憶されている各ノード7についての抵抗値の最大値および最小値を参照して、各ノード7についての抵抗値の最大値のうちの最も小さい値を上限値とし、各ノード7についての抵抗値の最小値のうちの最も大きい値を下限値として、上限値および下限値を記憶部20に記憶させる。
In S12, when the storage of the maximum value and the minimum value has been completed for all the nodes 7 (YES in S12), the resistance
上限値より大きい最小値が得られたノード7または上限値より小さい最大値が得られたノード7がない場合(S14でNO)、全てのノード7から、上限値以下である最小値および下限値以上である最大値が得られたことになる。この場合、抵抗値決定部14は、記憶部20に記憶されている上限値および下限値を参照して、上限値と下限値との間で可変終端抵抗3の抵抗値を決定する(S15)。また、上記抵抗値決定部14は、上限値と下限値との中央値を抵抗値として決定することが好ましい。抵抗値決定部14が、決定した抵抗値を可変終端抵抗3のカウンタにプリセット値として与えると、カウンタがプリセット値をロードして、デコーダに与える。これにより、デコーダのデコード値に応じて半導体スイッチがオンされるので、抵抗アレイは、決定された抵抗値に応じた数の抵抗が直列接続される。
When there is no
S3において、応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信しなかった場合(S3でNO)、すなわち、抵抗値変更部13が応答信号受信部12から第1非受信信号を受信した場合、抵抗値変更部13はランダムに可変終端抵抗3の抵抗値(初期値)を変化させ(S16)、S3において応答信号を受信するまでS1〜S3およびS16の処理を繰り返す。
In S3, when the response
S5において、応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信した場合(S5でYES)、すなわち、抵抗値変更部13が応答信号受信部12から第1受信信号を受信した場合、抵抗値変更部13は、可変終端抵抗3の抵抗値をさらに一定量増加する(S4)。S4およびS5の処理は、S5において応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信しなくなるまで繰り返される。言い換えると、S4およびS5の処理は、抵抗値変更部13が応答信号受信部12から第1非受信信号を受信するまで第1受信信号を受信するごとに繰り返される。その間、抵抗値変更部13は、応答信号受信部12から第1受信信号を受信する度に、可変終端抵抗3の抵抗値を一定の割合で段階的に増加する。
In S5, when the response
S10において、応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信した場合(S10でYES)、すなわち、抵抗値変更部13が応答信号受信部12から第2受信信号を受信した場合、抵抗値変更部13は、可変終端抵抗3の抵抗値をさらに一定量減少する(S9)。S9およびS10の処理は、S10において応答信号受信部12が当該コマンドに対する応答信号を所定時間以内に受信しなくなるまで繰り返される。言い換えると、S9およびS10の処理は、抵抗値変更部13が応答信号受信部12から第2非受信信号を受信するまで第2受信信号を受信するごとに繰り返される。その間、抵抗値変更部13は、応答信号受信部12から第2受信信号を受信する度に、可変終端抵抗3の抵抗値を一定の割合で段階的に減少する。
In S10, when the response
S12において、全てのノード7について最大値および最小値の記憶が終了していない場合(S12でNO)、抵抗値変更部13は、コマンド送信部11にノード7の移行を指示する信号を出力し、コマンド送信部11は上記信号を受信すると、コマンドの送信を次のコマンド未送信のノード7に移行する、すなわち最大値および最小値の記憶が終了していないいずれかのノード7に移行する(S13)。その後、処理がS1に戻り、通信ネットワーク50に接続される全てのノード7の最大値および最小値が記憶部20に記憶されるまで、S1〜S13の処理が繰り返される。
In S12, when the storage of the maximum value and the minimum value is not completed for all the nodes 7 (NO in S12), the resistance
S14において、上限値より大きい最小値が得られたノード7がある場合または下限値より小さい最大値が得られたノード7がある場合(S14でYES)、当該ノード7の通信可能範囲が他のノード7(上限値以下である最小値および下限値以上である最大値が得られたノード7)の通信可能範囲(共通通信可能範囲)と重複しない。したがって、各ノード7の間で重複しない通信可能範囲が存在しないように調整する必要がある。この場合、抵抗値決定部14は、共通通信可能範囲と重複しない通信可能範囲を有するノード7が存在することをユーザに報知して、調整することを促し、上記調整が行われたかを確認する(S17)。上記調整は、具体的には当該ノード7への配線経路の変更、配線部材の変更、または当該ノード7を通信ネットワーク50から除外する等を行うことである。抵抗値決定部14は、上記調整が行われたことをユーザの入力などによって確認すると(S17でYES)、S1から再度処理を開始するように抵抗値変更部13に通知する。抵抗値決定部14は、調整が行われたことを確認できない場合(S17でNO)、上記調整が確認できるまで待機する。
In S14, when there is a
また、所定のノード7において、応答信号受信部12が、コマンド送信部11から送信されるコマンドに対応する応答信号を、可変終端抵抗3の可変範囲の全ての抵抗値に関して所定時間以内に受信する場合が考えられる。このとき、可変終端抵抗3は、可変範囲内でどのような抵抗値を採用しても当該ノード7の通信環境に適合しているといえ、当該ノード7における可変終端抵抗3の最大値および最小値を検出せずに、次のノードに移行してもよい。最大値および最小値を検出されなかったノード7が存在する場合、S14における上限値および下限値を決定する際は、当該ノード7以外で記憶部20に記憶されている各ノード7の最大値および最小値から上限値および下限値を決定する。
In a
また、通信ネットワーク50に接続される全てのノード7において、応答信号受信部12が、コマンド送信部11から送信されるコマンドに対応する応答信号を、可変終端抵抗3の可変範囲の全ての抵抗値に関して所定時間以内に受信する場合、抵抗値決定部14は、当該可変終端抵抗3の可変範囲の中間値を抵抗値として決定することが好ましいが、可変範囲の値であれば他の値を用いてもよい。
In all the
なお、本実施形態では通信ネットワーク50をマスタースレーブ方式として説明を行ったが、上記に限らない。例えば、通信ネットワーク50が、ノード7をマスターとして設定するマルチマスター方式でも、終端抵抗値設定部1は適応可能である。このように、終端抵抗値設定部1は通信ネットワーク50がマスタースレーブ方式およびマルチマスター方式のいずれの場合にも適用可能であるが、終端抵抗値設定部1を含む装置がマスター(終端抵抗値設定装置2)であることが必要である。
In the present embodiment, the
通信ネットワーク50がマスタースレーブ方式である本実施形態では、応答信号受信部12における応答信号の受信の有無により、各ノード7における可変終端抵抗3の抵抗値の通信可能範囲の最大値および最小値を取得する。それに対し、通信ネットワーク50がマルチマスター方式である場合は、応答信号受信部12における通信エラーの発生の有無により、各ノード7における可変終端抵抗3の抵抗値の通信可能範囲の最大値および最小値を取得する。このように、抵抗値決定処理方法は使用するバス規格やプロトコルによって変更することが望ましい。
In the present embodiment in which the
以上のように終端抵抗値設定部1は、応答信号受信部12が応答信号を受信するごとに段階的に可変終端抵抗3の抵抗値を増加する動作を、応答信号受信部12が応答信号を受信可能な範囲で可変終端抵抗3に続けさせる第1制御と、応答信号受信部12が応答信号を受信するごとに段階的に可変終端抵抗3の抵抗値を減少する動作を、応答信号受信部12が応答信号を受信可能な範囲で可変終端抵抗3に続けさせる第2制御とを、いずれかが先になるようにノード7ごとに行う。また、第1制御および第2制御による可変終端抵抗3の抵抗値を増減する動作により、応答信号が受信可能な各ノード7における可変終端抵抗3の抵抗値の最大値と最小値とを得て記憶部20に記憶させる(可変終端抵抗3の可変範囲の全ての抵抗値に関して受信可能なノード7については抵抗値の最大値と最小値とを記憶部20に記憶しない)。すなわち、抵抗値変更部13が応答信号受信部12から第1非受信信号を受信した場合、抵抗値変更部13は、当該ノード7における通信可能な可変終端抵抗3の抵抗値の範囲の最大値として、一つ前の可変終端抵抗3の抵抗値を記憶部20に記憶させる(当該抵抗値が可変終端抵抗3の可変範囲の最大値と一致する場合は当該抵抗値を記憶部20に記憶しない)。また、抵抗値変更部13が応答信号受信部12から第2非受信信号を受信した場合、抵抗値変更部13は、当該ノード7における通信可能な可変終端抵抗3の抵抗値の範囲の最小値として、一つ前の可変終端抵抗3の抵抗値を記憶部20に記憶させる(当該抵抗値が可変終端抵抗3の可変範囲の最小値と一致する場合は当該抵抗値を記憶部20に記憶しない)。そのため、通信ネットワーク50が実際に構築された状態で、可変終端抵抗3の抵抗値の可変範囲内に通信環境に適合しない抵抗値が含まれており、かつ通信可能範囲が重複している各ノード7において、通信が正常に行える可変終端抵抗3の抵抗値の最大値と最小値とを把握することができる。
As described above, the termination resistance value setting unit 1 performs the operation of increasing the resistance value of the variable termination resistor 3 step by step every time the response
また、終端抵抗値設定部1は、可変終端抵抗3の抵抗値の最大値の最も小さい値(上限値)と最小値の最も大きい値(下限値)との間で可変終端抵抗3の抵抗値を決定する。そのため、通信ネットワーク50に接続される各ノード7が正常に通信できる範囲内で可変終端抵抗3の抵抗値を決定することができる。その結果、実際の通信環境に適合した可変終端抵抗3の抵抗値を決定することができる。これにより、従来の決められた終端抵抗の抵抗値を採用した場合のように、その終端抵抗の抵抗値が通信ネットワーク50に適合しないことに起因する通信エラーを防止することができる。
In addition, the termination resistance value setting unit 1 determines the resistance value of the variable termination resistor 3 between the smallest value (upper limit value) of the maximum resistance value of the variable termination resistor 3 and the largest value (lower limit value) of the minimum value. To decide. Therefore, the resistance value of the variable termination resistor 3 can be determined within a range in which each
また、終端抵抗値設定部1は、記憶部20に記憶された上限値と下限値との中央値を可変終端抵抗3の抵抗値とする。このため、通信ネットワーク50において正常な通信が行える範囲に余裕ができるので、外的要因等による通信環境の変化にも対応することができる。
Further, the termination resistance value setting unit 1 sets the median value between the upper limit value and the lower limit value stored in the
〔実施形態2〕
本発明に係る実施形態2について、図3および図4に基づいて以下に説明する。なお、上述した実施形態1と共通する各部材には同じ符号を付し、詳細な説明を省略する。図3は、本発明の実施形態2に係る終端抵抗値設定部1Aの構成を示すブロック図である。
[Embodiment 2]
本実施形態と実施形態1とは、コマンドの送信および可変終端抵抗3の抵抗値の最大値および最小値の決定方法が異なる。詳しくは、実施形態1では、通信ネットワーク50に接続されるノード7ごとにコマンドを送信し、応答信号が受信可能な当該ノード7の抵抗値の最大値および最小値を記憶部20に記憶している。それに対し本実施形態では、通信ネットワーク50に接続される各ノード7に対するコマンドの送信および、応答信号が受信可能な各ノード7の抵抗値の記憶部20への記憶を並行して行う。
This embodiment is different from Embodiment 1 in the method of transmitting commands and determining the maximum value and the minimum value of the resistance value of the variable termination resistor 3. Specifically, in the first embodiment, a command is transmitted to each
図3に示すように、終端抵抗値設定装置2は、図1に示す終端抵抗値設定装置2における終端抵抗値設定部1に代えて終端抵抗値設定部1Aを備え、終端抵抗値設定部1Aは、制御部10Aと記憶部20とを備える。
As shown in FIG. 3, the termination resistance
制御部10Aは、各ノード7へコマンドを送信するコマンド送信部11と、各ノード7からの応答信号を受信する応答信号受信部16と、可変終端抵抗3の抵抗値を変更する抵抗値変更部15と、可変終端抵抗3の抵抗値を決定する抵抗値決定部14とを備える。
The control unit 10A includes a
応答信号受信部16(受信部)は、コマンド送信部11がコマンドを送信してから当該コマンドに対するノード7の応答信号を所定時間以内に受信した場合、所定時間以内に応答信号を受信したノード7を示す受信信号を抵抗値変更部15に出力する。なお、所定時間は任意に設定できが、少なくとも、コマンドがコマンド送信部11より送信されてからノード7に受信されるまでの時間、コマンドがノード7に受信されてから応答信号がノードより送信されるまでの時間、および応答信号がノード7より送信されてから応答信号受信部12に受信されるまでの時間の合計に設定される。
When the response signal receiving unit 16 (receiving unit) receives the response signal of the
抵抗値変更部15は、コマンド送信部11がコマンドを送信してから一定時間経過ごとに、段階的に可変終端抵抗3の抵抗値を増加する動作を上記抵抗値が可変終端抵抗3の可変範囲の最大値に到達するまで可変終端抵抗3に続けさせる。また、抵抗値変更部15は、コマンド送信部11がコマンドを送信してから一定時間経過ごとに、段階的に可変終端抵抗3の抵抗値を減少する動作を、上記抵抗値が可変終端抵抗3の可変範囲の最小値に到達するまで可変終端抵抗3に続けさせる。
The resistance
記憶部20は、コマンド送信部11からコマンドが送信されたときの抵抗値および、応答信号受信部16が当該コマンドに対して応答信号を受信したノード7を対応づけて記憶する。
The
次に、上記のように構成される終端抵抗値設定部1の抵抗値決定処理について図4を用いて説明する。図4は、実施形態2に係る可変終端抵抗3の抵抗値決定処理の一例を示すフローチャートである。 Next, the resistance value determination process of the termination resistance value setting unit 1 configured as described above will be described with reference to FIG. FIG. 4 is a flowchart illustrating an example of resistance value determination processing for the variable termination resistor 3 according to the second embodiment.
図4に示すように、まず、抵抗値変更部15は、可変終端抵抗3の抵抗値を初期値(カウンタのプリセット値)に設定する(S21)。可変終端抵抗3の抵抗値の初期値は任意に設定でき、例えば従来の規格で採用されてきた抵抗値を用いてもよい。その後、コマンド送信部11は通信ネットワーク50に接続されている全てのノード7にコマンドを送信する(S22)。抵抗値変更部15は、応答信号受信部16からの受信信号に基づき、コマンド送信部11より各ノード7にコマンドが送信されてから所定時間以内に、応答信号受信部16が当該コマンドに対する応答信号を受信したノード7を確認する(S23)。抵抗値変更部15は、コマンドが送信されたときの抵抗値と、応答信号の受信を確認したノード7とを記憶部20に記憶させる。抵抗値変更部15は、応答信号を受信しなかったノード7については、当該ノード7と抵抗値とを記憶部20に記憶させない。応答信号を受信しなかったノード7と抵抗値とを記憶部20に記憶させない処理は、以降の応答信号を受信したノード7の確認(S26、S30)においても同様に行われる。
As shown in FIG. 4, first, the resistance
コマンド送信部11がコマンドを送信してから一定時間経過後、抵抗値変更部15は、可変終端抵抗3の抵抗値を一定量増加し(S24)、全てのノード7にコマンドの送信を指示する信号をコマンド送信部11に出力する。ここで、上記一定時間は上記所定時間以上であればよく、任意に決定できる。
After a predetermined time has elapsed since the
コマンド送信部11は抵抗値変更部15からの上記信号を受信すると、全てのノード7にコマンドを再度送信する(S25)。抵抗値変更部15は、応答信号受信部16からの受信信号に基づき、増加後の抵抗値において、コマンド送信部11より各ノード7にコマンドが送信されてから所定時間以内に、応答信号受信部16が当該コマンドに対する応答信号を受信したノード7を確認する(S26)。また、抵抗値変更部15は、コマンドが送信されたときの抵抗値と、応答信号の受信を確認したノード7を記憶部20に記憶させる。
When receiving the signal from the resistance
次に、抵抗値変更部15は、可変終端抵抗3の抵抗値を可変範囲の最も大きい値まで増加したか否かを判定する(S27)。
Next, the resistance
抵抗値が可変終端抵抗3の可変範囲の最も大きい値まで増加した場合(S27でYES)、抵抗値変更部15は可変終端抵抗3の抵抗値を一定量減少する(S28)。抵抗値変更部15は、全てのノード7にコマンドの送信を指示する信号をコマンド送信部11に出力する。コマンド送信部11は抵抗値変更部15からの上記信号を受信すると、全てのノード7にコマンドを再度送信する(S29)。抵抗値変更部15は、応答信号受信部16からの受信信号に基づき、減少後の抵抗値において、コマンド送信部11より各ノード7にコマンドが送信されてから所定時間以内に、応答信号受信部16が当該コマンドに対する応答信号を受信したノード7を確認する(S30)。また、抵抗値変更部15は、コマンドが送信されたときの抵抗値と、応答信号の受信を確認したノード7とを記憶部20に記憶させる。
When the resistance value increases to the largest value in the variable range of the variable termination resistor 3 (YES in S27), the resistance
なお、S27とS28との間に、さらにステップを設け、抵抗値をS21における初期値に設定した後、S28の処理を行うようにすることが好ましい。 It should be noted that it is preferable that a further step is provided between S27 and S28 so that the process of S28 is performed after the resistance value is set to the initial value in S21.
次に、抵抗値変更部15は、可変終端抵抗3の抵抗値を可変範囲の最も小さい値まで減少したか否かを判定する(S31)。抵抗値が可変終端抵抗3の可変範囲の最も小さい値まで減少した場合(S31でYES)、抵抗値変更部15は、抵抗値決定部14に全てのノード7へのコマンド送信の終了を示す信号を出力する。S21〜S31の処理を行うことにより、記憶部20に記憶された抵抗値を参照することで、各ノード7が応答信号を受信できる可変終端抵抗3の抵抗値の範囲が分かる。
Next, the resistance
抵抗値決定部14は、抵抗値変更部15から上記信号を受信すると、記憶部20に記憶された各ノード7における通信可能な可変終端抵抗3の抵抗値の範囲のうち、各ノード7についての抵抗値の最大値のうちの最も小さい値(上限値)より大きい最小値が得られたノード7または各ノード7についての抵抗値の最小値のうちの最も大きい値(下限値)より小さい最大値が得られたノード7があるか否かを判定する(S32)。この判定において、抵抗値決定部14は、記憶部20に記憶されている各ノード7についての抵抗値の最大値および最小値を参照して、各ノード7についての抵抗値の最大値のうちの最も小さい値を上限値とし、各ノード7についての抵抗値の最小値のうちの最も大きい値を下限値として、上限値および下限値を記憶部20に記憶させる。
When the resistance
各上限値より大きい最小値を得られたノード7または上限値より小さい最大値が得られたノード7がない場合(S32でNO)、全てのノード7から、上限値以下である最小値および下限値以上である最大値が得られたことになる。この場合、抵抗値決定部14は、記憶部20に記憶されている上限値および下限値を参照して、上限値と下限値との間で可変終端抵抗3の抵抗値を決定する(S33)。また、上記抵抗値決定部14は、上限値と下限値との中央値を抵抗値として決定することが好ましい。
When there is no
S27において、抵抗値が可変終端抵抗3の可変範囲の最も大きい値まで増加していない場合(S27でNO)、抵抗値変更部15は、可変終端抵抗3の抵抗値をさらに一定量増加する(S24)。S24〜S27の処理は、S27において可変終端抵抗3の抵抗値が可変範囲の最も大きい値に増加するまで繰り返される。その間、抵抗値変更部15は、コマンド送信部11からコマンドが送信されてから一定時間経過するごとに、可変終端抵抗3の抵抗値を一定の割合で段階的に増加する。抵抗値変更部15は、増加した抵抗値ごとに、応答信号受信部16からの受信信号に基づき当該コマンドに対する応答信号を所定時間以内に受信したノード7および当該抵抗値を記憶部20に記憶させる。
In S27, when the resistance value has not increased to the maximum value in the variable range of the variable termination resistor 3 (NO in S27), the resistance
S31において、抵抗値が可変終端抵抗3の可変範囲の最も小さい値まで減少していない場合(S31でNO)、抵抗値変更部15は、可変終端抵抗3の抵抗値をさらに一定量減少する(S28)。S28〜S31の処理は、S31において可変終端抵抗3の抵抗値が可変範囲の最も小さい値に減少するまで繰り返される。その間、抵抗値変更部15は、コマンド送信部11からコマンドが送信されてから一定時間経過するごとに、可変終端抵抗3の抵抗値を一定の割合で段階的に減少する。抵抗値変更部15は、減少した抵抗値ごとに応答信号受信部16からの受信信号に基づき当該コマンドに対する応答信号を所定時間以内に受信したノード7および当該抵抗値を記憶部20に記憶させる。
In S31, when the resistance value has not decreased to the smallest value of the variable range of the variable termination resistor 3 (NO in S31), the resistance
S32において、上限値より大きい最小値が得られたノード7がある場合または下限値より小さい最大値が得られたノード7がある場合(S32でYES)、抵抗値決定部14は、図2に示すS17と同様に、共通通信可能範囲と重複しない通信可能範囲を有するノード7が存在することをユーザに報知して調整することを促し、上記調整が行われたかを確認する(S34)。抵抗値決定部14は、上記調整が行われたことをユーザの入力などによって確認すると(S34でYES)、S21から再度処理を開始するように抵抗値変更部15に通知する。抵抗値決定部14は、調整が行われたことを確認できない場合(S34でNO)、上記調整が確認できるまで待機する。
In S32, when there is a
また、所定のノード7において、応答信号受信部16が、コマンド送信部11から送信されるコマンドに対応する応答信号を、可変終端抵抗3の可変範囲の全ての抵抗値に関して所定時間以内に受信する場合が考えられる。このとき、可変終端抵抗3は、可変範囲内でどのような抵抗値を採用しても当該ノード7の通信環境に適合しているといえ、当該ノード7における可変終端抵抗3の最大値および最小値を検出しなくてもよい。所定のノード7において最大値および最小値を検出しない場合、S32における上限値および下限値を決定する際は、当該ノード7以外で記憶部20に記憶されている各ノード7の最大値および最小値から上限値および下限値を決定する。
In the
以上のように終端抵抗値設定部1Aは、応答信号受信部16が上記応答信号を受信の有無を確認するごとに段階的に可変終端抵抗3の抵抗値を増加する動作を、応答信号受信部16が応答信号を受信可能な範囲で可変終端抵抗3に続けさせる第1制御と、応答信号受信部16が上記応答信号を受信の有無を確認するごとに段階的に可変終端抵抗3の抵抗値を減少する動作を、応答信号受信部16が応答信号を受信可能な範囲で可変終端抵抗3に続けさせる第2制御とを、いずれかが先になるように全てのノード7について並行して行う。また、第1制御および第2制御による可変終端抵抗3の抵抗値を増減する動作により、応答信号が受信可能な各ノード7における可変終端抵抗3の抵抗値を得て記憶部20に記憶させる。そのため、通信ネットワーク50が実際に構築された状態で、通信可能範囲が重複している各ノード7において、通信が正常に行える可変終端抵抗3の抵抗値を把握することができる。
As described above, the termination resistance
また、終端抵抗値設定部1Aは、可変終端抵抗3の抵抗値の最大値の最も小さい値(上限値)と最小値の最も大きい値(下限値)との間で可変終端抵抗3の抵抗値を決定する。そのため、通信ネットワーク50に接続される各ノード7が正常に通信できる範囲内で可変終端抵抗3の抵抗値を決定することができる。その結果、実際の通信環境に適合した可変終端抵抗3の抵抗値を決定することができる。これにより、従来の決められた終端抵抗の抵抗値を採用した場合のように、その終端抵抗の抵抗値が通信ネットワーク50に適合しないことに起因する通信エラーを防止することができる。
Further, the termination resistance value setting unit 1 </ b> A has a resistance value of the variable termination resistor 3 between the smallest value (upper limit value) of the maximum resistance value of the variable termination resistor 3 and the largest value (lower limit value) of the minimum value. To decide. Therefore, the resistance value of the variable termination resistor 3 can be determined within a range in which each
また、終端抵抗値設定部1Aは、各ノード7へのコマンドの送信と、各ノード7のコマンドの受信確認と、可変終端抵抗3の抵抗値の増加および減少とを並行して一度に行う。このため、可変終端抵抗3の抵抗値を増加および減少させる動作をノード7ごとに繰り返す必要がないので、実施形態1の終端抵抗値設定部1と比べて処理が軽減される。
Further, the termination resistance
そして、終端抵抗値設定部1Aは、各ノード7がコマンドを受信できたときの抵抗値を記憶部20に記憶するので、記憶された抵抗値から、可変終端抵抗3の抵抗値の可変範囲における全ての値に対して、各ノード7がコマンドに対する応答信号を受信できたか否かがわかる。したがって、実施形態1の終端抵抗値設定部1のように、可変終端抵抗3の抵抗値の可変範囲における全ての値に対して、コマンドに対する応答信号を受信できるか否かを各ノード7について確認する必要がない。
Since the termination resistance
〔ソフトウェアによる実現例〕
終端抵抗値設定部1・1Aの制御ブロック(特にコマンド送信部11、応答信号受信部12、抵抗値変更部13、抵抗値決定部14、抵抗値変更部15、および応答信号受信部16)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。
[Example of software implementation]
The control blocks of the termination resistance
後者の場合、終端抵抗値設定部1・1Aは、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがまたはCPUで読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)などを備えている。そして、CPUが上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記記録媒体としては、「一時的でない有形の媒体」(半導体メモリなど)を用いることができる。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。
In the latter case, the termination resistance
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention.
本発明は、可変抵抗値の調整に利用することができる。 The present invention can be used for adjusting a variable resistance value.
1・1A 終端抵抗値設定部
3 可変終端抵抗(可変抵抗)
4 差動ドライバ
5 差動レシーバ
6 バスライン
7 ノード
11 コマンド送信部(送信部)
12 応答信号受信部(受信部)
13 抵抗値変更部
14 抵抗値決定部
15 抵抗値変更部
16 応答信号受信部(受信部)
20 記憶部
50 通信ネットワーク(ネットワーク)
1.1A Termination resistance value setting section 3 Variable termination resistance (variable resistance)
4 Differential Driver 5
12 Response signal receiver (receiver)
13 resistance
20
Claims (2)
上記可変抵抗の抵抗値を決定する抵抗値決定部と、
各上記ノードにコマンドを送信する送信部と、
上記送信部が送信する上記コマンドに対する各上記ノードからの応答信号を受信する受信部と、
上記受信部が上記応答信号を受信するごとに段階的に上記抵抗値を増加する動作を上記受信部が上記応答信号を受信可能な範囲で上記可変抵抗に続けさせる第1制御と、上記受信部が上記応答信号を受信するごとに段階的に上記抵抗値を減少する動作を上記受信部が上記応答信号を受信可能な範囲で上記可変抵抗に続けさせる第2制御とを、いずれかが先になるように行い、かつ上記ノードごとに行う抵抗値変更部と、
上記応答信号が受信可能であるときの上記抵抗値の最大値および最小値を各上記ノードについて記憶する記憶部とを備え、
上記抵抗値決定部は、上記記憶部に記憶された各上記ノードについての上記最大値のうちの最も小さい値を上限値とするとともに、上記記憶部に記憶された各上記ノードについての上記最小値のうちの最も大きい値を下限値とし、上記上限値以下である上記最小値および上記下限値以上である上記最大値が得られた上記ノードについて上記上限値と上記下限値との間で上記抵抗値を決定することを特徴とする終端抵抗値設定装置。 A variable resistor installed in a network to which multiple nodes are connected;
A resistance value determining unit for determining a resistance value of the variable resistor;
A transmitter for transmitting a command to each of the above nodes;
A receiver that receives a response signal from each of the nodes in response to the command transmitted by the transmitter;
A first control for causing the variable resistor to continue the operation of increasing the resistance value step by step each time the receiving unit receives the response signal in a range in which the receiving unit can receive the response signal; One of the first control and the second control for causing the receiving unit to continue the operation of decreasing the resistance value stepwise every time the response signal is received within a range in which the reception unit can receive the response signal. And a resistance value changing unit for each of the nodes,
A storage unit that stores a maximum value and a minimum value of the resistance value when the response signal is receivable for each of the nodes;
The resistance value determination unit sets the smallest value among the maximum values for each of the nodes stored in the storage unit as an upper limit value and the minimum value for each of the nodes stored in the storage unit And the resistance between the upper limit value and the lower limit value for the node at which the minimum value equal to or lower than the upper limit value and the maximum value equal to or higher than the lower limit value are obtained. A terminal resistance value setting device for determining a value.
上記可変抵抗の抵抗値を決定する抵抗値決定部と、
各上記ノードに一度にコマンドを送信する送信部と、
上記送信部が送信する上記コマンドに対する各上記ノードからの応答信号を受信する受信部と、
上記コマンドの送信から一定時間経過するごとに段階的に上記抵抗値を増加する動作を上記可変抵抗の抵抗値の可変範囲で上記可変抵抗に続けさせる第1制御と、上記コマンドの送信から一定時間経過するごとに段階的に上記抵抗値を減少する動作を上記可変抵抗の抵抗値の可変範囲で上記可変抵抗に続けさせる第2制御とを、いずれかが先になるように行い、かつ各上記ノードについて並行して行う抵抗値変更部と、
上記応答信号が受信可能であるときの上記抵抗値を各上記ノードについて記憶する記憶部とを備え、
上記抵抗値決定部は、上記記憶部に記憶された各上記ノードについての上記抵抗値の最大値のうちの最も小さい値を上限値とするとともに、上記記憶部に記憶された各上記ノードについての上記抵抗値の最小値のうちの最も大きい値を下限値とし、上記上限値以下である上記最小値および上記下限値以上である上記最大値が得られた上記ノードについて上記上限値と上記下限値との間で上記抵抗値を決定することを特徴とする終端抵抗値設定装置。 A variable resistor installed at the end of a network to which multiple nodes are connected;
A resistance value determining unit for determining a resistance value of the variable resistor;
A transmitter that sends commands to each of the above nodes at once;
A receiver that receives a response signal from each of the nodes in response to the command transmitted by the transmitter;
A first control for causing the variable resistor to continue the operation of increasing the resistance value step by step within a variable range of the resistance value of the variable resistor every time a predetermined time elapses from the transmission of the command; The second control for causing the variable resistor to continue the operation of decreasing the resistance value step by step in the variable range of the resistance value of the variable resistor as each time elapses is performed first, and each of the above-mentioned A resistance value changing unit for the nodes in parallel;
A storage unit that stores, for each of the nodes, the resistance value when the response signal is receivable;
The resistance value determining unit sets the smallest value among the maximum values of the resistance values for each of the nodes stored in the storage unit as an upper limit value, and for each of the nodes stored in the storage unit. The maximum value among the minimum values of the resistance value is set as a lower limit value, and the upper limit value and the lower limit value of the node at which the minimum value that is not more than the upper limit value and the maximum value that is not less than the lower limit value are obtained. The terminal resistance value setting device, wherein the resistance value is determined between
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014131714A JP5961663B2 (en) | 2014-06-26 | 2014-06-26 | Terminal resistance value setting device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014131714A JP5961663B2 (en) | 2014-06-26 | 2014-06-26 | Terminal resistance value setting device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016010137A true JP2016010137A (en) | 2016-01-18 |
JP5961663B2 JP5961663B2 (en) | 2016-08-02 |
Family
ID=55227386
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014131714A Active JP5961663B2 (en) | 2014-06-26 | 2014-06-26 | Terminal resistance value setting device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5961663B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217563A (en) * | 2022-01-14 | 2022-03-22 | 华清科盛(北京)信息技术有限公司 | Terminal resistance adjusting method and device of industrial CAN bus based on sorting system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000151721A (en) * | 1998-11-05 | 2000-05-30 | Toyo Commun Equip Co Ltd | Bus line terminating circuit for electronic equipment |
JP2013211600A (en) * | 2012-03-30 | 2013-10-10 | Nec Corp | Termination resistor adjustment circuit, and termination resistance adjusting method |
-
2014
- 2014-06-26 JP JP2014131714A patent/JP5961663B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000151721A (en) * | 1998-11-05 | 2000-05-30 | Toyo Commun Equip Co Ltd | Bus line terminating circuit for electronic equipment |
JP2013211600A (en) * | 2012-03-30 | 2013-10-10 | Nec Corp | Termination resistor adjustment circuit, and termination resistance adjusting method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217563A (en) * | 2022-01-14 | 2022-03-22 | 华清科盛(北京)信息技术有限公司 | Terminal resistance adjusting method and device of industrial CAN bus based on sorting system |
Also Published As
Publication number | Publication date |
---|---|
JP5961663B2 (en) | 2016-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102267789B1 (en) | Subscriber station for a bus system and method for improving the quality of transmission in a bus system | |
EP2784983A1 (en) | Communication control device, server, communication system and computer readable medium | |
RU2015103919A (en) | COMMUNICATION DEVICE, METHOD FOR MANAGING SUCH DEVICE AND COMPUTER-READABLE MEMORY MEDIA | |
JP6496836B2 (en) | Relay device, electronic control device, and in-vehicle network system | |
US10013374B2 (en) | Bidirectional communication method between a master terminal and a slave terminal on a single transmission line | |
JP4858615B2 (en) | COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD | |
JP5961663B2 (en) | Terminal resistance value setting device | |
JP6368663B2 (en) | Air conditioner system and program | |
JP6834721B2 (en) | Communication device | |
JP2015162772A5 (en) | ||
JP6496747B2 (en) | TX / RX mode control in a serial half-duplex transceiver away from the communicating host | |
US9717093B2 (en) | Access point and associated antenna selecting method | |
JP6413979B2 (en) | Master node | |
JP2017204720A (en) | Communication device | |
EP3297220A1 (en) | Signal transmission method, controller and signal transmission system | |
US20180139087A1 (en) | Multi-mode configurable network audio | |
JP5460398B2 (en) | Detection device | |
WO2015083514A1 (en) | Data transmission device, data processing system and data processing method | |
JP5402315B2 (en) | Communication device | |
JP6429371B2 (en) | Wireless communication apparatus and operation mode switching method of wireless communication apparatus | |
JP5407270B2 (en) | RECEIVING CIRCUIT, ELECTRONIC DEVICE, AND RECEIVING CIRCUIT CONTROL METHOD | |
EP3568957B1 (en) | Method of operating a unit in a daisy chain, communication unit and a system including a plurality of communication units | |
JP2010247969A (en) | Setting device of elevator | |
US10498832B2 (en) | Link-training auto-negotiation protocol with three-way handshake | |
JP5796654B1 (en) | Signal transmission system, transmission device, signal transmission method, and transmission device control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160405 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160530 |
|
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: 20160621 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160627 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5961663 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |