JP4186383B2 - Programmable controller system - Google Patents

Programmable controller system Download PDF

Info

Publication number
JP4186383B2
JP4186383B2 JP2000140998A JP2000140998A JP4186383B2 JP 4186383 B2 JP4186383 B2 JP 4186383B2 JP 2000140998 A JP2000140998 A JP 2000140998A JP 2000140998 A JP2000140998 A JP 2000140998A JP 4186383 B2 JP4186383 B2 JP 4186383B2
Authority
JP
Japan
Prior art keywords
program
input
program block
output
controller
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.)
Expired - Lifetime
Application number
JP2000140998A
Other languages
Japanese (ja)
Other versions
JP2001325011A (en
Inventor
俊司 桑
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.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP2000140998A priority Critical patent/JP4186383B2/en
Publication of JP2001325011A publication Critical patent/JP2001325011A/en
Application granted granted Critical
Publication of JP4186383B2 publication Critical patent/JP4186383B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)
  • Multi Processors (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、ネットワーク等の通信手段を介して複数のプログラマブルコントローラと少なくとも1つのサポートツールとを相互に接続したプログラマブルコントローラシステムに係り、特に、アプリケーションプログラムを複数のプログラムブロックに分割して複数のプログラマブルコントローラに分散格納することによりシステムの柔軟性を確立するとともに負荷分散を図ったプログラマブルコントローラシステムに関する。
【0002】
【従来の技術】
昨今のネットワーク技術の発達により、設備や装置を制御するためのプログラマブルコントローラ(以下、コントローラという)においても通信速度を含むコントローラ間の情報伝達能力は飛躍的に向上してきている。
【0003】
また、コントローラの低コスト化、小サイズ化により、複数のコントローラを通信により接続したシステム構成は、高速で大型のコントローラ1台によるシステムと比較しても、コスト面でもスペース効率面でも遜色ないような状況になってきている。
【0004】
この種の制御システムにおいてネットワークを使って複数のコントローラを分散接続すると、以下のようなメリットが生じる。
【0005】
1)ハードウエアの構成上と配置上、システム構築に柔軟性が生じるため、設備や装置等の組み替えが容易である。
【0006】
2)処理が複数のコントローラに負荷分散されるため、個々のコントローラに求められる性能が抑えられ、安価なコントローラを利用できる。
【0007】
3)コントローラの故障の際でも、システムを構成するコントローラが複数に分かれているため、システムダウンする範囲が一部にとどめられ、システム全体の信頼性が向上する。
【0008】
このように設備や装置の構成、或いは、負荷分散や最適なパフォーマンスのために、複数のコントローラによりシステムを構築することが可能になり、これにより、今後、制御システムの分散化傾向は更に強まると予想される。
【0009】
一方、コントローラは半導体メモリのコストダウン、マイコンチップの高性能化に相俟って、1台のコントローラで制御できる入出力点数が飛躍的に増加している傾向にある。また、これに比例してコントローラのプログラム容量も増大している。
【0010】
また、コントローラを組み込むことで設計される各種機械や製造設備自身の高機能化もプログラム容量の増大に拍車をかけている。
【0011】
このような傾向の中で、コントローラには、近年、大容量のプログラムを効率よくまた品質よく設計するために、また、再利用やメンテナンス管理のために、プログラムを分割や階層化したりブロック分割する機能が付け加えられている傾向にある。
【0012】
加えて、コントローラを用いたシステムの開発保守環境面でもブロック分割されたプログラムデータを個別にコントローラにダウンロードやアップロードする機能を持つものも提案されている。
【0013】
ユーザは、この機能を利用して、分割ブロック化したプログラムを1台のコントローラにて制御される装置のうちの個々の装置に割り当てたり、装置内の独立性の高い機能ユニット個々と対応させることで、プログラム設計において装置毎や機能毎の設計を順次または複数の作業者で分担して行うことができ、その結果その生産性を高めている。
【0014】
また、この機能はコントローラ内のプログラム機能分割をより明確なものとすることができるため、1台のコントローラで複数の制御対象を制御しているような場合にも、対象のプログラムをブロック分割した形でプログラミングされている。
【0015】
また、先に述べたネットワークによるシステムの分散化とアプリケーションプログラムの分割を組み合わせることにより、分散方法はより柔軟になり、コントローラという単位ではなく、ネットワークに跨ったプログラムブロック単位での分散が可能となっている。
【0016】
併せて、コントローラに跨って分散したアプリケーションプログラムを、仮想的に1本のプログラムとして扱うための技術も考えられている。
【0017】
【発明が解決しようとする課題】
しかし、コントローラを分散させることはアプリケーションプログラムも分散してしまうため、従来の1台のコントローラを使ったシステムの構築と比較して、以下の弊害が発生している。
【0018】
1)1台のコントローラを使用している際には、単にコントローラ内のメモリへのデータ書き込みと読み出しで済んでいたプログラムブロック間のデータの受け渡しが、コントローラ間でのデータの送受信を介するため、別途そのためのプログラムが必要になり、プログラミング作業の負担が新たに発生する。
【0019】
2)プログラムがコントローラ毎に物理的に分散され、全体的な論理構造が見えづらくなり、設計者や保全者である作業員の作業が難解になる。
【0020】
3)従来ならば1台のコントローラに対して行えばよかったものを、複数のコントローラに対して、また、その中の所定のプログラムブロックに対してそれぞれ行わなければならなくなるため、デバックやメンテナンス作業が複雑になり、作業量が増大する。
【0021】
4)複数のコントローラに分散したプログラムをサポートツールを使って、論理構造的に表示するためには、ノーマルプログラムの全体構造と個々のプログラムがいずれのコントローラに格納されているかを管理するための情報が、プログラムデータ以外に必要となるため、その情報の維持管理作業が作業者側の負担となり、かつ、その情報を解析するための資源をサポートツールに設ける必要が生じる。
【0022】
そこで、この発明は、アプリケーションプログラムを複数に分割して相互に接続された複数のコントローラに分散格納したコントローラシステムを効率よくかつ少ない負担で構築することができるようにすることを目的とする。
【0023】
また、この発明は、アプリケーションプログラムを複数に分割してネットワークを介して相互に接続された複数のコントローラに分散格納したコントローラシステムを効率よくかつ少ない負担で構築することができるようにしたコントローラを提供することを目的とする。
【0024】
また、この発明は、アプリケーションプログラムを複数に分割してネットワークを介して相互に接続された複数のコントローラに分散格納したコントローラシステムの複数のコントローラに跨るアプリケーションプログラムの構造を論理的に容易に認識することができ、設備のデバックやメンテナンス時等の作業効率を大幅に向上させることができるようにしたサポートツールを提供することを目的とする。
【0025】
【課題を解決するための手段】
上述の技術的課題は、以下の構成を有するプログラマブルコントローラが適用されたプログラマブルコントローラシステムにより解決することができると考えられる。
【0026】
すなわち、本発明のプログラマブルコントローラシステムは、複数のプログラマブルコントローラを通信手段を介して相互に接続してなることを特徴とする。
【0027】
前記プログラマブルコントローラのそれぞれには、それぞれユーザの作成するアプリケーションプログラムであるプログラムブロックを1又は2以上に亘り格納可能なユーザプログラムメモリと、入出力装置との間でやり取りされる入出力信号に相当する入出力パラメータを格納するための入出力メモリと、中央演算装置とが含まれている。
【0028】
前記中央演算装置においては、前記ユーザプログラムメモリに格納されたプログラムブロックを順次に読み出して実行するプログラム実行処理を含むプログラムブロック運転処理と、前記入出力装置と入出力メモリとの間で入出力パラメータの更新を行う入出力リフレッシュ処理と、前記通信手段を介して他のプログラマブルコントローラ等との間でコマンドやレスポンスのやり取りを行うためのネットワーク処理とが、サイクリックに実行されるように仕組まれており、前記プログラムブロックのそれぞれは、プログラムブロック識別子と、入出力パラメータ指定データと、プログラムブロック本体とを含んでいる。
【0029】
前記プログラムブロック実行処理は、第1のプログラムブロック実行処理と、第2のプログラムブロック実行手段とからなる。
【0030】
前記第1のプログラムブロック実行処理は、前記ユーザプログラムメモリから読み出されるプログラムブロックが前記プログラムブロック識別子に基づいてノーマルプログラムブロックと識別されときには、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入力パラメータを前記入出力メモリから読み出して一次記憶させると共に、この一次記憶させた入力パラメータを使用して、前記プログラムブロック本体を構成する命令コード列に従った実行処理を行って出力パラメータを生成して一次記憶すると共に、実行処理の終了を待って、一次記憶された出力パラメータを、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入出力メモリ内の出力パラメータを書き替えられる。
【0031】
前記第2のプログラムブロック実行処理は、前記ユーザプログラムメモリから読み出されるプログラムブロックが前記プログラムブロック識別子に基づいて入出力パラメータ送受信プログラムブロックと識別されときには、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入力パラメータを前記入出力メモリから読み出し、これを前記プログラムブロック本体を構成する相手先プログラム位置情報と相手先入出力パラメータ位置情報とを含むデータ送信コマンドとしてネットワーク上に送信する一方、これに対して正常レスポンスが受信されたときには、前記プログラムブロック本体を構成する相手先プログラム位置情報と相手先入出力パラメータ位置情報とを含むデータ受信コマンドをネットワーク上に送信し、そのレスポンスとして受信されるデータを入出力パラメータ指定データで指定される入出力メモリの出力パラメータを書き替えられる。
【0032】
このような構成によれば、ユーザプログラムメモリ中に入出力パラメータ送受信ブロックを含ませることにより、当該プログラマブルコントローラのノーマルプログラムブロックの実行の際に、他のプログラマブルコントローラの入出力メモリから取得した入出力パラメータの値を使用することができる。
【0033】
【発明の実施の形態】
本発明は、いくつかの実施形態として実現することができる。例えば、第1の実施形態としては、プログラマブルコントローラシステムとして実現することができる。
【0034】
このコントローラシステムは、複数のコントローラと少なくとも1つのサポートツールとを通信手段を介して相互に接続し、かつアプリケーションプログラムをいくつかのプログラムブロックに分割してそれら複数のコントローラに分散配置してなるものである。
【0035】
上記コントローラそれぞれには、複数のプログラムブロックに分割されたアプリケーションプログラムのうちのノーマルプログラムブロックを実行するノーマルプログラムブロック実行手段と、上記プログラムブロックに対して入出力パラメータを定義する入出力パラメータ定義手段と、他のコントローラのプログラムブロックに格納されているプログラムに対して上記入出力パラメータの送受信を行う入出力パラメータ送受信プログラムブロックを実行する入出力パラメータ送受信プログラムブロック実行手段と、上記入出力パラメータ送受信プログラムブロックに対して相手先プログラムブロックの位置情報を記憶する相手先プログラムブロック位置情報記憶手段と、プログラムブロックの読み出し要求に際して、該当プログラムブロックがノーマルプログラムブロックである場合は、該ノーマルプログラムブロックのデータを返信し、該当プログラムブロックが入出力パラメータ送受信プログラムブロックである場合は、該入出力パラメータ送受信プログラムブロックから相手先プログラムブロックの位置情報を抽出して返信する送受信制御手段と、が具備される。
【0036】
また、上記サポートツールには、上記コントローラに対してプログラムブロックの読み出し要求を送信するプログラムブロック読出要求送信手段と、上記プログラムブロック読出要求送信手段によるプログラムブロックの読み出し要求に対して上記コントローラから返信された内容について、ノーマルプログラムブロックのデータか入出力パラメータ送受信ブロックの相手先プログラムブロックの位置情報かを判別する判別手段と、上記判別手段によりノーマルプログラムブロックのデータであると判別された場合は、該ノーマルプログラムブロックのデータをそのまま表示し、入出力パラメータ送受信ブロックの相手先プログラムブロックの位置情報であると判別された場合は、その位置情報に基づき相手先プログラムブロックを読み出し、それを表示する表示制御手段と、が具備される。
【0037】
ここで、通信手段は、LAN(ローカルエリアネットワーク)等を含む。また、ノーマルプログラムブロックは、例えば、この発明のコントローラシステムが実行するアプリケーションプログラムを複数に分割した各プログラムブロックを示す。
【0038】
上述のコントローラシステムにおいては、アプリケーションプログラムを複数のプログラムブロックに分割し、該分割したプログラムブロックを複数のコントローラに分散格納することで負荷分散を図るとともに、コントローラシステムを少ない負担でかつ効率よく構築することができるように構成されている。
【0039】
また、上述のコントローラシステムにおいては、上記プログラムブロックに対して入出力パラメータを定義する入出力パラメータ定義手段を設け、他のコントローラのプログラムブロックに格納されているプログラムに対して上記入出力パラメータの送受信を行う入出力パラメータ送受信プログラムブロックを実行する入出力パラメータ送受信プログラムブロック実行手段を設ける。
【0040】
そして、上記入出力パラメータ送受信プログラムブロックに対して相手先プログラムブロックの位置情報を記憶する相手先プログラムブロック位置情報記憶手段を設け、上記サポートツールからのプログラムブロックの読み出し要求に際して、該当プログラムブロックがノーマルプログラムブロックである場合は、該ノーマルプログラムブロックのデータを返信し、該当プログラムブロックが入出力パラメータ送受信プログラムブロックである場合は、該入出力パラメータ送受信プログラムブロックから相手先プログラムブロックの位置情報を抽出して返信する送受信制御手段を設ける。
【0041】
また、サポートツールには、上記コントローラに対してプログラムブロックの読み出し要求を送信するプログラムブロック読出要求送信手段を設け、上記プログラムブロック読出要求送信手段によるプログラムブロックの読み出し要求に対して上記コントローラから返信された内容について、ノーマルプログラムブロックのデータか相手先プログラムブロックの位置情報かを判別手段で判別し、上記判別手段によりノーマルプログラムブロックのデータであると判別された場合は、該ノーマルプログラムブロックのデータをそのまま表示し、入出力パラメータ送受信ブロックの相手先プログラムブロックの位置情報であると判別された場合は、その位置情報に基づき相手先プログラムブロックを読み出し、それを表示する表示制御手段を設ける。
【0042】
このような構成によると、複数のコントローラに跨るアプリケーションプログラムの構造がサポートツールで論理的に認識できるため、作業者による認識が容易になり作業ミスがなくなる。
【0043】
また、複数のコントローラに格納されているアプリケーションプログラムの所定の部分が、論理的なプログラム構造に従ってサポートツールに自動的に表示されるため、従来の1台のコントローラ毎にかつプログラムブロック毎に繰り返していた作業操作が単純化でき、設備のデバック/メンテナンス時等の作業効率が大幅に向上する。
【0044】
また、複数のコントローラに跨るアプリケーションプログラムを特別な構成情報なしに、コントローラに格納されているアプリケーションデータだけで論理的に表示できることで、構成情報の作成、保存、読み出しなどの管理に関して作業者への負担がなくなる。
【0045】
また、複数のコントローラアプリケーションプログラムを論理構造を持って表示するために、特別な構成情報が必要でなくなりサポートツール側のハード資源負担が軽くなり、より低コストなサポートツールが提供しやすくなる。
【0046】
また、ネットワークを介してデータの送受信が、プログラムブロックへのパラメータ定義だけで実現されるため、設計者の負担が軽くなるとともに、データの送受信部が特定のプログラムブロックに集約されるため構造的に分かりやすい設計が可能になる。
【0047】
また、別の実施形態である、この発明のコントローラは、複数のコントローラを通信手段を介して相互に接続し、かつアプリケーションプログラムをいくつかのプログラムブロックに分割してそれら複数のコントローラに分散配置してなるコントローラシステムにおけるコントローラである。
【0048】
そして、このコントローラには、複数のプログラムブロックに分割されたアプリケーションプログラムのうちのノーマルプログラムブロックを実行するノーマルプログラムブロック実行手段と、上記プログラムブロックに対して入出力パラメータを定義する入出力パラメータ定義手段と、他のコントローラのプログラムブロックに格納されているプログラムに対して上記入出力パラメータの送受信を行う入出力パラメータ送受信プログラムブロックを実行する入出力パラメータ送受信プログラムブロック実行手段と、上記入出力パラメータ送受信プログラムブロックに対して相手先プログラムブロックの位置情報を記憶する相手先プログラムブロック位置情報記憶手段と、プログラムブロックの読み出し要求に際して、該当プログラムブロックがノーマルプログラムブロックである場合は、該ノーマルプログラムブロックのデータを返信し、該当プログラムブロックが入出力パラメータ送受信プログラムブロックである場合は、該入出力パラメータ送受信プログラムブロックから相手先プログラムブロックの位置情報を抽出して返信する送受信制御手段と、が具備される。
【0049】
ここで、サポートツールは必須ではなく、複数のコントローラによる運転状態だけを想定すればサポートツールを接続しない構成も考えられる。
【0050】
また、別の実施形態である、この発明のサポートツールは、複数のコントローラと少なくとも1つのサポートツールを通信手段を介して相互に接続し、かつアプリケーションプログラムをいくつかのプログラムブロックに分割してそれら複数のコントローラに分散配置してなるコントローラシステムにおけるサポートツールである。
【0051】
そして、このサポートツールには、上記コントローラに対してプログラムブロックの読み出し要求を送信するプログラムブロック読出要求送信手段と、上記プログラムブロック読出要求送信手段によるプログラムブロックの読み出し要求に対して上記コントローラから返信された内容について、ノーマルプログラムブロックのデータか入出力パラメータ送受信ブロックの相手先プログラムブロックの位置情報かを判別する判別手段と、上記判別手段によりノーマルプログラムブロックのデータであると判別された場合は、該ノーマルプログラムブロックのデータをそのまま表示し、入出力パラメータ送受信ブロックの相手先プログラムブロックの位置情報であると判別された場合は、その位置情報に基づき相手先プログラムブロックを読み出して表示する表示制御手段と、が具備される。
【0052】
さらに、別の実施形態は、相互接続されて複数のコントローラからなるコントローラシステムを構成するコントローラでもある。そして、このコントローラには、アプリケーションプログラムを1つ以上に分割したプログラムブロックを実行する手段と、プログラムに対し入出力パラメータを定義する手段と、コントローラ外部より指定された入出力パラメータを受け取る手段と、コントローラ外部よりプログラムブロックの起動の指示を受け取る手段と、指定された入力パラメータにより、該当のプログラムブロックを実行し、出力指定されたパラメータとして、実行結果を指示元に返す手段と、が具備される。
【0053】
図1は、以上説明したコントローラシステムの一実施形態の全体構成を示すブロック図である。図1において、このコントローラシステムは、3台のコントローラ、すなわちコントローラ(コントローラA)10−1、コントローラ(コントローラB)10−2、コントローラ(コントローラC)10−3と、サポートツール20とを、ネットワーク30に接続して構成される。
【0054】
ここで、この実施の形態のコントローラシステムにおいては、このコントローラシステムが実行するアプリケーションプログラムを複数のプログラムブロックに分割し、この分割したプログラムブロックを上記3台のコントローラ10−1〜10−3に分散して格納して実行するように構成される。
【0055】
図2は、図1に示したコントローラシステムのコントローラ10−1〜10−3の詳細構成をコントローラ10として示したブロック図である。
図2において、このコントローラ10は、演算プロセッサ(CPU)11、システムプログラムメモリ12、ユーザプログラムメモリ13、パラメータメモリ14、ワークメモリ15、入出力メモリ(I/Oメモリ)16、通信インタフェース(通信I/F)17、入出力インタフェース(I/F)18を具備して構成され、通信インタフェース17は、図1に示したネットワーク30に接続され、入出力インタフェース18は、入出力装置19に接続される。
【0056】
ここで、演算プロセッサ11は、このコントローラ10の全体動作を統括制御するものであり、システムプログラムメモリ12は、演算プロセッサ11により処理されるこのコントローラ10のシステムプログラムを記憶するためのメモリである。
【0057】
また、ユーザプログラムメモリ13は、このシステムのアプリケーションプログラムを記憶するためのメモリであり、パラメータメモリ14は、このコントローラ10における各種演算や処理のための各種パラメータを記憶するためのメモリである。
【0058】
ワークメモリ15は、このコントローラ10における各種演算や処理を行うためのデータを一時記憶するためのメモリである。
【0059】
入出力メモリ(I/Oメモリ)16は、このコントローラ10におけるプログラム実行により入出力情報の代用として参照や書き換えられるメモリである。また、この入出力メモリ16には、プログラムブロック毎のパラメータも格納される。
【0060】
また、通信インタフェース(通信I/F)17は、ネットワーク30に接続するためのインタフェースを構成する。
【0061】
また、入出力装置19は、センサやスイッチなどに接続される入力装置と、モータやアクチュエータなどに接続される出力装置とを組み合わせた装置であり、ネットワーク30は、サポートツール20および他のコントローラとの間で情報交換を行うための通信手段を構成する。尚、入出力装置19は、独立したいくつかの入力装置と独立したいくつかの出力装置のかたまりの総称といった意味もある。
【0062】
図3は、図1に示したコントローラシステムのサポートツール20の詳細構成を示したブロック図である。
図3において、このサポートツール20は、演算装置21、入力装置27、表示装置28を具備して構成される。演算装置21は、中央処理装置22、メモリ空間23、表示装置用メモリ24、バス25、インタフェース(I/F)26を具備する。メモリ空間23には、パラメータデータエリア23−1、ユーザプログラムデータエリア23−2、サポートツールプログラムエリア23−3が設けられている。
【0063】
ここで、中央処理装置22は、このサポートツール20の全体動作を統括制御する演算プロセッサである。
【0064】
また、メモリ空間23のパラメータデータエリア23−1にはこのサポートツール20の処理に必要な各種パラメータが格納され、ユーザプログラムデータエリア23−2には、コントローラ10−1〜10−3から読み出された「アプリケーションプログラム」のデータが格納され、サポートツールプログラムエリア23−3には、中央処理装置22が実行するこのサポートツール20で実行するプログラムが格納される。
【0065】
また、表示装置用メモリ24は、表示装置28に出力される情報が格納されるメモリで、この情報は中央処理装置22により書き換えられる。
【0066】
また、インタフェース26は、コントローラ10−1〜10−3と通信を行うための通信インタフェースを構成する。
【0067】
また、入力装置27は、ユーザ要求を入力するための装置で、キーボード、ポインティングデバイスなどから構成され、表示装置28は、表示装置用メモリ24の情報を表示する装置で、例えば、CRT等から構成される。
【0068】
上記構成の実施の形態のコントローラシステムにおいては、後に詳述するように、ネットワーク30に分散接続された複数のコントローラ10−1〜10−3に跨ったアプリケーションプログラム間のパラメータの受け渡しを自動化するためのプログラムブロックの実行処理と、各コントローラ10−1〜10−3内に格納されたアプリケーションプログラムデータを使って、分散したコントローラのアプリケーションプログラムを一本のプログラムのように表示するサポートツール20を提供する。
【0069】
さて、この実施の形態のコントローラシステムにおいて、ネットワーク30上では、メッセージサービスにより情報交換を行い、これにより相手先に各要求を発行する。このメッセージサービスは、サポートツール20からコントローラ10−1〜10−3への要求、コントローラから他のコントローラへの要求に使用される。
【0070】
各メッセージは、コマンドに相手先のネットワークアドレスを付加し、それにより各メッセージの受信先が特定される。この実施の形態のコントローラシステムにおいては以下のメッセージサービスコマンドを用意する。
【0071】
1)データ送信
送信コマンドのパラメータ
相手コントローラにおけるデータ格納先メモリアドレス
格納データ
受信レスポンスの内容
正常終了コード
何らかの理由で処理が正常に完了しなかった場合はエラー終了
2)データ受信
送信コマンドのパラメータ
データ長
相手コントローラにおけるデータ読出先メモリアドレス
受信レスポンスの内容
正常終了コードと読出データ
何らかの理由で処理が正常に完了しなかった場合はエラー終了
3)プログラム読出
送信コマンドのパラメータ
なし
受信レスポンスの内容
アプリケーションプログラムデータ全体
何らかの理由で処理が正常に完了しなかった場合はエラー終了コード
4)プログラムブロック読出
送信コマンドのパラメータ
プログラムブロックID番号
受信レスポンスの内容
実体が自コントローラ内の場合、正常終了コードとプログラムブ
ロックデータ
実体が他コントローラ内の場合、正常終了コードとコントローラ
のアドレスとプログラムブロックID番号
何らかの理由で処理が正常に完了しなかった場合はエラー終了コ
ード
5)プログラム構成読出
送信コマンドのパラメータ
なし
受信レスポンスの内容
正常終了コードとプログラム構成情報
何らかの理由で処理が正常に完了しなかった場合はエラー終了コ
ード
なお、プログラム構成読出に対する受信レスポンスのプログラム構成情報の一例を示すと図4のようになる。
【0072】
図4において、このプログラム構成情報は、全プログラムの個別情報(ブロックA)と毎サイクル起動プログラムID番号(ブロックB)とからなり、全プログラムの個別情報は、レコード1からレコードNにそれぞれプログラムブロックID番号(フィールド1)、プログラムブロック種別(フィールド2)、プログラムブロック本体からの情報(フィールド3)があり、プログラムブロック本体からの情報には、
1)命令コードに含まれるプログラムブロック起動命令に定義されたプログラ ムブロックID番号(種別がノーマルプログラムブロックの場合)
2)相手先プログラムブロック位置情報(種別が入出力パラメータプログラム ブロックの場合)
が含まれている。
【0073】
また、毎サイクル起動プログラムID番号には、プログラムブロックID番号が含まれている。
【0074】
次に、この実施の形態のコントローラシステムの詳細動作を以下に示すフローチャートを参照して詳細に説明する。
【0075】
図5は、図2に示したコントローラ10における全体処理フローを示すフローチャートである。
図5において、コントローラ10の電源ON初期処理に続いて処理が開始されると(ステップ501)、コントローラ10は、まず、所定の共通処理を実行し(ステップ502)、次に、プログラム運転が可能であるかを調べる(ステップ503)。
【0076】
ここで、プログラム運転可であると判断されると(ステップ503でYES)、プログラム運転処理を実行し(ステップ504)、その後、I/Oメモリ16のI/Oリフレッシュ処理を行う(ステップ505)。
【0077】
なお、ステップ503でプログラム運転可でないと判断されると(ステップ503でNO)、プログラム運転処理を実行することなく、I/Oメモリ16のI/Oリフレッシュ処理を行う(ステップ505)。
【0078】
I/Oメモリ16のI/Oリフレッシュ処理が終了すると、次に所定のネットワーク処理を実行し(ステップ506)、ステップ502に戻り、上記処理を繰り返す。
【0079】
図6は、図5に示したステップ506のネットワーク処理の詳細を示すフローチャートである。
ネットワーク処理では、サポートツール20または他コントローラ10からのコマンドの受信状態、他処理からのネットワーク処理依頼の状態に応じて、以下の処理がおこなわれる。ここで、コマンドやレスポンス受信自体は割り込み処理にて行われ、ワークメモリ15上の一時記憶エリアに記憶される。
【0080】
1)サポートツール20および他コントローラ10からのコマンドに従った処 理
2)他処理からのネットワーク処理依頼内容に従ったコマンド発行処理
3)発行したコマンドに対するレスポンスに従った処理
【0081】
さて、図6において、このネットワーク処理が開始されると(ステップ601)、まず、受信コマンド若しくはレスポンスがあるかを調べる(ステップ602)。ここで、受信コマンド若しくはレスポンスがないと判断されると(ステップ602でNO)、ステップ605に進むが、受信コマンド若しくはレスポンスがあると判断されると(ステップ602でYES)、各コマンド又はレスポンスを解析したのち(ステップ603)、各コマンド及びレスポンス別の処理を実行する(ステップ604)。
【0082】
ここで、各コマンド別のレスポンス処理内容を以下に示す。なお、以下に示す処理以外にも、コントローラとして持つべきコマンド処理は存在するが、この実施の形態の内容には依存しないのでここではその説明を省略する。
1)「データ送信」コマンドに対する処理
コマンドパラメータに指定されたデータ格納メモリアドレス以降に、コマンドパラメータに指定された格納データを書き込む。処理が完了したら、正常終了コードを返信する。ただし、何らかの原因で、正常に処理が終了しなければ、エラー終了のレスポンスを返信する。
【0083】
2)「データ受信」コマンドに対する処理
コマンドパラメータに指定された読み出し先メモリアドレス以降から、データ長分のデータを正常終了コードとともに返信する。ただし、何らかの原因で、正常に処理が終了しなければ、エラー終了のレスポンスを返信する。
【0084】
3)「プログラム読出」コマンドに対する処理
ユーザプログラムメモリ13領域内の所定の場所から「アプリケーションプログラムデータ」を読出し、正常終了コードとともに返信する。ただし、何らかの原因で、正常に処理が終了しなければエラー終了のレスポンスを返信する。なお、「アプリケーションプログラムデータ」は、後に説明する図25の「アプリケーションプログラムデータ」のような構成となる。
【0085】
4)「プログラムブロック読出」コマンドに対する処理
コマンドパラメータに指定されたプログラムブロックIDに従い、ユーザプログラムメモリ13領域内の「アプリケーションプログラムデータ」から該当のプログラムブロックデータを抽出し、正常終了コードとともに返信する。ただし、何らかの原因で、正常に処理が終了しなければエラー終了のレスポンスを返信する。なお、「アプリケーションプログラムデータ」は、後に説明する図25の「アプリケーションプログラムデータ」のような構成となり、「プログラムブロックデータ」は、後に説明する図20に示す「ノーマルプログラムブロックの構造」若しくは図21の「入出力パラメータ送信プログラムブロックの構造」のような構成となる。
【0086】
5)「プログラム構成読出」コマンドに対する処理
後に説明する図16の「プログラム構成情報抽出処理フロー」の処理によりプログラム構成情報(図4参照)を作成し、正常終了コードとともに返信する。ただし、何らかの原因で、正常に処理が終了しなければエラー終了のレスポンスを返信する。
【0087】
ステップ605では、ネットワーク処理依頼項目記憶エリアを読み出し、次に、処理依頼があるかを調べる(ステップ606)。ここで、処理依頼がないと判断されると(ステップ606でNO)、このまま、このネットワーク処理を終了する(ステップ610)。
【0088】
ステップ606で、処理依頼があると判断されると(ステップ606でYES)、ネットワーク処理依頼項目記憶エリアの先頭の依頼を読み出し(ステップ607)、この依頼に対応したコマンドを生成して送信し(ステップ608)、ネットワーク処理依頼項目を一段つめ(ステップ609)、このネットワーク処理を終了する(ステップ610)。
【0089】
図7は、図5に示したステップ504のプログラム運転処理の詳細を示すフローチャートである。
図7において、プログラム運転処理が開始されると(ステップ701)、まず、初回実行かを調べる(ステップ702)。ここで、初回実行でないと判断されると(ステップ702でNO)、ステップ704に進むが、初回実行であると判断されると(ステップ702でYES)、プログラム運転処理用ワークを初期化し(ステップ703)、ステップ704に進む。
【0090】
さて、この実施の形態のコントローラシステムにおいては、「プログラム運転処理」起動により、毎サイクル起動されるものと、任意のプログラムブロックより起動されるものがある。
【0091】
また、「プログラム運転処理」起動により、毎サイクル起動されるプログラムブロックは、プログラミングの際に作業者が設定しておき、アプリケーションプログラムデータ内のデータ情報領域に格納されている。
【0092】
ステップ704では、プログラムブロックステータス情報の先頭レコードを読み出し、プログラムブロック実行処理を行う(ステップ705)。そして、プログラムブロックステータス情報の次のレコードを読み出し(ステップ706)、残りプログラムブロックなしかを調べる(ステップ707)。
【0093】
ここで、残りプログラムブロックありと判断された場合は(ステップ707でNO)、ステップ705に戻り、ステップ705からステップ707の処理を繰り返すが、残りプログラムブロックなしと判断された場合は(ステップ707でYES)、プログラム実行処理を終了する(ステップ708)。
【0094】
図8,図9は、図7に示したステップ705のプログラムブロック実行処理の詳細を示すフローチャートである。
図8において、プログラムブロック実行処理が開始されると(ステップ801)、まず、プログラムブロックデータを読み出し(ステップ802)、次に、プログラムブロックの種別を調べる(ステップ803)。
【0095】
ここで、プログラムブロックがノーマルブロックであると判断されると、I/Oメモリ16より入力パラメータの値を読み出し、プログラムブロック実行処理へ引数としてセットする(ステップ804)。そして、プログラムブロック本体を順次読み出し、命令コードに従った実行処理を行う(ステップ805)。
【0096】
次に、命令コード終了かを調べ、命令コード終了でないと判断されると(ステップ806でNO)、ステップ805に戻り、ステップ806にて命令コード終了と判断されるまで、ステップ805、806の処理を繰り返すが、命令コード終了と判断されると(ステップ806でYES)、プログラムブロック実行処理の結果を出力パラメータの値としてI/Oメモリ16にセットし、このプログラムブロック実行処理を終了する(ステップ808)。
【0097】
また、ステップ803で、プログラムブロックが入出力パラメータ送受信プログラムブロックであると判断された場合は、図9に移って、I/Oメモリ16より入力パラメータの値を読み出し(ステップ901)、プログラムブロック本体として格納された「相手先プログラム位置情報」と「相手先入出力パラメータ位置情報」の入力パラメータ位置情報を用いて、「データ送信コマンド」によりI/Oメモリ16より読み込んだデータを送信し、レスポンスが返されるのを待つ(ステップ902)。
【0098】
次に、レスポンス正常かを調べ(ステップ903)、レスポンス正常であると判断された場合は(ステップ903でYES)、プログラム本体として格納された「相手先プログラム位置情報」と「相手先入出力パラメータ位置情報」の出力パラメータ位置情報を用いて、「データ受信コマンド」を発行し、レスポンスが返されるのを待つ(ステップ904)。
【0099】
そして、レスポンス正常かを調べ(ステップ905)、レスポンス正常であると(ステップ905でYES)、レスポンスの値をI/Oメモリ16にセットし(ステップ906)、図8のフローチャートに戻って、このプログラムブロック実行処理を終了する(ステップ808)。
【0100】
なお、ステップ903で、レスポンスが正常でない(ステップ903でNO)若しくはステップ905で、レスポンスが正常でない(ステップ905でNO)と判断された場合は、そのままこのプログラムブロック実行処理を終了する(ステップ808)。
【0101】
図10は、図3に示したサポートツール20における全体処理を示すフローチャートである。
図10において、サポートツール20の処理が開始されると(ステップ1001)、先ず、所定の起動時初期処理を実行し(ステップ1002)、次に、ユーザ操作による機能選択が行われる(ステップ1003)。
【0102】
次に、ステップ1003の機能選択により選択された機能がプログラム読出機能かを調べる(ステップ1004)。ここで、選択された機能がプログラム読出機能であると判断されると(ステップ1004でYES)、プログラム読出機能処理を実行し(ステップ1005)、ステップ1003に戻る。
【0103】
また、ステップ1004で選択された機能がプログラム読出機能でないと判断された場合は(ステップ1004でNO)、他の機能の選択に応じてサポートツール各機能への分岐を行い、サポートツール各機能処理を実行する。
【0104】
そして、次に、サポートツール各機能処理が終了かを調べ(ステップ1006)、終了でないと判断されると(ステップ1006でNO)、ステップ1003へ戻るが、終了であると判断されると(ステップ1006でYES)、所定の終了処理を実行し(ステップ1007)、このサポートツール20における全体処理フローを終了する(ステップ1008)。
【0105】
図11,図12は、図10に示したステップ1005のプログラム読出機能処理の詳細を示すプログラム読出機能フローのフローチャートである。
図11において、プログラム読出機能が開始されると(ステップ1101)、演算装置21のメモリ空間23におけるパラメータデータエリア23−1の「コントロール別ネットワークアドレス情報」よりネットワークに接続しているコントローラIDを抽出する(ステップ1102)。
【0106】
次に、表示装置28の画面上に表示フレーム(A)を開きネットワーク30に接続しているコントローラ10−1〜10−3を「コントローラの一覧」として表示する(ステップ1103)。
【0107】
この「コントローラの一覧」の一例は、例えば、後述する図32に示すようなもので、図32においては、ネットワーク30に接続しているコントローラが、コントローラ(コントローラA)10−1、コントローラ(コントローラB)10−2、コントローラ(コントローラC)10−3であることを示している。
【0108】
ここで、作業者が表示フレーム(A)内のコントローラを指定する(ステップ1104)。
【0109】
これにより、指定されたコントローラのコントローラID番号をもとに「コントローラ別ネットワークアドレス情報」より該当のコントローラのアドレス情報を抽出する(ステップ1105)。
【0110】
そして、抽出したアドレス宛てに「プログラム読出」コマンドを発行し(ステップ1106)、レスポンス待ちになる(ステップ1107)。
【0111】
ステップ1107でレスポンスありと判断されると、コマンドのレスポンスとして選択されたコントローラ10のユーザプログラムから「アプリケーションプログラムデータ」を読み込み(ステップ1108)、この「アプリケーションプログラムデータ」を解析し、別の表示フレーム(B)を開き「アプリケーションプログラム構造」を表示する(ステップ1109)。
【0112】
ここで、表示フレーム(B)は、図33に示すように、例えばコントローラ(コントローラA)10−1の「アプリケーションプログラム構造」を示しており、ここでは、コントローラ(コントローラA)10−1のアプリケーションプログラム構成をプログラムブロック単位で表示している。
【0113】
次に、作業者が表示フレーム(B)内のプログラムブロックを指定する(ステップ1110)。
【0114】
そして、指定されたプログラムブロックのデータを図25に示すような「アプリケーションプログラムデータ」より抽出し(ステップ1111)、抽出したプログラムブロックの種別を調べる(ステップ1112)。
【0115】
ここで、抽出したプログラムブロックの種別が入出力パラメータ送受信プログラムブロックであると、プログラムデータブロックより相手先プログラムブロック位置情報(相手先コントローラアドレスと相手先プログラムブロックID番号)を抽出し(ステップ1201)、次に、指定されたプログラムブロックデータより入力パラメータ、出力パラメータ(b)を抽出し(ステップ1202)、抽出した相手先コントローラアドレス宛に、同じく抽出したプログラムブロックID番号をパラメータして「プログラムブロック読出コマンドを発行し(ステップ1203)、レスポンス待ちになる(ステップ1204)。
【0116】
そして、ステップ1204でレスポンスありと判断されると、コマンドのレスポンスとして「プログラムブロックデータ」を読み込み(ステップ1205)、さらに、プログラムデータブロックより入力パラメータ、出力パラメータおよびプログラムブロック本体であるプログラムコードリストを抽出し、図35に示されるように、(b)とともに新しい表示フレーム(C)を開いて表示する(ステップ1206)。
【0117】
次に、作業者が別ブロックの読み出しを指定した場合は、別のプログラムブロックを読み出すかを調べ(ステップ1207)、別のプログラムブロックを読み出すと判断されると(ステップ1207でYES)、フレーム(C)を閉じ(ステップ1208)、図11のステップ1110へ進む。
【0118】
また、ステップ1207で別のプログラムブロックは読み出さないと判断されると(ステップ1207でNO)、次に、作業者が別コントローラの読み出しを指定した場合は、別のコントローラを指定するかを調べる(ステップ1209)。ここで、別のコントローラを指定すると判断されると(ステップ1209でYES)、フレーム(B),(C)を閉じ(ステップ1210)、図11のステップ1104へ進む。
【0119】
また、ステップ1209で、別のコントローラは指定しないと判断されると(ステップ1209でNO)、作業者が機能終了を指定した場合は、このプログラム読出機能を終了するかを調べ(ステップ1211)、このプログラム読出機能を終了しないと判断されると(ステップ1211でNO)、ステップ1207に戻るが、このプログラム読出機能を終了すると判断されると(ステップ1211でYES)、すべてのフレーム(A)〜(C)を閉じ(ステップ1212)、このプログラムブロック処理を終了する(ステップ1213)。
【0120】
一方、図11のステップ1112で抽出したプログラムブロックの種別がノーマルプログラムブロックであると、プログラムブロックデータより入力パラメータ、出力パラメータおよびプログラムブロック本体であるプログラムコードリストを抽出し、図34に示されるように、新しい表示フレーム(C)を開いて表示し(ステップ1113)、ステップ1207へ進む。以下、ステップ1207〜ステップ1213の処理は前述した処理と同様である。
【0121】
図13,図14,図15は、図10に示したステップ1005のプログラム読出機能処理の詳細を示す他のプログラム読出機能フローのフローチャートである。
図13において、プログラム読出機能が開始されると(ステップ1301)、まず、演算装置21のメモリ空間23におけるパラメータデータエリア23−1の「コントロール別ネットワークアドレス情報」よりネットワークに接続しているコントローラIDを抽出する(ステップ1302)。
【0122】
次に、表示装置28の画面上に表示フレーム(A)を開き「コントローラの一覧」として表示する(ステップ1303)。
【0123】
ここで、作業者が表示フレーム(A)内のコントローラを指定する(ステップ1304)。
【0124】
これにより、指定されたコントローラのコントローラID番号をもとに「コントローラ別ネットワークアドレス情報」より該当のコントローラのアドレス(a)を抽出する(ステップ1305)。
【0125】
そして、抽出したアドレス(a)宛てに「プログラム構成読出」コマンドを発行し(ステップ1306)、レスポンス待ちになる(ステップ1307)。
【0126】
ステップ1307でレスポンスありと判断されると、このレスポンス(b)、すなわち、抽出したアドレスのコントローラ10のアプリケーションプログラムをメモリ空間23のユーザプログラムデータエリア23−2へ保存する(ステップ1308)。
【0127】
次に、レスポンス(b)を解析し、別の表示フレーム(B)を開き、「アプリケーションプログラム構造」を表示する(ステップ1309)。ここで、表示フレーム(B)の一例を示すと後述する図33のようになる。
【0128】
ここで、作業者が表示フレーム(B)内のプログラムブロックを指定する(ステップ1310)。そして、図14に移って、抽出したプログラムブロックの種別を判別する(ステップ1401)。
【0129】
ステップ1401で、抽出したプログラムブロックが、ノーマルプログラムブロックであると判別されると、アドレス(a)宛にプログラムブロックID番号をパラメータとして「プログラムブロック読出」コマンドを発行する(ステップ1402)。そして、レスポンス待ちとなり(ステップ1403)、レスポンスがあると、コマンドのレスポンスとして「プログラムブロックデータ」を読み込む(ステップ1404)。
【0130】
次に、プログラムデータブロックより入力パラメータ、出力パラメータおよびプログラムブロック本体であるプログラムコードリストを抽出し、図34に示されるように、新しい表示フレーム(C)を開いて表示し(ステップ1405)、図15のステップ1501へ進む。
【0131】
一方、図14のステップ1401で、抽出したプログラムブロックが、入出力パラメータ送受信プログラムブロックであると判別されると、相手先コントローラアドレス宛にプログラムブロックID番号をパラメータとして「プログラムブロック読出」コマンドを発行する(ステップ1406)。そして、レスポンス待ちとなり(ステップ1407)、レスポンスがあると、コマンドのレスポンスとして「プログラムブロックデータ」を読み込む(ステップ1408)。
【0132】
そして、プログラムデータブロックより入力パラメータ、出力パラメータおよびプログラムブロック本体であるプログラムコードリストを抽出し、(b)より指定されたプログラムブロックの入力パラメータ、出力パラメータを抽出し、図34に示されるように、新しい表示フレーム(C)を開いて表示し(ステップ1409)、図15のステップ1501へ進む。
【0133】
ステップ1501では、作業者が別ブロックの読み出しを指定した場合は、別のプログラムブロックを読み出すかを調べ、別のプログラムブロックを読み出すと判断されると(ステップ1501でYES)、フレーム(C)を閉じ(ステップ1502)、図13のステップ1310へ進む。
【0134】
また、ステップ1501で別のプログラムブロックは読み出さないと判断されると(ステップ1501でNO)、次に、作業者が別コントローラの読み出しを指定した場合は、別のコントローラを指定するかを調べる(ステップ1503)。ここで、別のコントローラを指定すると判断されると(ステップ1503でYES)、フレーム(B),(C)を閉じ(ステップ1504)、図13のステップ1304へ進む。
【0135】
また、ステップ1503で、別のコントローラは指定しないと判断されると(ステップ1503でNO)、作業者が機能終了を指定した場合は、このプログラム読出機能を終了するかを調べ(ステップ1505)、このプログラム読出機能を終了しないと判断されると(ステップ1505でNO)、ステップ1501に戻るが、このプログラム読出機能を終了すると判断されると(ステップ1505でYES)、すべてのフレーム(A)〜(C)を閉じ(ステップ1506)、このプログラムブロック処理を終了する(ステップ1507)。
【0136】
次に、アプリケーションプログラムデータからその構成情報を抽出する手法とこの構成情報より表示イメージを作成する手法について説明する。
【0137】
図16は、アプリケーションプログラムデータからその構成情報を抽出する手法を示すプログラム構成情報抽出処理フローのフローチャートである。尚、この処理は図11,図12の例ではサポートツールにて、図13〜図15の例では「プログラム構成読出」コマンド処理としてコントローラが行なう。
【0138】
図16において、プログラム構成情報抽出処理が開始されると(ステップ1601)、まず、アプリケーションプログラムのデータ領域情報より順次個々のプログラムブロックのデータを抽出する(ステップ1602)。
【0139】
次に、プログラムブロック識別子より「プログラムブロックID番号」と「プログラムブロック種別」を抽出し、構成情報の一部として記憶する(ブロックAの各レコードのフィールド1および2)(ステップ1603)。
【0140】
そして、抽出したプログラムブロックの種別を調べる(ステップ1604)。ここで、抽出したプログラムブロックの種別が入出力パラメータ送受信プログラムブロックであると判別されると、プログラムブロック本体より相手先プログラムブロック位置情報を抽出し、構成情報の一部として記憶する(ブロックAの各レコードのフィールド3)(ステップ1605)。
【0141】
次に、抽出したプログラムブロックが最終プログラムブロックかを調べ(ステップ1611)、抽出したプログラムブロックが最終プログラムブロックでない場合は(ステップ1611でNO)、ステップ1602に戻るが、抽出したプログラムブロックが最終プログラムブロックであると判断された場合は(ステップ1611でYES)、アプリケーションプログラムの情報領域よりサイクル毎に実行されるプログラムブロックの一覧情報のプログラムブロックID番号を抽出し、構成情報の一部として記憶(ブロックBのフィールド1〜N)したのち(ステップ1612)、このプログラム構成情報抽出処理を終了する(ステップ1613)。
【0142】
一方、ステップ1604で、抽出したプログラムブロックの種別がノーマルプログラムブロックであると判別された場合は、プログラムブロック本体を読み出し(ステップ1606)、その命令コードを順次解析する(ステップ1607)。
【0143】
そして、この解析した命令コードがプログラムブロック起動命令かを調べる(ステップ1608)。ここで、プログラムブロック起動命令でないと判別された場合は(ステップ1608でNO)、ステップ1610へ進むが、解析した命令コードがプログラムブロック起動命令であると判別されると(ステップ1608でYES)、命令コードより起動対象のプログラムブロックID番号を抽出し、構成情報の一部として記憶したのち(ブロックAの各レコードのフィールド3)(ステップ1609)、ステップ1610へ進む。
【0144】
尚、プログラムブロック起動命令とは、任意のプログラムブロックを指定して、そのプログラムブロックの起動を開始させる命令である。命令コードはオペコードとオペランドの2つの構成に分かれ、オペコードは本命令がプログラムブロック起動命令であることを示すコードで、オペランドは起動対象となるプログラムブロックのID番号が格納される。
【0145】
ステップ1610では、命令コード終了かを調べる。ここで、命令コード終了でないと判別されると(ステップ1610でNO)、ステップ1607に戻るが、命令コード終了と判別されるとステップ1611へ進む。
【0146】
そして、抽出したプログラムブロックが最終プログラムブロックかを調べ(ステップ1611)、抽出したプログラムブロックが最終プログラムブロックでない場合は(ステップ1611でNO)、ステップ1602に戻るが、抽出したプログラムブロックが最終プログラムブロックであると判断された場合は(ステップ1611でYES)、アプリケーションプログラムの情報領域よりサイクル毎に実行されるプログラムブロックの一覧情報のプログラムブロックID番号を抽出し、構成情報の一部として記憶(ブロックBのフィールド1〜N)したのち(ステップ1612)、このプログラム構成情報抽出処理を終了する(ステップ1613)。
【0147】
図17は、アプリケーションプログラムデータから抽出された構成情報(図4参照)より表示イメージ(図29参照)を作成する手法を示すプログラム構成表示生成処理フローのフローチャートである。
【0148】
図17において、プログラム構成表示生成処理が開始されると(ステップ1701)、まず、プログラム構成情報のブロックBよりプログラムIDを抽出し、上段表示要素とする(ステップ1702)。
【0149】
次に、上段表示要素に対応するレコードをプログラム構成情報のブロックAより検索する(各レコードのフィールド1との一致)(ステップ1703)。
【0150】
そして、該当レコードのフィールド2を調べる(ステップ1704)。ここで、該当レコードのフィールド2が入出力パラメータ送受信プログラムブロックであると判別されると、フィールド3より相手先プログラムブロック位置情報のコントローラアドレスを抽出し、「コントローラ別ネットワークアドレス情報」よりコントローラIDに変換したうえで、現在の表示要素の右に追加する(ステップ1705)。
【0151】
次に、フィールド3より相手先プログラムブロックID番号を抽出し、現在の表示要素の右に追加し(ステップ1706)、上段表示要素は最終かを調べる(ステップ1714)。ここで、上段表示要素が最終でないと判断されると(ステップ1714でNO)、次の表示要素を読み込み(ステップ1715)、ステップ1703に戻るが、上段表示要素が最終であると判断されると(ステップ1714でYES)、このプログラム構成表示生成処理を終了する(ステップ1716)。
【0152】
一方、ステップ1704で該当レコードのフィールド2がノーマルプログラムブロックであると判別されると、フィールド3より相手先プログラムブロックID番号を抽出し、下段表示要素として次ラインに加える(ステップ1707)。
【0153】
そして、下段表示要素に対応するレコードをプログラム構成情報のブロックAより検索する(各レコードのフィールド1との一致)(ステップ1708)。
【0154】
次に、該当レコードのフィールド2を調べる(ステップ1709)。ここで、該当レコードのフィールド2がノーマルプログラムブロックであると判別されると、ステップ1712へ進むが、該当レコードのフィールド2が入出力パラメータ送受信プログラムブロックであると判別されると、フィールド3より相手先プログラムブロック位置情報のコントローラアドレスを抽出し、「コントローラ別ネットワークアドレス情報」よりコントローラIDに変換したうえで、現在の表示要素の右に追加する(ステップ1710)。
【0155】
次に、フィールド3より相手先プログラムブロックID番号を抽出し、現在の表示要素の右に追加し(ステップ1711)、下段表示要素が最終かを調べる(ステップ1712)。ここで、下段表示要素が最終でないと判断されると(ステップ1712でNO)、次の表示要素を読み込み(ステップ1713)、ステップ1708に戻るが、下段表示要素が最終であると判断されると(ステップ1712でYES)、ステップ1714へ進む。
【0156】
そして、ステップ1714で、上段表示要素が最終でないと判断されると(ステップ1714でNO)、次の表示要素を読み込み(ステップ1715)、ステップ1703に戻るが、上段表示要素が最終であると判断されると(ステップ1714でYES)、このプログラム構造表示生成処理を終了する(ステップ1716)。
【0157】
次に、この実施の形態のコントローラシステムの物理的なアプリケーションプログラムの構造の具体例について説明する。
【0158】
図18は、図1に示したこの実施の形態のコントローラシステムにおける物理的なアプリケーションプログラムの構造の一例を示す図である。
【0159】
図18において、この実施の形態のコントローラシステムにおける物理的なアプリケーションプログラムにおいて、コントローラ(コントローラA)10−1のアプリケーションプログラムは、プログラムブロックPB10〜PB15の6つのプログラムブロックで構成されている。ここで、プログラムブロックPB10とプログラムブロックPB13、PB14との間は階層的な構造にあり、また、プログラムブロックPB11とプログラムブロックPB14、PB15との間も階層的な構造にある。
【0160】
また、コントローラ(コントローラB)10−2のアプリケーションプログラムは、プログラムブロックPB20、PB21の2つのプログラムブロックで構成されており、コントローラ(コントローラC)10−3のアプリケーションプログラムは、プログラムブロックPB30の1つのプログラムブロックで構成されている。
【0161】
ここで、コントローラ(コントローラA)10−1のプログラムブロックPB12は、コントローラ(コントローラC)10−3のプログラムブロックPB30に対して入力パラメータとしてデータを渡し、プログラムブロックPB30の演算結果、すなわち出力パラメータを受け取るプログラムブロックである。
【0162】
また、コントローラ(コントローラA)10−1のプログラムブロックPB13は、コントローラ(コントローラB)10−2のプログラムブロックPB20に対して入力パラメータとしてデータを渡し、プログラムブロックPB20の演算結果、すなわち出力パラメータを受け取るプログラムブロックである。
【0163】
また、コントローラ(コントローラA)10−1のプログラムブロックPB14は、コントローラ(コントローラB)10−2のプログラムブロックPB21に対して入力パラメータとしてデータを渡し、プログラムブロックPB21の演算結果、すなわち出力パラメータを受け取るプログラムブロックである。
【0164】
図19は、図18に示した物理的なアプリケーションプログラムの構造に対応する論理的なアプリケーションプログラムの構造を示す図である。
図19において、コントローラ(コントローラA)10−1のアプリケーションプログラムは、論理的なアプリケーションプログラムの構造として、プログラムブロックPB10、PB11、PB15、PB20、PB21、PB30の6つのプログラムブロックで構成されている。
【0165】
ここで、プログラムブロックPB10とプログラムブロックPB20、PB21との間は階層的な構造にあり、また、プログラムブロックPB11とプログラムブロックPB21、PB15との間も階層的な構造にある。
【0166】
なお、プログラムブロックPB20、PB21の実体は、コントローラ(コントローラB)10−2に存在し、プログラムブロックPB30の実体は、コントローラ(コントローラC)10−3に存在する。
【0167】
図20は、この実施の形態のコントローラシステムで採用するノーマルプログラムブロックの構造の具体例を示す図である。
図20において、この実施の形態のコントローラシステムで採用するノーマルプログラムブロックは、「プログラムブロック識別子」、「入力パラメータ」、「出力パラメータ」、「プログラムブロック本体」から構成される。
【0168】
ここで、「プログラムブロック識別子」は、「プログラムブロック種別」と「プログラムブロックID番号」からなり、「プログラムブロック種別」には「ノーマルプログラムブロック」が格納される。また、「プログラムブロックID番号」には、コントローラ内でのユニークな番号が割り付けられる。
【0169】
また、「入力パラメータ」には、「プログラムブロック本体」の実行のための入力パラメータが格納され、「出力パラメータ」には、「プログラムブロック本体」の実行結果としての出力パラメータが格納される。
【0170】
また、「プログラムブロック本体」には、ラダープログラムなどのプログラムブロックの起動時に実行されるプログラムコードが格納される。
【0171】
図21は、この実施の形態のコントローラシステムで採用する入出力パラメータ送受信プログラムブロックの構造の具体例を示す図である。
図21において、この実施の形態のコントローラシステムで採用する入出力パラメータ送受信プログラムブロックは、「プログラムブロック識別子」、「入力パラメータ」、「出力パラメータ」、「プログラムブロック本体」から構成される。
【0172】
ここで、「プログラムブロック識別子」は、「プログラムブロック種別」と「プログラムブロックID番号」からなり、「プログラムブロック種別」には「入出力パラメータ送受信プログラムブロック」が格納される。また、「プログラムブロックID番号」には、コントローラ内でのユニークな番号が割り付けられる。
【0173】
また、「入力パラメータ」には、相手先に送信する入力パラメータが格納され、「出力パラメータ」には、相手先から受信した実行処理結果に相当する出力パラメータが格納される。
【0174】
また、「プログラムブロック本体」には、入出力パラメータを送受信するための「相手先の位置情報」が格納される。ここで、「相手先の位置情報」には、「相手先プログラムのプログラムブロック位置情報」および「相手先入出力パラメータ位置情報」があり、「相手先プログラムのプログラムブロック位置情報」は、「コントローラのアドレス」および「プログラムブロックID番号」から構成される。尚、ここで、「相手先入出力パラメータ位置情報」とは、入出力パラメータを送受信するための相手先コントローラでの位置である。
【0175】
図22は、図18に示したプログラムブロックPB10のプログラムブロックデータの具体例を示す図である。
図22において、プログラムブロックPB10のプログラムブロックデータは、「プログラムブロック識別子」の「プログラムブロック種別」として「ノーマルプログラムブロック」が格納され、「プログラムブロックID番号」として「PB10」が格納される。
【0176】
また、「入力パラメータ」として「DM0000」が格納され、「出力パラメータ」として「DM0001」が格納される。なお、図22において「プログラムブロック本体」のプログラムコードは省略している。
【0177】
図23は、図18に示したプログラムブロックPB13のプログラムブロックデータの具体例を示す図である。
図23において、プログラムブロックPB13のプログラムブロックデータは、「プログラムブロック識別子」の「プログラムブロック種別」として「入出力パラメータ送受信プログラムブロック」が格納され、「プログラムブロックID番号」として「PB13」が格納される。
【0178】
また、「入力パラメータ」として「DM2000」が格納され、「出力パラメータ」として「DM2001」が格納される。
【0179】
また、「プログラムブロック本体」の「相手先プログラムのプログラムブロック位置情報」の「コントローラのアドレス」には「コントローラB」が格納され、「プログラムブロックID番号」には、「PB20」が格納される。
【0180】
また、「プログラムブロック本体」の「相手先入出力パラメータ位置情報」には、「入力」として「CM0000」が格納され、「出力」として「CM0001」が格納される。
【0181】
図24は、図18に示したプログラムブロックPB20のプログラムブロックデータの具体例を示す図である。
図24において、プログラムブロックPB20のプログラムブロックデータは、「プログラムブロック識別子」の「プログラムブロック種別」として「ノーマルプログラムブロック」が格納され、「プログラムブロックID番号」として「PB20」が格納される。
【0182】
また、「入力パラメータ」として「CM0000」が格納され、「出力パラメータ」として「CM0001」が格納される。なお、図24において「プログラムブロック本体」のプログラムコードは省略している。
【0183】
図25は、図18に示したコントローラシステムで採用されるアプリケーションプログラムデータの具体例を示す図である。
図25において、アプリケーションプログラムデータのデータ領域情報は、アプリケーションプログラムデータのデータ構造を示すもので、各プログラムブロック毎の格納場所が記述されている。また、毎サイクル起動されるプログラムブロックの一覧情報もここに格納される。
【0184】
ここで、プログラムブロックPB10〜PB15のデータには、プログラム運転処理にて実行される命令語群が実行順に格納される。
【0185】
なお、図25は、コントローラ(コントローラA)10−1のアプリケーションプログラムデータの具体例を示したが、コントローラ(コントローラB)10−2およびコントローラ(コントローラC)10−3のアプリケーションプログラムデータも同様に構成される。
【0186】
図26は、図18に示したコントローラシステムで採用されるアプリケーションプログラムデータテーブルの具体例を示す図である。
図26において、このアプリケーションプログラムデータテーブルはサポートツール24内に記憶され、このアプリケーションプログラムデータテーブルのデータ領域情報は、アプリケーションプログラムデータテーブルのデータ構造を示し、各アプリケーションプログラムデータ毎の格納場所が記述されている。
【0187】
この例では、アプリケーションプログラムデータとしてコントローラ(コントローラA)10−1〜コントローラ(コントローラC)10−3のアプリケーションプログラムデータが存在するが、ネットワーク30に接続されるコントローラの数が増えると、同様にデータ領域が追加される。
【0188】
また、アプリケーションプログラムデータは、コントローラ毎に記憶されるアプリケーションプログラムデータと同一の構造を持つ。
【0189】
図27は、図18に示したコントローラシステムで採用されるプログラムブロックステータス情報の具体例を示す図である。
図27において、プログラムブロックステータス情報は「プログラムブロックID番号」と「ステータス」とからなる。
【0190】
ここで、「プログラムブロックID番号」はプログラムブロックの識別子であり、「ステータス」は該当プログラムブロックの状態および状態指示を示す。
【0191】
この情報は、コントローラにおいて、各プログラムブロックの実行を制御するための情報であり、図2のワークメモリ15に生成される。毎サイクルに実行処理されるすべてのプログラムブロックのプログラムブロックIDに対してその状態が記憶される。
【0192】
プログラム運転処理の初回時にすべてのプログラムブロックが起動としてワークメモリ15に生成記憶され、プログラム運転処理においてこのワークエリアの内容に従って各プログラムブロックが実行または停止される。
【0193】
図28は、図18に示したコントローラシステムで採用されるコントローラ別ネットワークアドレス情報の具体例を示す図である。
図28において、このコントローラ別ネットワークアドレス情報は、「コントローラID」と「アドレス」とからなる。この情報が図2のワークメモリ15に記憶される。
【0194】
ここで、「コントローラID」は、ネットワーク30に接続されているコントローラの識別子を示し、「アドレス」は、各コントローラのネットワーク30上のアドレスを示す。
【0195】
この情報は、ネットワーク接続されたコントローラのネットワーク30上のアドレスを示し、サポートツール20のメモリ空間23のパラメータデータエリア23−1に格納される。
【0196】
また、図29は、プログラムブロックPB10のプログラムブロック本体の一部の具体例を示し、また、図30は、プログラムブロックPB11のプログラムブロック本体の一部の具体例を示す。
【0197】
また、図31は、図3に示したサポートツール20の表示装置28の表示画面の一例を示したものである。
図31において、サポートツール20の表示装置28の表示画面は、画面全体を「コントローラ一覧」、「アプリケーションプログラム構造」、「プログラムブロック情報」の表示ウインドウに分割し、複数のフレーム化して表示するユーザインタフェースを構成する。
【0198】
また、図32は、図31に示した「コントローラ一覧」のサポートツール20の具体的な表示例を示したものであり、図33は、図31に示した「アプリケーションプログラム構成」の具体的サポートツール20の表示例を示したものであり、図34は、図31に示した「プログラムブロック情報」の具体的サポートツール20の表示例を示したものであり、図35は、図31に示した「プログラムブロック情報」の具体的サポートツール20の他の表示例を示したものである。
【0199】
さて、上記構成に基づくこの実施の形態のコントローラシステムの具体的動作例を以下に説明する。
(プログラムブロックの実行処理)
この実施の形態のコントローラシステムは、図1に示したように、3台のコントローラ、すなわちコントローラ(コントローラA)10−1、コントローラ(コントローラB)10−2、コントローラ(コントローラC)10−3とサポートツール20をネットワーク30に接続して構成される。
【0200】
それぞれのコントローラ、すなわちコントローラ(コントローラA)10−1、コントローラ(コントローラB)10−2、コントローラ(コントローラC)10−3には、アプリケーションプログラムとして、図18に示した物理的なアプリケーションプログラム構造のように分割されたプログラムブロックが格納されている。
【0201】
各プログラムブロックには、各コントローラにおいて「プログラム運転処理」起動により、毎サイクル起動されるものと、任意のプログラムブロックより起動されるものがあり、この実施の形態においては、コントローラ(コントローラA)10−1のプログラムブロックPB10、PB11,PB12、コントローラ(コントローラB)10−2のプログラムブロックPB20、PB21、コントローラ(コントローラC)10−3のプログラムブロックPB30は前者にあたり、コントローラ(コントローラA)10−1のプログラムブロックPB13、PB14、PB15は後者にあたる。
【0202】
「プログラム運転処理」起動により、毎サイクル起動されるプログラムブロックは、プログラミングの際に作業者が設定しておき、図25に示した「アプリケーションプログラムデータ」内のデータ情報領域に格納されている。
【0203】
この毎サイクル起動されるプログラムブロックは、図7に示した「プログラム運転処理フロー(コントローラ)」に示すように、毎サイクル起動されて、図8,図9に示す「プログラムブロック実行処理フロー」のように実行処理される。
【0204】
任意のプログラムブロックから起動されるプログラムブロックは、図29に示したプログラムブロックPB10のプログラムブロック本体の一部若しくは図30に示したプログラムブロックPB11のプログラムブロック本体の一部のようにプログラムブロックの本体のプログラムコードより起動される。これらの例に示される[PB13]および[PB15]は、プログラムブロックの起動を行う命令コードを表し、起動されるプログラムブロックのデータは、図25に示す「アプリケーションプログラムデータ」のようにユーザプログラムメモリ13上に格納される。
【0205】
なお、任意のプログラムブロックから起動されるプログラムブロックの処理内容は、図8,図9に示した「プログラムブロック実行処理フロー」となる。
【0206】
さて、コントローラ(コントローラA)10−1のプログラムブロックPB10、PB11、PB15、コントローラBのプログラムブロックPB20、PB21、コントローラCのプログラムブロックPB30は、ノーマルプログラムブロックであり、コントローラA,B,Cにて実行処理されるプログラムコードが格納されていて、起動時は図20に示したような「ノーマルプログラムブロックの構造」に示される入力パラメータの値をもって、オペレータにより予めプログラミングされたプログラムブロック本体を実行し、その結果を出力パラメータに返す。
【0207】
コントローラAのプログラムブロックPB12、PB13、PB14は入出力パラメータ送受信プログラムブロックで、起動時は図21に示した「入出力パラメータ送受信プログラムブロックの構造」に示される入力パラメータの値を、プログラムブロック本体として格納された相手先プログラム位置情報と相手先入出力パラメータを用いて、相手先コントローラのプログラムブロックの入力パラメータに格納する。
【0208】
また、相手先コントローラの出力パラメータを読み込み、自プログラムブロックの出力パラメータに格納する。
【0209】
以下、コントローラAのプログラムブロックPB13とコントローラBのプログラムブロックPB20を例にとって、その詳細動作を説明する。
【0210】
コントローラAのプログラムブロックPB13には、図23に示した「PB13のプログラムブロックデータ」のような情報が、アプリケーションプログラムの一部としてコントローラAのユーザープログラムメモリ13上に格納されている。
【0211】
ここで、入力パラメータ「DM2000」および出力パラメータ「DM2001」はコントローラAのI/0メモリ16上のアドレスである。また、相手先入出力パラメータ位置情報の「CM0000」および「CM0001」も、コントローラBのI/0メモリ16上のアドレスである。
【0212】
コントローラBのプログラムブロックPB20には、図24に示した「PB20のプログラムブロックデータ」のような情報がアプリケーションプログラムの一部としてコントローラBのユーザープログラムメモリ13上に格納されている。
【0213】
コントローラAではユーザープログラム実行処理においてプログラムブロックPB13が起動されるとき、入力パラメータである「DM2000」の値を、コントローラBの「CM0000」に格納する。これはメッセージサービスの「データ送信」コマンドにより行われる。
【0214】
また、同じくコントローラBの「CM0001」のデータを読み出し、出力パラメータである「DM2001」に格納する。これはメッセージサービスの「データ受信コマンド」により行われる。
【0215】
コントローラBではユーザープログラム実行処理においてプログラムブロックPB20が起動されるとき、「CM0000」の値をパラメータとして、プログラムブロック本体のプログラムコードが実行処理され、その実行結果が出力パラメータである「CM0001」に格納される。
【0216】
なお、入出力パラメータ送受信プログラムブロックの処理方法として,プログラムブロック本体内に、送受信のためのプログラムを格納し、ノーマルのプログラムブロックと同様に実行処理することで、上記構成と同じ効果を得る方式も考えられる。
【0217】
また、入出力パラメータ送受信プログラムブロックによるデータの送受信方式として上記実施の形態ではメッセージサービスによるものを用いたが、ネットワークを介して複数のコントローラ間で共有メモリを実現するデータリンク方式(またはコモンメモリ方式)を用いても同様に構成することができる。
(サポートツールによるプログラム表示I)
サポートツール20は、表示装置28への表示において、画面全体を分割し、複数のフレーム化し表示する図31に示した「サポートツール表示構成」ようなユーザーインタフェースをもつ。なお、図31の「サポートツール表示構成」はこの実施の形態における画面表示のイメージである。
【0218】
ここで、作業者はサポートツール20により、「プログラム読出機能」を起動する。
【0219】
「プログラム読出機能」を起動すると、サポートツール20はパラメータデータエリア23−1に格納されている図28に示した「コントローラ別ネットワークアドレス情報」よりネットワーク30に接続しているコントローラIDを抽出し、図32に示した「サポートツール表示例(コントローラ一覧)」のようなネットワークに接続しているコントローラを一覧として表示する。
【0220】
ここで、作業者はアプリケーションプログラムを読み出したいコントローラを選択する。なお、図32の「サポートツール表示例(コントローラ一覧)」ではコントローラAが選択された例を示している。
【0221】
サポートツール20は、メッセージサービスにより、選択されたコントローラよりアプリケーションプログラムを読み出す。これはメッセージサービスの「プログラム読出コマンド」にて行われる。
【0222】
サポートツール20では、コントローラより読出したアプリケーションプログラムを記憶したうえで、データを解析し、図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」のようにプログラムブロックの構造を画面分割したフレームに表示する。
【0223】
ここで、図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」はコントローラAのアプリケーションプログラム構成をプログラムブロック単位で表示した例である。
【0224】
なお、アプリケーションプログラムのデータを解析する際に、プログラムブロックが入出力パラメータ送受信プログラムブロックである場合は、図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」のプログラムブロックPB12、PB13、PB14の表示形式のような相手先のコントローラとプログラムブロックも併せて表示される。
【0225】
アプリケーションプログラムデータからその構成情報を抽出する手法と構成情報より表示イメージを作成する手法は、図16に示した「プログラム構成情報抽出処理フロー」と図17に示した「プログラム構造表示生成処理フロー」とに示される。
【0226】
作業者は表示されたプログラムブロックの中から情報を表示したいプログラムブロックを選択する。図33の「サポートツール表示フレーム例(アプリケーションプログラム構造)」では、プログラムブロックPB10が選択されている例を示している。
【0227】
サポートツールは先に読み出したコントローラAのアプリケーションプログラムより、選択された該当のプログラムブロックのデータを抽出解析し,その情報を画面分割したフレームに表示する。図34の「サポートツール表示例(プログラムブロック情報PB10)」はプログラムブロックPB10のプログラムブロックの情報を表示した例である。
【0228】
ここで、プログラムブロックPB10はノーマルプログラムブロックであるために、プログラムブロックのデータは図22に示した「PB10のプログラムブロックデータ」のようになり、フレームに表示される情報は、入力パラメータ、出力パラメータ、およびプログラムブロック本体であるプログラムコードリストとなる。
【0229】
作業者が図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」においてプログラムブロックPB10と同様にプログラムブロックPB13を選択した場合は、以下のようになる。
【0230】
サポートツール20は、プログラムブロックPB13のプログラムブロックのデータを抽出解析する。ここで、プログラムブロックPB13は、入出力パラメータ送受信プログラムブロックであるため、プログラムブロックのデータは図23の「PB13のプログラムブロックデータ」のようになる。
【0231】
サポートツール20は、プログラムブロック本体に格納されている相手先プログラムブロック位置情報をもとに、コントローラBよりプログラムブロックPB20のプログラムブロックデータを読み出す。これはメッセージサービスの「プログラムブロック読出コマンド」にて行われる。
【0232】
読み出したプログラムブロックデータは、図24の「PB20のプログラムブロックデータ」となり、プログラムブロックPB20はノーマルプログラムブロックであるため、これを解析しプログラムブロックPB13の情報と併せて図35の「サポートツール表示例(プログラムブロック情報PB20)」のようにプログラムブロックの情報をフレームに表示する。
【0233】
これにより作業者は、実際は、図18の「物理的なアプリケーションプログラム構造」のように構成されたアプリケーションプログラム構成を、図19の「論理的なアプリケーションプログラムの構造」として認識することができるようになる。
(サポートツールによるプログラム表示II)
サポートツール20は、表示装置28への表示において、画面全体を分割し、複数のフレーム化し表示する図31に示した「サポートツール表示構成」ようなユーザーインタフェースをもつ。なお、図31の「サポートツール表示構成」はこの実施の形態における画面表示のイメージである。
【0234】
ここで、作業者はサポートツール20により、「プログラム読出機能」を起動する。
「プログラム読出機能」を起動すると、サポートツール20はパラメータデータエリア23−1に格納されている図28に示した「コントローラ別ネットワークアドレス情報」よりネットワーク30に接続しているコントローラIDを抽出し、図32に示した「サポートツール表示例(コントローラ一覧)」のようなネットワークに接続しているコントローラを一覧として表示する。
【0235】
ここで、作業者はアプリケーションプログラムを読み出したいコントローラを選択する。なお、図32の「サポートツール表示例(コントローラ一覧)」ではコントローラAが選択された例を示している。
【0236】
サポートツール20は、メッセージサービスにより、コントローラよりアプリケーションプログラムの構成を読み出す。これはメッセージサービスの「プログラム構成読出コマンド」にて行われる。
【0237】
サポートツール20では、コントローラより読出したアプリケーションプログラムの構成情報を記憶した上で、データを解析し、図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」のようにプログラムブロックの構造を画面分割したフレームに表示する。
【0238】
ここで、図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」はコントローラAのアプリケーションプログラム構成をプログラムブロック単位で表示した例である。
【0239】
アプリケーションプログラムの構成情報から表示イメージを作成する手法は、図17の「プログラム構造表示生成処理フロー」に示す。
【0240】
作業者は表示されたプログラムブロックの中から情報を表示したいプログラムブロックを選択する。なお、図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」では、プログラムブロックPB10が選択されている例を示している。
【0241】
サポートツール20は、指定されたプログラムブロックの情報をコントローラより読み出す。これはメッセージサービスの「プログラムブロック読出コマンド」にて行われる。
【0242】
読み出したプログラムブロックのデータを抽出解析し、その情報を画面分割したフレームに表示する。図34の「サポートツール表示例(プログラムブロック情報PB10)」はプログラムブロックPB10のプログラムブロックの情報を表示した例である。
【0243】
プログラムブロックPB10はノーマルプログラムブロックであるため、コントローラAより読み出したプログラムブロックのデータは図22の「PB10のプログラムブロックデータ」のようになり、フレームに表示される情報は、入力パラメータ、出力パラメータ、およびプログラムブロック本体であるプログラムコードリストとなる。
【0244】
作業者が図33の「サポートツール表示フレーム例(アプリケーションプログラム構成)」においてプログラムブロックPB10と同様にプログラムブロックPB13を選択した場合は、以下のようになる。
【0245】
サポートツール20は、プログラムブロックPB13のデータをコントローラAより読み出して解析する。プログラムブロックPB13は入出力送受信プログラムブロックであるために、プログラムブロックのデータは図23の「PB13のプログラムブロックデータ」のようになる。
【0246】
サポートツール20は、プログラムブロック本体に格納されている相手先プログラムブロック位置情報をもとに、コントローラBよりプログラムブロックPB20のプログラムブロックデータを読み出す。これはメッセージサービスの「プログラムブロック読出コマンド」にて行われる。
【0247】
読み出したプログラムブロックデータは、図24の「PB20のプログラムブロックデータ」となり、プログラムブロックPB20はノーマルプログラムブロックであるため、これを解析しプログラムブロックPB13の情報と併せて図35の「サポートツール表示例(プログラムブロック情報PB20)」のようにプログラムブロックの情報をフレームに表示する。
【0248】
これにより作業者は、実際は、図18の「物理的なアプリケーションプログラム構造」のように構成されたアプリケーションプログラム構成を、図19の「論理的なアプリケーションプログラムの構造」として認識することができるようになる。
【0249】
【発明の効果】
以上説明したようにこの発明によれば、以下に示したような効果を奏する。
1)複数のコントローラに跨るアプリケーションプログラムの構造が論理的に認識できるため、作業者による認識が容易になり作業ミスがなくなる。
【0250】
2)複数のコントローラに格納されているアプリケーションプログラムの所定の部分が、論理的なプログラム構造に従って自動的に表示されるため、従来の1台のコントローラ毎にかつプログラムブロック毎に繰り返していた作業操作が単純化でき、設備のデバック/メンテナンス時等の作業効率が大幅に向上する。
【0251】
3)複数のコントローラに跨るアプリケーションプログラムを特別な構成情報なしに、コントローラに格納されているアプリケーションデータだけで論理的に表示できることで、構成情報の作成、保存、読み出しなどの管理に関して作業者への負担がなくなる。
【0252】
4)複数のコントローラアプリケーションプログラムを論理構造を持って表示するために、特別な構成情報が必要でなくなりサポートツール側のハード資源負担が軽くなり、より低コストなサポートツールが提供しやすくなる。
【0253】
5)ネットワークを介したデータの送受信が、プログラムブロックへのパラメータ定義だけで実現されるため、設計者の負担が軽くなるとともに、データの送受信部が特定のプログラムブロックに集約されるため構造的に分かりやすい設計が可能になる。
【図面の簡単な説明】
【図1】 この発明に係わるコントローラシステムの一実施の形態の全体構成を示すブロック図である。
【図2】 図1に示したコントローラシステムのコントローラの詳細構成を示したブロック図である。
【図3】 図1に示したコントローラシステムのサポートツールの詳細構成を示したブロック図である。
【図4】 プログラム構成読出に対する受信レスポンスのプログラム構成情報の一例を示す図である。
【図5】 図2に示したコントローラにおける全体処理フローを示すフローチャートである。
【図6】 図5に示したネットワーク処理の詳細を示すフローチャートである。
【図7】 図5に示したプログラム運転処理の詳細を示すフローチャートである。
【図8】 図7に示したプログラムブロック実行処理の詳細を示すフローチャート(その1)である。
【図9】 図7に示したプログラムブロック実行処理の詳細を示すフローチャート(その2)である。
【図10】 図2に示したサポートツールにおける全体処理フローを示すフローチャートである。
【図11】 図10に示したプログラム読出機能処理の詳細を示すプログラム読出機能フローのフローチャート(その1)である。
【図12】 図10に示したプログラム読出機能処理の詳細を示すプログラム読出機能フローのフローチャート(その2)である。
【図13】 図10に示したステップ1005のプログラム読出機能処理の詳細を示す他のプログラム読出機能フローのフローチャート(その1)である。
【図14】 図10に示したステップ1005のプログラム読出機能処理の詳細を示す他のプログラム読出機能フローのフローチャート(その2)である。
【図15】 図10に示したステップ1005のプログラム読出機能処理の詳細を示す他のプログラム読出機能フローのフローチャート(その3)である。
【図16】 アプリケーションプログラムデータからその構成情報を抽出する手法を示すプログラム構成情報抽出処理フローのフローチャートである。
【図17】 アプリケーションプログラムデータから抽出された構成情報より表示イメージを作成する手法を示すプログラム構成表示生成処理フローのフローチャートである。
【図18】 図1に示した実施の形態のコントローラシステムにおける物理的なアプリケーションプログラムの構造の一例を示す図である。
【図19】 図18に示した物理的なアプリケーションプログラムの構造に対応する論理的なアプリケーションプログラムの構造を示す図である。
【図20】 この実施の形態のコントローラシステムで採用するノーマルプログラムブロックの構造の具体例を示す図である。
【図21】 この実施の形態のコントローラシステムで採用する入出力パラメータ送受信プログラムブロックの構造の具体例を示す図である。
【図22】 図18に示したプログラムブロックPB10のプログラムブロックデータの具体例を示す図である。
【図23】 図18に示したプログラムブロックPB13のプログラムブロックデータの具体例を示す図である。
【図24】 図18に示したプログラムブロックPB20のプログラムブロックデータの具体例を示す図である。
【図25】 図18に示したコントローラシステムで採用されるアプリケーションプログラムデータの具体例を示す図である。
【図26】 図18に示したコントローラシステムで採用されるアプリケーションプログラムデータテーブルの具体例を示す図である。
【図27】 図18に示したコントローラシステムで採用されるプログラムブロックステータス情報の具体例を示す図である。
【図28】 図18に示したコントローラシステムで採用されるコントローラ別ネットワークアドレス情報の具体例を示す図である。
【図29】 図18に示したプログラムブロックPB10のプログラムブロック本体の一部の具体例を示した図である。
【図30】 図18に示したプログラムブロックPB11のプログラムブロック本体の一部の具体例を示した図である。
【図31】 図3に示したサポートツール20の表示装置28の表示画面の一例を示した図である。
【図32】 図31に示した「コントローラ一覧」の具体的サポートツールの表示例を示した図である。
【図33】 図31に示した「アプリケーションプログラム構造」の具体的サポートツールの表示例を示した図である。
【図34】 図31に示した「プログラムブロック情報」の具体的サポートツールの表示例を示した図である。
【図35】 図31に示した「プログラムブロック情報」の具体的サポートツールの他の表示例を示した図である。
【符号の説明】
10−1 コントローラ(コントローラA)
10−2 コントローラ(コントローラB)
10−3 コントローラ(コントローラC)
11 演算プロセッサ(CPU)
12 システムプログラムメモリ
13 ユーザプログラムメモリ
14 パラメータメモリ
15 ワークメモリ
16 入出力メモリ(I/Oメモリ)
17 通信インタフェース(通信I/F)
18 入出力インタフェース(I/F)
19 入出力装置
20 サポートツール
21 演算装置
22 中央処理装置
23 メモリ空間
23−1 パラメータデータエリア
23−2 ユーザプログラムデータエリア
23−3 サポートツールプログラムエリア
24 表示装置用メモリ
25 バス
26 インタフェース(I/F)
27 入力装置
28 表示装置
30 ネットワーク
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a programmable controller system in which a plurality of programmable controllers and at least one support tool are connected to each other via communication means such as a network, and in particular, an application program is divided into a plurality of program blocks and a plurality of programmable controllers. The present invention relates to a programmable controller system in which the flexibility of the system is established by distributing and storing in the controller and the load is distributed.
[0002]
[Prior art]
With the recent development of network technology, the ability to transmit information between controllers, including communication speed, has been dramatically improved even in programmable controllers (hereinafter referred to as controllers) for controlling facilities and devices.
[0003]
In addition, the system configuration in which multiple controllers are connected by communication due to the cost reduction and size reduction of the controller is comparable in cost and space efficiency compared to a system with a single large controller at high speed. It has become a situation.
[0004]
In this type of control system, when a plurality of controllers are distributedly connected using a network, the following merits arise.
[0005]
1) Since the system construction is flexible in terms of hardware configuration and arrangement, it is easy to rearrange equipment and devices.
[0006]
2) Since the processing is load-balanced among a plurality of controllers, the performance required for each controller is suppressed, and an inexpensive controller can be used.
[0007]
3) Even in the event of a controller failure, the controller constituting the system is divided into a plurality of parts, so the range of system down is limited and the reliability of the entire system is improved.
[0008]
In this way, it becomes possible to construct a system with a plurality of controllers for the configuration of equipment and devices, or for load distribution and optimal performance, which will further increase the decentralization tendency of control systems in the future. is expected.
[0009]
On the other hand, the number of input / output points that can be controlled by one controller tends to increase dramatically in connection with the cost reduction of the semiconductor memory and the higher performance of the microcomputer chip. In proportion to this, the program capacity of the controller is also increasing.
[0010]
In addition, the high functionality of various machines and manufacturing equipment designed by incorporating a controller has spurred an increase in program capacity.
[0011]
Under these trends, in recent years, controllers have been divided, hierarchized, and divided into blocks for efficient and high-quality design of large-capacity programs, and for reuse and maintenance management. There is a tendency to add functions.
[0012]
In addition, in the development and maintenance environment of a system using a controller, a program having a function of individually downloading and uploading program data divided into blocks to the controller has been proposed.
[0013]
Using this function, the user can assign a divided block program to each device among the devices controlled by one controller, or correspond to each highly functional unit in the device. Thus, in the program design, the design for each device and each function can be performed sequentially or shared by a plurality of workers, and as a result, the productivity is increased.
[0014]
In addition, since this function can make the program function division in the controller clearer, the target program is divided into blocks even when multiple control targets are controlled by one controller. It is programmed in the form.
[0015]
In addition, by combining the above-mentioned system distribution by the network and application program division, the distribution method becomes more flexible, and it is possible to distribute not in units of controllers but in units of program blocks across the network. ing.
[0016]
In addition, a technique for handling an application program distributed across controllers virtually as one program is also considered.
[0017]
[Problems to be solved by the invention]
However, since distributing application controllers also distributes application programs, the following adverse effects occur compared to the conventional system construction using one controller.
[0018]
1) When a single controller is used, since data transfer between program blocks that has just been written to and read from the memory in the controller is via data transmission / reception between the controllers, A separate program is required, and a new burden of programming work is generated.
[0019]
2) The program is physically distributed for each controller, making it difficult to see the overall logical structure, which makes it difficult for the designer and maintainer to work.
[0020]
3) Debugging and maintenance work can be performed because what has conventionally been performed for one controller must be performed for a plurality of controllers and a predetermined program block therein. It becomes complicated and the amount of work increases.
[0021]
4) In order to display a program distributed to a plurality of controllers in a logical structure using a support tool, information for managing the entire structure of the normal program and in which controller each program is stored. However, since it is necessary in addition to the program data, the maintenance work of the information becomes a burden on the worker side, and it is necessary to provide a resource for analyzing the information in the support tool.
[0022]
Accordingly, an object of the present invention is to make it possible to efficiently construct a controller system in which an application program is divided into a plurality of parts and distributedly stored in a plurality of mutually connected controllers with a small burden.
[0023]
The present invention also provides a controller that can efficiently and with less burden build a controller system in which an application program is divided into a plurality of parts and distributedly stored in a plurality of controllers connected to each other via a network. The purpose is to do.
[0024]
In addition, the present invention logically easily recognizes the structure of an application program across a plurality of controllers in a controller system in which the application program is divided into a plurality of parts and distributedly stored in a plurality of controllers connected to each other via a network. An object of the present invention is to provide a support tool that can greatly improve work efficiency during debugging and maintenance of facilities.
[0025]
[Means for Solving the Problems]
It is considered that the above technical problem can be solved by a programmable controller system to which a programmable controller having the following configuration is applied.
[0026]
That is, the programmable controller system of the present invention is characterized in that a plurality of programmable controllers are connected to each other through communication means.
[0027]
Each of the programmable controllers corresponds to an input / output signal exchanged between an input / output device and a user program memory that can store one or more program blocks that are application programs created by the user. An input / output memory for storing input / output parameters and a central processing unit are included.
[0028]
In the central processing unit, program block operation processing including program execution processing for sequentially reading and executing the program blocks stored in the user program memory, and input / output parameters between the input / output device and the input / output memory I / O refresh processing for updating the network and network processing for exchanging commands and responses with other programmable controllers via the communication means are structured to be executed cyclically. Each of the program blocks includes a program block identifier, input / output parameter designation data, and a program block body.
[0029]
The program block execution process includes a first program block execution process and a second program block execution means.
[0030]
When the program block read from the user program memory is identified as a normal program block based on the program block identifier, the first program block execution process is designated by input / output parameter designation data included in the program block. The input parameters are read from the input / output memory and temporarily stored, and the input parameters stored temporarily are used to execute an execution process according to the instruction code string constituting the program block body to generate output parameters. Then, after the execution process is completed, the output parameter in the input / output memory designated by the input / output parameter designation data included in the program block can be rewritten.
[0031]
When the program block read from the user program memory is identified as an input / output parameter transmission / reception program block on the basis of the program block identifier, the second program block execution process uses input / output parameter designation data included in the program block. While reading the designated input parameter from the input / output memory and transmitting it to the network as a data transmission command including destination program position information and destination input / output parameter position information constituting the program block body, On the other hand, when a normal response is received, a data reception command including destination program position information and destination input / output parameter position information constituting the program block body is transmitted over the network. Rewritten output parameters of the input and output memory specified data is received as a response with input and output parameters specified data.
[0032]
According to such a configuration, by including the input / output parameter transmission / reception block in the user program memory, the input / output acquired from the input / output memory of another programmable controller when executing the normal program block of the programmable controller. Parameter values can be used.
[0033]
DETAILED DESCRIPTION OF THE INVENTION
The present invention can be realized as several embodiments. For example, the first embodiment can be realized as a programmable controller system.
[0034]
In this controller system, a plurality of controllers and at least one support tool are connected to each other via communication means, and an application program is divided into several program blocks and distributed to the plurality of controllers. It is.
[0035]
Each of the controllers includes a normal program block execution unit that executes a normal program block of application programs divided into a plurality of program blocks, and an input / output parameter definition unit that defines input / output parameters for the program block. An input / output parameter transmission / reception program block executing means for executing an input / output parameter transmission / reception program block for transmitting / receiving the input / output parameter to / from a program stored in a program block of another controller; and the input / output parameter transmission / reception program block The other party program block position information storage means for storing the destination program block position information, and when the program block read request is issued, Is a normal program block, the data of the normal program block is returned. When the corresponding program block is an input / output parameter transmission / reception program block, the location information of the destination program block is obtained from the input / output parameter transmission / reception program block. And a transmission / reception control means for extracting and replying.
[0036]
The support tool returns a program block read request transmitting means for transmitting a program block read request to the controller, and a response to the program block read request by the program block read request transmitting means from the controller. When it is determined that the data is normal program block data or the location information of the destination program block of the input / output parameter transmission / reception block, and the determination means determines that the data is normal program block data, If the normal program block data is displayed as it is and it is determined that it is the location information of the destination program block of the I / O parameter transmission / reception block, the destination program block is read based on the location information. Display control means for displaying it, is provided.
[0037]
Here, the communication means includes a LAN (local area network) or the like. The normal program block indicates, for example, each program block obtained by dividing the application program executed by the controller system of the present invention into a plurality of parts.
[0038]
In the above-described controller system, the application program is divided into a plurality of program blocks, and the divided program blocks are distributed and stored in a plurality of controllers, so that load distribution is achieved and the controller system is efficiently constructed with a small load. It is configured to be able to.
[0039]
In the above controller system, input / output parameter definition means for defining input / output parameters for the program block is provided, and transmission / reception of the input / output parameters to / from a program stored in a program block of another controller. Input / output parameter transmission / reception program block execution means for executing the input / output parameter transmission / reception program block is provided.
[0040]
In addition, a destination program block location information storage means for storing location information of the destination program block is provided for the input / output parameter transmission / reception program block, and when the program block is read from the support tool, the corresponding program block is normal. If it is a program block, the data of the normal program block is returned. If the corresponding program block is an input / output parameter transmission / reception program block, the position information of the partner program block is extracted from the input / output parameter transmission / reception program block. A transmission / reception control means is provided.
[0041]
Also, the support tool is provided with a program block read request transmitting means for transmitting a program block read request to the controller, and a response to the program block read request by the program block read request transmitting means is returned from the controller. The discriminating means determines whether the data of the normal program block or the location information of the partner program block is determined. If the discriminating means determines that the data is the data of the normal program block, the data of the normal program block is Display control means is provided to display as it is and to read the destination program block based on the location information of the destination program block of the input / output parameter transmission / reception block and display it .
[0042]
According to such a configuration, the structure of the application program across a plurality of controllers can be logically recognized by the support tool, so that the operator can easily recognize and there is no work mistake.
[0043]
In addition, since predetermined portions of application programs stored in a plurality of controllers are automatically displayed on the support tool in accordance with a logical program structure, they are repeated for each conventional controller and for each program block. The operation efficiency can be simplified and the work efficiency at the time of debugging / maintenance of equipment can be greatly improved.
[0044]
In addition, application programs that span multiple controllers can be logically displayed using only application data stored in the controller without any special configuration information. There is no burden.
[0045]
In addition, since a plurality of controller application programs are displayed with a logical structure, no special configuration information is required, the hardware resource burden on the support tool side is reduced, and a lower-cost support tool can be easily provided.
[0046]
In addition, since data transmission / reception is realized only by defining parameters in the program block, the burden on the designer is reduced, and the data transmission / reception unit is aggregated into a specific program block. An easy-to-understand design becomes possible.
[0047]
The controller of the present invention, which is another embodiment, connects a plurality of controllers to each other via communication means, and divides an application program into several program blocks and distributes them to the plurality of controllers. It is a controller in the controller system.
[0048]
The controller includes a normal program block execution unit that executes a normal program block of application programs divided into a plurality of program blocks, and an input / output parameter definition unit that defines input / output parameters for the program block. An input / output parameter transmission / reception program block execution means for executing an input / output parameter transmission / reception program block for transmitting / receiving the input / output parameter to / from a program stored in a program block of another controller, and the input / output parameter transmission / reception program The partner program block position information storage means for storing the position information of the partner program block for the block, and the corresponding program block at the time of a program block read request Is a normal program block, the data of the normal program block is returned. When the corresponding program block is an input / output parameter transmission / reception program block, the location information of the destination program block is obtained from the input / output parameter transmission / reception program block. And a transmission / reception control means for extracting and replying.
[0049]
Here, the support tool is not indispensable, and a configuration in which the support tool is not connected is conceivable if only an operation state by a plurality of controllers is assumed.
[0050]
The support tool of the present invention, which is another embodiment, connects a plurality of controllers and at least one support tool to each other via communication means, and divides an application program into several program blocks. It is a support tool in a controller system that is distributed over a plurality of controllers.
[0051]
Then, to this support tool, a program block read request transmitting means for transmitting a program block read request to the controller, and a response to the program block read request by the program block read request transmitting means from the controller. When it is determined that the data is normal program block data or the location information of the destination program block of the input / output parameter transmission / reception block, and the determination means determines that the data is normal program block data, If the data of the normal program block is displayed as it is and it is determined that it is the location information of the destination program block of the I / O parameter transmission / reception block, the destination program block is read based on the location information. Display control means for displaying Te, is provided.
[0052]
Furthermore, another embodiment is also a controller that is interconnected to form a controller system composed of a plurality of controllers. The controller includes means for executing a program block obtained by dividing the application program into one or more, means for defining input / output parameters for the program, means for receiving input / output parameters specified from outside the controller, Means for receiving an instruction to start a program block from outside the controller, and means for executing the program block according to the designated input parameter and returning the execution result to the instruction source as a parameter designated for output. .
[0053]
FIG. 1 is a block diagram showing the overall configuration of an embodiment of the controller system described above. In FIG. 1, this controller system includes three controllers, that is, a controller (controller A) 10-1, a controller (controller B) 10-2, a controller (controller C) 10-3, and a support tool 20 in a network. 30 is configured.
[0054]
Here, in the controller system of this embodiment, an application program executed by the controller system is divided into a plurality of program blocks, and the divided program blocks are distributed to the three controllers 10-1 to 10-3. And is configured to be stored and executed.
[0055]
FIG. 2 is a block diagram showing the detailed configuration of the controllers 10-1 to 10-3 of the controller system shown in FIG.
In FIG. 2, the controller 10 includes an arithmetic processor (CPU) 11, a system program memory 12, a user program memory 13, a parameter memory 14, a work memory 15, an input / output memory (I / O memory) 16, a communication interface (communication I). / F) 17 and an input / output interface (I / F) 18. The communication interface 17 is connected to the network 30 shown in FIG. 1, and the input / output interface 18 is connected to the input / output device 19. The
[0056]
Here, the arithmetic processor 11 controls the overall operation of the controller 10, and the system program memory 12 is a memory for storing the system program of the controller 10 processed by the arithmetic processor 11.
[0057]
The user program memory 13 is a memory for storing application programs of this system, and the parameter memory 14 is a memory for storing various parameters for various calculations and processing in the controller 10.
[0058]
The work memory 15 is a memory for temporarily storing data for performing various calculations and processes in the controller 10.
[0059]
The input / output memory (I / O memory) 16 is a memory that can be referred to and rewritten as a substitute for input / output information by executing a program in the controller 10. The input / output memory 16 also stores parameters for each program block.
[0060]
Further, the communication interface (communication I / F) 17 constitutes an interface for connecting to the network 30.
[0061]
The input / output device 19 is a device that combines an input device connected to a sensor, a switch, and the like and an output device connected to a motor, an actuator, or the like, and the network 30 includes a support tool 20 and other controllers. A communication means for exchanging information between the two is configured. The input / output device 19 also means a collective term for a group of several independent input devices and several independent output devices.
[0062]
FIG. 3 is a block diagram showing a detailed configuration of the support tool 20 of the controller system shown in FIG.
In FIG. 3, the support tool 20 includes an arithmetic device 21, an input device 27, and a display device 28. The arithmetic unit 21 includes a central processing unit 22, a memory space 23, a display device memory 24, a bus 25, and an interface (I / F) 26. In the memory space 23, a parameter data area 23-1, a user program data area 23-2, and a support tool program area 23-3 are provided.
[0063]
Here, the central processing unit 22 is an arithmetic processor that performs overall control of the overall operation of the support tool 20.
[0064]
Various parameters necessary for processing of the support tool 20 are stored in the parameter data area 23-1 of the memory space 23, and read out from the controllers 10-1 to 10-3 in the user program data area 23-2. The data of the “application program” is stored, and a program executed by the support tool 20 executed by the central processing unit 22 is stored in the support tool program area 23-3.
[0065]
The display device memory 24 is a memory in which information output to the display device 28 is stored, and this information is rewritten by the central processing unit 22.
[0066]
Further, the interface 26 constitutes a communication interface for communicating with the controllers 10-1 to 10-3.
[0067]
The input device 27 is a device for inputting a user request, and is configured from a keyboard, a pointing device, and the like. The display device 28 is a device that displays information in the display device memory 24, and is configured from, for example, a CRT. Is done.
[0068]
In the controller system according to the embodiment having the above-described configuration, as will be described in detail later, in order to automate the parameter passing between the application programs across the plurality of controllers 10-1 to 10-3 distributedly connected to the network 30 A support tool 20 for displaying the distributed controller application program as a single program using the execution processing of the program block and the application program data stored in each of the controllers 10-1 to 10-3 is provided. To do.
[0069]
In the controller system of this embodiment, information is exchanged on the network 30 by a message service, and each request is issued to the other party. This message service is used for requests from the support tool 20 to the controllers 10-1 to 10-3 and requests from the controller to other controllers.
[0070]
Each message adds the network address of the other party to the command, thereby specifying the recipient of each message. In the controller system of this embodiment, the following message service commands are prepared.
[0071]
1) Data transmission
Send command parameters
Data storage destination memory address in the remote controller
Stored data
Received response contents
Normal termination code
If the process does not complete normally for some reason, it ends in error
2) Data reception
Send command parameters
Data length
Data read destination memory address in the partner controller
Received response contents
Normal end code and read data
If the process does not complete normally for some reason, it ends in error
3) Program reading
Send command parameters
None
Received response contents
Entire application program data
If the process did not complete successfully for some reason, an error exit code
4) Program block read
Send command parameters
Program block ID number
Received response contents
If the entity is in its own controller, the normal termination code and program block
Lock data
If the entity is in another controller, the normal termination code and controller
Address and program block ID number
If the process is not completed successfully for some reason,
Card
5) Read program configuration
Send command parameters
None
Received response contents
Normal termination code and program configuration information
If the process is not completed successfully for some reason,
Card
An example of the program configuration information of the reception response for reading the program configuration is shown in FIG.
[0072]
In FIG. 4, this program configuration information is made up of individual information (block A) for all programs and a program ID number (block B) for each cycle activation. There are an ID number (field 1), a program block type (field 2), information from the program block body (field 3), and information from the program block body includes
1) Program block ID number defined in the program block start instruction included in the instruction code (when the type is a normal program block)
2) Destination program block position information (when type is I / O parameter program block)
It is included.
[0073]
Each cycle activation program ID number includes a program block ID number.
[0074]
Next, detailed operation of the controller system of this embodiment will be described in detail with reference to the flowchart shown below.
[0075]
FIG. 5 is a flowchart showing an overall processing flow in the controller 10 shown in FIG.
In FIG. 5, when the process is started following the power ON initial process of the controller 10 (step 501), the controller 10 first executes a predetermined common process (step 502), and then a program operation is possible. (Step 503).
[0076]
If it is determined that the program operation is possible (YES in step 503), the program operation process is executed (step 504), and then the I / O refresh process of the I / O memory 16 is performed (step 505). .
[0077]
If it is determined in step 503 that the program operation is not possible (NO in step 503), the I / O refresh process of the I / O memory 16 is performed without executing the program operation process (step 505).
[0078]
When the I / O refresh process of the I / O memory 16 is completed, a predetermined network process is then executed (step 506), the process returns to step 502, and the above process is repeated.
[0079]
FIG. 6 is a flowchart showing details of the network processing in step 506 shown in FIG.
In the network processing, the following processing is performed according to the reception status of the command from the support tool 20 or the other controller 10 and the status of the network processing request from the other processing. Here, the command and response reception itself is performed by interrupt processing and stored in a temporary storage area on the work memory 15.
[0080]
1) Processing according to commands from the support tool 20 and other controller 10
2) Command issue processing according to the contents of network processing requests from other processing
3) Processing according to the response to the issued command
[0081]
In FIG. 6, when this network processing is started (step 601), it is first checked whether there is a received command or a response (step 602). If it is determined that there is no received command or response (NO in step 602), the process proceeds to step 605. If it is determined that there is a received command or response (YES in step 602), each command or response is After analysis (step 603), processing for each command and response is executed (step 604).
[0082]
Here, the contents of response processing for each command are shown below. In addition to the processes shown below, there are command processes that should be possessed as a controller, but since they do not depend on the contents of this embodiment, their description is omitted here.
1) Processing for “data transmission” command
The storage data specified in the command parameter is written after the data storage memory address specified in the command parameter. When processing is completed, a normal end code is returned. However, if the process does not end normally for some reason, an error end response is returned.
[0083]
2) Processing for “data reception” command
Data corresponding to the data length is returned together with the normal end code from the read destination memory address specified in the command parameter. However, if the process does not end normally for some reason, an error end response is returned.
[0084]
3) Processing for “Read Program” command
“Application program data” is read from a predetermined location in the user program memory 13 area and returned together with a normal end code. However, if the process does not end normally for some reason, an error end response is returned. The “application program data” has a configuration like “application program data” in FIG. 25 described later.
[0085]
4) Processing for “Read Program Block” command
In accordance with the program block ID specified in the command parameter, the corresponding program block data is extracted from “application program data” in the user program memory 13 area, and is returned together with the normal end code. However, if the process does not end normally for some reason, an error end response is returned. The “application program data” has a configuration like “application program data” shown in FIG. 25 described later, and “program block data” indicates “structure of normal program block” shown in FIG. 20 described later or FIG. The “input / output parameter transmission program block structure” of FIG.
[0086]
5) Processing for "Read program configuration" command
Program configuration information (see FIG. 4) is created by the processing of “program configuration information extraction processing flow” of FIG. 16 described later, and is returned together with a normal end code. However, if the process does not end normally for some reason, an error end response is returned.
[0087]
In step 605, the network processing request item storage area is read, and then it is checked whether there is a processing request (step 606). If it is determined that there is no processing request (NO in step 606), the network processing is terminated as it is (step 610).
[0088]
If it is determined in step 606 that there is a processing request (YES in step 606), the top request in the network processing request item storage area is read (step 607), and a command corresponding to this request is generated and transmitted ( Step 608), the network processing request item is moved to the first level (step 609), and this network processing is terminated (step 610).
[0089]
FIG. 7 is a flowchart showing details of the program operation processing in step 504 shown in FIG.
In FIG. 7, when the program operation process is started (step 701), it is first checked whether it is the first execution (step 702). Here, if it is determined that it is not the first execution (NO in step 702), the process proceeds to step 704, but if it is determined that it is the first execution (YES in step 702), the program operation processing work is initialized (step 703), the process proceeds to step 704.
[0090]
In the controller system of this embodiment, there are a controller system that is activated every cycle by activation of “program operation processing” and a controller system that is activated from an arbitrary program block.
[0091]
In addition, a program block activated every cycle by activation of “program operation processing” is set by an operator at the time of programming and stored in a data information area in application program data.
[0092]
In step 704, the first record of the program block status information is read and program block execution processing is performed (step 705). Then, the next record of the program block status information is read (step 706), and it is checked whether there is a remaining program block (step 707).
[0093]
If it is determined that there are remaining program blocks (NO in step 707), the process returns to step 705, and the processing from step 705 to step 707 is repeated. If it is determined that there are no remaining program blocks (step 707). YES), the program execution process ends (step 708).
[0094]
8 and 9 are flowcharts showing details of the program block execution processing in step 705 shown in FIG.
In FIG. 8, when the program block execution process is started (step 801), first, the program block data is read (step 802), and then the type of the program block is checked (step 803).
[0095]
If it is determined that the program block is a normal block, the value of the input parameter is read from the I / O memory 16 and set as an argument to the program block execution process (step 804). Then, the program block main body is sequentially read and an execution process according to the instruction code is performed (step 805).
[0096]
Next, it is checked whether or not the instruction code has ended. If it is determined that the instruction code has not ended (NO in step 806), the process returns to step 805, and processing in steps 805 and 806 is performed until it is determined in step 806 that the instruction code has ended. If it is determined that the instruction code has ended (YES in step 806), the result of the program block execution process is set in the I / O memory 16 as the value of the output parameter, and this program block execution process is ended (step 808).
[0097]
If it is determined in step 803 that the program block is an input / output parameter transmission / reception program block, the process proceeds to FIG. 9 and the input parameter value is read from the I / O memory 16 (step 901). The data read from the I / O memory 16 by the “data transmission command” is transmitted using the input parameter position information of the “partner program position information” and “partner input / output parameter position information” stored as Wait for the return (step 902).
[0098]
Next, it is checked whether the response is normal (step 903). If it is determined that the response is normal (YES in step 903), the "partner program position information" and the "partner input / output parameter position" stored as the program body. The “data reception command” is issued using the output parameter position information of “information”, and a response is returned (step 904).
[0099]
Then, it is checked whether the response is normal (step 905). If the response is normal (YES in step 905), the response value is set in the I / O memory 16 (step 906), and the flow returns to the flowchart of FIG. The program block execution process is terminated (step 808).
[0100]
If it is determined in step 903 that the response is not normal (NO in step 903) or in step 905 that the response is not normal (NO in step 905), the program block execution process is terminated as it is (step 808). ).
[0101]
FIG. 10 is a flowchart showing overall processing in the support tool 20 shown in FIG.
In FIG. 10, when the processing of the support tool 20 is started (step 1001), first, a predetermined startup initial process is executed (step 1002), and then function selection by a user operation is performed (step 1003). .
[0102]
Next, it is checked whether the function selected by the function selection in step 1003 is a program read function (step 1004). If it is determined that the selected function is the program read function (YES in step 1004), the program read function process is executed (step 1005), and the process returns to step 1003.
[0103]
If it is determined that the function selected in step 1004 is not a program reading function (NO in step 1004), the branch to the support tool functions is performed according to the selection of other functions, and each function processing of the support tool is performed. Execute.
[0104]
Next, it is checked whether or not each function process of the support tool is completed (step 1006). If it is determined that the process is not completed (NO in step 1006), the process returns to step 1003. A predetermined end process is executed (step 1007), and the entire process flow in the support tool 20 is ended (step 1008).
[0105]
11 and 12 are flowcharts of a program read function flow showing details of the program read function processing in step 1005 shown in FIG.
In FIG. 11, when the program reading function is started (step 1101), the controller ID connected to the network is extracted from “network address information by control” of the parameter data area 23-1 in the memory space 23 of the arithmetic unit 21. (Step 1102).
[0106]
Next, the display frame (A) is opened on the screen of the display device 28, and the controllers 10-1 to 10-3 connected to the network 30 are displayed as a “controller list” (step 1103).
[0107]
An example of this “list of controllers” is, for example, as shown in FIG. 32 to be described later. In FIG. 32, the controllers connected to the network 30 are the controller (controller A) 10-1 and the controller (controller). B) 10-2 and controller (controller C) 10-3.
[0108]
Here, the operator designates a controller in the display frame (A) (step 1104).
[0109]
As a result, the address information of the corresponding controller is extracted from the “network address information for each controller” based on the controller ID number of the designated controller (step 1105).
[0110]
Then, a “program read” command is issued to the extracted address (step 1106), and a response is waited (step 1107).
[0111]
If it is determined in step 1107 that there is a response, “application program data” is read from the user program of the controller 10 selected as the response to the command (step 1108), this “application program data” is analyzed, and another display frame is analyzed. (B) is opened and "Application program structure" is displayed (step 1109).
[0112]
Here, as shown in FIG. 33, the display frame (B) shows the “application program structure” of the controller (controller A) 10-1, for example. Here, the application of the controller (controller A) 10-1 The program configuration is displayed in units of program blocks.
[0113]
Next, the operator designates a program block in the display frame (B) (step 1110).
[0114]
Then, the data of the designated program block is extracted from “application program data” as shown in FIG. 25 (step 1111), and the type of the extracted program block is checked (step 1112).
[0115]
Here, if the type of the extracted program block is the input / output parameter transmission / reception program block, the destination program block position information (the destination controller address and the destination program block ID number) is extracted from the program data block (step 1201). Next, the input parameter and the output parameter (b) are extracted from the designated program block data (step 1202), and the extracted program block ID number is parameterized to the extracted destination controller address, and “program block” is set. A read command is issued (step 1203) and a response is waited (step 1204).
[0116]
If it is determined in step 1204 that there is a response, “program block data” is read as a response to the command (step 1205), and the input parameter, output parameter, and program code list that is the program block body are further read from the program data block. As shown in FIG. 35, the new display frame (C) is opened and displayed together with (b) (step 1206).
[0117]
Next, when the operator designates reading another block, it is checked whether another program block is read (step 1207). If it is determined that another program block is read (YES in step 1207), the frame ( C) is closed (step 1208), and the process proceeds to step 1110 in FIG.
[0118]
If it is determined in step 1207 that another program block is not read (NO in step 1207), then, when the operator designates reading of another controller, it is checked whether or not another controller is designated ( Step 1209). If it is determined that another controller is designated (YES in step 1209), the frames (B) and (C) are closed (step 1210), and the process proceeds to step 1104 in FIG.
[0119]
If it is determined in step 1209 that another controller is not designated (NO in step 1209), if the operator designates the end of the function, it is checked whether the program reading function is to be terminated (step 1211). If it is determined not to end the program reading function (NO in step 1211), the process returns to step 1207. If it is determined to end the program reading function (YES in step 1211), all frames (A) to (C) is closed (step 1212), and the program block processing is terminated (step 1213).
[0120]
On the other hand, if the type of the program block extracted in step 1112 of FIG. 11 is a normal program block, the input parameter, the output parameter, and the program code list which is the program block body are extracted from the program block data, as shown in FIG. Then, a new display frame (C) is opened and displayed (step 1113), and the process proceeds to step 1207. Hereinafter, the processing in steps 1207 to 1213 is the same as the processing described above.
[0121]
FIG. 13, FIG. 14, and FIG. 15 are flowcharts of other program read function flows showing details of the program read function processing in step 1005 shown in FIG.
In FIG. 13, when the program reading function is started (step 1301), first, the controller ID connected to the network from the “network address information by control” of the parameter data area 23-1 in the memory space 23 of the arithmetic unit 21. Is extracted (step 1302).
[0122]
Next, the display frame (A) is opened on the screen of the display device 28 and displayed as a “controller list” (step 1303).
[0123]
Here, the operator designates a controller in the display frame (A) (step 1304).
[0124]
As a result, the address (a) of the corresponding controller is extracted from the “network address information for each controller” based on the controller ID number of the designated controller (step 1305).
[0125]
Then, a “program configuration read” command is issued to the extracted address (a) (step 1306), and a response is waited (step 1307).
[0126]
If it is determined in step 1307 that there is a response, this response (b), that is, the application program of the controller 10 at the extracted address is stored in the user program data area 23-2 of the memory space 23 (step 1308).
[0127]
Next, the response (b) is analyzed, another display frame (B) is opened, and “application program structure” is displayed (step 1309). Here, an example of the display frame (B) is shown in FIG.
[0128]
Here, the operator designates a program block in the display frame (B) (step 1310). Then, moving to FIG. 14, the type of the extracted program block is determined (step 1401).
[0129]
If it is determined in step 1401 that the extracted program block is a normal program block, a “program block read” command is issued to the address (a) with the program block ID number as a parameter (step 1402). Then, the system waits for a response (step 1403). If there is a response, "program block data" is read as a response to the command (step 1404).
[0130]
Next, an input parameter, an output parameter, and a program code list which is a program block body are extracted from the program data block, and a new display frame (C) is opened and displayed as shown in FIG. 34 (step 1405). Proceed to 15 step 1501.
[0131]
On the other hand, if it is determined in step 1401 of FIG. 14 that the extracted program block is an input / output parameter transmission / reception program block, a “program block read” command is issued to the destination controller address with the program block ID number as a parameter. (Step 1406). Then, the system waits for a response (step 1407). If there is a response, "program block data" is read as a response to the command (step 1408).
[0132]
Then, an input parameter, an output parameter, and a program code list which is a program block body are extracted from the program data block, and an input parameter and an output parameter of the designated program block are extracted from (b), as shown in FIG. Then, a new display frame (C) is opened and displayed (step 1409), and the process proceeds to step 1501 in FIG.
[0133]
In step 1501, when the operator designates reading another block, it is checked whether another program block is read. If it is determined that another program block is read (YES in step 1501), the frame (C) is read. Close (step 1502), the process proceeds to step 1310 in FIG.
[0134]
If it is determined in step 1501 that another program block is not read (NO in step 1501), next, when the operator designates reading of another controller, it is checked whether or not another controller is designated ( Step 1503). If it is determined that another controller is designated (YES in step 1503), the frames (B) and (C) are closed (step 1504), and the process proceeds to step 1304 in FIG.
[0135]
If it is determined in step 1503 that another controller is not designated (NO in step 1503), if the operator designates the end of the function, it is checked whether the program reading function is to be terminated (step 1505). If it is determined not to end the program reading function (NO in step 1505), the process returns to step 1501, but if it is determined to end the program reading function (YES in step 1505), all frames (A) to (C) is closed (step 1506), and the program block processing is terminated (step 1507).
[0136]
Next, a method for extracting configuration information from application program data and a method for creating a display image from the configuration information will be described.
[0137]
FIG. 16 is a flowchart of a program configuration information extraction process flow showing a method for extracting configuration information from application program data. This process is performed by the controller in the support tool in the examples of FIGS. 11 and 12 and the “read program configuration” command process in the examples of FIGS.
[0138]
In FIG. 16, when the program configuration information extraction process is started (step 1601), first, data of individual program blocks is sequentially extracted from the data area information of the application program (step 1602).
[0139]
Next, a “program block ID number” and a “program block type” are extracted from the program block identifier and stored as part of the configuration information (fields 1 and 2 of each record of block A) (step 1603).
[0140]
Then, the type of the extracted program block is checked (step 1604). If it is determined that the type of the extracted program block is the input / output parameter transmission / reception program block, the destination program block position information is extracted from the program block body and stored as a part of the configuration information (in block A). Field 3) of each record (step 1605).
[0141]
Next, it is checked whether the extracted program block is the final program block (step 1611). If the extracted program block is not the final program block (NO in step 1611), the process returns to step 1602, but the extracted program block is the final program block. If it is determined that the block is a block (YES in step 1611), the program block ID number of the list information of program blocks executed for each cycle is extracted from the information area of the application program and stored as a part of the configuration information ( After the fields 1 to N of block B) (step 1612), the program configuration information extraction process is terminated (step 1613).
[0142]
On the other hand, if it is determined in step 1604 that the type of the extracted program block is a normal program block, the program block body is read (step 1606), and the instruction code is sequentially analyzed (step 1607).
[0143]
Then, it is checked whether the analyzed instruction code is a program block start instruction (step 1608). If it is determined that the instruction is not a program block start instruction (NO in step 1608), the process proceeds to step 1610. If it is determined that the analyzed instruction code is a program block start instruction (YES in step 1608), the process proceeds to step 1610. The program block ID number to be activated is extracted from the instruction code and stored as a part of the configuration information (field 3 of each record of block A) (step 1609), and the process proceeds to step 1610.
[0144]
The program block activation instruction is an instruction for designating an arbitrary program block and starting activation of the program block. The instruction code is divided into two configurations of an operation code and an operand. The operation code is a code indicating that this instruction is a program block activation instruction, and the operand stores the ID number of the program block to be activated.
[0145]
In step 1610, it is checked whether the instruction code is completed. If it is determined that the instruction code has not ended (NO in step 1610), the process returns to step 1607. If it is determined that the instruction code has ended, the process proceeds to step 1611.
[0146]
Then, it is checked whether the extracted program block is the final program block (step 1611). If the extracted program block is not the final program block (NO in step 1611), the process returns to step 1602, but the extracted program block is the final program block. If it is determined (YES in step 1611), the program block ID number of the list information of the program blocks executed for each cycle is extracted from the information area of the application program and stored as a part of the configuration information (block B fields 1 to N) (step 1612), the program configuration information extraction process is terminated (step 1613).
[0147]
FIG. 17 is a flowchart of a program configuration display generation processing flow showing a technique for creating a display image (see FIG. 29) from configuration information (see FIG. 4) extracted from application program data.
[0148]
In FIG. 17, when the program configuration display generation process is started (step 1701), first, the program ID is extracted from the block B of the program configuration information and used as the upper display element (step 1702).
[0149]
Next, the record corresponding to the upper display element is searched from the block A of the program configuration information (matching with field 1 of each record) (step 1703).
[0150]
Then, field 2 of the corresponding record is examined (step 1704). Here, if it is determined that the field 2 of the corresponding record is an input / output parameter transmission / reception program block, the controller address of the destination program block position information is extracted from the field 3, and the controller ID is extracted from the “network address information by controller”. After conversion, it is added to the right of the current display element (step 1705).
[0151]
Next, the partner program block ID number is extracted from field 3 and added to the right of the current display element (step 1706), and it is checked whether the upper display element is final (step 1714). If it is determined that the upper display element is not final (NO in step 1714), the next display element is read (step 1715), and the process returns to step 1703, but if the upper display element is determined to be final. (YES in step 1714), the program configuration display generation process is terminated (step 1716).
[0152]
On the other hand, if it is determined in step 1704 that field 2 of the corresponding record is a normal program block, the partner program block ID number is extracted from field 3 and added to the next line as a lower display element (step 1707).
[0153]
Then, a record corresponding to the lower display element is searched from the block A of the program configuration information (matching with field 1 of each record) (step 1708).
[0154]
Next, field 2 of the corresponding record is examined (step 1709). If it is determined that field 2 of the corresponding record is a normal program block, the process proceeds to step 1712. If field 2 of the corresponding record is determined to be an input / output parameter transmission / reception program block, the counterpart of field 3 is determined. The controller address of the previous program block position information is extracted, converted to a controller ID from “network address information for each controller”, and added to the right of the current display element (step 1710).
[0155]
Next, the partner program block ID number is extracted from field 3 and added to the right of the current display element (step 1711), and it is checked whether the lower display element is final (step 1712). If it is determined that the lower display element is not final (NO in step 1712), the next display element is read (step 1713), and the process returns to step 1708, but if the lower display element is determined to be final. (YES in step 1712), the process proceeds to step 1714.
[0156]
If it is determined in step 1714 that the upper display element is not final (NO in step 1714), the next display element is read (step 1715), and the process returns to step 1703, but it is determined that the upper display element is final. If so (YES in step 1714), the program structure display generation process ends (step 1716).
[0157]
Next, a specific example of the structure of the physical application program of the controller system of this embodiment will be described.
[0158]
FIG. 18 is a diagram showing an example of the structure of a physical application program in the controller system of this embodiment shown in FIG.
[0159]
In FIG. 18, in the physical application program in the controller system of this embodiment, the application program of the controller (controller A) 10-1 is composed of six program blocks PB10 to PB15. Here, the program block PB10 and the program blocks PB13 and PB14 have a hierarchical structure, and the program block PB11 and the program blocks PB14 and PB15 also have a hierarchical structure.
[0160]
The application program of the controller (controller B) 10-2 is composed of two program blocks, program blocks PB20 and PB21, and the application program of the controller (controller C) 10-3 is one of the program blocks PB30. It consists of program blocks.
[0161]
Here, the program block PB12 of the controller (controller A) 10-1 passes data as an input parameter to the program block PB30 of the controller (controller C) 10-3, and the calculation result of the program block PB30, that is, the output parameter is set. A program block to receive.
[0162]
The program block PB13 of the controller (controller A) 10-1 passes data as an input parameter to the program block PB20 of the controller (controller B) 10-2, and receives an operation result of the program block PB20, that is, an output parameter. It is a program block.
[0163]
The program block PB14 of the controller (controller A) 10-1 passes data as an input parameter to the program block PB21 of the controller (controller B) 10-2, and receives an operation result of the program block PB21, that is, an output parameter. It is a program block.
[0164]
FIG. 19 is a diagram showing the structure of a logical application program corresponding to the structure of the physical application program shown in FIG.
In FIG. 19, the application program of the controller (controller A) 10-1 is composed of six program blocks of program blocks PB10, PB11, PB15, PB20, PB21, and PB30 as a logical application program structure.
[0165]
Here, the program block PB10 and the program blocks PB20 and PB21 have a hierarchical structure, and the program block PB11 and the program blocks PB21 and PB15 also have a hierarchical structure.
[0166]
The entities of the program blocks PB20 and PB21 exist in the controller (controller B) 10-2, and the entity of the program block PB30 exists in the controller (controller C) 10-3.
[0167]
FIG. 20 is a diagram showing a specific example of the structure of a normal program block adopted in the controller system of this embodiment.
In FIG. 20, the normal program block employed in the controller system of this embodiment is composed of “program block identifier”, “input parameter”, “output parameter”, and “program block body”.
[0168]
Here, the “program block identifier” is composed of “program block type” and “program block ID number”, and “normal program block” is stored in “program block type”. Further, a unique number in the controller is assigned to the “program block ID number”.
[0169]
The “input parameter” stores an input parameter for executing the “program block body”, and the “output parameter” stores an output parameter as an execution result of the “program block body”.
[0170]
The “program block main body” stores program codes executed when a program block such as a ladder program is activated.
[0171]
FIG. 21 is a diagram showing a specific example of the structure of the input / output parameter transmission / reception program block employed in the controller system of this embodiment.
In FIG. 21, the input / output parameter transmission / reception program block employed in the controller system of this embodiment is composed of “program block identifier”, “input parameter”, “output parameter”, and “program block body”.
[0172]
Here, the “program block identifier” includes “program block type” and “program block ID number”, and “program block type” stores “input / output parameter transmission / reception program block”. Further, a unique number in the controller is assigned to the “program block ID number”.
[0173]
The “input parameter” stores an input parameter to be transmitted to the partner, and the “output parameter” stores an output parameter corresponding to the execution processing result received from the partner.
[0174]
The “program block body” stores “position information of the other party” for transmitting and receiving input / output parameters. Here, the “destination location information” includes “destination program block location information” and “destination input / output parameter location information”, and “destination program location block information” is “controller location information”. It consists of “address” and “program block ID number”. Here, “destination input / output parameter position information” is a position at the destination controller for transmitting and receiving input / output parameters.
[0175]
FIG. 22 is a diagram showing a specific example of the program block data of the program block PB10 shown in FIG.
In FIG. 22, “normal program block” is stored as “program block type” of “program block identifier” and “PB10” is stored as “program block ID number” in the program block data of the program block PB10.
[0176]
Further, “DM0000” is stored as “input parameter”, and “DM0001” is stored as “output parameter”. In FIG. 22, the program code of “program block body” is omitted.
[0177]
FIG. 23 is a diagram showing a specific example of the program block data of the program block PB13 shown in FIG.
In FIG. 23, the program block data of the program block PB13 stores “input / output parameter transmission / reception program block” as “program block type” of “program block identifier”, and “PB13” as “program block ID number”. The
[0178]
In addition, “DM2000” is stored as “input parameter”, and “DM2001” is stored as “output parameter”.
[0179]
In addition, “controller B” is stored in “controller address” of “program block position information of destination program” of “program block body”, and “PB20” is stored in “program block ID number”. .
[0180]
Further, “CM0000” is stored as “input” and “CM0001” is stored as “output” in “partner input / output parameter position information” of “program block body”.
[0181]
FIG. 24 is a diagram showing a specific example of the program block data of the program block PB20 shown in FIG.
In FIG. 24, “normal program block” is stored as “program block type” of “program block identifier”, and “PB20” is stored as “program block ID number” in the program block data of the program block PB20.
[0182]
Further, “CM0000” is stored as “input parameter”, and “CM0001” is stored as “output parameter”. In FIG. 24, the program code of “program block body” is omitted.
[0183]
FIG. 25 is a diagram showing a specific example of application program data employed in the controller system shown in FIG.
In FIG. 25, the data area information of the application program data indicates the data structure of the application program data, and the storage location for each program block is described. Also, list information of program blocks activated every cycle is stored here.
[0184]
Here, in the data of the program blocks PB10 to PB15, instruction word groups executed in the program operation process are stored in the order of execution.
[0185]
FIG. 25 shows a specific example of the application program data of the controller (controller A) 10-1, but the application program data of the controller (controller B) 10-2 and the controller (controller C) 10-3 is also the same. Composed.
[0186]
FIG. 26 is a diagram showing a specific example of an application program data table employed in the controller system shown in FIG.
In FIG. 26, this application program data table is stored in the support tool 24, and the data area information of this application program data table indicates the data structure of the application program data table, and the storage location for each application program data is described. ing.
[0187]
In this example, application program data of the controller (controller A) 10-1 to the controller (controller C) 10-3 exists as application program data. However, when the number of controllers connected to the network 30 increases, the data is similarly displayed. An area is added.
[0188]
The application program data has the same structure as the application program data stored for each controller.
[0189]
FIG. 27 is a diagram showing a specific example of program block status information employed in the controller system shown in FIG.
In FIG. 27, the program block status information includes “program block ID number” and “status”.
[0190]
Here, “program block ID number” is an identifier of the program block, and “status” indicates the state of the corresponding program block and the state instruction.
[0191]
This information is information for controlling the execution of each program block in the controller, and is generated in the work memory 15 of FIG. The state is stored for the program block IDs of all the program blocks that are executed in each cycle.
[0192]
At the first time of the program operation process, all program blocks are generated and stored in the work memory 15 as activation, and each program block is executed or stopped according to the contents of this work area in the program operation process.
[0193]
FIG. 28 is a diagram showing a specific example of the network address information for each controller adopted in the controller system shown in FIG.
In FIG. 28, the network address information for each controller includes “controller ID” and “address”. This information is stored in the work memory 15 of FIG.
[0194]
Here, “controller ID” indicates an identifier of a controller connected to the network 30, and “address” indicates an address on the network 30 of each controller.
[0195]
This information indicates an address on the network 30 of the controller connected to the network, and is stored in the parameter data area 23-1 of the memory space 23 of the support tool 20.
[0196]
FIG. 29 shows a specific example of a part of the program block body of the program block PB10, and FIG. 30 shows a specific example of a part of the program block body of the program block PB11.
[0197]
FIG. 31 shows an example of the display screen of the display device 28 of the support tool 20 shown in FIG.
In FIG. 31, the display screen of the display device 28 of the support tool 20 is a user who divides the entire screen into display windows of “controller list”, “application program structure”, and “program block information” and displays them in a plurality of frames. Configure the interface.
[0198]
FIG. 32 shows a specific display example of the support tool 20 of the “controller list” shown in FIG. 31, and FIG. 33 shows specific support of the “application program configuration” shown in FIG. 34 shows a display example of the tool 20, FIG. 34 shows a display example of the specific support tool 20 of the “program block information” shown in FIG. 31, and FIG. 35 shows the display of FIG. In addition, another display example of the specific support tool 20 of “program block information” is shown.
[0199]
Now, a specific operation example of the controller system of this embodiment based on the above configuration will be described below.
(Program block execution processing)
As shown in FIG. 1, the controller system of this embodiment includes three controllers, that is, a controller (controller A) 10-1, a controller (controller B) 10-2, and a controller (controller C) 10-3. The support tool 20 is connected to the network 30.
[0200]
Each of the controllers, that is, the controller (controller A) 10-1, the controller (controller B) 10-2, and the controller (controller C) 10-3 has the physical application program structure shown in FIG. The program blocks divided in this way are stored.
[0201]
Each program block includes one that is activated every cycle by activation of “program operation processing” in each controller, and one that is activated from an arbitrary program block. In this embodiment, the controller (controller A) 10 -1 program block PB10, PB11, PB12, controller (controller B) 10-2 program block PB20, PB21, controller (controller C) 10-3 program block PB30 corresponds to the former, controller (controller A) 10-1. The program blocks PB13, PB14, and PB15 correspond to the latter.
[0202]
A program block that is activated every cycle by the activation of “program operation processing” is set by an operator at the time of programming, and is stored in a data information area in “application program data” shown in FIG.
[0203]
The program block activated every cycle is activated every cycle as shown in the “program operation processing flow (controller)” shown in FIG. 7, and the “program block execution processing flow” shown in FIGS. Is executed.
[0204]
A program block started from an arbitrary program block is a program block main body such as a part of the program block main body of the program block PB10 shown in FIG. 29 or a part of the program block main body of the program block PB11 shown in FIG. It is started from the program code. [PB13] and [PB15] shown in these examples represent instruction codes for starting the program block, and the data of the started program block is user program memory such as “application program data” shown in FIG. 13 is stored.
[0205]
Note that the processing content of a program block activated from an arbitrary program block is the “program block execution processing flow” shown in FIGS.
[0206]
The program blocks PB10, PB11 and PB15 of the controller (controller A) 10-1, the program blocks PB20 and PB21 of the controller B, and the program block PB30 of the controller C are normal program blocks. The program code to be executed is stored, and at startup, the program block main body programmed in advance by the operator is executed with the input parameter values shown in “Structure of normal program block” as shown in FIG. , And return the result to the output parameter.
[0207]
Program blocks PB12, PB13, and PB14 of the controller A are input / output parameter transmission / reception program blocks. At the time of activation, the input parameter values shown in “Structure of the input / output parameter transmission / reception program block” shown in FIG. Using the stored partner program position information and the partner input / output parameter, the program is stored in the input parameter of the program block of the partner controller.
[0208]
Also, the output parameter of the partner controller is read and stored in the output parameter of its own program block.
[0209]
The detailed operation of the program block PB13 of the controller A and the program block PB20 of the controller B will be described below as an example.
[0210]
In the program block PB13 of the controller A, information such as “program block data of PB13” shown in FIG. 23 is stored in the user program memory 13 of the controller A as a part of the application program.
[0211]
Here, the input parameter “DM2000” and the output parameter “DM2001” are addresses on the I / 0 memory 16 of the controller A. Also, “CM0000” and “CM0001” of the destination input / output parameter position information are addresses on the I / 0 memory 16 of the controller B.
[0212]
In the program block PB20 of the controller B, information such as “program block data of PB20” shown in FIG. 24 is stored in the user program memory 13 of the controller B as a part of the application program.
[0213]
In the controller A, when the program block PB13 is activated in the user program execution process, the value of the input parameter “DM2000” is stored in the “CM0000” of the controller B. This is done by a message service “send data” command.
[0214]
Similarly, the data of “CM0001” of the controller B is read and stored in “DM2001” which is an output parameter. This is performed by a “data reception command” of the message service.
[0215]
In the controller B, when the program block PB20 is activated in the user program execution process, the program code of the program block body is executed using the value of “CM0000” as a parameter, and the execution result is stored in the output parameter “CM0001”. Is done.
[0216]
As a method for processing the input / output parameter transmission / reception program block, there is a method in which a program for transmission / reception is stored in the program block main body and executed in the same manner as a normal program block, thereby obtaining the same effect as the above configuration. Conceivable.
[0217]
Further, in the above embodiment, the message service method is used as the data transmission / reception method using the input / output parameter transmission / reception program block. However, the data link method (or common memory method) that realizes a shared memory among a plurality of controllers via a network. ) Can be used for the same configuration.
(Program display by support tool I)
The support tool 20 has a user interface such as the “support tool display configuration” shown in FIG. 31 that divides the entire screen into a plurality of frames for display on the display device 28. The “support tool display configuration” in FIG. 31 is an image of screen display in this embodiment.
[0218]
Here, the operator activates the “program reading function” by the support tool 20.
[0219]
When the “program reading function” is activated, the support tool 20 extracts the controller ID connected to the network 30 from the “network address information for each controller” shown in FIG. 28 stored in the parameter data area 23-1. Controllers connected to the network such as the “support tool display example (controller list)” shown in FIG. 32 are displayed as a list.
[0220]
Here, the operator selects a controller from which the application program is to be read. Note that the “support tool display example (controller list)” in FIG. 32 shows an example in which the controller A is selected.
[0221]
The support tool 20 reads an application program from the selected controller by a message service. This is performed by the “program read command” of the message service.
[0222]
The support tool 20 stores the application program read from the controller, analyzes the data, and divides the structure of the program block into frames that are divided into screens as shown in “support tool display frame example (application program configuration)” in FIG. indicate.
[0223]
Here, the “support tool display frame example (application program configuration)” in FIG. 33 is an example in which the application program configuration of the controller A is displayed in units of program blocks.
[0224]
When analyzing the data of the application program, if the program block is an input / output parameter transmission / reception program block, the program blocks PB12, PB13, and PB14 in the “support tool display frame example (application program configuration)” in FIG. The partner controller and program block, such as the display format, are also displayed.
[0225]
The method of extracting the configuration information from the application program data and the method of creating a display image from the configuration information are the “program configuration information extraction process flow” shown in FIG. 16 and the “program structure display generation process flow” shown in FIG. It is shown in.
[0226]
The operator selects a program block for which information is to be displayed from among the displayed program blocks. The “support tool display frame example (application program structure)” in FIG. 33 shows an example in which the program block PB10 is selected.
[0227]
The support tool extracts and analyzes the selected program block data from the previously read application program of the controller A, and displays the information in a frame that is divided into screens. The “support tool display example (program block information PB10)” in FIG. 34 is an example in which information on the program block of the program block PB10 is displayed.
[0228]
Here, since the program block PB10 is a normal program block, the data of the program block becomes “program block data of PB10” shown in FIG. 22, and information displayed in the frame includes input parameters and output parameters. , And a program code list which is a program block body.
[0229]
When the operator selects the program block PB13 in the “support tool display frame example (application program configuration)” of FIG. 33 in the same manner as the program block PB10, the following occurs.
[0230]
The support tool 20 extracts and analyzes the program block data of the program block PB13. Here, since the program block PB13 is an input / output parameter transmission / reception program block, the data of the program block is as shown in “program block data of PB13” in FIG.
[0231]
The support tool 20 reads the program block data of the program block PB20 from the controller B based on the counterpart program block position information stored in the program block body. This is performed by the “program block read command” of the message service.
[0232]
The read program block data becomes “PB20 program block data” in FIG. 24. Since the program block PB20 is a normal program block, this is analyzed and combined with the information of the program block PB13, “support tool display example” in FIG. (Program block information PB20) ", and the program block information is displayed in the frame.
[0233]
As a result, the worker can actually recognize the application program configuration configured as “physical application program structure” in FIG. 18 as “logical application program structure” in FIG. 19. Become.
(Program display by support tool II)
The support tool 20 has a user interface such as the “support tool display configuration” shown in FIG. 31 that divides the entire screen into a plurality of frames for display on the display device 28. The “support tool display configuration” in FIG. 31 is an image of screen display in this embodiment.
[0234]
Here, the operator activates the “program reading function” by the support tool 20.
When the “program reading function” is activated, the support tool 20 extracts the controller ID connected to the network 30 from the “network address information for each controller” shown in FIG. 28 stored in the parameter data area 23-1. Controllers connected to the network such as the “support tool display example (controller list)” shown in FIG. 32 are displayed as a list.
[0235]
Here, the operator selects a controller from which the application program is to be read. Note that the “support tool display example (controller list)” in FIG. 32 shows an example in which the controller A is selected.
[0236]
The support tool 20 reads the configuration of the application program from the controller using a message service. This is performed by a “program configuration read command” of the message service.
[0237]
The support tool 20 stores the configuration information of the application program read from the controller, analyzes the data, and divides the program block structure into screens as shown in “Example of support tool display frame (application program configuration)” in FIG. Displayed in the selected frame.
[0238]
Here, the “support tool display frame example (application program configuration)” in FIG. 33 is an example in which the application program configuration of the controller A is displayed in units of program blocks.
[0239]
A method of creating a display image from the configuration information of the application program is shown in “Program structure display generation processing flow” in FIG.
[0240]
The operator selects a program block for which information is to be displayed from among the displayed program blocks. Note that “example of support tool display frame (application program configuration)” in FIG. 33 shows an example in which the program block PB10 is selected.
[0241]
The support tool 20 reads information on the designated program block from the controller. This is performed by the “program block read command” of the message service.
[0242]
Data of the read program block is extracted and analyzed, and the information is displayed on the divided frames. The “support tool display example (program block information PB10)” in FIG. 34 is an example in which information on the program block of the program block PB10 is displayed.
[0243]
Since the program block PB10 is a normal program block, the data of the program block read from the controller A is as shown in “program block data of PB10” in FIG. 22, and information displayed in the frame includes input parameters, output parameters, And a program code list which is a program block body.
[0244]
When the operator selects the program block PB13 in the “support tool display frame example (application program configuration)” of FIG. 33 in the same manner as the program block PB10, the following occurs.
[0245]
The support tool 20 reads the data of the program block PB13 from the controller A and analyzes it. Since the program block PB13 is an input / output transmission / reception program block, the data of the program block is as shown in “program block data of PB13” in FIG.
[0246]
The support tool 20 reads the program block data of the program block PB20 from the controller B based on the counterpart program block position information stored in the program block body. This is performed by the “program block read command” of the message service.
[0247]
The read program block data becomes “PB20 program block data” in FIG. 24. Since the program block PB20 is a normal program block, this is analyzed and combined with the information of the program block PB13, “support tool display example” in FIG. (Program block information PB20) ", and the program block information is displayed in the frame.
[0248]
As a result, the worker can actually recognize the application program configuration configured as “physical application program structure” in FIG. 18 as “logical application program structure” in FIG. 19. Become.
[0249]
【The invention's effect】
As described above, according to the present invention, the following effects can be obtained.
1) Since the structure of an application program across a plurality of controllers can be logically recognized, recognition by an operator is facilitated and work errors are eliminated.
[0250]
2) Since predetermined portions of application programs stored in a plurality of controllers are automatically displayed according to a logical program structure, work operations that have been repeated for each conventional controller and for each program block are repeated. Can be simplified, and the work efficiency at the time of debugging / maintenance of equipment is greatly improved.
[0251]
3) Application programs that span multiple controllers can be logically displayed using only the application data stored in the controller without any special configuration information. There is no burden.
[0252]
4) Displaying a plurality of controller application programs with a logical structure eliminates the need for special configuration information, reduces the hardware resource burden on the support tool side, and makes it easier to provide a lower cost support tool.
[0253]
5) Since transmission / reception of data via the network is realized only by defining parameters to the program block, the burden on the designer is reduced, and the data transmission / reception unit is aggregated into a specific program block. An easy-to-understand design becomes possible.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an overall configuration of an embodiment of a controller system according to the present invention.
FIG. 2 is a block diagram showing a detailed configuration of a controller of the controller system shown in FIG.
FIG. 3 is a block diagram showing a detailed configuration of a support tool of the controller system shown in FIG. 1;
FIG. 4 is a diagram illustrating an example of program configuration information of a reception response to program configuration reading.
FIG. 5 is a flowchart showing an overall processing flow in the controller shown in FIG. 2;
6 is a flowchart showing details of the network processing shown in FIG. 5. FIG.
FIG. 7 is a flowchart showing details of the program operation process shown in FIG.
FIG. 8 is a flowchart (part 1) showing details of the program block execution process shown in FIG. 7;
FIG. 9 is a flowchart (part 2) showing details of the program block execution process shown in FIG. 7;
FIG. 10 is a flowchart showing an overall processing flow in the support tool shown in FIG. 2;
FIG. 11 is a flowchart (part 1) of a program read function flow showing details of the program read function process shown in FIG. 10;
12 is a flowchart (part 2) of the program read function flow showing details of the program read function process shown in FIG. 10;
FIG. 13 is a flowchart (part 1) of another program read function flow showing details of the program read function process in step 1005 shown in FIG. 10;
FIG. 14 is a flowchart (No. 2) of another program read function flow showing the details of the program read function process in step 1005 shown in FIG. 10;
FIG. 15 is a flowchart (No. 3) of another program read function flow showing the details of the program read function processing in Step 1005 shown in FIG. 10;
FIG. 16 is a flowchart of a program configuration information extraction processing flow showing a method for extracting configuration information from application program data.
FIG. 17 is a flowchart of a program configuration display generation process flow showing a method of creating a display image from configuration information extracted from application program data.
FIG. 18 is a diagram showing an example of the structure of a physical application program in the controller system of the embodiment shown in FIG. 1;
FIG. 19 is a diagram showing a logical application program structure corresponding to the physical application program structure shown in FIG. 18;
FIG. 20 is a diagram showing a specific example of the structure of a normal program block employed in the controller system of this embodiment.
FIG. 21 is a diagram showing a specific example of the structure of an input / output parameter transmission / reception program block employed in the controller system of this embodiment.
FIG. 22 is a diagram showing a specific example of program block data of the program block PB10 shown in FIG.
FIG. 23 is a diagram showing a specific example of program block data of the program block PB13 shown in FIG.
FIG. 24 is a diagram showing a specific example of program block data of the program block PB20 shown in FIG.
25 is a diagram showing a specific example of application program data employed in the controller system shown in FIG.
FIG. 26 is a diagram showing a specific example of an application program data table employed in the controller system shown in FIG.
27 is a diagram showing a specific example of program block status information adopted in the controller system shown in FIG.
FIG. 28 is a diagram showing a specific example of network address information for each controller adopted in the controller system shown in FIG.
29 is a diagram showing a specific example of part of the program block main body of program block PB10 shown in FIG.
30 is a diagram showing a specific example of part of the program block main body of program block PB11 shown in FIG.
31 is a diagram showing an example of a display screen of the display device 28 of the support tool 20 shown in FIG.
32 is a diagram showing a display example of a specific support tool of the “controller list” shown in FIG. 31;
FIG. 33 is a diagram showing a display example of a specific support tool of “application program structure” shown in FIG. 31;
34 is a diagram showing a display example of a specific support tool of “program block information” shown in FIG. 31. FIG.
FIG. 35 is a diagram showing another display example of the specific support tool of “program block information” shown in FIG. 31;
[Explanation of symbols]
10-1 Controller (Controller A)
10-2 Controller (Controller B)
10-3 Controller (Controller C)
11 Arithmetic Processor (CPU)
12 System program memory
13 User program memory
14 Parameter memory
15 Work memory
16 Input / output memory (I / O memory)
17 Communication interface (communication I / F)
18 I / O interface (I / F)
19 I / O devices
20 Support tools
21 Arithmetic unit
22 Central processing unit
23 Memory space
23-1 Parameter data area
23-2 User program data area
23-3 Support tool program area
24 Memory for display device
25 bus
26 Interface (I / F)
27 Input device
28 Display device
30 network

