JP2010152558A - Programmable controller and method of creating electronic message - Google Patents
Programmable controller and method of creating electronic message Download PDFInfo
- Publication number
- JP2010152558A JP2010152558A JP2008328747A JP2008328747A JP2010152558A JP 2010152558 A JP2010152558 A JP 2010152558A JP 2008328747 A JP2008328747 A JP 2008328747A JP 2008328747 A JP2008328747 A JP 2008328747A JP 2010152558 A JP2010152558 A JP 2010152558A
- Authority
- JP
- Japan
- Prior art keywords
- message
- data
- communication device
- programmable controller
- transmitted
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、プログラマブルコントローラによるノードに送信するデータすなわち電文の作成方法に関する。 The present invention relates to a method for creating data to be transmitted to a node by a programmable controller, that is, a telegram.
シーケンス制御などの各種制御システムにおいて、プログラマブルコントローラ(以下、PLCという)が広範に用いられている。このようなPLCは例えば上位の通信機器などとデータのやり取りを行って制御動作を実行する。 In various control systems such as sequence control, programmable controllers (hereinafter referred to as PLCs) are widely used. Such a PLC performs control operations by exchanging data with, for example, a host communication device.
従来、通信機器(以下では、ノードということもある)に送信するデータ(電文)をPLCで作成している。
一例として、あるノードに対して、図6に示すように、送信先ノード情報として、ノード番号101(ここでは“3”)を第1の固定部格納テーブル102から取得し、作成する電文100の先頭行に転送(コピー)して、固定部作成(1)を行なう。続けて、図7に示すように、送信先ノードコマンド情報として、コマンド番号103(ここでは“2”)を第2の固定部格納テーブル104から取得し、作成する電文100の2行目に転送(コピー)して、固定部作成をさらに行なう。
Conventionally, data (telegram) to be transmitted to a communication device (hereinafter sometimes referred to as a node) is created by the PLC.
As an example, for a certain node, as shown in FIG. 6, the node number 101 (in this case, “3”) is acquired from the first fixed part storage table 102 as the destination node information, and the
また、図8に示すように、データ領域種別(入出力メモリ、非保持メモリ、保持メモリなど)の値(すなわち、メモリ種別を表す識別子)、相対アドレスの値、データサイズの値から構成されるパケットデータ108により、送信先ノードのユーザデータの場所が設定された定義情報テーブル106をランダムに検索して、(2)でユーザデータを取得し、それらを、作成する電文100の3行目以降に転送(コピー)して、(3)でユーザデータ部を作成し、(4)で電文100を該当するノードに送信している。
Further, as shown in FIG. 8, the data area type (input / output memory, non-holding memory, holding memory, etc.) value (that is, an identifier indicating the memory type), a relative address value, and a data size value are included. The definition information table 106 in which the location of the user data of the transmission destination node is set is randomly searched based on the
なお、PLCが電文を作成するに際して、ユーザデータを収集する処理を容易にするために、図8に示したようなフォーマットを有する定義情報テーブル106が一般的に使用されている。 Note that the definition information table 106 having a format as shown in FIG. 8 is generally used to facilitate the process of collecting user data when the PLC creates a message.
しかし、図6〜図8に示した電文作成処理はPLCのファームウェアにより従来実行されている。そして、ノード毎に、作成する電文のフォーマット自体も異なるために、例えば、どのノードに対しても図6〜図8に示した手順で電文を作成することができる訳でもない。その結果、例えば、PLCに、既存のノードのいずれとも異なる電文フォーマットを有するノードが新規に接続された場合、その新規接続したノードに対する処理をファームウェアに追加しなければならないため、ファームウェアを更新する必要がある。 However, the message creation processing shown in FIGS. 6 to 8 is conventionally executed by the PLC firmware. Since the format of the message to be created is different for each node, for example, it is not possible to create a message for any node by the procedure shown in FIGS. As a result, for example, when a node having a message format different from any of the existing nodes is newly connected to the PLC, the processing for the newly connected node must be added to the firmware, so the firmware needs to be updated. There is.
しかし、PLCは制御盤の奥や遠隔地に設置されていることが多く、ファームウェアの更新作業が困難なものとなっている。
なお、周辺技術として、特許文献1には、複数のアプリケーション間のデータ転送を仲介するアプリケーション仲介部を有するシステムが示されている。
As a peripheral technique,
本発明は、以上の問題点を考慮してなされたものであり、PLCのファームウェアを更新することなく、管理対象として接続されたノード毎に電文を作成・送信できるプログラマブルコントローラおよび電文作成方法を提供することを目的とする。 The present invention has been made in consideration of the above problems, and provides a programmable controller and a message generation method capable of generating and transmitting a message for each node connected as a management target without updating the PLC firmware. The purpose is to do.
提案するプログラマブルコントローラは、通信機器と第1のネットワークを介して接続されるとともに、定義設定ローダとは第2のネットワークを介して接続されたプログラマブルコントローラであり、前記通信機器に前記プログラマブルコントローラが送信するデ
ータである電文を作成するのに使用するデータを前記定義設定ローダから前記第2のネットワークを通して前記プログラマブルコントローラが受信して、前記電文を作成するのに使用するデータを用いて前記通信機器に送信する電文を作成して、前記第1のネットワークを通して前記作成した電文を前記通信機器に送信するものである。
The proposed programmable controller is connected to a communication device via a first network, and the definition setting loader is a programmable controller connected via a second network, and the programmable controller transmits the communication device to the communication device. The programmable controller receives data used to create a telegram that is data to be transmitted from the definition setting loader through the second network, and uses the data used to create the telegram to the communication device. A message to be transmitted is created, and the created message is sent to the communication device through the first network.
提案するプログラマブルコントローラによれば、定義設定ローダから電文を作成するのに使用するデータを受信して、それを例えば先頭から順に解釈して、電文を作成し、該当する通信機器に送信している。このため、ノード毎の電文フォーマットの差分調整部分を、ソフトウェアの更新が一層容易である定義設定ローダ側の処理として実行することにより、制御盤の奥や遠隔地に設置されたプログラマブルコントローラのファームウェアを更新する場合の負担をなくすことができる。 According to the proposed programmable controller, it receives data used to create a message from the definition setting loader, interprets it in order, for example, from the top, creates a message, and sends it to the corresponding communication device. . For this reason, by executing the difference adjustment part of the message format for each node as a process on the definition setting loader side that makes it easier to update the software, the firmware of the programmable controller installed in the back of the control panel or remotely The burden of updating can be eliminated.
以下図面に基づいて、本発明の実施形態について詳細を説明する。
図1は、本発明の一実施形態に係る電文送受信システムの構成を示すブロック図である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a telegram transmission / reception system according to an embodiment of the present invention.
図1に示すように、この電文送受信システムでは、プログラマブルコントローラ(以下、PLCという)20が、複数台(図では3台)の外部通信機器34−1、34−2、34−3と第1のネットワーク(例えば専用ネットワーク)31を介して接続されるとともに、定義設定ローダ30とは第2のネットワーク(例えば汎用ネットワーク)32を介して接続されている。
As shown in FIG. 1, in this telegram transmission / reception system, a programmable controller (hereinafter referred to as PLC) 20 includes a plurality (three in the figure) of external communication devices 34-1, 34-2, and 34-3 and a first one. And the
PLC20は、CPU(Central Processing Unit)モジュール10を有する。このCPUモジュール10は、CPU11、ドライバ/レシーバ13、PLC固有バスインターフェース14、システムプログラムメモリ(FLASH)15、システムワークメモリ(RAM(Random Access Memory))16、ユーザプログラムメモリ(RAM)17、ユーザデータメモリ(RAM)18、を有し、それらがバス19により接続されている。また、CPUモジュール10は、PLC固有バスインターフェース14を通して通信モジュール23と接続される。
The
図2は、本実施形態のパケット生成部の構成を示すブロック図である。
図2に示すように、パケット生成部40は、ヘッダ部転送部41、コマンド部転送部42、パケットデータ構築部43、により構成される。
FIG. 2 is a block diagram illustrating a configuration of the packet generation unit of the present embodiment.
As shown in FIG. 2, the
ヘッダ部転送部41およびコマンド部転送部42は、ノードへの電文を作成する際に使用する定義情報を参照して、通信を行なうノードに対する電文内の固定データ部を作成する処理を行なう。パケットデータ構築部43は、ノードへの電文を作成する際に使用する定義情報を参照して、ユーザデータを図1のユーザデータメモリ18内から収集し、ノードに送信する電文内に設定する処理を行なう。なお、ユーザデータとは例えば、ノードに設定される動作パラメータである。また、定義情報は、本実施形態では、定義設定ローダ30により作成され、PLC20に送信されるものとする。
The header
なお、本実施形態では、図2の各部はソフトウェアにより実現される。このソフトウェアは、図1のシステムプログラムメモリ15に格納され、そのシステムプログラムメモリ15からシステムワークメモリ16に読み出されて、CPU11により実行される。
In the present embodiment, each unit in FIG. 2 is realized by software. This software is stored in the
図3は、本実施形態で使用する情報資源を示す図である。
図3において、フォーマットの定義情報51は、上述したように、定義設定ローダ30側で作成された、電文を作成するのに使用する情報である。この定義情報51を先頭から順に読み込んでその指示内容を実行することにより、電文を作成することができる。その意味で、定義情報51はフォーマットの定義情報であるということができる。また、定義情報51は、送信先のノード毎にあるものであり、当然のこととして、送信先のノードを識別する情報を、例えばその先頭位置に持っている。PLC20は、この定義情報51を定義設定ローダ30から受信すると図1のシステムワークメモリ16に格納する。
FIG. 3 is a diagram showing information resources used in the present embodiment.
In FIG. 3, the format definition information 51 is information used to create a telegram created on the
ユーザデータは図1のユーザデータメモリ18内に、例えばメモリ種別毎に複数の(図3では3つの)データ領域52、53、54に分割して格納される。ユーザデータにアクセスするためには、データ領域の種別、そのデータ領域の先頭からの相対アドレス、データ長(データサイズ)を指定する。
The user data is stored in the
図2に示したパケット生成部40による処理が定義情報51を参照して実行され、データ領域から必要なユーザデータの収集が行われて、出力情報資源すなわち、ノードに送信する電文55が作成される。
The processing by the
図4は、電文の作成方法を詳細に示す図である。
図4の左側には、定義情報61が示され、右上には電文62が示され、右下にはユーザデータ64が格納されたデータ領域63が示されている。
FIG. 4 is a diagram showing in detail a method for creating a message.
On the left side of FIG. 4,
定義情報61の先頭行(一番上の位置)にはノード識別情報66が設定されている。ノード識別情報66は、“%”+“シリアル番号”(図4では、%1)という形式を有している。
図4の定義情報61の2番目の行には、コピー指示の識別情報(その値は例えば$1である)68が設定されている。コピー指示が設定された行の次行以降には、通常ヘッダ、フッタ、あるいは、コマンドが設定される。図2のパケット生成部40は、データ形式に応じて、次行以降に設定されたものが、ヘッダ、フッタ、コマンドのいずれであるかを判断し、判断結果に応じて、ヘッダ部転送部41およびコマンド部転送部42のいずれかを起動して、次行以降の該当部分を電文62に前詰め(先頭詰め)でコピー(転送)する。図4の例ではヘッダ71が“A1”として表記されており、ヘッダ部転送部41が起動されて、これが、電文62の先頭行にコピーされている。なお、フッタと判断された場合にも、ヘッダ部転送部41により処理するものとする。
In the second row of the
図4の定義情報61では、ヘッダ71に続いて、パケットデータ73が設定されている。パケットデータ73は、データ領域の識別情報(その値は例えば$2である)75+データ領域種別の値(その値は図では“10”である)76+相対アドレスの識別情報(その値は例えば$3である)77+相対アドレスの値(その値は図では“1000”である)78+データサイズの識別情報(その値は例えば$4である)81+データサイズの値(その値は図では“16”である)82、という形式をしている。
In the
図2のパケット生成部40は、データ領域の識別情報75を検出すると、パケットデータ構築部43に起動指示を出す。パケットデータ構築部43は、データ領域の種別の値76から、そのデータ領域がデータ領域63であることを特定し、相対アドレスの値78およびデータサイズの値82からデータ領域63内のユーザデータ64を収集対象として特定し、そのユーザデータ64(ここでは“5”)を電文62の2行目にコピーしている。
When the
また、図4において、符号84はコピー指示の識別情報、符号85はフッタ、符号86は定義情報61の終わりを示す識別情報である。
図5は、電文作成処理を含む全体処理のフローチャートである。このフローチャートのステップS1、S2、S9は、図2に示したパケット生成部40より上位の処理部(上位のプログラム、不図示)により実行される。この上位の処理部が実行する処理の1つとして、図5のフローチャートが示されているために、図5のフローチャートは破線に始まり、破線に終わっている。また、残りのステップは、図2のパケット生成部40により実行される。なお、ステップS9は、パケット生成部40により実行されてもよい。
In FIG. 4,
FIG. 5 is a flowchart of the entire process including the message creation process. Steps S1, S2, and S9 of this flowchart are executed by a processing unit (upper program, not shown) higher than the
図5において、ステップS1で上位の処理部によりパケットデータすなわち電文の送信要求有無が判別される。この判別処理は例えば、図1のシステムワークメモリ16内に格納された定義情報とは別個の情報であるノード毎の電文送信要求を記憶した情報(すなわち、今、どのノードに電文を送信すべきかを示す情報)を参照することにより実行される。
In FIG. 5, the presence or absence of a request for transmission of packet data, that is, a message, is determined by the upper processing unit in step S1. For example, this determination processing is information storing a message transmission request for each node, which is information different from the definition information stored in the
ステップS1で電文の送信要求が無しであると判別された場合、このフローチャートにおける一連の処理を終了する。
ステップS1で電文の送信要求が有りであると判別された場合、ステップS2で、送信先ノードに対する定義情報が、図1のシステムワークメモリ16から取得され、その取得
した定義情報を用いて、電文を作成する指示により、上位の処理部が図2のパケット生成部40を起動する。なお、通常、いずれか1つのノードに対する送信要求のみが有りとなる。
If it is determined in step S1 that there is no message transmission request, the series of processes in this flowchart is terminated.
If it is determined in step S1 that there is a message transmission request, definition information for the destination node is acquired from the
ステップS2に続くステップS3では、パケット生成部40により、作成部判別処理が実行される。この作成部判別処理は、図4を参照して上述したように、定義情報の現在位置からデータ(行)を読み込み、その行がコピー指示の識別情報68であるか、または、データ領域の識別情報75であるかを判別し、また、その行がコピー指示の識別情報68であった場合、後続のデータ(行)のデータ形式からヘッダ(フッタ)であるか、コマンドであるかを判別することにより行われる。
In step S3 subsequent to step S2, the
ステップS3でデータ領域の識別情報76が読み込まれてパケットデータ構築部43が起動されるものと判別された場合、ステップS5において、パケットデータ部の構築処理、すなわち、データ領域の種別、相対アドレス、データサイズの組により指定されるデータを収集し、それを電文に前詰めで転送(コピー)する処理が実行され、ステップS8に進む。
When it is determined in step S3 that the data
ステップS3でコピー指示の識別情報68が読み込まれて、後続のデータのデータ形式からコマンドであり、コマンド部転送部42が起動されるものと判別された場合、ステップS6でその後続のデータであるコマンドを電文に前詰めで転送(コピー)する処理が実行され、ステップS8に進む。
When the copy
ステップS3でコピー指示の識別情報68が読み込まれて、後続のデータのデータ形式からヘッダまたはフッタであり、ヘッダ部転送部41が起動されるものと判別された場合、ステップS7でその後続のデータであるヘッダまたはフッタを電文に前詰めで転送(コピー)する処理が実行され、ステップS8に進む。
When the copy
ステップS8では、定義情報の次の行を先読みし、それがデータの終わりの識別情報86であるかどうかを判別することで、データ(電文)の生成が終了したかどうかを判別している。
In step S8, the next line of the definition information is prefetched, and it is determined whether or not the generation of data (message) has been completed by determining whether or not it is the
ステップS8でデータ生成が終了したと判別された場合、制御がパケット生成部40から上位の処理部に渡り、ステップS9において、その上位の処理部により、作成された電文が該当するノード宛に送信される。
If it is determined in step S8 that the data generation has been completed, control passes from the
ステップS8でデータ生成が終了していないと判別された場合、ステップS3に戻り、そのステップS8で先読みした次行以降の処理が続行される。
以上説明したように、本実施形態のプログラマブルコントローラによれば、定義設定ローダから電文を作成するのに使用するデータを受信して、それを例えば先頭から順に解釈して、電文を作成し、該当する通信機器(ノード)に送信している。このため、ノード毎の電文フォーマットの差分調整部分を、ソフトウェアの更新が一層容易である定義設定ローダ側の処理として実行することができ、制御盤の奥や遠隔地に設置されたプログラマブルコントローラのファームウェアを更新する場合の負担をなくすことができる。
If it is determined in step S8 that the data generation has not been completed, the process returns to step S3, and the processing after the next line prefetched in step S8 is continued.
As described above, according to the programmable controller of this embodiment, the data used to create a message from the definition setting loader is received, and for example, the message is interpreted in order from the top, and the message is created. Is transmitted to the communication device (node). For this reason, the difference adjustment part of the message format for each node can be executed as a process on the definition setting loader side that makes it easier to update the software. The burden of renewing can be eliminated.
10 CPUモジュール
11 CPU
13 ドライバ/レシーバ
14 PLC固有バスインターフェース
15 システムプログラムメモリ
16 システムワークメモリ
17 ユーザプログラムメモリ
18 ユーザデータメモリ
19 バス
20 プログラマブルコントローラ
23 通信モジュール
30 定義設定ローダ
31 第1のネットワーク
32 第2のネットワーク
34−1、34−2、34−3 外部通信機器(ノード)
40 パケット生成部
41 ヘッダ部転送部
42 コマンド部転送部
43 パケットデータ構築部
51、61 定義情報
52、53、54、63 データ領域
55、62 電文
64 ユーザデータ
66 ノード識別情報
68、84 コピー指示の識別情報
71 ヘッダ
73 パケットデータ
75 データ領域の識別情報
76 データ領域の種別の値
77 相対アドレスの識別情報
78 相対アドレスの値
81 データサイズの識別情報
82 データサイズの値
85 フッタ
86 データの終わりの識別情報
10 CPU module 11 CPU
13 Driver / Receiver 14 PLC
23
40
Claims (5)
前記通信機器のそれぞれに対応して、該各通信機器に送信する電文を作成するのに使用するデータを定義情報として外部から受信する受信部と、
該受信した定義情報を記憶する記憶部と、
該記憶部に記憶されている定義情報を用いて、送信相手の通信機器に送信する電文を作成する電文作成部と、
前記作成した電文を、前記送信相手の通信機器に送信する送信部と、を有することを特徴とするプログラマブルコントローラ。 In a programmable controller that sends messages to external communication devices,
Corresponding to each of the communication devices, a receiving unit for receiving data used to create a message to be transmitted to each communication device as definition information from the outside,
A storage unit for storing the received definition information;
Using the definition information stored in the storage unit, a message creation unit that creates a message to be transmitted to the communication device of the transmission partner;
A programmable controller, comprising: a transmission unit that transmits the created electronic message to the communication device of the transmission partner.
前記電文を作成するのに使用するデータを先頭から順に解釈して、前記通信機器に送信する電文に順次前詰めで埋め込むことにより、前記通信機器に送信する電文を作成することを特徴とする請求項1記載のプログラマブルコントローラ。 The data used to create the message includes at least one of data to be embedded in the message to be created, or identification information of a storage destination of the data to be embedded,
The data to be transmitted to the communication device is created by interpreting data used for creating the message in order from the beginning and sequentially embedding the data in the message to be transmitted to the communication device. Item 12. A programmable controller according to item 1.
前記通信機器に前記プログラマブルコントローラが送信するデータである前記電文を作成するのに使用するデータを前記定義設定ローダから前記第2のネットワークを通して前記プログラマブルコントローラが受信するステップと、
前記電文を作成するのに使用するデータを用いて、前記通信機器に送信する電文を作成するステップと、
前記作成した電文を前記第1のネットワークを通して前記通信機器に送信するステップと、を有することを特徴とする電文作成方法。 In the message creation method executed by the programmable controller connected to the communication device via the first network and the definition setting loader connected via the second network,
Receiving the data from the definition setting loader through the second network, the programmable controller receiving data used to create the telegram, which is data transmitted by the programmable controller to the communication device;
Creating a message to be transmitted to the communication device using data used to create the message;
Transmitting the created electronic message to the communication device through the first network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008328747A JP2010152558A (en) | 2008-12-24 | 2008-12-24 | Programmable controller and method of creating electronic message |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008328747A JP2010152558A (en) | 2008-12-24 | 2008-12-24 | Programmable controller and method of creating electronic message |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010152558A true JP2010152558A (en) | 2010-07-08 |
Family
ID=42571592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008328747A Withdrawn JP2010152558A (en) | 2008-12-24 | 2008-12-24 | Programmable controller and method of creating electronic message |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010152558A (en) |
-
2008
- 2008-12-24 JP JP2008328747A patent/JP2010152558A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2010258990A (en) | Control system and control program updating method | |
JP2010272971A (en) | Control system and method for rewriting control program | |
JP2013123998A (en) | Communication control device for vehicle | |
TWI474180B (en) | System and method for detecting remote serial port apparatus | |
EP3528470B1 (en) | Control device, control system, control method, and control program | |
JP6627571B2 (en) | Programmable controller, programmable controller control method, and programmable controller control program | |
JP2005129026A (en) | Programmable controller, communication unit, controller system, data processing method, variable solution method and data exchange method | |
CN106327143B (en) | Method and apparatus for nodes in a flow | |
CN110888892B (en) | Block synchronization method, device and storage medium | |
CN105491082A (en) | Remote resource access method and switch equipment | |
JP5476956B2 (en) | Communication system and communication method | |
JP2008146541A (en) | Dma transfer system, dma controller and dma transfer method | |
JP2010152558A (en) | Programmable controller and method of creating electronic message | |
CN110278716B (en) | PLC, network unit, CPU unit, and data transfer method | |
CN105785854A (en) | Master-slave system control method and master-slave system | |
CN111464395B (en) | Method and device for creating blockchain and readable storage medium | |
JP2014143647A (en) | Information processing program and image forming apparatus | |
TWI536782B (en) | Methods and devices for connecting to multiple interfaces | |
JP2009104283A (en) | System for transmitting/receiving data by modbus and control equipment such as programmable controller | |
JP2008301159A (en) | Inter-network mediating device | |
CN105591854A (en) | Interaction method, device and system based serial bus | |
KR101810196B1 (en) | Communication module in inverter | |
JP2014197346A (en) | Controller and program | |
KR101531026B1 (en) | Management method for client node list in the network by using fifo memory | |
JP6149416B2 (en) | Service bus device, service bus device control method, message transmission / reception system, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20110422 |
|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20120306 |