JP2007295163A - Communication system, master device, and slave device - Google Patents
Communication system, master device, and slave device Download PDFInfo
- Publication number
- JP2007295163A JP2007295163A JP2006119036A JP2006119036A JP2007295163A JP 2007295163 A JP2007295163 A JP 2007295163A JP 2006119036 A JP2006119036 A JP 2006119036A JP 2006119036 A JP2006119036 A JP 2006119036A JP 2007295163 A JP2007295163 A JP 2007295163A
- Authority
- JP
- Japan
- Prior art keywords
- voltage
- setting information
- unit
- communication
- slave 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.)
- Pending
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
Description
本発明は、マスタ装置とスレーブ装置から成る通信システムに関し、特に、差動方式によりデータ伝送を行う通信システムに関する。 The present invention relates to a communication system including a master device and a slave device, and more particularly to a communication system that performs data transmission by a differential method.
従来、RS485通信方式など、半二重通信方式による通信がある。
例えば、RS485通信方式は、米国電子工業会(EIA)によって標準化された半二重通信の規格の一つであり、最大32台までの複数対複数接続に対応する方式である(非特許文献1参照)。
RS485通信方式の特徴として、外部ノイズからの影響を抑えるために、差動方式によるデータ伝送が採用されている。
Conventionally, there is communication using a half-duplex communication method such as the RS485 communication method.
For example, the RS485 communication system is one of the half-duplex communication standards standardized by the Electronic Industries Association of America (EIA), and is a system that supports multiple-to-multiple connection up to 32 units (Non-Patent Document 1). reference).
As a feature of the RS485 communication method, data transmission by a differential method is adopted in order to suppress the influence from external noise.
この差動方式は、ひとつの信号線路に2本の専用線を用い、この2線間の電圧の差を信号として伝送する方式である。
また、こういった半二重通信を利用してマスタ装置とスレーブ装置とから成る通信システム(以下、「マスタ/スレーブ型通信システム」と呼ぶ)を構築することがある。
例えば、電線などの設備の電力を計測する電力モニタ(スレーブ)を複数設置し、通信路を介して各電力モニタを監視する監視装置を接続し、各電力モニタが計測した計測結果を監視装置(マスタ)が収集し、蓄積する監視システムを構築することがある。
In this differential method, two dedicated lines are used for one signal line, and a voltage difference between the two lines is transmitted as a signal.
Further, a communication system (hereinafter referred to as “master / slave communication system”) composed of a master device and a slave device may be constructed using such half-duplex communication.
For example, multiple power monitors (slave) that measure the power of equipment such as electric wires are installed, and monitoring devices that monitor each power monitor are connected via a communication path, and the measurement results measured by each power monitor are monitored ( The monitoring system that the master) collects and accumulates may be constructed.
このようなシステムでは、マスタである監視装置が周期的にポーリング信号を各端末装置に送信し、スレーブである各電力モニタはポーリング信号を受けて計測結果を監視装置に返すようになっている。
ところが、上述したような半二重通信を利用したマスタ/スレーブ型通信システムでは、スレーブ装置は、マスタ装置から送られてくるポーリング信号に応答する形でしか信号を送ることができず、主導的に信号を送信することができない。
このため、例えば、スレーブ装置側で計測するデータの単位系を変更したり、計測した計測結果をデジタル信号で送信する際のビット数を変更したり、といった設定変更を行った場合、この変更をすぐさまマスタ装置に通知することができない。
However, in the master / slave type communication system using half-duplex communication as described above, the slave device can send a signal only in response to a polling signal sent from the master device, and is leading. Cannot send a signal.
For this reason, for example, when changing the unit system of data to be measured on the slave device side or changing the number of bits when transmitting the measured measurement result with a digital signal, change this setting. The master device cannot be notified immediately.
変更が通知されなければ、マスタ装置とスレーブ装置で単位系やビット数が合わなくなり、スレーブ装置の計測結果をマスタ装置側で正しく認識することができなくなるため、従来では通常、変更を反映させるために、ユーザがいちいち手作業でマスタ装置側に設定情報を設定し直すという煩雑な操作が必要であった。
そこで、本発明は、マスタ/スレーブ型通信システムにおいて、スレーブ装置で変更された設定をすぐさまマスタ装置に伝えることのできるようにすることを目的とする。
If the change is not notified, the unit system and the number of bits do not match between the master device and the slave device, and the measurement result of the slave device cannot be correctly recognized on the master device side. In addition, a complicated operation is required in which the user manually resets the setting information on the master device side.
Accordingly, an object of the present invention is to enable a master / slave communication system to immediately transmit a setting changed in a slave device to the master device.
上記課題を解決するために、本発明の通信システムは、通信路を介して差動方式によりデータ伝送を行い、計測対象を計測するスレーブ装置と、当該スレーブ装置を監視するマスタ装置とが接続され、前記スレーブ装置は前記マスタ装置から周期的に送られるポーリング信号を受けて計測結果を所定の設定情報に基づいて前記マスタ装置に送信するマスタ/スレーブ型通信システムであって、前記スレーブ装置は、計測対象を計測する計測部と、前記所定の設定情報を変更する入力を受け付ける変更受付部と、前記変更受付部が変更を受け付けると、前記通信路上でデータ伝送に用いる差動電圧以外の電圧を当該通信路に印加する電圧印加部と、前記マスタ装置から前記所定の設定情報を要求する要求信号を受けると、前記変更受付部に入力された設定情報を前記マスタ装置に送信する送信部とを備え、前記マスタ装置は、前記通信路に印加された電圧を検知する電圧検知部と、
前記電圧検知部により、前記通信路上でデータ伝送に用いる差動電圧以外の電圧が検知された場合、前記要求信号を前記スレーブ装置に送信する送信部と、前記スレーブ装置から、前記要求信号に対する応答として前記設定情報を受けると、当該設定情報を保持する保持部とを備えることを特徴とする。
In order to solve the above problems, a communication system according to the present invention connects a slave device that measures a measurement target and a master device that monitors the slave device by performing data transmission by a differential method via a communication path. The slave device is a master / slave type communication system that receives a polling signal periodically sent from the master device and transmits a measurement result to the master device based on predetermined setting information. A measurement unit that measures a measurement target, a change reception unit that receives an input for changing the predetermined setting information, and a voltage other than a differential voltage used for data transmission on the communication path when the change reception unit receives a change. Upon receiving a voltage application unit to be applied to the communication path and a request signal for requesting the predetermined setting information from the master device, an input to the change reception unit And a transmission unit for transmitting a setting information to the master device, said master device, a voltage detection unit for detecting a voltage applied to the communication path,
When a voltage other than a differential voltage used for data transmission is detected on the communication path by the voltage detection unit, a transmission unit that transmits the request signal to the slave device, and a response to the request signal from the slave device When the setting information is received, a holding unit that holds the setting information is provided.
また、上記課題を解決するために、本発明のマスタ装置は、差動方式によりデータ伝送を行う通信路を介して、計測対象を計測するスレーブ装置と接続され、前記スレーブ装置に周期的にポーリング信号を送ることで、所定の設定情報に基づいて送られる計測結果を受け取るマスタ装置であって、前記通信路に印加された電圧を検知する電圧検知部と、前記電圧検知部により、前記通信路上でデータ伝送に用いる差動電圧以外の電圧が検知された場合、前記所定の設定情報を要求する要求信号を前記スレーブ装置に送信する送信部と、前記スレーブ装置から、前記要求信号に対する応答として、前記設定情報を受けると、当該設定情報を保持する保持部とを備えることを特徴とする。 In order to solve the above problems, the master device of the present invention is connected to a slave device that measures a measurement target via a communication path that performs data transmission by a differential method, and periodically polls the slave device. A master device that receives a measurement result sent based on predetermined setting information by sending a signal, the voltage detection unit for detecting a voltage applied to the communication path, and the voltage detection unit on the communication path When a voltage other than the differential voltage used for data transmission is detected, a transmitter that transmits a request signal for requesting the predetermined setting information to the slave device, and as a response to the request signal from the slave device, When the setting information is received, a holding unit that holds the setting information is provided.
また、上記課題を解決するために、本発明のスレーブ装置は、計測対象を計測するスレーブ装置であり、差動方式によりデータ伝送を行う通信路を介してマスタ装置と接続され、前記マスタ装置から周期的に送られるポーリング信号を受けて計測結果を所定の設定情報に基づいて前記マスタ装置に送信するスレーブ装置であって、計測対象を計測する計測部と、前記設定情報を変更する入力を受け付ける変更受付部と、前記変更受付部が変更を受け付けると、前記通信路上でデータ伝送に用いる差動電圧以外の電圧を当該通信路に印加する電圧印加部と、前記電圧印加部による電圧印加に反応した前記マスタ装置から前記設定情報を要求する要求信号を受けると、前記変更受付部から入力された設定情報を前記マスタ装置に送信する送信部とを備えることを特徴とする。 In order to solve the above-mentioned problem, the slave device of the present invention is a slave device that measures a measurement target, and is connected to the master device via a communication path that performs data transmission by a differential method. A slave device that receives a periodically sent polling signal and transmits a measurement result to the master device based on predetermined setting information, and receives a measurement unit that measures a measurement target and an input that changes the setting information When the change acceptance unit and the change acceptance unit accept the change, the voltage application unit applies a voltage other than the differential voltage used for data transmission on the communication path to the communication path, and reacts to the voltage application by the voltage application unit. When receiving a request signal for requesting the setting information from the master device, a transmitting unit that transmits the setting information input from the change receiving unit to the master device; Characterized in that it comprises.
上記の構成により、マスタ/スレーブ型通信システムにおいて、スレーブ装置側で計測結果を送信する際に用いる設定情報に変更が行われた場合、スレーブ装置が通常のデータ伝送に用いる差動電圧以外の電圧パターンを通信路に印加し、この電圧パターンを検知したマスタ装置が設定変更の問合せ(要求信号の送信)を行うことにより、通信路が半二重であったとしても、スレーブ装置がマスタ装置からのポーリングなしで主導的にすぐさま設定変更をマスタ装置に伝えることができる。 With the above configuration, in the master / slave type communication system, when the setting information used when transmitting the measurement result on the slave device side is changed, a voltage other than the differential voltage used by the slave device for normal data transmission. Even if the communication path is half-duplex by applying a pattern to the communication path and the master device that detects this voltage pattern inquires about the setting change (transmission of a request signal), the slave device The setting change can be immediately transmitted to the master device without any polling.
マスタ装置は、スレーブ装置から受け取った設定情報を保持することで、設定情報にされた変更を反映してスレーブ装置から送られる計測結果を正しく認識できるようにすることができる。
このため、ユーザがいちいち手作業でマスタ装置に設定情報の変更を反映さえる入力操作を行う必要がなくなる。
By holding the setting information received from the slave device, the master device can correctly recognize the measurement result sent from the slave device reflecting the change made to the setting information.
For this reason, it is not necessary for the user to manually perform an input operation to reflect the change of the setting information on the master device.
なお、ここで、設定情報とは、例えば、スレーブ装置が計測結果を表現する際の単位系や、計測結果をデジタルで表現する際のビット数である。
また、上記マスタ/スレーブ型通信システムにおいて、前記通信路は、2線を有し、RS485規格に従って当該2線間に差動電圧を印加することでデータ伝送するとともに、データ伝送時以外は前記2線ともに高電圧が印加されるRS485通信路であり、前記スレーブ装置の電圧印加部は、前記RS485通信路上でのデータ伝送には使用されない電圧として、前記2線それぞれに低電圧を印加し、前記マスタ装置の送信部は、前記電圧検知部により、前記2線それぞれに低電圧が印加されていることが検知された場合、前記要求信号を前記スレーブ装置に送信することを特徴とする。
Here, the setting information is, for example, a unit system when the slave device expresses the measurement result, or the number of bits when the measurement result is digitally expressed.
In the master / slave type communication system, the communication path has two wires, and data is transmitted by applying a differential voltage between the two wires in accordance with the RS485 standard. Both lines are RS485 communication paths to which a high voltage is applied, and the voltage application unit of the slave device applies a low voltage to each of the two lines as a voltage that is not used for data transmission on the RS485 communication path, The transmission unit of the master device transmits the request signal to the slave device when the voltage detection unit detects that a low voltage is applied to each of the two wires.
この構成により、RS485通信方式によるマスタ/スレーブ通信システムにおいて、通常のデータ伝送で用いる差動電圧以外の電圧(2線とも低電圧)を利用して、スレーブ装置から主導的に設定情報の変更を通知することができる。
また、上記マスタ/スレーブ型通信システムにおいて、前記スレーブ装置は、前記通信路に印加された電圧を検知する電圧検知部を備え、前記スレーブ装置の電圧印加部は、前記電圧検出部により、前記2線ともに高電圧が印加されていることを検知した場合に、前記通信路でのデータ伝送に用いる差動電圧以外の電圧を当該通信路に印加することを特徴とする。
With this configuration, in the master / slave communication system using the RS485 communication method, the setting information is changed from the slave device by using a voltage other than the differential voltage used for normal data transmission (both the two wires are low voltage). You can be notified.
In the master / slave communication system, the slave device includes a voltage detection unit that detects a voltage applied to the communication path. The voltage application unit of the slave device is When it is detected that a high voltage is applied to both lines, a voltage other than the differential voltage used for data transmission in the communication path is applied to the communication path.
この構成により、通信路上でスレーブ装置とマスタ装置間の通信が他に行われている場合は、通信路の電圧を変更することはしないため、他の通信に割り込んで設定情報の変更を通知することを防ぐことができる。 With this configuration, if there is another communication between the slave device and the master device on the communication path, the voltage of the communication path is not changed, so the other communication is interrupted to notify the change of the setting information. Can be prevented.
以下、本発明の実施形態について、図面を参照しながら説明する。
<実施形態1>
(1.構成)
(1−1.システム)
まず、本発明に係るマスタ/スレーブ型通信システムの構成について、図1を参照しながら説明する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
<
(1. Configuration)
(1-1. System)
First, the configuration of a master / slave communication system according to the present invention will be described with reference to FIG.
図1に示すように、マスタ/スレーブ型通信システムは、RS485通信路を介して、スレーブ装置である電力モニタ100A及び100Bと、マスタ装置であるWSU(Web Server Unit)200とが接続されており、さらにその先にネットワークを介してPC(Personal Computer)300が接続されている。
なお、電力モニタ100A及び100Bは互いに同じ構成であるため、両者を指す場合に電力モニタ100と記載する。
As shown in FIG. 1, in the master / slave communication system,
In addition, since the
電力モニタ100は、電線などの外部の設備(図示しない)の電力を計測し、WSU200から周期的に送られてくるポーリング信号を受けて、計測結果をWSU200に送信する機能を有する。
WSU200は、電力モニタ100に対して周期的(例えば、1時間毎)にポーリング信号を送信し、ポーリング信号を受けて返ってくる電力の計測結果を蓄積し、PC300からの指示に応じネットワークを介して蓄積した計測結果を送信する機能を有する。
The
The WSU 200 periodically transmits a polling signal to the power monitor 100 (for example, every hour), accumulates the measurement result of the power returned in response to the polling signal, and responds to an instruction from the PC 300 via the network. It has a function to transmit the measurement result accumulated.
PC300は、ネットワークを介してWSU200にアクセス可能であり、WSU200が蓄積している計測結果の閲覧やダウンロードが可能である。
電力モニタ100とWSU200を結ぶRS485通信路は、差動方式によるデータ伝送が採用されており、2本の専用線(P1、P2)を用い、この2線に高電圧又は低電圧を印加することで信号を伝送する。2線に印加する電圧を差動電圧と呼び、電圧差が0.2V以上であればデジタル信号「1」であると判断され、電圧差が−0.2V以下であればデジタル信号「0」であると判断される。
(1−2.電力モニタ)
次に、電力モニタ100の構成について、図2を参照しながら説明する。
The PC 300 can access the WSU 200 via the network, and can browse and download measurement results stored in the WSU 200.
The RS485 communication path connecting the
(1-2. Power monitor)
Next, the configuration of the
図2に示すように、電力モニタ100は、ANDゲート101、ORゲート102、RS485通信部103、記憶部104、表示設定部105、電力計測用ポート106、計測用マイコン107、及び通信管理用マイコン108を備える。
ANDゲート101は、2つの入力端でRS485通信線(P1、P2)に接続しており、両入力端から高電圧が入力された場合はデジタル信号「1」を出力し、それ以外の場合は「0」を出力するものである。
As shown in FIG. 2, the
The
ORゲート102は、2つの入力端でRS485通信線(P1、P2)に接続しており、両入力端から低電圧が入力された場合はデジタル信号「0」を出力し、それ以外の場合は「1」を出力するものである。
RS485通信部103は、RS485通信プロトコルに従って信号の送受信を行うものである。送信時は、通信管理用マイコン108からの指示に応じて、所定の電圧をRS485通信線P1、P2に印加する。受信時は、印加されている電圧をデジタル信号に変換して通信管理用マイコン108に送出する。なお、RS485通信線P1とは2つのピンY及びAで接続しており、P2とは2つのピンZ及びBで接続している。
The OR
The
記憶部104は、各種情報を記憶するメモリであり、特に、後述する電力計測用ポート106が計測した電力値や、計測用マイコン107が計測した計測結果を出力するときの単位系やビット数の設定情報を記憶するものである。
表示設定部105は、例えばLCD(Liquid Crystal Display)を用いたタッチパネルディスプレイであり、各種情報の表示を行うとともに、ディスプレイを直接押圧することで入力された入力信号を通信管理用マイコン108に送出するものである。特に、記憶部104に記憶されている設定情報を変更するための入力を受け付ける。
The
The
電力計測用ポート106は、複数のポートを有し、各ポートを外部の電線などの外部設備と接続することで、この設備の電力を計測用マイコン107に伝えるものである。
計測用マイコン107は、電力計測用ポート106を介して得た電力を計測し、記憶部104に記憶されている設定情報で設定されている単位系やビット数に基づいて計測結果を通信管理用マイコン108に送出するものである。
The
The
通信管理用マイコン108は、電力モニタ100の通信を管理するものであり、WSU200にデータを送信するために所定の差動電圧を印加するようRS485通信部103を制御するものである。
例えば、WSU200からポーリング信号を受けた場合、計測用マイコン107で計測した計測結果を送信するための差動電圧を印加するようRS485通信部103を制御したり、WSU200から設定情報の要求信号を受けた場合、記憶部104に記憶されている設定情報を送信するための差動電圧を印加するようRS485通信部103を制御したり、する。
(1−3.WSU)
次に、WSU200の構成について、図3を参照しながら説明する。
The
For example, when a polling signal is received from the
(1-3. WSU)
Next, the configuration of the
図3に示すように、WSU200は、ORゲート201、割り込みコントロール部202、中央処理部203、シリアル通信部204、RS485通信部205、及び電圧プラグ回路206を備える。
ORゲート201は、2つの入力端でRS485通信線(P1、P2)に接続しており、両入力端から低電圧が入力された場合はデジタル信号「0」を出力し、それ以外の場合は「1」を出力するものである。
As shown in FIG. 3, the
The OR
割り込みコントロール部202は、ORゲート201から信号「0」が出力された場合、電力モニタ100から設定情報を要求する要求信号を割り込み信号として送信するよう中央処理部203に指示するものである。
中央処理部203は、WSU200の通信を管理するものであり、特に、所定の周期でポーリング信号を送信する指示や、割り込みコントロール部202からの指示に応じて、割り込み信号として要求信号を送信する指示を、シリアル通信部204に送出するものである。
When the signal “0” is output from the
The
シリアル通信部204は、中央処理部203の指示に応じて所定のデジタル信号を生成し、RS485通信部205に送出するものである。
RS485通信部205は、RS485通信プロトコルに従って信号の送受信を行うものである。送信時は、シリアル通信部204から受けたデジタル信号を、所定の差動電圧に変換し、通信線P1、P2に印加する。受信時は、印加されている電圧をデジタル信号に変換してシリアル通信部203に送出する。なお、RS485通信線P1とは2つのピンY及びAで接続しており、P2とは2つのピンZ及びBで接続している。
The
The
電圧プラグ回路206は、10KΩ(Kilo-Ohm)の抵抗206a、10KΩの抵抗206b、0.8KΩの抵抗206c、及び10KΩの抵抗206dを備え、RS485通信線P1、P2が無通信状態のときにプラグインピーダンスを使って通信線P1とP2それぞれに高電圧5Vと4.6Vを印加するものである。
記憶部207は、RS485通信の送受信ロジックや、RS485通信部205を介して電力モニタ100から受信した計測結果や、設定情報を記憶するものである。
(2.通信ロジック)
ここで、電力モニタ100のRS485通信部102及び、WSU200のRS485通信部205の送受信ロジックについて、図4〜5を参照しながら説明する。
The
The
(2. Communication logic)
Here, the transmission / reception logic of the
図4に示すように、RS485通信部103(205)は、1端にR0ピン、/REピン、DEピン、DIピンと2つのGNDピンを備え、他端にVccピン、Aピン、Bピン、Zピン、Yピンを備えている。なお、NCは未使用のピンを示している。
Yピン及びAピンはRS485信号線P1に接続されており、Zピン及びBピンはP2に接続されている。
As shown in FIG. 4, the RS485 communication unit 103 (205) has R0 pin, / RE pin, DE pin, DI pin and two GND pins at one end, and Vcc pin, A pin, B pin at the other end, A Z pin and a Y pin are provided. NC represents an unused pin.
The Y pin and the A pin are connected to the RS485 signal line P1, and the Z pin and the B pin are connected to P2.
論理回路103aは、DEピン及びDIピンの入力を受けてYピン及びZピンに信号を出力する回路であり、送信時に使用する。
論理回路103bは、Aピン及びBピンの入力を受けてR0ピンに信号を出力する回路であり、受信時に使用する。
(2−1.差動電圧ロジック)
論理回路103aの差動電圧ロジックについて、図5を参照しながら説明する。
図5(a)に示すように、送信時はDEピンに「1」を設定し、DIピンに「1」又は「0」を出力する。
The
The
(2-1. Differential voltage logic)
The differential voltage logic of the
As shown in FIG. 5A, during transmission, “1” is set to the DE pin, and “1” or “0” is output to the DI pin.
「1」を出力するには、高電圧を印加する。
「0」を出力するには、低電圧を印加する。
送信しないときはDEピンを「0」にすることで、DIピンの入力に関係なく出力端Y及びZは高インピーダンスになる。
受信時における論理回路103bのロジックについて、図5(b)を参照しながら説明する。
To output “1”, a high voltage is applied.
To output “0”, a low voltage is applied.
By setting the DE pin to “0” when not transmitting, the output terminals Y and Z become high impedance regardless of the input of the DI pin.
The logic of the
図5(b)に示すように、受信時はDEピンに「0」を設定した上で、Aピン
に印加される電圧とBピンに印加される電圧の差が閾値である+0.2V以上であるときは、R0にデジタル信号「1」を出力する。
Aピンに印加される電圧とBピンに印加される電圧の差が閾値である−0.2V以下であるときは、R0にデジタル信号「0」を出力する。
As shown in FIG. 5B, at the time of reception, the DE pin is set to “0”, and the difference between the voltage applied to the A pin and the voltage applied to the B pin is a threshold value of +0.2 V or more. When it is, the digital signal “1” is output to R0.
When the difference between the voltage applied to the A pin and the voltage applied to the B pin is a threshold value of −0.2 V or less, a digital signal “0” is output to R0.
ピンに何も入力されない場合(inputs open)は、R0にデジタル信号「1」を出力する。
/REピンを「1」にしているときは、AピンとBピンとの電圧差に関係なくR0ピンは高インピーダンスになる。
なお、Aピンに印加される電圧とBピンに印加される電圧の差が+0.2Vと−0.2Vの間にあるときは、R0に現在の値を継続して出力する。すなわち、デジタル信号「1」であればそのまま「1」を出力し、デジタル信号「0」であればそのままデジタル信号「0」を出力する。
(2−2.シリアル通信ロジック)
RS485通信におけるシリアル通信ロジックについて、図6を参照しながら説明する。
When nothing is input to the pin (inputs open), the digital signal “1” is output to R0.
When the / RE pin is set to “1”, the R0 pin has a high impedance regardless of the voltage difference between the A pin and the B pin.
When the difference between the voltage applied to the A pin and the voltage applied to the B pin is between + 0.2V and -0.2V, the current value is continuously output to R0. That is, if the digital signal is “1”, “1” is output as it is, and if the digital signal is “0”, the digital signal “0” is output as it is.
(2-2. Serial communication logic)
The serial communication logic in RS485 communication will be described with reference to FIG.
図6に示すように、シリアル通信のフレームフォーマットは、スタートビット、データビット、パリティビット、及びストップビットから成る。
スタートビットは1ビットで「0」であり、当該フレームの開始を示す。
スタートビットの後は、7〜8ビットのデータビットが続く。データビットには、フレームの送信先のアドレスや送信元のアドレスの他、WSU200が送るポーリング信号や要求信号、電力モニタ100が送る計測結果や設定情報などの送信データに応じたデータが含まれている。
As shown in FIG. 6, the frame format of serial communication includes a start bit, a data bit, a parity bit, and a stop bit.
The start bit is 1 bit and is “0”, indicating the start of the frame.
The start bit is followed by 7 to 8 data bits. The data bits include data corresponding to transmission data such as polling signals and request signals sent by the
データビットの後は、誤り検出用のパリティビットが続く。
最後に、当該フレームの通信終了を示す1〜は2ビットで「1」のストップビットが続く。
(3.動作)
まず前提として、本発明のマスタ/スレーブ型通信システムでは、WSU200は周期的(例えば、1時間毎)に電力モニタ100にポーリング信号を送信し、各電力モニタ100は、このポーリング信号に応答し、計測用マイコン107で計測して記憶部104に記憶している計測結果をWSU200に送信するようになっている。
The data bits are followed by a parity bit for error detection.
Finally, 1 to 2 indicating the end of communication of the frame are 2 bits followed by a stop bit of “1”.
(3. Operation)
First, as a premise, in the master / slave type communication system of the present invention, the
また、WSU200は、電力モニタ100とWSU200との間で通信が行われない無通信状態である間は、電圧プラグ回路206により通信線P1、P2それぞれに高電圧5Vと4.6Vを印加する。これにより、RS485通信部103及び205は、無通信状態の間、デジタル信号「1」を出力している。
ここで、電力モニタ100側で設定情報を変更した場合の、電力モニタ100とWSU200の動作について、図7〜8を参照しながら説明する。
The
Here, operations of the
ここでは、電力モニタ100Aが設定情報を変更したものとして説明する。
図7〜8に示すように、電力モニタ100Aで、ユーザが表示設定部105に入力操作を行うことによって記憶部104に記憶されている設定情報の変更がなされた場合(ステップ100A)、この設定情報が記憶部103に上書きされる(ステップS101A)。
続いて、電力モニタ100Aの通信管理用マイコン108はANDゲート101からの信号に基づいてRS485通信線が通信状態でないか確認する(ステップS102A)。
Here, it is assumed that the
As shown in FIGS. 7-8, when the setting information memorize | stored in the memory |
Subsequently, the
通信状態である場合はRS485通信線P1、P2に差動電圧が印加されているため、ANDゲート101からの信号が「0」である。この場合(ステップS102A:NO)、通信管理用マイコン108は無通信状態となるまで待つ。
無通信状態である場合は通信線P1、P2それぞれに高電圧5Vと4.6Vが印加されているため、ANDゲート101からの信号が「1」である。この場合(ステップS102A:YES)、通信用マイコン108は、設定情報の変更をWSU200に通知するために、RS485通信部103に対して、RS485通信線P1、P2ともに低電圧を印加するよう指示し、これを受けてRS485通信部103は瞬間的に(例えば、1クロック分)低電圧を印加する(ステップS103A)。瞬間的に低電圧を印加した後は、再びRS485通信線P1、P2それぞれに高電圧5Vと4.6Vを印加して無通信状態に戻す。
In the communication state, since the differential voltage is applied to the RS485 communication lines P1 and P2, the signal from the AND
In the non-communication state, since the high voltages 5V and 4.6V are applied to the communication lines P1 and P2, respectively, the signal from the AND
これにより、RS485通信線P1、P2はともに瞬間的に低電圧となる。
WSU200は、ORゲート201からの信号に基づいてRS485通信線P1、P2ともに低電圧が印加されていないかどうか確認しており、ORゲート201からの信号が瞬間的に「1」から「0」に変化することでこれを検知する(ステップS200)。
WSU200は、2線P1、P2に印加された低電圧を確認すると、割り込みコントロール部202は、要求信号を送信するよう中央処理部203に指示し、これを受けた中央処理部203はシリアル通信部204に対して電力モニタ100A及び100Bから設定情報を要求する要求信号を生成するよう指示する。
Thereby, both the RS485 communication lines P1 and P2 instantaneously become a low voltage.
The
When the
シリアル通信部204が生成した要求信号を、RS485通信部205が差動電圧に変換して通信線P1、P2に印加することで要求信号を送信する(ステップS201及びS202)。
電力モニタ100A及び100Bは、RS485通信部103で要求信号を受け取ると、通信管理用マイコン108は、前回設定情報を送信してから設定情報に変更が加えられたか否かを判断する(ステップS104A及びS100B)。
The request signal generated by the
When the power monitors 100A and 100B receive the request signal at the
電力モニタ100Aは、設定情報に変更が加えられているため(ステップS104A:YES)、記憶部104に記憶してある設定情報を送信するようRS485通信部103に指示し、RS485通信部103がRS485通信線P1、P2に印加することで設定情報をWSU200に送信する(ステップS105A)。
もし、設定情報に変更が加えられていなければ(ステップS104A:NO)、要求信号のフレームは破棄する(ステップS106A)。
Since the
If the setting information has not been changed (step S104A: NO), the request signal frame is discarded (step S106A).
一方、電力モニタ100Bは、設定情報に変更は加えられていないため(ステップS100B:NO)、要求信号のフレームを破棄する(ステップS101B)。
もし、設定情報に変更が加えられていたら(ステップS100B:YES)、設定情報をWSU200に送信する(ステップS102B)。
なお、電力モニタ100Aが設定情報を送信する際、図5で示したロジックに基づき、電力モニタ100BのRS485通信部103はデジタル信号「1」を出力するが、フレームの始まりを示すスタートビット「0」を介さない「1」はフレームとは認識せず、無通信状態の継続と認識する。
On the other hand, the
If the setting information has been changed (step S100B: YES), the setting information is transmitted to the WSU 200 (step S102B).
When the
WSU200は、RS485通信部205で設定情報を受け取ると、記憶部207に保持し、この設定変更を反映させる(ステップS203)。
以上のように、電力モニタ100側で計測結果を送信する際の単位系やビット数に変更を加えた場合、瞬間的にRS485通信線P1、P2ともに低電圧を印加することにより、この変更を電力モニタ100が主導的にWSU200に伝える。
When receiving the setting information at the
As described above, when a change is made to the unit system or the number of bits when the measurement result is transmitted on the
WSU200は、RS通信線P1、P2に低電圧が印加されたことを検知すると、すぐさま要求信号で設定情報を取得し、変更された設定情報反映する。
このように動作することで、WSU200は、設定情報が変更された次の周期でポーリング信号による計測結果の取得を行った際、すでにこの変更が反映されているため、計測結果を正しく認識することができる。
When the
By operating in this way, the
例えば、電力モニタ100が計測結果を送信する際の単位系をA(アンペア)からmA(ミリアンペア)に変更した場合や、計測結果を送信する際のデジタル信号のフォーマットを4ビットから8ビットに変更した場合に、この変更をすぐさまWSU200に反映させることができる。
したがって、いちいちユーザが次にポーリング周期が来るまでにWSU200に設定情報の変更を反映させる作業を手作業で行わなくても、システムの運用に支障をきたすことがない。
<変形例>
実施形態1で示した電力モニタ100では、ANDゲート101からの信号によってRS485通信線が無通信状態であるか否かを判断する例を挙げて説明したが、これに限らずに、RS485通信の特性を利用して他の方法で判断するようにしてもよい。
(1)
WSU200がポーリング信号を送信し、各電力モニタ100が応答して計測結果を送信するが、全ての電力モニタ100が計測結果を送信し終わるとRS485通信線は無通信状態となる。
For example, when the unit system when the
Therefore, even if the user does not manually perform the work of reflecting the change of the setting information on the
<Modification>
In the
(1)
The
変形例1では、全ての電力モニタ100が計測結果を送信し終わったことを契機として、無通信状態と判断する。
以下、具体的に説明する。
RS485通信では、フレームを送信する際、送信相手の割り当てられている固有のアドレスをヘッダに付加して送信する。
In
This will be specifically described below.
In RS485 communication, when a frame is transmitted, a unique address assigned to a transmission partner is added to the header and transmitted.
例えば、WSU200にはアドレス「1」が割り当てられており、電力モニタ100A及び100Bにはそれぞれ「2」及び「3」が割り当てられている。
そこで、マスタ装置であるWSU200がスレーブ装置である電力モニタ100にポーリング信号を送信する際、送信対象となる電力モニタ100のアドレスを指定して逐次ポーリング信号のフレームを送信することになる。
For example, the address “1” is assigned to the
Therefore, when the
各電力モニタ100は、全てのフレームを受信するが、自装置あてのアドレスが指定してあるフレームは復調してデータを取り出し、自装置以外のアドレスが指定してあるフレームは破棄するようになっている。
ここで、電力モニタ100の記憶部104に、RS485通信線に接続されている全電力モニタ100のアドレスを記憶しておく。
Each
Here, the address of the
そして、ステップS102において、電力モニタ100Aは、RS485通信部103を監視し、アドレス「3」が割り当てられている電力モニタ100BからWSU200宛にフレームを受信したか否かを確認する。
電力モニタ100BからWSU200宛のフレームを受信した場合、このフレームは破棄するが、RS485通信線に接続されている全電力モニタ100が計測結果の送信を完了したため無通信状態が発生すると判断し、ステップS200でRS485通信線P1、P2に低電圧を印加する。
In step S <b> 102, the
If a frame addressed to the
このように動作することで、通信管理用マイコン108が行うソフトウェア処理でRS485通信線の無通信状態を判断することができ、図2に示す構成からANDゲート101を外すことができるため、電力モニタ100の製造コストの削減を図ることができる。
(2)
また、電力モニタ100の動作としては、WSU200から自装置宛てにフレームを受信すると、このフレームを復調してデータを取り出し、要求に応じた応答を返信する。この返信作業としては、記憶部104に記憶されているデータの中から要求に沿ったデータを取得して、RS485通信部103で適切な差動電圧を通信線P1、P2に印加しなければならならず、この一連の作業を完了するまでに数クロックの時間を要する。
By operating in this way, it is possible to determine the non-communication state of the RS485 communication line by software processing performed by the
(2)
As an operation of the
変形例では、この数クロックの時間が無通信状態となることを利用する。
すなわち、ステップS102において、電力モニタ100Aは、電力モニタ100B宛のフレームを受信した場合に無通信状態が発生すると判断する。
この場合、電力モニタ100Aは、電力モニタ100BがWSU200に応答信号を返す前にRS485通信線P1、P2ともに低電圧を印加し(ステップS103A)、WSU200から要求信号を送ってもらって(ステップS201)、設定情報を送信する(ステップS105A)必要がある。
<補足>
以上、実施形態1及び変形例に基づいて、本発明に係る電力モニタ100とWSU200から成るマスタ/スレーブ型通信システムにについて説明してきたが、この構成には種々の変形を加えることが可能である。
(1)実施形態1及び変形例では、RS485通信方式に準拠しているマスタ/スレーブ型通信システムを例に挙げて説明したが、これに限定されるものではなく、RS422方式など、差動方式によりデータ伝送を行う他の通信方式であってもよい。
(2)実施形態1では、電力モニタ100が設定情報に変更が加えられていたか否かを確認し(ステップS104A及び100B)、変更が加えられていた場合に設定情報をWSU200に送信する(ステップS105A及び103B)例を挙げて説明したが、これに限定されるものではない。
In the modification, the fact that the time of several clocks is in a no-communication state is used.
That is, in step S102, power monitor 100A determines that a no-communication state occurs when a frame addressed to
In this case, the
<Supplement>
As described above, the master / slave communication system including the
(1) In the first embodiment and the modification, the master / slave communication system compliant with the RS485 communication method has been described as an example, but the present invention is not limited to this, and a differential method such as the RS422 method is used. Other communication schemes for performing data transmission by using may be used.
(2) In the first embodiment, the
すなわち、電力モニタ100は要求信号を受信したら変更の有無を確認することなく必ず設定情報をWSU200に送信し、WSU200側で各電力モニタ100から受信した設定情報の中で変更が加えられていたもののみを記憶部207に上書きするようにしてもよい。
(3)実施形態1では、電力モニタ100は、ORゲート102からの信号に基づいてRS485通信線P1、P2ともに低電圧が印加されていないかどうか確認するようになっているが、このORゲート102は電力モニタ100の構成になくてもよい。
That is, when the
(3) In the first embodiment, the
100 電力モニタ
101 ANDゲート
102 ORゲート
103 RS485通信部
104 記憶部
105 表示設定部
106 電力計測用ポート
107 計測用マイコン
108 通信管理用マイコン
200 WSU
201 ORゲート
202 割り込みコントロール部
203 中央処理部
204 シリアル通信部
205 RS485通信部
206 電圧プラグ回路
100
201 OR
Claims (5)
前記スレーブ装置は、
計測対象を計測する計測部と、
前記所定の設定情報を変更する入力を受け付ける変更受付部と、
前記変更受付部が変更を受け付けると、前記通信路上でデータ伝送に用いる差動電圧以外の電圧を当該通信路に印加する電圧印加部と、
前記マスタ装置から前記所定の設定情報を要求する要求信号を受けると、前記変更受付部に入力された設定情報を前記マスタ装置に送信する送信部とを備え、
前記マスタ装置は、
前記通信路に印加された電圧を検知する電圧検知部と、
前記電圧検知部により、前記通信路上でデータ伝送に用いる差動電圧以外の電圧が検知された場合、前記要求信号を前記スレーブ装置に送信する送信部と、
前記スレーブ装置から、前記要求信号に対する応答として前記設定情報を受けると、当該設定情報を保持する保持部とを備える
ことを特徴とする通信システム。 A polling device that transmits data by a differential method via a communication path and connects a slave device that measures a measurement target and a master device that monitors the slave device, and the slave device is periodically sent from the master device. A master / slave communication system that receives a signal and transmits a measurement result to the master device based on predetermined setting information,
The slave device is
A measurement unit for measuring a measurement object;
A change receiving unit that receives an input to change the predetermined setting information;
When the change accepting unit accepts a change, a voltage applying unit that applies a voltage other than the differential voltage used for data transmission on the communication path to the communication path;
Upon receiving a request signal for requesting the predetermined setting information from the master device, a transmission unit that transmits the setting information input to the change receiving unit to the master device,
The master device is
A voltage detector for detecting a voltage applied to the communication path;
When a voltage other than a differential voltage used for data transmission is detected on the communication path by the voltage detector, a transmitter that transmits the request signal to the slave device;
And a holding unit that holds the setting information when the setting information is received from the slave device as a response to the request signal.
前記スレーブ装置の電圧印加部は、前記RS485通信路上でのデータ伝送には使用されない電圧として、前記2線それぞれに低電圧を印加し、
前記マスタ装置の送信部は、前記電圧検知部により、前記2線それぞれに低電圧が印加されていることが検知された場合、前記要求信号を前記スレーブ装置に送信する
ことを特徴とする請求項1記載の通信システム。 The communication path has two lines, and transmits data by applying a differential voltage between the two lines in accordance with the RS485 standard, and a high voltage is applied to both the two lines except during data transmission. And
The voltage application unit of the slave device applies a low voltage to each of the two lines as a voltage not used for data transmission on the RS485 communication path,
The transmission unit of the master device transmits the request signal to the slave device when the voltage detection unit detects that a low voltage is applied to each of the two wires. The communication system according to 1.
前記通信路に印加された電圧を検知する電圧検知部を備え、
前記スレーブ装置の電圧印加部は、前記電圧検出部により、前記2線ともに高電圧が印加されていることを検知した場合に、前記通信路でのデータ伝送に用いる差動電圧以外の電圧を当該通信路に印加する
ことを特徴とする請求項2記載の通信システム。 The slave device is
A voltage detector for detecting a voltage applied to the communication path;
The voltage application unit of the slave device applies a voltage other than the differential voltage used for data transmission in the communication path when the voltage detection unit detects that a high voltage is applied to both the two wires. The communication system according to claim 2, wherein the communication system is applied to a communication path.
前記通信路に印加された電圧を検知する電圧検知部と、
前記電圧検知部により、前記通信路上でデータ伝送に用いる差動電圧以外の電圧が検知された場合、前記所定の設定情報を要求する要求信号を前記スレーブ装置に送信する送信部と、
前記スレーブ装置から、前記要求信号に対する応答として、前記設定情報を受けると、当該設定情報を保持する保持部とを備える
ことを特徴とするマスタ装置。 A measurement result that is connected to a slave device that measures a measurement target via a communication path that performs data transmission by a differential method, and that is sent based on predetermined setting information by periodically sending a polling signal to the slave device A master device that receives
A voltage detector for detecting a voltage applied to the communication path;
When a voltage other than a differential voltage used for data transmission is detected on the communication path by the voltage detector, a transmitter that transmits a request signal for requesting the predetermined setting information to the slave device;
A master device comprising: a holding unit that holds the setting information when the setting information is received from the slave device as a response to the request signal.
計測対象を計測する計測部と、
前記設定情報を変更する入力を受け付ける変更受付部と、
前記変更受付部が変更を受け付けると、前記通信路上でデータ伝送に用いる差動電圧以外の電圧を当該通信路に印加する電圧印加部と、
前記電圧印加部による電圧印加に反応した前記マスタ装置から前記設定情報を要求する要求信号を受けると、前記変更受付部から入力された設定情報を前記マスタ装置に送信する送信部とを備える
ことを特徴とするスレーブ装置。 A slave device that measures a measurement target, is connected to a master device via a communication path that performs data transmission by a differential method, receives a polling signal periodically sent from the master device, and sends measurement results to predetermined setting information. A slave device that transmits to the master device based on:
A measurement unit for measuring a measurement object;
A change receiving unit for receiving an input for changing the setting information;
When the change accepting unit accepts a change, a voltage applying unit that applies a voltage other than the differential voltage used for data transmission on the communication path to the communication path;
A transmission unit that transmits the setting information input from the change receiving unit to the master device when receiving a request signal for requesting the setting information from the master device that has responded to voltage application by the voltage applying unit. Feature slave device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006119036A JP2007295163A (en) | 2006-04-24 | 2006-04-24 | Communication system, master device, and slave device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006119036A JP2007295163A (en) | 2006-04-24 | 2006-04-24 | Communication system, master device, and slave device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007295163A true JP2007295163A (en) | 2007-11-08 |
Family
ID=38765350
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006119036A Pending JP2007295163A (en) | 2006-04-24 | 2006-04-24 | Communication system, master device, and slave device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007295163A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8285843B2 (en) | 2008-03-18 | 2012-10-09 | Panasonic Corporation | Remote monitoring system |
JP2013238472A (en) * | 2012-05-15 | 2013-11-28 | Renesas Electronics Corp | Semiconductor device and voltage measurement device |
-
2006
- 2006-04-24 JP JP2006119036A patent/JP2007295163A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8285843B2 (en) | 2008-03-18 | 2012-10-09 | Panasonic Corporation | Remote monitoring system |
JP2013238472A (en) * | 2012-05-15 | 2013-11-28 | Renesas Electronics Corp | Semiconductor device and voltage measurement device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6314476B1 (en) | Network adapter enabling bidirectional monitoring of a terminal device between a computer and a managing device | |
CN100373859C (en) | Hand held diagnostic and communication device with automatic bus detection | |
JP4683034B2 (en) | POWER SUPPLY SYSTEM, MONITOR DEVICE, MONITOR METHOD, AND COMPUTER PROGRAM | |
US20160328352A1 (en) | Methods and apparatus to identify a communication protocol being used in a process control system | |
CN1592224B (en) | Data transmission method for a multiprotocol handheld field maintenance tool | |
CN102497274A (en) | Power sourcing equipment having auto-zero circuit for determining and controlling output current | |
JPS58500349A (en) | Data processing system using broadcast packet switching | |
CN101124542A (en) | System and method for associating a DLPDU received by an interface chip with a data measurement made by an external circuit | |
EP2028571B1 (en) | Method of detecting disconnection and power discontinuity of I/O unit connected to numerical controller | |
US5572525A (en) | GPIB extender with find listener protocol capabilities | |
JP2009033247A (en) | Information terminal device and option unit therefor | |
CN110083561A (en) | The configuration method and electronic equipment of a kind of veneer, veneer | |
EP2194675A1 (en) | Multi-protocol field device | |
CN110995533A (en) | Ethernet streaming test system | |
CN114338493A (en) | NCSI test method, system, device and storage medium based on network protocol stack | |
CN109547274A (en) | A kind of enclosure board switching method, device and first network equipment | |
JP2007295163A (en) | Communication system, master device, and slave device | |
Felser | PROFIBUS Manual: A collection of information explaining PROFIBUS networks | |
CN115695090A (en) | Data transmission method, internet of things gateway equipment and computer readable storage medium | |
CN114488871A (en) | Control method, frequency converter and computer readable storage medium | |
CN210958413U (en) | Probe monitoring device and IPv4/IPv6 translation equipment with same | |
CN113009246B (en) | PSE device detection device and PSE device detection method | |
CN114827967A (en) | Software updating method, Bluetooth device and storage medium | |
CN101536422B (en) | Method for associating a signal measurement with a communication device on a network | |
JP2015099528A (en) | Method of rewriting program of sub-microcomputer |