Claims (2)

複数のプログラマブルコントローラを通信手段を介して相互に接続してなるプログラマブルコントローラシステムであって、
前記プログラマブルコントローラのそれぞれには、
それぞれユーザの作成するアプリケーションプログラムであるプログラムブロックを1又は2以上に亘り格納可能なユーザプログラムメモリと、センサやスイッチなどに接続される入力装置と、モータやアクチュエータなどに接続される出力装置とを組み合わせた入出力装置との間でやり取りされる入出力パラメータを格納するための入出力メモリと、中央演算装置とが含まれており、かつ、
前記中央演算装置においては、前記ユーザプログラムメモリに格納されたプログラムブロックを順次に読み出して実行するプログラム実行処理を含むプログラムブロック運転処理と、前記入出力装置と入出力メモリとの間で入出力パラメータの更新を行う入出力リフレッシュ処理と、前記通信手段を介して他のプログラマブルコントローラとの間でコマンドやレスポンスのやり取りを行うためのネットワーク処理とが、サイクリックに実行されるように仕組まれており、
前記プログラムブロックのそれぞれは、プログラムブロック識別子と、入出力パラメータ指定データと、プログラムブロック本体とを含んでおり、かつ
前記プログラムブロック実行処理は、
前記ユーザプログラムメモリから読み出されるプログラムブロックが前記プログラムブロック識別子に基づいてノーマルプログラムブロックと識別されときには、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入力パラメータを前記入出力メモリから読み出して一次記憶させると共に、この一次記憶させた入力パラメータを使用して、前記プログラムブロック本体を構成する命令コード列に従った実行処理を行って出力パラメータを生成して一次記憶すると共に、実行処理の終了を待って、一次記憶された出力パラメータを、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入出力メモリ内の出力パラメータを書き替える第1のプログラムブロック実行処理と、
前記ユーザプログラムメモリから読み出されるプログラムブロックが前記プログラムブロック識別子に基づいて入出力パラメータ送受信プログラムブロックと識別されときには、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入力パラメータを前記入出力メモリから読み出し、これを前記プログラムブロック本体を構成するプログラマブルコントローラのアドレスおよびプログラムブロックID番号から構成される相手先プログラム位置情報と前記入力パラメータの送信先である相手先プログラムブロックの相手先入力パラメータ位置情報とを含むデータ送信コマンドとしてネットワーク上に送信する一方、前記相手先プログラム位置情報で指定されるプログラマブルコントローラがこれを受信し、前記入力パラメータを相手先グラムブロックの相手先入力パラメータへ書き込み処理を完了したことを示す正常レスポンスをネットワーク上に送信し、前記入出力パラメータ送受信プログラムブロックがそのレスポンス受信したときには、前記入出力パラメータ指定データで指定される入出力メモリの出力パラメータを前記プログラムブロック本体を構成する前記相手先プログラム位置情報と前記相手先出力パラメータ位置情報とを含むデータ受信コマンドネットワーク上に送信し、前記相手先プログラム位置情報で指定されるプログラマブルコントローラが前記受信コマンドを受信するとその相手先プログラムブロックのプログラムブロック本体を構成する命令コード列に従った実行処理結果である相手先出力パラメータの値を正常レスポンスとしてネットワーク上に送信し、前記入出力パラメータ送受信プログラムブロックがそのレスポンスを受信すると前記入出力パラメータ指定データで指定される入出力メモリの出力パラメータとして書き替える第2のプログラムブロック実行手段とを含み、
それにより、ユーザプログラムメモリ中に入出力パラメータ送受信プログラムブロックを含ませることにより、当該プログラマブルコントローラのノーマルプログラムブロックの実行の際に、他のプログラマブルコントローラの入出力メモリから取得した入出力パラメータの値を使用可能とした、ことを特徴とするプログラマブルコントローラシステム。
A programmable controller system comprising a plurality of programmable controllers connected to each other via communication means,
Each of the programmable controllers includes
A user program memory that can store one or more program blocks, each of which is an application program created by a user, an input device connected to a sensor, a switch, etc., and an output device connected to a motor, an actuator, etc. An input / output memory for storing input / output parameters exchanged with the combined input / output device, a central processing unit, and
In the central processing unit, program block operation processing including program execution processing for sequentially reading and executing the program blocks stored in the user program memory, and input / output parameters between the input / output device and the input / output memory I / O refresh processing for updating the network and network processing for exchanging commands and responses with other programmable controllers via the communication means are structured to be executed cyclically. ,
Each of the program blocks includes a program block identifier, input / output parameter designation data, and a program block body, and the program block execution process includes:
The sometimes program block read from the user program memory is identified as the program block identifier Based on the normal program block reads the input parameters specified by the input parameter specifying data included in the program block from the input memory Using the input parameters that are stored in a primary manner, performing an execution process in accordance with an instruction code string that constitutes the program block body, generating an output parameter, and temporarily storing the output parameters. A first program block execution process for rewriting the output parameter in the input / output memory designated by the input / output parameter designation data included in the program block, the output parameter temporarily stored after waiting for completion;
When a program block read from the user program memory is identified as an input / output parameter transmission / reception program block based on the program block identifier, an input parameter specified by input / output parameter specifying data included in the program block is input to the input / output memory. , The destination program position information consisting of the address of the programmable controller constituting the program block body and the program block ID number, and the destination input parameter position information of the destination program block to which the input parameters are transmitted while transmitting to the network as a data transmission command including bets, it receives the programmable controller so designated by the destination program location information, the input path The normal response indicating that the meter has completed the write process to the destination input parameter of a destination grams block transmitted on the network, sometimes the input and output parameters transceiver program block receives the response, the input parameter specified data It transmits the data reception command on the network, including in the destination program position information output parameters of the input and output memory specified constituting the program block body and said destination output parameter position information, the destination program location When the programmable controller that is specified by the information receives said received command and normal response to the instruction code is executed processing results according to the column value of the destination output parameter of the program block body of the partner program block Te is sent over the network, and a write replacing the second program block execution means as an output parameter of the input and output memory in which the input and output parameters transceiver program block specified by the received result the input and output parameters specifying data the response,
As a result, by including the input / output parameter transmission / reception program block in the user program memory, the value of the input / output parameter acquired from the input / output memory of another programmable controller is executed when the normal program block of the programmable controller is executed. A programmable controller system characterized by being usable.
それぞれユーザの作成するアプリケーションプログラムであるプログラムブロックを1又は2以上に亘り格納可能なユーザプログラムメモリと、センサやスイッチなどに接続される入力装置と、モータやアクチュエータなどに接続される出力装置とを組み合わせた入出力装置との間でやり取りされる入出力パラメータを格納するための入出力メモリと、中央演算装置とが含まれており、かつ、
前記中央演算装置においては、前記ユーザプログラムメモリに格納されたプログラムブロックを順次に読み出して実行するプログラム実行処理を含むプログラムブロック運転処理と、前記入出力装置と入出力メモリとの間で入出力パラメータの更新を行う入出力リフレッシュ処理と、前記通信手段を介して他のプログラマブルコントローラとの間でコマンドやレスポンスのやり取りを行うためのネットワーク処理とが、サイクリックに実行されるように仕組まれており、
前記プログラムブロックのそれぞれは、プログラムブロック識別子と、入出力パラメータ指定データと、プログラムブロック本体とを含んでおり、かつ
前記プログラムブロック実行処理は、
前記ユーザプログラムメモリから読み出されるプログラムブロックが前記プログラムブロック識別子に基づいてノーマルプログラムブロックと識別されときには、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入力パラメータを前記入出力メモリから読み出して一次記憶させると共に、この一次記憶させた入力パラメータを使用して、前記プログラムブロック本体を構成する命令コード列に従った実行処理を行って出力パラメータを生成して一次記憶すると共に、実行処理の終了を待って、一次記憶された出力パラメータを、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入出力メモリ内の出力パラメータを書き替える第1のプログラムブロック実行処理と、
前記ユーザプログラムメモリから読み出されるプログラムブロックが前記プログラムブロック識別子に基づいて入出力パラメータ送受信プログラムブロックと識別されときには、当該プログラムブロックに含まれる入出力パラメータ指定データで指定される入力パラメータを前記入出力メモリから読み出し、これを前記プログラムブロック本体を構成するプログラマブルコントローラのアドレスおよびプログラムブロックID番号から構成される相手先プログラム位置情報と前記入力パラメータの送信先である相手先プログラムブロックの相手先入力パラメータ位置情報とを含むデータ送信コマンドとしてネットワーク上に送信する一方、前記相手先プログラム位置情報で指定されるプログラマブルコントローラがこれを受信し、前記入力パラメータを相手先グラムブロックの相手先入力パラメータへ書き込み処理を完了したことを示す正常レスポンスをネットワーク上に送信し、前記入出力パラメータ送受信プログラムブロックがそのレスポンス受信したときには、前記入出力パラメータ指定データで指定される入出力メモリの出力パラメータを前記プログラムブロック本体を構成する前記相手先プログラム位置情報と前記相手先出力パラメータ位置情報とを含むデータ受信コマンドネットワーク上に送信し、前記相手先プログラム位置情報で指定されるプログラマブルコントローラが前記受信コマンドを受信するとその相手先プログラムブロックのプログラムブロック本体を構成する命令コード列に従った実行処理結果である相手先出力パラメータの値を正常レスポンスとしてネットワーク上に送信し、前記入出力パラメータ送受信プログラムブロックがそのレスポンスを受信すると前記入出力パラメータ指定データで指定される入出力メモリの出力パラメータとして書き替える第2のプログラムブロック実行手段とを含み、
それにより、ユーザプログラムメモリ中に入出力パラメータ送受信プログラムブロックを含ませることにより、当該プログラマブルコントローラのノーマルプログラムブロックの実行の際に、他のプログラマブルコントローラの入出力メモリから取得した入出力パラメータの値を使用可能とした、ことを特徴とするプログラマブルコントローラ。
A user program memory that can store one or more program blocks, each of which is an application program created by a user, an input device connected to a sensor, a switch, etc., and an output device connected to a motor, an actuator, etc. An input / output memory for storing input / output parameters exchanged with the combined input / output device, a central processing unit, and
In the central processing unit, program block operation processing including program execution processing for sequentially reading and executing the program blocks stored in the user program memory, and input / output parameters between the input / output device and the input / output memory I / O refresh processing for updating the network and network processing for exchanging commands and responses with other programmable controllers via the communication means are structured to be executed cyclically. ,
Each of the program blocks includes a program block identifier, input / output parameter designation data, and a program block body, and the program block execution process includes:
The sometimes program block read from the user program memory is identified as the program block identifier Based on the normal program block reads the input parameters specified by the input parameter specifying data included in the program block from the input memory Using the input parameters that are stored in a primary manner, performing an execution process in accordance with an instruction code string that constitutes the program block body, generating an output parameter, and temporarily storing the output parameters. A first program block execution process for rewriting the output parameter in the input / output memory designated by the input / output parameter designation data included in the program block, the output parameter temporarily stored after waiting for completion;
When a program block read from the user program memory is identified as an input / output parameter transmission / reception program block based on the program block identifier, an input parameter specified by input / output parameter specifying data included in the program block is input to the input / output memory. , The destination program position information consisting of the address of the programmable controller constituting the program block body and the program block ID number, and the destination input parameter position information of the destination program block to which the input parameters are transmitted while transmitting to the network as a data transmission command including bets, it receives the programmable controller so designated by the destination program location information, the input path The normal response indicating that the meter has completed the write process to the destination input parameter of a destination grams block transmitted on the network, sometimes the input and output parameters transceiver program block receives the response, the input parameter specified data It transmits the data reception command on the network, including in the destination program position information output parameters of the input and output memory specified constituting the program block body and said destination output parameter position information, the destination program location When the programmable controller that is specified by the information receives said received command and normal response to the instruction code is executed processing results according to the column value of the destination output parameter of the program block body of the partner program block Te is sent over the network, and a write replacing the second program block execution means as an output parameter of the input and output memory in which the input and output parameters transceiver program block specified by the received result the input and output parameters specifying data the response,
As a result, by including the input / output parameter transmission / reception program block in the user program memory, the value of the input / output parameter acquired from the input / output memory of another programmable controller is executed when the normal program block of the programmable controller is executed. A programmable controller characterized by being usable.
JP2000140998A 2000-05-12 2000-05-12 Programmable controller system Expired - Lifetime JP4186383B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000140998A JP4186383B2 (en) 2000-05-12 2000-05-12 Programmable controller system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000140998A JP4186383B2 (en) 2000-05-12 2000-05-12 Programmable controller system

