JP2014241477A - Communication system - Google Patents
Communication system Download PDFInfo
- Publication number
- JP2014241477A JP2014241477A JP2013122670A JP2013122670A JP2014241477A JP 2014241477 A JP2014241477 A JP 2014241477A JP 2013122670 A JP2013122670 A JP 2013122670A JP 2013122670 A JP2013122670 A JP 2013122670A JP 2014241477 A JP2014241477 A JP 2014241477A
- Authority
- JP
- Japan
- Prior art keywords
- terminal
- pulse signal
- input
- terminal device
- output
- 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
- 238000004891 communication Methods 0.000 title claims abstract description 81
- 238000007599 discharging Methods 0.000 claims description 7
- 238000000034 method Methods 0.000 description 20
- 238000010586 diagram Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000009529 body temperature measurement Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 229910052739 hydrogen Inorganic materials 0.000 description 1
- 239000001257 hydrogen Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Abstract
Description
本発明は、複数の端末装置が通信バスに接続される通信システムに関する。 The present invention relates to a communication system in which a plurality of terminal devices are connected to a communication bus.
複数の端末装置が通信バスに接続される通信システムにおいては、各端末装置に固有のアドレスを設定する必要がある。各端末装置に固有のアドレスを設定する技術として、例えば各端末装置に設けたスイッチや設定ピン等により複数ビットのデジタル信号を端末装置ごとに任意に設定可能な構成とし、端末装置ごとに異なる値のデジタル信号を手動で設定することによって各端末装置に固有のアドレスを設定する手法が公知である。 In a communication system in which a plurality of terminal devices are connected to a communication bus, it is necessary to set a unique address for each terminal device. As a technique for setting a unique address for each terminal device, for example, a configuration in which a multi-bit digital signal can be arbitrarily set for each terminal device by a switch, a setting pin, etc. provided in each terminal device, and different values for each terminal device. A method of setting a unique address for each terminal device by manually setting the digital signal is known.
しかしながら上記のように各端末装置のアドレスを手動で設定する手法は、煩雑である上、アドレスの設定漏れや誤設定の虞が生ずる。このようなことから各端末装置のアドレスを自動設定する技術の一例として、伝送路に接続される各端末装置に対し、その伝送路を通じて、センタ・コントローラから自動的にアドレスを配布する通信システムが公知である(例えば特許文献1を参照)。 However, the method of manually setting the address of each terminal device as described above is complicated and may cause an address setting omission or erroneous setting. Therefore, as an example of a technique for automatically setting the address of each terminal device, there is a communication system that automatically distributes the address from the center controller to each terminal device connected to the transmission line through the transmission line. It is known (see, for example, Patent Document 1).
しかしながら上記の特許文献1に開示された通信システムにおいては、端末装置ごとに異なる固有の識別番号を予め設定し、これを記憶した不揮発性メモリを含む識別番号記憶部を各端末装置に実装する必要がある。つまり上記の特許文献1に開示された従来技術は、固有の識別番号を付与するために専用の回路チップ等を各端末装置に実装する必要があり、それによって端末装置の製造コストが増加し、ひいては通信システム全体の大幅なコスト増を招来する虞がある。 However, in the communication system disclosed in Patent Document 1 described above, it is necessary to set a unique identification number that is different for each terminal device in advance, and to mount an identification number storage unit including a nonvolatile memory that stores the unique identification number in each terminal device. There is. In other words, the prior art disclosed in the above Patent Document 1 requires that a dedicated circuit chip or the like be mounted on each terminal device in order to give a unique identification number, thereby increasing the manufacturing cost of the terminal device, As a result, there is a risk that the cost of the entire communication system will increase significantly.
このような状況に鑑み本発明はなされたものであり、その目的は、複数の端末装置が通信バスに接続される通信システムをより低コストに実現することにある。 The present invention has been made in view of such circumstances, and an object thereof is to realize a communication system in which a plurality of terminal devices are connected to a communication bus at a lower cost.
<本発明の第1の態様>
本発明の第1の態様は、複数の端末装置が通信バスに接続される通信システムであって、上位の端末装置の出力端子と下位の端末装置の入力端子とが信号線で接続され、前記端末装置は、初期設定の開始を条件として一のパルス信号を前記出力端子から出力する第1パルス信号出力手段と、前記入力端子に一のパルス信号が入力されたことを条件として前記出力端子から一のパルス信号を出力する第2パルス信号出力手段と、前記入力端子に入力されたパルス信号の数に基づいて、前記通信バスを介して通信を行う際の自己のアドレスを設定するアドレス設定手段と、を含む、ことを特徴とする通信システムである。
<First Aspect of the Present Invention>
A first aspect of the present invention is a communication system in which a plurality of terminal devices are connected to a communication bus, wherein an output terminal of a higher-level terminal device and an input terminal of a lower-level terminal device are connected by a signal line, The terminal device has a first pulse signal output means for outputting one pulse signal from the output terminal on the condition that the initial setting is started, and from the output terminal on the condition that one pulse signal is input to the input terminal. Second pulse signal output means for outputting one pulse signal, and address setting means for setting its own address when performing communication via the communication bus based on the number of pulse signals input to the input terminal And a communication system characterized by the above.
複数の端末装置は、上位の端末装置の出力端子と下位の端末装置の入力端子とが信号線で接続されている。ここでの「上位」及び「下位」は、信号線による接続順序における上位及び下位を意味する。したがって複数の端末装置は、その接続順序が最も上位の端末装置の入力端子、及び最も下位の端末装置の出力端子は何も接続されていないことになる。 In the plurality of terminal devices, the output terminal of the upper terminal device and the input terminal of the lower terminal device are connected by a signal line. Here, “upper” and “lower” mean higher and lower in the order of connection by signal lines. Therefore, in the plurality of terminal devices, nothing is connected to the input terminal of the terminal device with the highest connection order and the output terminal of the terminal device with the lowest order.
各端末装置は、まず初期設定の開始を条件として一のパルス信号を出力端子から出力する(第1パルス信号出力手段)。つまり初期設定の開始時には、上位の端末装置から下位の端末装置へ一のパルス信号が出力される。また各端末装置は、入力端子に一のパルス信号が入力されたことを条件として出力端子から一のパルス信号を出力する(第2パルス信号出力手段)。つまり上位の端末装置から下位の端末装置へ一のパルス信号が出力されると、その下位の端末装置は、さらに下位の端末装置へ一のパルス信号を出力することになる。 Each terminal device first outputs one pulse signal from the output terminal on condition that the initial setting is started (first pulse signal output means). That is, at the start of the initial setting, one pulse signal is output from the upper terminal device to the lower terminal device. Each terminal device outputs one pulse signal from the output terminal on the condition that one pulse signal is input to the input terminal (second pulse signal output means). That is, when one pulse signal is output from the upper terminal apparatus to the lower terminal apparatus, the lower terminal apparatus outputs one pulse signal to the lower terminal apparatus.
したがって例えば最も上位となる1番目の端末装置は、入力端子に何も接続されていないので、入力端子に入力されるパルス信号の数は0となる。また1番目の端末装置の出力端子に入力端子が接続された2番目の端末装置は、1番目の端末装置からは初期設定の開始時に一のパルス信号が出力されるだけなので、入力端子に入力されるパルス信号の数は1となる。さらに2番目の端末装置の出力端子に入力端子が接続された3番目の端末装置は、初期設定の開始時に2番目の端末装置から一のパルス信号が出力されるとともに、1番目の端末装置から2番目の端末装置へ出力される一のパルス信号に応じて2番目の端末装置からさらに一のパルス信号が出力されるので、入力端子に入力されるパルス信号の数は2となる。 Therefore, for example, since the highest terminal device is not connected to the input terminal, the number of pulse signals input to the input terminal is zero. In addition, the second terminal device whose input terminal is connected to the output terminal of the first terminal device outputs only one pulse signal from the first terminal device at the start of the initial setting. The number of pulse signals to be performed is 1. Further, the third terminal device whose input terminal is connected to the output terminal of the second terminal device outputs one pulse signal from the second terminal device at the start of the initial setting and from the first terminal device. Since one pulse signal is further output from the second terminal device in response to one pulse signal output to the second terminal device, the number of pulse signals input to the input terminal is two.
すなわち複数の端末装置は、上位から下位へ行くに従って、入力端子に入力されるパルス信号の数が一ずつ増加していくことになる。したがって各端末装置は、入力端子に入力されたパルス信号の数に基づいて、通信バスを介して通信を行う際の自己のアドレスを設定することによって、他の端末装置と重複しない固有のアドレスを自己のアドレスとして自ら設定することができる。つまり本発明に係る通信システムは、アドレスの設定や管理を行うアドレス管理装置等から各端末装置へアドレスを配布するのではなく、各端末装置の入力端子に入力されたパルス信号の数に基づいて、各端末装置が自己のアドレスを自ら設定する。 That is, in the plurality of terminal devices, the number of pulse signals input to the input terminal increases one by one from the upper level to the lower level. Therefore, each terminal device sets its own address when performing communication via the communication bus based on the number of pulse signals input to the input terminal, thereby providing a unique address that does not overlap with other terminal devices. You can set it as your own address. That is, the communication system according to the present invention is based on the number of pulse signals input to the input terminals of each terminal device, rather than distributing addresses to each terminal device from an address management device that performs address setting and management. Each terminal device sets its own address.
このようにして本発明に係る通信システムは、各端末装置のアドレスの設定や管理を行うアドレス管理装置等を設けることなく、固有のアドレスを各端末装置に自動的に設定することができる。しかも本発明に係る通信システムは、複数の端末装置の上位の端末装置の出力端子と下位の端末装置の入力端子とを信号線で接続するだけの極めてシンプルな構成で実現することができる。 In this way, the communication system according to the present invention can automatically set a unique address in each terminal device without providing an address management device or the like for setting and managing the address of each terminal device. Moreover, the communication system according to the present invention can be realized with an extremely simple configuration in which the output terminals of the upper terminal devices of the plurality of terminal devices and the input terminals of the lower terminal devices are simply connected by signal lines.
これにより本発明の第1の態様によれば、複数の端末装置が通信バスに接続される通信システムをより低コストに実現することができるという作用効果が得られる。 Thereby, according to the 1st aspect of this invention, the effect that the communication system with which a some terminal device is connected to a communication bus can be implement | achieved at lower cost is acquired.
<本発明の第2の態様>
本発明の第2の態様は、前述した本発明の第1の態様において、前記第2パルス信号出力手段は、前記入力端子に一のパルス信号が入力された時点から所定の待機時間が経過した後に、前記出力端子から一のパルス信号を出力する、ことを特徴とする通信システムである。
このような特徴によれば、第1パルス信号出力手段によるパルス信号の出力タイミングと第2パルス信号出力手段によるパルス信号の出力タイミングとの間に、待機時間による時間差を設けることができる。それによって端末装置の入力端子に入力されるパルス信号を一ずつ確実に検出することができるので、パルス信号の数を誤カウントしてしまう虞を低減することができる。
<Second Aspect of the Present Invention>
According to a second aspect of the present invention, in the first aspect of the present invention described above, the second pulse signal output means has a predetermined standby time elapsed from the time when one pulse signal is input to the input terminal. A communication system is characterized in that one pulse signal is output from the output terminal later.
According to such a feature, a time difference due to the standby time can be provided between the output timing of the pulse signal by the first pulse signal output means and the output timing of the pulse signal by the second pulse signal output means. As a result, the pulse signals input to the input terminal of the terminal device can be reliably detected one by one, so that the possibility of erroneously counting the number of pulse signals can be reduced.
<本発明の第3の態様>
本発明の第3の態様は、前述した本発明の第1の態様又は第2の態様において、前記第2パルス信号出力手段は、前記入力端子に入力されたパルス信号のパルス幅が所定の長さであることを条件として、前記出力端子から一のパルス信号を出力する、ことを特徴とする通信システムである。
このような特徴によれば、例えば端末装置の入力端子と出力端子とを接続する信号線の電位がノイズ等で瞬間的に変化したときに、これをパルス信号として誤検出してしまう虞を低減することができる。それによって入力端子に入力されるパルス信号の数を誤カウントしてしまう虞を低減することができるので、ノイズ等に起因するアドレスの誤設定等が生ずる虞を低減することができる。
<Third Aspect of the Present Invention>
According to a third aspect of the present invention, in the first aspect or the second aspect of the present invention, the second pulse signal output means has a pulse width of a predetermined length of the pulse signal input to the input terminal. On the condition that this is the case, the communication system is characterized in that one pulse signal is output from the output terminal.
According to such a feature, for example, when the potential of the signal line connecting the input terminal and the output terminal of the terminal device changes instantaneously due to noise or the like, the possibility of erroneous detection as a pulse signal is reduced. can do. As a result, the possibility of erroneously counting the number of pulse signals input to the input terminal can be reduced, so that the possibility of erroneous address setting due to noise or the like can be reduced.
<本発明の第4の態様>
本発明の第4の態様は、前述した本発明の第1〜第3の態様のいずれかにおいて、前記アドレス設定手段は、前記入力端子に入力されたパルス信号の数を共通の基礎アドレスに加算して自己のアドレスを決定する、ことを特徴とする通信システムである。
このような特徴によれば、各端末装置は、複雑な演算処理を要することなく、極めて単純な手順で自己のアドレスをそれぞれ決定することができる。
<Fourth aspect of the present invention>
According to a fourth aspect of the present invention, in any one of the first to third aspects of the present invention described above, the address setting unit adds the number of pulse signals input to the input terminal to a common base address. Then, the communication system is characterized in that its own address is determined.
According to such a feature, each terminal device can determine its own address by a very simple procedure without requiring complicated arithmetic processing.
<本発明の第5の態様>
本発明の第5の態様は、前述した本発明の第1〜第4の態様のいずれかにおいて、前記通信バスを介して前記複数の端末装置と通信を行う制御装置をさらに備え、前記端末装置は、電池、前記電池の充放電回路をさらに含み、前記制御装置は、前記複数の端末装置のそれぞれに対し、前記電池の充電状態に応じて前記充放電回路を制御する手段を含む、ことを特徴とする通信システムである。
このような特徴によれば、通信バスを介して各端末装置の電池の充放電を制御装置が制御する通信システムにおいて、前述した本発明の第1〜第4の態様のいずれかによる作用効果を得ることができる。
<Fifth aspect of the present invention>
According to a fifth aspect of the present invention, in any one of the first to fourth aspects of the present invention described above, the terminal device further includes a control device that communicates with the plurality of terminal devices via the communication bus. Further includes a battery, a charge / discharge circuit for the battery, and the control device includes means for controlling the charge / discharge circuit for each of the plurality of terminal devices in accordance with a state of charge of the battery. This is a featured communication system.
According to such a feature, in the communication system in which the control device controls the charging / discharging of the battery of each terminal device via the communication bus, the operational effect of any of the first to fourth aspects of the present invention described above is achieved. Can be obtained.
本発明によれば、複数の端末装置が通信バスに接続される通信システムをより低コストに実現することができる。 According to the present invention, a communication system in which a plurality of terminal devices are connected to a communication bus can be realized at a lower cost.
以下、本発明の実施の形態について図面を参照しながら説明する。
尚、本発明は、以下説明する実施例に特に限定されるものではなく、特許請求の範囲に記載された発明の範囲内で種々の変形が可能であることは言うまでもない。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
In addition, this invention is not specifically limited to the Example demonstrated below, It cannot be overemphasized that a various deformation | transformation is possible within the range of the invention described in the claim.
<端末装置の構成>
本発明に係る通信システムを構成する端末装置10について、図1を参照しながら説明する。
図1は、端末装置10の構成を図示したブロック図である。
<Configuration of terminal device>
A
FIG. 1 is a block diagram illustrating the configuration of the
端末装置10は、電池モジュール11、充電回路12、放電回路13、電圧測定回路14、温度測定回路15、電流測定回路16、端末制御部17及びコネクタ20を備える電源装置である。
The
電池モジュール11は、例えばニッケル水素二次電池等の二次電池を複数直列又は並列に接続することによって構成されている。充電回路12は、電池モジュール11の充電を制御する回路であり、入力側がコネクタ20の充電端子21に接続され、出力側がダイオードD1を通じて電池モジュール11の正極に接続されている。コネクタ20の充電端子21には外部電源が接続される。放電回路13は、電池モジュール11の放電を制御する回路であり、出力側がコネクタ20の放電端子22に接続され、入力側がダイオードD2を通じて電池モジュール11の正極に接続されている。コネクタ20の放電端子22には、電池モジュール11の電力で動作する負荷装置が接続される。電圧測定回路14は、電池モジュール11の電圧を測定する回路である。温度測定回路15は、公知のサーミスタ等を含み、電池モジュール11の温度を測定する回路である。電流測定回路16は、電池モジュール11の充放電時の電流を測定する回路である。
The
端末制御部17は、公知のマイコン制御装置であり、電圧測定回路14、温度測定回路15及び電流測定回路16の出力信号に基づいて、充電回路12及び放電回路13を制御する。また端末制御部17は、コネクタ20の通信バス接続部25を介して通信バスに接続される。さらに端末制御部17は、デジタル入力ポートの1つがコネクタ20の入力端子23に接続されており、デジタル出力ポートの1つがコネクタ20の出力端子24に接続されている。入力端子23は、端末装置10の内部で抵抗R1を通じて所定電圧にプルアップされている。
The
<通信システムの構成>
本発明に係る通信システムの構成について、図2を参照しながら説明する。
図2は、本発明に係る通信システムの構成を概略的に図示したシステム構成図である。
<Configuration of communication system>
The configuration of the communication system according to the present invention will be described with reference to FIG.
FIG. 2 is a system configuration diagram schematically illustrating the configuration of a communication system according to the present invention.
通信システムは、第1端末装置10A、第2端末装置10B、第3端末装置10C及び第4端末装置10D、並びにシステムコントローラ30が通信バスに接続されている。第1端末装置10A、第2端末装置10B、第3端末装置10C及び第4端末装置10Dは、全く同じ構成の装置であり、いずれも図1に図示して説明した端末装置10である。第1端末装置10Aは、通信バス接続部25Aを通じて通信バスに接続されている。第2端末装置10Bは、通信バス接続部25Bを通じて通信バスに接続されている。第3端末装置10Cは、通信バス接続部25Cを通じて通信バスに接続されている。第4端末装置10Dは、通信バス接続部25Dを通じて通信バスに接続されている。
In the communication system, the first
「制御装置」としてのシステムコントローラ30は、公知のマイコン制御装置を含み、通信バスを通じて、第1端末装置10Aの端末制御部17A、第2端末装置10Bの端末制御部17B、第3端末装置10Cの端末制御部17C、第4端末装置10Dの端末制御部17Dのそれぞれと相互に通信を行う。そしてシステムコントローラ30は、第1端末装置10A、第2端末装置10B、第3端末装置10C及び第4端末装置10Dのそれぞれの電池モジュール11の充電状態等を統括管理し、各電池モジュール11の充電状態等に応じて、端末制御部17A〜17Dの各々に対して充放電制御指令を出力する。
The
通信システムは、上位の端末装置10の出力端子24と下位の端末装置10の入力端子23とが信号線で接続されている。ここでの「上位」及び「下位」は、信号線による接続順序における上位及び下位を意味する。より具体的には、第1端末装置10Aの出力端子24Aと第2端末装置10Bの入力端子23Bとが1本の信号線で接続されている。第2端末装置10Bの出力端子24Bと第3端末装置10Cの入力端子23Cとが1本の信号線で接続されている。第3端末装置10Cの出力端子24Cと第4端末装置10Dの入力端子23Dとが1本の信号線で接続されている。その接続順序が最も上位の第1端末装置10Aの入力端子23Aは何も接続されていない。またその接続順序が最も下位の第4端末装置10Dの出力端子24Dは、何も接続されていないが、さらに下位の端末装置10がある場合には、その端末装置10の入力端子23を接続することができる。
In the communication system, the
<端末装置のアドレス設定>
端末装置10の端末制御部17が実行するアドレス設定手順について、図3A〜図5を参照しながら説明する。
図3A及び図3Bは、端末制御部17によるアドレス設定手順を図示したフローチャートである。
<Address setting of terminal device>
An address setting procedure executed by the
3A and 3B are flowcharts illustrating an address setting procedure by the
端末制御部17は、初期設定の開始条件であるリセット信号が入力されると、まず出力信号を初期化する(図3AのステップS1)。より具体的には出力端子24の電圧をローレベル(0V)にする。つづいてタイマインタラプトルーチンを初期化し(図3AのステップS2)、待機時間TD1のウエイト処理を実行した後(図3AのステップS3)、タイマインタラプトルーチンを起動する(図3AのステップS4)。待機時間TD1は、タイマインタラプトルーチンの初期化のための待ち時間であり、当該実施例では約1秒に設定されている。タイマインタラプトルーチンの具体的な手順については後述する。
When a reset signal that is an initial setting start condition is input, the
つづいてパルス受信フラグをクリアする(図3BのステップS5)。このパルス受信フラグは、後述するタイマインタラプトルーチンでパルス信号の受信を検出していることを示すフラグである。つづいて入力端子23におけるパルス信号の受信タイムアウトを監視するためのタイマをスタートする(図3BのステップS6)。
Subsequently, the pulse reception flag is cleared (step S5 in FIG. 3B). The pulse reception flag is a flag indicating that reception of a pulse signal is detected by a timer interrupt routine described later. Subsequently, a timer for monitoring the reception timeout of the pulse signal at the
つづいて出力端子24からのパルス信号の出力を開始する(図3BのステップS7)。より具体的には出力端子24の電圧をハイレベル(例えば5V)にする。そして時間TWのウエイト処理を実行した後(図3BのステップS8)、出力端子24からのパルス信号の出力を終了する(図3BのステップS9)。より具体的には出力端子24の電圧をローレベルに戻す。時間TWは、パルス信号の幅を規定する時間であり、例えば当該実施例では10mSに設定されている。つまり端末制御部17は、初期設定の開始を条件として一のパルス信号を出力端子24から出力する(第1パルス信号出力手段)。
Subsequently, output of a pulse signal from the
つづいて入力端子23でパルス信号を受信したか否かを判定する(図3BのステップS10)。より具体的には、後述するタイマインタラプトルーチンによってパルス受信フラグがセットされているか否かを判定する。入力端子23でパルス信号を受信した場合には(ステップS10でYes)、パルス信号の受信数を示すパルス受信カウンタを更新する(図3BのステップS11)。そして待機時間TD2でウエイト処理を実行した後(図3BのステップS12)、ステップS5へ戻ることにより、ステップS5〜S9の手順が再度実行されることになる。それによって一のパルス信号が出力端子24からさらに出力されることになる。つまり端末制御部17は、入力端子23に一のパルス信号が入力されたことを条件として出力端子24から一のパルス信号を出力する(第2パルス信号出力手段)。
Subsequently, it is determined whether or not a pulse signal is received at the input terminal 23 (step S10 in FIG. 3B). More specifically, it is determined whether or not a pulse reception flag is set by a timer interrupt routine described later. When a pulse signal is received at the input terminal 23 (Yes in step S10), a pulse reception counter indicating the number of received pulse signals is updated (step S11 in FIG. 3B). Then, after executing the wait process at the standby time TD2 (step S12 in FIG. 3B), the process of steps S5 to S9 is executed again by returning to step S5. As a result, one pulse signal is further output from the
待機時間TD2は、第1パルス信号出力手段によるパルス信号の出力タイミングと第2パルス信号出力手段によるパルス信号の出力タイミングとの間に時間差を設けるための待ち時間である。この待機時間TD2は、パルス信号の幅を規定する時間TWより十分に長い時間に設定すればよく、例えば当該実施例では100mSに設定されている。このような待機時間TD2を設定することによって、端末装置10の入力端子23に入力されるパルス信号を一ずつ確実に検出することができるので、パルス信号の数を誤カウントしてしまう虞を低減することができる。
The standby time TD2 is a waiting time for providing a time difference between the output timing of the pulse signal by the first pulse signal output means and the output timing of the pulse signal by the second pulse signal output means. The standby time TD2 may be set to a time sufficiently longer than the time TW that defines the width of the pulse signal. For example, in this embodiment, the standby time TD2 is set to 100 mS. By setting such a standby time TD2, it is possible to reliably detect the pulse signals input to the
他方、入力端子23でパルス信号を受信していない場合には(ステップS10でNo)、タイマがタイムアウトしているか否かを判定する(図3BのステップS13)。タイムアウトしていない場合には(ステップS13でNo)、ステップS10へ戻り、入力端子23でパルス信号を受信したか否かを判定する。そしてタイムアウトした時点で(ステップS13でYes)、タイマインタラプトルーチンを停止し(図3BのステップS14)、パルス受信カウンタの値に基づいて、通信バスを介して通信を行う際の自己のアドレスを決定する(図3BのステップS15)。つまり端末制御部17は、入力端子23に入力されたパルス信号の数に基づいて、通信バスを介して通信を行う際の自己のアドレスを設定する(アドレス設定手段)。
On the other hand, when the pulse signal is not received at the input terminal 23 (No in step S10), it is determined whether or not the timer has timed out (step S13 in FIG. 3B). If not timed out (No in step S13), the process returns to step S10 to determine whether or not a pulse signal is received at the
図4は、タイマインタラプトルーチンの手順を図示したフローチャートである。タイマインタラプトルーチンは、入力端子23の状態を監視する。タイマインタラプトルーチンは、アドレス設定手順のタイマ割り込みにより起動し(図3AのステップS4)、停止処理がされるまで(図3BのステップS14)、アドレス設定手順とは無関係に定周期(例えば1mS)で繰り返し実行される。
FIG. 4 is a flowchart illustrating the procedure of the timer interrupt routine. The timer interrupt routine monitors the state of the
まず入力端子23の電圧がハイレベルになっているか否かを判定する(図4のステップS21)。入力端子23の電圧がハイレベルになっている場合には(ステップS21でYes)、パルス幅カウントをカウントアップして更新する(図4のステップS22)。
First, it is determined whether or not the voltage at the
他方、入力端子23の電圧がハイレベルになっていない場合には、パルス信号のパルス幅が規定値か否かを判定する(図4のステップS23)。より具体的には、パルス幅カウントのカウント値からパルス信号のパルス幅を演算して求め、そのパルス幅が予め設定したパルス幅の範囲内か否かを判定する。例えば出力端子24から出力するパルス信号のパルス幅を規定する時間TWを10mSに設定した場合、パルス幅カウントのカウント値から演算したパルス幅が例えば9〜11mSの範囲内であれば、そのパルス信号のパルス幅が規定値であるとして、それを有効なパルス信号であると判定する。したがって例えば端末装置10の入力端子23と出力端子24とを接続する信号線の電位がノイズ等で瞬間的に変化したときに、これをパルス信号として誤検出してしまう虞を低減することができる。それによって入力端子23に入力されるパルス信号の数を誤カウントしてしまう虞を低減することができるので、ノイズ等に起因するアドレスの誤設定等が生ずる虞を低減することができる。
On the other hand, if the voltage at the
パルス信号のパルス幅が規定値である場合には(ステップS23でYes)、パルス受信フラグをセットし(図4のステップS24)、パルス幅カウントのカウント値をクリアする(図4のステップS25)。他方、パルス信号のパルス幅が規定値ではない場合には(ステップS23でNo)、パルス受信フラグをセットせずに、パルス幅カウントのカウント値をクリアする(図4のステップS25)。 If the pulse width of the pulse signal is the specified value (Yes in step S23), the pulse reception flag is set (step S24 in FIG. 4), and the count value of the pulse width count is cleared (step S25 in FIG. 4). . On the other hand, when the pulse width of the pulse signal is not the specified value (No in step S23), the count value of the pulse width count is cleared without setting the pulse reception flag (step S25 in FIG. 4).
図5は、各端末装置10の入力端子23及び出力端子24の電圧の変化を図示したタイミングチャートである。
FIG. 5 is a timing chart illustrating changes in voltage at the
第1〜第4端末装置10A〜10Dの出力端子24A〜24Dは、リセット信号が入力されるとローレベルになる。また第1端末装置10Aの出力端子24Aに接続されている第2端末装置10Bの入力端子23B、第2端末装置10Bの出力端子24Bに接続されている第3端末装置10Cの入力端子23C、第3端末装置10Cの出力端子24Cに接続されている第4端末装置10Dの入力端子23Dも同様にローレベルになる(図5のタイミングT1)。
When the reset signal is input, the
リセット信号が入力されてから待機時間TD1が経過した時点で、第1〜第4端末装置10A〜10Dの出力端子24A〜24Dの電圧がハイレベルになる(図5のタイミングT2)。そして時間TWが経過した時点で、第1〜第4端末装置10A〜10Dの出力端子24A〜24Dの電圧がローレベルになる(図5のタイミングT3)。つまりリセット信号が入力されてから待機時間TD1が経過すると(図5のタイミングT2)、第1端末装置10Aの出力端子24Aからパルス信号P11が出力され、第2端末装置10Bの出力端子24Bからパルス信号P21が出力され、第3端末装置10Cの出力端子24Cからパルス信号P31が出力され、第4端末装置10Dの出力端子24Dからパルス信号P41が出力される(第1パルス信号出力手段)。
When the standby time TD1 has elapsed since the reset signal was input, the voltages at the
また前述したように端末装置10は、入力端子23に一のパルス信号が入力されたことを条件として出力端子24から一のパルス信号を出力する(第2パルス信号出力手段)。つまり上位の端末装置10から下位の端末装置10へ一のパルス信号が出力されると、その下位の端末装置10は、さらに下位の端末装置10へ一のパルス信号を出力することになる。以下、第1〜第4端末装置10A〜10Dのそれぞれについて、より具体的に説明する。
Further, as described above, the
接続順序が最も上位となる第1端末装置10Aは、入力端子23Aには何も接続されていない。したがって第1端末装置10Aは、入力端子23Aに入力されるパルス信号の数は0となり、出力端子24Aから出力されるのはパルス信号P11だけとなる。
The first
第2端末装置10Bの入力端子23Bには、第1端末装置10Aの出力端子24Aが接続されている。したがって第2端末装置10Bは、第1端末装置10Aが出力するパルス信号P11が入力端子23Bに入力されることになる。そのため第2端末装置10Bの入力端子23Bに入力されるパルス信号の数は1となる。また第2端末装置10Bは、入力端子23Bにパルス信号P11が入力された時点から待機時間TD2が経過した時点で、出力端子24Bからパルス信号P22を出力する(図5のタイミングT4)。
The
第3端末装置10Cの入力端子23Cには、第2端末装置10Bの出力端子24Bが接続されている。したがって第3端末装置10Cは、第2端末装置10Bが出力するパルス信号P21及びパルス信号P22が入力端子23Cに入力されることになる。そのため第3端末装置10Cの入力端子23Cに入力されるパルス信号の数は2となる。また第3端末装置10Cは、入力端子23Cにパルス信号P21が入力された時点から待機時間TD2が経過した時点で、出力端子24Cからパルス信号P32を出力する(図5のタイミングT4)。さらに第3端末装置10Cは、入力端子23Cにパルス信号P22が入力された時点から待機時間TD2が経過した時点で、出力端子24Cからパルス信号P33を出力する(図5のタイミングT5)。
The
第4端末装置10Dの入力端子23Dには、第3端末装置10Cの出力端子24Cが接続されている。したがって第4端末装置10Dは、第3端末装置10Cが出力するパルス信号P31、パルス信号P32及びパルス信号P33が入力端子23Dに入力されることになる。そのため第4端末装置10Dの入力端子23Dに入力されるパルス信号の数は3となる。また第4端末装置10Dは、入力端子23Dにパルス信号P31が入力された時点から待機時間TD2が経過した時点で、出力端子24Dからパルス信号P42を出力する(図5のタイミングT4)。さらに第4端末装置10Dは、入力端子23Dにパルス信号P32が入力された時点から待機時間TD2が経過した時点で、出力端子24Dからパルス信号P43を出力する(図5のタイミングT5)。さらに第4端末装置10Dは、入力端子23Dにパルス信号P33が入力された時点から待機時間TD2が経過した時点で、出力端子24Dからパルス信号P44を出力する(図5のタイミングT6)。
尚、その接続順序が最も下位の第4端末装置10Dの出力端子24Dは、何も接続されていないが、さらに下位の端末装置10がある場合には、その端末装置10の入力端子23に4つのパルス信号P41〜P44が入力されることになる。
The
The
すなわち第1〜第4端末装置10A〜10Dは、上位から下位へ行くに従って、入力端子23に入力されるパルス信号の数が一ずつ増加していくことになる。したがって第1〜第4端末装置10A〜10Dは、入力端子23A〜23Dに入力されたパルス信号の数に基づいて、通信バスを介して通信を行う際の自己のアドレスを設定する。それによって第1〜第4端末装置10A〜10Dは、相互に重複しない固有のアドレスを自己のアドレスとして自ら設定することができる。
That is, in the first to fourth
例えば第1〜第4端末装置10A〜10Dは、入力端子23A〜23Dに入力されたパルス信号の数を共通の基礎アドレスに加算して自己のアドレスを決定することができる。より具体的には第1端末装置10Aは、入力端子23Aに入力されるパルス信号の数は0であるから、基礎アドレスに0を加算したアドレスを自己のアドレスとする。第2端末装置10Bは、入力端子23Bに入力されるパルス信号の数は1であるから、基礎アドレスに1を加算したアドレスを自己のアドレスとする。第3端末装置10Cは、入力端子23Cに入力されるパルス信号の数は2であるから、基礎アドレスに2を加算したアドレスを自己のアドレスとする。第4端末装置10Dは、入力端子23Dに入力されるパルス信号の数は3であるから、基礎アドレスに3を加算したアドレスを自己のアドレスとする。このように第1〜第4端末装置10A〜10Dは、複雑な演算処理を要することなく、極めて単純な手順で自己のアドレスをそれぞれ決定することができる。
For example, the first to fourth
以上説明したように本発明に係る通信システムは、各端末装置10のアドレスの設定や管理を行うアドレス管理装置等を設けることなく、固有のアドレスを各端末装置10に自動的に設定することができる。しかも本発明に係る通信システムは、複数の端末装置10の上位の端末装置10の出力端子24と下位の端末装置10の入力端子23とを信号線で接続するだけの極めてシンプルな構成で実現することができる。したがって本発明によれば、複数の端末装置10が通信バスに接続される通信システムをより低コストに実現することができる。
As described above, the communication system according to the present invention can automatically set a unique address in each
10、10A〜10D 端末装置
11 電池モジュール
12 充電回路
13 放電回路
14 電圧測定回路
15 温度測定回路
16 電流測定回路
17、17A〜17D 端末制御部
20 コネクタ
21 充電端子
22 放電端子
23、23A〜23D 入力端子
24、24A〜24D 出力端子
25、25A〜25D 通信バス接続部
30 制御装置
10, 10A to
Claims (5)
上位の端末装置の出力端子と下位の端末装置の入力端子とが信号線で接続され、
前記端末装置は、初期設定の開始を条件として一のパルス信号を前記出力端子から出力する第1パルス信号出力手段と、
前記入力端子に一のパルス信号が入力されたことを条件として前記出力端子から一のパルス信号を出力する第2パルス信号出力手段と、
前記入力端子に入力されたパルス信号の数に基づいて、前記通信バスを介して通信を行う際の自己のアドレスを設定するアドレス設定手段と、を含む、ことを特徴とする通信システム。 A communication system in which a plurality of terminal devices are connected to a communication bus,
The output terminal of the upper terminal device and the input terminal of the lower terminal device are connected by a signal line,
The terminal device includes first pulse signal output means for outputting one pulse signal from the output terminal on condition that the initial setting is started,
Second pulse signal output means for outputting one pulse signal from the output terminal on condition that one pulse signal is input to the input terminal;
An address setting means for setting a self-address when performing communication via the communication bus based on the number of pulse signals input to the input terminal.
前記端末装置は、電池、前記電池の充放電回路をさらに含み、
前記制御装置は、前記複数の端末装置のそれぞれに対し、前記電池の充電状態に応じて前記充放電回路を制御する手段を含む、ことを特徴とする通信システム。 The communication system according to any one of claims 1 to 4, further comprising a control device that communicates with the plurality of terminal devices via the communication bus,
The terminal device further includes a battery, a charge / discharge circuit for the battery,
The said control apparatus is a communication system characterized by including the means to control the said charging / discharging circuit with respect to each of these terminal devices according to the charge condition of the said battery.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013122670A JP6103638B2 (en) | 2013-06-11 | 2013-06-11 | Communications system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013122670A JP6103638B2 (en) | 2013-06-11 | 2013-06-11 | Communications system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014241477A true JP2014241477A (en) | 2014-12-25 |
JP6103638B2 JP6103638B2 (en) | 2017-03-29 |
Family
ID=52140529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013122670A Expired - Fee Related JP6103638B2 (en) | 2013-06-11 | 2013-06-11 | Communications system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6103638B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017069668A (en) * | 2015-09-29 | 2017-04-06 | 日本電気株式会社 | Information processing device |
JP2022027554A (en) * | 2020-07-29 | 2022-02-10 | アステック インターナショナル リミテッド | Systems, devices, and methods for automatically addressing serially connected slave devices |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010166248A (en) * | 2009-01-14 | 2010-07-29 | Fuji Electric Retail Systems Co Ltd | Communicating system |
US20120311297A1 (en) * | 2011-06-03 | 2012-12-06 | June Lee | Logical unit address assignment |
-
2013
- 2013-06-11 JP JP2013122670A patent/JP6103638B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010166248A (en) * | 2009-01-14 | 2010-07-29 | Fuji Electric Retail Systems Co Ltd | Communicating system |
US20120311297A1 (en) * | 2011-06-03 | 2012-12-06 | June Lee | Logical unit address assignment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017069668A (en) * | 2015-09-29 | 2017-04-06 | 日本電気株式会社 | Information processing device |
JP2022027554A (en) * | 2020-07-29 | 2022-02-10 | アステック インターナショナル リミテッド | Systems, devices, and methods for automatically addressing serially connected slave devices |
JP7256846B2 (en) | 2020-07-29 | 2023-04-12 | アステック インターナショナル リミテッド | System, apparatus and method for automatically addressing serially connected slave devices |
US11817969B2 (en) | 2020-07-29 | 2023-11-14 | Astec International Limited | Systems, devices and methods for automatically addressing serially connected slave devices |
Also Published As
Publication number | Publication date |
---|---|
JP6103638B2 (en) | 2017-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11349159B2 (en) | Battery management system and battery pack including same | |
US11075410B2 (en) | Battery module system | |
JP2020504422A (en) | Master battery management unit and battery pack including the same | |
JP2020504421A (en) | Battery management unit and battery pack including the same | |
TWI558057B (en) | Charge and discharge control circuit and battery device | |
JP6186813B2 (en) | Battery monitoring system and identification information setting method | |
KR101326802B1 (en) | Voltage balancing circuit for vehicle battery | |
JP2014157075A (en) | Battery voltage detection device, and battery pack management system | |
JP2014033604A5 (en) | Battery system and method for changing charge / discharge state of battery system | |
EP3128601B1 (en) | Backup power source system and method thereof | |
JP5713094B2 (en) | Battery monitoring device | |
JP6103638B2 (en) | Communications system | |
CN111224182A (en) | Battery module | |
JP2018006940A (en) | Information processing system, battery module, control method, and program | |
CN113924227B (en) | Battery control system, battery pack, electric vehicle, and ID setting method for battery control system | |
JP2015177234A (en) | battery module and CAN communication identifier setting method | |
EP3264680A1 (en) | Selective bypassing of daisy-chained network devices | |
CN103440018A (en) | Power control method, power control circuit and energy-saving system | |
RU2656111C1 (en) | Storage battery monitoring and control performance system | |
JP6299378B2 (en) | Battery monitoring device and battery monitoring method | |
JP2017158269A (en) | Voltage detection apparatus | |
CN104778139A (en) | Microcontroller device and controlling method performed therein | |
JP6229567B2 (en) | Battery monitoring device | |
JP2016075557A (en) | Battery monitoring circuit and battery module | |
CN105373495B (en) | Semiconductor device, battery monitoring system, and address setting method for semiconductor device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160419 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20160419 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170126 |
|
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: 20170222 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170223 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6103638 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: R3D02 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: R3D04 |
|
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 |
|
LAPS | Cancellation because of no payment of annual fees |