JP2014174734A - Data communication system and master unit thereof, and data communication method - Google Patents

Data communication system and master unit thereof, and data communication method Download PDF

Info

Publication number
JP2014174734A
JP2014174734A JP2013046781A JP2013046781A JP2014174734A JP 2014174734 A JP2014174734 A JP 2014174734A JP 2013046781 A JP2013046781 A JP 2013046781A JP 2013046781 A JP2013046781 A JP 2013046781A JP 2014174734 A JP2014174734 A JP 2014174734A
Authority
JP
Japan
Prior art keywords
data
request signal
unit
response signal
master unit
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
Application number
JP2013046781A
Other languages
Japanese (ja)
Other versions
JP6009977B2 (en
Inventor
Koichi Shimosato
康一 下里
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2013046781A priority Critical patent/JP6009977B2/en
Publication of JP2014174734A publication Critical patent/JP2014174734A/en
Application granted granted Critical
Publication of JP6009977B2 publication Critical patent/JP6009977B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To increase reliability associated with data communication without changing an existing protocol.SOLUTION: The data communication system comprises: a master unit which issues a request signal for requesting data; and a slave unit which returns a response signal corresponding to the request signal, to the master unit. The master unit comprises a generation unit and a determination unit. The generation unit generates a request signal which includes information showing data and information showing a return code previously stored in the slave unit. The determination unit determines a correspondence between the request signal and the response signal. The slave unit returns the data shown by the request signal and the response signal which includes the return code. Then, the determination unit determines the correspondence between the request signal and the response signal on the basis of whether the return code requested by the request signal is included in the response signal.

Description

本発明の実施形態は、例えばビルや産業用システムに備わるセンサにより取得されたデータを収集するための通信方式の改良に関する。   Embodiments of the present invention relate to an improvement in a communication method for collecting data acquired by a sensor provided in, for example, a building or an industrial system.

ビルなどの建物には、例えば水道の量(上水の流量)を計測するメータ、空調に係わる熱量を計測するメータ、あるいは電力量計などの各種のメータが随所に配置される。PLC(プログラマブルロジックコントローラ)などに一旦プールされたセンシングデータは、より上位のホストコンピュータにより収集される。PLCは、上下水道などの公共システム、鉄鋼、製紙プラントなどの工場、ビル、官公施設、電鉄の受変電システム、中央監視制御システム、自動車産業など、産業用システムの制御に広く使用されている。   In a building such as a building, for example, various meters such as a meter for measuring the amount of water (flow rate of clean water), a meter for measuring the amount of heat related to air conditioning, or a watt hour meter are arranged. Sensing data once pooled in a PLC (programmable logic controller) or the like is collected by a higher-level host computer. PLCs are widely used to control industrial systems such as public systems such as water and sewage, factories such as steel and paper plants, buildings, public facilities, electric power receiving and transforming systems, central monitoring and control systems, and the automobile industry.

ホストコンピュータとPLCとの通信における物理層プロトコルは、RS−485によるシリアルケーブル、あるいはイーサネット(登録商標)が代表的である。上位層プロトコルとしてはBuilding Automation and Control Networking protocol(BACnet(登録商標))が著名であるが、その下位層のプロトコルはベンダの独自仕様であることが多い。   The physical layer protocol in communication between the host computer and the PLC is typically a serial cable based on RS-485 or Ethernet (registered trademark). As an upper layer protocol, the Building Automation and Control Networking protocol (BACnet (registered trademark)) is famous, but the lower layer protocol is often a vendor's original specification.

特開2004−70615号公報JP 2004-70615 A

通常、1台のホストコンピュータに複数台のPLCが接続される。このような形態におけるホストコンピュータとPLCとの間のデータ通信方式には、多くのケースではシングルマスタ/マルチスレーブと称される方式が用いられる。この方式のもとではホストコンピュータ(マスタ)が要求コマンド(クエリ)を発行し、PLC(スレーブ)が応答を返信する。多くの下位層プロトコルには要求と応答とを対応付ける手段が無いので、ホストコンピュータは要求と応答との時系列に基づいて両者の対応を判定する。   Usually, a plurality of PLCs are connected to one host computer. In many cases, a method called single master / multi-slave is used as a data communication method between the host computer and the PLC in such a form. Under this method, the host computer (master) issues a request command (query), and the PLC (slave) returns a response. Since many lower layer protocols do not have means for associating a request with a response, the host computer determines the correspondence between the two based on the time series of the request and the response.

しかしながら通信障害などにより応答がタイムアウトすると、ホストコンピュータは次の要求(コマンドBとする)を発行する。その後に、以前の要求(コマンドAとする)への応答が届いてしまうと、ホストコンピュータはこれをコマンドBに対する応答と看做し、誤った情報として取り込んでしまう。さらに悪いことに、その後のデータ通信において要求と応答との対応が全てずれてしまうことになる。このような状態に陥るとデータ通信に係わる信頼性は失われてしまう。   However, when the response times out due to a communication failure or the like, the host computer issues the next request (command B). After that, when a response to the previous request (command A) arrives, the host computer regards this as a response to the command B and takes it as incorrect information. To make matters worse, all the correspondences between requests and responses in the subsequent data communication are shifted. In such a state, the reliability related to data communication is lost.

この種の不具合は、プロトコルにシーケンス番号を実装すればコマンドとその応答とを対応付けることができるので、解決可能と思われる。しかしシーケンス番号を実装することは既に確立された既存のプロトコルを改変することなので、現実的には難しい。既存のプロトコルを変更することなく上記の不具合を解決可能な技術が待たれている。
目的は、既存のプロトコルを改変することなく信頼性を高めたデータ通信システムとそのマスタユニットおよびデータ通信方法を提供することにある。
This kind of problem can be solved by implementing a sequence number in the protocol and associating the command with its response. However, it is practically difficult to implement a sequence number because it modifies an existing protocol that has already been established. There is a need for a technology that can solve the above problems without changing existing protocols.
It is an object of the present invention to provide a data communication system, a master unit thereof, and a data communication method with improved reliability without modifying existing protocols.

実施形態によれば、データ通信システムは、データを要求するための要求信号を発行するマスタユニットと、要求信号に応じた応答信号をマスタユニットに返信するスレーブユニットとを具備する。マスタユニットは、生成部と、判定部とを備える。生成部は、データを示す情報と、スレーブユニットに予め記憶される返信コードを示す情報とを含む要求信号を生成する。判定部は、要求信号と応答信号との対応を判定する。スレーブユニットは、要求信号に示されるデータおよび返信コードを含む応答信号を返信する。そして判定部は、要求信号により要求された返信コードが応答信号に含まれるか否かに基づいて、要求信号と応答信号との対応を判定する。   According to the embodiment, the data communication system includes a master unit that issues a request signal for requesting data, and a slave unit that returns a response signal corresponding to the request signal to the master unit. The master unit includes a generation unit and a determination unit. The generation unit generates a request signal including information indicating data and information indicating a reply code stored in advance in the slave unit. The determination unit determines correspondence between the request signal and the response signal. The slave unit returns a response signal including the data indicated in the request signal and a reply code. Then, the determination unit determines the correspondence between the request signal and the response signal based on whether or not the reply code requested by the request signal is included in the response signal.

図1は、実施形態に係わるデータ通信システムを適用可能な、建物監視システムの一例を示すシステム図である。FIG. 1 is a system diagram showing an example of a building monitoring system to which the data communication system according to the embodiment can be applied. 図2は、図1に示されるシステムの要部を示す機能ブロック図である。FIG. 2 is a functional block diagram showing the main part of the system shown in FIG. 図3は、PLC51〜5Nの一例を示す機能ブロック図である。FIG. 3 is a functional block diagram illustrating an example of the PLCs 51 to 5N. 図4は、PLC51〜5Nのデータメモリ5のアドレスと記憶内容との関係の一例を示す図である。FIG. 4 is a diagram showing an example of the relationship between the addresses of the data memories 5 of the PLCs 51 to 5N and the stored contents. 図5は、LCS2mとPLC51〜5Nとの間で授受されるデータのフォーマットの一例を示す図である。FIG. 5 is a diagram illustrating an example of a format of data exchanged between the LCS 2m and the PLCs 51 to 5N. 図6は、実施形態におけるLCS2mの一例を示す機能ブロック図である。FIG. 6 is a functional block diagram illustrating an example of the LCS 2m in the embodiment. 図7は、第1の実施形態における、PLC51〜5Nのデータメモリ5のアドレスと記憶内容との関係の一例を示す図である。FIG. 7 is a diagram illustrating an example of the relationship between the address of the data memory 5 of the PLCs 51 to 5N and the stored contents in the first embodiment. 図8は、第1の実施形態における、LCS2mとPLC51〜5Nとの間で授受されるデータのフォーマットの一例を示す図である。FIG. 8 is a diagram illustrating an example of a format of data exchanged between the LCS 2m and the PLCs 51 to 5N in the first embodiment. 図9は、第2の実施形態における、PLC51〜5Nのデータメモリ5のアドレスと記憶内容との関係の一例を示す図である。FIG. 9 is a diagram illustrating an example of the relationship between the address of the data memory 5 of the PLCs 51 to 5N and the stored contents in the second embodiment. 図10は、第2の実施形態における、LCS2mとPLC51〜5Nとの間で授受されるデータのフォーマットの一例を示す図である。FIG. 10 is a diagram illustrating an example of a format of data exchanged between the LCS 2m and the PLCs 51 to 5N in the second embodiment.

図1は、実施形態に係わるデータ通信システムを適用可能な、建物監視システムの一例を示すシステム図である。図1において、ヒューマンインタフェースステーション(HIS)11〜1n、グローバルコントロールサーバ(GCS)200、およびローカルコントロールサーバ(LCS)21〜2mが、建物内のLocal Area Network(LAN)100に接続される。   FIG. 1 is a system diagram showing an example of a building monitoring system to which the data communication system according to the embodiment can be applied. In FIG. 1, human interface stations (HIS) 11 to 1n, a global control server (GCS) 200, and local control servers (LCS) 21 to 2m are connected to a local area network (LAN) 100 in a building.

LCS21〜2mには、それぞれ通信回線を介してノードが接続される。各ノードは例えばフロアごとの空調機器、照明機器、動力機器などである。LCS21〜2mはそれぞれ接続されるノードを被監視装置として認識し、その状態を各種メータの指示値に基づいてモニタする。またLCS21〜2mは、取得した信号に基づくデータを一定期間保存する。   A node is connected to each of the LCSs 21 to 2m via a communication line. Each node is, for example, an air conditioning device, a lighting device, or a power device for each floor. Each of the LCSs 21 to 2m recognizes a connected node as a monitored device, and monitors the state based on instruction values of various meters. The LCSs 21 to 2m store data based on the acquired signals for a certain period.

HIS11〜1nは、Graphical User Interface(GUI)環境を提供し、ユーザによるデータの入力や設定の変更などを受け付ける。またHIS11〜1nは、LCS21〜2mからメータのカウント値などを取得し、取得したデータを保存する。さらにHIS11〜1nは、LCS21〜2mから通知されるデータを受け建物監視システムを上位レベルで監視制御したり、オペレータに各種の情報を提供したりする。   The HISs 11 to 1n provide a graphical user interface (GUI) environment, and accept data input and setting changes by a user. Moreover, HIS11-1n acquires the count value of a meter, etc. from LCS21-2m, and preserve | saves the acquired data. Further, the HISs 11 to 1n receive data notified from the LCSs 21 to 2m and monitor and control the building monitoring system at a higher level and provide various information to the operator.

GCS200は、建物内のメータ値のデータを例えば一日一回の頻度で、HIS11〜1nから定期的に収集し、蓄積する。またGCS200は、LCS21〜2m、HIS11〜1nから取得した各種データに基づいて、建物の空調や照明などを制御する。
さらに、最上位管理システムとしてのBEMSをLAN100に接続し、建物全体でのエネルギー消費の最適化や快適性の制御などを実現することも可能である。
The GCS 200 periodically collects and accumulates meter value data in the building from the HISs 11 to 1n at a frequency of once a day, for example. Moreover, GCS200 controls the air conditioning, illumination, etc. of a building based on the various data acquired from LCS21-2m and HIS11-1n.
Furthermore, it is possible to connect the BEMS as the highest management system to the LAN 100 to optimize energy consumption and control comfort in the entire building.

LCS21〜2mは、送信すべき情報をBACnet(登録商標)での通信形式に変換し、HIS11〜1nなどに送信する。BACnet(登録商標)は標準化されたプロトコルであるので、異ベンダシステムをLAN100に接続することが可能になる。   The LCSs 21 to 2m convert information to be transmitted into a communication format in BACnet (registered trademark) and transmit the information to the HISs 11 to 1n and the like. Since BACnet (registered trademark) is a standardized protocol, it becomes possible to connect different vendor systems to the LAN 100.

実施形態では、図1において、マスタユニットとしてのLCS2mに、スレーブユニットとしての複数のPLC51〜5Nが接続される。PLC51〜5Nも上記ノードと同様に、それぞれ取得したデータを、要求に応じてLCS2mに送信する。実施形態においてはLCS2mとPLC51〜5Nとの間の、シングルマスタ/マルチスレーブ方式でのデータ通信を考える。LCS2mは、PLC51〜5N(スレーブ)に対するホストコンピュータ(マスタ)として機能する。   In the embodiment, in FIG. 1, a plurality of PLCs 51 to 5N as slave units are connected to the LCS 2m as a master unit. Similarly to the above nodes, the PLCs 51 to 5N transmit the acquired data to the LCS 2m in response to a request. In the embodiment, consider data communication in the single master / multi-slave mode between the LCS 2m and the PLCs 51 to 5N. The LCS 2m functions as a host computer (master) for the PLCs 51 to 5N (slave).

図2は、図1に示されるシステムの要部を示す機能ブロック図である。PLC51〜5Nは例えばRS−485インタフェースを介してカスケード接続される。RS−485インタフェースはプロトコル変換器40により例えばイーサネット(登録商標)に変換され、LCS2mに接続される。LCS2mは、PLC51〜5Nからシングルマスタ方式でデータを収集する。   FIG. 2 is a functional block diagram showing the main part of the system shown in FIG. The PLCs 51 to 5N are cascade-connected via, for example, an RS-485 interface. The RS-485 interface is converted into, for example, Ethernet (registered trademark) by the protocol converter 40 and connected to the LCS 2m. The LCS 2m collects data from the PLCs 51 to 5N by a single master method.

図3は、PLC51〜5Nの一例を示す機能ブロック図である。図3において、主CPU(Central Processing Unit)1は、シーケンスの実行およびその制御を担う、PLC51〜5Nの中枢部である。プログラムメモリ2は、CPU1が実行するシーケンスプログラムを記憶するメモリであり、OS(Operating System)、シーケンスプログラムの解釈プログラム、実行プログラムなどを記憶する。   FIG. 3 is a functional block diagram illustrating an example of the PLCs 51 to 5N. In FIG. 3, a main CPU (Central Processing Unit) 1 is a central part of PLCs 51 to 5N that is responsible for execution and control of a sequence. The program memory 2 is a memory for storing a sequence program executed by the CPU 1, and stores an OS (Operating System), a sequence program interpretation program, an execution program, and the like.

ワークメモリ3はCPU1がプログラムを実行するときに作業領域として使用される。シーケンスプログラムメモリ(ユーザプログラムメモリ)4はシーケンスプログラムを記憶する。データメモリ5はPLC51〜5Nがそれぞれセンサ(図示せず)などから取得したデータ、あるいはPLC51〜5N自身が計算で求めたデータなど、建物監視システムの稼動に要する種々のデータを記憶する。この種のデータには、ヘルシーカウンタ、デジタル信号(オン/オフ信号など)、アナログ信号(温度、湿度のセンシング値など)、および積算値信号(電力量、冷媒の流量の積算値など)などがある。   The work memory 3 is used as a work area when the CPU 1 executes a program. The sequence program memory (user program memory) 4 stores a sequence program. The data memory 5 stores various data required for operation of the building monitoring system, such as data acquired by the PLCs 51 to 5N from sensors (not shown) or data calculated by the PLCs 51 to 5N themselves. This type of data includes healthy counters, digital signals (such as on / off signals), analog signals (such as temperature and humidity sensing values), and integrated value signals (such as electric power and refrigerant flow rate integrated values). is there.

マイコンバス6はPLC内の要素をCPU1と接続するためのバスであり、アドレスバス、データバス、制御バスの総体である。I/O(Input/Output)7はPLCと外部の制御対象(センサなど)を接続するための入出力装置である。通信インタフェース(通信I/F)8はPLCとLCSとを通信回線を介して接続するインタフェースである。トレースCPU9はマイコンバス6を介してCPU1や各種メモリに接続され、マイコンバス6上の信号を監視しつつPLCの自律運転を補助する。   The microcomputer bus 6 is a bus for connecting the elements in the PLC to the CPU 1 and is an entire address bus, data bus, and control bus. An I / O (Input / Output) 7 is an input / output device for connecting a PLC and an external control target (such as a sensor). A communication interface (communication I / F) 8 is an interface for connecting PLC and LCS via a communication line. The trace CPU 9 is connected to the CPU 1 and various memories via the microcomputer bus 6 and assists the autonomous operation of the PLC while monitoring signals on the microcomputer bus 6.

図4は、PLC51〜5Nのデータメモリ5のアドレスと記憶内容との関係の一例を示す図である。アドレス(D0000)にはヘルシーカウンタの値、アドレス(D0001)〜(D00110)にはデジタル信号の値、アドレス(D0011)〜(D0100)にはアナログ信号の値、アドレス(D0101)〜(D0200)には積算値信号の値が、それぞれ記憶される。   FIG. 4 is a diagram showing an example of the relationship between the addresses of the data memories 5 of the PLCs 51 to 5N and the stored contents. Address (D0000) is a healthy counter value, addresses (D0001) to (D00110) are digital signal values, addresses (D0011) to (D0100) are analog signal values, and addresses (D0101) to (D0200) Each stores the value of the integrated value signal.

既存のプロトコルにおいては、例えばアドレス(D0201)以降の領域が空き領域として設定されている。実施形態においてはこの領域の特定のアドレス(例えば(D1000)以降)に、特有の情報を記憶させる。   In the existing protocol, for example, the area after the address (D0201) is set as a free area. In the embodiment, the specific information is stored in a specific address (for example, (D1000) or later) in this area.

図5は、LCS2mとPLC51〜5Nとの間で授受されるデータのフォーマットの一例を示す図である。LCS2mからPLC51〜5Nに発行される要求信号のフォーマットは、ヘッダ(A)に続くPLC番号(03)、コマンド種別、読み出しアドレス、カンマ(,)、要求信号数、&記号およびチェックサムがこの順に配列される。図5においてはデータ読み出しコマンドとして(DR)が指定されている。図5に示される要求信号は、読み出しアドレス(D0041)から30個(ワード)分のデータを要求するコマンドである。
この要求信号に応じて、(03)として指定されたPLCから返送される応答信号は、ヘッダ(A)に続くPLC番号(03)、コマンド種別、要求個数分の返信データ1、要求個数分の返信データ2、&記号およびチェックサムがこの順に配列される。
FIG. 5 is a diagram illustrating an example of a format of data exchanged between the LCS 2m and the PLCs 51 to 5N. The format of the request signal issued from the LCS 2m to the PLCs 51 to 5N is as follows: the PLC number (03) following the header (A), the command type, the read address, the comma (,), the number of request signals, the & symbol, and the checksum. Arranged. In FIG. 5, (DR) is designated as the data read command. The request signal shown in FIG. 5 is a command for requesting 30 (word) data from the read address (D0041).
In response to this request signal, the response signal returned from the PLC designated as (03) includes the PLC number (03) following the header (A), the command type, reply data 1 for the requested number, and the requested number. Reply data 2, & symbol and checksum are arranged in this order.

なお図5においては、複数のメモリ領域におけるデータを1個の要求信号で取得可能な例が示される。図5に示される要求信号における(読み出しアドレス1)との記載は、(読み出しアドレス2)、(読み出しアドレス3)、…をも指定可能であることを示唆する。つまり要求信号に、取得すべきデータの先頭アドレスを複数、記述することが可能である。
図5に示される応答信号においては、返信データ1、返信データ2との記載により、異なる2つのメモリ領域から読み出されたデータが一つの応答メッセージに含まれることが示される。
FIG. 5 shows an example in which data in a plurality of memory areas can be acquired with one request signal. The description of (read address 1) in the request signal shown in FIG. 5 suggests that (read address 2), (read address 3),... Can also be specified. That is, it is possible to describe a plurality of start addresses of data to be acquired in the request signal.
In the response signal shown in FIG. 5, the description of reply data 1 and reply data 2 indicates that data read from two different memory areas is included in one response message.

図4および図5に示されるメッセージフォーマットには信号を区別するためのシーケンス番号(通し番号など)が実装されていないので、要求信号発行後のタイムアウトなどによりデータの授受が正しく完結しないケースが生じる。またネットワークの問題(輻そう、あるいはPLCによる再送処理など)により応答信号がコピーされて複数個届いてしまった場合にも、要求信号と応答信号との対応が破綻して、LCSは誤ったデータを取り込んでしまう。以下ではこの種の不具合を、既存のプロトコルを改変することなく解決可能な技術を開示する。   Since the message format shown in FIG. 4 and FIG. 5 does not include a sequence number (serial number or the like) for distinguishing signals, there is a case where data transfer is not completed correctly due to a timeout after issuing a request signal. In addition, when a plurality of response signals are copied and arrived due to network problems (such as congestion or re-transmission processing by PLC), the correspondence between the request signal and the response signal breaks down, and the LCS contains incorrect data. Will be taken in. In the following, a technique capable of solving this type of problem without modifying an existing protocol is disclosed.

[第1の実施形態]
図6は、実施形態におけるLCS2mの一例を示す機能ブロック図である。LCS2mは、通信インタフェース30、記憶部31、および制御部32を備える。通信インタフェース30はPLC51〜5N、およびLANとの通信インタフェース機能を担う。制御部32は、記憶部31に記憶されるプログラムに基づいてLCS2mの各種の処理機能を実現する。
[First Embodiment]
FIG. 6 is a functional block diagram illustrating an example of the LCS 2m in the embodiment. The LCS 2m includes a communication interface 30, a storage unit 31, and a control unit 32. The communication interface 30 has a communication interface function with the PLCs 51 to 5N and the LAN. The control unit 32 realizes various processing functions of the LCS 2m based on a program stored in the storage unit 31.

制御部32は、実施形態に係る処理機能として書き込み部32a、生成部32b、および判定部32cを備える。このうち書き込み部32aは、PLC51〜5Nに備わるデータメモリ5の既定の記憶領域に、返信コードを書き込む。   The control unit 32 includes a writing unit 32a, a generation unit 32b, and a determination unit 32c as processing functions according to the embodiment. Of these, the writing unit 32a writes the reply code in a predetermined storage area of the data memory 5 provided in the PLCs 51 to 5N.

図7は、第1の実施形態における、PLC51〜5Nのデータメモリ5のアドレスと記憶内容との関係の一例を示す図である。図7において、アドレス(D0000)〜(D0200)までは図4と同様の内容が記憶されるが、空き領域であるアドレス(D0201)のうちアドレス(D1000)以降に、各種の返信コードが書き込まれる。これらの複数の返信コードは、LCS2mが起動したとき、あるいはPLC51〜5Nの異常からの復帰をLCS2mが検出した際に、LCS2mにより書き込まれる。   FIG. 7 is a diagram illustrating an example of the relationship between the address of the data memory 5 of the PLCs 51 to 5N and the stored contents in the first embodiment. In FIG. 7, the same contents as in FIG. 4 are stored from address (D0000) to (D0200), but various reply codes are written after address (D1000) in address (D0201) which is an empty area. . The plurality of reply codes are written by the LCS 2m when the LCS 2m is activated or when the LCS 2m detects a return from the abnormality of the PLCs 51 to 5N.

返信コードは要求コマンドごとに定義されるデータであり、一意に特定可能なユニークな値とする。図7では、各要求コマンドの先頭アドレスを記載することで返信コードを区別できるようにしている。例えばPLCのヘルシーカウンタの値を要求するコマンドに対しては、ヘルシーカウンタの値が記憶されるアドレス(0000)を、返信コードとして用いるようにする。   The reply code is data defined for each request command, and is a unique value that can be uniquely identified. In FIG. 7, the reply code can be distinguished by describing the head address of each request command. For example, for a command requesting the value of a PLC healthy counter, the address (0000) where the value of the healthy counter is stored is used as a reply code.

特に、1回の応答で限られたワード数(例えば31ワード)までのデータしか授受できないプロトコルではデータを複数回に分割して授受する必要がある。このようなプロトコルに対応可能なように、図7に示されるように、データごとに分割した数の分の返信コードを用意し記憶させるようにする。例えばアナログ信号は3回に分割して授受できるように、1回目、2回目、3回目の分割データごとにそれぞれ(0011)、(0041)、(0071)の返信コードが記憶される。これらの返信コードはすなわち、各データの先頭アドレスである。積算値信号についても同様に、4回に分割して授受できるようになっている。   In particular, in a protocol that can exchange data up to a limited number of words (for example, 31 words) in one response, it is necessary to divide the data into a plurality of times and exchange it. In order to support such a protocol, as shown in FIG. 7, a number of reply codes corresponding to the number divided for each data are prepared and stored. For example, the return codes (0011), (0041), and (0071) are stored for each of the first, second, and third divided data so that the analog signal can be transferred in three times. These reply codes are the top addresses of the respective data. Similarly, the integrated value signal can be transmitted and received divided into four times.

図6に戻り、生成部32bは、データメモリ5から所望のデータを読み出すための要求信号を生成する。この要求信号には、取得すべきデータを示す情報と、返信コードを示す情報とが記載される。このうち、取得すべきデータを示す情報は例えば図5に示されるように、当該データの読み出しアドレスとそのワード数である。返信コードを示す情報は、返信コードのアドレスとそのワード数である。   Returning to FIG. 6, the generation unit 32 b generates a request signal for reading desired data from the data memory 5. The request signal includes information indicating data to be acquired and information indicating a return code. Among these, the information indicating the data to be acquired is, for example, the read address of the data and the number of words as shown in FIG. The information indicating the reply code is the reply code address and the number of words.

判定部32cは、生成部32bにより生成されPLC宛に発行された要求信号と、この要求信号に対してPLCから返信された応答信号との対応を判定する。具体的には、判定部32cは、発行された要求信号により要求された返信コードが、返送された応答信号に含まれるか否かに基づいて、要求信号と応答信号との対応を判定する。   The determination unit 32c determines the correspondence between the request signal generated by the generation unit 32b and issued to the PLC, and the response signal returned from the PLC in response to the request signal. Specifically, the determination unit 32c determines the correspondence between the request signal and the response signal based on whether or not the reply code requested by the issued request signal is included in the returned response signal.

図8は、第1の実施形態における、LCS2mとPLC51〜5Nとの間で授受されるデータのフォーマットの一例を示す図である。図5のフォーマットと異なる点は、データ読み出しコマンド(DR)に続けて、返信コードを要求する情報が記載されている点である。   FIG. 8 is a diagram illustrating an example of a format of data exchanged between the LCS 2m and the PLCs 51 to 5N in the first embodiment. The difference from the format of FIG. 5 is that information requesting a return code is described following the data read command (DR).

図8に示される要求信号において、コマンドDRに続けて、アナログ信号の2回目の返信コードのアドレス(D1003)と、カンマ(,)を挟んで返信コードのワード数01とが記載されている。この情報により、アドレス(D1003)に記載される1ワードの情報、つまり返信コード(0041)が要求されることになる。   In the request signal shown in FIG. 8, following the command DR, the address (D1003) of the second reply code of the analog signal and the word number 01 of the reply code with a comma (,) are described. With this information, one word of information described in the address (D1003), that is, a reply code (0041) is requested.

この要求信号を受けたPLCは、応答信号に(0041)を記載して(返信データ1)LCS2mに返信することとなる。この返信コードの対応関係を検証することにより、LCS2mは、発行した要求信号と受信した応答信号との対応関係を判定することが可能になる。   Upon receiving this request signal, the PLC writes (0041) in the response signal (reply data 1) and returns it to the LCS 2m. By verifying the correspondence between the return codes, the LCS 2m can determine the correspondence between the issued request signal and the received response signal.

以上説明したように第1の実施形態では、マスタユニットがスレーブユニットに複数回のデータ読み出しを行う場合、目的の範囲のデータのアドレスと、それに対応する返信コードが格納されたアドレスとを指定して読み出しコマンドを発行する。そしてマスタユニットは、返信コードに基づいて、受信した応答が目的の範囲のデータであることを判別する。   As described above, in the first embodiment, when the master unit reads data to the slave unit a plurality of times, the address of the data in the target range and the address where the corresponding return code is stored are specified. Issue a read command. Then, the master unit determines that the received response is data in the target range based on the reply code.

すなわちLCS2mは、データの取得を要求する要求信号に、目的のデータが記憶される領域のアドレスに加えて、対応する返信コードのアドレスを指定する。要求信号を受けたPLCは、要求されたアドレスのデータ(返信コード、および目的のデータ)を含む応答信号を返信する。   That is, the LCS 2m specifies the address of the corresponding reply code in addition to the address of the area where the target data is stored in the request signal for requesting data acquisition. The PLC that has received the request signal returns a response signal including data (return code and target data) of the requested address.

LCS2mは応答信号を受信すると、応答信号の1ワード目(返信コード)と、目的のデータに対応する返信コードとを比較し、両者が同じであればその応答信号を受け入れる。同じでなければ、その応答信号は要求に対応する応答ではないと判断し、応答信号を破棄して次の応答信号の到来を待つ。   When the LCS 2m receives the response signal, the LCS 2m compares the first word (response code) of the response signal with the response code corresponding to the target data, and accepts the response signal if both are the same. If they are not the same, it is determined that the response signal is not a response corresponding to the request, the response signal is discarded, and the next response signal is awaited.

以上の手順において、要求信号および応答信号のフォーマットは、既存のプロトコルと何ら変わるところが無い。すなわち第1の実施形態によれば、既存のプロトコルを変更することなく、要求信号と応答信号とを対応付けるための情報を、LCSとPLCとの間で授受することが可能になる。従って、既存のプロトコルを改変することなく信頼性を高めたデータ通信システムとそのマスタユニットおよびデータ通信方法を提供することが可能となる。   In the above procedure, the format of the request signal and the response signal is not different from the existing protocol. That is, according to the first embodiment, information for associating a request signal with a response signal can be exchanged between the LCS and the PLC without changing the existing protocol. Therefore, it is possible to provide a data communication system, a master unit thereof, and a data communication method with improved reliability without modifying existing protocols.

[第2の実施形態]
図9は、第2の実施形態における、PLC51〜5Nのデータメモリ5のアドレスと記憶内容との関係の一例を示す図である。図9においては、それぞれのデータ領域と、当該データ領域に対応する返信コードとを連続して配置するようにしている。つまり、返信コードと目的データとが単一のメモリ範囲のデータとして配置される。このようなデータ配置によれば、一つのデータ要求コマンド(要求信号)により、返信コードと目的データとの双方を要求することができる。
[Second Embodiment]
FIG. 9 is a diagram illustrating an example of the relationship between the address of the data memory 5 of the PLCs 51 to 5N and the stored contents in the second embodiment. In FIG. 9, each data area and a reply code corresponding to the data area are arranged successively. That is, the reply code and the target data are arranged as data in a single memory range. According to such data arrangement, it is possible to request both the return code and the target data by one data request command (request signal).

図10は、第2の実施形態における、LCS2mとPLC51〜5Nとの間で授受されるデータのフォーマットの一例を示す図である。要求信号は、返信コードの記憶されるアドレスと、返信コードおよび目的データとを合わせたワード数(31)とを含む。これを受けたPLCは、返信コードを返信データ列の先頭に含み、残り30ワードで目的データを含む応答信号を返信する。   FIG. 10 is a diagram illustrating an example of a format of data exchanged between the LCS 2m and the PLCs 51 to 5N in the second embodiment. The request signal includes the address where the reply code is stored and the number of words (31) that is the sum of the reply code and the target data. Upon receiving this, the PLC returns a response signal including the reply code at the head of the reply data string and the remaining 30 words including the target data.

第1の実施形態では、図8のフォーマットに示されるように、一つの要求信号で複数の記憶領域におけるデータを要求することが可能であった。しかし、一つの要求信号で単一の記憶領域におけるデータしか要求できないプロトコルも存在する。第2の実施形態によればこのようなプロトコルにも対応することが可能になる。   In the first embodiment, as shown in the format of FIG. 8, it is possible to request data in a plurality of storage areas with one request signal. However, there is a protocol that can request only data in a single storage area with one request signal. According to the second embodiment, it is possible to cope with such a protocol.

本発明のいくつかの実施形態を説明したが、これらの実施形態は例として提示するものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

11〜1n…ヒューマンインタフェースステーション(HIS)、200…グローバルコントロールサーバ(GCS)、21〜2m…ローカルコントロールサーバ(LCS)、100…LAN、40…プロトコル変換器、1…主CPU、2…プログラムメモリ、3…ワークメモリ、4…シーケンスプログラムメモリ、5…データメモリ、6…マイコンバス、7…I/O、8…通信インタフェース、9…トレースCPU、30…通信インタフェース、31…記憶部、32…制御部、32a…書き込み部、32b…生成部、32c…判定部   DESCRIPTION OF SYMBOLS 11-1n ... Human interface station (HIS), 200 ... Global control server (GCS), 21-2m ... Local control server (LCS), 100 ... LAN, 40 ... Protocol converter, 1 ... Main CPU, 2 ... Program memory 3 ... work memory, 4 ... sequence program memory, 5 ... data memory, 6 ... microcomputer bus, 7 ... I / O, 8 ... communication interface, 9 ... trace CPU, 30 ... communication interface, 31 ... storage unit, 32 ... Control unit, 32a ... writing unit, 32b ... generating unit, 32c ... determining unit

Claims (9)

データを要求するための要求信号を発行するマスタユニットと、
前記要求信号に応じた応答信号を前記マスタユニットに返信するスレーブユニットとを具備し、
前記マスタユニットは、
前記データを示す情報と、前記スレーブユニットに予め記憶される返信コードを示す情報とを含む前記要求信号を生成する生成部と、
前記要求信号と前記応答信号との対応を判定する判定部とを備え、
前記スレーブユニットは、前記要求信号に示されるデータおよび返信コードを含む応答信号を返信し、
前記判定部は、前記要求信号により要求された返信コードが前記応答信号に含まれるか否かに基づいて、前記要求信号と前記応答信号との対応を判定する、データ通信システム。
A master unit that issues a request signal for requesting data;
A slave unit that returns a response signal corresponding to the request signal to the master unit;
The master unit is
A generating unit that generates the request signal including information indicating the data and information indicating a reply code stored in advance in the slave unit;
A determination unit for determining correspondence between the request signal and the response signal;
The slave unit returns a response signal including data and a reply code indicated in the request signal,
The data communication system, wherein the determination unit determines a correspondence between the request signal and the response signal based on whether or not a reply code requested by the request signal is included in the response signal.
前記スレーブユニットは、記憶領域に前記データを記憶するメモリを備え、
前記マスタユニットは、前記メモリの既定の記憶領域に前記返信コードを書き込む書き込み部を備える、請求項1に記載のデータ通信システム。
The slave unit includes a memory for storing the data in a storage area,
The data communication system according to claim 1, wherein the master unit includes a writing unit that writes the return code in a predetermined storage area of the memory.
前記返信コードを示す情報は、前記メモリに記憶される当該返信コードのアドレスおよびワード数である、請求項2に記載のデータ通信システム。   The data communication system according to claim 2, wherein the information indicating the reply code is an address and the number of words of the reply code stored in the memory. データを要求するための要求信号をスレーブユニットに発行するマスタユニットにおいて、
前記データを示す情報と、前記スレーブユニットに予め記憶される返信コードを示す情報とを含む前記要求信号を生成する生成部と、
前記要求信号と、当該要求信号に応じて前記スレーブユニットから返信される応答信号との対応を、前記要求信号により要求された返信コードが前記応答信号に含まれるか否かに基づいて判定する判定部とを備える、マスタユニット。
In the master unit that issues a request signal for requesting data to the slave unit,
A generating unit that generates the request signal including information indicating the data and information indicating a reply code stored in advance in the slave unit;
Determination that determines the correspondence between the request signal and a response signal returned from the slave unit in response to the request signal based on whether the response signal includes a response code requested by the request signal And a master unit.
さらに、前記スレーブユニットに備わるメモリの既定の記憶領域に前記返信コードを書き込む書き込み部を備える、請求項4に記載のマスタユニット。   The master unit according to claim 4, further comprising a writing unit that writes the return code in a predetermined storage area of a memory provided in the slave unit. 前記返信コードを要求する情報は、前記メモリに記憶される前記返信コードのアドレスおよびワード数である、請求項5に記載のマスタユニット。   The master unit according to claim 5, wherein the information requesting the reply code is an address and the number of words of the reply code stored in the memory. データを要求するための要求信号を発行するマスタユニットと、前記要求信号に応じた応答信号を前記マスタユニットに返信するスレーブユニットとの間のデータ通信方法において、
前記マスタユニットが、前記データを示す情報と、前記スレーブユニットに予め記憶される返信コードを示す情報とを含む前記要求信号を生成し、
前記スレーブユニットが、前記要求信号に示されるデータおよび返信コードを含む応答信号を返信し、
前記マスタユニットが、前記要求信号により要求された返信コードが前記応答信号に含まれるか否かに基づいて前記要求信号と前記応答信号との対応を判定する、データ通信方法。
In a data communication method between a master unit that issues a request signal for requesting data and a slave unit that returns a response signal corresponding to the request signal to the master unit,
The master unit generates the request signal including information indicating the data and information indicating a reply code stored in advance in the slave unit;
The slave unit returns a response signal including data and a reply code indicated in the request signal,
A data communication method, wherein the master unit determines correspondence between the request signal and the response signal based on whether or not a reply code requested by the request signal is included in the response signal.
さらに、前記マスタユニットが、前記スレーブユニットに備わるメモリの既定の記憶領域に前記返信コードを書き込む、請求項7に記載のデータ通信方法。   The data communication method according to claim 7, wherein the master unit writes the reply code in a predetermined storage area of a memory provided in the slave unit. 前記返信コードを示す情報は、前記メモリに記憶される当該返信コードのアドレスおよびワード数である、請求項8に記載のデータ通信方法。   The data communication method according to claim 8, wherein the information indicating the reply code is an address and the number of words of the reply code stored in the memory.
JP2013046781A 2013-03-08 2013-03-08 Data communication system and its master unit and data communication method Active JP6009977B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013046781A JP6009977B2 (en) 2013-03-08 2013-03-08 Data communication system and its master unit and data communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013046781A JP6009977B2 (en) 2013-03-08 2013-03-08 Data communication system and its master unit and data communication method

Publications (2)

Publication Number Publication Date
JP2014174734A true JP2014174734A (en) 2014-09-22
JP6009977B2 JP6009977B2 (en) 2016-10-19

Family

ID=51695903

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013046781A Active JP6009977B2 (en) 2013-03-08 2013-03-08 Data communication system and its master unit and data communication method

Country Status (1)

Country Link
JP (1) JP6009977B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017220053A (en) * 2016-06-08 2017-12-14 株式会社椿本チエイン Data collection system, data collection method, plc data transmission device, data collection device, plc data transmission program, and data collection program

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101757387B1 (en) * 2014-11-17 2017-07-13 (주)아모레퍼시픽 Cosmetic container for two liquid having discharging pipe each having different size
CN111158277B (en) * 2019-12-24 2020-12-18 重庆特斯联智慧科技股份有限公司 Building sensing Internet of things system based on edge computing cluster and method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58130640A (en) * 1982-01-29 1983-08-04 Fujitsu Ltd Checking system of answer telegram
JPH04326835A (en) * 1991-04-26 1992-11-16 Pioneer Electron Corp On-vehicle data communication system
JPH05336082A (en) * 1992-06-03 1993-12-17 Fuji Electric Co Ltd Detection of response data validity
JPH0872672A (en) * 1994-09-07 1996-03-19 Omron Corp Electronic key device and vehicle anti-theft system using it
JP2000165424A (en) * 1998-11-27 2000-06-16 Mitsubishi Electric Corp Loop type data transmitting device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58130640A (en) * 1982-01-29 1983-08-04 Fujitsu Ltd Checking system of answer telegram
JPH04326835A (en) * 1991-04-26 1992-11-16 Pioneer Electron Corp On-vehicle data communication system
JPH05336082A (en) * 1992-06-03 1993-12-17 Fuji Electric Co Ltd Detection of response data validity
JPH0872672A (en) * 1994-09-07 1996-03-19 Omron Corp Electronic key device and vehicle anti-theft system using it
JP2000165424A (en) * 1998-11-27 2000-06-16 Mitsubishi Electric Corp Loop type data transmitting device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017220053A (en) * 2016-06-08 2017-12-14 株式会社椿本チエイン Data collection system, data collection method, plc data transmission device, data collection device, plc data transmission program, and data collection program

Also Published As

Publication number Publication date
JP6009977B2 (en) 2016-10-19

Similar Documents

Publication Publication Date Title
US10798554B2 (en) System, method and apparatus for building operations management
CN107977299B (en) Method and system for baseboard management controller arrangement using configurable and fault tolerant
US10805399B2 (en) Data server unit and communication system including master-slave management circuitry
US20160246294A1 (en) System for Flexible Operation of an Automated Plant
US8745281B2 (en) Automatic foundation fieldbus device commissioning
CN106165350B (en) Design assistant device, design aiding method and computer readable storage medium
US20180234294A1 (en) System and method for configuring iot devices
CN107924171B (en) Slave device, control method for slave device, and recording medium
CN102419578A (en) Methods and apparatus to display process control device information
JP6009977B2 (en) Data communication system and its master unit and data communication method
US9170579B1 (en) System, method and computer program product for monitoring and controlling industrial energy equipment
EP3594768B1 (en) Management device, relay device, field wireless system, setting method, program, and recording medium
CN103533099A (en) Variable-frequency drive and address mapping method thereof under MODBUS communication protocol
JP6157523B2 (en) Data collection device, relay device, and data collection system
US8880197B2 (en) Flexibly configurable, data transmission object
JP6408277B2 (en) Data collection device and industrial network system
CN107430391B (en) management system
CN103744365A (en) Bridging module for communication between room control terminal and upper computer and method thereof
CN102289226A (en) Field communication system
KR101312035B1 (en) System for supervisory control
US8751704B2 (en) Method for operating a fieldbus interface
JP4873220B2 (en) Field communication system
TW201524152A (en) Data integration apparatus for use in sensor network
Johnston et al. Applied Internet of Things
Faridah et al. Optimisation of the data point configurations in a building environmental monitoring system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150303

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160223

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160422

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: 20160816

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160915

R151 Written notification of patent or utility model registration

Ref document number: 6009977

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151