Publications (2)

Publication Number Publication Date
JP2001325011A JP2001325011A (en) 2001-11-22
JP4186383B2 true JP4186383B2 (en) 2008-11-26

Family

ID=18648187

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000140998A Expired - Lifetime JP4186383B2 (en) 2000-05-12 2000-05-12 Programmable controller system

Country Status (1)

Country Link
JP (1) JP4186383B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006076773A (en) * 2004-09-13 2006-03-23 Toshiba Elevator Co Ltd Data transmission system for elevator
WO2014167622A1 (en) * 2013-04-08 2014-10-16 三菱電機株式会社 Program editing device, program editing method and program editing program
KR101772785B1 (en) * 2013-04-08 2017-08-29 미쓰비시덴키 가부시키가이샤 Program chart display device, program chart display method, and computer readable recoding medium for recording program chart display program
JP6175306B2 (en) * 2013-08-09 2017-08-02 株式会社東芝 Control program dividing apparatus, control program dividing method and recording medium therefor
JP6606010B2 (en) * 2016-05-09 2019-11-13 日本電信電話株式会社 Single function part system, single function part method and single function part program
JP6939665B2 (en) 2018-03-15 2021-09-22 オムロン株式会社 Network system

Also Published As

Publication number Publication date
JP2001325011A (en) 2001-11-22

Similar Documents

Publication Publication Date Title
US7836217B2 (en) Associating and evaluating status information for a primary input parameter value from a Profibus device
JP3729251B2 (en) Controller and system
US7747718B2 (en) Control system apparatus, method for setting control system and setting program
US7275236B1 (en) Method for programming a multiple device control system using object sharing
CN102289366B (en) Methods and apparatus for accessing process control data
US8521359B1 (en) Application-independent and component-isolated system and system of systems framework
US20020049959A1 (en) Industrial controller based on distributable technology objects
JPH0283601A (en) Programmable-controller
WO2005109299A1 (en) Robot control software framework in open distributed process architecture
CN1231734A (en) Systems and methods for providing dynamic data referencing in a generic data exchange environment
JPH0534860B2 (en)
JPH11231927A (en) Monitor and control system
CN114237676B (en) FPGA logic updating method, device, equipment and readable storage medium
US20100064297A1 (en) Configuring And Providing Enhanced Access To Profibus Device Diagnostic Data
JP2005018159A (en) Storage system construction support device, storage system construction support method and storage system construction support program
CN109542043A (en) A kind of digital control system management method and device based on plug-in unit
JP4186383B2 (en) Programmable controller system
JP2820189B2 (en) Control software execution system for numerical controller
US20020198970A1 (en) Programmable controller system
JP2005259079A (en) Tool
JP3988605B2 (en) Setting tool device
JP2001325010A (en) Programmable controller system
JP6793881B1 (en) Management equipment, management system, management method and program
KR101085114B1 (en) System for providing programable logic controller software development environment
JP4282961B2 (en) System that defines data input / output in the controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050920

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080414

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080514

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080714

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080901

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4186383

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110919

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110919

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120919

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130919

Year of fee payment: 5

EXPY Cancellation because of completion of term